/******/ (() => { // webpackBootstrap
/******/ 	var __webpack_modules__ = ({

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/Chart.js":
/*!********************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/Chart.js ***!
  \********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Chart": () => (/* binding */ Chart),
/* harmony export */   "ChartDataItem": () => (/* binding */ ChartDataItem)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_Component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/Component */ "./node_modules/@amcharts/amcharts4/.internal/core/Component.js");
/* harmony import */ var _core_utils_Disposer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../core/utils/Disposer */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Disposer.js");
/* harmony import */ var _core_utils_List__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../core/utils/List */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/List.js");
/* harmony import */ var _core_Container__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../core/Container */ "./node_modules/@amcharts/amcharts4/.internal/core/Container.js");
/* harmony import */ var _core_elements_Label__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../core/elements/Label */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Label.js");
/* harmony import */ var _core_elements_Grip__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../core/elements/Grip */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Grip.js");
/* harmony import */ var _core_DataItem__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../core/DataItem */ "./node_modules/@amcharts/amcharts4/.internal/core/DataItem.js");
/* harmony import */ var _core_utils_Percent__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../core/utils/Percent */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Percent.js");
/* harmony import */ var _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../core/utils/Iterator */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Iterator.js");
/* harmony import */ var _core_utils_Type__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../core/utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/* harmony import */ var _core_utils_Responsive__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../core/utils/Responsive */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Responsive.js");
/**
 * [[Chart]] class provides base functionality for all chart types to inherit.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */













/**
 * ============================================================================
 * DATA ITEM
 * ============================================================================
 * @hidden
 */

/**
 * Defines a [[DataItem]] for [[Chart]].
 *
 * @see {@link DataItem}
 */

var ChartDataItem =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_12__.__extends)(ChartDataItem, _super);
  /**
   * Constructor
   */


  function ChartDataItem() {
    var _this = _super.call(this) || this;

    _this.className = "ChartDataItem";

    _this.applyTheme();

    return _this;
  }

  return ChartDataItem;
}(_core_DataItem__WEBPACK_IMPORTED_MODULE_7__.DataItem);


/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * A base class for all Charts.
 *
 * @see {@link IChartEvents} for a list of available Events
 * @see {@link IChartAdapters} for a list of available Adapters
 */

var Chart =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_12__.__extends)(Chart, _super);
  /**
   * Constructor
   */


  function Chart() {
    var _this = // Init
    _super.call(this) || this;
    /**
     * A reference to chart's [[Legend]].
     * @ignore
     */


    _this._legend = new _core_utils_Disposer__WEBPACK_IMPORTED_MODULE_2__.MutableValueDisposer();

    if (_this.constructor === Chart) {
      throw new Error("'Chart' cannot be instantiated directly. Please use a specific chart type.");
    }

    _this.className = "Chart"; // Create a list of titles

    var template = new _core_elements_Label__WEBPACK_IMPORTED_MODULE_5__.Label();
    _this.titles = new _core_utils_List__WEBPACK_IMPORTED_MODULE_3__.ListTemplate(template);

    _this._disposers.push(new _core_utils_List__WEBPACK_IMPORTED_MODULE_3__.ListDisposer(_this.titles));

    _this._disposers.push(template); // Chart component is also a container. it holds _chartAndLegendCont and titles


    _this.width = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_8__.percent)(100);
    _this.height = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_8__.percent)(100);
    _this.layout = "vertical"; // Chart and legend

    var chartAndLegendContainer = _this.createChild(_core_Container__WEBPACK_IMPORTED_MODULE_4__.Container);

    chartAndLegendContainer.shouldClone = false;
    chartAndLegendContainer.layout = "vertical";
    chartAndLegendContainer.width = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_8__.percent)(100);
    chartAndLegendContainer.height = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_8__.percent)(100);
    _this.chartAndLegendContainer = chartAndLegendContainer; // Chart container holds all the elements of a chart, extept titles and legend

    var chartContainer = chartAndLegendContainer.createChild(_core_Container__WEBPACK_IMPORTED_MODULE_4__.Container);
    chartContainer.shouldClone = false;
    chartContainer.width = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_8__.percent)(100);
    chartContainer.height = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_8__.percent)(100);
    _this.chartContainer = chartContainer;
    _this.showOnInit = true;

    _this._disposers.push(_this._legend); // Add title list events to apply certain formatting options and to make
    // the chart reference them as accessible screen reader labels


    _this.titles.events.on("inserted", function (label) {
      _this.processTitle(label);

      _this.updateReaderTitleReferences();
    }, _this, false);

    _this.titles.events.on("removed", function (label) {
      _this.updateReaderTitleReferences();
    }, _this, false); // Accessibility
    // It seems we can't set focusable on the whole chart because it seems to
    // mess up the whole focus event system - getting a focus on an inside
    // object also trigger focus on parent
    //this.focusable = true;


    _this.role = "region";
    _this.defaultState.transitionDuration = 1; // Apply theme

    _this.applyTheme();

    return _this;
  }
  /**
   * Sets defaults that instantiate some objects that rely on parent, so they
   * cannot be set in constructor.
   */


  Chart.prototype.applyInternalDefaults = function () {
    _super.prototype.applyInternalDefaults.call(this);

    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_10__.hasValue(this.readerTitle)) {
      this.readerTitle = this.language.translate("Chart");
    }
  };
  /**
   * Initiates drawing of the chart.
   *
   * @ignore Exclude from docs
   */


  Chart.prototype.draw = function () {
    this.fixLayout();

    _super.prototype.draw.call(this);
  };
  /**
   * Updates legend's hierarchy based on the position.
   */


  Chart.prototype.fixLayout = function () {
    var legend = this.legend;

    if (legend) {
      var chartAndLegendContainer = this.chartAndLegendContainer;
      var chartContainer = this.chartContainer;
      chartContainer.x = undefined;
      chartContainer.y = undefined;

      if (legend.position != "absolute") {
        legend.x = undefined;
        legend.y = undefined;
      }

      switch (legend.position) {
        case "left":
          chartAndLegendContainer.layout = "horizontal";
          legend.toBack();
          break;

        case "right":
          chartAndLegendContainer.layout = "horizontal";
          legend.toFront();
          break;

        case "top":
          chartAndLegendContainer.layout = "vertical";
          legend.toBack();
          break;

        case "bottom":
          chartAndLegendContainer.layout = "vertical";
          legend.toFront();
          break;

        case "absolute":
          legend.isMeasured = false;
          break;
      }
    }
  };
  /**
   * Setups the legend to use the chart's data.
   */


  Chart.prototype.feedLegend = function () {// Nothing here. This method is provided only as a "placeholder" for
    // extending classes to override
  };
  /**
   * Adds a new title to the chart when it is inserted into chart's titles
   * list.
   * @param event  An event object which is triggered when inserting into titles list
   * @return Label object
   */


  Chart.prototype.processTitle = function (event) {
    var title = event.newValue;
    title.parent = this;
    title.toBack();
    title.shouldClone = false;
    title.align = "center"; // Need to explicitly apply the `id` attribute so it can be referenced by
    // `aria-labelledby`

    title.uidAttr();
    return title;
  };
  /**
   * Checks if chart has any title elements. If it does, we will use them in an
   * `aria-labelledby` attribute so that screen readers can use them to properly
   * describe the chart when it is focused or hovered.
   *
   * @ignore Exclude from docs
   */


  Chart.prototype.updateReaderTitleReferences = function () {
    if (this.titles.length) {
      var titleIds_1 = [];
      _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_9__.each(this.titles.iterator(), function (title) {
        titleIds_1.push(title.uid);
      });
      this.setSVGAttribute({
        "aria-labelledby": titleIds_1.join(" ")
      });
    } else {
      this.removeSVGAttribute("aria-labelledby");
    }
  };

  Object.defineProperty(Chart.prototype, "legend", {
    /**
     * @return Legend
     */
    get: function get() {
      return this._legend.get();
    },

    /**
     * Holds the instance of chart's [[Leged]].
     *
     * @see {@link https://www.amcharts.com/docs/v4/concepts/legend/} for more information about legends
     * @param Legend
     */
    set: function set(legend) {
      this.setLegend(legend);
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Prepares the legend instance for use in this chart.
   *
   * @param legend  Legend
   */

  Chart.prototype.setLegend = function (legend) {
    var _this = this;

    if (this._legend.get() !== legend) {
      if (legend) {
        // Set legend options
        legend.parent = this.chartAndLegendContainer;

        this._legend.set(legend, legend.events.on("propertychanged", function (event) {
          if (event.property == "position") {
            _this.fixLayout();
          }
        }, undefined, false));

        legend.addDisposer(new _core_utils_Disposer__WEBPACK_IMPORTED_MODULE_2__.Disposer(function () {
          _this.legend = undefined;
        }));
      } else {
        this._legend.reset();
      }

      this.feedLegend();
    }
  };
  /**
   * Destroys this object and all related data.
   */


  Chart.prototype.dispose = function () {
    // otherwise there might be some errors when disposing chart which was just inited
    if (this.legend) {
      this.legend.dispose();
    }

    _super.prototype.dispose.call(this);
  };
  /**
   * Processes JSON-based config before it is applied to the object.
   *
   * @ignore Exclude from docs
   * @param config  Config
   */


  Chart.prototype.processConfig = function (config) {
    if (config) {
      // Set up legend
      if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_10__.hasValue(config.legend) && !_core_utils_Type__WEBPACK_IMPORTED_MODULE_10__.hasValue(config.legend.type)) {
        config.legend.type = "Legend";
      }
    }

    _super.prototype.processConfig.call(this, config);
  };
  /**
   * Copies all properties from another instance of [[Series]].
   *
   * @param source  Source series
   */


  Chart.prototype.copyFrom = function (source) {
    this.titles.copyFrom(source.titles);
    this.chartContainer.copyFrom(source.chartContainer);

    if (source.legend) {
      this.legend = source.legend.clone();
      this.legend.removeChildren();
    }

    _super.prototype.copyFrom.call(this, source);
  };

  Object.defineProperty(Chart.prototype, "dragGrip", {
    /**
     * @return Grip
     */
    get: function get() {
      var _this = this;

      if (!this._dragGrip) {
        var grip_1 = this.tooltipContainer.createChild(_core_elements_Grip__WEBPACK_IMPORTED_MODULE_6__.Grip);
        grip_1.align = "right";
        grip_1.valign = "middle";
        grip_1.hide(0);
        grip_1.events.on("down", function (ev) {
          if (ev.touch) {
            _this.interactionsEnabled = false;
          }
        });
        grip_1.events.on("up", function (ev) {
          _this.interactionsEnabled = true;
        });
        this.events.on("down", function (ev) {
          if (ev.touch) {
            grip_1.show();
          }
        });
        this._dragGrip = grip_1;
      }

      return this._dragGrip;
    },

    /**
     * An instance of [[Grip]] which serves as a grip point which appears on
     * touch and allows scrolling whole page even if chart is occupying the
     * whole of the screen and would otherwise prevent scrolling.
     *
     * @since 4.4.0
     * @see {@link https://www.amcharts.com/docs/v4/concepts/touch/} For more information.
     * @param  value  Grip
     */
    set: function set(value) {
      this._dragGrip = value;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Chart.prototype, "focusable", {
    get: function get() {
      return this.parent.focusable;
    },
    set: function set(value) {
      this.parent.focusable = value;
    },
    enumerable: true,
    configurable: true
  });
  return Chart;
}(_core_Component__WEBPACK_IMPORTED_MODULE_1__.Component);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_0__.registry.registeredClasses.Chart = Chart;
/**
 * Add default responsive rules
 */

/**
 * Reduce horizontal margins
 */

_core_utils_Responsive__WEBPACK_IMPORTED_MODULE_11__.defaultRules.push({
  relevant: _core_utils_Responsive__WEBPACK_IMPORTED_MODULE_11__.ResponsiveBreakpoints.widthXS,
  state: function state(target, stateId) {
    if (target instanceof Chart) {
      var state = target.states.create(stateId);

      if (target.pixelPaddingLeft > 10) {
        state.properties.paddingLeft = 10;
      }

      if (target.pixelPaddingRight > 10) {
        state.properties.paddingRight = 10;
      }

      return state;
    }

    return null;
  }
});
/**
 * Reduce vertical margins
 */

_core_utils_Responsive__WEBPACK_IMPORTED_MODULE_11__.defaultRules.push({
  relevant: _core_utils_Responsive__WEBPACK_IMPORTED_MODULE_11__.ResponsiveBreakpoints.heightXS,
  state: function state(target, stateId) {
    if (target instanceof Chart) {
      var state = target.states.create(stateId);

      if (target.pixelPaddingTop > 10) {
        state.properties.paddingTop = 10;
      }

      if (target.pixelPaddingBottom > 10) {
        state.properties.paddingBottom = 10;
      }

      return state;
    }

    return null;
  }
});
/**
 * Remove horizontal padding
 */

_core_utils_Responsive__WEBPACK_IMPORTED_MODULE_11__.defaultRules.push({
  relevant: _core_utils_Responsive__WEBPACK_IMPORTED_MODULE_11__.ResponsiveBreakpoints.widthXXS,
  state: function state(target, stateId) {
    if (target instanceof Chart) {
      var state = target.states.create(stateId);
      state.properties.paddingLeft = 0;
      state.properties.paddingRight = 0;
      return state;
    }

    return null;
  }
});
/**
 * Remove vertical padding
 */

_core_utils_Responsive__WEBPACK_IMPORTED_MODULE_11__.defaultRules.push({
  relevant: _core_utils_Responsive__WEBPACK_IMPORTED_MODULE_11__.ResponsiveBreakpoints.heightXXS,
  state: function state(target, stateId) {
    if (target instanceof Chart) {
      var state = target.states.create(stateId);
      state.properties.paddingTop = 0;
      state.properties.paddingBottom = 0;
      return state;
    }

    return null;
  }
});

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/Legend.js":
/*!*********************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/Legend.js ***!
  \*********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Legend": () => (/* binding */ Legend),
/* harmony export */   "LegendDataItem": () => (/* binding */ LegendDataItem),
/* harmony export */   "LegendSettings": () => (/* binding */ LegendSettings)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _core_Component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../core/Component */ "./node_modules/@amcharts/amcharts4/.internal/core/Component.js");
/* harmony import */ var _core_DataItem__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/DataItem */ "./node_modules/@amcharts/amcharts4/.internal/core/DataItem.js");
/* harmony import */ var _core_utils_List__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../core/utils/List */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/List.js");
/* harmony import */ var _core_elements_RoundedRectangle__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../core/elements/RoundedRectangle */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/RoundedRectangle.js");
/* harmony import */ var _core_Container__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../core/Container */ "./node_modules/@amcharts/amcharts4/.internal/core/Container.js");
/* harmony import */ var _core_elements_Label__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../core/elements/Label */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Label.js");
/* harmony import */ var _core_utils_Keyboard__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../core/utils/Keyboard */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Keyboard.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_interaction_Interaction__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../core/interaction/Interaction */ "./node_modules/@amcharts/amcharts4/.internal/core/interaction/Interaction.js");
/* harmony import */ var _core_utils_Percent__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../core/utils/Percent */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Percent.js");
/* harmony import */ var _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../core/utils/InterfaceColorSet */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/InterfaceColorSet.js");
/* harmony import */ var _core_utils_Utils__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../core/utils/Utils */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Utils.js");
/* harmony import */ var _core_utils_Type__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../core/utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/* harmony import */ var _core_utils_Math__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../core/utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
/* harmony import */ var _core_Sprite__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../core/Sprite */ "./node_modules/@amcharts/amcharts4/.internal/core/Sprite.js");
/* harmony import */ var _core_utils_Disposer__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../core/utils/Disposer */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Disposer.js");
/* harmony import */ var _core_interaction_Mouse__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../core/interaction/Mouse */ "./node_modules/@amcharts/amcharts4/.internal/core/interaction/Mouse.js");
/* harmony import */ var _core_utils_Responsive__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../core/utils/Responsive */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Responsive.js");
/* harmony import */ var _core_elements_Scrollbar__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../core/elements/Scrollbar */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Scrollbar.js");
/**
 * Legend-related functionality.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */




















/**
 * ============================================================================
 * DATA ITEM
 * ============================================================================
 * @hidden
 */

/**
 * Defines a [[DataItem]] for [[Legend]].
 *
 * @see {@link DataItem}
 */

var LegendDataItem =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_19__.__extends)(LegendDataItem, _super);
  /**
   * Constructor
   */


  function LegendDataItem() {
    var _this = _super.call(this) || this;
    /**
     * @ignore
     */


    _this.childrenCreated = false;
    _this.className = "LegendDataItem";

    _this.applyTheme();

    return _this;
  }

  Object.defineProperty(LegendDataItem.prototype, "label", {
    /**
     * A legend item's [[Label]] element.
     *
     * @return Label
     */
    get: function get() {
      var _this = this;

      if (!this._label) {
        var label_1 = this.component.labels.create();
        this._label = label_1;
        this.addSprite(label_1);

        this._disposers.push(label_1);

        label_1.parent = this.itemContainer;

        this._disposers.push(new _core_utils_Disposer__WEBPACK_IMPORTED_MODULE_15__.Disposer(function () {
          if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_12__.hasValue(_this.component)) {
            _this.component.labels.removeValue(label_1);
          }
        }));
      }

      return this._label;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(LegendDataItem.prototype, "color", {
    /**
     * @return Main color
     */
    get: function get() {
      return this.properties.color;
    },

    /**
     * Main color of legend data item.
     *
     * This is set by the target element this legend item represents, like
     * a Series or a Slice.
     *
     * It can be used to derive a color in legend's sub-items, like label:
     *
     * ```TypeScript
     * chart.legend.labels.template.text = "[{color}]{name}[/]";
     * ```
     * ```JavaScript
     * chart.legend.labels.template.text = "[{color}]{name}[/]";
     * ```
     * ```JSON
     * {
     *   // ...
     *   "legend": {
     *     // ...
     *     "labels": {
     *       "text": "[{color}]{name}[/]"
     *     }
     *   }
     * }
     * ```
     *
     * @see {@link https://www.amcharts.com/docs/v4/concepts/legend/#Legend_labels} For more information about configuring legend labels.
     * @param value  Main color
     */
    set: function set(value) {
      this.setProperty("color", value);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(LegendDataItem.prototype, "valueLabel", {
    /**
     * A legend item's [[Label]] element for "value label".
     *
     * @return Label
     */
    get: function get() {
      var _this = this;

      if (!this._valueLabel) {
        var valueLabel_1 = this.component.valueLabels.create();
        this._valueLabel = valueLabel_1;
        this.addSprite(valueLabel_1);

        this._disposers.push(valueLabel_1);

        valueLabel_1.parent = this.itemContainer;

        this._disposers.push(new _core_utils_Disposer__WEBPACK_IMPORTED_MODULE_15__.Disposer(function () {
          if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_12__.hasValue(_this.component)) {
            _this.component.valueLabels.removeValue(valueLabel_1);
          }
        }));
      }

      return this._valueLabel;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(LegendDataItem.prototype, "itemContainer", {
    /**
     * A reference to the main [[Container]] that holds legend item's elements:
     * marker and labels.
     *
     * @return Item container
     */
    get: function get() {
      var _this = this;

      if (!this._itemContainer) {
        var component_1 = this.component;
        var itemContainer_1 = component_1.itemContainers.create();
        itemContainer_1.parent = component_1;
        this._itemContainer = itemContainer_1;
        this.addSprite(itemContainer_1);

        this._disposers.push(itemContainer_1); // Add click/tap event to toggle item


        if (itemContainer_1.togglable) {
          itemContainer_1.events.on("toggled", function (ev) {
            component_1.toggleDataItem(ev.target.dataItem);
          }, undefined, false);
        } // Add focus event so that we can track which object is currently in focus
        // for keyboard toggling


        if (itemContainer_1.focusable) {
          itemContainer_1.events.on("hit", function (ev) {
            // We need this here in order to reset focused item when it is clicked
            // normally so that it is not toggled by ENTER afterwards
            component_1.focusedItem = undefined;
          }, undefined, false);
          itemContainer_1.events.on("focus", function (ev) {
            component_1.focusedItem = ev.target.dataItem;
          }, undefined, false);
          itemContainer_1.events.on("blur", function (ev) {
            component_1.focusedItem = undefined;
          }, undefined, false);
        }

        this._disposers.push(new _core_utils_Disposer__WEBPACK_IMPORTED_MODULE_15__.Disposer(function () {
          if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_12__.hasValue(_this.component)) {
            _this.component.itemContainers.removeValue(itemContainer_1);
          }
        }));

        if (this.dataContext.uidAttr) {
          itemContainer_1.readerControls = this.dataContext.uidAttr();
          itemContainer_1.readerLabelledBy = this.dataContext.uidAttr();
        }

        var sprite = this.dataContext;

        if ((sprite instanceof _core_DataItem__WEBPACK_IMPORTED_MODULE_1__.DataItem || sprite instanceof _core_Sprite__WEBPACK_IMPORTED_MODULE_14__.Sprite) && !sprite.isDisposed()) {
          var visibilitychanged = function visibilitychanged(ev) {
            itemContainer_1.readerChecked = ev.visible;
            itemContainer_1.events.disableType("toggled");
            itemContainer_1.isActive = !ev.visible;
            itemContainer_1.events.enableType("toggled");
          };

          sprite.addDisposer(new _core_utils_Disposer__WEBPACK_IMPORTED_MODULE_15__.Disposer(function () {
            if (_this.component) {
              _this.component.dataItems.remove(_this);
            }
          }));

          if (sprite instanceof _core_Sprite__WEBPACK_IMPORTED_MODULE_14__.Sprite) {
            itemContainer_1.addDisposer(sprite.events.on("visibilitychanged", visibilitychanged, undefined, false));
            itemContainer_1.addDisposer(sprite.events.on("hidden", function (ev) {
              itemContainer_1.readerChecked = false;
              itemContainer_1.events.disableType("toggled");
              itemContainer_1.isActive = true;
              itemContainer_1.events.enableType("toggled");
            }, undefined, false));
            itemContainer_1.addDisposer(sprite.events.on("shown", function (ev) {
              itemContainer_1.readerChecked = true;
              itemContainer_1.events.disableType("toggled");
              itemContainer_1.isActive = false;
              itemContainer_1.events.enableType("toggled");
            }, undefined, false));
          } else {
            itemContainer_1.addDisposer(sprite.events.on("visibilitychanged", visibilitychanged, undefined, false));
          }
        }
      }

      return this._itemContainer;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(LegendDataItem.prototype, "marker", {
    /**
     * A [[Container]] that holds legend item's marker element.
     *
     * @return Marker
     */
    get: function get() {
      var _this = this;

      if (!this._marker) {
        var marker_1 = this.component.markers.create();
        this._marker = marker_1;
        marker_1.parent = this.itemContainer;
        this.addSprite(marker_1);

        this._disposers.push(marker_1);

        this._disposers.push(new _core_utils_Disposer__WEBPACK_IMPORTED_MODULE_15__.Disposer(function () {
          if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_12__.hasValue(_this.component)) {
            _this.component.markers.removeValue(marker_1);
          }
        }));
      }

      return this._marker;
    },
    enumerable: true,
    configurable: true
  });
  return LegendDataItem;
}(_core_DataItem__WEBPACK_IMPORTED_MODULE_1__.DataItem);


/**
 * ============================================================================
 * REQUISITES
 * ============================================================================
 * @hidden
 */

/**
 * Defines a class that carries legend settings.
 *
 * A legend might change its settings dynamically. Legend can also be shared
 * by several elements, requiring different settings.
 *
 * Having legend's settings in a separate object is a good way to "hot swap"
 * a set of settings for the legend.
 */

var LegendSettings =
/** @class */
function () {
  function LegendSettings() {
    /**
     * Should marker be created for each legend item.
     */
    this.createMarker = true;
  }

  return LegendSettings;
}();


/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * [[Legend]] class is used to create legend for the chart.
 *
 * @see {@link https://www.amcharts.com/docs/v4/concepts/legend/} for Legend documentation
 * @see {@link ILegendEvents} for a list of available events
 * @see {@link ILegendAdapters} for a list of available Adapters
 */

var Legend =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_19__.__extends)(Legend, _super);
  /**
   * Constructor
   */


  function Legend() {
    var _this = _super.call(this) || this;

    _this.className = "Legend"; // Set defaults

    _this.layout = "grid";

    _this.setPropertyValue("useDefaultMarker", false);

    _this.setPropertyValue("scrollable", false);

    _this.setPropertyValue("contentAlign", "center"); // Create a template container and list for legend items


    var itemContainer = new _core_Container__WEBPACK_IMPORTED_MODULE_4__.Container();
    itemContainer.applyOnClones = true;
    itemContainer.padding(8, 0, 8, 0);
    itemContainer.margin(0, 10, 0, 10);
    itemContainer.layout = "horizontal";
    itemContainer.clickable = true;
    itemContainer.focusable = true;
    itemContainer.role = "switch";
    itemContainer.togglable = true;
    itemContainer.cursorOverStyle = _core_interaction_Mouse__WEBPACK_IMPORTED_MODULE_16__.MouseCursorStyle.pointer;
    itemContainer.background.fillOpacity = 0; // creates hit area
    // Create container list using item template we just created

    _this.itemContainers = new _core_utils_List__WEBPACK_IMPORTED_MODULE_2__.ListTemplate(itemContainer);

    _this._disposers.push(new _core_utils_List__WEBPACK_IMPORTED_MODULE_2__.ListDisposer(_this.itemContainers));

    _this._disposers.push(_this.itemContainers.template); // Set up global keyboard events for toggling elements


    _this._disposers.push((0,_core_interaction_Interaction__WEBPACK_IMPORTED_MODULE_8__.getInteraction)().body.events.on("keyup", function (ev) {
      if (_core_utils_Keyboard__WEBPACK_IMPORTED_MODULE_6__.keyboard.isKey(ev.event, "enter") && _this.focusedItem) {
        var focusedItem = _this.focusedItem;
        var target = focusedItem.itemContainer;

        if (target.togglable) {
          _this.toggleDataItem(focusedItem);
        } else if (target.clickable && target.events.isEnabled("hit")) {
          target.dispatchImmediately("hit", {
            event: ev
          }); // We need this here because "hit" event resets `this.focusedItem`
          // And we need it here

          _this.focusedItem = focusedItem;
        }
      }
    }, _this));

    var interfaceColors = new _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_10__.InterfaceColorSet(); // Create a template container and list for the a marker

    var marker = new _core_Container__WEBPACK_IMPORTED_MODULE_4__.Container();
    marker.width = 23;
    marker.height = 23;
    marker.interactionsEnabled = false;
    marker.applyOnClones = true;
    marker.setStateOnChildren = true;
    marker.background.fillOpacity = 0;
    marker.background.strokeOpacity = 0;
    marker.propertyFields.fill = "fill";
    marker.valign = "middle";
    var disabledColor = interfaceColors.getFor("disabledBackground");
    marker.events.on("childadded", function (event) {
      var child = event.newValue;
      var activeState = child.states.create("active");
      activeState.properties.stroke = disabledColor;
      activeState.properties.fill = disabledColor;
    });
    _this.markers = new _core_utils_List__WEBPACK_IMPORTED_MODULE_2__.ListTemplate(marker);

    _this._disposers.push(new _core_utils_List__WEBPACK_IMPORTED_MODULE_2__.ListDisposer(_this.markers));

    _this._disposers.push(_this.markers.template); // Create a legend background element


    var rectangle = marker.createChild(_core_elements_RoundedRectangle__WEBPACK_IMPORTED_MODULE_3__.RoundedRectangle);
    rectangle.width = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_9__.percent)(100);
    rectangle.height = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_9__.percent)(100);
    rectangle.applyOnClones = true;
    rectangle.propertyFields.fill = "fill"; //othrwise old edge doesn't like as the same pattern is set both on parent and child https://codepen.io/team/amcharts/pen/72d7a98f3fb811d3118795220ff63182

    rectangle.strokeOpacity = 0; // Create a template container and list for item labels

    var label = new _core_elements_Label__WEBPACK_IMPORTED_MODULE_5__.Label();
    label.text = "{name}";
    label.margin(0, 5, 0, 5);
    label.valign = "middle";
    label.applyOnClones = true;
    label.states.create("active").properties.fill = interfaceColors.getFor("disabledBackground");
    _this.labels = new _core_utils_List__WEBPACK_IMPORTED_MODULE_2__.ListTemplate(label);

    _this._disposers.push(new _core_utils_List__WEBPACK_IMPORTED_MODULE_2__.ListDisposer(_this.labels));

    _this._disposers.push(_this.labels.template);

    label.interactionsEnabled = false;
    label.truncate = true;
    label.fullWords = false; // Create a template container and list for item value labels

    var valueLabel = new _core_elements_Label__WEBPACK_IMPORTED_MODULE_5__.Label();
    valueLabel.margin(0, 5, 0, 0);
    valueLabel.valign = "middle";
    valueLabel.width = 50; // to avoid rearranging legend entries when value changes.

    valueLabel.align = "right";
    valueLabel.textAlign = "end";
    valueLabel.applyOnClones = true;
    valueLabel.states.create("active").properties.fill = interfaceColors.getFor("disabledBackground");
    valueLabel.interactionsEnabled = false;
    _this.valueLabels = new _core_utils_List__WEBPACK_IMPORTED_MODULE_2__.ListTemplate(valueLabel);

    _this._disposers.push(new _core_utils_List__WEBPACK_IMPORTED_MODULE_2__.ListDisposer(_this.valueLabels));

    _this._disposers.push(_this.valueLabels.template);

    _this.position = "bottom"; // don't use setPropertyValue here!
    // Create a state for disabled legend items

    itemContainer.states.create("active");
    itemContainer.setStateOnChildren = true; // Apply accessibility settings

    _this.role = "group";

    _this.events.on("layoutvalidated", _this.handleScrollbar, _this, false);

    _this.applyTheme();

    return _this;
  }
  /**
   * Sets defaults that instantiate some objects that rely on parent, so they
   * cannot be set in constructor.
   */


  Legend.prototype.applyInternalDefaults = function () {
    _super.prototype.applyInternalDefaults.call(this);

    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_12__.hasValue(this.readerTitle)) {
      this.readerTitle = this.language.translate("Legend");
    }
  };
  /**
   * Returns a new/empty DataItem of the type appropriate for this object.
   *
   * @see {@link DataItem}
   * @return Data Item
   */


  Legend.prototype.createDataItem = function () {
    return new LegendDataItem();
  };
  /**
   * [validateDataElements description]
   *
   * @ignore Exclude from docs
   * @todo Description
   */


  Legend.prototype.validateDataElements = function () {
    if (this.scrollbar) {
      this.scrollbar.start = 0;
      this.scrollbar.end = 1;
    }

    _super.prototype.validateDataElements.call(this);
  };
  /**
   * [validateDataElement description]
   *
   * @ignore Exclude from docs
   * @param dataItem Data item
   * @todo Description
   * @todo Figure out how to update appearance of legend item without losing focus
   * @todo Update legend marker appearance as apperance of related series changes
   */


  Legend.prototype.validateDataElement = function (dataItem) {
    _super.prototype.validateDataElement.call(this, dataItem); // Get data item (legend item's) container


    var container = dataItem.itemContainer;
    var marker = dataItem.marker;
    _core_utils_Utils__WEBPACK_IMPORTED_MODULE_11__.used(dataItem.label);
    var valueLabel = dataItem.valueLabel; // Set parent and update current state

    container.readerChecked = dataItem.dataContext.visible; // Tell series its legend data item

    dataItem.dataContext.legendDataItem = dataItem;
    var tempMaxWidth = dataItem.label.maxWidth;

    if (!(dataItem.label.width instanceof _core_utils_Percent__WEBPACK_IMPORTED_MODULE_9__.Percent)) {
      dataItem.label.width = undefined;
    }

    if (tempMaxWidth > 0) {
      dataItem.label.maxWidth = tempMaxWidth;
    }

    if (valueLabel.align == "right") {
      valueLabel.width = undefined;
    }

    var legendSettings = dataItem.dataContext.legendSettings; // If we are not using default markers, create a unique legend marker based
    // on the data item type

    var dataContext = dataItem.dataContext;

    if (dataContext.createLegendMarker && (!this.useDefaultMarker || !(dataContext instanceof _core_Sprite__WEBPACK_IMPORTED_MODULE_14__.Sprite))) {
      if (!dataItem.childrenCreated) {
        dataContext.createLegendMarker(marker);
        dataItem.childrenCreated = true;
      }
    } else {
      this.markers.template.propertyFields.fill = undefined;
    }

    if (dataContext.updateLegendValue) {
      dataContext.updateLegendValue(); // this solves issue with external legend, as legend is created after chart updates legend values
    }

    if (dataContext.component && dataContext.component.updateLegendValue) {
      dataContext.component.updateLegendValue(dataContext);
    }

    if (valueLabel.invalid) {
      valueLabel.validate();
    }

    if (valueLabel.text == "" || valueLabel.text == undefined) {
      valueLabel.__disabled = true;
    } else {
      valueLabel.__disabled = false;
    }

    if (legendSettings && (legendSettings.itemValueText != undefined || legendSettings.valueText != undefined)) {
      valueLabel.__disabled = false;
    }

    var visible = dataItem.dataContext.visible;

    if (visible === undefined) {
      visible = true;
    }

    visible = _core_utils_Type__WEBPACK_IMPORTED_MODULE_12__.toBoolean(visible);
    dataItem.dataContext.visible = visible;
    container.events.disableType("toggled");
    container.isActive = !visible;

    if (container.isActive) {
      container.setState("active", 0);
    } else {
      container.setState("default", 0);
    }

    container.events.enableType("toggled");
  };

  Legend.prototype.afterDraw = function () {
    var _this = this;

    var maxWidth = this.getPropertyValue("maxWidth");
    var maxLabelWidth = 0;
    this.labels.each(function (label) {
      if (label.invalid) {
        label.maxWidth = undefined;
        label.validate();
      }

      if (label.measuredWidth + label.pixelMarginLeft + label.pixelMarginRight > maxLabelWidth) {
        maxLabelWidth = label.measuredWidth + label.pixelMarginLeft + label.pixelMarginRight;
      }
    });
    var maxValueLabelWidth = 0;
    this.valueLabels.each(function (label) {
      if (label.invalid) {
        label.validate();
      }

      if (label.measuredWidth + label.pixelMarginLeft + label.pixelMarginRight > maxValueLabelWidth) {
        maxValueLabelWidth = label.measuredWidth + label.pixelMarginLeft + label.pixelMarginRight;
      }
    });
    var maxMarkerWidth = 0;
    this.markers.each(function (marker) {
      if (marker.invalid) {
        marker.validate();
      }

      if (marker.measuredWidth + marker.pixelMarginLeft + marker.pixelMarginRight > maxMarkerWidth) {
        maxMarkerWidth = marker.measuredWidth + marker.pixelMarginLeft + marker.pixelMarginRight;
      }
    });
    var itemContainer = this.itemContainers.template;
    var margin = itemContainer.pixelMarginRight + itemContainer.pixelMarginLeft;
    var maxAdjustedLabelWidth;
    var trueMaxWidth = maxLabelWidth + maxValueLabelWidth + maxMarkerWidth;

    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_12__.isNumber(maxWidth)) {
      maxAdjustedLabelWidth = maxLabelWidth;
    } else {
      maxWidth = maxWidth - margin;

      if (maxWidth > trueMaxWidth) {
        maxWidth = trueMaxWidth;
      }

      maxAdjustedLabelWidth = maxWidth - maxMarkerWidth - maxValueLabelWidth;
    }

    this.labels.each(function (label) {
      if (_this.valueLabels.template.align == "right" || label.measuredWidth > maxAdjustedLabelWidth) {
        if (!(label.width instanceof _core_utils_Percent__WEBPACK_IMPORTED_MODULE_9__.Percent)) {
          label.width = Math.min(label.maxWidth, maxAdjustedLabelWidth - label.pixelMarginLeft - label.pixelMarginRight);
          label.maxWidth = label.width;
        }
      }
    });

    if (this.valueLabels.template.align == "right") {
      this.valueLabels.each(function (valueLabel) {
        valueLabel.width = maxValueLabelWidth - valueLabel.pixelMarginRight - valueLabel.pixelMarginLeft;
      });
    }

    _super.prototype.afterDraw.call(this);
  };

  Legend.prototype.handleScrollbar = function () {
    var scrollbar = this.scrollbar;

    if (this.scrollable && scrollbar) {
      scrollbar.height = this.measuredHeight;
      scrollbar.x = this.measuredWidth - scrollbar.pixelWidth - scrollbar.pixelMarginLeft;

      if (this.contentHeight > this.measuredHeight) {
        scrollbar.visible = true;
        scrollbar.thumb.height = scrollbar.height * this.measuredHeight / this.contentHeight;
        this.paddingRight = scrollbar.pixelWidth + scrollbar.pixelMarginLeft + +scrollbar.pixelMarginRight;
      } else {
        scrollbar.visible = false;
      }

      scrollbar.handleThumbPosition();
      this.updateMasks();
    }
  };

  Object.defineProperty(Legend.prototype, "position", {
    /**
     * @return Position
     */
    get: function get() {
      return this.getPropertyValue("position");
    },

    /**
     * Position of the legend.
     *
     * Options: "left", "right", "top", "bottom" (default), or "absolute".
     *
     * IMPORTANT: [[MapChart]] will ignore this setting, as it is using different
     * layout structure than other charts.
     *
     * To position legend in [[MapChart]] set legend's `align` (`"left"` or
     * `"right"`) and `valign` (`"top"` or `"bottom"`) properties instead.
     *
     * @default "bottom"
     * @param value  Position
     */
    set: function set(value) {
      if (this.setPropertyValue("position", value)) {
        if (value == "left" || value == "right") {
          this.margin(10, 5, 10, 10);
          this.valign = "middle";
          this.contentAlign = "none";
          this.valueLabels.template.align = "right";

          if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_12__.isNumber(this.maxColumns)) {
            this.maxColumns = 1;
          }

          this.width = undefined;
          this.maxWidth = 220;
        } else {
          this.maxColumns = undefined;
          this.width = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_9__.percent)(100);
          this.valueLabels.template.align = "left";
        }

        this.invalidate();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Legend.prototype, "useDefaultMarker", {
    /**
     * @return Use default marker?
     */
    get: function get() {
      return this.getPropertyValue("useDefaultMarker");
    },

    /**
     * Should legend try to mirror the look of the related item when building
     * the marker for legend item?
     *
     * If set to `false` it will try to make the marker look like its related
     * item.
     *
     * E.g. if an item is for a Line Series, it will display a line of the
     * same thickness, color, and will use the same bullets if series have them.
     *
     * If set to `true`, all markers will be shown as squares, regardless of te
     * series type.
     *
     * @default false
     * @param value Use default marker?
     */
    set: function set(value) {
      this.setPropertyValue("useDefaultMarker", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Legend.prototype, "scrollable", {
    /**
     * @return Legend Scrollable?
     */
    get: function get() {
      return this.getPropertyValue("scrollable");
    },

    /**
     * If set to `true` the Legend will display a scrollbar if its contents do
     * not fit into its `maxHeight`.
     *
     * Please note that `maxHeight` is automatically set for Legend when its
     * `position` is set to `"left"` or `"right"`.
     *
     * @default false
     * @since 4.8.0
     * @param  value  Legend Scrollable?
     */
    set: function set(value) {
      if (this.setPropertyValue("scrollable", value, true)) {
        if (value) {
          var scrollbar = this.createChild(_core_elements_Scrollbar__WEBPACK_IMPORTED_MODULE_18__.Scrollbar);
          this.scrollbar = scrollbar;
          scrollbar.isMeasured = false;
          scrollbar.orientation = "vertical";
          scrollbar.endGrip.__disabled = true;
          scrollbar.startGrip.__disabled = true;
          scrollbar.visible = false;
          scrollbar.marginLeft = 5;
          this._mouseWheelDisposer = this.events.on("wheel", this.handleWheel, this, false);

          this._disposers.push(this._mouseWheelDisposer);

          this._disposers.push(scrollbar.events.on("rangechanged", this.updateMasks, this, false));
        } else {
          if (this._mouseWheelDisposer) {
            this._mouseWheelDisposer.dispose();

            if (this.scrollbar) {
              this.scrollbar.dispose();
              this.scrollbar = undefined;
            }
          }
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Handles mouse wheel scrolling of legend.
   *
   * @param  event  Event
   */

  Legend.prototype.handleWheel = function (event) {
    var shift = event.shift.y;
    var scrollbar = this.scrollbar;

    if (scrollbar) {
      var ds = shift / 1000 * this.measuredHeight / this.contentHeight;
      var delta = scrollbar.end - scrollbar.start;

      if (shift > 0) {
        scrollbar.start = _core_utils_Math__WEBPACK_IMPORTED_MODULE_13__.max(0, scrollbar.start - ds);
        scrollbar.end = scrollbar.start + delta;
      } else {
        scrollbar.end = _core_utils_Math__WEBPACK_IMPORTED_MODULE_13__.min(1, scrollbar.end - ds);
        scrollbar.start = scrollbar.end - delta;
      }
    }
  };
  /**
   * @ignore
   */


  Legend.prototype.updateMasks = function () {
    var _this = this;

    if (this.scrollbar) {
      this.itemContainers.each(function (itemContainer) {
        itemContainer.dy = -_this.scrollbar.thumb.pixelY * _this.contentHeight / _this.measuredHeight;
        itemContainer.maskRectangle = {
          x: 0,
          y: -itemContainer.dy,
          width: _this.measuredWidth,
          height: _this.measuredHeight
        };
      });
    }
  };
  /**
   * Toggles a legend item.
   *
   * @ignore Exclude from docs
   * @param item Legend item
   * @todo Maybe do it with togglable instead
   */


  Legend.prototype.toggleDataItem = function (item) {
    var dataContext = item.dataContext;

    if (!dataContext.visible || dataContext.isHiding || dataContext instanceof _core_Sprite__WEBPACK_IMPORTED_MODULE_14__.Sprite && dataContext.isHidden) {
      item.color = item.colorOrig;
      dataContext.appeared = true;
      item.itemContainer.isActive = false;

      if (dataContext.hidden === true) {
        dataContext.hidden = false;
      }

      if (dataContext.show) {
        dataContext.show();
      } else {
        dataContext.visible = true;
      }

      this.svgContainer.readerAlert(this.language.translate("%1 shown", this.language.locale, item.label.readerTitle));
    } else {
      item.itemContainer.isActive = true;
      dataContext.appeared = true;

      if (dataContext.hide) {
        dataContext.hide();
      } else {
        dataContext.visible = false;
      }

      this.svgContainer.readerAlert(this.language.translate("%1 hidden", this.language.locale, item.label.readerTitle));
      item.color = new _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_10__.InterfaceColorSet().getFor("disabledBackground");
    }
  };

  Object.defineProperty(Legend.prototype, "preloader", {
    /**
     * Override preloader method so that legend does not accidentally show its
     * own preloader.
     *
     * @ignore Exclude from docs
     * @return Always `undefined`
     */
    get: function get() {
      return;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * [handleDataItemPropertyChange description]
   *
   * @ignore Exclude from docs
   */

  Legend.prototype.handleDataItemPropertyChange = function (dataItem, name) {
    dataItem.valueLabel.invalidate();
    dataItem.label.invalidate();
  };

  return Legend;
}(_core_Component__WEBPACK_IMPORTED_MODULE_0__.Component);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_7__.registry.registeredClasses.Legend = Legend;
/**
 * Add default responsive rules
 */

/**
 * Move legend to below the chart if chart is narrow
 */

_core_utils_Responsive__WEBPACK_IMPORTED_MODULE_17__.defaultRules.push({
  relevant: _core_utils_Responsive__WEBPACK_IMPORTED_MODULE_17__.ResponsiveBreakpoints.widthXS,
  state: function state(target, stateId) {
    if (target instanceof Legend && (target.position == "left" || target.position == "right")) {
      var state = target.states.create(stateId);
      state.properties.position = "bottom";
      return state;
    }

    return null;
  }
});
/**
 * Move legend to the right if chart is very short
 */

_core_utils_Responsive__WEBPACK_IMPORTED_MODULE_17__.defaultRules.push({
  relevant: _core_utils_Responsive__WEBPACK_IMPORTED_MODULE_17__.ResponsiveBreakpoints.heightXS,
  state: function state(target, stateId) {
    if (target instanceof Legend && (target.position == "top" || target.position == "bottom")) {
      var state = target.states.create(stateId);
      state.properties.position = "right";
      return state;
    }

    return null;
  }
});
/**
 * Disable legend altogether on small charts
 */

_core_utils_Responsive__WEBPACK_IMPORTED_MODULE_17__.defaultRules.push({
  relevant: _core_utils_Responsive__WEBPACK_IMPORTED_MODULE_17__.ResponsiveBreakpoints.isXS,
  state: function state(target, stateId) {
    if (target instanceof Legend) {
      var state = target.states.create(stateId);
      state.properties.disabled = true;
      return state;
    }

    return null;
  }
});

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/Axis.js":
/*!************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/axes/Axis.js ***!
  \************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Axis": () => (/* binding */ Axis),
/* harmony export */   "AxisDataItem": () => (/* binding */ AxisDataItem),
/* harmony export */   "AxisItemLocation": () => (/* binding */ AxisItemLocation)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _core_Component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../core/Component */ "./node_modules/@amcharts/amcharts4/.internal/core/Component.js");
/* harmony import */ var _core_Container__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/Container */ "./node_modules/@amcharts/amcharts4/.internal/core/Container.js");
/* harmony import */ var _core_DataItem__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/DataItem */ "./node_modules/@amcharts/amcharts4/.internal/core/DataItem.js");
/* harmony import */ var _AxisBreak__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./AxisBreak */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisBreak.js");
/* harmony import */ var _core_elements_Label__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../core/elements/Label */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Label.js");
/* harmony import */ var _core_elements_Tooltip__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../core/elements/Tooltip */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Tooltip.js");
/* harmony import */ var _core_utils_SortedList__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../core/utils/SortedList */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/SortedList.js");
/* harmony import */ var _core_utils_List__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../core/utils/List */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/List.js");
/* harmony import */ var _core_utils_Disposer__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../core/utils/Disposer */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Disposer.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../core/utils/InterfaceColorSet */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/InterfaceColorSet.js");
/* harmony import */ var _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../core/utils/Iterator */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Iterator.js");
/* harmony import */ var _core_utils_Math__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../core/utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
/* harmony import */ var _core_utils_Utils__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../core/utils/Utils */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Utils.js");
/* harmony import */ var _core_utils_Number__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../core/utils/Number */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Number.js");
/* harmony import */ var _core_utils_Array__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../core/utils/Array */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Array.js");
/* harmony import */ var _core_utils_Type__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../core/utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/* harmony import */ var _core_utils_Responsive__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../core/utils/Responsive */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Responsive.js");
/**
 * Base class for all Axis
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */



















/**
 * ============================================================================
 * DATA ITEM
 * ============================================================================
 * @hidden
 */

/**
 * Defines a [[DataItem]] for [[Axis]].
 *
 * @see {@link DataItem}
 */

var AxisDataItem =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_18__.__extends)(AxisDataItem, _super);
  /**
   * Constructor
   */


  function AxisDataItem() {
    var _this = _super.call(this) || this;

    _this.className = "AxisDataItem";

    _this.applyTheme();

    return _this;
  }

  Object.defineProperty(AxisDataItem.prototype, "grid", {
    /**
     * @return Grid element
     */
    get: function get() {
      if (!this._grid) {
        var component_1 = this.component;

        if (component_1) {
          var template = void 0;
          var grid_1;

          if (this.isRange) {
            template = component_1.axisRanges.template.grid;

            if (template.disabled) {
              return;
            } else {
              grid_1 = template.clone();
            }
          } else {
            template = component_1.renderer.grid.template;

            if (template.disabled) {
              return;
            } else {
              grid_1 = component_1.renderer.grid.create();

              this._disposers.push(new _core_utils_Disposer__WEBPACK_IMPORTED_MODULE_8__.Disposer(function () {
                component_1.renderer.grid.removeValue(grid_1);
              }));
            }
          }

          this.grid = grid_1;
          grid_1.shouldClone = false;

          this._disposers.push(grid_1);

          grid_1.axis = this.component;
        }
      }

      return this._grid;
    },

    /**
     * A [[Grid]] element associated with this data item.
     *
     * If there is no grid element associated with data item, a new one is
     * created and returned.
     *
     * @param grid  Grid element
     */
    set: function set(grid) {
      if (this._grid && this._grid != grid) {
        _core_utils_Array__WEBPACK_IMPORTED_MODULE_15__.remove(this.sprites, this._grid);
        this._grid.dataItem = undefined;
      }

      if (grid) {
        if (grid.dataItem && grid.dataItem != this) {
          _core_utils_Array__WEBPACK_IMPORTED_MODULE_15__.remove(grid.dataItem.sprites, grid);
          grid.dataItem.grid = undefined;
        }

        this.addSprite(grid);
      }

      this._grid = grid;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(AxisDataItem.prototype, "tick", {
    /**
     * @return Tick element
     */
    get: function get() {
      if (!this._tick) {
        var component_2 = this.component;

        if (component_2) {
          var template = void 0;
          var tick_1;

          if (this.isRange) {
            template = component_2.axisRanges.template.tick;

            if (template.disabled) {
              return;
            } else {
              tick_1 = template.clone();
            }
          } else {
            template = component_2.renderer.ticks.template;

            if (template.disabled) {
              return;
            } else {
              tick_1 = component_2.renderer.ticks.create();

              this._disposers.push(new _core_utils_Disposer__WEBPACK_IMPORTED_MODULE_8__.Disposer(function () {
                component_2.renderer.ticks.removeValue(tick_1);
              }));
            }
          }

          this.tick = tick_1;
          tick_1.axis = this.component;
          tick_1.shouldClone = false;

          this._disposers.push(tick_1);
        }
      }

      return this._tick;
    },

    /**
     * An [[AxisTick]] element associated with this data item.
     *
     * If there is no tick element associated with data item, a new one is
     * created and returned.
     *
     * @param tick  Tick element
     */
    set: function set(tick) {
      if (this._tick && this._tick != tick) {
        _core_utils_Array__WEBPACK_IMPORTED_MODULE_15__.remove(this.sprites, this._tick);
        this._tick.dataItem = undefined;
      }

      if (tick) {
        if (tick.dataItem && tick.dataItem != this) {
          _core_utils_Array__WEBPACK_IMPORTED_MODULE_15__.remove(tick.dataItem.sprites, tick);
          tick.dataItem.tick = undefined;
        }

        this.addSprite(tick);
      }

      this._tick = tick;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(AxisDataItem.prototype, "label", {
    /**
     * @return Label element
     */
    get: function get() {
      if (!this._label) {
        var component_3 = this.component;

        if (component_3) {
          var template = void 0;
          var label_1;

          if (this.isRange) {
            template = component_3.axisRanges.template.label;

            if (template.disabled) {
              return;
            } else {
              label_1 = template.clone();
            }
          } else {
            template = component_3.renderer.labels.template;

            if (template.disabled) {
              return;
            } else {
              label_1 = component_3.renderer.labels.create();

              this._disposers.push(new _core_utils_Disposer__WEBPACK_IMPORTED_MODULE_8__.Disposer(function () {
                component_3.renderer.labels.removeValue(label_1);
              }));
            }
          }

          this._disposers.push(label_1);

          this.label = label_1;
          label_1.shouldClone = false;
          label_1.axis = this.component;
          label_1.virtualParent = component_3;
        }
      }

      return this._label;
    },

    /**
     * An [[AxisLabel]] element associated with this data item.
     *
     * If there is no label element associated with data item, a new one is
     * created and returned.
     *
     * @param label Label element
     */
    set: function set(label) {
      if (this._label && this._label != label) {
        _core_utils_Array__WEBPACK_IMPORTED_MODULE_15__.remove(this.sprites, this._label);
        this._label.dataItem = undefined;
      }

      if (label) {
        if (label.dataItem && label.dataItem != this) {
          _core_utils_Array__WEBPACK_IMPORTED_MODULE_15__.remove(label.dataItem.sprites, label);
          label.dataItem.label = undefined;
        }

        this.addSprite(label);
      }

      this._label = label;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(AxisDataItem.prototype, "axisFill", {
    /**
     * @return Label element
     */
    get: function get() {
      if (!this._axisFill) {
        var component_4 = this.component;

        if (component_4) {
          var template = void 0;
          var axisFill_1;

          if (this.isRange) {
            template = component_4.axisRanges.template.axisFill;

            if (!this.isTemplate && template.disabled) {
              return;
            } else {
              axisFill_1 = template.clone();
            }
          } else {
            template = component_4.renderer.axisFills.template;

            if (template.disabled) {
              return;
            } else {
              axisFill_1 = component_4.renderer.axisFills.create();

              this._disposers.push(new _core_utils_Disposer__WEBPACK_IMPORTED_MODULE_8__.Disposer(function () {
                component_4.renderer.axisFills.removeValue(axisFill_1);
              }));
            }
          }

          this.axisFill = axisFill_1;
          axisFill_1.shouldClone = false;

          this._disposers.push(axisFill_1);
        }
      }

      return this._axisFill;
    },

    /**
     * An [[AxisFill]] associated element with this data item.
     *
     * If there is no fill element associated with data item, a new one is
     * created and returned.
     *
     * @param label Label element
     */
    set: function set(axisFill) {
      if (this._axisFill && this._axisFill != axisFill) {
        _core_utils_Array__WEBPACK_IMPORTED_MODULE_15__.remove(this.sprites, this._axisFill);
        this._axisFill.dataItem = undefined;
      }

      if (axisFill) {
        if (axisFill.dataItem && axisFill.dataItem != this) {
          _core_utils_Array__WEBPACK_IMPORTED_MODULE_15__.remove(axisFill.dataItem.sprites, axisFill);
          axisFill.dataItem.axisFill = undefined;
        }

        axisFill.axis = this.component;
        this.addSprite(axisFill);
      }

      this._axisFill = axisFill;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(AxisDataItem.prototype, "text", {
    /**
     * @return Text label
     */
    get: function get() {
      return this._text;
    },

    /**
     * Text to be used as data item's label.
     *
     * @param text Text label
     */
    set: function set(text) {
      this._text = text;

      if (this._label) {
        // do not use getter, it will create unwanted instances!
        this._label.text = text;
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(AxisDataItem.prototype, "mask", {
    /**
     * Data item's mask.
     *
     * @return Mask
     */
    get: function get() {
      return this._mask;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(AxisDataItem.prototype, "contents", {
    /**
     * Returns a [[Container]] to place all visual elements, related to data item
     * in.
     *
     * If there is no Container, a new one is created.
     *
     * @return Contents container
     */
    get: function get() {
      if (!this._contents) {
        var contents = new _core_Container__WEBPACK_IMPORTED_MODULE_1__.Container();
        this.addSprite(contents);
        contents.isMeasured = false;
        this._contents = contents;
        var component = this.component;

        if (component) {
          var mask = component.renderer.createFill(this.component);
          mask.disabled = false;
          mask.axis = component;
          this.addSprite(mask);
          this._mask = mask;
          contents.mask = mask;
        }
      }

      return this._contents;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(AxisDataItem.prototype, "axisBreak", {
    /**
     * @return Axis break
     */
    get: function get() {
      return this._axisBreak;
    },

    /**
     * An [[AxisBreak]] this data item falls within.
     *
     * @param axisBreak Axis break
     */
    set: function set(axisBreak) {
      if (this._axisBreak) {
        this._axisBreak.dataItems.removeValue(this);
      }

      if (axisBreak) {
        axisBreak.dataItems.push(this);
      }

      this._axisBreak = axisBreak;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Re-draws the element.
   *
   * @ignore Exclude from docs
   */

  AxisDataItem.prototype.validate = function () {
    if (this.component) {
      this.component.validateDataElement(this);
    }
  };
  /**
   * Appends data item's elements to the parent [[Container]].
   *
   * @ignore Exclude from docs
   */


  AxisDataItem.prototype.appendChildren = function () {
    if (this.component) {
      this.component.appendDataItem(this);
    }
  };
  /**
   * Checks if data item has particular property set.
   *
   * @param prop  Property name
   * @return Property set?
   */


  AxisDataItem.prototype.hasProperty = function (prop) {
    return prop == "component" ? true : _super.prototype.hasProperty.call(this, prop);
  };
  /**
   * Copies all parameters from another [[AxisDataItem]].
   *
   * @param source Source AxisDataItem
   */


  AxisDataItem.prototype.copyFrom = function (source) {
    _super.prototype.copyFrom.call(this, source);

    this.text = source.text;

    if (source.bullet) {
      this.bullet = source.bullet.clone();
    }

    this.minPosition = source.minPosition;
    this.maxPosition = source.maxPosition;
  };
  /**
   * Sets visibility of the Data Item.
   *
   * @param value Data Item
   */


  AxisDataItem.prototype.setVisibility = function (value, noChangeValues) {
    _super.prototype.setVisibility.call(this, value, noChangeValues);

    if (this._contents) {
      this._contents.visible = value;
    }
  };

  Object.defineProperty(AxisDataItem.prototype, "bullet", {
    /**
     * @return Bullet
     */
    get: function get() {
      return this._bullet;
    },

    /**
     * Set it to an instance of any [[Sprite]]. It will be displayed as an axis
     * bullet in the middle of the cell, or specific value.
     *
     * If you need position bullet relatively to the cell, use [[AxisBullet]]
     * instead. It has a `location` property which can be used to indicate
     * precise relative location within cell/range.
     *
     * Also, [[AxisBullet]] is a [[Container]] so you can push any other element
     * into it.
     *
     * NOTE: `location` is relative to the parent axis range's scope, i.e.
     * between its `date` and `endDate` for [[DateAxis]], or `value`/`endValue`
     * ([[ValueAxis]]), or `category`/`endCategory` ([[categoryAxis]]).
     *
     * ```TypeScript
     * let range = dateAxis.axisRanges.create();
     * range.date = new Date(2018, 0, 5);
     *
     * let flag = new am4plugins_bullets.FlagBullet();
     * flag.label.text = "Hello";
     *
     * range.bullet = flag;
     * ```
     * ```JavaScript
     * var range = dateAxis.axisRanges.create();
     * range.date = new Date(2018, 0, 5);
     *
     * var flag = new am4plugins_bullets.FlagBullet();
     * flag.label.text = "Hello";
     *
     * range.bullet = flag;
     * ```
     * ```JSON
     * {
     *   // ...
     *   "xAxes": [{
     *     "type": "DateAxis",
     *     // ...
     *     "axisRanges": [{
     *       "date": new Date(2018, 0, 5),
     *       "bullet: {
     *         "type": "FlagBullet",
     *         "label": {
     *           "text": "Hello"
     *         }
     *       }
     *     }]
     *   }]
     * }
     * ```
     *
     * @since 4.5.9
     * @param  value  Bullet
     */
    set: function set(value) {
      if (this._bullet && this._bullet != value) {
        _core_utils_Array__WEBPACK_IMPORTED_MODULE_15__.remove(this.sprites, this._bullet);
        this._bullet.dataItem = undefined;
      }

      this._bullet = value;

      if (value) {
        this.addSprite(value);
      }
    },
    enumerable: true,
    configurable: true
  });
  return AxisDataItem;
}(_core_DataItem__WEBPACK_IMPORTED_MODULE_2__.DataItem);


/**
 * ============================================================================
 * REQUISITES
 * ============================================================================
 * @hidden
 */

/**
 * Defines named positions for data item's location within [[Axis]].
 */

var AxisItemLocation;

(function (AxisItemLocation) {
  AxisItemLocation[AxisItemLocation["Start"] = 0] = "Start";
  AxisItemLocation[AxisItemLocation["Middle"] = 0.5] = "Middle";
  AxisItemLocation[AxisItemLocation["End"] = 1] = "End";
})(AxisItemLocation || (AxisItemLocation = {}));
/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * A base class for all Axis elements.
 *
 * @see {@link IAxisEvents} for a list of available Events
 * @see {@link IAxisAdapters} for a list of available Adapters
 */


var Axis =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_18__.__extends)(Axis, _super);
  /**
   * Constructor
   */


  function Axis() {
    var _this = // Init
    _super.call(this) || this;
    /**
     * Number of Grid elements on the axis.
     */


    _this._gridCount = 10;
    /**
     * A list of [[XYSeries]] that are using this Axis.
     */

    _this._series = new _core_utils_List__WEBPACK_IMPORTED_MODULE_7__.List();
    /**
     * Specifies if axis should be automatically disposed when removing from
     * chart's axis list.
     *
     * @default true
     */

    _this.autoDispose = true;
    /**
     * @ignore
     */

    _this._axisItemCount = 0;

    if (_this.constructor === Axis) {
      throw new Error("'Axis' cannot be instantiated directly. Please use a specific axis type.");
    }

    _this.hideTooltipWhileZooming = true;
    _this.minWidth = 0.0001;
    _this.minHeight = 0.0001;
    _this.className = "Axis";
    _this.shouldClone = false;

    _this.setPropertyValue("cursorTooltipEnabled", true);

    _this.toggleZoomOutButton = true;
    _this.zoomable = true;
    var interfaceColors = new _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_10__.InterfaceColorSet(); // Create title

    _this.title = new _core_elements_Label__WEBPACK_IMPORTED_MODULE_4__.Label();
    _this.title.shouldClone = false;

    _this._disposers.push(_this.title);

    _this.setPropertyValue("startLocation", 0);

    _this.setPropertyValue("endLocation", 1); // Data item iterator


    _this._dataItemsIterator = new _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_11__.ListIterator(_this.dataItems, function () {
      return _this.dataItems.create();
    });
    _this._dataItemsIterator.createNewItems = true; // Create tooltip

    var tooltip = new _core_elements_Tooltip__WEBPACK_IMPORTED_MODULE_5__.Tooltip();

    _this._disposers.push(tooltip);

    tooltip.label.padding(5, 10, 5, 10);
    tooltip.background.pointerLength = 5;
    tooltip.fitPointerToBounds = true;
    tooltip.background.filters.clear(); // Set virtual parentfor the tooltip so that it can properly inheirt
    // formatters from the axis.

    tooltip.virtualParent = _this; // Create background element for the tooltip

    var background = tooltip.background;
    background.cornerRadius = 0;
    background.fill = interfaceColors.getFor("alternativeBackground");
    background.stroke = background.fill;
    background.strokeWidth = 1;
    background.fillOpacity = 1;
    tooltip.label.fill = interfaceColors.getFor("alternativeText");
    _this.tooltip = tooltip; // Accessibility

    _this.readerHidden = true;

    _this.events.on("rangechangestarted", function () {
      _this.series.each(function (series) {
        if (series.hideTooltipWhileZooming) {
          series.tooltip.hide();
          series.tooltip.preventShow = true;
        }
      });

      if (_this.hideTooltipWhileZooming) {
        _this.tooltip.hide();

        _this.tooltip.preventShow = true;
      }
    }, undefined, false);

    _this.events.on("rangechangeended", function () {
      _this.series.each(function (series) {
        if (series.hideTooltipWhileZooming) {
          series.tooltip.hide();
          series.tooltip.preventShow = false;
        }
      });

      if (_this.hideTooltipWhileZooming) {
        _this.tooltip.hide();

        _this.tooltip.preventShow = false;
      }
    }, undefined, false);

    _this.applyTheme();

    return _this;
  }
  /**
   * Holds reference to a function that accepts a DataItem and its index as
   * parameters.
   *
   * It can either return a fill opacity for a fill, or manipulate data item
   * directly, to create various highlighting scenarios.
   *
   * For example, you can set it up to highlight only weekends on a
   * [[DateAxis]].
   */


  Axis.prototype.fillRule = function (dataItem, index) {
    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_16__.isNumber(index)) {
      index = dataItem.index;
    }

    if (index / 2 == Math.round(index / 2)) {
      dataItem.axisFill.__disabled = true;
      dataItem.axisFill.opacity = 0;
    } else {
      dataItem.axisFill.opacity = 1;
      dataItem.axisFill.__disabled = false;
    }
  };
  /**
   * Returns a new/empty DataItem of the type appropriate for this object.
   *
   * @see {@link DataItem}
   * @return Data Item
   */


  Axis.prototype.createDataItem = function () {
    return new AxisDataItem();
  };
  /**
   * Invalidates layout.
   *
   * @ignore Exclude from docs
   */


  Axis.prototype.invalidateLayout = function () {
    _super.prototype.invalidateLayout.call(this); // this puts series after axis in invalidation order also makes series update it's data items in case widht/height of a series is not 100%


    _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_11__.each(this.series.iterator(), function (series) {
      series.invalidateLayout();
    });
  };
  /**
   * Invalidates series of this axis.
   */


  Axis.prototype.invalidateSeries = function () {
    // this puts series after axis in invalidation order also makes series update it's data items in case widht/height of a series is not 100%
    _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_11__.each(this.series.iterator(), function (series) {
      series.invalidate();
    });
  };
  /**
   * Override to cancel super call for data element validation.
   * @ignore
   */


  Axis.prototype.validateDataElements = function () {
    this._axisItemCount = 0;

    if (this.ghostLabel) {
      this.renderer.updateLabelElement(this.ghostLabel, this.start, this.end);
      this.ghostLabel.validate();
    }
  };
  /**
   * Recalculates the number of grid items on the axis.
   */


  Axis.prototype.updateGridCount = function () {
    if (this.renderer) {
      var gridCount = this.axisLength / this.renderer.minGridDistance;

      if (gridCount != this._gridCount) {
        this._gridCount = gridCount;
        this.clearCache();
      }
    }
  };
  /**
   * Redraws the element.
   *
   * @ignore Exclude from docs
   */


  Axis.prototype.validateLayout = function () {
    this.axisFullLength = this.axisLength / (this.end - this.start);

    _super.prototype.validateLayout.call(this);

    this.updateGridCount();
    var renderer = this.renderer;

    if (renderer) {
      renderer.updateAxisLine();
      renderer.updateTooltip();
      renderer.updateBaseGridElement();
    }

    if (this._prevLength != this.axisLength) {
      this.dispatchImmediately("lengthchanged");
      this._prevLength = this.axisLength;
    }
  };
  /**
   * Initializes Axis' renderer.
   *
   * @ignore Exclude from docs
   */


  Axis.prototype.initRenderer = function () {};
  /**
   * Adds a data item to the Axis.
   *
   * @param dataItem Data item
   */


  Axis.prototype.appendDataItem = function (dataItem) {
    var renderer = this.renderer;
    var tick = dataItem.tick;

    if (tick) {
      if (tick.above) {
        tick.parent = renderer.bulletsContainer;
      } else {
        tick.parent = renderer.gridContainer;
      }
    }

    if (dataItem.label) {
      dataItem.label.parent = renderer;
    }

    var axisFill = dataItem.axisFill;

    if (axisFill) {
      if (axisFill.above) {
        axisFill.parent = renderer.bulletsContainer;
      } else {
        axisFill.parent = renderer.gridContainer;
      }
    }

    var grid = dataItem.grid;

    if (grid) {
      if (grid.above) {
        grid.parent = renderer.bulletsContainer;
      } else {
        grid.parent = renderer.gridContainer;
      }
    }

    if (dataItem.bullet) {
      dataItem.bullet.parent = renderer.bulletsContainer;
    }
  };
  /**
   * Redraws Axis' related items.
   *
   * @ignore Exclude from docs
   */


  Axis.prototype.validate = function () {
    _super.prototype.validate.call(this);

    this.validateLayout();
    this.renderer.updateGridContainer();
  };
  /**
   * Redars Axis ranges.
   *
   * @ignore Exclude from docs
   */


  Axis.prototype.validateAxisRanges = function () {
    var _this = this;

    _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_11__.each(this.axisRanges.iterator(), function (axisRange) {
      _this.appendDataItem(axisRange);

      _this.validateDataElement(axisRange);

      if (axisRange.grid) {
        axisRange.grid.validate();
      }

      if (axisRange.tick) {
        axisRange.tick.validate();
      }

      if (axisRange.axisFill) {
        axisRange.axisFill.validate();
      }

      if (axisRange.label) {
        axisRange.label.validate();
      }
    });
  };
  /**
   * Invalidates all axis breaks, so they are redrawn.
   *
   * @ignore Exclude from docs
   */


  Axis.prototype.validateBreaks = function () {
    if (this._axisBreaks) {
      _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_11__.each(this._axisBreaks.iterator(), function (axisBreak) {
        axisBreak.invalidate();
      });
    }
  };
  /**
   * Associates an Axis break with this Axis, after it is inserted into
   * `axisBreaks`.
   *
   * @ignore Exclude from docs
   * @param event Event
   */


  Axis.prototype.processBreak = function (event) {
    var axisBreak = event.newValue;
    axisBreak.parent = this.renderer.breakContainer;
    axisBreak.axis = this;
  };
  /**
   * Registers a [[XYSeries]] element with this Axis.
   *
   * Returns a [[Disposer]] for all events, added to Series for watching
   * changes in Axis, and vice versa.
   * @ignore
   * @param series  Series
   * @return Event disposer
   */


  Axis.prototype.registerSeries = function (series) {
    var _this = this;

    this.series.moveValue(series);
    return new _core_utils_Disposer__WEBPACK_IMPORTED_MODULE_8__.MultiDisposer([new _core_utils_Disposer__WEBPACK_IMPORTED_MODULE_8__.Disposer(function () {
      _this.series.removeValue(series);
    }), this.events.on("lengthchanged", series.invalidate, series, false), this.events.on("lengthchanged", series.createMask, series, false), this.events.on("startchanged", series.invalidate, series, false), this.events.on("endchanged", series.invalidate, series, false)]);
  };

  Object.defineProperty(Axis.prototype, "renderer", {
    /**
     * @return Renderer
     */
    get: function get() {
      return this._renderer;
    },

    /**
     * An [[AxisRenderer]] to be used to render this Axis.
     *
     * Please note that most of the settings, related to Axis' appearance are set
     * via its renderer. Not directly on the Axis.
     *
     * E.g.:
     *
     * ```TypeScript
     * axis.renderer.inside = true;
     * axis.renderer.minLabelPosition = 0.1;
     * axis.renderer.maxLabelPosition = 0.9;
     * ```
     * ```JavaScript
     * axis.renderer.inside = true;
     * axis.renderer.minLabelPosition = 0.1;
     * axis.renderer.maxLabelPosition = 0.9;
     * ```
     *
     * @see {@link https://www.amcharts.com/docs/v4/concepts/axes/} for more info
     * @param renderer  Renderer
     */
    set: function set(renderer) {
      if (renderer != this._renderer) {
        this._renderer = renderer;
        renderer.chart = this.chart;
        renderer.axis = this;
        renderer.parent = this;
        this.title.parent = this; // we add title to axis and set layout in renderer to avoid one extra container, as otherwise axis container would be used for holding renderer only

        this.initRenderer();

        this._disposers.push(renderer.gridContainer.events.on("maxsizechanged", this.invalidate, this, false));

        var ghostLabel_1 = this.renderer.labels.create();

        this._disposers.push(ghostLabel_1);

        ghostLabel_1.dataItem = this.dataItems.template.clone(); // just for the adapters not to fail

        ghostLabel_1.text = "L";
        ghostLabel_1.parent = this.renderer;
        ghostLabel_1.shouldClone = false;
        ghostLabel_1.fillOpacity = 0;
        ghostLabel_1.opacity = 0;
        ghostLabel_1.strokeOpacity = 0;
        ghostLabel_1.interactionsEnabled = false;
        ghostLabel_1.validate();
        this.ghostLabel = ghostLabel_1;
        this.events.on("beforedatavalidated", function () {
          ghostLabel_1.text = "L";
        }, undefined, false);
      }
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Converts a relative position to angle. (for circular axes)
   *
   * @param position Position (0-1)
   * @return Angle
   */

  Axis.prototype.positionToAngle = function (position) {
    return this.renderer.positionToAngle(position);
  };
  /**
   * Converts pixel coordinates to a relative position. (0-1)
   *
   * @param point  Coorinates (px)
   * @return Position (0-1)
   */


  Axis.prototype.pointToPosition = function (point) {
    return this.renderer.pointToPosition(point);
  };
  /**
   * Converts relative position to coordinate.
   *
   * @since 4.7.15
   * @param position (0-1)
   * @return coordinate (px)
   */


  Axis.prototype.positionToCoordinate = function (position) {
    return this.renderer.positionToCoordinate(position);
  };
  /**
   * [getAnyRangePath description]
   *
   * @ignore Exclude from docs
   * @todo Description
   * @param start  [description]
   * @param end    [description]
   * @return [description]
   */


  Axis.prototype.getAnyRangePath = function (start, end) {
    return this.renderer.getPositionRangePath(start, end);
  };
  /**
   * Converts any positional parameter to a relative position on axis.
   *
   * @todo Description (review)
   * @param value  Pisition
   * @return Position (0-1)
   */


  Axis.prototype.anyToPosition = function (value) {
    return 0;
  };
  /**
   * Converts any positional parameter to a relative position on axis.
   *
   * @todo Description (review)
   * @param value  Pisition
   * @return Orientation point
   */


  Axis.prototype.anyToPoint = function (value) {
    return {
      x: 0,
      y: 0,
      angle: 0
    };
  };
  /**
   * [getPositionRangePath description]
   *
   * @ignore Exclude from docs
   * @todo Description
   * @param startPosition [description]
   * @param endPosition   [description]
   * @return [description]
   */


  Axis.prototype.getPositionRangePath = function (startPosition, endPosition) {
    if (this.renderer) {
      return this.renderer.getPositionRangePath(startPosition, endPosition);
    }

    return "";
  };

  Object.defineProperty(Axis.prototype, "axisLength", {
    /**
     * Actual axis length in pixels.
     *
     * @return Axis length (px)
     */
    get: function get() {
      if (this.renderer) {
        return this.renderer.axisLength;
      }

      return 0;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Axis.prototype, "cursorTooltipEnabled", {
    /**
     * @return Display tooltip?
     */
    get: function get() {
      return this.getPropertyValue("cursorTooltipEnabled");
    },

    /**
     * Indicates if axis should display a tooltip for chart's cursor.
     *
     * @param value Display tooltip?
     */
    set: function set(value) {
      if (this.setPropertyValue("cursorTooltipEnabled", value)) {
        if (value && this.renderer) {
          this.renderer.updateTooltip();
        } else if (this.tooltip) {
          this.tooltip.hide(0);
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Axis.prototype, "toggleZoomOutButton", {
    /**
     * @return Toggle zoom out button?
     */
    get: function get() {
      return this.getPropertyValue("toggleZoomOutButton");
    },

    /**
     * Normally, when axis is zoomed in, a zoom out button is shown by a chart,
     * and vice versa: when axis is zoomed out completely, zoom out button is
     * hidden.
     *
     * Setting this to `false` will disable this behavior. Zooming in our out
     * this axis will not reveal or hide zoom out button.
     *
     * @default true
     * @since 4.6.2
     * @param  value  Toggle zoom out button?
     */
    set: function set(value) {
      this.setPropertyValue("toggleZoomOutButton", value);
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Hides element's [[Tooltip]].
   *
   * @see {@link Tooltip}
   */

  Axis.prototype.hideTooltip = function (duration) {
    _super.prototype.hideTooltip.call(this, duration);

    this._tooltipPosition = undefined;
  };
  /**
   * Shows Axis tooltip at specific relative position within Axis. (0-1)
   *
   * @param position Position (0-1)
   * @param local or global position
   */


  Axis.prototype.showTooltipAtPosition = function (position, local) {
    var tooltip = this._tooltip;

    if (!tooltip || this.dataItems.length <= 0) {
      this._tooltipPosition = undefined;
    } else {
      if (!local) {
        position = this.toAxisPosition(position);
      }

      if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_16__.isNumber(position) || position < this.start || position > this.end) {
        tooltip.hide(0);
        this._tooltipPosition = undefined;
        return;
      }

      var renderer = this.renderer; //@todo: think of how to solve this better

      if (!tooltip.parent) {
        tooltip.parent = this.tooltipContainer;
      }

      var tooltipLocation = renderer.tooltipLocation;
      var startPosition = this.getCellStartPosition(position);
      var endPosition = this.getCellEndPosition(position);

      if (this.tooltipPosition == "fixed") {
        position = startPosition + (endPosition - startPosition) * tooltipLocation;
      }

      position = _core_utils_Math__WEBPACK_IMPORTED_MODULE_12__.fitToRange(position, this.start, this.end);

      if (this._tooltipPosition != position) {
        this._tooltipPosition = position;
        var tooltipLocation2 = renderer.tooltipLocation2;
        var startPoint = renderer.positionToPoint(startPosition, tooltipLocation2);
        var endPoint = renderer.positionToPoint(endPosition, tooltipLocation2); // save values so cursor could use them

        this.currentItemStartPoint = startPoint;
        this.currentItemEndPoint = endPoint;

        if (renderer.fullWidthTooltip) {
          tooltip.width = endPoint.x - startPoint.x;
          tooltip.height = endPoint.y - startPoint.y;
        }

        var point = renderer.positionToPoint(position, tooltipLocation2);
        var globalPoint = _core_utils_Utils__WEBPACK_IMPORTED_MODULE_13__.spritePointToSvg(point, this.renderer.line);
        tooltip.text = this.getTooltipText(position);

        if (tooltip.text) {
          tooltip.delayedPointTo(globalPoint);
          tooltip.show();
        }
      }

      if (!this.cursorTooltipEnabled || this.tooltip.disabled) {
        tooltip.hide(0);
      }
    }
  };
  /**
   * Converts relative position (0-1) to Axis position with zoom level and
   * inversed taken into account.
   *
   * @param position Global position (0-1)
   * @return Position within Axis (0-1)
   */


  Axis.prototype.toAxisPosition = function (position) {
    position = this.renderer.toAxisPosition(position);

    if (position == undefined) {
      return;
    }

    position = position * (this.end - this.start);

    if (this.renderer.inversed) {
      position = this.end - position;
    } else {
      position = this.start + position;
    }

    return position;
  };
  /**
   * Converts position on the axis with zoom level and
   * inversed taken into account to global position.
   *
   * @param position Axis position (0-1)
   * @return Global position (0-1)
   */


  Axis.prototype.toGlobalPosition = function (position) {
    if (this.renderer.inversed) {
      position = this.end - position;
    } else {
      position = position - this.start;
    }

    return position / (this.end - this.start);
  };
  /**
   * Returns text to be used for cursor's Axis tooltip.
   *
   * This is a placeholder to override for extending classes.
   *
   * @ignore Exclude from docs
   * @param position  Position coordinate (px)
   * @return Label text
   */


  Axis.prototype.getTooltipText = function (position) {
    return;
  };
  /**
   * Updates Axis' tooltip's position and possibly size, and pointer (stem)
   * place.
   *
   * @ignore Exclude from docs
   * @param pointerOrientation  Pointer (stem) orientation
   * @param boundingRectangle   A rectangle for tooltip to fit within
   */


  Axis.prototype.updateTooltip = function (pointerOrientation, boundingRectangle) {
    var tooltip = this._tooltip;

    if (tooltip) {
      tooltip.fixDoc = false;
      tooltip.pointerOrientation = pointerOrientation;
      tooltip.setBounds(_core_utils_Utils__WEBPACK_IMPORTED_MODULE_13__.spriteRectToSvg(boundingRectangle, this.renderer.line));
    }
  };
  /**
   * [roundPosition description]
   *
   * @ignore Exclude from docs
   * @todo Description
   * @param position  Relative position
   * @param location  Location on axis
   * @return Rounded position
   */


  Axis.prototype.roundPosition = function (position, location, axisLocation) {
    return position;
  };
  /**
   * [getCellStartPosition description]
   *
   * @ignore Exclude from docs
   * @todo Description
   * @param position [description]
   * @return [description]
   */


  Axis.prototype.getCellStartPosition = function (position) {
    return position;
  };
  /**
   * [getCellEndPosition description]
   *
   * @ignore Exclude from docs
   * @todo Description
   * @param position [description]
   * @return [description]
   */


  Axis.prototype.getCellEndPosition = function (position) {
    return position;
  };

  Object.defineProperty(Axis.prototype, "axisRanges", {
    /**
     * A list of axis ranges for this Axis.
     *
     * @return Axis ranges
     */
    get: function get() {
      if (!this._axisRanges) {
        var dataItem = this.createDataItem();
        dataItem.isRange = true;
        dataItem.axisFill = this.renderer.axisFills.template.clone();
        dataItem.grid = this.renderer.grid.template.clone();
        dataItem.tick = this.renderer.ticks.template.clone();
        dataItem.label = this.renderer.labels.template.clone();
        dataItem.isTemplate = true;
        dataItem.component = this;
        dataItem.axisFill.disabled = false;
        dataItem.tick.disabled = false;
        dataItem.grid.disabled = false;
        dataItem.label.disabled = false;
        this._axisRanges = new _core_utils_List__WEBPACK_IMPORTED_MODULE_7__.ListTemplate(dataItem);

        this._axisRanges.events.on("inserted", this.processAxisRange, this, false);

        this._disposers.push(new _core_utils_List__WEBPACK_IMPORTED_MODULE_7__.ListDisposer(this._axisRanges));

        this._disposers.push(this._axisRanges.template);
      }

      return this._axisRanges;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Decorates an axis range after it has been added to the axis range list.
   *
   * @param event Event
   */

  Axis.prototype.processAxisRange = function (event) {
    var axisRange = event.newValue;
    axisRange.component = this;
    axisRange.isRange = true;
  };

  Object.defineProperty(Axis.prototype, "axisBreaks", {
    /**
     * A list of axis breaks on this Axis.
     *
     * @return Axis breaks.
     */
    get: function get() {
      if (!this._axisBreaks) {
        this._axisBreaks = new _core_utils_SortedList__WEBPACK_IMPORTED_MODULE_6__.SortedListTemplate(this.createAxisBreak(), function (a, b) {
          return _core_utils_Number__WEBPACK_IMPORTED_MODULE_14__.order(a.adjustedStartValue, b.adjustedStartValue);
        });

        this._axisBreaks.events.on("inserted", this.processBreak, this, false);

        this._disposers.push(new _core_utils_List__WEBPACK_IMPORTED_MODULE_7__.ListDisposer(this._axisBreaks));

        this._disposers.push(this._axisBreaks.template);
      }

      return this._axisBreaks;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Creates a new axis break.
   *
   * @return Axis break
   */

  Axis.prototype.createAxisBreak = function () {
    return new _AxisBreak__WEBPACK_IMPORTED_MODULE_3__.AxisBreak();
  };

  Object.defineProperty(Axis.prototype, "series", {
    /**
     * A list of Series currently associated with this Axis.
     *
     * @return Series
     */
    get: function get() {
      if (!this._series) {
        this._series = new _core_utils_List__WEBPACK_IMPORTED_MODULE_7__.List();
      }

      return this._series;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Processes Series' data items.
   *
   * This is a placeholder to override for extending classes.
   *
   * @ignore Exclude from docs
   */

  Axis.prototype.processSeriesDataItems = function () {};
  /**
   * Processes Series' single data item.
   *
   * This is a placeholder to override for extending classes.
   *
   * @ignore Exclude from docs
   * @param dataItem Data item
   */


  Axis.prototype.processSeriesDataItem = function (dataItem, axisLetter) {};
  /**
   * Post-processes Serie's data items.
   *
   * This is a placeholder to override for extending classes.
   *
   * @ignore Exclude from docs
   */


  Axis.prototype.postProcessSeriesDataItems = function (series) {};
  /**
   * Post-processes Serie's single data item.
   *
   * This is a placeholder to override for extending classes.
   *
   * @ignore Exclude from docs
   * @param dataItem Data item
   */


  Axis.prototype.postProcessSeriesDataItem = function (dataItem) {}; //

  /**
   * Updates Axis based on all Series that might influence it.
   *
   * Called by Series after Series data is validated.
   *
   * This is a placeholder to override for extending classes.
   *
   * @ignore Exclude from docs
   */


  Axis.prototype.updateAxisBySeries = function () {};
  /**
   * Hides unused data items.
   *
   * @ignore Exclude from docs
   */


  Axis.prototype.hideUnusedDataItems = function () {
    var _this = this; // hide all unused


    var dataItemsIterator = this._dataItemsIterator;
    dataItemsIterator.createNewItems = false;
    _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_11__.each(dataItemsIterator.iterator(), function (dataItem) {
      _this.validateDataElement(dataItem); // solves shrinking


      dataItem.__disabled = true;
    });
    dataItemsIterator.clear();
    dataItemsIterator.createNewItems = true;
  };
  /**
   * Returns a Series' data item that corresponds to specific position on Axis.
   *
   * This is a placeholder to override for extending classes.
   *
   * @ignore Exclude from docs
   * @param series    Series
   * @param position  Position (0-1)
   * @param findNearest  Should axis try to find nearest tooltip if there is no data item at exact position
   * @return Data item
   */


  Axis.prototype.getSeriesDataItem = function (series, position, findNearest) {
    return;
  };
  /**
   * Returns an angle that corresponds to specific position on axis.
   *
   * This is a placeholder to override for extending classes.
   *
   * @ignore Exclude from docs
   * @todo Description (review)
   * @param dataItem  Data item
   * @param key       ???
   * @param location  Location
   * @param stackKey  ???
   * @return Angle
   */


  Axis.prototype.getAngle = function (dataItem, key, location, stackKey, range) {
    return;
  };
  /**
   * [getX description]
   *
   * This is a placeholder to override for extending classes.
   *
   * @ignore Exclude from docs
   * @todo Description (review)
   * @param dataItem [description]
   * @param key      [description]
   * @param location [description]
   * @param stackKey [description]
   * @return [description]
   */


  Axis.prototype.getX = function (dataItem, key, location, stackKey, range) {
    return;
  };
  /**
   * [getX description]
   *
   * This is a placeholder to override for extending classes.
   *
   * @ignore Exclude from docs
   * @todo Description (review)
   * @param dataItem [description]
   * @param key      [description]
   * @param location [description]
   * @param stackKey [description]
   * @return [description]
   */


  Axis.prototype.getPositionX = function (dataItem, key, location, stackKey, range) {
    return;
  };
  /**
   * [getY description]
   *
   * This is a placeholder to override for extending classes.
   *
   * @ignore Exclude from docs
   * @todo Description (review)
   * @param dataItem [description]
   * @param key      [description]
   * @param location [description]
   * @param stackKey [description]
   * @return [description]
   */


  Axis.prototype.getY = function (dataItem, key, location, stackKey, range) {
    return;
  };
  /**
   * [getY description]
   *
   * This is a placeholder to override for extending classes.
   *
   * @ignore Exclude from docs
   * @todo Description (review)
   * @param dataItem [description]
   * @param key      [description]
   * @param location [description]
   * @param stackKey [description]
   * @return [description]
   */


  Axis.prototype.getPositionY = function (dataItem, key, location, stackKey, range) {
    return;
  };

  Object.defineProperty(Axis.prototype, "basePoint", {
    /**
     * Coordinates of the actual axis start.
     *
     * @ignore Exclude from docs
     * @return Base point coordinates
     */
    get: function get() {
      return {
        x: 0,
        y: 0
      };
    },
    enumerable: true,
    configurable: true
  });
  /**
   * [dataChangeUpdate description]
   *
   * This is a placeholder to override for extending classes.
   *
   * @ignore Exclude from docs
   * @todo Description
   */

  Axis.prototype.dataChangeUpdate = function () {};
  /**
   * [dataChangeUpdate description]
   *
   *
   * @ignore Exclude from docs
   * @todo Description
   */


  Axis.prototype.seriesDataChangeUpdate = function (series) {};
  /**
   * Removes axis breaks that fall between `min` and `max` (???)
   *
   * @ignore Exclude from docs
   * @todo Description (review)
   * @param min  Start value
   * @param max  End value
   * @return Spread o
   */


  Axis.prototype.adjustDifference = function (min, max) {
    var difference = max - min;

    if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_16__.isNumber(difference)) {
      if (this._axisBreaks) {
        _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_11__.eachContinue(this._axisBreaks.iterator(), function (axisBreak) {
          var startValue = axisBreak.adjustedStartValue;
          var endValue = axisBreak.adjustedEndValue;

          if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_16__.isNumber(startValue) && _core_utils_Type__WEBPACK_IMPORTED_MODULE_16__.isNumber(endValue)) {
            // breaks are sorted, we don't need go further anymore
            if (startValue > max) {
              return false;
            }

            if (endValue >= min) {
              if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_16__.isNumber(startValue) && _core_utils_Type__WEBPACK_IMPORTED_MODULE_16__.isNumber(endValue)) {
                var breakSize = axisBreak.breakSize;
                var intersection = _core_utils_Math__WEBPACK_IMPORTED_MODULE_12__.intersection({
                  start: startValue,
                  end: endValue
                }, {
                  start: min,
                  end: max
                });

                if (intersection) {
                  difference -= (intersection.end - intersection.start) * (1 - breakSize);
                }
              }
            }

            return true;
          }
        });
      }

      return difference;
    }
  };
  /**
   * Checks if specific value falls within a break.
   *
   * Returns [[AxisBreak]] the value falls into.
   *
   * @param value  Value to check
   * @return Axis break
   */


  Axis.prototype.isInBreak = function (value) {
    if (this._axisBreaks) {
      return _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_11__.find(this._axisBreaks.iterator(), function (axisBreak) {
        return value >= axisBreak.adjustedStartValue && value <= axisBreak.adjustedEndValue;
      });
    }
  };
  /**
   * [fixAxisBreaks description]
   *
   * @ignore Exclude from docs
   * @todo Description
   */


  Axis.prototype.fixAxisBreaks = function () {
    var _this = this;

    if (this._axisBreaks) {
      var axisBreaks = this._axisBreaks;

      if (axisBreaks.length > 0) {
        // first make sure that startValue is <= end value
        // This needs to make a copy of axisBreaks because it mutates the list while traversing
        // TODO very inefficient
        _core_utils_Array__WEBPACK_IMPORTED_MODULE_15__.each(_core_utils_Iterator__WEBPACK_IMPORTED_MODULE_11__.toArray(axisBreaks.iterator()), function (axisBreak) {
          var startValue = _core_utils_Math__WEBPACK_IMPORTED_MODULE_12__.min(axisBreak.startValue, axisBreak.endValue);
          var endValue = _core_utils_Math__WEBPACK_IMPORTED_MODULE_12__.max(axisBreak.startValue, axisBreak.endValue);
          axisBreak.adjustedStartValue = startValue;
          axisBreak.adjustedEndValue = endValue;

          _this._axisBreaks.update(axisBreak);
        });
        var firstAxisBreak = axisBreaks.first;
        var previousEndValue_1 = Math.min(firstAxisBreak.startValue, firstAxisBreak.endValue); // process breaks
        // TODO does this need to call axisBreaks.update ?

        _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_11__.each(axisBreaks.iterator(), function (axisBreak) {
          var startValue = axisBreak.adjustedStartValue;
          var endValue = axisBreak.adjustedEndValue; // breaks can't overlap
          // if break starts before previous break ends

          if (startValue < previousEndValue_1) {
            startValue = previousEndValue_1;

            if (endValue < previousEndValue_1) {
              endValue = previousEndValue_1;
            }
          }

          axisBreak.adjustedStartValue = startValue;
          axisBreak.adjustedEndValue = endValue;
        });
      }
    }
  };

  Object.defineProperty(Axis.prototype, "startIndex", {
    /**
     * @ignore Exclude from docs
     * @return [description]
     */
    get: function get() {
      return 0;
    },

    /**
     * We need start/end indexes of axes to be 0 - `dataItems.length`.
     *
     * Yes, also for category axis, this helps to avoid jumping of categories
     * while scrolling and does not do a lot of extra work as we use
     * protected `_startIndex` and `_endIndex` when working with items.
     *
     * @hidden
     */

    /**
     * [startIndex description]
     *
     * @ignore Exclude from docs
     * @todo Description
     * @param value [description]
     */
    set: function set(value) {},
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Axis.prototype, "endIndex", {
    /**
     * @ignore Exclude from docs
     * @return [description]
     */
    get: function get() {
      return this.dataItems.length;
    },

    /**
     * [endIndex description]
     *
     * @ignore Exclude from docs
     * @todo Description
     * @param value [description]
     */
    set: function set(value) {},
    enumerable: true,
    configurable: true
  });
  /**
   * Returns a formatted label based on position.
   *
   * Individual axis types should override this method to generate a label
   * that is relevant to axis type.
   *
   * Please note that `position` represents position within axis which may be
   * zoomed and not correspond to Cursor's `position`.
   *
   * To convert Cursor's `position` to Axis' `position` use `toAxisPosition()` method.
   *
   * @see {@link https://www.amcharts.com/docs/v4/tutorials/tracking-cursors-position-via-api/#Tracking_Cursor_s_position} For more information about cursor tracking.
   * @param position  Relative position on axis (0-1)
   * @return Position label
   */

  Axis.prototype.getPositionLabel = function (position) {
    return Math.round(position * 100) + "%x";
  };

  Object.defineProperty(Axis.prototype, "chart", {
    /**
     * @return Chart
     */
    get: function get() {
      return this._chart;
    },

    /**
     * A Chart this Axis belongs to.
     *
     * @param value  Chart
     */
    set: function set(value) {
      this._chart = value;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Creates a data item for a Series range.
   *
   * @param series  Target Series
   * @return Range data item
   */

  Axis.prototype.createSeriesRange = function (series) {
    var range = this.axisRanges.create();
    range.component = this;
    range.axisFill = this.renderer.axisFills.template.clone();
    range.axisFill.disabled = false;
    range.axisFill.fillOpacity = 0;
    range.grid = this.renderer.grid.template.clone();
    range.grid.disabled = true;
    range.tick = this.renderer.ticks.template.clone();
    range.tick.disabled = true;
    range.label = this.renderer.labels.template.clone();
    range.label.disabled = true;
    range.addDisposer(new _core_utils_Disposer__WEBPACK_IMPORTED_MODULE_8__.Disposer(function () {
      series.axisRanges.removeValue(range);
    }));
    series.axisRanges.push(range);
    return range;
  };
  /**
   * Copies all properties and related data from a different instance of Axis.
   *
   * @param source Source Axis
   */


  Axis.prototype.copyFrom = function (source) {
    _super.prototype.copyFrom.call(this, source);

    if (this.renderer) {
      this.renderer.copyFrom(source.renderer);
    } else {
      if (source.renderer) {
        this.renderer = source.renderer.clone();

        this._disposers.push(this.renderer);
      }
    }

    if (source.title) {
      if (!this.title) {
        this.title = source.title.clone();
        this.title.parent = this;
      } else {
        this.title.copyFrom(source.title);
      }

      this._disposers.push(this.title);
    }
  };
  /**
   * Resets internal iterator.
   */


  Axis.prototype.resetIterators = function () {
    this._dataItemsIterator.reset();
  };
  /**
   * Processes JSON-based config before it is applied to the object.
   *
   * @ignore Exclude from docs
   * @param config  Config
   */


  Axis.prototype.processConfig = function (config) {
    if (config) {
      // Set up axis ranges
      if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_16__.hasValue(config.axisRanges) && _core_utils_Type__WEBPACK_IMPORTED_MODULE_16__.isArray(config.axisRanges)) {
        for (var i = 0, len = config.axisRanges.length; i < len; i++) {
          var range = config.axisRanges[i]; // If `series` is set, we know it's a series range

          if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_16__.hasValue(range["series"])) {
            if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_16__.isString(range["series"])) {
              if (this.map.hasKey(range["series"])) {
                //range["series"] = this.map.getKey(range["series"]);
                config.axisRanges[i] = this.createSeriesRange(this.map.getKey(range["series"]));
                delete range["series"];
                config.axisRanges[i].config = range;
              }
            }
          }
        }
      }
    }

    _super.prototype.processConfig.call(this, config);
  };
  /**
   * Ordering function used in JSON setup.
   *
   * @param a  Item A
   * @param b  Item B
   * @return Order
   */


  Axis.prototype.configOrder = function (a, b) {
    if (a == b) {
      return 0;
    } // last
    else if (a == "title") {
      return 1;
    } else if (b == "title") {
      return -1;
    } // first
    else if (a == "component") {
      return -1;
    } else if (b == "component") {
      return 1;
    } else {
      return _super.prototype.configOrder.call(this, a, b);
    }
  };

  Object.defineProperty(Axis.prototype, "startLocation", {
    /**
     * @return Location (0-1)
     */
    get: function get() {
      return this.getPropertyValue("startLocation");
    },

    /**
     * Axis start location. Works on Date/Category axis, doesn't work on Value axis.
     *
     * * 0 - Full first cell is shown.
     * * 0.5 - Half of first cell is shown.
     * * 1 - None of the first cell is visible. (you probably don't want that)
     *
     * @param value Location (0-1)
     */
    set: function set(value) {
      this.setPropertyValue("startLocation", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Axis.prototype, "endLocation", {
    /**
     * @return Location (0-1)
     */
    get: function get() {
      return this.getPropertyValue("endLocation");
    },

    /**
     * Axis end location. Works on Date/Category axis, doesn't work on Value axis.
     *
     * * 0 - None of the last cell is shown. (don't do that)
     * * 0.5 - Half of the last cell is shown.
     * * 1 - Full last cell is shown.
     *
     * @param value Location (0-1)
     */
    set: function set(value) {
      this.setPropertyValue("endLocation", value, true);
    },
    enumerable: true,
    configurable: true
  });

  Axis.prototype.setDisabled = function (value) {
    var changed = _super.prototype.setDisabled.call(this, value);

    if (this.renderer) {
      this.renderer.gridContainer.disabled = value;
    }

    return changed;
  };

  Object.defineProperty(Axis.prototype, "title", {
    /**
     * @return Title label
     */
    get: function get() {
      return this._title;
    },

    /**
     * A reference to a [[Label]] element which serves as a title to the axis.
     *
     * When axis is created it aleready has an element, so you can just modify
     * it.
     *
     * Or you can replace it with your own instance of `Label`.
     *
     * @param  value  Title label
     */
    set: function set(value) {
      if (this._title && this._title != value) {
        this._title.dispose();
      }

      if (value) {
        this._title = value;
        value.parent = this;
        value.shouldClone = false;
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Axis.prototype, "hideTooltipWhileZooming", {
    /**
     * @return Hide tooltip while zooming?
     */
    get: function get() {
      return this.getPropertyValue("hideTooltipWhileZooming");
    },

    /**
     * Indicates if axis' tooltip should be hidden while axis range is animating
     * (zooming)
     *
     * @default true
     * @since 4.7.16
     * @param  value  Hide tooltip while zooming?
     */
    set: function set(value) {
      this.setPropertyValue("hideTooltipWhileZooming", value);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Axis.prototype, "zoomable", {
    /**
     * @return Zoomable?
     */
    get: function get() {
      return this.getPropertyValue("zoomable");
    },

    /**
     * Should the axis be zoomed with scrollbar/cursor?
     *
     * @default true
     * @since 4.9.28
     * @param  value  Zoomable?
     */
    set: function set(value) {
      this.setPropertyValue("zoomable", value);
    },
    enumerable: true,
    configurable: true
  });
  return Axis;
}(_core_Component__WEBPACK_IMPORTED_MODULE_0__.Component);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_9__.registry.registeredClasses.Axis = Axis;
_core_Registry__WEBPACK_IMPORTED_MODULE_9__.registry.registeredClasses.AxisDataItem = AxisDataItem;
/**
 * Add default responsive rules
 */

/**
 * Disable axis tooltips.
 */

_core_utils_Responsive__WEBPACK_IMPORTED_MODULE_17__.defaultRules.push({
  relevant: _core_utils_Responsive__WEBPACK_IMPORTED_MODULE_17__.ResponsiveBreakpoints.maybeXS,
  state: function state(target, stateId) {
    if (target instanceof Axis && target.tooltip) {
      var state = target.states.create(stateId);
      state.properties.cursorTooltipEnabled = false;
      return state;
    }

    return null;
  }
});

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisBreak.js":
/*!*****************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisBreak.js ***!
  \*****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "AxisBreak": () => (/* binding */ AxisBreak)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _core_Container__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../core/Container */ "./node_modules/@amcharts/amcharts4/.internal/core/Container.js");
/* harmony import */ var _core_utils_Disposer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/utils/Disposer */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Disposer.js");
/* harmony import */ var _core_elements_WavedLine__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/elements/WavedLine */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/WavedLine.js");
/* harmony import */ var _core_utils_List__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/utils/List */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/List.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_utils_Color__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../core/utils/Color */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Color.js");
/* harmony import */ var _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../core/utils/InterfaceColorSet */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/InterfaceColorSet.js");
/**
 * Axis break module
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */








/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Base class to define "breaks" on axes.
 *
 * @see {@link IAxisBreakEvents} for a list of available events
 * @see {@link IAxisBreakAdapters} for a list of available Adapters
 * @important
 */

var AxisBreak =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_7__.__extends)(AxisBreak, _super);
  /**
   * Constructor
   */


  function AxisBreak() {
    var _this = // Init
    _super.call(this) || this;
    /**
     * Reference to parent Axis.
     */


    _this._axis = new _core_utils_Disposer__WEBPACK_IMPORTED_MODULE_1__.MutableValueDisposer();
    /**
     * A list of axis data items which fall within this break.
     */

    _this.dataItems = new _core_utils_List__WEBPACK_IMPORTED_MODULE_3__.List();
    _this.className = "AxisBreak"; // Set defaults

    _this.breakSize = 0.01;
    _this.marginLeft = -5;
    _this.marginRight = -5;
    _this.marginTop = -5;
    _this.marginBottom = -5;
    var interfaceColors = new _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_6__.InterfaceColorSet(); // Create elements
    // (these won't be used actually, just for setting properties)

    var fillShape = new _core_elements_WavedLine__WEBPACK_IMPORTED_MODULE_2__.WavedLine();
    fillShape.fill = interfaceColors.getFor("background");
    fillShape.stroke = (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_5__.color)();
    fillShape.fillOpacity = 0.9;
    fillShape.zIndex = 0;
    _this._fillShape = fillShape;
    var startLine = new _core_elements_WavedLine__WEBPACK_IMPORTED_MODULE_2__.WavedLine();
    startLine.fill = (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_5__.color)();
    startLine.stroke = interfaceColors.getFor("grid");
    startLine.strokeOpacity = 0.3;
    startLine.zIndex = 1;
    _this._startLine = startLine;
    var endLine = new _core_elements_WavedLine__WEBPACK_IMPORTED_MODULE_2__.WavedLine();
    endLine.fill = (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_5__.color)();
    endLine.stroke = (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_5__.color)("#000000"); // interfaceColors.getFor("grid");

    endLine.strokeOpacity = 0.3;
    endLine.zIndex = 2;
    _this._endLine = endLine;

    _this._disposers.push(_this._axis); // Apply theme


    _this.applyTheme();

    return _this;
  }

  AxisBreak.prototype.dispose = function () {
    _super.prototype.dispose.call(this);

    if (this._fillShape) {
      this._fillShape.dispose();
    }

    if (this._startLine) {
      this._startLine.dispose();
    }

    if (this._endLine) {
      this._endLine.dispose();
    }
  };

  Object.defineProperty(AxisBreak.prototype, "startLine", {
    /**
     * @return Element
     */
    get: function get() {
      return this._startLine;
    },

    /**
     * An element used for the starting line of the break.
     *
     * @param sprite  Element
     */
    set: function set(sprite) {
      if (this._startLine) {
        this._startLine.dispose();
      }

      this._startLine = sprite;
      this.addBreakSprite(sprite);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(AxisBreak.prototype, "endLine", {
    /**
     * @return Element
     */
    get: function get() {
      return this._endLine;
    },

    /**
     * An element used for the end line of the break.
     *
     * @param sprite Element
     */
    set: function set(sprite) {
      if (this._endLine) {
        this._endLine.dispose();
      }

      this._endLine = sprite;
      this.addBreakSprite(sprite);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(AxisBreak.prototype, "fillShape", {
    /**
     * @return Element
     */
    get: function get() {
      return this._fillShape;
    },

    /**
     * An element used for fill of the break.
     *
     * @param sprite Element
     */
    set: function set(sprite) {
      if (this._fillShape) {
        this._fillShape.dispose();
      }

      this._fillShape = sprite;
      this.addBreakSprite(sprite);
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Adds a break element (e.g. lines, fill) to the break, which is
   * [[Container]].
   *
   * @ignore Exclude from docs
   * @param sprite Element to add
   */

  AxisBreak.prototype.addBreakSprite = function (sprite) {
    sprite.parent = this;
    sprite.isMeasured = false;

    this._disposers.push(sprite);
  };

  Object.defineProperty(AxisBreak.prototype, "axis", {
    /**
     * @return Axis
     */
    get: function get() {
      return this._axis.get();
    },

    /**
     * An Axis this Break is associated with.
     *
     * @param axis  Axis
     */
    set: function set(axis) {
      if (this._axis.get() !== axis) {
        this._axis.set(axis, axis.renderer.gridContainer.events.on("transformed", this.invalidate, this, false));

        axis.renderer.createBreakSprites(this); // this can't go to copyFrom, as axis is set later

        var breakTemplate = axis.axisBreaks.template;
        this.startLine.copyFrom(breakTemplate.startLine);
        this.endLine.copyFrom(breakTemplate.endLine);
        this.fillShape.copyFrom(breakTemplate.fillShape);
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(AxisBreak.prototype, "breakSize", {
    /**
     * @return Relative axis break
     */
    get: function get() {
      return this.getPropertyValue("breakSize");
    },

    /**
     * A size of the break relative to the actual size of the scope break spans.
     *
     * For example, if `breakSize = 0.1` and unbroken scope of values it spans
     * would be 100 pixels, the break would be 10 pixels wide.
     *
     * 0 means the break will completely collapse and hide the values.
     * 1 means break would be not collapse at all, which would make it
     * effectively useless.
     *
     * @default 0.01
     * @param value  Relative axis break
     */
    set: function set(value) {
      if (this.setPropertyValue("breakSize", value)) {
        if (this.axis) {
          this.axis.invalidate();
          this.axis.invalidateSeries();
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(AxisBreak.prototype, "startPoint", {
    /**
     * Returns pixel coordinates of axis break's start.
     *
     * @return Start point
     */
    get: function get() {
      var renderer = this.axis.renderer;

      if (renderer) {
        return renderer.positionToPoint(this.startPosition);
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(AxisBreak.prototype, "endPoint", {
    /**
     * Returns pixel coordinates of axis break's end.
     *
     * @return End point
     */
    get: function get() {
      var renderer = this.axis.renderer;

      if (renderer) {
        return renderer.positionToPoint(this.endPosition);
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(AxisBreak.prototype, "startPosition", {
    /**
     * Returns a relative position at which axis break starts.
     *
     * This is a calculated position, meaning it shows relative position of the
     * break after break is applied.
     *
     * @return Start position
     */
    get: function get() {
      return;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(AxisBreak.prototype, "endPosition", {
    /**
     * Returns a relative position at which axis break ends.
     *
     * This is a calculated position, meaning it shows relative position of the
     * break after break is applied.
     *
     * @return End position
     */
    get: function get() {
      return;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Draws the axis break.
   *
   * @ignore Exclude from docs
   */

  AxisBreak.prototype.draw = function () {
    _super.prototype.draw.call(this);

    if (this.axis) {
      var renderer = this.axis.renderer;
      renderer.updateBreakElement(this);
    }
  };

  Object.defineProperty(AxisBreak.prototype, "startValue", {
    /**
     * @return Starting value
     */
    get: function get() {
      return this.getPropertyValue("startValue");
    },

    /**
     * A starting value for the break.
     *
     * @param value  Starting value
     */
    set: function set(value) {
      if (this.setPropertyValue("startValue", value)) {
        if (this.axis) {
          this.axis.invalidate();
          this.axis.invalidateSeries();
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(AxisBreak.prototype, "endValue", {
    /**
     * @return End value
     */
    get: function get() {
      return this.getPropertyValue("endValue");
    },

    /**
     * An end value for the break.
     *
     * @param value  End value
     */
    set: function set(value) {
      if (this.setPropertyValue("endValue", value)) {
        if (this.axis) {
          this.axis.invalidate();
          this.axis.invalidateSeries();
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  return AxisBreak;
}(_core_Container__WEBPACK_IMPORTED_MODULE_0__.Container);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_4__.registry.registeredClasses.AxisBreak = AxisBreak;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisBullet.js":
/*!******************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisBullet.js ***!
  \******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "AxisBullet": () => (/* binding */ AxisBullet)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _core_Container__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../core/Container */ "./node_modules/@amcharts/amcharts4/.internal/core/Container.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/**
 * Axis Bullet module.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */



/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Used to draw a positioned bullet (element) on an Axis.
 *
 * ```TypeScript
 * let range = dateAxis.axisRanges.create();
 * range.date = new Date(2018, 0, 5);
 *
 * let flag = new am4plugins_bullets.FlagBullet();
 * flag.label.text = "Hello";
 *
 * range.bullet = flag;
 * ```
 * ```JavaScript
 * var range = dateAxis.axisRanges.create();
 * range.date = new Date(2018, 0, 5);
 *
 * var flag = new am4plugins_bullets.FlagBullet();
 * flag.label.text = "Hello";
 *
 * range.bullet = flag;
 * ```
 * ```JSON
 * {
 *   // ...
 *   "xAxes": [{
 *     "type": "DateAxis",
 *     // ...
 *     "axisRanges": [{
 *       "date": new Date(2018, 0, 5),
 *       "bullet: {
 *         "type": "FlagBullet",
 *         "label": {
 *           "text": "Hello"
 *         }
 *       }
 *     }]
 *   }]
 * }
 * ```
 *
 * @since 4.5.9
 * @see {@link IAxisBulletEvents} for a list of available events
 * @see {@link IAxisBulletAdapters} for a list of available Adapters
 * @important
 */

var AxisBullet =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(AxisBullet, _super);

  function AxisBullet() {
    var _this = _super.call(this) || this;

    _this.className = "AxisBullet";
    _this.location = 0.5;
    _this.isMeasured = false;

    _this.applyTheme();

    return _this;
  }

  Object.defineProperty(AxisBullet.prototype, "location", {
    /**
     * @return Location (0-1)
     */
    get: function get() {
      return this.getPropertyValue("location");
    },

    /**
     * Relative position within cell/range.
     *
     * Value range is from from `0` (beginning) to `1` (end).
     *
     * NOTE: `location` is relative to the parent axis range's scope, i.e.
     * between its `date` and `endDate` for [[DateAxis]], or `value`/`endValue`
     * ([[ValueAxis]]), or `category`/`endCategory` ([[categoryAxis]]).
     *
     * ```TypeScript
     * let range = dateAxis.axisRanges.create();
     * range.date = new Date(2018, 0, 5);
     * range.endDate = new Date(2018, 0, 6);
     *
     * let bullet = new am4charts.AxisBullet();
     * bullet.location = 1;
     *
     * let flag = bullet.createChild(am4plugins_bullets.FlagBullet);
     * flag.label.text = "Hello";
     * ```
     * ```JavaScript
     * var range = dateAxis.axisRanges.create();
     * range.date = new Date(2018, 0, 5);
     * range.endDate = new Date(2018, 0, 6);
     *
     * var bullet = new am4charts.AxisBullet();
     * bullet.location = 1;
     *
     * var flag = bullet.createChild(am4plugins_bullets.FlagBullet);
     * flag.label.text = "Hello";
     * ```
     * ```JSON
     * {
     *   // ...
     *   "xAxes": [{
     *     "type": "DateAxis",
     *     // ...
     *     "axisRanges": [{
     *       "date": new Date(2018, 0, 5),
     *       "endDate": new Date(2018, 0, 6),
     *       "bullet: {
     *         "type": "AxisBullet",
     *         "location": 1,
     *         "children": [{
     *           "type": "FlagBullet",
     *           "label": {
     *             "text": "Hello"
     *           }
     *         }]
     *       }
     *     }]
     *   }]
     * }
     * ```
     *
     * @default 0.5
     * @param  value  Location (0-1)
     */
    set: function set(value) {
      this.setPropertyValue("location", value, true);
    },
    enumerable: true,
    configurable: true
  });
  /**
   * @ignore
   */

  AxisBullet.prototype.setDisabled = function (value) {
    var changed = _super.prototype.setDisabled.call(this, value);

    if (this.axis) {
      this.axis.invalidateDataItems();
    }

    return changed;
  };

  return AxisBullet;
}(_core_Container__WEBPACK_IMPORTED_MODULE_0__.Container);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses.AxisBullet = AxisBullet;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisFill.js":
/*!****************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisFill.js ***!
  \****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "AxisFill": () => (/* binding */ AxisFill)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _core_Sprite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../core/Sprite */ "./node_modules/@amcharts/amcharts4/.internal/core/Sprite.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/utils/InterfaceColorSet */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/InterfaceColorSet.js");
/* harmony import */ var _core_utils_Type__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */





/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * AxisFill is a base class used to defines fill shapes for various
 * type-specific Axes.
 *
 * Axis fills are used to add fills to specific ranges of those axes.
 *
 * @see {@link IAxisFillEvents} for a list of available events
 * @see {@link IAxisFillAdapters} for a list of available Adapters
 * @important
 */

var AxisFill =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_4__.__extends)(AxisFill, _super);
  /**
   * Constructor.
   *
   * @param axis Axis
   */


  function AxisFill(axis) {
    var _this = _super.call(this) || this;

    _this.axis = axis;
    _this.element = _this.paper.add("path");
    _this.className = "AxisFill";
    _this.isMeasured = false;
    _this.location = 0;
    _this.above = false;
    var interfaceColors = new _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_2__.InterfaceColorSet();
    _this.fill = interfaceColors.getFor("alternativeBackground");
    _this.fillOpacity = 0;

    _this.applyTheme();

    return _this;
  }
  /**
   * @ignore
   */


  AxisFill.prototype.setDisabled = function (value) {
    var changed = _super.prototype.setDisabled.call(this, value);

    if (this.axis) {
      this.axis.invalidateDataItems();
    }

    return changed;
  };
  /**
   * Draws the fill element.
   *
   * @ignore Exclude from docs
   */


  AxisFill.prototype.draw = function () {
    _super.prototype.draw.call(this);

    if (this.__disabled || this.disabled) {
      return;
    }

    if (this.axis && _core_utils_Type__WEBPACK_IMPORTED_MODULE_3__.isNumber(this.startPosition) && _core_utils_Type__WEBPACK_IMPORTED_MODULE_3__.isNumber(this.endPosition)) {
      this.fillPath = this.axis.getPositionRangePath(this.startPosition, this.endPosition);
      this.path = this.fillPath;

      if (this.isMeasured) {
        this.measure();
      }
    }
  };

  Object.defineProperty(AxisFill.prototype, "startPosition", {
    /**
     * @return Start position
     */
    get: function get() {
      return this.getPropertyValue("startPosition");
    },

    /**
     * An actual starting position of the fill.
     *
     * @param value  Starting position
     */
    set: function set(value) {
      this.setPropertyValue("startPosition", value);
      this.invalidate(); // this is needed as relative position might not change when zooming
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(AxisFill.prototype, "endPosition", {
    /**
     * @return End position
     */
    get: function get() {
      return this.getPropertyValue("endPosition");
    },

    /**
     * An actual end position of the fill.
     *
     * @param value End position
     */
    set: function set(value) {
      this.setPropertyValue("endPosition", value);
      this.invalidate(); // this is needed as relative position might not change when zooming
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(AxisFill.prototype, "location", {
    /**
     * @return Location (0-1)
     */
    get: function get() {
      return this.getPropertyValue("location");
    },

    /**
     * Relative location of the fill. (0-1)
     *
     * @param value Location (0-1)
     */
    set: function set(value) {
      this.setPropertyValue("location", value, true);
    },
    enumerable: true,
    configurable: true
  });
  /**
   * @ignore
   */

  AxisFill.prototype.setPath = function (value) {
    if (this.setPropertyValue("path", value)) {
      this.element.attr({
        "d": value
      });
      return true;
    }

    return false;
  };

  Object.defineProperty(AxisFill.prototype, "above", {
    /**
     * @return Draw above series?
     */
    get: function get() {
      return this.getPropertyValue("above");
    },

    /**
     * Normally fill goes below series. Set this to `true` to go above.
     *
     * @default false
     * @since 4.5.9
     * @param  value  Draw above series?
     */
    set: function set(value) {
      this.setPropertyValue("above", value, true);
    },
    enumerable: true,
    configurable: true
  });
  return AxisFill;
}(_core_Sprite__WEBPACK_IMPORTED_MODULE_0__.Sprite);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses.AxisFill = AxisFill;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisFillCircular.js":
/*!************************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisFillCircular.js ***!
  \************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "AxisFillCircular": () => (/* binding */ AxisFillCircular)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _AxisFill__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AxisFill */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisFill.js");
/* harmony import */ var _core_utils_Percent__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/utils/Percent */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Percent.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_utils_Type__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */





/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Provides fill element functionality for circular Axes.
 *
 * @see {@link IAxisFillCircularEvents} for a list of available events
 * @see {@link IAxisFillCircularAdapters} for a list of available Adapters
 * @todo Needs description
 */

var AxisFillCircular =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_4__.__extends)(AxisFillCircular, _super);
  /**
   * Constructor.
   *
   * @param axis Axis
   */


  function AxisFillCircular(axis) {
    var _this = _super.call(this, axis) || this;

    _this.className = "AxisFillCircular";
    _this.element = _this.paper.add("path");
    _this.radius = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_1__.percent)(100);

    _this.applyTheme();

    return _this;
  }
  /**
   * Draws the fill element.
   *
   * @ignore Exclude from docs
   */


  AxisFillCircular.prototype.draw = function () {
    _super.prototype.draw.call(this);

    if (this.__disabled || this.disabled) {
      return;
    }

    if (this.axis) {
      var renderer = this.axis.renderer;
      this.fillPath = renderer.getPositionRangePath(this.startPosition, this.endPosition, this.radius, _core_utils_Type__WEBPACK_IMPORTED_MODULE_3__.hasValue(this.innerRadius) ? this.innerRadius : renderer.innerRadius, this.cornerRadius);
      this.path = this.fillPath;
    }
  };

  Object.defineProperty(AxisFillCircular.prototype, "innerRadius", {
    /**
     * @return Inner radius
     */
    get: function get() {
      return this.getPropertyValue("innerRadius");
    },

    /**
     * Inner radius of the fill. Relative ([[Percent]]) or absolute (pixels).
     *
     * @param value  Inner radius
     */
    set: function set(value) {
      this.setPercentProperty("innerRadius", value, true, false, 10, false);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(AxisFillCircular.prototype, "radius", {
    /**
     * @return Outer radius
     */
    get: function get() {
      return this.getPropertyValue("radius");
    },

    /**
     * Outer radius of the fill. Relative ([[Percent]]) or absolute (pixels).
     *
     * @param value  Outer radius
     */
    set: function set(value) {
      this.setPercentProperty("radius", value, true, false, 10, false);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(AxisFillCircular.prototype, "cornerRadius", {
    /**
     * @return Corner radius (px)
     */
    get: function get() {
      return this.getPropertyValue("cornerRadius");
    },

    /**
     * Corner radius for the fill. In pixels.
     *
     * @param value  Corner radius (px)
     */
    set: function set(value) {
      this.setPropertyValue("cornerRadius", value, true);
    },
    enumerable: true,
    configurable: true
  });
  return AxisFillCircular;
}(_AxisFill__WEBPACK_IMPORTED_MODULE_0__.AxisFill);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_2__.registry.registeredClasses.AxisFillCircular = AxisFillCircular;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisLabel.js":
/*!*****************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisLabel.js ***!
  \*****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "AxisLabel": () => (/* binding */ AxisLabel)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _core_elements_Label__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../core/elements/Label */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Label.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/**
 * Axis Label module
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */



/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Use to create labels on Axis.
 *
 * @see {@link IAxisLabelEvents} for a list of available events
 * @see {@link IAxisLabelAdapters} for a list of available Adapters
 * @important
 */

var AxisLabel =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(AxisLabel, _super);
  /**
   * Constructor
   */


  function AxisLabel() {
    var _this = _super.call(this) || this;

    _this.className = "AxisLabel";
    _this.isMeasured = false;

    _this.padding(10, 10, 10, 10);

    _this.location = 0.5; //this.nonScaling = true; // not good for perf

    _this.applyTheme();

    return _this;
  }

  Object.defineProperty(AxisLabel.prototype, "location", {
    /**
     * @return Location (0-1)
     */
    get: function get() {
      return this.getPropertyValue("location");
    },

    /**
     * Relative location of the label. (0-1)
     *
     * @param value  Location (0-1)
     */
    set: function set(value) {
      this.setPropertyValue("location", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(AxisLabel.prototype, "inside", {
    /**
     * Returns if label is set to be drawn inside axis.
     *
     * @return Inside?
     */
    get: function get() {
      return this.getPropertyValue("inside");
    },

    /**
     * Sets if label should be drawn inside axis.
     *
     * @param value  Inside?
     */
    set: function set(value) {
      this.setPropertyValue("inside", value, true);
    },
    enumerable: true,
    configurable: true
  });
  /**
   * @ignore
   */

  AxisLabel.prototype.setDisabled = function (value) {
    var changed = _super.prototype.setDisabled.call(this, value);

    if (this.axis) {
      this.axis.invalidateDataItems();
    }

    return changed;
  };

  return AxisLabel;
}(_core_elements_Label__WEBPACK_IMPORTED_MODULE_0__.Label);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses.AxisLabel = AxisLabel;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisLabelCircular.js":
/*!*************************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisLabelCircular.js ***!
  \*************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "AxisLabelCircular": () => (/* binding */ AxisLabelCircular)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _AxisLabel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AxisLabel */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisLabel.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
/* harmony import */ var _core_utils_Type__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/* harmony import */ var _core_rendering_Path__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../core/rendering/Path */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Path.js");
/* harmony import */ var _core_utils_Utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../core/utils/Utils */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Utils.js");
/* harmony import */ var _core_utils_Percent__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../core/utils/Percent */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Percent.js");
/**
 * Axis Label module
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */








/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Use to create labels on circular axis.
 *
 * @see {@link IAxisLabelCircularEvents} for a list of available events
 * @see {@link IAxisLabelCircularAdapters} for a list of available Adapters
 */

var AxisLabelCircular =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_7__.__extends)(AxisLabelCircular, _super);
  /**
   * Constructor
   */


  function AxisLabelCircular() {
    var _this = _super.call(this) || this;
    /**
     *
     * @ignore
     */


    _this.fdx = 0;
    /**
     *
     * @ignore
     */

    _this.fdy = 0;
    _this.className = "AxisLabelCircular";

    _this.padding(0, 0, 0, 0);

    _this.location = 0.5;
    _this.locationOnPath = 0.5;
    _this.radius = 0;
    _this.isMeasured = false;

    _this.applyTheme();

    return _this;
  }

  Object.defineProperty(AxisLabelCircular.prototype, "relativeRotation", {
    /**
     * @return Rotation angle
     */
    get: function get() {
      return this.getPropertyValue("relativeRotation");
    },

    /**
     * Relative rotation of the label.
     *
     * It is an angle to circle. In case 90, labels will be positioned like rays
     * of light, if 0 - positioned along the circle.
     *
     * @param value Rotation angle
     */
    set: function set(value) {
      this.setPropertyValue("relativeRotation", value, true);

      if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_3__.hasValue(value)) {
        this.rotation = undefined;
        var dataItem = this.dataItem;

        if (dataItem && dataItem.component) {
          dataItem.component.invalidateDataItems();
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(AxisLabelCircular.prototype, "radius", {
    /**
     * @return Distance (px)
     */
    get: function get() {
      return this.getPropertyValue("radius");
    },

    /**
     * Distance from axis circle to label in pixels or percent.
     *
     * @param value Distance (px or percent)
     */
    set: function set(value) {
      this.setPercentProperty("radius", value, true, false, 10, false);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(AxisLabelCircular.prototype, "bent", {
    /**
     * @return Bent?
     */
    get: function get() {
      return this.getPropertyValue("bent");
    },

    /**
     * Specifies if label should be bent along the circle.
     *
     * IMPORTANT: Use this with caution, since it is quite CPU-greedy.
     *
     * @since 4.1.2
     * @default false
     * @param  value  Bent?
     */
    set: function set(value) {
      this.setPropertyValue("bent", value, true);
      this.setPropertyValue("wrap", false);
      this.setPropertyValue("horizontalCenter", "none");
      this.setPropertyValue("verticalCenter", "none");

      if (value) {
        this.setPropertyValue("dx", 0);
        this.setPropertyValue("dy", 0);
        this.setPropertyValue("x", 0);
        this.setPropertyValue("y", 0);
        this.setPropertyValue("rotation", 0); //this.setPropertyValue("relativeRotation", undefined);

        this.fdx = 0;
        this.fdy = 0;
        this.textAlign = "middle";
      } else {
        if (this.textPathElement) {
          this.textPathElement.dispose();
          this.textPathElement = undefined;
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Returns label radius in pixels.
   *
   * @param   axisRadius  Radius
   * @return              Pixel radius
   */

  AxisLabelCircular.prototype.pixelRadius = function (axisRadius) {
    var sign = 1;

    if (this.inside) {
      sign = -1;
    }

    return _core_utils_Utils__WEBPACK_IMPORTED_MODULE_5__.relativeToValue(this.radius, axisRadius) * sign;
  };
  /**
   * Returns label horizontal radius in pixels.
   *
   * @param   axisRadius   Radius
   * @param   axisRadiusY  Vertical radius
   * @return               Radius
   */


  AxisLabelCircular.prototype.pixelRadiusY = function (axisRadius, axisRadiusY) {
    var sign = 1;

    if (this.inside) {
      sign = -1;
    }

    var radius = this.radius;

    if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_3__.isNumber(radius)) {
      radius *= axisRadiusY / axisRadius;
      return _core_utils_Utils__WEBPACK_IMPORTED_MODULE_5__.relativeToValue(radius, axisRadius) * sign;
    } else {
      return _core_utils_Utils__WEBPACK_IMPORTED_MODULE_5__.relativeToValue(radius, axisRadiusY) * sign;
    }
  };
  /**
   * [fixPosition description]
   *
   * @ignore Exclude from docs
   * @todo Description
   * @param point       Label affixation point
   * @param axisRadius  Distance from point (px)
   */


  AxisLabelCircular.prototype.fixPosition = function (angle, axisRadius, axisRadiusY, dx, dy) {
    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_3__.isNumber(axisRadiusY)) {
      axisRadiusY = axisRadius;
    }

    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_3__.isNumber(dx)) {
      dx = 0;
    }

    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_3__.isNumber(dy)) {
      dy = 0;
    }

    var point = {
      x: axisRadius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.cos(angle),
      y: axisRadiusY * _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.sin(angle)
    };

    if (this.invalid) {
      this.validate(); //@todo" check if we need this
    }

    var isNegative = false;
    var realRadius = this.radius;

    if (realRadius instanceof _core_utils_Percent__WEBPACK_IMPORTED_MODULE_6__.Percent && realRadius.value < 0) {
      isNegative = true;
    } else if (realRadius < 0) {
      isNegative = true;
    }

    var relativeRotation = this.relativeRotation;
    var labelRadius = this.pixelRadius(axisRadius);

    if (this.bent) {
      var point_1 = {
        x: (axisRadius + labelRadius) * _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.cos(angle + 180),
        y: (axisRadiusY + labelRadius * axisRadiusY / axisRadius) * _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.sin(angle + 180)
      };
      this.path = _core_rendering_Path__WEBPACK_IMPORTED_MODULE_4__.moveTo(point_1) + _core_rendering_Path__WEBPACK_IMPORTED_MODULE_4__.arcTo(angle + 180, 360, axisRadius + labelRadius, axisRadiusY + labelRadius * axisRadiusY / axisRadius);

      if (this.textPathElement) {
        this.textPathElement.attr({
          "startOffset": this.locationOnPath * 100 + "%"
        });
      }

      return;
    } // WHEN ROTATED


    if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_3__.isNumber(relativeRotation)) {
      this.horizontalCenter = "none";
      this.verticalCenter = "none";
      angle = _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.fitAngleToRange(angle, -180, 180);
      var pixelWidth = this.bbox.width;
      var pixelHeight = this.bbox.height;
      var pixelPaddingBottom = this.pixelPaddingBottom;
      var pixelPaddingTop = this.pixelPaddingTop;
      var pixelPaddingLeft = this.pixelPaddingLeft;
      var pixelPaddingRight = this.pixelPaddingRight;

      if (angle > 90 || angle < -90) {
        if (relativeRotation == -90) {
          relativeRotation = 90;
          pixelWidth = 0;
        }
      } else {
        if (relativeRotation == -90) {
          pixelHeight = -pixelHeight;
        }

        if (relativeRotation == 90) {
          relativeRotation = -90;
          pixelWidth = -pixelPaddingLeft - pixelPaddingRight;
          pixelHeight = -pixelHeight - pixelPaddingTop - pixelPaddingBottom;
        }
      }

      this.rotation = relativeRotation + angle + 90;
      var dH = _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.sin(relativeRotation) / 2;
      var dW = _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.cos(relativeRotation) / 2;
      var rotation = this.rotation;
      this.dx = pixelHeight * dH * _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.sin(rotation) - pixelWidth * dW * _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.cos(rotation);
      this.dy = -pixelHeight * dH * _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.cos(rotation) - pixelWidth * dW * _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.sin(rotation);

      if (!this.inside) {
        labelRadius += (pixelHeight + pixelPaddingBottom + pixelPaddingTop) * _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.cos(relativeRotation) + (pixelWidth + pixelPaddingLeft + pixelPaddingRight) * _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.sin(relativeRotation);
      } else {
        if (angle > 90 || angle < -90) {
          labelRadius -= (pixelPaddingBottom + pixelPaddingTop) * _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.cos(relativeRotation) + (pixelPaddingLeft + pixelPaddingRight) * _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.sin(relativeRotation);
        } else {
          labelRadius += (pixelPaddingBottom + this.bbox.height + pixelPaddingTop) * _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.cos(relativeRotation) + (pixelPaddingLeft + pixelPaddingRight + this.bbox.width) * _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.sin(relativeRotation);
        }
      }

      point.x += _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.cos(angle) * labelRadius;
      point.y += _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.sin(angle) * labelRadius * axisRadiusY / axisRadius;
    } else {
      // END OF ROTATED
      this.horizontalCenter = "middle";
      this.verticalCenter = "middle";

      if (isNegative) {
        this.dx = 0;
        this.dy = 0;
        point.x = (axisRadius + labelRadius) * _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.cos(angle);
        point.y = (axisRadiusY + labelRadius * axisRadiusY / axisRadius) * _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.sin(angle);
      } else {
        // we don't use valign for labels because then they would jump while animating. instead we modify dy depending on a y position
        // this math makes dy to be 1 at the top of the circle, 0.5 at the middle and 1 at the bottom
        // @todo with this math doesn't work well with inside = true
        this.dy = this._measuredHeight / 2 * _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.sin(angle); //(1 - (point.y + axisRadiusY) / (2 * axisRadiusY));
        // simmilar with dx

        this.dx = this._measuredWidth / 2 * _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.cos(angle); //(1 - (point.x + axisRadius) / (2 * axisRadius));

        point.x += _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.cos(angle) * labelRadius;
        point.y += _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.sin(angle) * labelRadius * axisRadiusY / axisRadius;
      }
    }

    point.x += dx;
    point.y += dy;
    this.fdx = this.dx;
    this.fdy = this.dy;
    this.moveTo(point);
  };

  return AxisLabelCircular;
}(_AxisLabel__WEBPACK_IMPORTED_MODULE_0__.AxisLabel);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses.AxisLabelCircular = AxisLabelCircular;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisLine.js":
/*!****************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisLine.js ***!
  \****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "AxisLine": () => (/* binding */ AxisLine)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _core_Sprite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../core/Sprite */ "./node_modules/@amcharts/amcharts4/.internal/core/Sprite.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_utils_Color__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/utils/Color */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Color.js");
/* harmony import */ var _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/utils/InterfaceColorSet */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/InterfaceColorSet.js");
/**
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */





/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Used to draw Axis line.
 *
 * @see {@link IAxisLineEvents} for a list of available events
 * @see {@link IAxisLineAdapters} for a list of available Adapters
 */

var AxisLine =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_4__.__extends)(AxisLine, _super);
  /**
   * Constructor
   */


  function AxisLine() {
    var _this = _super.call(this) || this;

    _this.className = "AxisLine";
    _this.element = _this.paper.add("path");
    var interfaceColors = new _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_3__.InterfaceColorSet();
    _this.stroke = interfaceColors.getFor("grid");
    _this.strokeOpacity = 0.15;
    _this.pixelPerfect = true;
    _this.fill = (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_2__.color)();

    _this.applyTheme();

    _this.interactionsEnabled = false;
    return _this; //this.element.moveTo({ x: 0, y: 0 });
  }

  return AxisLine;
}(_core_Sprite__WEBPACK_IMPORTED_MODULE_0__.Sprite);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses.AxisLine = AxisLine;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisRenderer.js":
/*!********************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisRenderer.js ***!
  \********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "AxisRenderer": () => (/* binding */ AxisRenderer)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _core_Container__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../core/Container */ "./node_modules/@amcharts/amcharts4/.internal/core/Container.js");
/* harmony import */ var _core_utils_Disposer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/utils/Disposer */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Disposer.js");
/* harmony import */ var _Axis__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Axis */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/Axis.js");
/* harmony import */ var _AxisLine__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./AxisLine */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisLine.js");
/* harmony import */ var _AxisFill__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./AxisFill */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisFill.js");
/* harmony import */ var _Grid__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Grid */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/Grid.js");
/* harmony import */ var _AxisLabel__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./AxisLabel */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisLabel.js");
/* harmony import */ var _AxisTick__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./AxisTick */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisTick.js");
/* harmony import */ var _core_utils_List__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../core/utils/List */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/List.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_utils_Percent__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../core/utils/Percent */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Percent.js");
/* harmony import */ var _core_utils_Math__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../core/utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
/* harmony import */ var _core_utils_Type__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../core/utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/**
 * Module, defining base Axis Renderer.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */














/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * A base class for all axis renderers.
 *
 * @see {@link IAxisRendererEvents} for a list of available events
 * @see {@link IAxisRendererAdapters} for a list of available Adapters
 */

var AxisRenderer =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_13__.__extends)(AxisRenderer, _super);
  /**
   * Constructor.
   *
   * @param axis Related axis
   */


  function AxisRenderer() {
    var _this = // Init
    _super.call(this) || this;
    /**
     * A related chart.
     */


    _this._chart = new _core_utils_Disposer__WEBPACK_IMPORTED_MODULE_1__.MutableValueDisposer();
    _this.className = "AxisRenderer"; // Set defaults

    _this.minGridDistance = 50;
    _this.inside = false;
    _this.inversed = false;
    _this.tooltipLocation = 0.5;
    _this.fullWidthTooltip = false;
    _this.cellStartLocation = 0;
    _this.cellEndLocation = 1;
    _this.minLabelPosition = 0;
    _this.maxLabelPosition = 1;
    _this.shouldClone = false;

    var gridContainer = _this.createChild(_core_Container__WEBPACK_IMPORTED_MODULE_0__.Container);

    gridContainer.shouldClone = false;
    gridContainer.layout = "none"; //	gridContainer.isMeasured = false;

    gridContainer.virtualParent = _this;
    gridContainer.width = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_10__.percent)(100);
    gridContainer.height = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_10__.percent)(100);
    _this.gridContainer = gridContainer; // not good without this

    gridContainer.events.on("maxsizechanged", function () {
      if (_this.inited) {
        _this.invalidateAxisItems();
      }
    }, _this, false);

    var breakContainer = _this.createChild(_core_Container__WEBPACK_IMPORTED_MODULE_0__.Container);

    breakContainer.shouldClone = false;
    breakContainer.isMeasured = false;
    breakContainer.layout = "none";
    breakContainer.width = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_10__.percent)(100);
    breakContainer.height = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_10__.percent)(100);
    _this.breakContainer = breakContainer;

    var bulletsContainer = _this.createChild(_core_Container__WEBPACK_IMPORTED_MODULE_0__.Container);

    bulletsContainer.shouldClone = false;
    bulletsContainer.isMeasured = false;
    bulletsContainer.layout = "none";
    bulletsContainer.width = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_10__.percent)(100);
    bulletsContainer.height = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_10__.percent)(100);
    _this.bulletsContainer = bulletsContainer;
    _this.line = _this.createChild(_AxisLine__WEBPACK_IMPORTED_MODULE_3__.AxisLine);
    _this.line.shouldClone = false;
    _this.line.strokeOpacity = 0;

    var baseGrid = _this.createChild(_Grid__WEBPACK_IMPORTED_MODULE_5__.Grid);

    baseGrid.shouldClone = false;
    _this.baseGrid = baseGrid; // Make elements disposable

    var disposers = _this._disposers;
    disposers.push(baseGrid);
    disposers.push(_this.line);
    disposers.push(gridContainer);
    disposers.push(breakContainer);
    disposers.push(bulletsContainer);
    disposers.push(_this._chart);
    _this.ticks.template.disabled = true;
    _this.axisFills.template.disabled = true;
    _this.axisFills.template.interactionsEnabled = false; // Apply theme

    _this.applyTheme();

    return _this;
  }

  Object.defineProperty(AxisRenderer.prototype, "axis", {
    /**
     * Axis of a renderer
     * @return axis Axis
     */
    get: function get() {
      return this._axis;
    },

    /**
     * Axis of a renderer
     * @param axis Axis
     */
    set: function set(axis) {
      this.setAxis(axis);
    },
    enumerable: true,
    configurable: true
  });
  /**
  * @ignore
  */

  AxisRenderer.prototype.setAxis = function (axis) {
    this._axis = axis;
    this.baseGrid.parent = axis;
    this.line.parent = axis;
    this.gridContainer.bind("opacity", axis);
  };
  /**
   * Called when rendered is attached to an Axis, as well as a property of
   * Axis that might affect the appearance is updated.
   *
   * E.g. `axis.opposite`, `axis.inside`, etc.
   *
   * This method is called **before** draw, so that any related setting
   * changed in this method can be changed.
   *
   * @todo Description (review)
   * @ignore Exclude from docs
   */


  AxisRenderer.prototype.processRenderer = function () {
    this.events.on("sizechanged", this.updateTooltip, this, false);
    this.events.on("positionchanged", this.updateTooltip, this, false);
    this.labels.template.inside = this.inside;
    this.ticks.template.inside = this.inside;
  };
  /**
   * Updates Axis' tooltip.
   *
   * @todo Description (review)
   * @ignore Exclude from docs
   */


  AxisRenderer.prototype.updateTooltip = function () {// This is a placeholder method for extending classes to override.
  };

  Object.defineProperty(AxisRenderer.prototype, "axisLength", {
    /**
     * Returns actual length of the Axis, in pixels.
     *
     * @return Length (px)
     */
    get: function get() {
      // This is a placeholder method for extending classes to override.
      return 0;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Re-positions an element to new coordinates.
   *
   * @ignore Exclude from docs
   * @param item   A target element
   * @param point  New coordinates
   */

  AxisRenderer.prototype.positionItem = function (item, point) {
    if (item) {
      item.moveTo(point);
    }
  };
  /**
   * Converts relative position on axis to point coordinates.
   *
   * @param position  Position (0-1)
   * @return Point
   */


  AxisRenderer.prototype.positionToPoint = function (position, position2) {
    // This is a placeholder method for extending classes to override.
    return {
      x: 0,
      y: 0
    };
  };
  /**
   * Converts relative position on axis to angle.
   *
   * @ignore Exclude from docs
   * @todo Description (review / units)
   * @param position  Position (0-1)
   * @return Angle
   */


  AxisRenderer.prototype.positionToAngle = function (position) {
    // This is a placeholder method for extending classes to override.
    return 0;
  };
  /**
   * Converts relative position (0-1) on axis to a pixel coordinate.
   *
   * @param position  Position (0-1)
   * @return Coordinate (px)
   */


  AxisRenderer.prototype.positionToCoordinate = function (position) {
    var coordinate;
    var axis = this.axis;
    var axisFullLength = axis.axisFullLength;

    if (axis.renderer.inversed) {
      coordinate = (axis.end - position) * axisFullLength;
    } else {
      coordinate = (position - axis.start) * axisFullLength;
    }

    return coordinate;
  };

  AxisRenderer.prototype.updateGridContainer = function () {};

  AxisRenderer.prototype.getHeight = function () {
    var gridContainer = this.gridContainer;

    if (gridContainer.parent) {
      return gridContainer.parent.pixelHeight;
    }

    return this.gridContainer.pixelHeight || 0;
  };

  AxisRenderer.prototype.getWidth = function () {
    var gridContainer = this.gridContainer;

    if (gridContainer.parent) {
      return gridContainer.parent.pixelWidth;
    }

    return this.gridContainer.pixelWidth || 0;
  };
  /**
   * Converts a coordinate in pixels to a relative position. (0-1)
   *
   * @param coordinate  Coordinate (px)
   * @param coordinate2  Coordinate of a second axis, only needed for complex axes systems, like timeline (px)
   * @return Position (0-1)
   */


  AxisRenderer.prototype.coordinateToPosition = function (coordinate, coordinate2) {
    var position;
    var axis = this.axis;
    var axisFullLength = axis.axisFullLength;

    if (axis.renderer.inversed) {
      position = axis.end - coordinate / axisFullLength;
    } else {
      position = coordinate / axisFullLength + axis.start;
    }

    return _core_utils_Math__WEBPACK_IMPORTED_MODULE_11__.round(position, 5);
  };
  /**
   * Converts a point at specific coordinates to a relative position (0-1)
   * on the axis.
   *
   * @ignore Exclude from docs
   * @param point  Point
   * @return Position (0-1)
   */


  AxisRenderer.prototype.pointToPosition = function (point) {
    // This is a placeholder method for extending classes to override.
    return 0;
  };
  /**
   * [getPositionRangePath description]
   *
   * @ignore Exclude from docs
   * @todo Description
   * @param startPosition  Starting position
   * @param endPosition    End position
   * @return SVG path
   */


  AxisRenderer.prototype.getPositionRangePath = function (startPosition, endPosition) {
    return "";
  };
  /**
   * Invalidates all axis data items, effectively causing them re-evaluated.
   *
   * @ignore Exclude from docs
   * @todo Description (review)
   */


  AxisRenderer.prototype.invalidateAxisItems = function () {
    var axis = this.axis;

    if (axis) {
      axis.invalidateDataItems();
    }
  };
  /**
   * Updates and positions a grid element.
   *
   * @ignore Exclude from docs
   * @param grid         Grid element
   * @param position     Starting position
   * @param endPosition  End position
   */


  AxisRenderer.prototype.updateGridElement = function (grid, position, endPosition) {// This is a placeholder method for extending classes to override.
  };
  /**
   * Updates and positions a tick element.
   *
   * @ignore Exclude from docs
   * @param tick         Tick element
   * @param position     Starting position
   * @param endPosition  End position
   */


  AxisRenderer.prototype.updateTickElement = function (tick, position, endPosition) {// This is a placeholder method for extending classes to override.
  };
  /**
   * Updates and positions axis bullet.
   *
   * @ignore Exclude from docs
   * @param bullet       AxisBullet element
   * @param position     Starting position
   * @param endPosition  End position
   */


  AxisRenderer.prototype.updateBullet = function (bullet, position, endPosition) {// This is a placeholder method for extending classes to override.
  };
  /**
   * Updates and positions a label element.
   *
   * @ignore Exclude from docs
   * @param label        Label element
   * @param position     Starting position
   * @param endPosition  Ending position
   */


  AxisRenderer.prototype.updateLabelElement = function (label, position, endPosition, location) {// This is a placeholder method for extending classes to override.
  };
  /**
   * Updates and positions the axis fill element.
   *
   * @ignore Exclude from docs
   * @param fill         Fill element
   * @param position     Starting position
   * @param endPosition  Ending position
   */


  AxisRenderer.prototype.updateFillElement = function (fill, position, endPosition) {
    fill.startPosition = position;
    fill.endPosition = endPosition;
  };
  /**
   * Updates and positions the axis line element.
   *
   * @ignore Exclude from docs
   */


  AxisRenderer.prototype.updateAxisLine = function () {// This is a placeholder method for extending classes to override.
  };
  /**
   * Updates and positions the base grid element.
   *
   * @ignore Exclude from docs
   */


  AxisRenderer.prototype.updateBaseGridElement = function () {// This is a placeholder method for extending classes to override.
  };
  /**
   * Updates and positions an axis break element.
   *
   * @ignore Exclude from docs
   * @param axisBreak Break element
   */


  AxisRenderer.prototype.updateBreakElement = function (axisBreak) {
    this.positionItem(axisBreak.startLine, axisBreak.startPoint);
    this.toggleVisibility(axisBreak.startLine, axisBreak.startPosition, 0, 1);
    this.positionItem(axisBreak.endLine, axisBreak.endPoint);
    this.toggleVisibility(axisBreak.endLine, axisBreak.endPosition, 0, 1);
  };

  Object.defineProperty(AxisRenderer.prototype, "minGridDistance", {
    /**
     * @return Min distance (px)
     */
    get: function get() {
      return this.getPropertyValue("minGridDistance");
    },

    /**
     * Minimum distance in pixels between grid elements.
     *
     * Use it to control density of the grid/labels on the axis.element.
     *
     * @see {@link https://www.amcharts.com/docs/v4/concepts/axes/positioning-axis-elements/#Setting_the_density_of_the_the_grid_labels} for more info
     * @param value  Min distance (px)
     */
    set: function set(value) {
      if (this.setPropertyValue("minGridDistance", value)) {
        if (this.axis) {
          this.axis.invalidateDataItems();
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(AxisRenderer.prototype, "chart", {
    /**
     * @ignore Exclude from docs
     * @return Chart
     */
    get: function get() {
      return this._chart.get();
    },

    /**
     * A chart, associated with the Axis.
     *
     * @ignore Exclude from docs
     * @param value  Chart
     */
    set: function set(value) {
      this._chart.set(value, null);
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Toggles visibility of an element, based on its current position and
   * min/max position settings.
   *
   * E.g. labels based on `minLabelPosition` and `maxLabelPosition`.
   *
   * @ignore Exclude from docs
   * @param sprite       An element to toggle
   * @param position     Elements current position
   * @param minPosition  Min position setting
   * @param maxPosition  Max position setting
   */

  AxisRenderer.prototype.toggleVisibility = function (sprite, position, minPosition, maxPosition) {
    var axis = this.axis;
    var dataItem = sprite.dataItem;

    if (dataItem && dataItem instanceof _Axis__WEBPACK_IMPORTED_MODULE_2__.AxisDataItem) {
      if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_12__.isNumber(dataItem.minPosition)) {
        minPosition = dataItem.minPosition;
      }

      if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_12__.isNumber(dataItem.maxPosition)) {
        maxPosition = dataItem.maxPosition;
      }
    }

    var updatedStart = axis.start + (axis.end - axis.start) * (minPosition - 0.0001);
    var updatedEnd = axis.start + (axis.end - axis.start) * (maxPosition + 0.0001);

    if (!sprite.disabled) {
      if (position < updatedStart || position > updatedEnd) {
        sprite.__disabled = true;
      } else {
        sprite.__disabled = false;
      }
    }
  };
  /**
   * Creates visual elements for and axis break.
   *
   * @ignore Exclude from docs
   * @param axisBreak Axis break
   */


  AxisRenderer.prototype.createBreakSprites = function (axisBreak) {// This is a placeholder method for extending classes to override.
  };

  Object.defineProperty(AxisRenderer.prototype, "axisFills", {
    /**
     * A list of Axis' Fill elements.
     *
     * Those are fill elements that cover the space between every second set
     * of grid lines, and can be configured to create striped charts.
     *
     * Please note that these are disabled by default. To enable them, set
     * template to true.
     *
     * ```TypeScript
     * categoryAxis.renderer.axisFills.template.disabled = false;
     * ```
     * ```JavaScript
     * categoryAxis.renderer.axisFills.template.disabled = false;
     * ```
     * ```JSON
     * {
     *   // ...
     *   "xAxes": [{
     *     // ...
     *     "renderer": {
     *       "axisFills": {
     *         "disabled": false
     *       }
     *     }
     *   }]
     * }
     * ```
     *
     * @see {@link https://www.amcharts.com/docs/v4/tutorials/alternated-axis-fills/} this tutorial for more info.
     * @return Fill elements
     */
    get: function get() {
      if (!this._axisFills) {
        var fill = this.createFill(this.axis);
        this._axisFills = new _core_utils_List__WEBPACK_IMPORTED_MODULE_8__.ListTemplate(fill);
        fill.applyOnClones = true;
        fill.events.on("enabled", this.invalidateAxisItems, this, false);

        this._disposers.push(new _core_utils_List__WEBPACK_IMPORTED_MODULE_8__.ListDisposer(this._axisFills));

        this._disposers.push(this._axisFills.template);
      }

      return this._axisFills;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Returns a new fill element, suitable for this Axis Renderer type.
   *
   * @return Fill element
   */

  AxisRenderer.prototype.createFill = function (axis) {
    return new _AxisFill__WEBPACK_IMPORTED_MODULE_4__.AxisFill(axis);
  };

  Object.defineProperty(AxisRenderer.prototype, "grid", {
    /**
     * A list of Axis' Grid elements.
     *
     * @return Grid elements
     */
    get: function get() {
      if (!this._grid) {
        var grid = this.createGrid();
        this._grid = new _core_utils_List__WEBPACK_IMPORTED_MODULE_8__.ListTemplate(grid);
        grid.applyOnClones = true;
        grid.events.on("enabled", this.invalidateAxisItems, this, false);

        this._disposers.push(new _core_utils_List__WEBPACK_IMPORTED_MODULE_8__.ListDisposer(this._grid));

        this._disposers.push(this._grid.template);
      }

      return this._grid;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Returns a new grid element, suitable for this Axis Renderer type.
   *
   * @return Grid element
   */

  AxisRenderer.prototype.createGrid = function () {
    return new _Grid__WEBPACK_IMPORTED_MODULE_5__.Grid();
  };

  Object.defineProperty(AxisRenderer.prototype, "ticks", {
    /**
     * A list of Axis' Tick elements.
     *
     * Please note that these are disabled by default. To enable ticks, you'll
     * need to set `disabled` and `strokeOpacity` properties of the tick template.
     *
     * ```TypeScript
     * categoryAxis.renderer.ticks.template.disabled = false;
     * categoryAxis.renderer.ticks.template.strokeOpacity = 0.5;
     * ```
     * ```JavaScript
     * categoryAxis.renderer.ticks.template.disabled = false;
     * categoryAxis.renderer.ticks.template.strokeOpacity = 0.5;
     * ```
     * ```JSON
     * {
     *   // ...
     *   "xAxes": [{
     *     // ...
     *     "renderer": {
     *       "ticks": {
     *         "disabled": false,
     *         "strokeOpacity": 0.5
     *       }
     *     }
     *   }]
     * }
     * ```
     *
     * @return Tick elements
     */
    get: function get() {
      if (!this._ticks) {
        var tick = this.createTick();
        tick.applyOnClones = true;
        tick.isMeasured = false;
        tick.events.on("enabled", this.invalidateAxisItems, this, false);
        this._ticks = new _core_utils_List__WEBPACK_IMPORTED_MODULE_8__.ListTemplate(tick);

        this._disposers.push(new _core_utils_List__WEBPACK_IMPORTED_MODULE_8__.ListDisposer(this._ticks));

        this._disposers.push(this._ticks.template);
      }

      return this._ticks;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Returns a new tick element, suitable for this Axis Renderer type.
   *
   * @return Tick element
   */

  AxisRenderer.prototype.createTick = function () {
    return new _AxisTick__WEBPACK_IMPORTED_MODULE_7__.AxisTick();
  };

  Object.defineProperty(AxisRenderer.prototype, "labels", {
    /**
     * A list of Axis' Label elements.
     *
     * @return Label elements
     */
    get: function get() {
      if (!this._labels) {
        var label = this.createLabel();
        this._labels = new _core_utils_List__WEBPACK_IMPORTED_MODULE_8__.ListTemplate(label);
        label.applyOnClones = true;
        label.events.on("enabled", this.invalidateAxisItems, this, false);

        this._disposers.push(new _core_utils_List__WEBPACK_IMPORTED_MODULE_8__.ListDisposer(this._labels));

        this._disposers.push(this._labels.template);
      }

      return this._labels;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Returns a new label element, suitable for this Axis Renderer type.
   *
   * @return Label element
   */

  AxisRenderer.prototype.createLabel = function () {
    return new _AxisLabel__WEBPACK_IMPORTED_MODULE_6__.AxisLabel();
  };

  Object.defineProperty(AxisRenderer.prototype, "inside", {
    /**
     * @return Labels inside?
     */
    get: function get() {
      return this.getPropertyValue("inside");
    },

    /**
     * Indicates whether Axis' labels and ticks should be drawn inside Plot area.
     *
     * Does not work with all renderers, like AxisRendererRadial.
     *
     * @param value  Labels inside?
     */
    set: function set(value) {
      if (this.setPropertyValue("inside", value)) {
        if (this.axis) {
          this.axis.invalidate();
        }
      }

      if (value) {
        this.width = 0;
        this.height = 0;
      } else {
        this.width = undefined;
        this.height = undefined;
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(AxisRenderer.prototype, "opposite", {
    /**
     * @return Draw axis on opposite side?
     */
    get: function get() {
      return this.getPropertyValue("opposite");
    },

    /**
     * Indicates whether Axis should be drawn on the opposite side of the plot
     * area than it would normally be drawn based on chart's settings.
     *
     * Does not work with all renderers, like [[AxisRendererRadial]] and
     * [[AxisRenderer Circular].
     *
     * @param value  Draw axis on opposite side?
     */
    set: function set(value) {
      this.setPropertyValue("opposite", value);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(AxisRenderer.prototype, "fullWidthTooltip", {
    /**
     * @return Full width tooltip?
     */
    get: function get() {
      return this.getPropertyValue("fullWidthTooltip");
    },

    /**
     * Indicates if Axis tooltip should take the whole width of the axis cell.
     * (between two grid lines)
     *
     * NOTE: this setting is ignored on circular axis types.
     *
     * @param value Full width tooltip?
     */
    set: function set(value) {
      this.setPropertyValue("fullWidthTooltip", value);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(AxisRenderer.prototype, "tooltipLocation", {
    /**
     * @return Tooltip location
     */
    get: function get() {
      return this.getPropertyValue("tooltipLocation");
    },

    /**
     * Location within axis cell to show tooltip on. (0-1)
     *
     * 0 - show at the start
     * 0.5 - show right in the middle
     * 1 - show at the end
     *
     * @param value Tooltip location
     */
    set: function set(value) {
      this.setPropertyValue("tooltipLocation", value);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(AxisRenderer.prototype, "tooltipLocation2", {
    /**
     * @return Tooltip location
     */
    get: function get() {
      return this.getPropertyValue("tooltipLocation2");
    },

    /**
     * Location within secondary axis cell to show tooltip on. (0-1)
     *
     * 0 - show at the start
     * 0.5 - show right in the middle
     * 1 - show at the end
     *
     * @param value Tooltip location
     */
    set: function set(value) {
      this.setPropertyValue("tooltipLocation2", value);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(AxisRenderer.prototype, "cellStartLocation", {
    /**
     * @return Cell start (0-1)
     */
    get: function get() {
      return this.getPropertyValue("cellStartLocation");
    },

    /**
     * Location for the cell start.
     *
     * Normally a "cell" is the whole available width in a category.
     *
     * If there are several clustered column-like series available, the whole
     * space is divided between each clustered column, or column stacks.
     *
     * `cellStartLocation` identifies where, within available space, the actual
     * cell starts.
     *
     * This, together with column series' `width` will affect actual width of
     * columns, and thus gaps between them.
     *
     * This will affect category-like axes only, like [[DateAxis]], or
     * [[CategoryAxis]].
     *
     * This is used to limit a space occupied by series like column.
     *
     * @see {@link https://www.amcharts.com/docs/v4/concepts/axes/positioning-axis-elements/} for more info.
     * @param value Cell start (0-1)
     */
    set: function set(value) {
      if (this.setPropertyValue("cellStartLocation", value)) {
        if (this.axis) {
          this.axis.invalidateSeries();
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(AxisRenderer.prototype, "cellEndLocation", {
    /**
     * @return Cell end (0-1)
     */
    get: function get() {
      return this.getPropertyValue("cellEndLocation");
    },

    /**
     * Location for the cell end.
     *
     * Normally a "cell" is the whole available width in a category.
     *
     * If there are several clustered column-like series available, the whole
     * space is divided between each clustered column, or column stacks.
     *
     * `cellEndLocation` identifies where, within available space, the actual
     * cell ends.
     *
     * This, together with column series' `width` will affect actual width of
     * columns, and thus gaps between them.
     *
     * This will affect category-like axes only, like [[DateAxis]], or
     * [[CategoryAxis]].
     *
     * This is used to limit a space occupied by series like column.
     *
     * @see {@link https://www.amcharts.com/docs/v4/concepts/axes/positioning-axis-elements/} for more info.
     * @param value Cell end (0-1)
     */
    set: function set(value) {
      if (this.setPropertyValue("cellEndLocation", value)) {
        if (this.axis) {
          this.axis.invalidateSeries();
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(AxisRenderer.prototype, "inversed", {
    /**
     * @return Flip axis?
     */
    get: function get() {
      return this.getPropertyValue("inversed");
    },

    /**
     * Indicates if the scale of the axis should be flipped.
     *
     * @param value Flip axis?
     */
    set: function set(value) {
      this.setPropertyValue("inversed", value);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(AxisRenderer.prototype, "minLabelPosition", {
    /**
     * @return Min label position (0-1)
     */
    get: function get() {
      return this.getPropertyValue("minLabelPosition");
    },

    /**
     * Minimum position along the Axis, for labels.
     *
     * Labels, which have their position closer to the start of the Axis, will be
     * automatically hidden.
     *
     * E.g., setting this to 0.05 (5% of total axis length) would hide labels,
     * that would otherwise be drawn very near start of the Axis.
     *
     * This is especially usefull with `inside = true`, or if the chart hasn't
     * got any extra margins.
     *
     * @see {@link https://www.amcharts.com/docs/v4/concepts/axes/positioning-axis-elements/} for more info.
     * @param value  Min label position (0-1)
     */
    set: function set(value) {
      this.setPropertyValue("minLabelPosition", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(AxisRenderer.prototype, "maxLabelPosition", {
    /**
     * @return Max label position (0-1)
     */
    get: function get() {
      return this.getPropertyValue("maxLabelPosition");
    },

    /**
     * Maximum position along the Axis, for labels.
     *
     * Labels, which have their position closer to the and of the Axis, will be
     * automatically hidden.
     *
     * E.g., setting this to 0.95 (95% of total axis length) would hide labels,
     * that would otherwise be drawn very near end of the Axis.
     *
     * This is especially usefull with `inside = true`, or if the chart hasn't
     * got any extra margins.
     *
     * @see {@link https://www.amcharts.com/docs/v4/concepts/axes/positioning-axis-elements/} for more info.
     * @param value  Max label position (0-1)
     */
    set: function set(value) {
      this.setPropertyValue("maxLabelPosition", value, true);
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Copies all settings and related items from another object of the same
   * type.
   *
   * @param source  Source object
   */

  AxisRenderer.prototype.copyFrom = function (source) {
    _super.prototype.copyFrom.call(this, source);

    this.grid.template.copyFrom(source.grid.template);
    this.ticks.template.copyFrom(source.ticks.template);
    this.labels.template.copyFrom(source.labels.template);
    this.axisFills.template.copyFrom(source.axisFills.template);
    this.line.copyFrom(source.line);
    this.baseGrid.copyFrom(source.baseGrid);
  };
  /**
   * @ignore
   */


  AxisRenderer.prototype.toAxisPosition = function (value) {
    return value;
  };
  /**
   * Sets `visibility` property:
   *
   * * `true` - visible
   * * `false` - hidden
   *
   * @param value  true - visible, false - hidden
   * @return Current visibility
   */


  AxisRenderer.prototype.setVisibility = function (value) {
    _super.prototype.setVisibility.call(this, value);

    this.bulletsContainer.visible = value;
  };

  return AxisRenderer;
}(_core_Container__WEBPACK_IMPORTED_MODULE_0__.Container);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_9__.registry.registeredClasses.AxisRenderer = AxisRenderer;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisRendererCircular.js":
/*!****************************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisRendererCircular.js ***!
  \****************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "AxisRendererCircular": () => (/* binding */ AxisRendererCircular)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _AxisRenderer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AxisRenderer */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisRenderer.js");
/* harmony import */ var _AxisFillCircular__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AxisFillCircular */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisFillCircular.js");
/* harmony import */ var _GridCircular__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./GridCircular */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/GridCircular.js");
/* harmony import */ var _AxisLabelCircular__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./AxisLabelCircular */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisLabelCircular.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_utils_Percent__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../core/utils/Percent */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Percent.js");
/* harmony import */ var _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../core/utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
/* harmony import */ var _core_rendering_Path__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../core/rendering/Path */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Path.js");
/* harmony import */ var _core_utils_Utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../core/utils/Utils */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Utils.js");
/* harmony import */ var _core_utils_Type__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../core/utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/* harmony import */ var _AxisBullet__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./AxisBullet */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisBullet.js");
/**
 * Module, defining Axis Renderer for circular axes.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */












/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * A renderer for circular axis.
 */

var AxisRendererCircular =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_11__.__extends)(AxisRendererCircular, _super);
  /**
   * Constructor.
   *
   * @param axis Related axis
   */


  function AxisRendererCircular() {
    var _this = // Init
    _super.call(this) || this;
    /**
     * @ignore
     */


    _this.pixelRadiusReal = 0; // axis.layout = "none"; // does not trigger redraw when size changes

    _this.layout = "none";
    _this.className = "AxisRendererCircular";
    _this.isMeasured = false;
    _this.startAngle = -90;
    _this.endAngle = 270;
    _this.useChartAngles = true;
    _this.radius = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_5__.percent)(100);
    _this.isMeasured = false;
    _this.grid.template.location = 0;
    _this.labels.template.location = 0;
    _this.labels.template.radius = 15;
    _this.ticks.template.location = 0;
    _this.ticks.template.pixelPerfect = false;
    _this.tooltipLocation = 0;
    _this.line.strokeOpacity = 0;

    _this.applyTheme();

    return _this;
  }
  /**
  * @ignore
  */


  AxisRendererCircular.prototype.setAxis = function (axis) {
    var _this = this;

    _super.prototype.setAxis.call(this, axis);

    axis.isMeasured = false; // modify x and y so that tooltip would always be on circle

    var tooltip = axis.tooltip;
    tooltip.adapter.add("dx", function (x, target) {
      var point = _core_utils_Utils__WEBPACK_IMPORTED_MODULE_8__.svgPointToSprite({
        x: target.pixelX,
        y: target.pixelY
      }, _this);
      return _this.pixelRadius * Math.cos(Math.atan2(point.y, point.x)) - point.x;
    });
    tooltip.adapter.add("dy", function (y, target) {
      var point = _core_utils_Utils__WEBPACK_IMPORTED_MODULE_8__.svgPointToSprite({
        x: target.pixelX,
        y: target.pixelY
      }, _this);
      return _this.pixelRadius * Math.sin(Math.atan2(point.y, point.x)) - point.y;
    });
  };
  /**
   * Validates Axis renderer.
   *
   * @ignore Exclude from docs
   */


  AxisRendererCircular.prototype.validate = function () {
    // so that radius would be updated
    if (this.chart && this.chart.invalid) {
      this.chart.validate();
    }

    _super.prototype.validate.call(this);
  };

  Object.defineProperty(AxisRendererCircular.prototype, "axisLength", {
    /**
     * Returns actual length of the Axis, in pixels.
     *
     * @return Length (px)
     */
    get: function get() {
      return 2 * Math.PI * this.pixelRadius;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(AxisRendererCircular.prototype, "radius", {
    /**
     * @return Outer radius
     */
    get: function get() {
      return this.getPropertyValue("radius");
    },

    /**
     * Outer radius of the axis.
     *
     * Can be absolute (px) or relative ([[Percent]]).
     *
     * @param value  Outer radius
     */
    set: function set(value) {
      if (this.setPercentProperty("radius", value, false, false, 10, false)) {
        if (this.axis) {
          this.axis.invalidate();
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(AxisRendererCircular.prototype, "pixelRadius", {
    /**
     * Outer radius in pixels.
     *
     * @return Outer radius (px)
     */
    get: function get() {
      return _core_utils_Utils__WEBPACK_IMPORTED_MODULE_8__.relativeRadiusToValue(this.radius, this.pixelRadiusReal) || 0;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(AxisRendererCircular.prototype, "innerRadius", {
    /**
     * @return Inner radius
     */
    get: function get() {
      var chart = this.chart;
      var innerRadius = this.getPropertyValue("innerRadius");

      if (chart) {
        if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_9__.hasValue(innerRadius)) {
          innerRadius = chart.innerRadius;

          if (innerRadius instanceof _core_utils_Percent__WEBPACK_IMPORTED_MODULE_5__.Percent && chart) {
            innerRadius = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_5__.percent)(innerRadius.value * chart.innerRadiusModifyer * 100);
          }
        } else {
          if (innerRadius instanceof _core_utils_Percent__WEBPACK_IMPORTED_MODULE_5__.Percent && chart) {
            var mr = chart.mr;
            var value = innerRadius.value;
            value = Math.max(mr * value, mr - Math.min(chart.plotContainer.innerHeight, chart.plotContainer.innerWidth)) / mr;
            innerRadius = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_5__.percent)(value * 100);
          }
        }

        return innerRadius;
      }
    },

    /**
     * Inner radius of the axis.
     *
     * Can be absolute (px) or relative ([[Percent]]).
     *
     * @param value  Inner radius
     */
    set: function set(value) {
      if (this.setPercentProperty("innerRadius", value, false, false, 10, false)) {
        if (this.axis) {
          this.axis.invalidate();
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(AxisRendererCircular.prototype, "useChartAngles", {
    /**
     * @return Use chart angles
     */
    get: function get() {
      return this.getPropertyValue("useChartAngles");
    },

    /**
     * Specifies if axis should use its own `startAngle` and `endAngle` or
     * inherit them from relative properties from chart.
     *
     * @default false
     * @param value  Use chart's angles
     */
    set: function set(value) {
      this.setPropertyValue("useChartAngles", value);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(AxisRendererCircular.prototype, "pixelInnerRadius", {
    /**
     * Inner radius in pixels.
     *
     * @return Inner radius (px)
     */
    get: function get() {
      return _core_utils_Utils__WEBPACK_IMPORTED_MODULE_8__.relativeRadiusToValue(this.innerRadius, this.pixelRadiusReal) || 0;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Converts relative position on axis to point coordinates.
   *
   * @param position  Position (0-1)
   * @param position2  Position (0-1) Position on the second axis
   * @return Point
   */

  AxisRendererCircular.prototype.positionToPoint = function (position, position2) {
    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_9__.isNumber(position2)) {
      position2 = 1;
    }

    var coordinate = this.positionToCoordinate(position);
    var angle = this.startAngle + (this.endAngle - this.startAngle) * coordinate / this.axisLength;
    var radius = this.pixelRadius;
    var innerRadius = this.pixelInnerRadius;

    if (this.axisRendererY) {
      var realRadius = _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.fitToRange(this.axisRendererY.positionToCoordinate(position2), 0, Infinity);

      if (realRadius == 0) {
        realRadius = 0.000001;
      }

      var point = {
        x: realRadius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.cos(angle),
        y: realRadius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.sin(angle)
      };
      return point;
    }

    return {
      x: _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.cos(angle) * innerRadius + (radius - innerRadius) * _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.cos(angle) * position2,
      y: _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.sin(angle) * innerRadius + (radius - innerRadius) * _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.sin(angle) * position2
    };
  };
  /**
   * Converts relative position (0-1) on axis to angle in degrees (0-360).
   *
   * @param position  Position (0-1)
   * @return Angle (0-360)
   */


  AxisRendererCircular.prototype.positionToAngle = function (position) {
    var axis = this.axis;
    var arc = (this.endAngle - this.startAngle) / (axis.end - axis.start);
    var angle;

    if (axis.renderer.inversed) {
      angle = this.startAngle + (axis.end - position) * arc;
    } else {
      angle = this.startAngle + (position - axis.start) * arc;
    }

    return _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.round(angle, 3);
  };
  /**
   * Converts angle on axis to relative position(0-1).
   *
   * @param angle Angle in degrees
   * @return Position (0-1)
   */


  AxisRendererCircular.prototype.angleToPosition = function (angle) {
    var axis = this.axis;
    var arc = (this.endAngle - this.startAngle) / (axis.end - axis.start);
    var position;

    if (axis.renderer.inversed) {
      position = axis.end - (angle - this.startAngle) / arc;
    } else {
      position = (angle - this.startAngle) / arc + axis.start;
    }

    return _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.round(position, 5);
  };
  /**
   * Updates and positions the axis line element.
   *
   * @ignore Exclude from docs
   */


  AxisRendererCircular.prototype.updateAxisLine = function () {
    var radius = this.pixelRadius;
    var startAngle = this.startAngle;
    var endAngle = this.endAngle;
    var arc = _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.min(360, endAngle - startAngle);
    this.line.path = _core_rendering_Path__WEBPACK_IMPORTED_MODULE_7__.moveTo({
      x: radius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.cos(startAngle),
      y: radius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.sin(startAngle)
    }) + _core_rendering_Path__WEBPACK_IMPORTED_MODULE_7__.arcTo(startAngle, arc, radius, radius);
  };
  /**
   * Updates and positions a grid element.
   *
   * @ignore Exclude from docs
   * @param grid         Grid element
   * @param position     Starting position
   * @param endPosition  End position
   */


  AxisRendererCircular.prototype.updateGridElement = function (grid, position, endPosition) {
    position = position + (endPosition - position) * grid.location;
    var point = this.positionToPoint(position);

    if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_9__.isNumber(point.x) && _core_utils_Type__WEBPACK_IMPORTED_MODULE_9__.isNumber(point.y) && grid.element) {
      var angle = _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.DEGREES * Math.atan2(point.y, point.x);
      var radius = _core_utils_Utils__WEBPACK_IMPORTED_MODULE_8__.relativeRadiusToValue(_core_utils_Type__WEBPACK_IMPORTED_MODULE_9__.hasValue(grid.radius) ? grid.radius : (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_5__.percent)(100), this.pixelRadius);
      var gridInnerRadius = _core_utils_Utils__WEBPACK_IMPORTED_MODULE_8__.relativeRadiusToValue(grid.innerRadius, this.pixelRadius);
      grid.zIndex = 0;
      var innerRadius = _core_utils_Utils__WEBPACK_IMPORTED_MODULE_8__.relativeRadiusToValue(_core_utils_Type__WEBPACK_IMPORTED_MODULE_9__.isNumber(gridInnerRadius) ? gridInnerRadius : this.innerRadius, this.pixelRadiusReal, true);

      if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_9__.isNumber(innerRadius)) {
        innerRadius = 0;
      }

      grid.path = _core_rendering_Path__WEBPACK_IMPORTED_MODULE_7__.moveTo({
        x: innerRadius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.cos(angle),
        y: innerRadius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.sin(angle)
      }) + _core_rendering_Path__WEBPACK_IMPORTED_MODULE_7__.lineTo({
        x: radius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.cos(angle),
        y: radius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.sin(angle)
      });
    }

    this.toggleVisibility(grid, position, 0, 1);
  };
  /**
   * Updates and positions a tick element.
   *
   * @ignore Exclude from docs
   * @param tick         Tick element
   * @param position     Starting position
   * @param endPosition  End position
   */


  AxisRendererCircular.prototype.updateTickElement = function (tick, position, endPosition) {
    position = position + (endPosition - position) * tick.location;
    var point = this.positionToPoint(position);

    if (tick.element) {
      var radius = this.pixelRadius;
      var angle = _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.DEGREES * Math.atan2(point.y, point.x);
      var tickLength = tick.length;

      if (tick.inside) {
        tickLength = -tickLength;
      }

      tick.zIndex = 1;
      tick.path = _core_rendering_Path__WEBPACK_IMPORTED_MODULE_7__.moveTo({
        x: radius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.cos(angle),
        y: radius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.sin(angle)
      }) + _core_rendering_Path__WEBPACK_IMPORTED_MODULE_7__.lineTo({
        x: (radius + tickLength) * _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.cos(angle),
        y: (radius + tickLength) * _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.sin(angle)
      });
    }

    this.toggleVisibility(tick, position, 0, 1);
  };
  /**
   * Updates and positions axis bullet.
   *
   * @ignore Exclude from docs
   * @param bullet       AxisBullet element
   * @param position     Starting position
   * @param endPosition  End position
   */


  AxisRendererCircular.prototype.updateBullet = function (bullet, position, endPosition) {
    var location = 0.5;

    if (bullet instanceof _AxisBullet__WEBPACK_IMPORTED_MODULE_10__.AxisBullet) {
      location = bullet.location;
    }

    position = position + (endPosition - position) * location;
    var point = this.positionToPoint(position);
    var radius = this.pixelRadius;
    var angle = _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.DEGREES * Math.atan2(point.y, point.x);
    point = {
      x: radius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.cos(angle),
      y: radius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.sin(angle)
    };
    this.positionItem(bullet, point);
    this.toggleVisibility(bullet, position, 0, 1);
  };
  /**
   * Updates and positions a label element.
   *
   * @ignore Exclude from docs
   * @param label        Label element
   * @param position     Starting position
   * @param endPosition  Ending position
   */


  AxisRendererCircular.prototype.updateLabelElement = function (label, position, endPosition, location) {
    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_9__.hasValue(location)) {
      location = label.location;
    }

    position = position + (endPosition - position) * location;
    label.fixPosition(this.positionToAngle(position), this.pixelRadius);
    label.zIndex = 2;
    this.toggleVisibility(label, position, this.minLabelPosition, this.maxLabelPosition);
  };
  /**
   * Checks if point is within bounds of a container.
   *
   * @ignore Exclude from docs
   * @param point Point coordinates
   * @return Fits?
   */


  AxisRendererCircular.prototype.fitsToBounds = function (point) {
    return true;
  };

  Object.defineProperty(AxisRendererCircular.prototype, "startAngle", {
    /**
     * @return Start angle
     */
    get: function get() {
      return this.getPropertyValue("startAngle");
    },

    /**
     * Start angle of the axis in degrees (0-360).
     *
     * @param value  Start angle
     */
    set: function set(value) {
      // do not normalize angel here!
      if (this.setPropertyValue("startAngle", value)) {
        this.invalidateAxisItems();

        if (this.axis) {
          this.axis.invalidateSeries();
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(AxisRendererCircular.prototype, "endAngle", {
    /**
     * @return End angle
     */
    get: function get() {
      return this.getPropertyValue("endAngle");
    },

    /**
     * End angle of the axis in degrees (0-360).
     *
     * @param value  End angle
     */
    set: function set(value) {
      // do not normalize angel here!
      if (this.setPropertyValue("endAngle", value)) {
        this.invalidateAxisItems();

        if (this.axis) {
          this.axis.invalidateSeries();
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  /**
   * [getPositionRangePath description]
   *
   * @ignore Exclude from docs
   * @todo Description
   * @param startPosition  Starting position
   * @param endPosition    End position
   * @return SVG path
   */

  AxisRendererCircular.prototype.getPositionRangePath = function (startPosition, endPosition, radius, innerRadius, cornerRadius) {
    var path = "";

    if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_9__.isNumber(startPosition) && _core_utils_Type__WEBPACK_IMPORTED_MODULE_9__.isNumber(endPosition)) {
      if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_9__.hasValue(radius)) {
        radius = this.radius;
      }

      startPosition = _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.max(startPosition, this.axis.start);
      endPosition = _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.min(endPosition, this.axis.end);

      if (endPosition < startPosition) {
        endPosition = startPosition;
      }

      var pixelRadius = _core_utils_Utils__WEBPACK_IMPORTED_MODULE_8__.relativeRadiusToValue(radius, this.pixelRadius);
      var pixelInnerRadius = _core_utils_Utils__WEBPACK_IMPORTED_MODULE_8__.relativeRadiusToValue(innerRadius, this.pixelRadius, true);
      var startAngle = this.positionToAngle(startPosition);
      var endAngle = this.positionToAngle(endPosition);
      var arc = endAngle - startAngle;
      path = _core_rendering_Path__WEBPACK_IMPORTED_MODULE_7__.arc(startAngle, arc, pixelRadius, pixelInnerRadius, pixelRadius, cornerRadius);
    }

    return path;
  };
  /**
   * Returns a new grid element, suitable for this Axis Renderer type.
   *
   * @return Grid element
   */


  AxisRendererCircular.prototype.createGrid = function () {
    return new _GridCircular__WEBPACK_IMPORTED_MODULE_2__.GridCircular();
  };
  /**
   * Returns a new fill element, suitable for this Axis Renderer type.
   *
   * @return Fill element
   */


  AxisRendererCircular.prototype.createFill = function (axis) {
    return new _AxisFillCircular__WEBPACK_IMPORTED_MODULE_1__.AxisFillCircular(axis);
  };
  /**
   * Returns a new label element, suitable for this Axis Renderer type.
   *
   * @return Label element
   */


  AxisRendererCircular.prototype.createLabel = function () {
    return new _AxisLabelCircular__WEBPACK_IMPORTED_MODULE_3__.AxisLabelCircular();
  };
  /**
   * Converts a point at specific coordinates to a relative position (0-1)
   * on the axis.
   *
   * @param point  Point
   * @return Position (0-1)
   */


  AxisRendererCircular.prototype.pointToPosition = function (point) {
    var angle = _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.fitAngleToRange(_core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.getAngle(point), this.startAngle, this.endAngle);
    return this.coordinateToPosition((angle - this.startAngle) / 360 * this.axisLength);
  };

  return AxisRendererCircular;
}(_AxisRenderer__WEBPACK_IMPORTED_MODULE_0__.AxisRenderer);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_4__.registry.registeredClasses.AxisRendererCircular = AxisRendererCircular;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisRendererRadial.js":
/*!**************************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisRendererRadial.js ***!
  \**************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "AxisRendererRadial": () => (/* binding */ AxisRendererRadial)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _AxisRendererY__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AxisRendererY */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisRendererY.js");
/* harmony import */ var _CategoryAxis__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CategoryAxis */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/CategoryAxis.js");
/* harmony import */ var _core_elements_WavedCircle__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/elements/WavedCircle */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/WavedCircle.js");
/* harmony import */ var _core_utils_Disposer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/utils/Disposer */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Disposer.js");
/* harmony import */ var _core_utils_Percent__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../core/utils/Percent */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Percent.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../core/utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
/* harmony import */ var _core_rendering_Path__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../core/rendering/Path */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Path.js");
/* harmony import */ var _core_utils_Utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../core/utils/Utils */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Utils.js");
/* harmony import */ var _core_utils_Type__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../core/utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/* harmony import */ var _AxisBullet__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./AxisBullet */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisBullet.js");
/**
 * Module, defining Axis Renderer for radial axes.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */












/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * A renderer for radial axis.
 */

var AxisRendererRadial =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_11__.__extends)(AxisRendererRadial, _super);
  /**
   * Constructor.
   *
   * @param axis Related axis
   */


  function AxisRendererRadial() {
    var _this = // Init
    _super.call(this) || this;
    /**
     * A related chart.
     */


    _this._chart = new _core_utils_Disposer__WEBPACK_IMPORTED_MODULE_3__.MutableValueDisposer();
    /**
     * @ignore
     */

    _this.pixelRadiusReal = 0;
    _this.className = "AxisRendererRadial";
    _this.isMeasured = false;
    _this.startAngle = -90;
    _this.endAngle = 270;
    _this.minGridDistance = 30;
    _this.gridType = "circles";
    _this.axisAngle = -90;
    _this.isMeasured = false;
    _this.layout = "none";
    _this.radius = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_4__.percent)(100);
    _this.line.strokeOpacity = 0;
    _this.labels.template.horizontalCenter = "middle";

    _this._disposers.push(_this._chart);

    _this.applyTheme();

    return _this;
  }
  /**
   * Validates Axis renderer.
   *
   * @ignore Exclude from docs
   */


  AxisRendererRadial.prototype.validate = function () {
    // so that radius would be updated
    if (this.chart && this.chart.invalid) {
      this.chart.validate();
    }

    _super.prototype.validate.call(this);
  };

  Object.defineProperty(AxisRendererRadial.prototype, "axisLength", {
    /**
     * Returns actual length of the Axis, in pixels.
     *
     * @return Length (px)
     */
    get: function get() {
      return this.pixelRadius - this.pixelInnerRadius;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(AxisRendererRadial.prototype, "radius", {
    /**
     * @return Outer radius
     */
    get: function get() {
      return this.getPropertyValue("radius");
    },

    /**
     * Outer radius of the axis.
     *
     * Can be absolute (px) or relative ([[Percent]]).
     *
     * @param value  Outer radius
     */
    set: function set(value) {
      this.setPercentProperty("radius", value, false, false, 10, false);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(AxisRendererRadial.prototype, "pixelRadius", {
    /**
     * Outer radius in pixels.
     *
     * @return Outer radius (px)
     */
    get: function get() {
      return _core_utils_Utils__WEBPACK_IMPORTED_MODULE_8__.relativeRadiusToValue(this.radius, this.pixelRadiusReal) || 0;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(AxisRendererRadial.prototype, "innerRadius", {
    /**
     * @return Inner radius
     */
    get: function get() {
      var chart = this.chart;
      var innerRadius = this.getPropertyValue("innerRadius");

      if (chart) {
        if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_9__.hasValue(innerRadius)) {
          innerRadius = chart.innerRadius;

          if (innerRadius instanceof _core_utils_Percent__WEBPACK_IMPORTED_MODULE_4__.Percent && chart) {
            innerRadius = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_4__.percent)(innerRadius.value * chart.innerRadiusModifyer * 100);
          }
        } else {
          if (innerRadius instanceof _core_utils_Percent__WEBPACK_IMPORTED_MODULE_4__.Percent && chart) {
            var mr = chart.mr;
            var value = innerRadius.value;
            value = Math.max(mr * value, mr - Math.min(chart.plotContainer.innerHeight, chart.plotContainer.innerWidth)) / mr;
            innerRadius = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_4__.percent)(value * 100);
          }
        }
      }

      return innerRadius;
    },

    /**
     * Inner radius of the axis.
     *
     * Can be absolute (px) or relative ([[Percent]]).
     *
     * @param value  Outer radius
     */
    set: function set(value) {
      this.setPercentProperty("innerRadius", value, false, false, 10, false);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(AxisRendererRadial.prototype, "pixelInnerRadius", {
    /**
     * Inner radius in pixels.
     *
     * @return Inner radius (px)
     */
    get: function get() {
      return _core_utils_Utils__WEBPACK_IMPORTED_MODULE_8__.relativeRadiusToValue(this.innerRadius, this.pixelRadiusReal) || 0;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Converts relative position on axis to point coordinates.
   *
   * @param position  Position (0-1)
   * @param position2  Position (0-1) Position on the second axis
   * @return Point
   */

  AxisRendererRadial.prototype.positionToPoint = function (position, position2) {
    var radius = _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.fitToRange(this.positionToCoordinate(position), 0, Infinity);
    return {
      x: radius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.cos(this.axisAngle),
      y: radius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.sin(this.axisAngle)
    };
  };
  /**
   * Updates and positions the axis line element.
   *
   * @ignore Exclude from docs
   */


  AxisRendererRadial.prototype.updateAxisLine = function () {
    this.line.path = _core_rendering_Path__WEBPACK_IMPORTED_MODULE_7__.moveTo({
      x: this.pixelInnerRadius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.cos(this.axisAngle),
      y: this.pixelInnerRadius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.sin(this.axisAngle)
    }) + _core_rendering_Path__WEBPACK_IMPORTED_MODULE_7__.lineTo({
      x: this.pixelRadius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.cos(this.axisAngle),
      y: this.pixelRadius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.sin(this.axisAngle)
    });
    var title = this.axis.title;
    title.valign = "none";
    title.horizontalCenter = "middle";
    title.verticalCenter = "bottom";
    title.y = -this.axisLength / 2;
    var rotation = 90;

    if (this.opposite) {
      if (!this.inside) {
        rotation = -90;
      }
    } else {
      if (this.inside) {
        rotation = -90;
      }
    }

    title.rotation = rotation;
  };
  /**
   * Updates and positions a grid element.
   *
   * @ignore Exclude from docs
   * @param grid         Grid element
   * @param position     Starting position
   * @param endPosition  End position
   */


  AxisRendererRadial.prototype.updateGridElement = function (grid, position, endPosition) {
    position = position + (endPosition - position) * grid.location;
    var point = this.positionToPoint(position);
    var path;
    var radius = _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.getDistance(point);
    var startAngle = this.startAngle;
    var endAngle = this.endAngle;
    var chart = this.chart;

    if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_9__.isNumber(radius) && grid.element && chart) {
      var xAxis = chart.xAxes.getIndex(0);
      var count = 0;
      var series = chart.series.getIndex(0);

      if (series) {
        count = series.dataItems.length;
      } // polygons are only possible if x axis is present
      // @todo: review this


      if (this.gridType == "polygons" && count > 0 && series && xAxis && xAxis instanceof _CategoryAxis__WEBPACK_IMPORTED_MODULE_1__.CategoryAxis) {
        var gridLocation = xAxis.renderer.grid.template.location;
        var angle = xAxis.getAngle(series.dataItems.getIndex(0), "categoryX", gridLocation);
        path = _core_rendering_Path__WEBPACK_IMPORTED_MODULE_7__.moveTo({
          x: radius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.cos(angle),
          y: radius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.sin(angle)
        });

        for (var i = 1; i < count; i++) {
          angle = xAxis.getAngle(series.dataItems.getIndex(i), "categoryX", gridLocation);
          path += _core_rendering_Path__WEBPACK_IMPORTED_MODULE_7__.lineTo({
            x: radius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.cos(angle),
            y: radius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.sin(angle)
          });
        }

        angle = xAxis.getAngle(series.dataItems.getIndex(count - 1), "categoryX", xAxis.renderer.cellEndLocation);
        path += _core_rendering_Path__WEBPACK_IMPORTED_MODULE_7__.lineTo({
          x: radius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.cos(angle),
          y: radius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.sin(angle)
        });
      } else {
        path = _core_rendering_Path__WEBPACK_IMPORTED_MODULE_7__.moveTo({
          x: radius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.cos(startAngle),
          y: radius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.sin(startAngle)
        }) + _core_rendering_Path__WEBPACK_IMPORTED_MODULE_7__.arcTo(startAngle, endAngle - startAngle, radius, radius);
      }

      grid.path = path;
    }

    this.toggleVisibility(grid, position, 0, 1);
  };
  /**
   * Updates and positions a label element.
   *
   * @ignore Exclude from docs
   * @param label        Label element
   * @param position     Starting position
   * @param endPosition  Ending position
   */


  AxisRendererRadial.prototype.updateLabelElement = function (label, position, endPosition, location) {
    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_9__.hasValue(location)) {
      location = label.location;
    }

    position = position + (endPosition - position) * location;
    var point = this.positionToPoint(position);
    this.positionItem(label, point);
    this.toggleVisibility(label, position, this.minLabelPosition, this.maxLabelPosition);
  };
  /**
   * Updates and positions the base grid element.
   *
   * @ignore Exclude from docs
   */


  AxisRendererRadial.prototype.updateBaseGridElement = function () {// @todo? zero grid for radar chart, is it needed?
  };
  /**
   * Checks if point is within bounds of a container.
   *
   * @ignore Exclude from docs
   * @param point Point coordinates
   * @return Fits?
   */


  AxisRendererRadial.prototype.fitsToBounds = function (point) {
    return true;
  };

  Object.defineProperty(AxisRendererRadial.prototype, "startAngle", {
    /**
     * @return Start angle
     */
    get: function get() {
      return this.getPropertyValue("startAngle");
    },

    /**
     * Start angle of the axis in degrees. (0-360)
     *
     * @param value  Start angle
     */
    set: function set(value) {
      // do not normalize angle here!
      if (this.setPropertyValue("startAngle", value)) {
        this.invalidateAxisItems();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(AxisRendererRadial.prototype, "endAngle", {
    /**
     * @return End angle
     */
    get: function get() {
      return this.getPropertyValue("endAngle");
    },

    /**
     * End angle of the axis in degrees. (0-360)
     *
     * @param value  End angle
     */
    set: function set(value) {
      // do not normalize angel here!
      if (this.setPropertyValue("endAngle", value)) {
        this.invalidateAxisItems();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(AxisRendererRadial.prototype, "axisAngle", {
    /**
     * @return Axis angle
     */
    get: function get() {
      return this.getPropertyValue("axisAngle"); //return $math.fitToRange(this.getPropertyValue("axisAngle"), this.startAngle, this.endAngle); // no good, as less flexible
    },

    /**
     * Angle of the radial axis in degrees. (0-360)
     *
     * @param value  Axis angle
     */
    set: function set(value) {
      this.setPropertyValue("axisAngle", _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.normalizeAngle(value));
      this.invalidateAxisItems();
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(AxisRendererRadial.prototype, "gridType", {
    /**
     * Grid type
     */
    get: function get() {
      var axis = this.chart.xAxes.getIndex(0);

      if (axis instanceof _CategoryAxis__WEBPACK_IMPORTED_MODULE_1__.CategoryAxis) {
        return this.getPropertyValue("gridType");
      } else {
        return "circles";
      }
    },
    // polygons grid type is only possible under these conditions: xAxis is available and it is CategoryAxis, also at least one series should be added to a chart

    /**
     * Grid type for radial axis.
     *
     * A grid on radia axis can either be perfect circles ("circles"), or
     * straight lines ("polygons").
     *
     * @default "circles"
     * @param value  Grid type
     */
    set: function set(value) {
      this.setPropertyValue("gridType", value, true);
    },
    enumerable: true,
    configurable: true
  });
  /**
   * [getPositionRangePath description]
   *
   * @ignore Exclude from docs
   * @todo Description
   * @param startPosition  Starting position
   * @param endPosition    End position
   * @return SVG path
   */

  AxisRendererRadial.prototype.getPositionRangePath = function (startPosition, endPosition) {
    var pixelInnerRadius = this.pixelInnerRadius;
    var pixelRadius = this.axisLength + pixelInnerRadius;
    var innerRadius = _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.fitToRange(this.positionToCoordinate(startPosition), pixelInnerRadius, pixelRadius);
    var radius = _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.fitToRange(this.positionToCoordinate(endPosition), pixelInnerRadius, pixelRadius); //let angleCount: number = this.angleCount;

    var startAngle = this.startAngle;
    var endAngle = this.endAngle;
    var arc = endAngle - startAngle;
    var path;
    var chart = this.chart;
    var xAxis = chart.xAxes.getIndex(0);
    var series = chart.series.getIndex(0);
    var count = 0;

    if (series) {
      count = series.dataItems.length;
    } // polygons are only possible if x axis is present
    // @todo: review this


    if (this.gridType == "polygons" && count > 0 && series && xAxis && xAxis instanceof _CategoryAxis__WEBPACK_IMPORTED_MODULE_1__.CategoryAxis) {
      var gridLocation = xAxis.renderer.grid.template.location;
      var angle = xAxis.getAngle(series.dataItems.getIndex(0), "categoryX", gridLocation);
      path = _core_rendering_Path__WEBPACK_IMPORTED_MODULE_7__.moveTo({
        x: radius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.cos(angle),
        y: radius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.sin(angle)
      });

      for (var i = 1; i < count; i++) {
        angle = xAxis.getAngle(series.dataItems.getIndex(i), "categoryX", gridLocation);
        path += _core_rendering_Path__WEBPACK_IMPORTED_MODULE_7__.lineTo({
          x: radius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.cos(angle),
          y: radius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.sin(angle)
        });
      }

      angle = xAxis.getAngle(series.dataItems.getIndex(count - 1), "categoryX", xAxis.renderer.cellEndLocation);
      path += _core_rendering_Path__WEBPACK_IMPORTED_MODULE_7__.lineTo({
        x: radius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.cos(angle),
        y: radius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.sin(angle)
      });
      path += _core_rendering_Path__WEBPACK_IMPORTED_MODULE_7__.moveTo({
        x: innerRadius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.cos(angle),
        y: innerRadius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.sin(angle)
      });

      for (var i = count - 1; i >= 0; i--) {
        angle = xAxis.getAngle(series.dataItems.getIndex(i), "categoryX", gridLocation);
        path += _core_rendering_Path__WEBPACK_IMPORTED_MODULE_7__.lineTo({
          x: innerRadius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.cos(angle),
          y: innerRadius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.sin(angle)
        });
      }
    } else {
      path = _core_rendering_Path__WEBPACK_IMPORTED_MODULE_7__.arc(startAngle, arc, radius, innerRadius);
    }

    return path;
  };
  /**
   * Updates and positions an axis break element.
   *
   * @ignore Exclude from docs
   * @param axisBreak Break element
   */


  AxisRendererRadial.prototype.updateBreakElement = function (axisBreak) {
    // @todo: someday we might need axis break when gridType is polygons
    var startLine = axisBreak.startLine;
    var endLine = axisBreak.endLine;
    var fillShape = axisBreak.fillShape;
    var startPoint = axisBreak.startPoint;
    var endPoint = axisBreak.endPoint;
    startLine.radius = Math.abs(startPoint.y);
    endLine.radius = Math.abs(endPoint.y);
    fillShape.radius = Math.abs(endPoint.y);
    fillShape.innerRadius = Math.abs(startPoint.y);
  };
  /**
   * Creates visual elements for and axis break.
   *
   * @ignore Exclude from docs
   * @param axisBreak Axis break
   */


  AxisRendererRadial.prototype.createBreakSprites = function (axisBreak) {
    axisBreak.startLine = new _core_elements_WavedCircle__WEBPACK_IMPORTED_MODULE_2__.WavedCircle();
    axisBreak.endLine = new _core_elements_WavedCircle__WEBPACK_IMPORTED_MODULE_2__.WavedCircle();
    axisBreak.fillShape = new _core_elements_WavedCircle__WEBPACK_IMPORTED_MODULE_2__.WavedCircle();
  };
  /**
   * Updates some of the Axis tooltip's visual properties, related to
   * rendering of the Axis.
   *
   * @todo Description (review)
   * @ignore Exclude from docs
   */


  AxisRendererRadial.prototype.updateTooltip = function () {
    var axis = this.axis;

    if (axis) {
      var bigNum = 4000;
      var bbx = -4000;
      var bby = -4000;
      var bbw = bigNum * 2;
      var bbh = bigNum * 2;
      var axisAngle = this.axisAngle;

      if (axisAngle < 0) {
        axisAngle += 360;
      }

      var tooltipOrientation = "vertical";

      if (axisAngle > 45 && axisAngle < 135 || axisAngle > 225 && axisAngle < 315) {
        tooltipOrientation = "horizontal";
      }

      this.axis.updateTooltip(tooltipOrientation, {
        x: bbx,
        y: bby,
        width: bbw,
        height: bbh
      });
    }
  };
  /**
   * Updates and positions a tick element.
   *
   * @ignore Exclude from docs
   * @param tick      Tick element
   * @param position  Position
   */


  AxisRendererRadial.prototype.updateTickElement = function (tick, position, endPosition) {
    position = position + (endPosition - position) * tick.location;
    var point = this.positionToPoint(position);

    if (tick.element) {
      var angle = _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.normalizeAngle(this.axisAngle + 90);

      if (angle / 90 != Math.round(angle / 90)) {
        tick.pixelPerfect = false;
      } else {
        tick.pixelPerfect = true;
      }

      var tickLength = -tick.length;

      if (tick.inside) {
        tickLength *= -1;
      }

      tick.path = _core_rendering_Path__WEBPACK_IMPORTED_MODULE_7__.moveTo({
        x: 0,
        y: 0
      }) + _core_rendering_Path__WEBPACK_IMPORTED_MODULE_7__.lineTo({
        x: tickLength * _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.cos(angle),
        y: tickLength * _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.sin(angle)
      });
    }

    this.positionItem(tick, point);
    this.toggleVisibility(tick, position, 0, 1);
  };
  /**
   * Updates and positions axis bullet.
   *
   * @ignore Exclude from docs
   * @param bullet       AxisBullet element
   * @param position     Starting position
   * @param endPosition  End position
   */


  AxisRendererRadial.prototype.updateBullet = function (bullet, position, endPosition) {
    var location = 0.5;

    if (bullet instanceof _AxisBullet__WEBPACK_IMPORTED_MODULE_10__.AxisBullet) {
      location = bullet.location;
    }

    position = position + (endPosition - position) * location;
    var point = this.positionToPoint(position);
    this.positionItem(bullet, point);
    this.toggleVisibility(bullet, position, 0, 1);
  };
  /**
   * Converts a position on the axis to a coordinate in pixels.
   *
   * @ignore Exclude from docs
   * @param position  Position (0-1)
   * @return Coordinate (px)
   */


  AxisRendererRadial.prototype.positionToCoordinate = function (position) {
    var coordinate;
    var axis = this.axis;
    var axisFullLength = axis.axisFullLength;
    var innerRadius = this.pixelInnerRadius;

    if (axis.renderer.inversed) {
      coordinate = (axis.end - position) * axisFullLength + innerRadius;
    } else {
      coordinate = (position - axis.start) * axisFullLength + innerRadius;
    }

    return _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.round(coordinate, 1);
  };
  /**
   * Converts a point at specific coordinates to a relative position (0-1)
   * on the axis.
   *
   * @param point  Point
   * @return Position (0-1)
   */


  AxisRendererRadial.prototype.pointToPosition = function (point) {
    var coordinate = _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.getDistance(point) - this.pixelInnerRadius;
    return this.coordinateToPosition(coordinate);
  };

  Object.defineProperty(AxisRendererRadial.prototype, "chart", {
    /**
     * @ignore Exclude from docs
     * @return Chart
     */
    get: function get() {
      return this._chart.get();
    },

    /**
     * A chart, associated with the Axis.
     *
     * @ignore Exclude from docs
     * @param value  Chart
     */
    set: function set(value) {
      this._chart.set(value, null);
    },
    enumerable: true,
    configurable: true
  });
  return AxisRendererRadial;
}(_AxisRendererY__WEBPACK_IMPORTED_MODULE_0__.AxisRendererY);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_5__.registry.registeredClasses.AxisRendererRadial = AxisRendererRadial;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisRendererX.js":
/*!*********************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisRendererX.js ***!
  \*********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "AxisRendererX": () => (/* binding */ AxisRendererX)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _AxisRenderer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AxisRenderer */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisRenderer.js");
/* harmony import */ var _AxisBullet__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AxisBullet */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisBullet.js");
/* harmony import */ var _core_elements_WavedLine__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/elements/WavedLine */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/WavedLine.js");
/* harmony import */ var _core_elements_WavedRectangle__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/elements/WavedRectangle */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/WavedRectangle.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_utils_Percent__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../core/utils/Percent */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Percent.js");
/* harmony import */ var _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../core/utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
/* harmony import */ var _core_rendering_Path__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../core/rendering/Path */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Path.js");
/* harmony import */ var _core_utils_Utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../core/utils/Utils */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Utils.js");
/* harmony import */ var _core_utils_Type__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../core/utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/* harmony import */ var _core_utils_Responsive__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../core/utils/Responsive */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Responsive.js");
/**
 * Module, defining Axis Renderer for vertical axes.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */












/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * A renderer for horizontal axis.
 *
 * @see {@link IAxisRendererEvents} for a list of available events
 * @see {@link IAxisRendererAdapters} for a list of available Adapters
 */

var AxisRendererX =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_11__.__extends)(AxisRendererX, _super);
  /**
   * Constructor.
   *
   * @param axis Related axis
   */


  function AxisRendererX() {
    var _this = _super.call(this) || this;

    _this.className = "AxisRendererX";
    _this.minGridDistance = 120;
    _this.opposite = false;
    _this.rotation = 0;
    _this.width = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_5__.percent)(100);
    _this.labels.template.horizontalCenter = "middle";

    _this.applyTheme();

    return _this;
  }
  /**
  * @ignore
  */


  AxisRendererX.prototype.setAxis = function (axis) {
    _super.prototype.setAxis.call(this, axis);

    axis.layout = "vertical";
  };
  /**
   * @ignore
   */


  AxisRendererX.prototype.updateGridContainer = function () {
    var axis = this.axis;

    if (axis) {
      var gridContainer = this.gridContainer;
      gridContainer.x = axis.pixelX;
      gridContainer.width = axis.axisLength;
    }
  };
  /**
   * Called when rendered is attached to an Axis, as well as a property of
   * Axis that might affect the appearance is updated.
   *
   * E.g. `axis.opposite`, `axis.inside`, etc.
   *
   * This method is called **before** draw, so that any related setting
   * changed in this method can be changed.
   *
   * @todo Description (review)
   * @ignore Exclude from docs
   */


  AxisRendererX.prototype.processRenderer = function () {
    _super.prototype.processRenderer.call(this); // can not do this in init, as axis is set later


    var axis = this.axis;

    if (axis) {
      if (!(axis.width instanceof _core_utils_Percent__WEBPACK_IMPORTED_MODULE_5__.Percent)) {
        axis.width = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_5__.percent)(100);
      } // @todo Is thi sneeded?


      _core_utils_Utils__WEBPACK_IMPORTED_MODULE_8__.used(this.line);
      var title = axis.title;
      title.rotation = 0;
      title.align = "center";

      if (this.opposite) {
        this.line.toFront();
        title.toBack();
      } else {
        title.toFront();
        this.toBack();
        this.line.toBack();
      }
    }
  };
  /**
   * Updates some of the Axis tooltip's visual properties, related to
   * rendering of the Axis.
   *
   * @todo Description (review)
   * @ignore Exclude from docs
   */


  AxisRendererX.prototype.updateTooltip = function () {
    var axis = this.axis;

    if (axis) {
      var bigNum = 1000;
      var bbx = this.line.pixelX;
      var bby = this.line.pixelY;
      var bbw = this.axisLength;
      var bbh = bigNum; // top

      if (this.opposite) {
        if (!this.inside) {
          bby = -bigNum;
          bbh = bigNum;
        }
      } // bottom
      else {
        if (this.inside) {
          bby = -bigNum;
          bbh = bigNum;
        }
      }

      this.axis.updateTooltip("vertical", {
        x: bbx,
        y: bby,
        width: bbw,
        height: bbh
      });
    }
  };
  /**
   * Updates and positions a label element.
   *
   * @ignore Exclude from docs
   * @param label        Label element
   * @param position     Starting position
   * @param endPosition  Ending position
   */


  AxisRendererX.prototype.updateLabelElement = function (label, position, endPosition, location) {
    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_9__.hasValue(location)) {
      location = label.location;
    }

    position = position + (endPosition - position) * location;
    var point = this.positionToPoint(position);
    label.isMeasured = !label.inside;
    var deltaY = 0;
    var verticalCenter;
    var maxHeight = this.gridContainer.maxHeight;

    if (this.opposite) {
      if (label.inside) {
        verticalCenter = "top";

        if (label.valign == "bottom") {
          deltaY = maxHeight;
          verticalCenter = "bottom";
        }

        if (label.valign == "middle") {
          deltaY = maxHeight / 2;
          verticalCenter = "middle";
        }
      } else {
        verticalCenter = "bottom";
      }

      point.y = deltaY;
    } else {
      if (label.inside) {
        verticalCenter = "bottom";

        if (label.valign == "top") {
          deltaY = -maxHeight;
          verticalCenter = "top";
        }

        if (label.valign == "middle") {
          deltaY = -maxHeight / 2;
          verticalCenter = "middle";
        }
      } else {
        verticalCenter = "top";
      }

      point.y += deltaY;
    }

    if (label.rotation == 0) {
      // Apply fuzzy logic to verticalCenter only if labels are not rotated
      label.verticalCenter = verticalCenter;
    }

    this.positionItem(label, point);
    this.toggleVisibility(label, position, this.minLabelPosition, this.maxLabelPosition);
  };

  Object.defineProperty(AxisRendererX.prototype, "axisLength", {
    /**
     * Returns actual length of the Axis, in pixels.
     *
     * @return Length (px)
     */
    get: function get() {
      var axis = this.axis;
      return axis.measuredWidth - axis.pixelPaddingRight - axis.pixelPaddingLeft || 0;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Converts relative position on axis to point coordinates.
   *
   * @param position  Position (0-1)
   * @param position2  Position (0-1) Position on the second axis
   * @return Point
   */

  AxisRendererX.prototype.positionToPoint = function (position, position2) {
    return {
      x: this.positionToCoordinate(position),
      y: 0
    };
  };
  /**
   * Converts a point at specific coordinates to a relative position (0-1)
   * on the axis.
   *
   * @param point  Point
   * @return Position (0-1)
   */


  AxisRendererX.prototype.pointToPosition = function (point) {
    return this.coordinateToPosition(point.x, point.y);
  };
  /**
   * [getPositionRangePath description]
   *
   * @ignore Exclude from docs
   * @todo Description
   * @param startPosition  Starting position
   * @param endPosition    End position
   * @return SVG path
   */


  AxisRendererX.prototype.getPositionRangePath = function (startPosition, endPosition) {
    var x1 = _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.fitToRange(this.positionToCoordinate(startPosition), 0, this.axisLength);
    var x2 = _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.fitToRange(this.positionToCoordinate(endPosition), 0, this.axisLength);
    var w = Math.abs(x2 - x1);
    var h = this.getHeight();
    var x = Math.min(x1, x2);
    var y = 0;
    return _core_rendering_Path__WEBPACK_IMPORTED_MODULE_7__.rectToPath({
      x: x,
      y: y,
      width: w,
      height: h
    }, true);
  };
  /**
   * Updates and positions an axis break element.
   *
   * @ignore Exclude from docs
   * @param axisBreak Break element
   */


  AxisRendererX.prototype.updateBreakElement = function (axisBreak) {
    _super.prototype.updateBreakElement.call(this, axisBreak);

    var startLine = axisBreak.startLine;
    var endLine = axisBreak.endLine;
    var fillShape = axisBreak.fillShape;
    var startPoint = axisBreak.startPoint;
    var endPoint = axisBreak.endPoint;
    var y1 = axisBreak.pixelMarginLeft;
    var y2 = this.getHeight() - axisBreak.pixelMarginTop - axisBreak.pixelMarginBottom;
    startPoint.x = _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.fitToRange(startPoint.x, -1, this.axisLength + 1);
    endPoint.x = _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.fitToRange(endPoint.x, -1, this.axisLength + 1);

    if (startPoint.x == endPoint.x && (startPoint.x < 0 || startPoint.x > this.axisLength)) {
      axisBreak.fillShape.__disabled = true;
    } else {
      axisBreak.fillShape.__disabled = false;
    }

    startLine.y = y1;
    startLine.width = 0;
    startLine.height = y2;
    endLine.y = y1;
    endLine.width = 0;
    endLine.height = y2;
    fillShape.height = y2;
    fillShape.width = Math.abs(endPoint.x - startPoint.x);
    fillShape.y = y1;
    fillShape.x = startPoint.x;
  };
  /**
   * Updates and positions a grid element.
   *
   * @ignore Exclude from docs
   * @param grid         Grid element
   * @param position     Starting position
   * @param endPosition  End position
   */


  AxisRendererX.prototype.updateGridElement = function (grid, position, endPosition) {
    position = position + (endPosition - position) * grid.location;
    var point = this.positionToPoint(position); //point.x = $utils.spritePointToSprite({x:point.x, y:0}, this, this.gridContainer).x;

    grid.path = _core_rendering_Path__WEBPACK_IMPORTED_MODULE_7__.moveTo({
      x: 0,
      y: 0
    }) + _core_rendering_Path__WEBPACK_IMPORTED_MODULE_7__.lineTo({
      x: 0,
      y: this.getHeight()
    });
    this.positionItem(grid, point);
    this.toggleVisibility(grid, position, 0, 1);
  };
  /**
   * Updates and positions a tick element.
   *
   * @ignore Exclude from docs
   * @param tick         Tick element
   * @param position     Starting position
   * @param endPosition  End position
   */


  AxisRendererX.prototype.updateTickElement = function (tick, position, endPosition) {
    position = position + (endPosition - position) * tick.location;
    var point = this.positionToPoint(position);
    var tickLength = tick.length;
    point.y = _core_utils_Utils__WEBPACK_IMPORTED_MODULE_8__.spritePointToSprite({
      x: 0,
      y: this.line.pixelY
    }, this.line.parent, this.gridContainer).y;

    if (this.opposite) {
      tickLength *= tick.inside ? 1 : -1;
    } else {
      tickLength *= tick.inside ? -1 : 1;
    }

    tick.path = _core_rendering_Path__WEBPACK_IMPORTED_MODULE_7__.moveTo({
      x: 0,
      y: 0
    }) + _core_rendering_Path__WEBPACK_IMPORTED_MODULE_7__.lineTo({
      x: 0,
      y: tickLength
    });
    this.positionItem(tick, point);
    this.toggleVisibility(tick, position, 0, 1);
  };
  /**
   * Updates and positions the axis line element.
   *
   * @ignore Exclude from docs
   */


  AxisRendererX.prototype.updateAxisLine = function () {
    this.line.path = _core_rendering_Path__WEBPACK_IMPORTED_MODULE_7__.moveTo({
      x: 0,
      y: 0
    }) + _core_rendering_Path__WEBPACK_IMPORTED_MODULE_7__.lineTo({
      x: this.axisLength,
      y: 0
    });
  };
  /**
   * Updates and positions the base grid element.
   *
   * @ignore Exclude from docs
   */


  AxisRendererX.prototype.updateBaseGridElement = function () {
    _super.prototype.updateBaseGridElement.call(this);

    var axis = this.axis;
    var h = this.getHeight();
    var w = this.axisLength;
    var baseGrid = this.baseGrid;
    var x = axis.basePoint.x;

    if (x < -0.2 || x > w + 0.2) {
      baseGrid.hide(0);
    } else {
      var y = _core_utils_Utils__WEBPACK_IMPORTED_MODULE_8__.spritePointToSprite({
        x: 0,
        y: 0
      }, this.gridContainer, baseGrid.parent).y;
      baseGrid.path = _core_rendering_Path__WEBPACK_IMPORTED_MODULE_7__.moveTo({
        x: 0,
        y: 0
      }) + _core_rendering_Path__WEBPACK_IMPORTED_MODULE_7__.lineTo({
        x: 0,
        y: h
      });
      baseGrid.moveTo({
        x: x,
        y: y
      });
      baseGrid.show(0);
    }
  };
  /**
   * Creates visual elements for and axis break.
   *
   * @ignore Exclude from docs
   * @param axisBreak Axis break
   */


  AxisRendererX.prototype.createBreakSprites = function (axisBreak) {
    axisBreak.startLine = new _core_elements_WavedLine__WEBPACK_IMPORTED_MODULE_2__.WavedLine();
    axisBreak.endLine = new _core_elements_WavedLine__WEBPACK_IMPORTED_MODULE_2__.WavedLine();
    var wavedRectangle = new _core_elements_WavedRectangle__WEBPACK_IMPORTED_MODULE_3__.WavedRectangle();
    wavedRectangle.setWavedSides(false, true, false, true);
    axisBreak.fillShape = wavedRectangle;
  };
  /**
   * @ignore
   */


  AxisRendererX.prototype.toAxisPosition = function (value) {
    var inversedPosition = value;
    var axis = this.axis;

    if (axis) {
      var relativePositionSprite = axis.relativePositionSprite;
      var x = axis.pixelX;

      if (relativePositionSprite) {
        x = _core_utils_Utils__WEBPACK_IMPORTED_MODULE_8__.spritePointToSprite({
          x: this.pixelX,
          y: 0
        }, this.parent, relativePositionSprite).x;
      } else {
        relativePositionSprite = axis.parent;
      }

      if (relativePositionSprite) {
        var relativeX = x / relativePositionSprite.innerWidth;
        var relativeWidth = axis.axisLength / relativePositionSprite.innerWidth;
        return (inversedPosition - relativeX) / relativeWidth;
      }
    }

    return value;
  };
  /**
   * Updates and positions axis bullets.
   *
   * @ignore Exclude from docs
   * @param bullet       AxisBullet element
   * @param position     Starting position
   * @param endPosition  End position
   */


  AxisRendererX.prototype.updateBullet = function (bullet, position, endPosition) {
    var location = 0.5;

    if (bullet instanceof _AxisBullet__WEBPACK_IMPORTED_MODULE_1__.AxisBullet) {
      location = bullet.location;
    }

    position = position + (endPosition - position) * location;
    var point = this.positionToPoint(position);
    point.y = _core_utils_Utils__WEBPACK_IMPORTED_MODULE_8__.spritePointToSprite({
      x: 0,
      y: this.line.pixelY
    }, this.line.parent, this.gridContainer).y;
    this.positionItem(bullet, point);
    this.toggleVisibility(bullet, position, 0, 1);
  };

  return AxisRendererX;
}(_AxisRenderer__WEBPACK_IMPORTED_MODULE_0__.AxisRenderer);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_4__.registry.registeredClasses.AxisRendererX = AxisRendererX;
/**
 * Add default responsive rules
 */

/**
 * Put labels inside plot area.
 * Disable first and last labels.
 */

_core_utils_Responsive__WEBPACK_IMPORTED_MODULE_10__.defaultRules.push({
  relevant: _core_utils_Responsive__WEBPACK_IMPORTED_MODULE_10__.ResponsiveBreakpoints.heightXS,
  state: function state(target, stateId) {
    if (target instanceof AxisRendererX) {
      var state = target.states.create(stateId);
      state.properties.inside = true;
      state.properties.maxLabelPosition = 0.9;
      state.properties.minLabelPosition = 0.1;
      return state;
    }

    return null;
  }
});
/**
 * Disable labels altogather on very small charts
 */

_core_utils_Responsive__WEBPACK_IMPORTED_MODULE_10__.defaultRules.push({
  relevant: _core_utils_Responsive__WEBPACK_IMPORTED_MODULE_10__.ResponsiveBreakpoints.heightXXS,
  state: function state(target, stateId) {
    if (target instanceof AxisRendererX) {
      var state = target.states.create(stateId);
      state.properties.disabled = true;
      return state;
    }

    return null;
  }
});

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisRendererX3D.js":
/*!***********************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisRendererX3D.js ***!
  \***********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "AxisRendererX3D": () => (/* binding */ AxisRendererX3D)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _axes_AxisRendererX__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../axes/AxisRendererX */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisRendererX.js");
/* harmony import */ var _core_utils_Disposer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/utils/Disposer */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Disposer.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_rendering_Path__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/rendering/Path */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Path.js");
/**
 * Module, defining Axis Renderer for horizontal 3D axes.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */





/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Renderer for horizontal 3D axis.
 *
 * @see {@link IAxisRendererX3DEvents} for a list of available events
 * @see {@link IAxisRendererX3DAdapters} for a list of available Adapters
 */

var AxisRendererX3D =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_4__.__extends)(AxisRendererX3D, _super);
  /**
   * Constructor.
   *
   * @param axis Related axis
   */


  function AxisRendererX3D() {
    var _this = _super.call(this) || this;
    /**
     * A related chart.
     *
     * @todo Description
     */


    _this._chart = new _core_utils_Disposer__WEBPACK_IMPORTED_MODULE_1__.MutableValueDisposer();
    _this.className = "AxisRendererX3D";

    _this._disposers.push(_this._chart);

    _this.applyTheme();

    return _this;
  }
  /**
   * Updates and positions a grid element.
   *
   * @ignore Exclude from docs
   * @param grid         Grid element
   * @param position     Starting position
   * @param endPosition  End position
   */


  AxisRendererX3D.prototype.updateGridElement = function (grid, position, endPosition) {
    position = position + (endPosition - position) * grid.location;
    var point = this.positionToPoint(position);

    if (grid.element) {
      var dx = this.chart.dx3D || 0;
      var dy = this.chart.dy3D || 0;
      var h = this.getHeight();
      grid.path = _core_rendering_Path__WEBPACK_IMPORTED_MODULE_3__.moveTo({
        x: dx,
        y: dy
      }) + _core_rendering_Path__WEBPACK_IMPORTED_MODULE_3__.lineTo({
        x: dx,
        y: h + dy
      }) + _core_rendering_Path__WEBPACK_IMPORTED_MODULE_3__.lineTo({
        x: 0,
        y: h
      });
    }

    this.positionItem(grid, point);
    this.toggleVisibility(grid, position, 0, 1);
  };
  /**
   * Updates and positions the base grid element.
   *
   * @ignore Exclude from docs
   */


  AxisRendererX3D.prototype.updateBaseGridElement = function () {
    _super.prototype.updateBaseGridElement.call(this);

    var h = this.getHeight();
    var dx = this.chart.dx3D || 0;
    var dy = this.chart.dy3D || 0;
    this.baseGrid.path = _core_rendering_Path__WEBPACK_IMPORTED_MODULE_3__.moveTo({
      x: dx,
      y: dy
    }) + _core_rendering_Path__WEBPACK_IMPORTED_MODULE_3__.lineTo({
      x: 0,
      y: 0
    }) + _core_rendering_Path__WEBPACK_IMPORTED_MODULE_3__.lineTo({
      x: 0,
      y: h
    });
  };

  Object.defineProperty(AxisRendererX3D.prototype, "chart", {
    /**
     * @ignore Exclude from docs
     * @return Chart
     */
    get: function get() {
      return this._chart.get();
    },

    /**
     * Chart, associated with the Axis.
     *
     * @ignore Exclude from docs
     * @param value Chart
     */
    set: function set(chart) {
      if (chart) {
        this._chart.set(chart, chart.events.on("propertychanged", this.handle3DChanged, this, false));
      }
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Invoked when 3D-related settings change, like depth or angle.
   *
   * @param event Event
   */

  AxisRendererX3D.prototype.handle3DChanged = function (event) {
    if (event.property == "depth" || event.property == "angle") {
      this.invalidate();
    }
  };

  return AxisRendererX3D;
}(_axes_AxisRendererX__WEBPACK_IMPORTED_MODULE_0__.AxisRendererX);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_2__.registry.registeredClasses.AxisRendererX3D = AxisRendererX3D;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisRendererY.js":
/*!*********************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisRendererY.js ***!
  \*********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "AxisRendererY": () => (/* binding */ AxisRendererY)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _AxisRenderer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AxisRenderer */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisRenderer.js");
/* harmony import */ var _core_elements_WavedLine__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/elements/WavedLine */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/WavedLine.js");
/* harmony import */ var _core_elements_WavedRectangle__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/elements/WavedRectangle */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/WavedRectangle.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_utils_Percent__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../core/utils/Percent */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Percent.js");
/* harmony import */ var _core_utils_Math__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../core/utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
/* harmony import */ var _core_rendering_Path__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../core/rendering/Path */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Path.js");
/* harmony import */ var _core_utils_Utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../core/utils/Utils */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Utils.js");
/* harmony import */ var _core_utils_Type__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../core/utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/* harmony import */ var _core_utils_Responsive__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../core/utils/Responsive */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Responsive.js");
/* harmony import */ var _AxisBullet__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./AxisBullet */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisBullet.js");
/**
 * Module, defining Axis Renderer for vertical axes.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */












/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * A renderer for vertical axis.
 *
 * @see {@link IAxisRendererYEvents} for a list of available events
 * @see {@link IAxisRendererYAdapters} for a list of available Adapters
 */

var AxisRendererY =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_11__.__extends)(AxisRendererY, _super);
  /**
   * Constructor.
   *
   * @param axis Related axis
   */


  function AxisRendererY() {
    var _this = _super.call(this) || this;

    _this.className = "AxisRendererY";
    _this.minGridDistance = 40;
    _this.opposite = false;
    _this.height = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_4__.percent)(100);
    _this.labels.template.verticalCenter = "middle";

    _this.applyTheme();

    return _this;
  }
  /**
  * @ignore
  */


  AxisRendererY.prototype.setAxis = function (axis) {
    _super.prototype.setAxis.call(this, axis);

    axis.layout = "horizontal";
  };
  /**
   * @ignore
   */


  AxisRendererY.prototype.updateGridContainer = function () {
    var axis = this.axis;

    if (axis) {
      var gridContainer = this.gridContainer;
      gridContainer.y = axis.pixelY;
      gridContainer.height = axis.axisLength;
    }
  };
  /**
   * @ignore
   */


  AxisRendererY.prototype.toAxisPosition = function (value) {
    var axis = this.axis;

    if (axis) {
      var inversedPosition = 1 - value;
      var relativePositionSprite = axis.relativePositionSprite;
      var y = axis.pixelY;

      if (relativePositionSprite) {
        y = _core_utils_Utils__WEBPACK_IMPORTED_MODULE_7__.spritePointToSprite({
          x: 0,
          y: this.pixelY
        }, this.parent, relativePositionSprite).y;
      } else {
        relativePositionSprite = axis.parent;
      }

      if (relativePositionSprite) {
        var relativeY = y / relativePositionSprite.innerHeight;
        var relativeHeight = axis.axisLength / relativePositionSprite.innerHeight;
        return 1 - (inversedPosition - relativeY) / relativeHeight;
      }
    }

    return value;
  };
  /**
   * Called when rendered is attached to an Axis, as well as a property of
   * Axis that might affect the appearance is updated.
   *
   * E.g. `axis.opposite`, `axis.inside`, etc.
   *
   * This method is called **before** draw, so that any related setting
   * changed in this method can be changed.
   *
   * @todo Description (review)
   * @ignore Exclude from docs
   */


  AxisRendererY.prototype.processRenderer = function () {
    _super.prototype.processRenderer.call(this);

    var axis = this.axis;

    if (axis) {
      var title = axis.title;
      title.valign = "middle";

      if (!(axis.height instanceof _core_utils_Percent__WEBPACK_IMPORTED_MODULE_4__.Percent)) {
        axis.height = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_4__.percent)(100);
      }

      if (this.opposite) {
        title.rotation = 90;
        this.line.toBack();
        title.toFront();
      } else {
        title.rotation = -90;
        title.toBack();
        this.line.toFront();
      }
    }
  };
  /**
   * Updates some of the Axis tooltip's visual properties, related to
   * rendering of the Axis.
   *
   * @todo Description (review)
   * @ignore Exclude from docs
   */


  AxisRendererY.prototype.updateTooltip = function () {
    var axis = this.axis;

    if (axis) {
      var bigNum = 2000;
      var bbx = 0;
      var bby = 0;
      var bbw = bigNum;
      var bbh = this.axisLength; // right

      if (this.opposite) {
        if (this.inside) {
          bbx = -bigNum;
          bbw = bigNum;
        }
      } // left
      else {
        if (!this.inside) {
          bbx = -bigNum;
          bbw = bigNum;
        }
      }

      this.axis.updateTooltip("horizontal", {
        x: bbx,
        y: bby,
        width: bbw,
        height: bbh
      });
    }
  };

  Object.defineProperty(AxisRendererY.prototype, "axisLength", {
    /**
     * Returns actual length of the Axis, in pixels.
     *
     * @return Length (px)
     */
    get: function get() {
      var axis = this.axis;
      return axis.measuredHeight - axis.pixelPaddingTop - axis.pixelPaddingBottom || 0;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Converts relative position on axis to point coordinates.
   *
   * @param position  Position (0-1)
   * @param position2  Position (0-1) Position on the second axis
   * @return Point
   */

  AxisRendererY.prototype.positionToPoint = function (position, position2) {
    return {
      x: 0,
      y: this.positionToCoordinate(position)
    };
  };
  /**
   * Converts a point at specific coordinates to a relative position (0-1)
   * on the axis.
   *
   * @param point  Point
   * @return Position (0-1)
   */


  AxisRendererY.prototype.pointToPosition = function (point) {
    return this.coordinateToPosition(point.y, point.x);
  };
  /**
   * Converts a coordinate in pixels to a relative position. (0-1)
   *
   * @param coordinate  Coordinate (px)
   * @param coordinate2  Coordinate of a second axis, only needed for complex axes systems, like timeline (px)
   * @return Position (0-1)
   */


  AxisRendererY.prototype.coordinateToPosition = function (coordinate, coordinate2) {
    var position;
    var axis = this.axis;
    var axisFullLength = axis.axisFullLength;

    if (axis.renderer.inversed) {
      position = 1 - axis.start - coordinate / axisFullLength;
    } else {
      position = coordinate / axisFullLength + (1 - axis.end);
    }

    return _core_utils_Math__WEBPACK_IMPORTED_MODULE_5__.round(position, 5);
  };
  /**
   * [getPositionRangePath description]
   *
   * @ignore Exclude from docs
   * @todo Description
   * @param startPosition  Starting position
   * @param endPosition    End position
   * @return SVG path
   */


  AxisRendererY.prototype.getPositionRangePath = function (startPosition, endPosition) {
    var y1 = _core_utils_Math__WEBPACK_IMPORTED_MODULE_5__.fitToRange(this.positionToCoordinate(startPosition), 0, this.axisLength);
    var y2 = _core_utils_Math__WEBPACK_IMPORTED_MODULE_5__.fitToRange(this.positionToCoordinate(endPosition), 0, this.axisLength);
    var h = Math.abs(y2 - y1);
    var w = this.getWidth();
    var y = Math.min(y1, y2);
    var x = 0;
    return _core_rendering_Path__WEBPACK_IMPORTED_MODULE_6__.rectToPath({
      x: x,
      y: y,
      width: w,
      height: h
    }, true);
  };
  /**
   * Updates and positions a grid element.
   *
   * @ignore Exclude from docs
   * @param grid         Grid element
   * @param position     Starting position
   * @param endPosition  End position
   */


  AxisRendererY.prototype.updateGridElement = function (grid, position, endPosition) {
    position = position + (endPosition - position) * grid.location;
    var point = this.positionToPoint(position); //	point.y = $utils.spritePointToSprite({ x: 0, y: point.y }, this, this.gridContainer).y;

    grid.path = _core_rendering_Path__WEBPACK_IMPORTED_MODULE_6__.moveTo({
      x: 0,
      y: 0
    }) + _core_rendering_Path__WEBPACK_IMPORTED_MODULE_6__.lineTo({
      x: this.getWidth(),
      y: 0
    });
    this.positionItem(grid, point);
    this.toggleVisibility(grid, position, 0, 1);
  };
  /**
   * Updates and positions a tick element.
   *
   * @ignore Exclude from docs
   * @param tick         Tick element
   * @param position     Starting position
   * @param endPosition  End position
   */


  AxisRendererY.prototype.updateTickElement = function (tick, position, endPosition) {
    position = position + (endPosition - position) * tick.location;
    var point = this.positionToPoint(position);
    var tickLength = tick.length;

    try {
      _core_utils_Utils__WEBPACK_IMPORTED_MODULE_7__.used(this.axis.title.measuredWidth);
    } catch (_a) {// void
    }

    point.x = _core_utils_Utils__WEBPACK_IMPORTED_MODULE_7__.spritePointToSprite({
      x: this.line.pixelX,
      y: 0
    }, this.line.parent, this.gridContainer).x;

    if (!this.opposite) {
      tickLength *= tick.inside ? 1 : -1;
    } else {
      tickLength *= tick.inside ? -1 : 1;
    }

    tick.path = _core_rendering_Path__WEBPACK_IMPORTED_MODULE_6__.moveTo({
      x: 0,
      y: 0
    }) + _core_rendering_Path__WEBPACK_IMPORTED_MODULE_6__.lineTo({
      x: tickLength,
      y: 0
    });
    this.positionItem(tick, point);
    this.toggleVisibility(tick, position, 0, 1);
  };
  /**
   * Updates and positions the axis line element.
   *
   * @ignore Exclude from docs
   */


  AxisRendererY.prototype.updateAxisLine = function () {
    this.line.path = _core_rendering_Path__WEBPACK_IMPORTED_MODULE_6__.moveTo({
      x: 0,
      y: 0
    }) + _core_rendering_Path__WEBPACK_IMPORTED_MODULE_6__.lineTo({
      x: 0,
      y: this.axisLength
    });
  };
  /**
   * Updates and positions the base grid element.
   *
   * @ignore Exclude from docs
   */


  AxisRendererY.prototype.updateBaseGridElement = function () {
    _super.prototype.updateBaseGridElement.call(this);

    var axis = this.axis;
    var w = this.getWidth();
    var h = this.axisLength;
    var y = axis.basePoint.y;
    var baseGrid = this.baseGrid;

    if (y < -0.2 || y > h + 0.2) {
      baseGrid.hide(0);
    } else {
      var x = _core_utils_Utils__WEBPACK_IMPORTED_MODULE_7__.spritePointToSprite({
        x: 0,
        y: 0
      }, this.gridContainer, baseGrid.parent).x;
      baseGrid.path = _core_rendering_Path__WEBPACK_IMPORTED_MODULE_6__.moveTo({
        x: 0,
        y: 0
      }) + _core_rendering_Path__WEBPACK_IMPORTED_MODULE_6__.lineTo({
        x: w,
        y: 0
      });
      baseGrid.moveTo({
        x: x,
        y: y
      });
      baseGrid.show(0);
    }
  };
  /**
   * Updates and positions a label element.
   *
   * @ignore Exclude from docs
   * @param label        Label element
   * @param position     Starting position
   * @param endPosition  Ending position
   */


  AxisRendererY.prototype.updateLabelElement = function (label, position, endPosition, location) {
    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.hasValue(location)) {
      location = label.location;
    }

    position = position + (endPosition - position) * location;
    label.isMeasured = !label.inside;
    var point = this.positionToPoint(position);
    var horizontalCenter;
    var deltaX = 0;
    var maxWidth = this.gridContainer.maxWidth;

    if (this.opposite) {
      if (label.inside) {
        horizontalCenter = "right";

        if (label.align == "left") {
          deltaX = -maxWidth;
          horizontalCenter = "left";
        }

        if (label.align == "center") {
          deltaX = -maxWidth / 2;
          horizontalCenter = "middle";
        }
      } else {
        horizontalCenter = "left";
      }

      point.x = 0 + deltaX;
    } else {
      if (label.inside) {
        horizontalCenter = "left";

        if (label.align == "right") {
          deltaX = maxWidth;
          horizontalCenter = "right";
        }

        if (label.align == "center") {
          deltaX = maxWidth / 2;
          horizontalCenter = "middle";
        }
      } else {
        horizontalCenter = "right";
      }

      point.x = this.measuredWidth + deltaX;
    }

    if (label.rotation == 0) {
      // Apply fuzzy logic to verticalCenter only if labels are not rotated
      label.horizontalCenter = horizontalCenter;
    }

    this.positionItem(label, point);
    this.toggleVisibility(label, position, this.minLabelPosition, this.maxLabelPosition);
  };
  /**
   * Updates and positions an axis break element.
   *
   * @ignore Exclude from docs
   * @param axisBreak Break element
   */


  AxisRendererY.prototype.updateBreakElement = function (axisBreak) {
    _super.prototype.updateBreakElement.call(this, axisBreak);

    var startLine = axisBreak.startLine;
    var endLine = axisBreak.endLine;
    var fillShape = axisBreak.fillShape;
    var startPoint = axisBreak.startPoint;
    var endPoint = axisBreak.endPoint;
    var x1 = axisBreak.pixelMarginLeft;
    var x2 = this.getWidth() - axisBreak.pixelMarginLeft - axisBreak.pixelMarginRight;
    startPoint.y = _core_utils_Math__WEBPACK_IMPORTED_MODULE_5__.fitToRange(startPoint.y, -1, this.axisLength + 1);
    endPoint.y = _core_utils_Math__WEBPACK_IMPORTED_MODULE_5__.fitToRange(endPoint.y, -1, this.axisLength + 1);

    if (startPoint.y == endPoint.y && (startPoint.y < 0 || startPoint.y > this.axisLength)) {
      axisBreak.fillShape.__disabled = true;
    } else {
      axisBreak.fillShape.__disabled = false;
    }

    var w = Math.abs(x2 - x1);
    startLine.x = x1;
    startLine.height = 0;
    startLine.width = w;
    endLine.x = x1;
    endLine.height = 0;
    endLine.width = w;
    fillShape.width = w;
    fillShape.height = Math.abs(endPoint.y - startPoint.y);
    fillShape.x = x1;
    fillShape.y = endPoint.y;
  };
  /**
   * Creates visual elements for and axis break.
   *
   * @ignore Exclude from docs
   * @param axisBreak Axis break
   */


  AxisRendererY.prototype.createBreakSprites = function (axisBreak) {
    axisBreak.startLine = new _core_elements_WavedLine__WEBPACK_IMPORTED_MODULE_1__.WavedLine();
    axisBreak.endLine = new _core_elements_WavedLine__WEBPACK_IMPORTED_MODULE_1__.WavedLine();
    var wavedRectangle = new _core_elements_WavedRectangle__WEBPACK_IMPORTED_MODULE_2__.WavedRectangle();
    wavedRectangle.setWavedSides(true, false, true, false);
    axisBreak.fillShape = wavedRectangle;
  };
  /**
   * Converts a position on the axis to a coordinate in pixels.
   *
   * @ignore Exclude from docs
   * @param position  Position (0-1)
   * @return Coordinate (px)
   */


  AxisRendererY.prototype.positionToCoordinate = function (position) {
    var coordinate;
    var axis = this.axis;
    var axisFullLength = axis.axisFullLength;

    if (!axis.renderer.inversed) {
      coordinate = (axis.end - position) * axisFullLength;
    } else {
      coordinate = (position - axis.start) * axisFullLength;
    }

    return coordinate;
  };
  /**
   * Updates and positions axis bullets.
   *
   * @ignore Exclude from docs
   * @param bullet       AxisBullet element
   * @param position     Starting position
   * @param endPosition  End position
   */


  AxisRendererY.prototype.updateBullet = function (bullet, position, endPosition) {
    var location = 0.5;

    if (bullet instanceof _AxisBullet__WEBPACK_IMPORTED_MODULE_10__.AxisBullet) {
      location = bullet.location;
    }

    position = position + (endPosition - position) * location;
    var point = this.positionToPoint(position);
    point.x = _core_utils_Utils__WEBPACK_IMPORTED_MODULE_7__.spritePointToSprite({
      x: this.line.pixelX,
      y: 0
    }, this.line.parent, this.gridContainer).x;
    this.positionItem(bullet, point);
    this.toggleVisibility(bullet, position, 0, 1);
  };

  return AxisRendererY;
}(_AxisRenderer__WEBPACK_IMPORTED_MODULE_0__.AxisRenderer);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_3__.registry.registeredClasses.AxisRendererY = AxisRendererY;
/**
 * Add default responsive rules
 */

/**
 * Put labels inside plot area.
 * Disable first and last labels.
 */

_core_utils_Responsive__WEBPACK_IMPORTED_MODULE_9__.defaultRules.push({
  relevant: _core_utils_Responsive__WEBPACK_IMPORTED_MODULE_9__.ResponsiveBreakpoints.widthS,
  state: function state(target, stateId) {
    if (target instanceof AxisRendererY) {
      var state = target.states.create(stateId);
      state.properties.inside = true;
      state.properties.maxLabelPosition = 0.9;
      state.properties.minLabelPosition = 0.1;
      return state;
    }

    return null;
  }
});
/**
 * Disable labels altogather on very small charts
 */

_core_utils_Responsive__WEBPACK_IMPORTED_MODULE_9__.defaultRules.push({
  relevant: _core_utils_Responsive__WEBPACK_IMPORTED_MODULE_9__.ResponsiveBreakpoints.widthXS,
  state: function state(target, stateId) {
    if (target instanceof AxisRendererY) {
      var state = target.states.create(stateId);
      state.properties.disabled = true;
      return state;
    }

    return null;
  }
});

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisRendererY3D.js":
/*!***********************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisRendererY3D.js ***!
  \***********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "AxisRendererY3D": () => (/* binding */ AxisRendererY3D)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _axes_AxisRendererY__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../axes/AxisRendererY */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisRendererY.js");
/* harmony import */ var _core_utils_Disposer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/utils/Disposer */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Disposer.js");
/* harmony import */ var _core_rendering_Path__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/rendering/Path */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Path.js");
/**
 * Module, defining Axis Renderer for vertical 3D axes.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */




/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Renderer for vertical 3D axis.
 *
 * @see {@link IAxisRendererY3DEvents} for a list of available events
 * @see {@link IAxisRendererY3DAdapters} for a list of available Adapters
 */

var AxisRendererY3D =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__extends)(AxisRendererY3D, _super);
  /**
   * Constructor.
   *
   * @param axis Related axis
   */


  function AxisRendererY3D() {
    var _this = _super.call(this) || this;
    /**
     * A related chart.
     *
     * @todo Description
     */


    _this._chart = new _core_utils_Disposer__WEBPACK_IMPORTED_MODULE_1__.MutableValueDisposer();
    _this.className = "AxisRendererY3D";

    _this._disposers.push(_this._chart);

    _this.applyTheme();

    return _this;
  }
  /**
   * Updates and positions a grid element.
   *
   * @ignore Exclude from docs
   * @param grid         Grid element
   * @param position     Starting position
   * @param endPosition  End position
   */


  AxisRendererY3D.prototype.updateGridElement = function (grid, position, endPosition) {
    position = position + (endPosition - position) * grid.location;
    var point = this.positionToPoint(position);

    if (grid.element) {
      var dx = this.chart.dx3D || 0;
      var dy = this.chart.dy3D || 0;
      var w = this.getWidth();
      grid.path = _core_rendering_Path__WEBPACK_IMPORTED_MODULE_2__.moveTo({
        x: 0,
        y: 0
      }) + _core_rendering_Path__WEBPACK_IMPORTED_MODULE_2__.lineTo({
        x: dx,
        y: dy
      }) + _core_rendering_Path__WEBPACK_IMPORTED_MODULE_2__.lineTo({
        x: w + dx,
        y: dy
      });
    }

    this.positionItem(grid, point);
    this.toggleVisibility(grid, position, 0, 1);
  };
  /**
   * Updates and positions the base grid element.
   *
   * @ignore Exclude from docs
   */


  AxisRendererY3D.prototype.updateBaseGridElement = function () {
    _super.prototype.updateBaseGridElement.call(this);

    var dx = this.chart.dx3D || 0;
    var dy = this.chart.dy3D || 0;
    var w = this.getWidth();
    this.baseGrid.path = _core_rendering_Path__WEBPACK_IMPORTED_MODULE_2__.moveTo({
      x: 0,
      y: 0
    }) + _core_rendering_Path__WEBPACK_IMPORTED_MODULE_2__.lineTo({
      x: w,
      y: 0
    }) + _core_rendering_Path__WEBPACK_IMPORTED_MODULE_2__.lineTo({
      x: w + dx,
      y: dy
    });
  };

  Object.defineProperty(AxisRendererY3D.prototype, "chart", {
    /**
     * @ignore Exclude from docs
     * @return Chart
     */
    get: function get() {
      return this._chart.get();
    },

    /**
     * Chart, associated with the Axis.
     *
     * @ignore Exclude from docs
     * @param value  Chart
     */
    set: function set(chart) {
      if (chart) {
        this._chart.set(chart, chart.events.on("propertychanged", this.handle3DChanged, this, false));
      }
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Invoked when 3D-related settings change, like depth or angle.
   *
   * @param event Event
   */

  AxisRendererY3D.prototype.handle3DChanged = function (event) {
    if (event.property == "depth" || event.property == "angle") {
      this.invalidate();
    }
  };

  return AxisRendererY3D;
}(_axes_AxisRendererY__WEBPACK_IMPORTED_MODULE_0__.AxisRendererY);



/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisTick.js":
/*!****************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisTick.js ***!
  \****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "AxisTick": () => (/* binding */ AxisTick)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _elements_Tick__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../elements/Tick */ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/Tick.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/**
 * Axis Tick module
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */



/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Draws an axis tick
 * @see {@link IAxisTickEvents} for a list of available events
 * @see {@link IAxisTickAdapters} for a list of available Adapters
 */

var AxisTick =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(AxisTick, _super);

  function AxisTick() {
    var _this = _super.call(this) || this;

    _this.className = "AxisTick";
    _this.element = _this.paper.add("path");
    _this.location = 0.5;
    _this.above = false;
    _this.isMeasured = false;
    _this.pixelPerfect = true;
    _this.strokeOpacity = 0;
    _this.length = 5;

    _this.applyTheme();

    return _this;
  }

  Object.defineProperty(AxisTick.prototype, "location", {
    /**
     * @return Location (0-1)
     */
    get: function get() {
      return this.getPropertyValue("location");
    },

    /**
     * Relative location of the tick. (0-1)
     *
     * @param value  Location (0-1)
     */
    set: function set(value) {
      this.setPropertyValue("location", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(AxisTick.prototype, "inside", {
    /**
     * Returns if label is set to be drawn inside axis.
     *
     * @return Inside?
     */
    get: function get() {
      return this.getPropertyValue("inside");
    },

    /**
     * Sets if tick should be drawn inside axis.
     *
     * @param value  Inside?
     */
    set: function set(value) {
      this.setPropertyValue("inside", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(AxisTick.prototype, "above", {
    /**
     * @return Draw above series?
     */
    get: function get() {
      return this.getPropertyValue("above");
    },

    /**
     * Normally tick goes below series. Set this to `true` to go above.
     *
     * @default false
     * @since 4.5.9
     * @param  value  Draw above series?
     */
    set: function set(value) {
      this.setPropertyValue("above", value, true);
    },
    enumerable: true,
    configurable: true
  });
  /**
   * @ignore
   */

  AxisTick.prototype.setDisabled = function (value) {
    var changed = _super.prototype.setDisabled.call(this, value);

    if (this.axis) {
      this.axis.invalidateDataItems();
    }

    return changed;
  };

  return AxisTick;
}(_elements_Tick__WEBPACK_IMPORTED_MODULE_0__.Tick);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses.AxisTick = AxisTick;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/CategoryAxis.js":
/*!********************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/axes/CategoryAxis.js ***!
  \********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "CategoryAxis": () => (/* binding */ CategoryAxis),
/* harmony export */   "CategoryAxisDataItem": () => (/* binding */ CategoryAxisDataItem)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Axis__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Axis */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/Axis.js");
/* harmony import */ var _AxisRendererX__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AxisRendererX */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisRendererX.js");
/* harmony import */ var _AxisRendererY__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./AxisRendererY */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisRendererY.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_utils_Dictionary__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../core/utils/Dictionary */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Dictionary.js");
/* harmony import */ var _CategoryAxisBreak__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./CategoryAxisBreak */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/CategoryAxisBreak.js");
/* harmony import */ var _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../core/utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
/* harmony import */ var _core_utils_Type__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../core/utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/* harmony import */ var _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../core/utils/Iterator */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Iterator.js");
/**
 * Category axis module
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */










/**
 * ============================================================================
 * DATA ITEM
 * ============================================================================
 * @hidden
 */

/**
 * Defines a [[DataItem]] for [[CategoryAxis]].
 *
 * @see {@link DataItem}
 */

var CategoryAxisDataItem =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_9__.__extends)(CategoryAxisDataItem, _super);
  /**
   * Constructor
   */


  function CategoryAxisDataItem() {
    var _this = _super.call(this) || this;

    _this.seriesDataItems = {};
    _this.className = "CategoryAxisDataItem";
    _this.text = "{category}";
    _this.locations.category = 0;
    _this.locations.endCategory = 1;
    _this.deltaPosition = 0;

    _this.applyTheme();

    return _this;
  }

  Object.defineProperty(CategoryAxisDataItem.prototype, "category", {
    /**
     * @return Category
     */
    get: function get() {
      if (this._adapterO) {
        if (this._adapterO.isEnabled("category")) {
          return this._adapterO.apply("category", this.properties.category);
        }
      }

      return this.properties.category;
    },

    /**
     * Category.
     *
     * @param value  Category
     */
    set: function set(value) {
      var oldCategory = this.properties.category;
      this.setProperty("category", value);

      if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_7__.hasValue(oldCategory) && oldCategory != value) {
        if (this.component) {
          this.component.validateDataElement(this);
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(CategoryAxisDataItem.prototype, "endCategory", {
    /**
     * @return End category
     */
    get: function get() {
      return this.properties.endCategory;
    },

    /**
     * End category.
     *
     * Used for items that span several categories, like [[CategoryAxisBreak]].
     *
     * @param value  End category
     */
    set: function set(value) {
      this.setProperty("endCategory", value);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(CategoryAxisDataItem.prototype, "deltaPosition", {
    get: function get() {
      return this.properties.deltaCoordinate;
    },
    set: function set(value) {
      if (value != this.properties.deltaCoordinate) {
        this.setProperty("deltaCoordinate", value);

        if (this.component) {
          this.component.invalidateDataItems();
          this.component.invalidateSeries();
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  return CategoryAxisDataItem;
}(_Axis__WEBPACK_IMPORTED_MODULE_0__.AxisDataItem);


/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Used to create a category-based axis for the chart.
 *
 * ```TypeScript
 * // Create the axis
 * let xAxis = chart.xAxes.push(new am4charts.CategoryAxis());
 *
 * // Set settings
 * xAxis.title.text = "Clients";
 * ```
 * ```JavaScript
 * // Create the axis
 * var valueAxis = chart.xAxes.push(new am4charts.CategoryAxis());
 *
 * // Set settings
 * valueAxis.title.text = "Clients";
 * ```
 * ```JSON
 * "xAxes": [{
 *   "type": "CategoryAxis",
 *   "title": {
 *     "text": "Clients"
 *   }
 * }]
 * ```
 *
 * @see {@link ICategoryAxisEvents} for a list of available Events
 * @see {@link ICategoryAxisAdapters} for a list of available Adapters
 * @important
 */

var CategoryAxis =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_9__.__extends)(CategoryAxis, _super);
  /**
   * Constructor
   */


  function CategoryAxis() {
    var _this = // Init
    _super.call(this) || this;
    /**
     * A collection that holds Axis' data items sorted by each category.
     */


    _this.dataItemsByCategory = new _core_utils_Dictionary__WEBPACK_IMPORTED_MODULE_4__.Dictionary();
    _this.className = "CategoryAxis"; // Set field name

    _this.axisFieldName = "category";
    _this._lastDataItem = _this.createDataItem();
    _this._lastDataItem.component = _this;

    _this._disposers.push(_this._lastDataItem); // Apply theme


    _this.applyTheme();

    var dataItemsByCategory = _this.dataItemsByCategory;

    _this.addDisposer(_this.mainDataSet.events.on("removed", function (event) {
      dataItemsByCategory.removeKey(event.oldValue.category);
    }));

    return _this;
  }
  /**
   * Returns a new/empty [[DataItem]] of the type appropriate for this object.
   *
   * @see {@link DataItem}
   * @return Data Item
   */


  CategoryAxis.prototype.createDataItem = function () {
    return new CategoryAxisDataItem();
  };
  /**
   * Returns a new/empty [[AxisBreak]] of the appropriate type.
   *
   * @return Axis break
   */


  CategoryAxis.prototype.createAxisBreak = function () {
    return new _CategoryAxisBreak__WEBPACK_IMPORTED_MODULE_5__.CategoryAxisBreak();
  };
  /**
   * Processes a related series' data item.
   *
   * @ignore Exclude from docs
   * @todo Description
   * @param dataItem  Data item
   */


  CategoryAxis.prototype.processSeriesDataItem = function (dataItem, axisLetter) {
    _super.prototype.processSeriesDataItem.call(this, dataItem, axisLetter);

    var category = dataItem["category" + this.axisLetter];

    if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_7__.hasValue(category)) {
      var categoryAxisDataItem = this.dataItemsByCategory.getKey(category);

      if (categoryAxisDataItem) {
        var seriesId = dataItem.component.uid;
        var seriesDataItems = categoryAxisDataItem.seriesDataItems[seriesId];

        if (!seriesDataItems) {
          seriesDataItems = [];
          categoryAxisDataItem.seriesDataItems[seriesId] = seriesDataItems;
        }

        seriesDataItems.push(dataItem);
      }
    } else {
      dataItem.component.dataItems.remove(dataItem);
    }
  };
  /**
   * Validates the data range.
   *
   * @ignore Exclude from docs
   * @todo Description (review)
   */


  CategoryAxis.prototype.validateDataRange = function () {
    var _this = this;

    _super.prototype.validateDataRange.call(this);

    _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_8__.each(this._series.iterator(), function (series) {
      if (series.xAxis instanceof CategoryAxis && series.yAxis instanceof CategoryAxis) {
        series.invalidateDataRange();
      } else {
        var startIndex = _this.positionToIndex(_this.start);

        var endIndex = _this.positionToIndex(_this.end);

        if (endIndex >= _this.dataItems.length) {
          endIndex--;
        }

        var seriesId = series.uid;
        var minIndex = void 0;
        var maxIndex = void 0;

        for (var i = startIndex; i <= endIndex; i++) {
          var axisDataItem = _this.dataItems.getIndex(i);

          if (axisDataItem) {
            var seriesDataItems = axisDataItem.seriesDataItems[seriesId];

            if (seriesDataItems) {
              for (var i_1 = 0; i_1 < seriesDataItems.length; i_1++) {
                var seriesDataItem = seriesDataItems[i_1];

                if (seriesDataItem) {
                  var index = seriesDataItem.index;

                  if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_7__.isNumber(minIndex) || index < minIndex) {
                    minIndex = index;
                  }

                  if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_7__.isNumber(maxIndex) || index > maxIndex) {
                    maxIndex = index;
                  }
                }
              }
            }
          }
        }

        if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_7__.isNumber(minIndex)) {
          series.startIndex = minIndex;
        } else {
          series.start = _this.start;
        }

        if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_7__.isNumber(maxIndex)) {
          series.endIndex = maxIndex + 1;
        } else {
          series.end = _this.end;
        } // range might not change, but axis breaks might.


        if (_this._axisBreaks && _this._axisBreaks.length > 0) {
          series.invalidateDataRange();
        }
      }
    });
  };
  /**
   * Validates the whole axis. Causes it to redraw.
   *
   * @ignore Exclude from docs
   * @todo Description (review)
   */


  CategoryAxis.prototype.validate = function () {
    var _this = this;

    _super.prototype.validate.call(this);

    var dataCount = this.dataItems.length;
    var startIndex = _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.fitToRange(Math.floor(this.start * dataCount - 1), 0, dataCount);
    var endIndex = _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.fitToRange(Math.ceil(this.end * dataCount), 0, dataCount);

    if (this.renderer.invalid) {
      this.renderer.validate();
    } // find frequency at which we'll show items


    var maxCount = this.renderer.axisLength / Math.max(this.renderer.minGridDistance, 1 / Number.MAX_SAFE_INTEGER);
    var frequency = Math.min(this.dataItems.length, Math.ceil((endIndex - startIndex) / maxCount));
    this._startIndex = Math.floor(startIndex / frequency) * frequency;
    this._endIndex = Math.ceil(this.end * dataCount);
    this.fixAxisBreaks();

    if (this._startIndex == this._endIndex) {
      this._endIndex++;
    }

    this._frequency = frequency;

    if (this.axisLength <= 0) {
      return;
    }

    this.maxZoomFactor = this.dataItems.length;

    if (this.dataItems.length <= 0) {
      this.maxZoomFactor = 1;
    }

    this.resetIterators(); // it's important to use protected variables here, as getters will return 0 - length
    // TODO use iterator instead
    // @ todo: not solved cat axis item fading

    startIndex = _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.max(0, this._startIndex - this._frequency);
    endIndex = _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.min(this.dataItems.length, this._endIndex + this._frequency);
    var itemIndex = 0;

    for (var i = 0; i < startIndex; i++) {
      var dataItem = this.dataItems.getIndex(i);
      dataItem.__disabled = true;
    }

    for (var i = endIndex, len = this.dataItems.length; i < len; i++) {
      var dataItem = this.dataItems.getIndex(i);
      dataItem.__disabled = true;
    }

    for (var i = startIndex; i < endIndex; i++) {
      if (i < this.dataItems.length) {
        var dataItem = this.dataItems.getIndex(i);

        if (i / this._frequency == Math.round(i / this._frequency)) {
          var axisBreak = this.isInBreak(i);

          if (!axisBreak) {
            this.appendDataItem(dataItem);
            this.validateDataElement(dataItem, itemIndex);
          }

          itemIndex++;
        } else {
          //previously we disabled all before, but this is better for cpu
          //this.validateDataElement(dataItem, itemIndex); // helps to solve shrinking // not good - creates all items
          dataItem.__disabled = true;
        }
      }
    }

    this.appendDataItem(this._lastDataItem);
    this.validateDataElement(this._lastDataItem, itemIndex + 1, this.dataItems.length);

    if (this._axisBreaks) {
      var axisBreaks = this._axisBreaks;
      axisBreaks.each(function (axisBreak) {
        var adjustedStartValue = axisBreak.adjustedStartValue;
        var adjustedEndValue = axisBreak.adjustedEndValue;

        if (_core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.intersect({
          start: adjustedStartValue,
          end: adjustedEndValue
        }, {
          start: _this._startIndex,
          end: _this._endIndex
        })) {
          for (var b = adjustedStartValue; b <= adjustedEndValue; b++) {
            var dataItem = _this.dataItems.getIndex(b);

            dataItem.__disabled = true;
          }

          var frequency_1 = _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.fitToRange(Math.ceil(_this._frequency / axisBreak.breakSize), 1, adjustedEndValue - adjustedStartValue);
          var itemIndex_1 = 0;

          if (axisBreak.breakSize > 0) {
            // TODO use iterator instead
            for (var b = adjustedStartValue; b <= adjustedEndValue; b = b + frequency_1) {
              var dataItem = _this.dataItems.getIndex(b);

              dataItem.__disabled = false;

              _this.appendDataItem(dataItem);

              _this.validateDataElement(dataItem, itemIndex_1);

              itemIndex_1++;
            }
          }
        }
      });
    }

    this.validateBreaks();
    this.validateAxisRanges();
    this.ghostLabel.invalidate(); // solves font issue

    this.renderer.invalidateLayout();
  };
  /**
   * [validateDataElement description]
   *
   * @ignore Exclude from docs
   * @todo Description
   * @param dataItem   [description]
   * @param itemIndex  [description]
   */


  CategoryAxis.prototype.validateDataElement = function (dataItem, itemIndex, index) {
    _super.prototype.validateDataElement.call(this, dataItem);

    dataItem.itemIndex = this._axisItemCount;
    this._axisItemCount++; //dataItem.__disabled = false;

    var renderer = this.renderer;

    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_7__.isNumber(index)) {
      index = this.categoryToIndex(dataItem.category);
    }

    var endIndex = this.categoryToIndex(dataItem.endCategory);

    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_7__.isNumber(endIndex)) {
      endIndex = index;
    }

    var position = this.indexToPosition(index, dataItem.locations.category);
    var endPosition = this.indexToPosition(endIndex, dataItem.locations.endCategory);
    dataItem.position = position;
    var fillEndIndex;
    var fillPosition;
    var fillEndPosition;

    if (dataItem.isRange) {
      fillEndIndex = endIndex;
      fillPosition = this.indexToPosition(index, dataItem.locations.category);
      fillEndPosition = this.indexToPosition(fillEndIndex, dataItem.locations.endCategory);
    }

    dataItem.point = renderer.positionToPoint(position);
    var tick = dataItem.tick;

    if (tick && !tick.disabled) {
      renderer.updateTickElement(tick, position, endPosition);
    }

    var grid = dataItem.grid;

    if (grid && !grid.disabled) {
      renderer.updateGridElement(grid, position, endPosition);
    }

    var label = dataItem.label;

    if (label && !label.disabled) {
      // theorethically this might result problems if category text changes, the range text won't change. But otherwise range.label.text = "custom text" won't work, which is not intuitive.
      if (!dataItem.isRange || label.text == undefined) {
        dataItem.text = dataItem.text;
      }

      renderer.updateLabelElement(label, position, endPosition);

      if (renderer instanceof _AxisRendererY__WEBPACK_IMPORTED_MODULE_2__.AxisRendererY && dataItem.label.measuredWidth > this.ghostLabel.measuredWidth || renderer instanceof _AxisRendererX__WEBPACK_IMPORTED_MODULE_1__.AxisRendererX && dataItem.label.measuredHeight > this.ghostLabel.measuredHeight) {
        if (dataItem.label.html) {
          this.ghostLabel.html = dataItem.label.currentText;
        } else {
          this.ghostLabel.text = dataItem.label.currentText;
        }
      }
    }

    var fill = dataItem.axisFill;

    if (fill && !fill.disabled) {
      if (!dataItem.isRange) {
        fillEndIndex = index + this._frequency;
        fillPosition = this.indexToPosition(index, fill.location);
        fillEndPosition = this.indexToPosition(fillEndIndex, fill.location);
      }

      renderer.updateFillElement(fill, fillPosition, fillEndPosition);

      if (!dataItem.isRange) {
        this.fillRule(dataItem, itemIndex);
      }
    }

    if (dataItem.bullet) {
      renderer.updateBullet(dataItem.bullet, position, endPosition);
    }

    var mask = dataItem.mask;

    if (mask) {
      renderer.updateFillElement(mask, fillPosition, fillEndPosition);
    }
  };
  /**
   * @ignore
   */


  CategoryAxis.prototype.disposeData = function () {
    this.dataItemsByCategory.clear();

    _super.prototype.disposeData.call(this);
  };
  /**
   * Processes the axis data item.
   *
   * @ignore Exclude from docs
   * @param dataItem     Data item
   * @param dataContext  The raw data that corresponds to this data item
   */


  CategoryAxis.prototype.processDataItem = function (dataItem, dataContext) {
    if (dataItem) {
      // creat a collection for fast access
      _super.prototype.processDataItem.call(this, dataItem, dataContext); // check if such category already exists
      //let existingDataItem: CategoryAxisDataItem = this.dataItemsByCategory.getKey(dataItem.category);
      //if (existingDataItem && existingDataItem != dataItem) {
      //	this.dataItems.remove(existingDataItem);
      //}


      if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_7__.hasValue(dataItem.category)) {
        this.dataItemsByCategory.setKey(dataItem.category, dataItem);
      }
    }
  };

  CategoryAxis.prototype.getDataItem = function (dataContext) {
    var category = dataContext[this.dataFields.category];

    if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_7__.hasValue(category)) {
      var dataItem = this.dataItemsByCategory.getKey(category);

      if (dataItem) {
        return dataItem;
      } else {
        return this.dataItems.create();
      }
    }
  };
  /**
   * Converts a category index to an actual screen coordinate on the axis.
   *
   * `location` identifies relative location within category. 0 - beginning,
   * 0.5 - middle, 1 - end, and anything inbetween.
   *
   * @param index     Index
   * @param location  Location (0-1)
   * @return Position (px)
   */


  CategoryAxis.prototype.indexToPosition = function (index, location) {
    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_7__.isNumber(location)) {
      location = 0.5;
    }

    var startIndex = this.startIndex;
    var endIndex = this.endIndex;
    var difference = this.adjustDifference(startIndex, endIndex);
    var startLocation = this.startLocation;
    var endLocation = this.endLocation;
    difference -= startLocation;
    difference -= 1 - endLocation;

    if (this._axisBreaks) {
      var axisBreaks = this._axisBreaks;
      _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_8__.eachContinue(axisBreaks.iterator(), function (axisBreak) {
        var breakStartIndex = axisBreak.adjustedStartValue;
        var breakEndIndex = axisBreak.adjustedEndValue;

        if (index < startIndex || !_core_utils_Type__WEBPACK_IMPORTED_MODULE_7__.isNumber(breakStartIndex) || !_core_utils_Type__WEBPACK_IMPORTED_MODULE_7__.isNumber(breakEndIndex)) {
          return false;
        }

        if (_core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.intersect({
          start: breakStartIndex,
          end: breakEndIndex
        }, {
          start: startIndex,
          end: endIndex
        })) {
          breakStartIndex = Math.max(startIndex, breakStartIndex);
          breakEndIndex = Math.min(endIndex, breakEndIndex);
          var breakSize = axisBreak.breakSize; // value to the right of break end

          if (index > breakEndIndex) {
            startIndex += (breakEndIndex - breakStartIndex) * (1 - breakSize);
          } // value to the left of break start
          else if (index < breakStartIndex) {} // value within break
          else {
            index = breakStartIndex + (index - breakStartIndex) * breakSize;
          }
        }

        return true;
      });
    }

    var deltaPosition = 0;
    var dataItem = this.dataItems.getIndex(index);

    if (dataItem) {
      deltaPosition = dataItem.deltaPosition;
    }

    return _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.round(deltaPosition + (index + location - startLocation - startIndex) / difference, 5);
  };
  /**
   * Converts a string category name to relative position on axis.
   *
   * `location` identifies relative location within category. 0 - beginning,
   * 0.5 - middle, 1 - end, and anything inbetween.
   *
   * @param category  Category name
   * @param location  Location (0-1)
   * @return Position
   */


  CategoryAxis.prototype.categoryToPosition = function (category, location) {
    var index = this.categoryToIndex(category);
    return this.indexToPosition(index, location);
  };
  /**
   * Converts a string category name to a orientation point (x, y, angle) on axis
   *
   * `location` identifies relative location within category. 0 - beginning,
   * 0.5 - middle, 1 - end, and anything inbetween.
   * @param category  Category name
   * @param location  Location (0-1)
   * @return Orientation point
   */


  CategoryAxis.prototype.categoryToPoint = function (category, location) {
    var position = this.categoryToPosition(category, location);
    var point = this.renderer.positionToPoint(position);
    var angle = this.renderer.positionToAngle(position);
    return {
      x: point.x,
      y: point.y,
      angle: angle
    };
  };
  /**
   * Converts a string category name to a orientation point (x, y, angle) on axis
   *
   * `location` identifies relative location within category. 0 - beginning,
   * 0.5 - middle, 1 - end, and anything inbetween.
   * @param category  Category name
   * @param location  Location (0-1)
   * @return Orientation point
   */


  CategoryAxis.prototype.anyToPoint = function (category, location) {
    return this.categoryToPoint(category, location);
  };
  /**
   * Converts a string category name to relative position on axis.
   *
   * An alias to `categoryToPosition()`.
   *
   * @param category  Category name
   * @param location  Location (0-1)
   * @return Relative position
   */


  CategoryAxis.prototype.anyToPosition = function (category, location) {
    return this.categoryToPosition(category, location);
  };
  /**
   * Converts named category to an index of data item it corresponds to.
   *
   * @param category  Category
   * @return Data item index
   */


  CategoryAxis.prototype.categoryToIndex = function (category) {
    if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_7__.hasValue(category)) {
      var dataItem = this.dataItemsByCategory.getKey(category);

      if (dataItem) {
        return dataItem.index;
      }
    }
  };
  /**
   * Zooms the axis to specific named ctaegories.
   *
   * @param startCategory  Start category
   * @param endCategory    End category
   */


  CategoryAxis.prototype.zoomToCategories = function (startCategory, endCategory) {
    this.zoomToIndexes(this.categoryToIndex(startCategory), this.categoryToIndex(endCategory) + 1);
  };
  /**
   * [getAnyRangePath description]
   *
   * @ignore Exclude from docs
   * @todo Description
   * @param start         [description]
   * @param end           [description]
   * @param startLocation [description]
   * @param endLocation   [description]
   * @return [description]
   */


  CategoryAxis.prototype.getAnyRangePath = function (start, end, startLocation, endLocation) {
    var startPos = this.categoryToPosition(start, startLocation);
    var endPos = this.categoryToPosition(end, endLocation);
    return this.getPositionRangePath(startPos, endPos); // Base class (Axis) gets range shape from AxisRenderer
  };
  /**
   * Takes an absolute position (px) within axis and adjust it to a specific
   * `location` within category it corresponds to.
   *
   * @param position  Source position (px)
   * @param location  Location within category (0-1)
   * @return Adjusted position (px)
   */


  CategoryAxis.prototype.roundPosition = function (position, location) {
    var index = this.positionToIndex(position);
    return this.indexToPosition(index, location);
  };
  /**
   * Finds and returns first series data item with specific category
   * @param series    Target series
   * @param category  Category
   * @return XYSeriesDataItem data item
   */


  CategoryAxis.prototype.getFirstSeriesDataItem = function (series, category) {
    for (var i = 0; i < series.dataItems.length; i++) {
      var dataItem = series.dataItems.getIndex(i);

      if (series.xAxis == this) {
        if (dataItem.categoryX == category) {
          return dataItem;
        }
      }

      if (series.yAxis == this) {
        if (dataItem.categoryY == category) {
          return dataItem;
        }
      }
    }
  };
  /**
   * Finds and returns last series data item with specific category.
   * @param series    Target series
   * @param category  Category
   * @return XYSeriesDataItem data item
   */


  CategoryAxis.prototype.getLastSeriesDataItem = function (series, category) {
    for (var i = series.dataItems.length - 1; i >= 0; i--) {
      var dataItem = series.dataItems.getIndex(i);

      if (series.xAxis == this) {
        if (dataItem.categoryX == category) {
          return dataItem;
        }
      }

      if (series.yAxis == this) {
        if (dataItem.categoryY == category) {
          return dataItem;
        }
      }
    }
  }; // todo: optimize


  CategoryAxis.prototype.getSeriesDataItemByCategory = function (category, series) {
    var _this = this;

    var seriesDataItem;
    series.dataItems.each(function (dataItem) {
      if (series.xAxis == _this) {
        if (dataItem.categoryX == category) {
          seriesDataItem = dataItem;
        }
      } else if (series.yAxis == _this) {
        if (dataItem.categoryY == category) {
          seriesDataItem = dataItem;
        }
      }
    });
    return seriesDataItem;
  };
  /**
   * Returns a data item from Series that corresponds to a specific absolute
   * position on the Axis.
   *
   * @param series    Target series
   * @param position  Position (px)
   * @return XYSeriesDataItem data item
   */


  CategoryAxis.prototype.getSeriesDataItem = function (series, position, findNearest) {
    var _this = this;

    if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_7__.isNumber(position)) {
      var index_1 = this.positionToIndex(position);

      if (index_1 >= this.dataItems.length) {
        index_1--;
      }

      var dataItem = this.dataItems.getIndex(index_1);

      if (dataItem) {
        var category_1 = dataItem.category;
        var sdi_1;
        var seriesDataItem = series.dataItems.getIndex(index_1);

        if (seriesDataItem) {
          if (series.xAxis == this) {
            if (seriesDataItem.categoryX == category_1) {
              return seriesDataItem;
            }
          }

          if (series.yAxis == this) {
            if (seriesDataItem.categoryY == category_1) {
              return seriesDataItem;
            }
          }
        }

        series.dataItems.each(function (dataItem) {
          if (series.xAxis == _this) {
            if (dataItem.categoryX == category_1) {
              if (!sdi_1) {
                sdi_1 = dataItem;
              }

              if (Math.abs(index_1 - sdi_1.index) > Math.abs(index_1 - dataItem.index)) {
                sdi_1 = dataItem;
              }
            }
          }

          if (series.yAxis == _this) {
            if (dataItem.categoryY == category_1) {
              if (!sdi_1) {
                sdi_1 = dataItem;
              }

              if (Math.abs(index_1 - sdi_1.index) > Math.abs(index_1 - dataItem.index)) {
                sdi_1 = dataItem;
              }
            }
          }
        }); //@todo

        if (findNearest) {}

        return sdi_1;
      }
    }
  };
  /**
   * Returns the X coordinate for series' data item.
   *
   * @ignore Exclude from docs
   * @todo Description (review)
   * @param dataItem  Data item
   * @param key       Category
   * @param location  Location (0-1)
   * @return X coordinate (px)
   */


  CategoryAxis.prototype.getX = function (dataItem, key, location, stackKey, range) {
    var position = this.getPositionX(dataItem, key, location, stackKey, range);

    if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_7__.isNaN(position)) {
      return this.basePoint.x;
    } else {
      return this.renderer.positionToPoint(position).x;
    }
  };
  /**
   * Returns relative position on axis for series' data item.
   *
   * @since 4.5.14
   * @param  dataItem  Data item
   * @param  key       Category
   * @param  location  Location (0-1)
   * @return           Relative position
   */


  CategoryAxis.prototype.getPositionX = function (dataItem, key, location, stackKey, range) {
    var position;

    if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_7__.hasValue(key)) {
      position = this.categoryToPosition(dataItem.categories[key], location);
    }

    if (range) {
      position = _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.fitToRange(position, range.start, range.end);
    }

    return position;
  };
  /**
   * Returns the Y coordinate for series' data item.
   *
   * @ignore Exclude from docs
   * @todo Description (review)
   * @param dataItem  Data item
   * @param key       Category
   * @param location  Location (0-1)
   * @return Y coordinate (px)
   */


  CategoryAxis.prototype.getY = function (dataItem, key, location, stackKey, range) {
    var position = this.getPositionY(dataItem, key, location, stackKey, range);

    if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_7__.isNaN(position)) {
      return this.basePoint.y;
    } else {
      return this.renderer.positionToPoint(position).y;
    }
  };
  /**
   * Returns relative position on axis for series' data item.
   *
   * @since 4.5.14
   * @param  dataItem  Data item
   * @param  key       Category
   * @param  location  Location (0-1)
   * @return           Relative position
   */


  CategoryAxis.prototype.getPositionY = function (dataItem, key, location, stackKey, range) {
    var position;

    if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_7__.hasValue(key)) {
      position = this.categoryToPosition(dataItem.categories[key], location);
    }

    if (range) {
      position = _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.fitToRange(position, range.start, range.end);
    }

    return position;
  };
  /**
   * Returns an angle for series data item.
   *
   * @ignore Exclude from docs
   * @todo Description (review)
   * @param dataItem  Data item
   * @param key       Category
   * @param location  Location (0-1)
   * @param stackKey  Stack key (?)
   * @param range Range to fit in
   * @return Angle
   */


  CategoryAxis.prototype.getAngle = function (dataItem, key, location, stackKey, range) {
    var position = this.categoryToPosition(dataItem.categories[key], location);

    if (range) {
      position = _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.fitToRange(position, range.start, range.end);
    }

    return this.positionToAngle(position);
  };
  /**
   * Returns an absolute pixel coordinate of the start of the cell (category),
   * that specific position value falls into.
   *
   * @ignore Exclude from docs
   * @todo Description (review)
   * @param position  Position (px)
   * @return Cell start position (px)
   */


  CategoryAxis.prototype.getCellStartPosition = function (position) {
    return this.roundPosition(position, 0);
  };
  /**
   * Returns an absolute pixel coordinate of the end of the cell (category),
   * that specific position value falls into.
   *
   * @ignore Exclude from docs
   * @todo Description (review)
   * @param position  Position (px)
   * @return Cell end position (px)
   */


  CategoryAxis.prototype.getCellEndPosition = function (position) {
    return this.roundPosition(position, 1);
  };
  /**
   * Returns text to show in a category tooltip, based on specific position
   * within axis.
   *
   * @ignore Exclude from docs
   * @param position  Position (px)
   * @return Label (category)
   */


  CategoryAxis.prototype.getTooltipText = function (position) {
    var dataItem = this.dataItems.getIndex(this.positionToIndex(position));

    if (dataItem) {
      this.tooltipDataItem = dataItem;
      this.tooltip.dataItem = dataItem;

      if (this.tooltipText) {
        return this.tooltipText;
      }

      if (!this._adapterO) {
        return dataItem.category;
      } else {
        return this._adapterO.apply("getTooltipText", dataItem.category);
      }
    }
  };
  /**
   * Returns an index of the category that corresponds to specific pixel
   * position within axis.
   *
   * @param position  Position (px)
   * @return Category index
   */


  CategoryAxis.prototype.positionToIndex = function (position) {
    position = _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.round(position, 10);

    if (position < 0) {
      position = 0;
    }

    if (position > 1) {
      position = 1;
    }

    var startIndex = this.startIndex;
    var endIndex = this.endIndex;
    var difference = endIndex - startIndex - this.startLocation - (1 - this.endLocation);
    position += 1 / difference * this.startLocation;
    var index = null;

    if (this._axisBreaks) {
      var axisBreaks = this._axisBreaks; // in case we have some axis breaks

      _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_8__.eachContinue(axisBreaks.iterator(), function (axisBreak) {
        var breakStartPosition = axisBreak.startPosition;
        var breakEndPosition = axisBreak.endPosition;
        var breakStartIndex = axisBreak.adjustedStartValue;
        var breakEndIndex = axisBreak.adjustedEndValue;
        breakStartIndex = _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.max(breakStartIndex, startIndex);
        breakEndIndex = _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.min(breakEndIndex, endIndex);
        var breakSize = axisBreak.breakSize;
        difference -= (breakEndIndex - breakStartIndex) * (1 - breakSize); // position to the right of break end

        if (position > breakEndPosition) {
          startIndex += (breakEndIndex - breakStartIndex) * (1 - breakSize);
        } // position to the left of break start
        else if (position < breakStartPosition) {} // value within break
        else {
          var breakPosition = (position - breakStartPosition) / (breakEndPosition - breakStartPosition);
          index = breakStartIndex + Math.round(breakPosition * (breakEndIndex - breakStartIndex));
          return false;
        }

        return true;
      });
    }

    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_7__.isNumber(index)) {
      index = Math.floor(position * difference + startIndex);
    }

    if (index >= this.dataItems.length) {
      index = this.dataItems.length - 1;
    } // not good, when panning out of bounds, each time one less item gets selected
    //if (index >= endIndex) {
    //	index--;
    //}


    return index;
  };
  /**
   * Returns category based on position.
   *
   * Please note that `position` represents position within axis which may be
   * zoomed and not correspond to Cursor's `position`.
   *
   * To convert Cursor's `position` to Axis' `position` use `toAxisPosition()` method.
   *
   * This is a synonim of `getPositionLabel()` implemented here for consistentcy.
   *
   * @since 4.3.8
   * @see {@link https://www.amcharts.com/docs/v4/tutorials/tracking-cursors-position-via-api/#Tracking_Cursor_s_position} For more information about cursor tracking.
   * @param position  Relative position on axis (0-1)
   * @return Position label
   */


  CategoryAxis.prototype.positionToCategory = function (position) {
    return this.getPositionLabel(position);
  };
  /**
   * Returns category based on position.
   *
   * Please note that `position` represents position within axis which may be
   * zoomed and not correspond to Cursor's `position`.
   *
   * To convert Cursor's `position` to Axis' `position` use `toAxisPosition()` method.
   *
   * @see {@link https://www.amcharts.com/docs/v4/tutorials/tracking-cursors-position-via-api/#Tracking_Cursor_s_position} For more information about cursor tracking.
   * @param position  Relative position on axis (0-1)
   * @return Position label
   */


  CategoryAxis.prototype.getPositionLabel = function (position) {
    var dataItem = this.dataItems.getIndex(this.positionToIndex(position));

    if (dataItem) {
      return dataItem.category;
    }
  };

  Object.defineProperty(CategoryAxis.prototype, "basePoint", {
    /**
     * Coordinates of the actual axis start.
     *
     * @ignore Exclude from docs
     * @return Base point
     */
    get: function get() {
      // This makes base grid to be drawn at the end of the axis and adds extra
      // grid which we need to nicely close the chart.
      return this.renderer.positionToPoint(1);
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Initializes Axis' renderer.
   *
   * @ignore Exclude from docs
   */

  CategoryAxis.prototype.initRenderer = function () {
    _super.prototype.initRenderer.call(this);

    var renderer = this.renderer;
    renderer.baseGrid.disabled = true;
  };

  Object.defineProperty(CategoryAxis.prototype, "frequency", {
    /**
     * Current frequency of labels of the axis.
     *
     * Normally it would be 1, but when labels start to be hidden due
     * to `minGridDistance` this read-only property will increase.
     *
     * @readonly
     * @since 4.2.0
     * @return Label frequency
     */
    get: function get() {
      return this._frequency;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(CategoryAxis.prototype, "sortBySeries", {
    /**
     * @return Sort categories?
     */
    get: function get() {
      return this.getPropertyValue("sortBySeries");
    },

    /**
     * If set to a reference of [[ColumnSeries]] the categories will be sorted
     * by actual values.
     *
     * The categories are ordered in descending order (from highest values to
     * lowest). To reverse the order, use axis renderer's `inversed` setting.
     * E.g.:
     *
     * ```TypeScript
     * categoryAxis.sortBySeries = series;
     * categoryAxis.renderer.inversed = true;
     * ```
     * ```JavaScript
     * categoryAxis.sortBySeries = series;
     * categoryAxis.renderer.inversed = true;
     * ```
     * ```JSON
     * {
     *   // ...
     *   "xAxes": [{
     *     // ...
     *     "sortBySeries": "s1",
     *     "renderer": {
     *       // ...
     *       "inversed": true
     *     }
     *   }]
     * }
     * ```
     *
     * @since 4.8.7
     * @param  value  Sort categories?
     */
    set: function set(value) {
      this.setPropertyValue("sortBySeries", value, true);
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Processes JSON-based config before it is applied to the object.
   *
   * @ignore Exclude from docs
   * @param config  Config
   */

  CategoryAxis.prototype.processConfig = function (config) {
    if (config) {
      if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_7__.hasValue(config.sortBySeries) && _core_utils_Type__WEBPACK_IMPORTED_MODULE_7__.isString(config.sortBySeries)) {
        if (this.map.hasKey(config.sortBySeries)) {
          config.sortBySeries = this.map.getKey(config.sortBySeries);
        } else {
          this.addDelayedMap("sortBySeries", config.sortBySeries);
          delete config.sortBySeries;
        }
      }
    }

    _super.prototype.processConfig.call(this, config);
  };

  return CategoryAxis;
}(_Axis__WEBPACK_IMPORTED_MODULE_0__.Axis);


/**
 * Register class, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_3__.registry.registeredClasses.CategoryAxis = CategoryAxis;
_core_Registry__WEBPACK_IMPORTED_MODULE_3__.registry.registeredClasses.CategoryAxisDataItem = CategoryAxisDataItem;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/CategoryAxisBreak.js":
/*!*************************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/axes/CategoryAxisBreak.js ***!
  \*************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "CategoryAxisBreak": () => (/* binding */ CategoryAxisBreak)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _AxisBreak__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AxisBreak */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisBreak.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/**
 * A module which defines functionality related to Category Axis Break.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */



/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Base class to define "breaks" in axes
 * @see {@link ICategoryAxisBreakEvents} for a list of available events
 * @see {@link ICategoryAxisBreakAdapters} for a list of available Adapters
 */

var CategoryAxisBreak =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(CategoryAxisBreak, _super);
  /**
   * Constructor
   */


  function CategoryAxisBreak() {
    var _this = _super.call(this) || this;

    _this.className = "CategoryAxisBreak";
    _this.properties.startLocation = 0.5;
    _this.properties.endLocation = 0.5;

    _this.applyTheme();

    return _this;
  }

  Object.defineProperty(CategoryAxisBreak.prototype, "startPosition", {
    /**
     * Pixel position of the break's start.
     *
     * @return Position (px)
     * @readonly
     */
    get: function get() {
      if (this.axis) {
        return this.axis.indexToPosition(this.adjustedStartValue, this.startLocation);
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(CategoryAxisBreak.prototype, "endPosition", {
    /**
     * Pixel position of the break's end.
     *
     * @return Position (px)
     * @readonly
     */
    get: function get() {
      if (this.axis) {
        return this.axis.indexToPosition(this.adjustedEndValue, this.endLocation);
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(CategoryAxisBreak.prototype, "startCategory", {
    /**
     * @return Start category
     */
    get: function get() {
      return this.getPropertyValue("startCategory");
    },

    /**
     * A category break starts on.
     *
     * @param value Start category
     */
    set: function set(value) {
      if (this.setPropertyValue("startCategory", value)) {
        if (this.axis) {
          this.axis.invalidateDataItems();
          this.axis.invalidateSeries();
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(CategoryAxisBreak.prototype, "endCategory", {
    /**
     * @return End category
     */
    get: function get() {
      return this.getPropertyValue("endCategory");
    },

    /**
     * A category break ends on.
     *
     * @param value  End category
     */
    set: function set(value) {
      if (this.setPropertyValue("endCategory", value)) {
        if (this.axis) {
          this.axis.invalidateDataItems();
          this.axis.invalidateSeries();
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(CategoryAxisBreak.prototype, "startValue", {
    /**
     * @return Value
     */
    get: function get() {
      var category = this.getPropertyValue("startCategory");

      if (category) {
        return this.axis.categoryToIndex(category);
      } else {
        return this.getPropertyValue("startValue");
      }
    },

    /**
     * An index of start category.
     *
     * @param value  Value
     */
    set: function set(value) {
      if (this.setPropertyValue("startValue", value)) {
        if (this.axis) {
          this.axis.invalidateDataItems();
          this.axis.invalidateSeries();
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(CategoryAxisBreak.prototype, "endValue", {
    /**
     * @return Value
     */
    get: function get() {
      var category = this.getPropertyValue("endCategory");

      if (category) {
        return this.axis.categoryToIndex(category);
      } else {
        return this.getPropertyValue("endValue");
      }
    },

    /**
     * An index of end category or a end value.
     *
     * @param value  Value
     */
    set: function set(value) {
      if (this.setPropertyValue("endValue", value)) {
        if (this.axis) {
          this.axis.invalidateDataItems();
          this.axis.invalidateSeries();
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(CategoryAxisBreak.prototype, "startLocation", {
    /**
     * @return Break start location
     */
    get: function get() {
      return this.getPropertyValue("startLocation");
    },

    /**
     * Indicates where within starting category break should begin.
     *
     * Values range from `0` (start) to `1` (end), with default being `0.5` (middle).
     *
     * E.g. if you want to a break to fully encompass start and end categories,
     * you should set `startLocation = 0` and `endLocation = 1`.
     *
     * @since 4.9.17
     * @default 0.5
     * @param  value  Break start location
     */
    set: function set(value) {
      if (this.setPropertyValue("startLocation", value)) {
        if (this.axis) {
          this.axis.invalidateDataItems();
          this.axis.invalidateSeries();
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(CategoryAxisBreak.prototype, "endLocation", {
    /**
     * @return Break end location
     */
    get: function get() {
      return this.getPropertyValue("endLocation");
    },

    /**
     * Indicates where within ending category break should end.
     *
     * Values range from `0` (start) to `1` (end), with default being `0.5` (middle).
     *
     * E.g. if you want to a break to fully encompass start and end categories,
     * you should set `startLocation = 0` and `endLocation = 1`.
     *
     * @since 4.9.17
     * @default 0.5
     * @param  value  Break end location
     */
    set: function set(value) {
      if (this.setPropertyValue("endLocation", value)) {
        if (this.axis) {
          this.axis.invalidateDataItems();
          this.axis.invalidateSeries();
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  return CategoryAxisBreak;
}(_AxisBreak__WEBPACK_IMPORTED_MODULE_0__.AxisBreak);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses.CategoryAxisBreak = CategoryAxisBreak;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/DateAxis.js":
/*!****************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/axes/DateAxis.js ***!
  \****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "DateAxis": () => (/* binding */ DateAxis),
/* harmony export */   "DateAxisDataItem": () => (/* binding */ DateAxisDataItem)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _ValueAxis__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ValueAxis */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/ValueAxis.js");
/* harmony import */ var _core_utils_List__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/utils/List */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/List.js");
/* harmony import */ var _core_utils_Dictionary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/utils/Dictionary */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Dictionary.js");
/* harmony import */ var _DateAxisBreak__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./DateAxisBreak */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/DateAxisBreak.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_utils_Time__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../core/utils/Time */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Time.js");
/* harmony import */ var _core_utils_Type__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../core/utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/* harmony import */ var _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../core/utils/Iterator */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Iterator.js");
/* harmony import */ var _core_utils_Math__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../core/utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
/* harmony import */ var _core_utils_Array__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../core/utils/Array */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Array.js");
/* harmony import */ var _core_utils_Object__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../core/utils/Object */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Object.js");
/* harmony import */ var _core_utils_Utils__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../core/utils/Utils */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Utils.js");
/* harmony import */ var _core_utils_SortedList__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../core/utils/SortedList */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/SortedList.js");
/**
 * DateAxis module
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */














/**
 * ============================================================================
 * DATA ITEM
 * ============================================================================
 * @hidden
 */

/**
 * Defines data item for [[DateAxis]].
 *
 * @see {@link DataItem}
 */

var DateAxisDataItem =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_13__.__extends)(DateAxisDataItem, _super);
  /**
   * Constructor
   */


  function DateAxisDataItem() {
    var _this = _super.call(this) || this;

    _this.className = "DateAxisDataItem";

    _this.applyTheme();

    _this.values.date = {};
    _this.values.endDate = {};
    return _this;
  }

  Object.defineProperty(DateAxisDataItem.prototype, "date", {
    /**
     * @return Date
     */
    get: function get() {
      return this.dates["date"];
    },

    /**
     * Date position of the data item.
     *
     * @param date  Date
     */
    set: function set(date) {
      this.setDate("date", date);
      this.value = date.getTime();
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(DateAxisDataItem.prototype, "endDate", {
    /**
     * @return End date
     */
    get: function get() {
      return this.dates["endDate"];
    },

    /**
     * End date for data item.
     *
     * @param date End date
     */
    set: function set(date) {
      this.setDate("endDate", date);
      this.endValue = date.getTime();
    },
    enumerable: true,
    configurable: true
  });
  return DateAxisDataItem;
}(_ValueAxis__WEBPACK_IMPORTED_MODULE_0__.ValueAxisDataItem);


/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Used to create a date/time-based axis for the chart.
 *
 * ```TypeScript
 * // Create the axis
 * let xAxis = chart.xAxes.push(new am4charts.DateAxis());
 *
 * // Set settings
 * xAxis.title.text = "Time";
 * ```
 * ```JavaScript
 * // Create the axis
 * var valueAxis = chart.xAxes.push(new am4charts.DateAxis());
 *
 * // Set settings
 * valueAxis.title.text = "Time";
 * ```
 * ```JSON
 * "xAxes": [{
 *   "type": "DateAxis",
 *   "title": {
 *     "text": "Time"
 *   }
 * }]
 * ```
 *
 * @see {@link IDateAxisEvents} for a list of available Events
 * @see {@link IDateAxisAdapters} for a list of available Adapters
 * @see {@link https://www.amcharts.com/docs/v4/concepts/axes/date-axis/} got `DateAxis` documention
 * @important
 */

var DateAxis =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_13__.__extends)(DateAxis, _super);
  /**
   * Constructor
   */


  function DateAxis() {
    var _this = // Init
    _super.call(this) || this;

    _this._gapBreaks = false;
    /**
     * A list of date/time intervals for Date axis.
     *
     * This define various granularities available for the axis. For example
     * if you have an axis spanning an hour, and space for 6 grid lines / labels
     * the axis will choose the granularity of 10 minutes, displaying a label
     * every 10 minutes.
     *
     * Default intervals:
     *
     * ```JSON
     * [
     *  { timeUnit: "millisecond", count: 1 },
     *  { timeUnit: "millisecond", count: 5 },
     *  { timeUnit: "millisecond", count: 10 },
     *  { timeUnit: "millisecond", count: 50 },
     *  { timeUnit: "millisecond", count: 100 },
     *  { timeUnit: "millisecond", count: 500 },
     *  { timeUnit: "second", count: 1 },
     *  { timeUnit: "second", count: 5 },
     *  { timeUnit: "second", count: 10 },
     *  { timeUnit: "second", count: 30 },
     *  { timeUnit: "minute", count: 1 },
     *  { timeUnit: "minute", count: 5 },
     *  { timeUnit: "minute", count: 10 },
     *  { timeUnit: "minute", count: 30 },
     *  { timeUnit: "hour", count: 1 },
     *  { timeUnit: "hour", count: 3 },
     *  { timeUnit: "hour", count: 6 },
     *  { timeUnit: "hour", count: 12 },
     *  { timeUnit: "day", count: 1 },
     *  { timeUnit: "day", count: 2 },
     *  { timeUnit: "day", count: 3 },
     *  { timeUnit: "day", count: 4 },
     *  { timeUnit: "day", count: 5 },
     *  { timeUnit: "week", count: 1 },
     *  { timeUnit: "month", count: 1 },
     *  { timeUnit: "month", count: 2 },
     *  { timeUnit: "month", count: 3 },
     *  { timeUnit: "month", count: 6 },
     *  { timeUnit: "year", count: 1 },
     *  { timeUnit: "year", count: 2 },
     *  { timeUnit: "year", count: 5 },
     *  { timeUnit: "year", count: 10 },
     *  { timeUnit: "year", count: 50 },
     *  { timeUnit: "year", count: 100 }
     * ]
     * ```
     */

    _this.gridIntervals = new _core_utils_List__WEBPACK_IMPORTED_MODULE_1__.List();
    /**
     * If data aggregation is enabled by setting Axis' `groupData = true`, the
     * chart will try to aggregate data items into grouped data items.
     *
     * If there are more data items in selected period than `groupCount`, it will
     * group data items into bigger period.
     *
     * For example seconds might be grouped into 10-second aggregate data items.
     *
     * This setting indicates what group intervals can the chart group to.
     *
     * Default intervals:
     *
     * ```JSON
     * [
     *   { timeUnit: "millisecond", count: 1},
     *   { timeUnit: "millisecond", count: 10 },
     *   { timeUnit: "millisecond", count: 100 },
     *   { timeUnit: "second", count: 1 },
     *   { timeUnit: "second", count: 10 },
     *   { timeUnit: "minute", count: 1 },
     *   { timeUnit: "minute", count: 10 },
     *   { timeUnit: "hour", count: 1 },
     *   { timeUnit: "day", count: 1 },
     *   { timeUnit: "week", count: 1 },
     *   { timeUnit: "month", count: 1 },
     *   { timeUnit: "year", count: 1 }
     * ]
     * ```
     * `groupData = true` does not work in combination with `skipEmptyPeriods = true`.
     *
     * @since 4.7.0
     * @see {@link https://www.amcharts.com/docs/v4/concepts/axes/date-axis/#Dynamic_data_item_grouping} for more information about dynamic data item grouping.
     */

    _this.groupIntervals = new _core_utils_List__WEBPACK_IMPORTED_MODULE_1__.List();
    /**
     * A collection of date formats to use when formatting different time units
     * on Date/time axis.
     *
     * Actual defaults will depend on the language locale set for the chart.
     *
     * To override format for a specific time unit, say days, you need to set
     * the appropriate key to a format string. E.g.:
     *
     * ```TypeScript
     * axis.dateFormats.setKey("day", "MMMM d, yyyy");
     * ```
     * ```JavaScript
     * axis.dateFormats.setKey("day", "MMMM d, yyyy");
     * ```
     * ```JSON
     * "xAxes": [{
     *   "type": "DateAxis",
     *   "dateFormats": {
     *     "day": "MMMM d, yyyy"
     *   }
     * }]
     * ```
     *
     * @see {@link DateFormatter}
     */

    _this.dateFormats = new _core_utils_Dictionary__WEBPACK_IMPORTED_MODULE_2__.Dictionary();
    /**
     * These formats are applied to labels that are first in a larger unit.
     *
     * For example, if we have a DateAxis with days on it, the first day of month
     * indicates a break in month - a start of the bigger period.
     *
     * For those labels, `periodChangeDateFormats` are applied instead of
     * `dateFormats`.
     *
     * This allows us implement convenient structures, like instead of:
     *
     * `Jan 1 - Jan 2 - Jan 3 - ...`
     *
     * We can have:
     *
     * `Jan - 1 - 2 - 3 - ...`
     *
     * This can be disabled by setting `markUnitChange = false`.
     */

    _this.periodChangeDateFormats = new _core_utils_Dictionary__WEBPACK_IMPORTED_MODULE_2__.Dictionary();
    /**
     * Actual interval (granularity) derived from the actual data.
     */

    _this._baseIntervalReal = {
      timeUnit: "day",
      count: 1
    };
    /**
     */

    _this._prevSeriesTime = {};
    /**
     * [_minDifference description]
     *
     * @todo Description
     */

    _this._minDifference = {};
    /**
     * @ignore
     */

    _this._firstWeekDay = 1;
    /**
     * A collection of start timestamps to use as axis' min timestamp for
     * particular data item item periods.
     *
     * @since 4.7.0
     * @readonly
     */

    _this.groupMin = {};
    /**
     * A collection of start timestamps to use as axis' max timestamp for
     * particular data item item periods.
     *
     * @since 4.7.0
     * @readonly
     */

    _this.groupMax = {};
    _this.className = "DateAxis";

    _this.setPropertyValue("markUnitChange", true);

    _this.snapTooltip = true;
    _this.tooltipPosition = "pointer";

    _this.setPropertyValue("groupData", false);

    _this.groupCount = 200;

    _this.events.on("parentset", _this.getDFFormatter, _this, false); // Translatable defaults are applied in `applyInternalDefaults()`
    // ...
    // Define default intervals


    _this.gridIntervals.pushAll([{
      timeUnit: "millisecond",
      count: 1
    }, {
      timeUnit: "millisecond",
      count: 5
    }, {
      timeUnit: "millisecond",
      count: 10
    }, {
      timeUnit: "millisecond",
      count: 50
    }, {
      timeUnit: "millisecond",
      count: 100
    }, {
      timeUnit: "millisecond",
      count: 500
    }, {
      timeUnit: "second",
      count: 1
    }, {
      timeUnit: "second",
      count: 5
    }, {
      timeUnit: "second",
      count: 10
    }, {
      timeUnit: "second",
      count: 30
    }, {
      timeUnit: "minute",
      count: 1
    }, {
      timeUnit: "minute",
      count: 5
    }, {
      timeUnit: "minute",
      count: 10
    }, {
      timeUnit: "minute",
      count: 15
    }, {
      timeUnit: "minute",
      count: 30
    }, {
      timeUnit: "hour",
      count: 1
    }, {
      timeUnit: "hour",
      count: 3
    }, {
      timeUnit: "hour",
      count: 6
    }, {
      timeUnit: "hour",
      count: 12
    }, {
      timeUnit: "day",
      count: 1
    }, {
      timeUnit: "day",
      count: 2
    }, {
      timeUnit: "day",
      count: 3
    }, {
      timeUnit: "day",
      count: 4
    }, {
      timeUnit: "day",
      count: 5
    }, {
      timeUnit: "week",
      count: 1
    }, {
      timeUnit: "month",
      count: 1
    }, {
      timeUnit: "month",
      count: 2
    }, {
      timeUnit: "month",
      count: 3
    }, {
      timeUnit: "month",
      count: 6
    }, {
      timeUnit: "year",
      count: 1
    }, {
      timeUnit: "year",
      count: 2
    }, {
      timeUnit: "year",
      count: 5
    }, {
      timeUnit: "year",
      count: 10
    }, {
      timeUnit: "year",
      count: 50
    }, {
      timeUnit: "year",
      count: 100
    }, {
      timeUnit: "year",
      count: 200
    }, {
      timeUnit: "year",
      count: 500
    }, {
      timeUnit: "year",
      count: 1000
    }, {
      timeUnit: "year",
      count: 2000
    }, {
      timeUnit: "year",
      count: 5000
    }, {
      timeUnit: "year",
      count: 10000
    }, {
      timeUnit: "year",
      count: 100000
    }]);

    _this.groupIntervals.pushAll([{
      timeUnit: "millisecond",
      count: 1
    }, {
      timeUnit: "millisecond",
      count: 10
    }, {
      timeUnit: "millisecond",
      count: 100
    }, {
      timeUnit: "second",
      count: 1
    }, {
      timeUnit: "second",
      count: 10
    }, {
      timeUnit: "minute",
      count: 1
    }, {
      timeUnit: "minute",
      count: 10
    }, {
      timeUnit: "hour",
      count: 1
    }, {
      timeUnit: "day",
      count: 1
    }, {
      timeUnit: "week",
      count: 1
    }, {
      timeUnit: "month",
      count: 1
    }, {
      timeUnit: "year",
      count: 1
    }]); // Set field name


    _this.axisFieldName = "date"; // Apply theme

    _this.applyTheme();

    return _this;
  }
  /**
   * A function which applies fills to axis cells.
   *
   * Default function fills every second fill. You can set this to a function
   * that follows some other logic.
   *
   * Function should accept a [[DateAxisDataItem]] and modify its `axisFill`
   * property accordingly.
   */


  DateAxis.prototype.fillRule = function (dataItem) {
    var value = dataItem.value;
    var axis = dataItem.component;
    var gridInterval = axis._gridInterval;
    var gridDuration = _core_utils_Time__WEBPACK_IMPORTED_MODULE_5__.getDuration(gridInterval.timeUnit, gridInterval.count);

    if (Math.round((value - axis.min) / gridDuration) / 2 == Math.round(Math.round((value - axis.min) / gridDuration) / 2)) {
      dataItem.axisFill.__disabled = true;
    } else {
      dataItem.axisFill.__disabled = false;
    }
  };
  /**
   * Sets defaults that instantiate some objects that rely on parent, so they
   * cannot be set in constructor.
   */


  DateAxis.prototype.applyInternalDefaults = function () {
    _super.prototype.applyInternalDefaults.call(this); // Set default date formats


    if (!this.dateFormats.hasKey("millisecond")) {
      this.dateFormats.setKey("millisecond", this.language.translate("_date_millisecond"));
    }

    if (!this.dateFormats.hasKey("second")) {
      this.dateFormats.setKey("second", this.language.translate("_date_second"));
    }

    if (!this.dateFormats.hasKey("minute")) {
      this.dateFormats.setKey("minute", this.language.translate("_date_minute"));
    }

    if (!this.dateFormats.hasKey("hour")) {
      this.dateFormats.setKey("hour", this.language.translate("_date_hour"));
    }

    if (!this.dateFormats.hasKey("day")) {
      this.dateFormats.setKey("day", this.language.translate("_date_day"));
    }

    if (!this.dateFormats.hasKey("week")) {
      this.dateFormats.setKey("week", this.language.translate("_date_day")); // not a mistake
    }

    if (!this.dateFormats.hasKey("month")) {
      this.dateFormats.setKey("month", this.language.translate("_date_month"));
    }

    if (!this.dateFormats.hasKey("year")) {
      this.dateFormats.setKey("year", this.language.translate("_date_year"));
    }

    if (!this.periodChangeDateFormats.hasKey("millisecond")) {
      this.periodChangeDateFormats.setKey("millisecond", this.language.translate("_date_millisecond"));
    }

    if (!this.periodChangeDateFormats.hasKey("second")) {
      this.periodChangeDateFormats.setKey("second", this.language.translate("_date_second"));
    }

    if (!this.periodChangeDateFormats.hasKey("minute")) {
      this.periodChangeDateFormats.setKey("minute", this.language.translate("_date_minute"));
    }

    if (!this.periodChangeDateFormats.hasKey("hour")) {
      this.periodChangeDateFormats.setKey("hour", this.language.translate("_date_day"));
    }

    if (!this.periodChangeDateFormats.hasKey("day")) {
      this.periodChangeDateFormats.setKey("day", this.language.translate("_date_day"));
    }

    if (!this.periodChangeDateFormats.hasKey("week")) {
      this.periodChangeDateFormats.setKey("week", this.language.translate("_date_day"));
    }

    if (!this.periodChangeDateFormats.hasKey("month")) {
      this.periodChangeDateFormats.setKey("month", this.language.translate("_date_month") + " " + this.language.translate("_date_year"));
    }
  };
  /**
   * Returns a new/empty [[DataItem]] of the type appropriate for this object.
   *
   * @see {@link DataItem}
   * @return Data Item
   */


  DateAxis.prototype.createDataItem = function () {
    return new DateAxisDataItem();
  };
  /**
   * Returns a new/empty [[AxisBreak]] of the appropriate type.
   *
   * @return Axis break
   */


  DateAxis.prototype.createAxisBreak = function () {
    return new _DateAxisBreak__WEBPACK_IMPORTED_MODULE_3__.DateAxisBreak();
  };
  /**
   * Validates Axis' data items.
   *
   * @ignore Exclude from docs
   */


  DateAxis.prototype.validateDataItems = function () {
    // allows to keep selection of the same size
    var start = this.start;
    var end = this.end;
    var baseDuration = this.baseDuration;
    var periodCount = (this.max - this.min) / baseDuration;
    this._firstWeekDay = this.getFirstWeekDay();
    this.getDFFormatter();

    _super.prototype.validateDataItems.call(this);

    var mainBaseDuration = _core_utils_Time__WEBPACK_IMPORTED_MODULE_5__.getDuration(this.mainBaseInterval.timeUnit, this.mainBaseInterval.count);
    this.maxZoomFactor = Math.max(1, (this.max - this.min) / mainBaseDuration);
    this._deltaMinMax = this.baseDuration / 2; // allows to keep selection of the same size

    var newPeriodCount = (this.max - this.min) / baseDuration;
    start = start + (end - start) * (1 - periodCount / newPeriodCount);
    this.zoom({
      start: start,
      end: end
    }, false, true); // added instantlyto solve zoomout problem when we have axes gaps. @todo: check how this affects maxZoomFactor
  };
  /**
   * Handles process after zoom.
   *
   * @ignore Exclude from docs
   * @todo Does nothing?
   */


  DateAxis.prototype.handleSelectionExtremesChange = function () {};
  /**
   * Calculates all positions, related to axis as per current zoom.
   *
   * @ignore Exclude from docs
   */


  DateAxis.prototype.calculateZoom = function () {
    var _this = this;

    _super.prototype.calculateZoom.call(this);

    var difference = this.adjustDifference(this._minZoomed, this._maxZoomed);
    var dataSetChanged = false; // if data has to be grouped, choose interval and set dataset

    if (this.groupData && _core_utils_Type__WEBPACK_IMPORTED_MODULE_6__.hasValue(difference)) {
      var mainBaseInterval = this.mainBaseInterval;
      var modifiedDifference = difference + (this.startLocation + (1 - this.endLocation)) * this.baseDuration;
      var groupInterval = void 0;

      if (this.groupInterval) {
        groupInterval = (0,tslib__WEBPACK_IMPORTED_MODULE_13__.__assign)({}, this.groupInterval);
      } else {
        groupInterval = this.chooseInterval(0, modifiedDifference, this.groupCount, this.groupIntervals);

        if (_core_utils_Time__WEBPACK_IMPORTED_MODULE_5__.getDuration(groupInterval.timeUnit, groupInterval.count) < _core_utils_Time__WEBPACK_IMPORTED_MODULE_5__.getDuration(mainBaseInterval.timeUnit, mainBaseInterval.count)) {
          groupInterval = (0,tslib__WEBPACK_IMPORTED_MODULE_13__.__assign)({}, mainBaseInterval);
        }
      }

      this._groupInterval = groupInterval;
      var newId = groupInterval.timeUnit + groupInterval.count;

      if (this._currentDataSetId != newId) {
        this._currentDataSetId = newId;
        this.dispatch("groupperiodchanged");
      }

      this.series.each(function (series) {
        if (series.baseAxis == _this) {
          if (series.setDataSet(_this._currentDataSetId)) {
            dataSetChanged = true;
          }
        }
      });
    }

    var gridInterval = this.chooseInterval(0, difference, this._gridCount);

    if (_core_utils_Time__WEBPACK_IMPORTED_MODULE_5__.getDuration(gridInterval.timeUnit, gridInterval.count) < this.baseDuration) {
      gridInterval = (0,tslib__WEBPACK_IMPORTED_MODULE_13__.__assign)({}, this.baseInterval);
    }

    this._gridInterval = gridInterval;
    this._nextGridUnit = _core_utils_Time__WEBPACK_IMPORTED_MODULE_5__.getNextUnit(gridInterval.timeUnit); // the following is needed to avoid grid flickering while scrolling

    this._intervalDuration = _core_utils_Time__WEBPACK_IMPORTED_MODULE_5__.getDuration(gridInterval.timeUnit, gridInterval.count);
    this._gridDate = _core_utils_Time__WEBPACK_IMPORTED_MODULE_5__.round(new Date(this.minZoomed - _core_utils_Time__WEBPACK_IMPORTED_MODULE_5__.getDuration(gridInterval.timeUnit, gridInterval.count)), gridInterval.timeUnit, gridInterval.count, this._firstWeekDay, this._df.utc, new Date(this.min), this._df.timezoneMinutes, this._df.timezone); // tell series start/end

    _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_7__.each(this.series.iterator(), function (series) {
      if (series.baseAxis == _this) {
        var field_1 = series.getAxisField(_this);
        var minZoomed = _core_utils_Time__WEBPACK_IMPORTED_MODULE_5__.round(new Date(_this._minZoomed + _this.baseDuration * 0.05), _this.baseInterval.timeUnit, _this.baseInterval.count, _this._firstWeekDay, _this._df.utc, undefined, _this._df.timezoneMinutes, _this._df.timezone).getTime();
        var minZoomedStr = minZoomed.toString();
        var startDataItem = series.dataItemsByAxis.getKey(_this.uid).getKey(minZoomedStr + series.currentDataSetId);
        var startIndex = 0;

        if (_this.start != 0) {
          if (startDataItem) {
            startDataItem = _this.findFirst(startDataItem, minZoomed, field_1);
            startIndex = startDataItem.index;
          } else {
            startIndex = series.dataItems.findClosestIndex(_this._minZoomed, function (x) {
              return x[field_1];
            }, "left");
          }
        } // 1 millisecond is removed so that if only first item is selected, it would not count in the second.


        var baseInterval = _this.baseInterval;
        var maxZoomed = _core_utils_Time__WEBPACK_IMPORTED_MODULE_5__.add(_core_utils_Time__WEBPACK_IMPORTED_MODULE_5__.round(new Date(_this._maxZoomed), baseInterval.timeUnit, baseInterval.count, _this._firstWeekDay, _this._df.utc, undefined, _this._df.timezoneMinutes, _this._df.timezone), baseInterval.timeUnit, baseInterval.count, _this._df.utc).getTime();
        var maxZoomedStr = maxZoomed.toString();
        var endDataItem = series.dataItemsByAxis.getKey(_this.uid).getKey(maxZoomedStr + series.currentDataSetId);
        var endIndex = series.dataItems.length;

        if (_this.end != 1) {
          if (endDataItem) {
            endIndex = endDataItem.index;
          } else {
            maxZoomed -= 1;
            endIndex = series.dataItems.findClosestIndex(maxZoomed, function (x) {
              return x[field_1];
            }, "right"); // not good - if end is in the gap, indexes go like 5,4,3,4,2,1
            //if (endIndex < series.dataItems.length) {

            endIndex++; //}
          }
        }

        if (series.max(_this) < minZoomed) {
          series.startIndex = series.dataItems.length;
          series.endIndex = series.dataItems.length;
          series.outOfRange = true;
        } else if (series.min(_this) > maxZoomed) {
          series.startIndex = 0;
          series.endIndex = 0;
          series.outOfRange = true;
        } else {
          series.outOfRange = false;
          series.startIndex = startIndex;
          series.endIndex = endIndex;
        } //	console.log(series.name, startIndex, endIndex);


        if (!dataSetChanged && series.dataRangeInvalid) {
          series.validateDataRange();
        }
      }
    });
  };

  DateAxis.prototype.findFirst = function (dataItem, time, key) {
    var index = dataItem.index;

    if (index > 0) {
      var series = dataItem.component;
      var previousDataItem = series.dataItems.getIndex(index - 1);
      var previousDate = previousDataItem[key];

      if (!previousDate || previousDate.getTime() < time) {
        return dataItem;
      } else {
        return this.findFirst(previousDataItem, time, key);
      }
    } else {
      return dataItem;
    }
  };
  /**
   * (Re)validates data.
   *
   * @ignore Exclude from docs
   */


  DateAxis.prototype.validateData = function () {
    _super.prototype.validateData.call(this);

    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_6__.isNumber(this.baseInterval.count)) {
      this.baseInterval.count = 1;
    }
  };

  Object.defineProperty(DateAxis.prototype, "minDifference", {
    /**
     * @ignore
     */
    get: function get() {
      var _this = this;

      var minDifference = Number.MAX_VALUE;
      this.series.each(function (series) {
        if (minDifference > _this._minDifference[series.uid]) {
          minDifference = _this._minDifference[series.uid];
        }
      });

      if (minDifference == Number.MAX_VALUE || minDifference == 0) {
        minDifference = _core_utils_Time__WEBPACK_IMPORTED_MODULE_5__.getDuration("day");
      }

      return minDifference;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * [dataChangeUpdate description]
   *
   *
   * @ignore Exclude from docs
   * @todo Description
   */

  DateAxis.prototype.seriesDataChangeUpdate = function (series) {
    this._minDifference[series.uid] = Number.MAX_VALUE;
  };
  /**
   * [postProcessSeriesDataItems description]
   *
   * @ignore Exclude from docs
   * @todo Description
   */


  DateAxis.prototype.postProcessSeriesDataItems = function (series) {
    var _this = this;

    this._firstWeekDay = this.getFirstWeekDay();

    if (series) {
      this.seriesGroupUpdate(series);
    } else {
      this.series.each(function (series) {
        _this.seriesGroupUpdate(series);
      });
    }

    this.addEmptyUnitsBreaks();
  };

  DateAxis.prototype.seriesGroupUpdate = function (series) {
    var _this = this;

    if (JSON.stringify(series._baseInterval[this.uid]) != JSON.stringify(this.mainBaseInterval)) {
      series._baseInterval[this.uid] = this.mainBaseInterval;
      series.mainDataSet.each(function (dataItem) {
        _this.postProcessSeriesDataItem(dataItem);
      });

      if (this.groupData) {
        this.groupSeriesData(series);
      }
    }
  };
  /**
   * Calculates series group data.
   *
   * @param  series  Series
   * @ignore
   */


  DateAxis.prototype.groupSeriesData = function (series) {
    var _this = this;

    if (series.baseAxis == this && series.dataItems.length > 0 && !series.dataGrouped) {
      series.bulletsContainer.removeChildren(); // make array of intervals which will be used;

      var intervals_1 = [];
      var mainBaseInterval = this.mainBaseInterval;
      var mainIntervalDuration_1 = _core_utils_Time__WEBPACK_IMPORTED_MODULE_5__.getDuration(mainBaseInterval.timeUnit, mainBaseInterval.count);
      this.groupIntervals.each(function (interval) {
        var intervalDuration = _core_utils_Time__WEBPACK_IMPORTED_MODULE_5__.getDuration(interval.timeUnit, interval.count);

        if (intervalDuration > mainIntervalDuration_1 && intervalDuration < _this.max - _this.min || _this.groupInterval) {
          intervals_1.push(interval);
        }
      });

      if (series._dataSets) {
        series._dataSets.each(function (key, dataItems) {
          dataItems.each(function (dataItem) {
            dataItem.dispose();
          });
          dataItems.clear();
        });

        series._dataSets.clear();
      }

      series.dataGrouped = true;
      _core_utils_Array__WEBPACK_IMPORTED_MODULE_9__.each(intervals_1, function (interval) {
        //let mainBaseInterval = this._mainBaseInterval;
        var key = "date" + _this.axisLetter; // create data set

        var dataSetId = interval.timeUnit + interval.count; // todo: check where this clone goes

        var dataSet = new _core_utils_SortedList__WEBPACK_IMPORTED_MODULE_12__.OrderedListTemplate(series.mainDataSet.template.clone());
        series.dataSets.setKey(dataSetId, dataSet);
        var dataItems = series.mainDataSet;
        var previousTime = Number.NEGATIVE_INFINITY;
        var i = 0;
        var newDataItem;
        var dataFields = [];
        _core_utils_Object__WEBPACK_IMPORTED_MODULE_10__.each(series.dataFields, function (dfkey, df) {
          var dfk = dfkey;

          if (dfk != key && dfk.indexOf("Show") == -1) {
            dataFields.push(dfk);
          }
        });
        var roundedDate;
        dataItems.each(function (dataItem) {
          var date = dataItem.getDate(key);

          if (date) {
            var time = date.getTime();
            roundedDate = _core_utils_Time__WEBPACK_IMPORTED_MODULE_5__.round(new Date(time), interval.timeUnit, interval.count, _this._df.firstDayOfWeek, _this._df.utc, undefined, _this._df.timezoneMinutes, _this._df.timezone);
            var currentTime = roundedDate.getTime(); // changed period								

            if (previousTime < currentTime) {
              if (newDataItem && series._adapterO) {
                _core_utils_Array__WEBPACK_IMPORTED_MODULE_9__.each(dataFields, function (vkey) {
                  newDataItem.values[vkey].value = series._adapterO.apply("groupDataItem", {
                    dataItem: newDataItem,
                    interval: interval,
                    dataField: vkey,
                    date: roundedDate,
                    value: newDataItem.values[vkey].value
                  }).value;
                  newDataItem.values[vkey].workingValue = newDataItem.values[vkey].value;
                });
              }

              newDataItem = dataSet.create();
              newDataItem.dataContext = {};
              newDataItem.setWorkingLocation("dateX", series.dataItems.template.locations.dateX, 0);
              newDataItem.setWorkingLocation("openDateX", series.dataItems.template.locations.openDateX, 0);
              newDataItem.setWorkingLocation("dateY", series.dataItems.template.locations.dateY, 0);
              newDataItem.setWorkingLocation("openDateY", series.dataItems.template.locations.openDateY, 0);
              newDataItem.component = series; // other Dates?

              newDataItem.setDate(key, roundedDate);
              newDataItem._index = i;
              i++;
              _core_utils_Array__WEBPACK_IMPORTED_MODULE_9__.each(dataFields, function (vkey) {
                //let groupFieldName = vkey + "Group";
                var dvalues = dataItem.values[vkey];

                if (dvalues) {
                  var value = dvalues.value;

                  if (series._adapterO) {
                    value = series._adapterO.apply("groupValue", {
                      dataItem: dataItem,
                      interval: interval,
                      dataField: vkey,
                      date: roundedDate,
                      value: value
                    }).value;
                  }

                  var values = newDataItem.values[vkey];

                  if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_6__.isNumber(value)) {
                    values.value = value;
                    values.workingValue = value;
                    values.open = value;
                    values.close = value;
                    values.low = value;
                    values.high = value;
                    values.sum = value;
                    values.average = value;
                    values.count = 1;
                  } else {
                    values.count = 0;
                  }
                }
              });

              _this.postProcessSeriesDataItem(newDataItem, interval);

              _core_utils_Object__WEBPACK_IMPORTED_MODULE_10__.each(series.propertyFields, function (key, fieldValue) {
                var f = key;
                var value = dataItem.properties[key];

                if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_6__.hasValue(value)) {
                  newDataItem.hasProperties = true;
                  newDataItem.setProperty(f, value);
                }
              });
              newDataItem.groupDataItems = [dataItem];
              previousTime = currentTime;
            } else {
              if (newDataItem) {
                _core_utils_Array__WEBPACK_IMPORTED_MODULE_9__.each(dataFields, function (vkey) {
                  var groupFieldName = series.groupFields[vkey];
                  var dvalues = dataItem.values[vkey];

                  if (dvalues) {
                    var value = dvalues.value;

                    if (series._adapterO) {
                      value = series._adapterO.apply("groupValue", {
                        dataItem: dataItem,
                        interval: interval,
                        dataField: vkey,
                        date: roundedDate,
                        value: value
                      }).value;
                    }

                    if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_6__.isNumber(value)) {
                      var values = newDataItem.values[vkey];

                      if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_6__.isNumber(values.open)) {
                        values.open = value;
                      }

                      values.close = value;

                      if (values.low > value || !_core_utils_Type__WEBPACK_IMPORTED_MODULE_6__.isNumber(values.low)) {
                        values.low = value;
                      }

                      if (values.high < value || !_core_utils_Type__WEBPACK_IMPORTED_MODULE_6__.isNumber(values.high)) {
                        values.high = value;
                      }

                      if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_6__.isNumber(values.sum)) {
                        values.sum += value;
                      } else {
                        values.sum = value;
                      }

                      values.count++;
                      values.average = values.sum / values.count;

                      if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_6__.isNumber(values[groupFieldName])) {
                        values.value = values[groupFieldName];
                        values.workingValue = values.value;
                      }
                    }
                  }
                });
                _core_utils_Utils__WEBPACK_IMPORTED_MODULE_11__.copyProperties(dataItem.properties, newDataItem.properties);
                _core_utils_Object__WEBPACK_IMPORTED_MODULE_10__.each(series.propertyFields, function (key, fieldValue) {
                  var f = key;
                  var value = dataItem.properties[key];

                  if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_6__.hasValue(value)) {
                    newDataItem.hasProperties = true;
                    newDataItem.setProperty(f, value);
                  }
                });
                newDataItem.groupDataItems.push(dataItem);
              }
            }
          }

          if (newDataItem) {
            _core_utils_Utils__WEBPACK_IMPORTED_MODULE_11__.copyProperties(dataItem.dataContext, newDataItem.dataContext);
          }
        });

        if (newDataItem && series._adapterO) {
          _core_utils_Array__WEBPACK_IMPORTED_MODULE_9__.each(dataFields, function (vkey) {
            newDataItem.values[vkey].value = series._adapterO.apply("groupDataItem", {
              dataItem: newDataItem,
              interval: interval,
              dataField: vkey,
              date: roundedDate,
              value: newDataItem.values[vkey].value
            }).value;
            newDataItem.values[vkey].workingValue = newDataItem.values[vkey].value;
          });
        }
      });
      this.calculateZoom();
    }
  };
  /**
   * @ignore
   */


  DateAxis.prototype.getDFFormatter = function () {
    this._df = this.dateFormatter;
  };
  /**
   * [postProcessSeriesDataItem description]
   *
   * @ignore Exclude from docs
   * @todo Description
   * @param dataItem Data item
   */


  DateAxis.prototype.postProcessSeriesDataItem = function (dataItem, interval) {
    var _this = this; // we need to do this for all series data items not only added recently, as baseInterval might change


    var intervalID = "";

    if (interval) {
      intervalID = interval.timeUnit + interval.count;
    } else {
      interval = this.mainBaseInterval;
    }

    var series = dataItem.component;
    var dataItemsByAxis = series.dataItemsByAxis.getKey(this.uid);
    _core_utils_Object__WEBPACK_IMPORTED_MODULE_10__.each(dataItem.dates, function (key) {
      var date = dataItem.getDate(key);
      var time = date.getTime();
      var startDate = _core_utils_Time__WEBPACK_IMPORTED_MODULE_5__.round(new Date(time), interval.timeUnit, interval.count, _this._firstWeekDay, _this._df.utc, undefined, _this._df.timezoneMinutes, _this._df.timezone);
      var startTime = startDate.getTime();
      var endDate = _core_utils_Time__WEBPACK_IMPORTED_MODULE_5__.add(new Date(startTime), interval.timeUnit, interval.count, _this._df.utc);
      dataItem.setCalculatedValue(key, startTime, "open");
      dataItem.setCalculatedValue(key, endDate.getTime(), "close");
      dataItemsByAxis.setKey(startTime + intervalID, dataItem);
    });
  };
  /**
   * Collapses empty stretches of date/time scale by creating [[AxisBreak]]
   * elements for them.
   *
   * Can be used to automatically remove strethes without data, like weekends.
   *
   * No, need to call this manually. It will automatically be done if
   * `skipEmptyPeriods = true`.
   *
   * @ignore Exclude from docs
   */


  DateAxis.prototype.addEmptyUnitsBreaks = function () {
    var _this = this;

    if (this.skipEmptyPeriods && _core_utils_Type__WEBPACK_IMPORTED_MODULE_6__.isNumber(this.min) && _core_utils_Type__WEBPACK_IMPORTED_MODULE_6__.isNumber(this.max)) {
      var timeUnit = this.baseInterval.timeUnit;
      var count = this.baseInterval.count;

      if (this._axisBreaks) {
        this._axisBreaks.clear(); // TODO: what about breaks added by user?

      }

      var date = _core_utils_Time__WEBPACK_IMPORTED_MODULE_5__.round(new Date(this.min), timeUnit, count, this._firstWeekDay, this._df.utc, undefined, this._df.timezoneMinutes, this._df.timezone);
      var axisBreak = void 0;

      var _loop_1 = function _loop_1() {
        _core_utils_Time__WEBPACK_IMPORTED_MODULE_5__.add(date, timeUnit, count, this_1._df.utc);
        var startTime = date.getTime();
        var startTimeStr = startTime.toString();
        var hasData = _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_7__.contains(this_1.series.iterator(), function (series) {
          return !!series.dataItemsByAxis.getKey(_this.uid).getKey(startTimeStr + series.currentDataSetId);
        }); // open break if not yet opened

        if (!hasData) {
          if (!axisBreak) {
            axisBreak = this_1.axisBreaks.create();
            axisBreak.startDate = new Date(startTime);
            this_1._gapBreaks = true;
          }
        } else {
          // close if already opened
          if (axisBreak) {
            // close at end time minus one millisecond
            axisBreak.endDate = new Date(startTime - 1);
            axisBreak = undefined;
          }
        }
      };

      var this_1 = this;

      while (date.getTime() < this.max - this.baseDuration) {
        _loop_1();
      }
    }
  };
  /**
   * Updates positioning of Axis breaks after something changes.
   *
   * @ignore Exclude from docs
   */


  DateAxis.prototype.fixAxisBreaks = function () {
    var _this = this;

    _super.prototype.fixAxisBreaks.call(this);

    var axisBreaks = this._axisBreaks;

    if (axisBreaks) {
      if (axisBreaks.length > 0) {
        // process breaks
        axisBreaks.each(function (axisBreak) {
          var breakGridCount = Math.ceil(_this._gridCount * (Math.min(_this.end, axisBreak.endPosition) - Math.max(_this.start, axisBreak.startPosition)) / (_this.end - _this.start));
          axisBreak.gridInterval = _this.chooseInterval(0, axisBreak.adjustedEndValue - axisBreak.adjustedStartValue, breakGridCount);
          var gridDate = _core_utils_Time__WEBPACK_IMPORTED_MODULE_5__.round(new Date(axisBreak.adjustedStartValue), axisBreak.gridInterval.timeUnit, axisBreak.gridInterval.count, _this._firstWeekDay, _this._df.utc, undefined, _this._df.timezoneMinutes, _this._df.timezone);

          if (gridDate.getTime() > axisBreak.startDate.getTime()) {
            _core_utils_Time__WEBPACK_IMPORTED_MODULE_5__.add(gridDate, axisBreak.gridInterval.timeUnit, axisBreak.gridInterval.count, _this._df.utc);
          }

          axisBreak.gridDate = gridDate;
        });
      }
    }
  };
  /**
   * @ignore
   */


  DateAxis.prototype.getFirstWeekDay = function () {
    if (this._df) {
      return this._df.firstDayOfWeek;
    }

    return 1;
  };
  /**
   * [getGridDate description]
   *
   * @ignore Exclude from docs
   * @todo Description
   * @param date           [description]
   * @param intervalCount  [description]
   * @return [description]
   */


  DateAxis.prototype.getGridDate = function (date, intervalCount) {
    var timeUnit = this._gridInterval.timeUnit;
    var realIntervalCount = this._gridInterval.count; // round date

    _core_utils_Time__WEBPACK_IMPORTED_MODULE_5__.round(date, timeUnit, 1, this._firstWeekDay, this._df.utc, undefined, this._df.timezoneMinutes, this._df.timezone);
    var prevTimestamp = date.getTime();
    var newDate = _core_utils_Time__WEBPACK_IMPORTED_MODULE_5__.copy(date); // modify date by adding intervalcount

    var timestamp = _core_utils_Time__WEBPACK_IMPORTED_MODULE_5__.add(newDate, timeUnit, intervalCount, this._df.utc).getTime(); // if it's axis break, get first rounded date which is not in a break

    var axisBreak = this.isInBreak(timestamp);

    if (axisBreak && axisBreak.endDate) {
      newDate = new Date(axisBreak.endDate.getTime());
      _core_utils_Time__WEBPACK_IMPORTED_MODULE_5__.round(newDate, timeUnit, realIntervalCount, this._firstWeekDay, this._df.utc, undefined, this._df.timezoneMinutes, this._df.timezone);

      if (newDate.getTime() < axisBreak.endDate.getTime()) {
        _core_utils_Time__WEBPACK_IMPORTED_MODULE_5__.add(newDate, timeUnit, realIntervalCount, this._df.utc);
      }

      timestamp = newDate.getTime();
    } // get duration between grid lines with break duration removed


    var durationBreaksRemoved = this.adjustDifference(prevTimestamp, timestamp); // calculate how many time units fit to this duration

    var countBreaksRemoved = Math.round(durationBreaksRemoved / _core_utils_Time__WEBPACK_IMPORTED_MODULE_5__.getDuration(timeUnit)); // if less units fit, add one and repeat

    if (countBreaksRemoved < realIntervalCount) {
      return this.getGridDate(date, intervalCount + realIntervalCount);
    }

    return newDate;
  };
  /**
   * [getBreaklessDate description]
   *
   * @ignore Exclude from docs
   * @todo Description
   * @param axisBreak  [description]
   * @param timeUnit   [description]
   * @param count      [description]
   * @return [description]
   */


  DateAxis.prototype.getBreaklessDate = function (axisBreak, timeUnit, count) {
    var date = new Date(axisBreak.endValue);
    _core_utils_Time__WEBPACK_IMPORTED_MODULE_5__.round(date, timeUnit, count, this._firstWeekDay, this._df.utc, undefined, this._df.timezoneMinutes, this._df.timezone);
    _core_utils_Time__WEBPACK_IMPORTED_MODULE_5__.add(date, timeUnit, count, this._df.utc);
    var timestamp = date.getTime();
    axisBreak = this.isInBreak(timestamp);

    if (axisBreak) {
      return this.getBreaklessDate(axisBreak, timeUnit, count);
    }

    return date;
  };
  /**
   * (Re)validates all Axis elements.
   *
   * @ignore Exclude from docs
   * @todo Description (review)
   */


  DateAxis.prototype.validateAxisElements = function () {
    var _this = this;

    if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_6__.isNumber(this.max) && _core_utils_Type__WEBPACK_IMPORTED_MODULE_6__.isNumber(this.min)) {
      this.calculateZoom(); // first regular items

      var timestamp = this._gridDate.getTime();

      var timeUnit = this._gridInterval.timeUnit;
      var intervalCount = this._gridInterval.count;
      var prevGridDate = _core_utils_Time__WEBPACK_IMPORTED_MODULE_5__.copy(this._gridDate);
      var dataItemsIterator_1 = this._dataItemsIterator;
      this.resetIterators();

      var _loop_2 = function _loop_2() {
        var date = this_2.getGridDate(_core_utils_Time__WEBPACK_IMPORTED_MODULE_5__.copy(prevGridDate), intervalCount);
        timestamp = date.getTime();
        var endDate = _core_utils_Time__WEBPACK_IMPORTED_MODULE_5__.copy(date); // you might think it's easier to add intervalduration to timestamp, however it won't work for months or years which are not of the same length

        endDate = _core_utils_Time__WEBPACK_IMPORTED_MODULE_5__.add(endDate, timeUnit, intervalCount, this_2._df.utc);
        var format = this_2.dateFormats.getKey(timeUnit);

        if (this_2.markUnitChange && prevGridDate) {
          if (_core_utils_Time__WEBPACK_IMPORTED_MODULE_5__.checkChange(date, prevGridDate, this_2._nextGridUnit, this_2._df.utc)) {
            if (timeUnit !== "year") {
              format = this_2.periodChangeDateFormats.getKey(timeUnit);
            }
          }
        }

        var text = this_2._df.format(date, format);

        var dataItem = dataItemsIterator_1.find(function (x) {
          return x.text === text;
        });

        if (dataItem.__disabled) {
          dataItem.__disabled = false;
        }

        this_2.appendDataItem(dataItem);
        dataItem.axisBreak = undefined;
        dataItem.date = date;
        dataItem.endDate = endDate;
        dataItem.text = text;
        this_2.validateDataElement(dataItem);
        prevGridDate = date;
      };

      var this_2 = this;

      while (timestamp <= this._maxZoomed) {
        _loop_2();
      } // breaks later


      var renderer_1 = this.renderer;

      if (this._axisBreaks) {
        _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_7__.each(this._axisBreaks.iterator(), function (axisBreak) {
          if (axisBreak.breakSize > 0) {
            var timeUnit_1 = axisBreak.gridInterval.timeUnit;
            var intervalCount_1 = axisBreak.gridInterval.count; // only add grid if gap is bigger then minGridDistance

            if (_core_utils_Math__WEBPACK_IMPORTED_MODULE_8__.getDistance(axisBreak.startPoint, axisBreak.endPoint) > renderer_1.minGridDistance * 4) {
              var timestamp_1 = axisBreak.gridDate.getTime();
              var prevGridDate_1;
              var count = 0;

              var _loop_3 = function _loop_3() {
                var date = _core_utils_Time__WEBPACK_IMPORTED_MODULE_5__.copy(axisBreak.gridDate);
                timestamp_1 = _core_utils_Time__WEBPACK_IMPORTED_MODULE_5__.add(date, timeUnit_1, intervalCount_1 * count, _this._df.utc).getTime();
                count++;

                if (timestamp_1 > axisBreak.adjustedStartValue && timestamp_1 < axisBreak.adjustedEndValue) {
                  var endDate = _core_utils_Time__WEBPACK_IMPORTED_MODULE_5__.copy(date); // you might think it's easier to add intervalduration to timestamp, however it won't work for months or years which are not of the same length

                  endDate = _core_utils_Time__WEBPACK_IMPORTED_MODULE_5__.add(endDate, timeUnit_1, intervalCount_1, _this._df.utc);

                  var format = _this.dateFormats.getKey(timeUnit_1);

                  if (_this.markUnitChange && prevGridDate_1) {
                    if (_core_utils_Time__WEBPACK_IMPORTED_MODULE_5__.checkChange(date, prevGridDate_1, _this._nextGridUnit, _this._df.utc)) {
                      if (timeUnit_1 !== "year") {
                        format = _this.periodChangeDateFormats.getKey(timeUnit_1);
                      }
                    }
                  }

                  var text_1 = _this._df.format(date, format);

                  var dataItem = dataItemsIterator_1.find(function (x) {
                    return x.text === text_1;
                  });

                  if (dataItem.__disabled) {
                    dataItem.__disabled = false;
                  } //this.processDataItem(dataItem);


                  _this.appendDataItem(dataItem);

                  dataItem.axisBreak = axisBreak;
                  axisBreak.dataItems.moveValue(dataItem);
                  dataItem.date = date;
                  dataItem.endDate = endDate;
                  dataItem.text = text_1;
                  prevGridDate_1 = date;

                  _this.validateDataElement(dataItem);
                }
              };

              while (timestamp_1 <= axisBreak.adjustedMax) {
                _loop_3();
              }
            }
          }
        });
      }
    }
  };
  /**
   * Validates Axis data item.
   *
   * @ignore Exclude from docs
   * @param dataItem Data item
   */


  DateAxis.prototype.validateDataElement = function (dataItem) {
    dataItem.itemIndex = this._axisItemCount;
    this._axisItemCount++;

    if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_6__.isNumber(this.max) && _core_utils_Type__WEBPACK_IMPORTED_MODULE_6__.isNumber(this.min)) {
      var renderer = this.renderer;
      var timestamp = dataItem.value;
      var endTimestamp = dataItem.endValue;

      if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_6__.isNumber(endTimestamp)) {
        endTimestamp = timestamp;
      }

      var position = this.valueToPosition(timestamp);
      var endPosition = this.valueToPosition(endTimestamp);
      var fillEndPosition = endPosition;

      if (!dataItem.isRange && this._gridInterval.count > this.baseInterval.count) {
        endPosition = position + (endPosition - position) / (this._gridInterval.count / this.baseInterval.count);
      }

      dataItem.position = position;
      var tick = dataItem.tick;

      if (tick && !tick.disabled) {
        renderer.updateTickElement(tick, position, endPosition);
      }

      var grid = dataItem.grid;

      if (grid && !grid.disabled) {
        renderer.updateGridElement(grid, position, endPosition);
      }

      var fill = dataItem.axisFill;

      if (fill && !fill.disabled) {
        renderer.updateFillElement(fill, position, fillEndPosition);

        if (!dataItem.isRange) {
          this.fillRule(dataItem);
        }
      }

      var mask = dataItem.mask;

      if (mask) {
        renderer.updateFillElement(mask, position, endPosition);
      }

      if (dataItem.bullet) {
        renderer.updateBullet(dataItem.bullet, position, endPosition);
      }

      var label = dataItem.label;

      if (label && !label.disabled) {
        var location_1 = label.location;

        if (location_1 == 0) {
          if (this._gridInterval.count == 1 && this._gridInterval.timeUnit != "week" && !dataItem.isRange) {
            location_1 = 0.5;
          } else {
            location_1 = 0;
          }
        }

        renderer.updateLabelElement(label, position, endPosition, location_1);
      }
    }
  };

  Object.defineProperty(DateAxis.prototype, "baseDuration", {
    /**
     * A duration in milliseconds of the `baseInterval`.
     *
     * @return Duration (ms)
     */
    get: function get() {
      return _core_utils_Time__WEBPACK_IMPORTED_MODULE_5__.getDuration(this.baseInterval.timeUnit, this.baseInterval.count);
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Adjusts min/max values.
   *
   * @ignore Exclude from docs.
   * @todo Description (review)
   * @param min  Min timestamp
   * @param max  Max timestamp
   * @return Adjusted min/max step
   */

  DateAxis.prototype.adjustMinMax = function (min, max) {
    return {
      min: min,
      max: max,
      step: this.baseDuration
    };
  };
  /**
   * Adjusts the minimum timestamp as per cell start location.
   *
   * @param value  Value
   * @return Adjusted value
   */


  DateAxis.prototype.fixMin = function (value) {
    // like this because months are not equal
    var interval = this.baseInterval;
    var startTime = _core_utils_Time__WEBPACK_IMPORTED_MODULE_5__.round(new Date(value), interval.timeUnit, interval.count, this._firstWeekDay, this._df.utc, undefined, this._df.timezoneMinutes, this._df.timezone).getTime();
    var endTime = _core_utils_Time__WEBPACK_IMPORTED_MODULE_5__.add(new Date(startTime), interval.timeUnit, interval.count, this._df.utc).getTime();
    return startTime + (endTime - startTime) * this.startLocation;
  };
  /**
   * Adjusts the maximum timestamp as per cell start location.
   *
   * @param value  Value
   * @return Adjusted value
   */


  DateAxis.prototype.fixMax = function (value) {
    // like this because months are not equal
    var interval = this.baseInterval;
    var startTime = _core_utils_Time__WEBPACK_IMPORTED_MODULE_5__.round(new Date(value), interval.timeUnit, interval.count, this._firstWeekDay, this._df.utc, undefined, this._df.timezoneMinutes, this._df.timezone).getTime();
    var endTime = _core_utils_Time__WEBPACK_IMPORTED_MODULE_5__.add(new Date(startTime), interval.timeUnit, interval.count, this._df.utc).getTime();
    return startTime + (endTime - startTime) * this.endLocation;
  };
  /**
   * [chooseInterval description]
   *
   * @ignore Exclude from docs.
   * @todo Description
   * @param index      [description]
   * @param duration   [description]
   * @param gridCount  [description]
   * @return [description]
   */


  DateAxis.prototype.chooseInterval = function (index, duration, gridCount, intervals) {
    if (!intervals) {
      intervals = this.gridIntervals;
    }

    var gridInterval = intervals.getIndex(index);
    var intervalDuration = _core_utils_Time__WEBPACK_IMPORTED_MODULE_5__.getDuration(gridInterval.timeUnit, gridInterval.count);
    var lastIndex = intervals.length - 1;

    if (index >= lastIndex) {
      return (0,tslib__WEBPACK_IMPORTED_MODULE_13__.__assign)({}, intervals.getIndex(lastIndex));
    }

    var count = Math.ceil(duration / intervalDuration);

    if (duration < intervalDuration && index > 0) {
      return (0,tslib__WEBPACK_IMPORTED_MODULE_13__.__assign)({}, intervals.getIndex(index - 1));
    }

    if (count <= gridCount) {
      return (0,tslib__WEBPACK_IMPORTED_MODULE_13__.__assign)({}, intervals.getIndex(index));
    } else {
      if (index + 1 < intervals.length) {
        return this.chooseInterval(index + 1, duration, gridCount, intervals);
      } else {
        return (0,tslib__WEBPACK_IMPORTED_MODULE_13__.__assign)({}, intervals.getIndex(index));
      }
    }
  };
  /**
   * Formats the value according to axis' own [[DateFormatter]].
   *
   * @param value  Source value
   * @return Formatted value
   */


  DateAxis.prototype.formatLabel = function (value) {
    return this._df.format(value);
  };
  /**
   * Converts a Date to an asbolute pixel position within Axis.
   *
   * @param date  Date
   * @return Position (px)
   */


  DateAxis.prototype.dateToPosition = function (date) {
    return this.valueToPosition(date.getTime());
  };
  /**
   * Converts a numeric timestamp or a `Date` to a relative position on axis.
   *
   * @param date  Date or a timestamp
   * @return Relative position
   */


  DateAxis.prototype.anyToPosition = function (date) {
    if (date instanceof Date) {
      return this.dateToPosition(date);
    } else {
      return this.valueToPosition(date);
    }
  };
  /**
   * Converts date to orientation point (x, y, angle) on axis
   *
   * @param date Date
   * @return IOrientationPoint
   */


  DateAxis.prototype.dateToPoint = function (date) {
    var position = this.dateToPosition(date);
    var point = this.renderer.positionToPoint(position);
    var angle = this.renderer.positionToAngle(position);
    return {
      x: point.x,
      y: point.y,
      angle: angle
    };
  };
  /**
   * Converts a numeric value to orientation (x, y, angle) point on axis
   *
   * @param value  Value
   * @return Orientation point
   */


  DateAxis.prototype.anyToPoint = function (date) {
    if (date instanceof Date) {
      return this.dateToPoint(date);
    } else {
      return this.valueToPoint(date);
    }
  };
  /**
   * Converts pixel position within Axis to a corresponding Date.
   *
   * @param position  Position (px)
   * @return Date
   */


  DateAxis.prototype.positionToDate = function (position) {
    return new Date(this.positionToValue(position));
  };
  /**
   * Returns the relative position on axis for series' data item's value.
   *
   * @since 4.5.14
   * @param  dataItem  Data item
   * @param  key       Data field to get value from
   * @param  location  Location (0-1)
   * @return           Relative position
   */


  DateAxis.prototype.getPositionX = function (dataItem, key, location, stackKey, range) {
    var value = this.getTimeByLocation(dataItem, key, location); //let stack: number = dataItem.getValue("valueX", "stack");

    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_6__.isNumber(value)) {
      value = this.baseValue;
    }

    var position = this.valueToPosition(value);

    if (range) {
      position = _core_utils_Math__WEBPACK_IMPORTED_MODULE_8__.fitToRange(position, range.start, range.end);
    }

    return position;
  };
  /**
   * Returns relative position on axis for series' data item's value.
   *
   * @since 4.5.14
   * @param  dataItem  Data item
   * @param  key       Data field to get value from
   * @param  location  Location (0-1)
   * @return           Relative position
   */


  DateAxis.prototype.getPositionY = function (dataItem, key, location, stackKey, range) {
    var value = this.getTimeByLocation(dataItem, key, location);
    var stack = dataItem.getValue("valueX", "stack");

    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_6__.isNumber(value)) {
      value = this.baseValue;
    }

    var position = this.valueToPosition(value + stack);

    if (range) {
      position = _core_utils_Math__WEBPACK_IMPORTED_MODULE_8__.fitToRange(position, range.start, range.end);
    }

    return position;
  };
  /**
   * Returns an angle for series data item.
   *
   * @ignore Exclude from docs
   * @todo Description (review)
   * @param dataItem  Data item
   * @param key       Data field to get value from
   * @param location  Location (0-1)
   * @param stackKey  Stack ID
   * @param range Range to fit in
   * @return Angle
   */


  DateAxis.prototype.getAngle = function (dataItem, key, location, stackKey, range) {
    var value = this.getTimeByLocation(dataItem, key, location);
    var stack = dataItem.getValue(stackKey, "stack");

    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_6__.isNumber(value)) {
      value = this.baseValue;
    }

    var position = this.valueToPosition(value + stack);

    if (range) {
      position = _core_utils_Math__WEBPACK_IMPORTED_MODULE_8__.fitToRange(position, range.start, range.end);
    }

    return this.positionToAngle(position);
  };
  /**
   * [getTimeByLocation description]
   *
   * @ignore Exclude from docs
   * @todo Description
   * @param dataItem  [description]
   * @param key       [description]
   * @param location  [description]
   * @return [description]
   */


  DateAxis.prototype.getTimeByLocation = function (dataItem, key, location) {
    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_6__.hasValue(key)) {
      return;
    }

    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_6__.isNumber(location)) {
      location = dataItem.workingLocations[key];

      if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_6__.isNumber(location)) {
        location = 0;
      }
    }

    var startTime = dataItem.values[key]["open"];
    var endTime = dataItem.values[key]["close"];
    var workingValue = dataItem.values[key].workingValue;
    var value = dataItem.values[key].value;
    var difference = value - workingValue;
    startTime -= difference;
    endTime -= difference;

    if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_6__.isNumber(startTime) && _core_utils_Type__WEBPACK_IMPORTED_MODULE_6__.isNumber(endTime)) {
      return startTime + (endTime - startTime) * location;
    }
  };
  /**
   * Processes a related series' data item.
   *
   * @ignore Exclude from docs
   * @todo Description
   * @param dataItem  Data item
   */


  DateAxis.prototype.processSeriesDataItem = function (dataItem, axisLetter) {
    var series = dataItem.component;
    var time;
    var date = dataItem["date" + axisLetter];

    if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_6__.isNumber(this.timezoneOffset)) {
      date.setTime(date.getTime() + (date.getTimezoneOffset() - this.timezoneOffset) * 60000);
      dataItem.setValue("date" + axisLetter, date.getTime(), 0);
    } else if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_6__.hasValue(this.timezone)) {
      date = _core_utils_Time__WEBPACK_IMPORTED_MODULE_5__.setTimezone(date, this.timezone);
      dataItem.setValue("date" + axisLetter, date.getTime(), 0);
      dataItem["date" + axisLetter] = date;
    }

    if (date) {
      time = date.getTime();
    } else {
      return;
    }

    var openDate = dataItem["openDate" + axisLetter];
    var prevSeriesTime = this._prevSeriesTime[series.uid];
    var openTime;

    if (openDate) {
      openTime = openDate.getTime();
    }

    if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_6__.isNumber(openTime)) {
      var difference = Math.abs(time - openTime);

      if (this._minDifference[series.uid] > difference) {
        this._minDifference[series.uid] = difference;
      }
    }

    var differece = time - prevSeriesTime;

    if (differece > 0) {
      if (this._minDifference[series.uid] > differece) {
        this._minDifference[series.uid] = differece;
      }
    }

    this._prevSeriesTime[series.uid] = time;

    if (series._baseInterval[this.uid]) {
      this.postProcessSeriesDataItem(dataItem);
    }
  };
  /**
   * [updateAxisBySeries description]
   *
   * @ignore Exclude from docs
   * @todo Description
   */


  DateAxis.prototype.updateAxisBySeries = function () {
    _super.prototype.updateAxisBySeries.call(this);

    var baseInterval = this.chooseInterval(0, this.minDifference, 1); // handle short months

    if (this.minDifference >= _core_utils_Time__WEBPACK_IMPORTED_MODULE_5__.getDuration("day", 27) && baseInterval.timeUnit == "week") {
      baseInterval.timeUnit = "month";
      baseInterval.count = 1;
    }

    if (baseInterval.timeUnit == "month") {
      if (this.minDifference >= _core_utils_Time__WEBPACK_IMPORTED_MODULE_5__.getDuration("day", 29 * 2) && baseInterval.count == 1) {
        baseInterval.count = 2;
      }

      if (this.minDifference >= _core_utils_Time__WEBPACK_IMPORTED_MODULE_5__.getDuration("day", 29 * 3) && baseInterval.count == 2) {
        baseInterval.count = 3;
      }

      if (this.minDifference >= _core_utils_Time__WEBPACK_IMPORTED_MODULE_5__.getDuration("day", 29 * 6) && baseInterval.count == 5) {
        baseInterval.count = 6;
      }
    } // handle daylight saving


    if (this.minDifference >= _core_utils_Time__WEBPACK_IMPORTED_MODULE_5__.getDuration("hour", 23) && baseInterval.timeUnit == "hour") {
      baseInterval.timeUnit = "day";
      baseInterval.count = 1;
    }

    if (this.minDifference >= _core_utils_Time__WEBPACK_IMPORTED_MODULE_5__.getDuration("week", 1) - _core_utils_Time__WEBPACK_IMPORTED_MODULE_5__.getDuration("hour", 1) && baseInterval.timeUnit == "day") {
      baseInterval.timeUnit = "week";
      baseInterval.count = 1;
    }

    if (this.minDifference >= _core_utils_Time__WEBPACK_IMPORTED_MODULE_5__.getDuration("year", 1) - _core_utils_Time__WEBPACK_IMPORTED_MODULE_5__.getDuration("day", 1.01) && baseInterval.timeUnit == "month") {
      baseInterval.timeUnit = "year";
      baseInterval.count = 1;
    }

    this._baseIntervalReal = baseInterval;
    this._mainBaseInterval = baseInterval; // no need to invalidate
  };

  Object.defineProperty(DateAxis.prototype, "baseInterval", {
    /**
     * @return Base interval
     */
    get: function get() {
      if (this._groupInterval) {
        return this._groupInterval;
      } else if (this._baseInterval) {
        return this._baseInterval;
      } else {
        return this._baseIntervalReal;
      }
    },

    /**
     * A base interval (granularity) of data.
     *
     * Used to indicate what are the base units of your data.
     *
     * For example, if you have a data set that has a data point every 5 minutes,
     * you may want to set this to `{ timeUnit: "minute", count: 5 }`.
     *
     * If not set, the Axis will try to determine the setting by its own, looking
     * at actual data.
     *
     * For best results, try to follow these values for `count`:
     *
     * When unit is "month", use 12 / count = round number
     * When unit is "hour", use 24 / count = round number
     * When unit is "second" and "minute", use 60 / count = round number
     *
     * @param timeInterval base interval
     */
    set: function set(timeInterval) {
      if (JSON.stringify(this._baseInterval) != JSON.stringify(timeInterval)) {
        this._baseInterval = timeInterval;
        this._mainBaseInterval = timeInterval;

        if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_6__.isNumber(timeInterval.count)) {
          timeInterval.count = 1;
        }

        this.invalidate();
        this.postProcessSeriesDataItems();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(DateAxis.prototype, "mainBaseInterval", {
    /**
     * Indicates granularity of the data of source (unaggregated) data.
     *
     * @since 4.7.0
     * @return Granularity of the main data set
     */
    get: function get() {
      if (this._baseInterval) {
        return this._baseInterval;
      } else if (this._mainBaseInterval) {
        return this._mainBaseInterval;
      } else {
        return this._baseIntervalReal;
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(DateAxis.prototype, "skipEmptyPeriods", {
    /**
     * @return Remove empty stretches of time?
     */
    get: function get() {
      return this.getPropertyValue("skipEmptyPeriods");
    },

    /**
     * If enabled, axis will automatically collapse empty (without data points)
     * periods of time, i.e. weekends.
     *
     * An "empty" period is considered a stretch of time in the length of current
     * `baseInterval` without a single data point in it.
     *
     * For each such empty period, axis will automatically create an
     * [[AxisBreak]]. By default they will be invisible. You can still configure
     * them by accessing `axis.breaks.template`.
     *
     * [More info about breaks](https://www.amcharts.com/docs/v4/concepts/axes/#Breaks).
     *
     * Important notes:
     * * If you set this property to `true`, you can not add your custom axis breaks to this axis anymore.
     * * Using this feature affects performance. Use only if you need it.
     * * Setting this to `true` will reset appearance of breaks. If you want to modify appearance, do it *after* you set `skipEmptyPeriods`.
     * * Some axis label overlapping might happen.
     * * This setting is not compatible with `groupData = true`.
     *
     * @default false
     * @param value  Remove empty stretches of time?
     */
    set: function set(value) {
      if (value) {
        var breakTemplate = this.axisBreaks.template;
        breakTemplate.startLine.disabled = true;
        breakTemplate.endLine.disabled = true;
        breakTemplate.fillShape.disabled = true;
        breakTemplate.breakSize = 0;
      } else {
        if (this._gapBreaks) {
          this.axisBreaks.clear();
          this._gapBreaks = false;
        }
      }

      if (this.setPropertyValue("skipEmptyPeriods", value)) {
        this.invalidate();
        this.postProcessSeriesDataItems();
        this.invalidateSeries();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(DateAxis.prototype, "tooltipDateFormat", {
    /**
     * @return Date format
     */
    get: function get() {
      return this.getPropertyValue("tooltipDateFormat");
    },

    /**
     * A special date format to apply axis tooltips.
     *
     * Will use same format as for labels, if not set.
     *
     * @param value  Date format
     */
    set: function set(value) {
      this.setPropertyValue("tooltipDateFormat", value);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(DateAxis.prototype, "markUnitChange", {
    /**
     * @return Use different format for period beginning?
     */
    get: function get() {
      return this.getPropertyValue("markUnitChange");
    },

    /**
     * Use `periodChangeDateFormats` to apply different formats to the first
     * label in bigger time unit.
     *
     * @default true
     * @param value  Use different format for period beginning?
     */
    set: function set(value) {
      if (this.setPropertyValue("markUnitChange", value)) {
        this.invalidateData();
      }
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Returns text to show in a tooltip, based on specific relative position
   * within axis.
   *
   * The label will be formatted as per [[DateFormatter]] set for the whole
   * chart, or explicitly for this Axis.
   *
   * @ignore Exclude from docs
   * @param position  Position
   * @return Label (formatted date)
   */

  DateAxis.prototype.getTooltipText = function (position) {
    var text;
    var date = this.positionToDate(position);
    date = _core_utils_Time__WEBPACK_IMPORTED_MODULE_5__.round(date, this.baseInterval.timeUnit, this.baseInterval.count, this._firstWeekDay, this._df.utc, new Date(this.min), this._df.timezoneMinutes, this._df.timezone);
    this.tooltipDate = date;

    if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_6__.hasValue(this.tooltipDateFormat)) {
      text = this._df.format(date, this.tooltipDateFormat, ["day", "month", "week", "year"].indexOf(this.baseInterval.timeUnit) == -1);
    } else {
      var dateFormat = this.dateFormats.getKey(this.baseInterval.timeUnit);

      if (dateFormat) {
        text = this._df.format(date, dateFormat);
      } else {
        text = this.getPositionLabel(position);
      }
    }

    if (!this._adapterO) {
      return text;
    } else {
      return this._adapterO.apply("getTooltipText", text);
    }
  };
  /**
   * Takes an absolute position within axis and adjust it to a specific position within base interval. (cell)
   *
   * @ignore Exclude from docs
   * @param position Source position
   * @param location  Location in the cell
   * @return Adjusted position
   */


  DateAxis.prototype.roundPosition = function (position, location, axisLocation) {
    var baseInterval = this.baseInterval;
    var timeUnit = baseInterval.timeUnit;
    var count = baseInterval.count;
    var date = this.positionToDate(position);
    _core_utils_Time__WEBPACK_IMPORTED_MODULE_5__.round(date, timeUnit, count, this._firstWeekDay, this._df.utc, undefined, this._df.timezoneMinutes, this._df.timezone);

    if (location > 0) {
      _core_utils_Time__WEBPACK_IMPORTED_MODULE_5__.add(date, timeUnit, location * count, this._df.utc);
    }

    if (axisLocation > 0 && axisLocation < 1) {
      date.setTime(date.getTime() + this.baseDuration * axisLocation);
    }

    if (this.isInBreak(date.getTime())) {
      while (date.getTime() < this.max) {
        _core_utils_Time__WEBPACK_IMPORTED_MODULE_5__.add(date, timeUnit, count, this._df.utc);

        if (!this.isInBreak(date.getTime())) {
          break;
        }
      }
    }

    return this.dateToPosition(date);
  };
  /**
   * Returns an relative position of the start of the cell (period), that specific position value falls into.
   *
   * @ignore Exclude from docs
   * @todo Description (review)
   * @param position  Relative position
   * @return Cell start relative position
   */


  DateAxis.prototype.getCellStartPosition = function (position) {
    return this.roundPosition(position, 0);
  };
  /**
   * Returns an relative position of the end of the cell (period), that specific position value falls into.
   *
   * @ignore Exclude from docs
   * @todo Description (review)
   * @param position  Relative position
   * @return Cell end relative position
   */


  DateAxis.prototype.getCellEndPosition = function (position) {
    return this.roundPosition(position, 1); //return this.dateToPosition($time.add(this.positionToDate(this.roundPosition(position, 1)), this.baseInterval.timeUnit, this.baseInterval.count));
  };
  /**
   * Returns a Series data item that corresponds to the specific pixel position
   * of the Axis.
   *
   * If `findNearest` (third parameter) is set to `true`, the method will try
   * to locate nearest available data item if none is found directly under
   * `position`.
   *
   * @param series       Series
   * @param position     Position (px)
   * @param findNearest  Should axis try to find nearest tooltip if there is no data item at exact position
   * @return Data item
   */


  DateAxis.prototype.getSeriesDataItem = function (series, position, findNearest) {
    var value = this.positionToValue(position);
    var location = 0.5;

    if (this.axisLetter == "Y") {
      location = series.dataItems.template.locations.dateY;
    } else {
      location = series.dataItems.template.locations.dateX;
    }

    var deltaValue = value - location * this.baseDuration;
    var date = _core_utils_Time__WEBPACK_IMPORTED_MODULE_5__.round(new Date(value), this.baseInterval.timeUnit, this.baseInterval.count, this._firstWeekDay, this._df.utc, undefined, this._df.timezoneMinutes, this._df.timezone);
    var nextDate = _core_utils_Time__WEBPACK_IMPORTED_MODULE_5__.round(new Date(value + this.baseDuration), this.baseInterval.timeUnit, this.baseInterval.count, this._firstWeekDay, this._df.utc, undefined, this._df.timezoneMinutes, this._df.timezone);

    if (nextDate.getTime() > date.getTime()) {
      if (Math.abs(nextDate.getTime() - deltaValue) < Math.abs(deltaValue - date.getTime())) {
        date = nextDate;
      }
    }

    var dataItemsByAxis = series.dataItemsByAxis.getKey(this.uid);
    var dataItem = dataItemsByAxis.getKey(date.getTime() + series.currentDataSetId); // todo:  alternatively we can find closiest here

    if (!dataItem && findNearest) {
      var key_1;

      if (this.axisLetter == "Y") {
        key_1 = "dateY";
      } else {
        key_1 = "dateX";
      }

      dataItem = series.dataItems.getIndex(series.dataItems.findClosestIndex(date.getTime(), function (x) {
        if (x[key_1]) {
          return x[key_1].getTime();
        } else {
          return -Infinity;
        }
      }, "any"));
    }

    return dataItem;
  };
  /**
   * Returns a formatted date based on position in axis scale.
   *
   * Please note that `position` represents position within axis which may be
   * zoomed and not correspond to Cursor's `position`.
   *
   * To convert Cursor's `position` to Axis' `position` use `toAxisPosition()` method.
   *
   * @see {@link https://www.amcharts.com/docs/v4/tutorials/tracking-cursors-position-via-api/#Tracking_Cursor_s_position} For more information about cursor tracking.
   * @param position  Relative position on axis (0-1)
   * @return Position label
   */


  DateAxis.prototype.getPositionLabel = function (position) {
    // @todo Better format recognition
    var date = this.positionToDate(position);
    return this._df.format(date, this.getCurrentLabelFormat());
  };
  /**
   * Returns label date format based on currently used time units
   *
   * @return Format
   */


  DateAxis.prototype.getCurrentLabelFormat = function () {
    return this.dateFormats.getKey(this._gridInterval ? this._gridInterval.timeUnit : "day");
  };
  /**
   * Initializes an Axis renderer.
   *
   * @ignore Exclude from docs
   */


  DateAxis.prototype.initRenderer = function () {
    _super.prototype.initRenderer.call(this);

    var renderer = this.renderer;

    if (renderer) {
      // Set defaults
      renderer.ticks.template.location = 0;
      renderer.grid.template.location = 0;
      renderer.labels.template.location = 0;
      renderer.baseGrid.disabled = true;
    }
  };

  Object.defineProperty(DateAxis.prototype, "basePoint", {
    /**
     * Coordinates of the actual axis start.
     *
     * @ignore Exclude from docs
     * @return Base point
     */
    get: function get() {
      return {
        x: 0,
        y: 0
      };
    },
    enumerable: true,
    configurable: true
  });
  /**
   * @ignore
   */

  DateAxis.prototype.animateMinMax = function (min, max) {
    var _this = this;

    var animation = this.animate([{
      property: "_minAdjusted",
      from: this._minAdjusted,
      to: min
    }, {
      property: "_maxAdjusted",
      from: this._maxAdjusted,
      to: max
    }], this.rangeChangeDuration, this.rangeChangeEasing);
    animation.events.on("animationprogress", function () {
      _this.dispatch("extremeschanged");
    });
    return animation;
  };
  /**
   * Invalidates axis data items when series extremes change
   */


  DateAxis.prototype.handleExtremesChange = function () {
    _super.prototype.handleExtremesChange.call(this);

    if (this.groupData) {
      var id = this.baseInterval.timeUnit + this.baseInterval.count;
      this.groupMin[id] = this._finalMin;
      this.groupMax[id] = this._finalMax;
    }
  };
  /**
   * Zooms axis to specific Dates.
   *
   * @param startDate       Start date
   * @param endValue        End date
   * @param skipRangeEvent  Do not invoke events
   * @param instantly       Do not play zoom animations
   */


  DateAxis.prototype.zoomToDates = function (startDate, endDate, skipRangeEvent, instantly, adjust) {
    startDate = this._df.parse(startDate);
    endDate = this._df.parse(endDate);
    this.zoomToValues(startDate.getTime(), endDate.getTime(), skipRangeEvent, instantly, adjust);
  };
  /**
   * Zooms axis to specific values.
   *
   * @param startValue      Start value
   * @param endValue        End value
   * @param skipRangeEvent  Do not invoke events
   * @param instantly       Do not play zoom animations
   */


  DateAxis.prototype.zoomToValues = function (startValue, endValue, skipRangeEvent, instantly, adjust) {
    var _this = this;

    if (!this.groupData) {
      //let start: number = (startValue - this.min) / (this.max - this.min);
      //let end: number = (endValue - this.min) / (this.max - this.min);
      var start = this.valueToPosition(startValue);
      var end = this.valueToPosition(endValue);
      this.zoom({
        start: start,
        end: end
      }, skipRangeEvent, instantly);
    } else {
      var difference = this.adjustDifference(startValue, endValue);
      var isEnd = false;

      if (endValue == this.max) {
        isEnd = true;
      }

      var isStart = false;

      if (startValue == this.min) {
        isStart = true;
      }

      if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_6__.hasValue(difference)) {
        var mainBaseInterval = this.mainBaseInterval;
        var groupInterval_1 = this.chooseInterval(0, difference, this.groupCount, this.groupIntervals);

        if (groupInterval_1.timeUnit == mainBaseInterval.timeUnit && groupInterval_1.count < mainBaseInterval.count || _core_utils_Time__WEBPACK_IMPORTED_MODULE_5__.getDuration(groupInterval_1.timeUnit, 1) < _core_utils_Time__WEBPACK_IMPORTED_MODULE_5__.getDuration(mainBaseInterval.timeUnit, 1)) {
          groupInterval_1 = (0,tslib__WEBPACK_IMPORTED_MODULE_13__.__assign)({}, mainBaseInterval);
        }

        var id = groupInterval_1.timeUnit + groupInterval_1.count;
        var min_1 = this.groupMin[id];
        var max_1 = this.groupMax[id];

        if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_6__.isNumber(min_1) || !_core_utils_Type__WEBPACK_IMPORTED_MODULE_6__.isNumber(max_1)) {
          min_1 = Number.POSITIVE_INFINITY;
          max_1 = Number.NEGATIVE_INFINITY;
          this.series.each(function (series) {
            var seriesMin = series.min(_this);
            var seriesMax = series.max(_this);

            if (series._dataSets) {
              var ds = series._dataSets.getKey(groupInterval_1.timeUnit + groupInterval_1.count);

              if (ds) {
                var mindi = ds.getIndex(0);
                var maxdi = ds.getIndex(ds.length - 1);

                if (mindi) {
                  if (series.xAxis == _this) {
                    seriesMin = mindi.dateX.getTime();
                  } else if (series.yAxis == _this) {
                    seriesMin = mindi.dateY.getTime();
                  }
                }

                if (maxdi) {
                  if (series.xAxis == _this) {
                    seriesMax = maxdi.dateX.getTime();
                  } else if (series.yAxis == _this) {
                    seriesMax = maxdi.dateY.getTime();
                  }
                }
              }
            }

            seriesMax = _core_utils_Time__WEBPACK_IMPORTED_MODULE_5__.round(_core_utils_Time__WEBPACK_IMPORTED_MODULE_5__.add(new Date(seriesMax), groupInterval_1.timeUnit, 1, _this._df.utc), groupInterval_1.timeUnit, 1, _this._df.firstDayOfWeek, _this._df.utc, undefined, _this._df.timezoneMinutes, _this._df.timezone).getTime();

            if (seriesMin < min_1) {
              min_1 = seriesMin;
            }

            if (seriesMax > max_1) {
              max_1 = seriesMax;
            }
          });
          this.groupMin[id] = min_1;
          this.groupMax[id] = max_1;
        }

        startValue = _core_utils_Math__WEBPACK_IMPORTED_MODULE_8__.fitToRange(startValue, min_1, max_1);
        endValue = _core_utils_Math__WEBPACK_IMPORTED_MODULE_8__.fitToRange(endValue, min_1, max_1);

        if (adjust) {
          if (isEnd) {
            startValue = endValue - difference;
            startValue = _core_utils_Math__WEBPACK_IMPORTED_MODULE_8__.fitToRange(startValue, min_1, max_1);
          }

          if (isStart) {
            endValue = startValue + difference;
            endValue = _core_utils_Math__WEBPACK_IMPORTED_MODULE_8__.fitToRange(endValue, min_1, max_1);
          }
        }

        var start = (startValue - min_1) / (max_1 - min_1);
        var end = (endValue - min_1) / (max_1 - min_1);
        this.zoom({
          start: start,
          end: end
        }, skipRangeEvent, instantly);
      }
    }
  };
  /**
   * Adds `baseInterval` to "as is" fields.
   *
   * @param field  Field name
   * @return Assign as is?
   */


  DateAxis.prototype.asIs = function (field) {
    return field == "baseInterval" || _super.prototype.asIs.call(this, field);
  };
  /**
   * Copies all properties and related data from a different instance of Axis.
   *
   * @param source Source Axis
   */


  DateAxis.prototype.copyFrom = function (source) {
    var _this = this;

    _super.prototype.copyFrom.call(this, source);

    this.dateFormats = source.dateFormats;
    this.periodChangeDateFormats = source.periodChangeDateFormats;
    this.groupIntervals.clear();
    source.groupIntervals.each(function (interval) {
      _this.groupIntervals.push((0,tslib__WEBPACK_IMPORTED_MODULE_13__.__assign)({}, interval));
    });
    this.gridIntervals.clear();
    source.gridIntervals.each(function (interval) {
      _this.gridIntervals.push((0,tslib__WEBPACK_IMPORTED_MODULE_13__.__assign)({}, interval));
    });

    if (source._baseInterval) {
      this.baseInterval = source._baseInterval;
    }
  };
  /**
   * Shows Axis tooltip at specific relative position within Axis. (0-1)
   *
   * @param position Position (0-1)
   * @param local or global position
   */


  DateAxis.prototype.showTooltipAtPosition = function (position, local) {
    var _this = this;

    if (!local) {
      position = this.toAxisPosition(position);
    }

    if (this.snapTooltip) {
      // rounding is not good, pen/aac4e7f66f019d36b2447f050c600c13 (no last tootltip shown)
      var actualDate = this.positionToDate(position); //$time.round(this.positionToDate(position), this.baseInterval.timeUnit, 1, this.getFirstWeekDay(), this.dateFormatter.utc, undefined, this._df.timezoneMinutes, this._df.timezone);

      var actualTime_1 = actualDate.getTime();
      var closestDate_1;
      this.series.each(function (series) {
        if (series.baseAxis == _this) {
          var dataItem = _this.getSeriesDataItem(series, position, true);

          if (dataItem) {
            var date = void 0;

            if (series.xAxis == _this) {
              date = dataItem.dateX;
            }

            if (series.yAxis == _this) {
              date = dataItem.dateY;
            }

            if (!closestDate_1) {
              closestDate_1 = date;
            } else {
              if (Math.abs(closestDate_1.getTime() - actualTime_1) > Math.abs(date.getTime() - actualTime_1)) {
                closestDate_1 = date;
              }
            }
          }
        }
      });

      if (closestDate_1) {
        var closestTime_1 = closestDate_1.getTime();
        closestDate_1 = _core_utils_Time__WEBPACK_IMPORTED_MODULE_5__.round(new Date(closestTime_1), this.baseInterval.timeUnit, this.baseInterval.count, this._firstWeekDay, this._df.utc, undefined, this._df.timezoneMinutes, this._df.timezone);
        closestTime_1 = closestDate_1.getTime();
        var tooltipLocation = this.renderer.tooltipLocation;

        if (tooltipLocation == 0) {
          tooltipLocation = 0.0001;
        }

        closestDate_1 = new Date(closestDate_1.getTime() + this.baseDuration * tooltipLocation);
        position = this.dateToPosition(closestDate_1);

        if (this.chart.cursor && this.chart.cursor.snapToSeries) {//void
        } else {
          this.series.each(function (series) {
            var dataItem = series.dataItemsByAxis.getKey(_this.uid).getKey(closestTime_1 + series.currentDataSetId);
            var point = series.showTooltipAtDataItem(dataItem);

            if (point) {
              _this.chart._seriesPoints.push({
                series: series,
                point: point
              });
            } else {
              // check, otherwise column tooltip will be hidden
              if (series.tooltipText || series.tooltipHTML) {
                series.hideTooltip();
              }
            }
          });
        } //this.chart.sortSeriesTooltips(seriesPoints);

      }
    }

    _super.prototype.showTooltipAtPosition.call(this, position, true);
  };

  Object.defineProperty(DateAxis.prototype, "snapTooltip", {
    /**
     * @return Should snap?
     */
    get: function get() {
      return this.getPropertyValue("snapTooltip");
    },

    /**
     * Should the nearest tooltip be shown if no data item is found on the
     * current cursor position.
     *
     * @default true
     * @param value  Should snap?
     */
    set: function set(value) {
      this.setPropertyValue("snapTooltip", value);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(DateAxis.prototype, "groupData", {
    /**
     * @return Group data points?
     */
    get: function get() {
      return this.getPropertyValue("groupData");
    },

    /**
     * Indicates if data should be aggregated to composide data items if there
     * are more data items in selected range than `groupCount`.
     *
     * Grouping will occur automatically, based on current selection range, and
     * will change dynamically when user zooms in/out the chart.
     *
     * NOTE: This works only if [[DateAxis]] is base axis of an [[XYSeries]].
     *
     * The related [[XYSeries]] also needs to be set up to take advantage of, by
     * setting its [`groupFields`](https://www.amcharts.com/docs/v4/reference/xyseries/#groupFields_property).
     *
     * The group intervals to aggregate data to is defined by `groupIntervals`
     * property.
     *
     * ```TypeScript
     * let dateAxis = chart.xAxes.push(new am4charts.DateAxis());
     * dateAxis.groupData = true;
     *
     * let valueAxis = chart.xAxes.push(new am4charts.valueAxis());
     *
     * let series = chart.series.push(new am4charts.LineSeries());
     * series.dataFields.dateX = "date";
     * series.dataFields.valueY = "value";
     * series.groupFields.valueY = "average";
     * ```
     * ```JavaScript
     * var dateAxis = chart.xAxes.push(new am4charts.DateAxis());
     * dateAxis.groupData = true;
     *
     * var valueAxis = chart.xAxes.push(new am4charts.valueAxis());
     *
     * var series = chart.series.push(new am4charts.LineSeries());
     * series.dataFields.dateX = "date";
     * series.dataFields.valueY = "value";
     * series.groupFields.valueY = "average";
     * ```
     * ```JSON
     * {
     *   // ...
     *   "xAxes": [{
     *     "type": "DateAxis",
     *     "groupData": true
     *   }],
     *   "yAxes": [{
     *     "type": "ValueAxis"
     *   }],
     *   "series": [{
     *     "type": "LineSeries",
     *     "dataFields": {
     *       "dateX": "date",
     *       "valueY": "value"
     *     },
     *     "groupFields": {
     *       "valueY": "average"
     *     }
     *   }]
     * }
     * ```
     *
     * @default false
     * @see {@link https://www.amcharts.com/docs/v4/concepts/axes/date-axis/#Dynamic_data_item_grouping} for more information about dynamic data item grouping.
     * @since 4.7.0
     * @param  value  Group data points?
     */
    set: function set(value) {
      var _this = this;

      if (this.setPropertyValue("groupData", value)) {
        this.series.each(function (series) {
          series.setDataSet("");

          if (value && !series.dataGrouped && series.inited) {
            series._baseInterval[_this.uid] = _this.mainBaseInterval;

            _this.groupSeriesData(series);
          }
        });
        this._currentDataSetId = "";
        this._groupInterval = undefined;
        this.invalidate();
        this.invalidateSeries();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(DateAxis.prototype, "groupInterval", {
    /**
     * @return Interval
     */
    get: function get() {
      return this.getPropertyValue("groupInterval");
    },

    /**
     * Disables automatic selection of data grouping intervals and always uses
     * `groupInterval` if set. Works only if `groupData = true`.
     *
     * @since 4.9.24
     * @param  value  Interval
     */
    set: function set(value) {
      if (this.setPropertyValue("groupInterval", value)) {
        this.invalidate();
        this.invalidateSeries();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(DateAxis.prototype, "groupCount", {
    /**
     * @return Number of data items
     */
    get: function get() {
      return this.getPropertyValue("groupCount");
    },

    /**
     * Indicates threshold of data items in selected range at which to start
     * aggregating data items if `groupData = true`.
     *
     * @default 200
     * @since 4.7.0
     * @param  value  Number of data items
     */
    set: function set(value) {
      this.setPropertyValue("groupCount", value);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(DateAxis.prototype, "timezoneOffset", {
    /**
     * @todo Timezone offset in minutes
     */
    get: function get() {
      return this.getPropertyValue("timezoneOffset");
    },

    /**
     * If set will recalculate all timestamps in data by applying specific offset
     * in minutes.
     *
     * IMPORTANT: do not set `timezoneOffset` on both `DateAxis` and `dateFormatter`. It
     * will skew your results by applying offset twice.
     *
     * @since 4.8.5
     * @param  value Time zone offset in minutes
     */
    set: function set(value) {
      this.setPropertyValue("timezoneOffset", value);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(DateAxis.prototype, "timezone", {
    /**
     * @return Timezone
     */
    get: function get() {
      return this.getPropertyValue("timezone");
    },

    /**
     * If set will recalculate all timestamps in data to specific named timezone,
     * e.g. `"America/Vancouver"`, `"Australia/Sydney"`, `"UTC"`, etc.
     *
     * IMPORTANT: it is no longer recommended to use this setting. Please
     * set`timezone` on `dateFormatter`.
     *
     * @deprecated
     * @since 4.10.1
     * @param  value Time zone
     */
    set: function set(value) {
      this.setPropertyValue("timezone", value);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(DateAxis.prototype, "gridInterval", {
    /**
     * Current grid interval.
     *
     * @return Grid interval
     */
    get: function get() {
      return this._gridInterval;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * @ignore
   */

  DateAxis.prototype.makeGap = function (dataItem, previous) {
    var series = dataItem.component;

    if (dataItem && previous) {
      if (!series.connect && _core_utils_Type__WEBPACK_IMPORTED_MODULE_6__.isNumber(series.autoGapCount)) {
        if (series.baseAxis == this) {
          var date = dataItem.dates["date" + this.axisLetter];
          var prevDate = previous.dates["date" + this.axisLetter];

          if (date && prevDate) {
            var time = date.getTime();
            var prevTime = prevDate.getTime();

            if (time - prevTime > series.autoGapCount * this.baseDuration) {
              return true;
            }
          }
        }
      }
    }

    return false;
  };

  Object.defineProperty(DateAxis.prototype, "baseValue", {
    /**
     * @return base value
     */
    get: function get() {
      return this.min;
    },
    enumerable: true,
    configurable: true
  });
  return DateAxis;
}(_ValueAxis__WEBPACK_IMPORTED_MODULE_0__.ValueAxis);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_4__.registry.registeredClasses.DateAxis = DateAxis;
_core_Registry__WEBPACK_IMPORTED_MODULE_4__.registry.registeredClasses.DateAxisDataItem = DateAxisDataItem;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/DateAxisBreak.js":
/*!*********************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/axes/DateAxisBreak.js ***!
  \*********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "DateAxisBreak": () => (/* binding */ DateAxisBreak)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _ValueAxisBreak__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ValueAxisBreak */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/ValueAxisBreak.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/**
 * DateAxisBreak includes functionality to add breaks on a [[DateAxis]].
 *
 * A "break" can be used to "cut out" specific ranges of the axis scale, e.g.
 * weekends and holidays out of the Date-based axis.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */



/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Class used to define breaks for [[DateAxis]].
 *
 * A "break" can be used to "cut out" specific ranges of the axis scale, e.g.
 * weekends and holidays out of the Date-based axis.
 *
 * @see {@link IDateAxisBreakEvents} for a list of available events
 * @see {@link IDateAxisBreakAdapters} for a list of available Adapters
 * @important
 */

var DateAxisBreak =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(DateAxisBreak, _super);
  /**
   * Constructor
   */


  function DateAxisBreak() {
    var _this = _super.call(this) || this;

    _this.className = "DateAxisBreak";

    _this.applyTheme();

    return _this;
  }

  Object.defineProperty(DateAxisBreak.prototype, "startDate", {
    /**
     * @return Start date
     */
    get: function get() {
      return this.getPropertyValue("startDate");
    },

    /**
     * Starting date for the break.
     *
     * @param value Start date
     */
    set: function set(value) {
      if (this.setPropertyValue("startDate", value)) {
        this.startValue = value.getTime();

        if (this.axis) {
          this.axis.invalidate();
          this.axis.invalidateSeries();
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(DateAxisBreak.prototype, "endDate", {
    /**
     * @return End date
     */
    get: function get() {
      return this.getPropertyValue("endDate");
    },

    /**
     * Ending date for the break.
     *
     * @param value End date
     */
    set: function set(value) {
      if (this.setPropertyValue("endDate", value)) {
        this.endValue = value.getTime();

        if (this.axis) {
          this.axis.invalidate();
          this.axis.invalidateSeries();
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  return DateAxisBreak;
}(_ValueAxisBreak__WEBPACK_IMPORTED_MODULE_0__.ValueAxisBreak);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses.DateAxisBreak = DateAxisBreak;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/DurationAxis.js":
/*!********************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/axes/DurationAxis.js ***!
  \********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "DurationAxis": () => (/* binding */ DurationAxis),
/* harmony export */   "DurationAxisDataItem": () => (/* binding */ DurationAxisDataItem)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _ValueAxis__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ValueAxis */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/ValueAxis.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
/**
 * DurationAxis module
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */




/**
 * ============================================================================
 * DATA ITEM
 * ============================================================================
 * @hidden
 */

/**
 * Defines data item for [[DurationAxis]].
 *
 * @see {@link DataItem}
 */

var DurationAxisDataItem =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__extends)(DurationAxisDataItem, _super);
  /**
   * Constructor
   */


  function DurationAxisDataItem() {
    var _this = _super.call(this) || this;

    _this.className = "DurationAxisDataItem";

    _this.applyTheme();

    return _this;
  }

  return DurationAxisDataItem;
}(_ValueAxis__WEBPACK_IMPORTED_MODULE_0__.ValueAxisDataItem);


/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Used to create an axis that shows time durations.
 *
 * ```TypeScript
 * // Create the axis
 * let xAxis = chart.xAxes.push(new am4charts.DurationAxis());
 *
 * // Set settings
 * xAxis.title.text = "Time";
 * ```
 * ```JavaScript
 * // Create the axis
 * var valueAxis = chart.xAxes.push(new am4charts.DurationAxis());
 *
 * // Set settings
 * valueAxis.title.text = "Time";
 * ```
 * ```JSON
 * "xAxes": [{
 *   "type": "DurationAxis",
 *   "title": {
 *     "text": "Time"
 *   }
 * }]
 * ```
 *
 * @see {@link https://www.amcharts.com/docs/v4/concepts/formatters/formatting-duration/} for mor information about duration formatters.
 * @see {@link IDurationAxisEvents} for a list of available Events
 * @see {@link IDurationAxisAdapters} for a list of available Adapters
 * @important
 */

var DurationAxis =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__extends)(DurationAxis, _super);
  /**
   * Constructor
   */


  function DurationAxis() {
    var _this = // Init
    _super.call(this) || this;
    /**
     * A base unit (granularity) of data.
     *
     * Used to indicate what are the base units of your data.
     */


    _this._baseUnit = "second";
    _this.className = "DurationAxis";

    _this.setPropertyValue("maxZoomFactor", 1000000); // Apply theme


    _this.applyTheme();

    return _this;
  }
  /**
   * Formats the value according to axis' own [[DurationFormatter]].
   *
   * @param value  Source value
   * @return Formatted value
   */


  DurationAxis.prototype.formatLabel = function (value, format) {
    return this.durationFormatter.format(value, format || this.axisDurationFormat);
  };
  /**
   * Adjusts actual min and max scale values so that the axis starts and ends
   * at "nice" values, unless `strictMinMax` is set.
   *
   * The `difference` can be something else than `max - min`, because of the
   * axis breaks.
   *
   * @ignore Exclude from docs
   * @todo Description
   * @param min        [description]
   * @param max        [description]
   * @param difference [description]
   * @param gridCount  [description]
   * @param strictMode [description]
   * @return [description]
   */


  DurationAxis.prototype.adjustMinMax = function (min, max, difference, gridCount, strictMode) {
    var e_1, _a;

    var minMaxStep;
    var timeUnit = this.baseUnit; // we don't allow to go to smaller units, setting so to avoid invalidation

    this.setPropertyValue("maxPrecision", 0);

    if (timeUnit == "millisecond" || timeUnit == "second" || timeUnit == "minute" || timeUnit == "hour") {
      // will fail if 0
      if (gridCount <= 1) {
        gridCount = 1;
      }

      gridCount = Math.round(gridCount);
      var initialMin = min;
      var initialMax = max; // in case min and max is the same, use max

      if (difference === 0) {
        difference = Math.abs(max);
      }

      var step = difference / gridCount;
      var divisors = [60, 30, 20, 15, 10, 2, 1];
      var realDivisor = 1;

      if (timeUnit == "hour") {
        divisors = [24, 12, 6, 4, 2, 1];
      }

      try {
        for (var divisors_1 = (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__values)(divisors), divisors_1_1 = divisors_1.next(); !divisors_1_1.done; divisors_1_1 = divisors_1.next()) {
          var divisor = divisors_1_1.value;

          if (difference / divisor > gridCount) {
            realDivisor = divisor;
            break;
          }
        }
      } catch (e_1_1) {
        e_1 = {
          error: e_1_1
        };
      } finally {
        try {
          if (divisors_1_1 && !divisors_1_1.done && (_a = divisors_1.return)) _a.call(divisors_1);
        } finally {
          if (e_1) throw e_1.error;
        }
      }

      var count = Math.ceil((max - min) / realDivisor / gridCount);
      var exponent = Math.log(Math.abs(count)) * Math.LOG10E;
      var power = Math.pow(10, Math.floor(exponent)) / 10;
      var reducedCount = count / power; // find closest to divisor

      var closest = _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.closest(divisors, reducedCount);
      count = closest * power;
      step = realDivisor * count; // TODO can this be removed ?

      this.durationFormatter.getValueUnit(step, this.baseUnit);
      min = Math.floor(min / step) * step;
      max = Math.ceil(max / step) * step;

      if (strictMode) {
        min -= step;

        if (min < 0 && initialMin >= 0) {
          min = 0;
        }

        max += step;

        if (max > 0 && initialMax <= 0) {
          max = 0;
        }
      }

      minMaxStep = {
        min: min,
        max: max,
        step: step
      };
    } else {
      minMaxStep = _super.prototype.adjustMinMax.call(this, min, max, difference, gridCount, strictMode);
    } // choose duration formatter based on step


    this.axisDurationFormat = this.durationFormatter.getFormat(minMaxStep.step, minMaxStep.max, this.baseUnit);
    return minMaxStep;
  };

  Object.defineProperty(DurationAxis.prototype, "tooltipDurationFormat", {
    /**
     * @return Duration format for axis labels
     */
    get: function get() {
      return this._tooltipDurationFormat;
    },

    /**
     * A special duration format to apply axis tooltips.
     *
     * Will use same format as for labels, if not set.
     *
     * @see {@link https://www.amcharts.com/docs/v4/concepts/formatters/formatting-duration/} for mor information.
     * @param value  Duration format for axis labels
     */
    set: function set(value) {
      this._tooltipDurationFormat = value;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Returns text to show in a axis tooltip, based on specific position within
   * axis.
   *
   * The label will be formatted as per [[NumberFormatter]] set for the whole
   * chart, or explicitly for this Axis.
   *
   * @ignore Exclude from docs
   * @param position  Position (px)
   * @return Label (numeric value)
   */

  DurationAxis.prototype.getTooltipText = function (position) {
    var value = _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.round(this.positionToValue(position), this._stepDecimalPlaces);
    var valueStr = this.formatLabel(value, this.tooltipDurationFormat);

    if (!this._adapterO) {
      return valueStr;
    } else {
      return this._adapterO.apply("getTooltipText", valueStr);
    }
  };

  Object.defineProperty(DurationAxis.prototype, "baseUnit", {
    /**
     * @return Base unit
     */
    get: function get() {
      return this._baseUnit;
    },

    /**
     * A base unit (granularity) of data.
     *
     * Used to indicate what are the base units of your data.
     *
     * Available options: "millisecond", "second" (default), "minute", "hour",
     * "day", "week", "month", "year".
     *
     * @default "second"
     * @param timeUnit
     */
    set: function set(timeUnit) {
      if (this._baseUnit != timeUnit) {
        this._baseUnit = timeUnit;
        this.durationFormatter.baseUnit = timeUnit;
        this.invalidate();
      }
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Copies all properties and related data from a different instance of Axis.
   *
   * @param source Source Axis
   */

  DurationAxis.prototype.copyFrom = function (source) {
    _super.prototype.copyFrom.call(this, source);

    this.baseUnit = source.baseUnit;
  };

  return DurationAxis;
}(_ValueAxis__WEBPACK_IMPORTED_MODULE_0__.ValueAxis);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses.DurationAxis = DurationAxis;
_core_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses.DurationAxisDataItem = DurationAxisDataItem;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/Grid.js":
/*!************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/axes/Grid.js ***!
  \************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Grid": () => (/* binding */ Grid)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _core_Sprite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../core/Sprite */ "./node_modules/@amcharts/amcharts4/.internal/core/Sprite.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_utils_Color__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/utils/Color */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Color.js");
/* harmony import */ var _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/utils/InterfaceColorSet */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/InterfaceColorSet.js");
/* harmony import */ var _core_utils_Responsive__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../core/utils/Responsive */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Responsive.js");
/**
 * A module defining functionality for axis grid elements.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */






/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Displays an axis grid line.
 *
 * @see {@link IGridEvents} for a list of available events
 * @see {@link IGridAdapters} for a list of available Adapters
 * @todo Review: container is better, as we'll be able to attach something to the grid, also with 3d charts we might need some additional elements
 * @important
 */

var Grid =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__extends)(Grid, _super);
  /**
   * Constructor
   */


  function Grid() {
    var _this = _super.call(this) || this;

    _this.className = "Grid";
    _this.element = _this.paper.add("path");
    _this.location = 0.5;
    _this.isMeasured = false;
    _this.above = false;
    var interfaceColors = new _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_3__.InterfaceColorSet();
    _this.stroke = interfaceColors.getFor("grid");
    _this.pixelPerfect = true;
    _this.strokeOpacity = 0.15;
    _this.fill = (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_2__.color)(); // "none";

    _this.applyTheme();

    return _this;
  }

  Object.defineProperty(Grid.prototype, "location", {
    /**
     * @return Location (0-1)
     */
    get: function get() {
      return this.getPropertyValue("location");
    },

    /**
     * Location within axis cell to place grid line on.
     *
     * * 0 - start
     * * 0.5 - middle
     * * 1 - end
     *
     * @param value  Location (0-1)
     */
    set: function set(value) {
      this.setPropertyValue("location", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Grid.prototype, "above", {
    /**
     * @return Draw above series?
     */
    get: function get() {
      return this.getPropertyValue("above");
    },

    /**
     * Normally fill goes below series. Set this to `true` to go above.
     *
     * @default false
     * @since 4.5.9
     * @param  value  Draw above series?
     */
    set: function set(value) {
      this.setPropertyValue("above", value, true);
    },
    enumerable: true,
    configurable: true
  });
  /**
   * @ignore
   */

  Grid.prototype.setDisabled = function (value) {
    var changed = _super.prototype.setDisabled.call(this, value);

    if (this.axis) {
      this.axis.invalidateDataItems();
    }

    return changed;
  };

  return Grid;
}(_core_Sprite__WEBPACK_IMPORTED_MODULE_0__.Sprite);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses.Grid = Grid;
/**
 * Add default responsive rules
 */

/**
 * Disable grid on smaller charts
 */

_core_utils_Responsive__WEBPACK_IMPORTED_MODULE_4__.defaultRules.push({
  relevant: _core_utils_Responsive__WEBPACK_IMPORTED_MODULE_4__.ResponsiveBreakpoints.maybeXS,
  state: function state(target, stateId) {
    if (target instanceof Grid) {
      var state = target.states.create(stateId);
      state.properties.disabled = true;
      return state;
    }

    return null;
  }
});

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/GridCircular.js":
/*!********************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/axes/GridCircular.js ***!
  \********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "GridCircular": () => (/* binding */ GridCircular)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Grid__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Grid */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/Grid.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/**
 * A module defining functionality for circular axis grid elements.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */



/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Creates a circular grid element for circular-type axis.
 *
 * @see {@link IGridCircularEvents} for a list of available events
 * @see {@link IGridCircularAdapters} for a list of available Adapters
 * @todo Review: container is better, as we'll be able to attach something to the GridCircular, also with 3d charts we might need some additional elements
 */

var GridCircular =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(GridCircular, _super);
  /**
   * Constructor
   */


  function GridCircular() {
    var _this = _super.call(this) || this;

    _this.className = "GridCircular";
    _this.pixelPerfect = false;

    _this.applyTheme();

    return _this;
  }

  Object.defineProperty(GridCircular.prototype, "innerRadius", {
    /**
     * @return Inner radius
     */
    get: function get() {
      return this.getPropertyValue("innerRadius");
    },

    /**
     * Inner radius of the circular grid. (absolute or relative)
     *
     * @param value Inner radius
     */
    set: function set(value) {
      this.setPercentProperty("innerRadius", value, true, false, 10, false);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(GridCircular.prototype, "radius", {
    /**
     * @return Outer radius
     */
    get: function get() {
      return this.getPropertyValue("radius");
    },

    /**
     * Outer radius of the circular grid. (absolute or relative)
     *
     * @param value Outer radius
     */
    set: function set(value) {
      this.setPercentProperty("radius", value, true, false, 10, false);
    },
    enumerable: true,
    configurable: true
  });
  return GridCircular;
}(_Grid__WEBPACK_IMPORTED_MODULE_0__.Grid);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses.GridCircular = GridCircular;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/ValueAxis.js":
/*!*****************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/axes/ValueAxis.js ***!
  \*****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "ValueAxis": () => (/* binding */ ValueAxis),
/* harmony export */   "ValueAxisDataItem": () => (/* binding */ ValueAxisDataItem)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Axis__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Axis */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/Axis.js");
/* harmony import */ var _AxisRendererY__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AxisRendererY */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisRendererY.js");
/* harmony import */ var _core_utils_Disposer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/utils/Disposer */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Disposer.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _ValueAxisBreak__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./ValueAxisBreak */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/ValueAxisBreak.js");
/* harmony import */ var _core_utils_Math__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../core/utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
/* harmony import */ var _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../core/utils/Iterator */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Iterator.js");
/* harmony import */ var _core_utils_Object__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../core/utils/Object */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Object.js");
/* harmony import */ var _core_utils_Type__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../core/utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/* harmony import */ var _core_utils_Utils__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../core/utils/Utils */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Utils.js");
/**
 * Value Axis module
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */











/**
 * ============================================================================
 * DATA ITEM
 * ============================================================================
 * @hidden
 */

/**
 * Defines a [[DataItem]] for [[ValueAxis]].
 *
 * @see {@link DataItem}
 */

var ValueAxisDataItem =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_10__.__extends)(ValueAxisDataItem, _super);
  /**
   * Constructor
   */


  function ValueAxisDataItem() {
    var _this = _super.call(this) || this;

    _this.className = "ValueAxisDataItem";
    _this.values.value = {};
    _this.values.endValue = {};

    _this.applyTheme();

    return _this;
  }

  Object.defineProperty(ValueAxisDataItem.prototype, "value", {
    /**
     * @return Value
     */
    get: function get() {
      return this.values["value"].value;
    },

    /**
     * A data point's numeric value.
     *
     * @param value  Value
     */
    set: function set(value) {
      this.setValue("value", value);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(ValueAxisDataItem.prototype, "endValue", {
    /**
     * @return Value
     */
    get: function get() {
      return this.values["endValue"].value;
    },

    /**
     * Data point's numeric end value.
     *
     * @param value  End value
     */
    set: function set(value) {
      this.setValue("endValue", value);
    },
    enumerable: true,
    configurable: true
  });
  return ValueAxisDataItem;
}(_Axis__WEBPACK_IMPORTED_MODULE_0__.AxisDataItem);


/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Used to create a value axis for the chart.
 *
 * ```TypeScript
 * // Create the axis
 * let valueAxis = chart.yAxes.push(new am4charts.ValueAxis());
 *
 * // Set settings
 * valueAxis.title.text = "Monthly Sales";
 * ```
 * ```JavaScript
 * // Create the axis
 * var valueAxis = chart.yAxes.push(new am4charts.ValueAxis());
 *
 * // Set settings
 * valueAxis.title.text = "Monthly Sales";
 * ```
 * ```JSON
 * "yAxes": [{
 *   "type": "ValueAxis",
 *   "title": {
 *     "text": "Monthly Sales"
 *   }
 * }]
 * ```
 *
 * @see {@link IValueAxisEvents} for a list of available Events
 * @see {@link IValueAxisAdapters} for a list of available Adapters
 * @important
 */

var ValueAxis =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_10__.__extends)(ValueAxis, _super);
  /**
   * Constructor
   */


  function ValueAxis() {
    var _this = // Init
    _super.call(this) || this;
    /**
     * [_stepDecimalPlaces description]
     *
     * @todo Description
     */


    _this._stepDecimalPlaces = 0;
    _this._prevStepDecimalPlaces = 0;
    _this._adjustLabelPrecision = true;
    /**
     * Base value for the axis.
     */

    _this._baseValue = 0;
    /**
     * Adjusted start in case we have breaks.
     *
     * @todo Description
     */

    _this._adjustedStart = 0;
    /**
     * Adjusted end in case we have breaks.
     *
     * @todo Description
     */

    _this._adjustedEnd = 1;
    _this._extremesChanged = false;
    _this._deltaMinMax = 1;
    _this._dsc = false;
    /**
     * As calculating totals is expensive operation and not often needed, we
     * don't do it by default.
     *
     * In case you use `totalPercent` or `total` in your charts, this must be set
     * to `true`.
     *
     * @default false
     * @see {@link https://www.amcharts.com/docs/v4/chart-types/xy-chart/#100_stacks} For using `calculateTotals` for 100% stacked series.
     * @see {@link https://www.amcharts.com/docs/v4/concepts/formatters/formatting-strings/#Placeholders_for_numeric_values} For using `calculateTotals` in labels.
     */

    _this.calculateTotals = false;
    _this.className = "ValueAxis"; // Set field name

    _this.axisFieldName = "value"; // Set defaults

    _this.setPropertyValue("maxZoomFactor", 1000);

    _this.setPropertyValue("extraMin", 0);

    _this.setPropertyValue("extraMax", 0);

    _this.setPropertyValue("strictMinMax", false);

    _this.setPropertyValue("maxPrecision", Number.MAX_VALUE);

    _this.setPropertyValue("adjustLabelPrecision", true);

    _this.setPropertyValue("extraTooltipPrecision", 0);

    _this.keepSelection = false;
    _this.includeRangesInMinMax = false; // Apply theme

    _this.applyTheme();

    return _this;
  }
  /**
   * Holds reference to a function that accepts a DataItem as parameter.
   *
   * It can either return a fill opacity for a fill, or manipulate data item
   * directly, to create various highlighting scenarios.
   */


  ValueAxis.prototype.fillRule = function (dataItem) {
    var value = dataItem.value;
    var axis = dataItem.component;

    if (!dataItem.axisFill.disabled) {
      // rounding in left to solve floating point number
      if (_core_utils_Math__WEBPACK_IMPORTED_MODULE_5__.round(value / axis.step / 2, 5) == Math.round(value / axis.step / 2)) {
        dataItem.axisFill.__disabled = true;
      } else {
        dataItem.axisFill.__disabled = false;
      }
    }
  };
  /**
   * Returns a new/empty [[DataItem]] of the type appropriate for this object.
   *
   * @see {@link DataItem}
   * @return Data Item
   */


  ValueAxis.prototype.createDataItem = function () {
    return new ValueAxisDataItem();
  };
  /**
   * Returns a new/empty [[AxisBreak]] of the appropriate type.
   *
   * @return Axis break
   */


  ValueAxis.prototype.createAxisBreak = function () {
    return new _ValueAxisBreak__WEBPACK_IMPORTED_MODULE_4__.ValueAxisBreak();
  };
  /**
   * [dataChangeUpdate description]
   *
   * This is a placeholder to override for extending classes.
   *
   * @ignore Exclude from docs
   * @todo Description
   */


  ValueAxis.prototype.dataChangeUpdate = function () {
    this.clearCache();

    if (!this.keepSelection) {
      if (this._start != 0 || this._end != 1) {
        this._start = 0;
        this._end = 1;
        this.dispatchImmediately("startendchanged");
      }
    } else {
      if (this._start != 0) {
        this.dispatchImmediately("startchanged");
      }

      if (this._end != 1) {
        this.dispatchImmediately("endchanged");
      }

      if (this._start != 0 || this._end != 1) {
        this.dispatchImmediately("startendchanged");
      }
    }

    this._maxZoomed = this._maxDefined;
    this._minZoomed = this._minDefined;
    this._maxAdjusted = this._maxDefined;
    this._minAdjusted = this._minDefined;
  };
  /**
   * Processes data items of the related Series.
   *
   * @ignore Exclude from docs
   */


  ValueAxis.prototype.processSeriesDataItems = function () {
    // @todo: add some boolean (maybe autodedect) if we need these calculations or not. this place uses a lot of cpu
    if (this.calculateTotals) {
      var series = this.series.getIndex(0);
      var startIndex = series.startIndex;

      if (series.dataItems.length > 0) {
        if (startIndex > 0) {
          startIndex--;
        }

        var endIndex = series.endIndex;

        if (endIndex < series.dataItems.length) {
          endIndex++;
        }

        var _loop_1 = function _loop_1(i) {
          // This has to be `var` in order to avoid garbage collection
          var total = {};
          var sum = {};
          this_1.series.each(function (series) {
            if (!series.excludeFromTotal) {
              var dataItem_1 = series.dataItems.getIndex(i);

              if (dataItem_1) {
                _core_utils_Object__WEBPACK_IMPORTED_MODULE_7__.each(dataItem_1.values, function (key) {
                  var value = dataItem_1.values[key].workingValue; // can not use getWorkingValue here!

                  if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.isNumber(value)) {
                    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.isNumber(total[key])) {
                      total[key] = Math.abs(value);
                    } else {
                      total[key] += Math.abs(value);
                    }

                    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.isNumber(sum[key])) {
                      sum[key] = value;
                    } else {
                      sum[key] += value;
                    }
                  }
                });
              }
            }
          });
          this_1.series.each(function (series) {
            if (!series.excludeFromTotal) {
              var dataItem_2 = series.dataItems.getIndex(i);

              if (dataItem_2) {
                _core_utils_Object__WEBPACK_IMPORTED_MODULE_7__.each(dataItem_2.values, function (key) {
                  var value = dataItem_2.values[key].workingValue; // can not use getWorkingValue here!

                  if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.isNumber(value)) {
                    dataItem_2.setCalculatedValue(key, total[key], "total");
                    dataItem_2.setCalculatedValue(key, 100 * value / total[key], "totalPercent");
                    dataItem_2.setCalculatedValue(key, sum[key], "sum");
                  }
                });
              }
            }
          });
        };

        var this_1 = this; // This has to be `var` in order to avoid garbage collection

        for (var i = startIndex; i < endIndex; ++i) {
          _loop_1(i);
        }
      }
    }
  };
  /**
   * Validates the whole axis. Causes it to redraw.
   *
   * @ignore Exclude from docs
   * @todo Description (review)
   */


  ValueAxis.prototype.validate = function () {
    if (this.axisLength <= 0) {
      return;
    }

    _super.prototype.validate.call(this);

    this.getMinMax();

    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.isNumber(this._minAdjusted)) {
      this.dataItems.each(function (dataItem) {
        dataItem.value = null;
      });
    }

    this.fixAxisBreaks();
    this.calculateZoom();
    this.validateAxisElements();
    this.validateAxisRanges();
    this.validateBreaks();
    this.hideUnusedDataItems();
    this.renderer.invalidateLayout(); // hide too close
    //this.hideTooCloseDataItems();
  };
  /**
   * Calculates all positions, related to axis as per current zoom.
   *
   * @ignore Exclude from docs
   */


  ValueAxis.prototype.calculateZoom = function () {
    if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.isNumber(this.min) && _core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.isNumber(this.max)) {
      var min = this.positionToValue(this.start);
      var max = this.positionToValue(this.end);
      var differece = this.adjustDifference(min, max);
      var minMaxStep = this.adjustMinMax(min, max, differece, this._gridCount, true);
      var stepDecimalPlaces = _core_utils_Utils__WEBPACK_IMPORTED_MODULE_9__.decimalPlaces(minMaxStep.step);
      this._stepDecimalPlaces = stepDecimalPlaces;
      min = _core_utils_Math__WEBPACK_IMPORTED_MODULE_5__.round(min, stepDecimalPlaces);
      max = _core_utils_Math__WEBPACK_IMPORTED_MODULE_5__.round(max, stepDecimalPlaces);
      minMaxStep = this.adjustMinMax(min, max, differece, this._gridCount, true);
      var step = minMaxStep.step;

      if (this.syncWithAxis) {
        var calculated = this.getCache(min + "-" + max);

        if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.isNumber(calculated)) {
          step = calculated;
        }
      } else {
        min = minMaxStep.min;
        max = minMaxStep.max;
      }

      if (this._minZoomed != min || this._maxZoomed != max || this._step != step || this._dsc) {
        this._dsc = false;
        this._minZoomed = min;
        this._maxZoomed = max;
        this._step = step;
        this.dispatchImmediately("selectionextremeschanged");
      }
    }
  };

  ValueAxis.prototype.fixSmallStep = function (step) {
    if (1 + step == 1) {
      step *= 2;
      return this.fixSmallStep(step);
    }

    return step;
  };
  /**
   * Validates Axis elements.
   *
   * @ignore Exclude from docs
   * @todo Description
   */


  ValueAxis.prototype.validateAxisElements = function () {
    var _this = this;

    if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.isNumber(this.max) && _core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.isNumber(this.min)) {
      // first regular items
      var value_1 = this.minZoomed - this._step * 2;

      if (!this.logarithmic) {
        value_1 = Math.floor(value_1 / this._step) * this._step;
      } else {
        var differencePower = Math.log(this.max) * Math.LOG10E - Math.log(this.min) * Math.LOG10E;

        if (differencePower > 1) {
          value_1 = Math.pow(10, Math.log(this.min) * Math.LOG10E);
        } else {
          value_1 = Math.floor(this.minZoomed / this._step) * this._step;

          if (value_1 == 0) {
            value_1 = this.minZoomed;
          }
        }
      }

      var maxZoomed = this._maxZoomed + this._step;
      this.resetIterators();
      var dataItemsIterator_1 = this._dataItemsIterator;

      if (this._step == 0) {
        return;
      }

      this._step = this.fixSmallStep(this._step);
      var i = 0;
      var precisionChanged = this._prevStepDecimalPlaces != this._stepDecimalPlaces;
      this._prevStepDecimalPlaces = this._stepDecimalPlaces;

      while (value_1 <= maxZoomed) {
        var axisBreak = this.isInBreak(value_1);

        if (!axisBreak) {
          var dataItem = dataItemsIterator_1.find(function (x) {
            return x.value === value_1;
          });

          if (dataItem.__disabled) {
            dataItem.__disabled = false;
          } //this.processDataItem(dataItem);


          this.appendDataItem(dataItem);
          dataItem.axisBreak = undefined;

          if (dataItem.value != value_1 || precisionChanged) {
            dataItem.value = value_1;
            dataItem.text = this.formatLabel(value_1);

            if (dataItem.label && dataItem.label.invalid) {
              dataItem.label.validate();
            }

            if (dataItem.value >= this.min && dataItem.value <= this.max) {
              if (dataItem.label) {
                if (this.axisLetter == "Y" && dataItem.label.measuredWidth > this.ghostLabel.measuredWidth || this.axisLetter == "X" && dataItem.label.measuredHeight > this.ghostLabel.measuredHeight) {
                  this.ghostLabel.text = dataItem.label.currentText;
                  this.ghostLabel.validate();
                }
              }
            }
          }

          this.validateDataElement(dataItem);
        }

        i++;
        var oldValue = value_1;

        if (!this.logarithmic) {
          value_1 += this._step;
        } else {
          var differencePower = Math.log(this.max) * Math.LOG10E - Math.log(this.min) * Math.LOG10E;

          if (differencePower > 1) {
            value_1 = Math.pow(10, Math.log(this.min) * Math.LOG10E + i);
          } else {
            value_1 += this._step;
          }
        }

        var stepPower = Math.pow(10, Math.floor(Math.log(Math.abs(this._step)) * Math.LOG10E));

        if (stepPower < 1) {
          // exponent is less then 1 too. Count decimals of exponent
          var decCount = Math.round(Math.abs(Math.log(Math.abs(stepPower)) * Math.LOG10E)) + 2;
          decCount = Math.min(13, decCount); // round value to avoid floating point issues

          value_1 = _core_utils_Math__WEBPACK_IMPORTED_MODULE_5__.round(value_1, decCount); // ceil causes problems: https://codepen.io/team/amcharts/pen/XWMjZwy?editors=1010

          if (oldValue == value_1) {
            value_1 = maxZoomed;
            break;
          }
        }
      }

      var axisBreaks = this._axisBreaks;

      if (axisBreaks) {
        // breaks later
        var renderer_1 = this.renderer;
        _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_6__.each(axisBreaks.iterator(), function (axisBreak) {
          if (axisBreak.breakSize > 0) {
            // only add grid if gap is bigger then minGridDistance
            if (_core_utils_Math__WEBPACK_IMPORTED_MODULE_5__.getDistance(axisBreak.startPoint, axisBreak.endPoint) > renderer_1.minGridDistance) {
              var breakValue_1 = axisBreak.adjustedMin;

              while (breakValue_1 <= axisBreak.adjustedMax) {
                if (breakValue_1 >= axisBreak.adjustedStartValue && breakValue_1 <= axisBreak.adjustedEndValue) {
                  var dataItem = dataItemsIterator_1.find(function (x) {
                    return x.value === breakValue_1;
                  });

                  if (dataItem.__disabled) {
                    dataItem.__disabled = false;
                  } //this.processDataItem(dataItem);


                  _this.appendDataItem(dataItem);

                  dataItem.axisBreak = axisBreak;

                  if (dataItem.value != breakValue_1) {
                    dataItem.value = breakValue_1;
                    dataItem.text = _this.formatLabel(breakValue_1);

                    if (dataItem.label && dataItem.label.invalid) {
                      dataItem.label.validate();
                    }
                  }

                  _this.validateDataElement(dataItem);
                }

                breakValue_1 += axisBreak.adjustedStep;
              }
            }
          }
        });
      }
    }
  };
  /**
   * Validates axis data item.
   *
   * @ignore Exclude from docs
   * @todo Description
   * @param dataItem  Data item
   */


  ValueAxis.prototype.validateDataElement = function (dataItem) {
    _super.prototype.validateDataElement.call(this, dataItem); //dataItem.__disabled = false;


    dataItem.itemIndex = this._axisItemCount;
    this._axisItemCount++;
    var renderer = this.renderer;
    var value = dataItem.value;
    var endValue = dataItem.endValue;
    var position = this.valueToPosition(value);
    dataItem.position = position;
    var endPosition = position;
    var fillEndPosition = this.valueToPosition(value + this._step);

    if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.isNumber(endValue)) {
      endPosition = this.valueToPosition(endValue);
      fillEndPosition = endPosition;
    } // this point is needed to calculate distance to satisfy minGridDistance


    dataItem.point = renderer.positionToPoint(position);
    var tick = dataItem.tick;

    if (tick && !tick.disabled) {
      renderer.updateTickElement(tick, position, endPosition);
    }

    var grid = dataItem.grid;

    if (grid && !grid.disabled) {
      renderer.updateGridElement(grid, position, endPosition);
    }

    var label = dataItem.label;

    if (label && !label.disabled) {
      renderer.updateLabelElement(label, position, endPosition);
    }

    var fill = dataItem.axisFill;

    if (fill && !fill.disabled) {
      renderer.updateFillElement(fill, position, fillEndPosition);

      if (!dataItem.isRange) {
        this.fillRule(dataItem);
      }
    }

    if (dataItem.bullet) {
      renderer.updateBullet(dataItem.bullet, position, endPosition);
    }

    var mask = dataItem.mask;

    if (mask) {
      renderer.updateFillElement(mask, position, fillEndPosition);
    }
  };
  /**
   * Formats the value according to axis' own [[NumberFormatter]].
   *
   * @param value  Source value
   * @return Formatted value
   */


  ValueAxis.prototype.formatLabel = function (value) {
    if (this.adjustLabelPrecision && value != 0) {
      return this.numberFormatter.format(value, undefined, this._stepDecimalPlaces);
    } else {
      return this.numberFormatter.format(value);
    }
  };

  Object.defineProperty(ValueAxis.prototype, "basePoint", {
    /**
     * Coordinates of the actual axis start.
     *
     * @ignore Exclude from docs
     * @return Base point
     */
    get: function get() {
      var baseValue = this.baseValue;
      var position = this.valueToPosition(baseValue);
      var basePoint = this.renderer.positionToPoint(position);
      return basePoint;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(ValueAxis.prototype, "baseValue", {
    /**
     * @return base value
     */
    get: function get() {
      var baseValue = this._baseValue;

      if (this.logarithmic) {
        baseValue = this.min;
      }

      if (!this._adapterO) {
        return baseValue;
      } else {
        return this._adapterO.apply("baseValue", baseValue);
      }
    },

    /**
     * A base value.
     *
     * This is a threshold value that will divide "positive" and "negative"
     * value ranges.
     *
     * Other scale-related functionality also depend on base value. E.g. stacks,
     * value-dependent coloring, etc.
     *
     * @param value Base value
     */
    set: function set(value) {
      this._baseValue = value;
      this.invalidateLayout();
      this.invalidateSeries();
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Converts a numeric value to relative position on axis
   *
   * An alias to `valueToPosition()`.
   *
   * @param value  Value
   * @return Position
   */

  ValueAxis.prototype.anyToPosition = function (value) {
    return this.valueToPosition(value);
  };
  /**
   * Converts a numeric value to orientation point (x, y, angle) on axis
   *
   * @param value  Value
   * @return Orientation point
   */


  ValueAxis.prototype.valueToPoint = function (value) {
    var position = this.valueToPosition(value);
    var point = this.renderer.positionToPoint(position);
    var angle = this.renderer.positionToAngle(position);
    return {
      x: point.x,
      y: point.y,
      angle: angle
    };
  };
  /**
   * Converts a numeric value to orientation (x, y, angle) point on axis
   *
   * @param value  Value
   * @return Orientation point
   */


  ValueAxis.prototype.anyToPoint = function (value) {
    return this.valueToPoint(value);
  };
  /**
   * Converts a numeric value to relative position on axis.
   *
   * @param value  Value
   * @return relative position
   */


  ValueAxis.prototype.valueToPosition = function (value) {
    if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.isNumber(value)) {
      // todo: think if possible to take previous value and do not go through all previous breaks
      var min_1 = this.min;
      var max_1 = this.max;

      if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.isNumber(min_1) && _core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.isNumber(max_1)) {
        var difference = this._difference;
        var axisBreaks = this._axisBreaks;

        if (axisBreaks && axisBreaks.length > 0) {
          _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_6__.eachContinue(axisBreaks.iterator(), function (axisBreak) {
            var startValue = axisBreak.adjustedStartValue;
            var endValue = axisBreak.adjustedEndValue;

            if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.isNumber(startValue) && _core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.isNumber(endValue)) {
              if (value < startValue) {
                return false;
              }

              if (_core_utils_Math__WEBPACK_IMPORTED_MODULE_5__.intersect({
                start: startValue,
                end: endValue
              }, {
                start: min_1,
                end: max_1
              })) {
                // todo: check this once and set some flag in axisBreak
                startValue = Math.max(startValue, min_1);
                endValue = Math.min(endValue, max_1);
                var breakSize = axisBreak.breakSize; // value to the right of break end

                if (value > endValue) {
                  min_1 += (endValue - startValue) * (1 - breakSize); // todo: maybe this can be done differently?
                } // value to the left of break start
                else if (value < startValue) {} // value within break
                else {
                  value = startValue + (value - startValue) * breakSize;
                }
              }
            }

            return true;
          });
        }

        var position = void 0;

        if (!this.logarithmic) {
          position = (value - min_1) / difference;
        } else {
          var treatZeroAs = this.treatZeroAs;

          if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.isNumber(treatZeroAs)) {
            if (value <= treatZeroAs) {
              value = treatZeroAs;
            }
          }

          position = (Math.log(value) * Math.LOG10E - Math.log(this.min) * Math.LOG10E) / (Math.log(this.max) * Math.LOG10E - Math.log(this.min) * Math.LOG10E);
        } //position = $math.round(position, 10);


        return position;
      }
    }

    return 0;
  };
  /**
   * When fontSize of fontFamily changes we need to hard-invalidate all Labels of this container to position them properly.
   */


  ValueAxis.prototype.invalidateLabels = function () {
    _super.prototype.invalidateLabels.call(this);

    if (this.dataItems) {
      this.dataItems.each(function (dataItem) {
        dataItem.value = undefined;
      });
      this.invalidate();
    }
  };
  /**
   * Converts an relative position to a corresponding value within
   * axis' scale.
   *
   * @param position  Position (px)
   * @return Value
   */


  ValueAxis.prototype.positionToValue = function (position) {
    var min = this.min;
    var max = this.max;

    if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.isNumber(min) && _core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.isNumber(max)) {
      var difference_1 = max - min; //no need to adjust!

      var value_2 = null;
      var axisBreaks = this._axisBreaks;

      if (axisBreaks) {
        // in case we have some axis breaks
        if (axisBreaks.length > 0) {
          _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_6__.eachContinue(axisBreaks.iterator(), function (axisBreak) {
            var breakStartPosition = axisBreak.startPosition;
            var breakEndPosition = axisBreak.endPosition;
            var breakStartValue = axisBreak.adjustedStartValue;
            var breakEndValue = axisBreak.adjustedEndValue;

            if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.isNumber(breakStartValue) && _core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.isNumber(breakEndValue)) {
              if (breakStartValue > max) {
                return false;
              }

              if (_core_utils_Math__WEBPACK_IMPORTED_MODULE_5__.intersect({
                start: breakStartValue,
                end: breakEndValue
              }, {
                start: min,
                end: max
              })) {
                breakStartValue = _core_utils_Math__WEBPACK_IMPORTED_MODULE_5__.max(breakStartValue, min);
                breakEndValue = _core_utils_Math__WEBPACK_IMPORTED_MODULE_5__.min(breakEndValue, max);
                var breakSize = axisBreak.breakSize;
                difference_1 -= (breakEndValue - breakStartValue) * (1 - breakSize); // position to the right of break end

                if (position > breakEndPosition) {
                  min += (breakEndValue - breakStartValue) * (1 - breakSize);
                } // position to the left of break start
                else if (position < breakStartPosition) {} // value within break
                else {
                  var breakPosition = (position - breakStartPosition) / (breakEndPosition - breakStartPosition);
                  value_2 = breakStartValue + breakPosition * (breakEndValue - breakStartValue);
                  return false;
                }
              }

              return true;
            }
          });
        }
      }

      if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.isNumber(value_2)) {
        if (this.logarithmic) {
          value_2 = Math.pow(Math.E, (position * (Math.log(this.max) * Math.LOG10E - Math.log(this.min) * Math.LOG10E) + Math.log(this.min) * Math.LOG10E) / Math.LOG10E);
        } else {
          value_2 = position * difference_1 + min;
        }
      }

      return value_2;
    } //}

  };
  /**
   * Converts an X coordinate to a relative value in axis' scale.
   *
   * @param x  X (px)
   * @return Value
   */


  ValueAxis.prototype.xToValue = function (x) {
    return this.positionToValue(this.pointToPosition({
      x: x,
      y: 0
    }));
  };
  /**
   * Converts an Y coordinate to a relative value in axis' scale.
   *
   * @param y  Y (px)
   * @return Value
   */


  ValueAxis.prototype.yToValue = function (y) {
    return this.positionToValue(this.pointToPosition({
      x: 0,
      y: y
    }));
  };
  /**
   * Converts pixel coordinates to a relative position. (0-1)
   *
   * @param point  Coorinates (px)
   * @return Position (0-1)
   */


  ValueAxis.prototype.pointToPosition = function (point) {
    if (this.renderer instanceof _AxisRendererY__WEBPACK_IMPORTED_MODULE_1__.AxisRendererY) {
      return 1 - this.renderer.pointToPosition(point);
    } else {
      return this.renderer.pointToPosition(point);
    }
  };
  /**
   * @ignore
   */


  ValueAxis.prototype.animateMinMax = function (min, max) {
    return this.animate([{
      property: "_minAdjusted",
      from: this._minAdjusted,
      to: min
    }, {
      property: "_maxAdjusted",
      from: this._maxAdjusted,
      to: max
    }], this.rangeChangeDuration, this.rangeChangeEasing);
  };
  /**
   * Calculates smallest and biggest value for the axis scale.
   * @ignore
   * @todo Description (review)
   */


  ValueAxis.prototype.getMinMax = function () {
    var _this = this;

    this.updateGridCount();
    var min = Number.POSITIVE_INFINITY;
    var max = Number.NEGATIVE_INFINITY; // only if min and max are not set from outside, we go through min and max influencers

    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.isNumber(this._minDefined) || !_core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.isNumber(this._maxDefined)) {
      this.series.each(function (series) {
        if (!series.ignoreMinMax) {
          // check min
          var seriesMin = series.min(_this);

          if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.isNumber(seriesMin) && seriesMin < min) {
            min = seriesMin;
          } // check max


          var seriesMax = series.max(_this);

          if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.isNumber(seriesMax) && seriesMax > max) {
            max = seriesMax;
          }
        }
      });

      if (this.includeRangesInMinMax) {
        this.axisRanges.each(function (range) {
          if (!range.ignoreMinMax) {
            var minValue = _core_utils_Math__WEBPACK_IMPORTED_MODULE_5__.min(range.value, range.endValue);
            var maxValue = _core_utils_Math__WEBPACK_IMPORTED_MODULE_5__.max(range.value, range.endValue);

            if (minValue < min || !_core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.isNumber(min)) {
              min = minValue;
            }

            if (maxValue > max || !_core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.isNumber(max)) {
              max = maxValue;
            }
          }
        });
      }
    }

    if (this.logarithmic) {
      var treatZeroAs = this.treatZeroAs;

      if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.isNumber(treatZeroAs)) {
        if (min <= 0) {
          min = treatZeroAs;
        }
      }

      if (min <= 0) {
        this.raiseCriticalError(new Error("Logarithmic value axis can not have values <= 0."), true);
      }
    }

    if (min == 0 && max == 0) {
      max = 0.9;
      min = -0.9;
    } // if defined from outside


    if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.isNumber(this._minDefined)) {
      min = this._minDefined;
    }

    if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.isNumber(this._maxDefined)) {
      max = this._maxDefined;
    }

    if (this._adapterO) {
      min = this._adapterO.apply("min", min);
    }

    if (this._adapterO) {
      max = this._adapterO.apply("max", max);
    }

    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.isNumber(min) || !_core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.isNumber(max)) {
      return;
    }

    this._minReal = min;
    this._maxReal = max;

    if (min == Number.POSITIVE_INFINITY) {
      min = undefined;
    }

    if (max == Number.NEGATIVE_INFINITY) {
      max = undefined;
    }

    var dif = this.adjustDifference(min, max); // previously it was max-min, but not worked well

    min = this.fixMin(min);
    max = this.fixMax(max); // this happens if starLocation and endLocation are 0.5 and DateAxis has only one date

    if (max - min <= 1 / Math.pow(10, 15)) {
      if (max - min != 0) {
        this._deltaMinMax = (max - min) / 2;
      } else {
        // the number by which we need to raise 10 to get difference
        var exponent = Math.log(Math.abs(max)) * Math.LOG10E; // here we find a number which is power of 10 and has the same count of numbers as difference has

        var power = Math.pow(10, Math.floor(exponent)); // reduce this number by 10 times

        power = power / 10;
        this._deltaMinMax = power;
      }

      min -= this._deltaMinMax;
      max += this._deltaMinMax;
    }

    min -= (max - min) * this.extraMin;
    max += (max - min) * this.extraMax;
    var strict = this.strictMinMax;

    if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.isNumber(this._maxDefined)) {
      strict = true;
    }

    var minMaxStep = this.adjustMinMax(min, max, dif, this._gridCount, strict);
    min = minMaxStep.min;
    max = minMaxStep.max;
    dif = max - min; //new
    // do it for the second time (importat!)

    minMaxStep = this.adjustMinMax(min, max, max - min, this._gridCount, true);
    min = minMaxStep.min;
    max = minMaxStep.max; // return min max if strict

    if (this.strictMinMax) {
      if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.isNumber(this._minDefined)) {
        min = this._minDefined;
      } else {
        min = this._minReal;
      }

      if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.isNumber(this._maxDefined)) {
        max = this._maxDefined;
      } else {
        max = this._maxReal;
      }

      if (max - min <= 0.00000001) {
        min -= this._deltaMinMax;
        max += this._deltaMinMax;
      }

      min -= (max - min) * this.extraMin;
      max += (max - min) * this.extraMax;
    }

    if (this._adapterO) {
      min = this._adapterO.apply("min", min);
    }

    if (this._adapterO) {
      max = this._adapterO.apply("max", max);
    }

    this._step = minMaxStep.step;

    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.isNumber(min) && !_core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.isNumber(max)) {
      this.start = 0;
      this.end = 1;
      this.renderer.labels.each(function (label) {
        label.dataItem.text = "";
      });
    } // checking isNumber is good when all series are hidden


    if ((this._minAdjusted != min || this._maxAdjusted != max) && _core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.isNumber(min) && _core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.isNumber(max)) {
      var animation = this._minMaxAnimation;

      if (this._extremesChanged && _core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.isNumber(this._minAdjusted) && _core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.isNumber(this._maxAdjusted) && this.inited) {
        if (animation && !animation.isFinished() && this._finalMax == max && this._finalMin == min) {
          return;
        } else {
          this._finalMin = min;
          this._finalMax = max;
          animation = this.animateMinMax(min, max);

          if (animation && !animation.isFinished()) {
            animation.events.on("animationprogress", this.validateDataItems, this);
            animation.events.on("animationended", function () {
              //this.validateDataItems();
              _this.series.each(function (series) {
                series.validate();
              });

              _this.validateDataItems();

              _this.handleSelectionExtremesChange();
            });
            this._minMaxAnimation = animation;
          } else {
            this.series.each(function (series) {
              series.invalidate();
            });
          }

          this.validateDataItems();
          this.dispatchImmediately("extremeschanged");
          this.handleSelectionExtremesChange();
        }
      } else {
        if (animation && !animation.isFinished() && this._finalMax == max && this._finalMin == min) {
          return;
        } else {
          this._minAdjusted = min;
          this._maxAdjusted = max;
          this._finalMin = min;
          this._finalMax = max;
          this.invalidateDataItems();
          this.dispatchImmediately("extremeschanged");
        }
      }
    }

    this._extremesChanged = false;
    this._difference = this.adjustDifference(min, max);
  };
  /**
   * Adjusts the minimum value.
   *
   * This is a placeholder method for extending classes to override.
   *
   * For numeric values this does nothing, however for more complex types, like
   * dates, it may be necessary to adjust.
   *
   * @param value  Value
   * @return Adjusted value
   */


  ValueAxis.prototype.fixMin = function (value) {
    return value;
  };
  /**
   * Adjusts the maximum value.
   *
   * This is a placeholder method for extending classes to override.
   *
   * For numeric values this does nothing, however for more complex types, like
   * dates, it may be necessary to adjust.
   *
   * @param value  Value
   * @return Adjusted value
   */


  ValueAxis.prototype.fixMax = function (value) {
    return value;
  };
  /**
   * Adjusts actual min and max scale values so that the axis starts and ends
   * at "nice" values, unless `strictMinMax` is set.
   *
   * The `difference` can be something else than `max - min`, because of the
   * axis breaks.
   *
   * @ignore Exclude from docs
   * @todo Description
   * @param min        [description]
   * @param max        [description]
   * @param difference [description]
   * @param gridCount  [description]
   * @param strictMode [description]
   * @return [description]
   */


  ValueAxis.prototype.adjustMinMax = function (min, max, difference, gridCount, strictMode) {
    // will fail if 0
    if (gridCount <= 1) {
      gridCount = 1;
    }

    gridCount = Math.round(gridCount);
    var initialMin = min;
    var initialMax = max; // in case min and max is the same, use max

    if (difference === 0) {
      difference = Math.abs(max);
    } // the number by which we need to raise 10 to get difference


    var exponent = Math.log(Math.abs(difference)) * Math.LOG10E; // here we find a number which is power of 10 and has the same count of numbers as difference has

    var power = Math.pow(10, Math.floor(exponent)); // reduce this number by 10 times

    power = power / 10;
    var extra = power;

    if (strictMode) {
      extra = 0;
    }

    if (!this.logarithmic) {
      // round down min
      if (strictMode) {
        min = Math.floor(min / power) * power; // round up max

        max = Math.ceil(max / power) * power;
      } else {
        min = Math.ceil(min / power) * power - extra; // round up max

        max = Math.floor(max / power) * power + extra;
      } // don't let min go below 0 if real min is >= 0


      if (min < 0 && initialMin >= 0) {
        min = 0;
      } // don't let max go above 0 if real max is <= 0


      if (max > 0 && initialMax <= 0) {
        max = 0;
      }
    } else {
      if (min <= 0) {
        //throw Error("Logarithmic value axis can not have values <= 0.");
        min = this.baseValue;
      } // @todo: think of a better way or to restrict zooming when no series are selected


      if (min == Infinity) {
        min = 1;
      }

      if (max == -Infinity) {
        max = 10;
      }

      if (this.strictMinMax) {
        if (this._minDefined > 0) {
          min = this._minDefined;
        } else {
          min = min;
        }

        if (this._maxDefined > 0) {
          max = max;
        }
      } else {
        min = Math.pow(10, Math.floor(Math.log(Math.abs(min)) * Math.LOG10E));
        max = Math.pow(10, Math.ceil(Math.log(Math.abs(max)) * Math.LOG10E));
      }
    } // repeat diff, exponent and power again with rounded values
    //difference = this.adjustDifference(min, max);

    /*
              if(min > initialMin){
                min = initialMin;
            }
              if(max < initialMax){
                max = initialMax;
            }
    */


    exponent = Math.log(Math.abs(difference)) * Math.LOG10E;
    power = Math.pow(10, Math.floor(exponent));
    power = power / 10; // approximate difference between two grid lines

    var step = Math.ceil(difference / gridCount / power) * power;
    var stepPower = Math.pow(10, Math.floor(Math.log(Math.abs(step)) * Math.LOG10E)); // TODO: in v3 I had fixStepE here, ommiting it for a while, need to think about other solution
    // the step should divide by  2, 5, and 10.

    var stepDivisor = Math.ceil(step / stepPower); // number 0 - 10

    if (stepDivisor > 5) {
      stepDivisor = 10;
    } else if (stepDivisor <= 5 && stepDivisor > 2) {
      stepDivisor = 5;
    } // now get real step


    step = Math.ceil(step / (stepPower * stepDivisor)) * stepPower * stepDivisor;

    if (this.maxPrecision < Number.MAX_VALUE && step != _core_utils_Math__WEBPACK_IMPORTED_MODULE_5__.ceil(step, this.maxPrecision)) {
      step = _core_utils_Math__WEBPACK_IMPORTED_MODULE_5__.ceil(step, this.maxPrecision);
    }

    var decCount = 0; // in case numbers are smaller than 1

    if (stepPower < 1) {
      // exponent is less then 1 too. Count decimals of exponent
      decCount = Math.round(Math.abs(Math.log(Math.abs(stepPower)) * Math.LOG10E)) + 1; // round step

      step = _core_utils_Math__WEBPACK_IMPORTED_MODULE_5__.round(step, decCount);
    }

    if (!this.logarithmic) {
      // final min and max
      var minCount = Math.floor(min / step);
      min = _core_utils_Math__WEBPACK_IMPORTED_MODULE_5__.round(step * minCount, decCount);
      var maxCount = void 0;

      if (!strictMode) {
        maxCount = Math.ceil(max / step);
      } else {
        maxCount = Math.floor(max / step);
      }

      if (maxCount == minCount) {
        maxCount++;
      }

      max = _core_utils_Math__WEBPACK_IMPORTED_MODULE_5__.round(step * maxCount, decCount);

      if (max < initialMax) {
        max = max + step;
      }

      if (min > initialMin) {
        min = min - step;
      }
    }

    return {
      min: min,
      max: max,
      step: step
    };
  };

  Object.defineProperty(ValueAxis.prototype, "min", {
    /**
     * @return Min value
     */
    get: function get() {
      var min = this._minAdjusted;

      if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.isNumber(min)) {
        min = this._minDefined;
      }

      return min;
    },

    /**
     * A minimum value for the axis scale.
     *
     * This value might be auto-adjusted by the Axis in order to accomodate the
     * grid nicely, i.e. plot area is divided by grid in nice equal cells.
     *
     * The above might be overridden by `strictMinMax` which will force exact
     * user-defined min and max values to be used for scale.
     *
     * @param value  Min value
     */
    set: function set(value) {
      if (this._minDefined != value) {
        this._minDefined = value;
        this.invalidate();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(ValueAxis.prototype, "minDefined", {
    /**
     * Min value as defined by user's code, not auto-calculated.
     *
     * @readonly
     * @return Min value
     */
    get: function get() {
      return this._minDefined;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(ValueAxis.prototype, "maxDefined", {
    /**
     * Max value as defined by user's code, not auto-calculated.
     *
     * @readonly
     * @return Man value
     */
    get: function get() {
      return this._maxDefined;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(ValueAxis.prototype, "extraMin", {
    /**
     * @return {number}
     */
    get: function get() {
      return this.getPropertyValue("extraMin");
    },

    /**
     * Allows relatively adjusting minimum value of the axis' scale.
     *
     * The value is relative to the actual range of values currently displayed
     * on the axis.
     *
     * E.g.: 0.5 will mean half of the current range. If we have axis displaying
     * from 100 to 200, we will now have axis displaying from 50 to 200 because
     * we asked to expand minimum value by 50% (0.5).
     *
     * NOTE: this setting is not compatible with `strictMinMax`.
     *
     * @param {number}
     */
    set: function set(value) {
      if (this.setPropertyValue("extraMin", value)) {
        this.invalidateDataItems();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(ValueAxis.prototype, "extraMax", {
    /**
     * @return Min multiplier
     */
    get: function get() {
      return this.getPropertyValue("extraMax");
    },

    /**
     * Allows relatively adjusting maximum value of the axis' scale.
     *
     * The value is relative to the actual range of values currently displayed
     * on the axis.
     *
     * E.g.: 0.5 will mean half of the current range. If we have axis displaying
     * from 100 to 200, we will now have axis displaying from 100 to 250 because
     * we asked to expand maximum value by 50% (0.5).
     *
     * NOTE: this setting is not compatible with `strictMinMax`.
     *
     * @param {number}
     */
    set: function set(value) {
      if (this.setPropertyValue("extraMax", value)) {
        this.invalidateDataItems();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(ValueAxis.prototype, "step", {
    /**
     * Current calculated delta in values between two adjacent grid lines (step).
     *
     * This is a read-only value and cannot be used to set actual step.
     *
     * @readonly
     * @see {@link https://www.amcharts.com/docs/v4/concepts/axes/positioning-axis-elements/#Setting_the_density_of_the_the_grid_labels} For more information about modifying density of labels
     * @return [description]
     */
    get: function get() {
      return this._step;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(ValueAxis.prototype, "max", {
    /**
     * @return Max value
     */
    get: function get() {
      var max = this._maxAdjusted;

      if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.isNumber(max)) {
        max = this._maxDefined;
      }

      return max;
    },

    /**
     * A maximum value for the axis scale.
     *
     * This value might be auto-adjusted by the Axis in order to accomodate the
     * grid nicely, i.e. plot area is divided by grid in nice equal cells.
     *
     * The above might be overridden by `strictMinMax` which will force exact
     * user-defined min and max values to be used for scale.
     *
     * @param value  Max value
     */
    set: function set(value) {
      if (this._maxDefined != value) {
        this._maxDefined = value;
        this.invalidate();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(ValueAxis.prototype, "adjustLabelPrecision", {
    /**
     * @return Adjust precision
     */
    get: function get() {
      return this.getPropertyValue("adjustLabelPrecision");
    },

    /**
     * By default the axis will adjust precision of all numbers to match number
     * of decimals in all its labels, e.g.: `1.0`, `1.5`, `2.0`.
     *
     * To disable set `adjustLabelPrecision` to `false`, to use whatever other
     * precision or number format settings are set.
     *
     * IMPORTANT: This setting will be ignored if your number format uses
     * modifiers, e.g. `"#a"`.
     *
     * @default true
     * @since 4.9.14
     * @param  value  Adjust precision
     */
    set: function set(value) {
      if (this.setPropertyValue("adjustLabelPrecision", value)) {
        this.invalidate();
      }
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Used for the Series to register itself as the user of this Axis.
   *
   * This will also decorate both the Series and Axis with event handlers, used
   * to redraw on Axis position/zoom change.
   *
   * A disposer for those events is returned, so that they can be disposed
   * together with Series.
   *
   * @ignore Exclude from docs
   * @param series  Series
   * @return Disposer for events
   */

  ValueAxis.prototype.registerSeries = function (series) {
    return new _core_utils_Disposer__WEBPACK_IMPORTED_MODULE_2__.MultiDisposer([_super.prototype.registerSeries.call(this, series), series.events.on("extremeschanged", this.handleExtremesChange, this, false), series.events.on("selectionextremeschanged", this.handleSelectionExtremesChange, this, false), this.events.on("extremeschanged", series.invalidate, series, false)]);
  };
  /**
   * Perform tasks after Axis zoom.
   */


  ValueAxis.prototype.handleSelectionExtremesChange = function () {
    var _this = this;

    var selectionMin;
    var selectionMax;
    var allHidden = true;
    _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_6__.each(this.series.iterator(), function (series) {
      if (!series.ignoreMinMax && !series.isHidden && !series.outOfRange) {
        if (series.visible && !series.isHiding) {
          allHidden = false;
        }

        var seriesSelectionMin = series.selectionMin(_this);
        var seriesSelectionMax = series.selectionMax(_this);

        if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.isNumber(seriesSelectionMin)) {
          if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.isNumber(selectionMin) || seriesSelectionMin < selectionMin) {
            selectionMin = seriesSelectionMin;
          }
        } // check max


        if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.isNumber(seriesSelectionMax)) {
          if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.isNumber(selectionMax) || seriesSelectionMax > selectionMax) {
            selectionMax = seriesSelectionMax;
          }
        }
      }
    });

    if (this.includeRangesInMinMax) {
      this.axisRanges.each(function (range) {
        if (!range.ignoreMinMax) {
          var minValue = _core_utils_Math__WEBPACK_IMPORTED_MODULE_5__.min(range.value, range.endValue);
          var maxValue = _core_utils_Math__WEBPACK_IMPORTED_MODULE_5__.max(range.value, range.endValue);

          if (minValue < selectionMin) {
            selectionMin = minValue;
          }

          if (maxValue > selectionMax) {
            selectionMax = maxValue;
          }
        }
      });
    } // this is not good, as if date axis is initially zoomed, selection of y axis is reset to 0, 1 at the end of this method
    //$iter.each(this.series.iterator(), (series) => {
    //	if (!series.appeared) {
    //		allHidden = true;
    //	}
    //})


    if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.isNumber(this._minDefined)) {
      if (this.strictMinMax) {
        selectionMin = this._minDefined;
      } else {
        selectionMin = this.min;
      }
    } else if (this.strictMinMax) {
      selectionMin = this._minReal;
    }

    if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.isNumber(this._maxDefined)) {
      if (this.strictMinMax) {
        selectionMax = this._maxDefined;
      } else {
        selectionMax = this.max;
      }
    } else if (this.strictMinMax) {
      selectionMax = this._maxReal;
    }

    if (selectionMin == selectionMax) {
      selectionMin -= this._deltaMinMax;
      selectionMax += this._deltaMinMax;
      var minMaxStep2 = this.adjustMinMax(selectionMin, selectionMax, 0, this._gridCount, this.strictMinMax);
      selectionMin = minMaxStep2.min;
      selectionMax = minMaxStep2.max;
    }

    var dif = this.adjustDifference(selectionMin, selectionMax);
    var minMaxStep = this.adjustMinMax(selectionMin, selectionMax, dif, this._gridCount);
    selectionMin = minMaxStep.min;
    selectionMax = minMaxStep.max;
    selectionMin -= (selectionMax - selectionMin) * this.extraMin;
    selectionMax += (selectionMax - selectionMin) * this.extraMax;
    selectionMin = _core_utils_Math__WEBPACK_IMPORTED_MODULE_5__.fitToRange(selectionMin, this.min, this.max);
    selectionMax = _core_utils_Math__WEBPACK_IMPORTED_MODULE_5__.fitToRange(selectionMax, this.min, this.max); // do it for the second time !important

    dif = this.adjustDifference(selectionMin, selectionMax);
    minMaxStep = this.adjustMinMax(selectionMin, selectionMax, dif, this._gridCount, true);
    selectionMin = minMaxStep.min;
    selectionMax = minMaxStep.max;

    if (this.strictMinMax) {
      selectionMin = _core_utils_Math__WEBPACK_IMPORTED_MODULE_5__.max(selectionMin, this._minDefined);
      selectionMax = _core_utils_Math__WEBPACK_IMPORTED_MODULE_5__.min(selectionMax, this._maxDefined);
    }

    var step = minMaxStep.step;

    if (this.syncWithAxis) {
      minMaxStep = this.syncAxes(selectionMin, selectionMax, step);
      selectionMin = minMaxStep.min;
      selectionMax = minMaxStep.max;
      this.invalidate();
    }

    step = minMaxStep.step; // needed because of grouping

    this._difference = this.adjustDifference(this.min, this.max);
    var start = this.valueToPosition(selectionMin);
    var end = this.valueToPosition(selectionMax); // in case all series are hidden or hiding, full zoomout

    if (allHidden && !this.syncWithAxis) {
      start = 0;
      end = 1;
    }

    var declination = 0;

    if (this.syncWithAxis) {
      declination = 5;
      this.setCache(selectionMin + "-" + selectionMax, step);
    } else {
      if (this._step != step || this._minZoomed != selectionMin || this._maxZoomed != selectionMax) {
        this._dsc = true;
      }

      this._step = step;
      this._minZoomed = selectionMin;
      this._maxZoomed = selectionMax;
    }

    if (!this.keepSelection) {
      this.zoom({
        start: start,
        end: end
      }, false, false, declination);
    }
  };

  Object.defineProperty(ValueAxis.prototype, "strictMinMax", {
    /**
     * @return Use exact values?
     */
    get: function get() {
      return this.getPropertyValue("strictMinMax");
    },

    /**
     * Indicates whether to blindly use exact `min` and `max` values set by user
     * when generating Axis scale.
     *
     * If not set, the Axis might slightly adjust those values to accomodate a
     * better looking grid.
     *
     * NOTE: if `min` and `max` are not set, setting `strictMinMax` to `true`
     * will result in fixing the scale of the axis to actual lowest and highest
     * values in the series within currently selected scope.
     *
     * @default false
     * @param value Use exact values?
     */
    set: function set(value) {
      if (this.setPropertyValue("strictMinMax", value)) {
        this.invalidate();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(ValueAxis.prototype, "logarithmic", {
    /**
     * @return Logarithmic scale?
     */
    get: function get() {
      return this.getPropertyValue("logarithmic");
    },

    /**
     * Indicates if this axis should use a logarithmic scale.
     *
     * Please note that logarithmic axis can **only** accommodate values bigger
     * than zero.
     *
     * Having zero or negative values will result in error and failure of the
     * whole chart.
     *
     * @param value Logarithmic scale?
     */
    set: function set(value) {
      if (this.setPropertyValue("logarithmic", value)) {
        this.invalidate();
        this.series.each(function (series) {
          series.invalidateDataItems();
        });
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(ValueAxis.prototype, "keepSelection", {
    /**
     * @return Preseve zoom after data update?
     */
    get: function get() {
      return this.getPropertyValue("keepSelection");
    },

    /**
     * Indicates if a current selection (zoom) should be kept across data updates.
     *
     * If your axis is zoomed while chart's data is updated, the axis will try
     * to retain the same start and end values.
     *
     * You can also use this to initially pre-zoom axis:
     *
     * ```TypeScript
     * axis.keepSelection = true;
     * axis.start = 0.5;
     * axis.end = 0.7;
     * ```
     * ```JavaScript
     * axis.keepSelection = true;
     * axis.start = 0.5;
     * axis.end = 0.7;
     * ```
     * ```JSON
     * {
     *   "xAxes": [{
     *     // ...
     *     "keepSelection": true,
     *     "start": 0.5,
     *     "end": 0.7
     *   }]
     * }
     * ```
     *
     * The above will start the chart zoomed from the middle of the actual scope
     * to 70%.
     *
     * @since 4.1.1
     * @default false
     * @param  value  Preseve zoom after data update?
     */
    set: function set(value) {
      this.setPropertyValue("keepSelection", value);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(ValueAxis.prototype, "includeRangesInMinMax", {
    /**
     * @return Include ranges?
     */
    get: function get() {
      return this.getPropertyValue("includeRangesInMinMax");
    },

    /**
     * If set to `true`, values of axis ranges will be included when calculating
     * range of values / scale of the [[ValueAxis]].
     *
     * @default false
     * @since 4.4.9
     * @param  value  Include ranges?
     */
    set: function set(value) {
      this.setPropertyValue("includeRangesInMinMax", value);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(ValueAxis.prototype, "maxPrecision", {
    /**
     * @return max precision
     */
    get: function get() {
      return this.getPropertyValue("maxPrecision");
    },

    /**
     * Maximum number of decimals to allow when placing grid lines and labels
     * on axis.
     *
     * Set it to `0` (zero) to force integer-only axis labels.
     *
     * @param {number}
     */
    set: function set(value) {
      if (this.setPropertyValue("maxPrecision", value)) {
        this.invalidate();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(ValueAxis.prototype, "extraTooltipPrecision", {
    /**
     * @return Extra decimals
     */
    get: function get() {
      return this.getPropertyValue("extraTooltipPrecision");
    },

    /**
     * This setting allows using bigger precision for numbers displayed in axis
     * tooltip.
     *
     * Please note that this setting indicates additional decimal places to
     * automatically-calculated axis number precision.
     *
     * So if your axis displays numbers like 0.1, 0.2, etc. (one decimal place),
     * and you set `extraTooltipPrecision = 1`, tooltips will display numbers
     * like 0.12, 0.25, etc. (two decimal places).
     *
     * @default 0
     * @since 4.8.3
     * @param  value  Extra decimals
     */
    set: function set(value) {
      if (this.setPropertyValue("extraTooltipPrecision", value)) {
        this.invalidate();
      }
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Invalidates axis data items when series extremes change
   */

  ValueAxis.prototype.handleExtremesChange = function () {
    var _this = this;

    this._extremesChanged = true;
    this.getMinMax();

    if (this.ghostLabel) {
      var mw_1 = 0;
      this.dataItems.each(function (dataItem) {
        if (dataItem.label && dataItem.label.pixelWidth > mw_1) {
          _this.ghostLabel.text = dataItem.label.currentText;
        }
      });
    }
  };
  /**
   * Returns relative position on axis for series' data item's value.
   *
   * @ignore Exclude from docs
   * @todo Description (review)
   * @param dataItem  Data item
   * @param key       Data field to get value from
   * @param location  Location (0-1)
   * @param stackKey  ?
   * @return X coordinate (px)
   */


  ValueAxis.prototype.getX = function (dataItem, key, location, stackKey, range) {
    return this.renderer.positionToPoint(this.getPositionX(dataItem, key, location, stackKey, range)).x;
  };
  /**
   * Returns the X coordinate for series' data item's value.
   *
   * @since 4.5.14
   * @param  dataItem  Data item
   * @param  key       Data field to get value from
   * @param  location  Location (0-1)
   * @param  stackKey  ?
   * @return           Relative position
   */


  ValueAxis.prototype.getPositionX = function (dataItem, key, location, stackKey, range) {
    var value = dataItem.getWorkingValue(key);

    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.hasValue(stackKey)) {
      stackKey = "valueX";
    }

    var stack = dataItem.getValue(stackKey, "stack");

    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.isNumber(value)) {
      value = this.baseValue;

      if (this.logarithmic) {
        if (stack > 0) {
          value = 0;
        }
      }
    }

    var position = this.valueToPosition(value + stack);

    if (range) {
      position = _core_utils_Math__WEBPACK_IMPORTED_MODULE_5__.fitToRange(position, range.start, range.end);
    }

    return position;
  };
  /**
   * Returns the Y coordinate for series' data item's value.
   *
   * @ignore Exclude from docs
   * @todo Description (review)
   * @param dataItem  Data item
   * @param key       Data field to get value from
   * @param location  Location (0-1)
   * @param stackKey  Stack ID
   * @return Y coordinate (px)
   */


  ValueAxis.prototype.getY = function (dataItem, key, location, stackKey, range) {
    return this.renderer.positionToPoint(this.getPositionY(dataItem, key, location, stackKey, range)).y;
  };
  /**
   * Returns relative position on axis for series' data item's value.
   *
   * @since 4.5.14
   * @param  dataItem  Data item
   * @param  key       Data field to get value from
   * @param  location  Location (0-1)
   * @param  stackKey  Stack ID
   * @return           Relative position
   */


  ValueAxis.prototype.getPositionY = function (dataItem, key, location, stackKey, range) {
    var value = dataItem.getWorkingValue(key);

    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.hasValue(stackKey)) {
      stackKey = "valueY";
    }

    var stack = dataItem.getValue(stackKey, "stack");

    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.isNumber(value)) {
      value = this.baseValue;

      if (this.logarithmic) {
        if (stack > 0) {
          value = 0;
        }
      }
    }

    var position = this.valueToPosition(value + stack);

    if (range) {
      position = _core_utils_Math__WEBPACK_IMPORTED_MODULE_5__.fitToRange(position, range.start, range.end);
    }

    return position;
  };
  /**
   * Returns an angle for series data item.
   *
   * @ignore Exclude from docs
   * @todo Description (review)
   * @param dataItem  Data item
   * @param key       Data field to get value from
   * @param location  Location (0-1)
   * @param stackKey  Stack ID
   * @param range Range to fit in
   * @return Angle
   */


  ValueAxis.prototype.getAngle = function (dataItem, key, location, stackKey, range) {
    var value = dataItem.getWorkingValue(key);
    var stack = dataItem.getValue(stackKey, "stack");

    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.isNumber(value)) {
      value = this.baseValue;
    }

    var position = this.valueToPosition(value + stack);

    if (range) {
      position = _core_utils_Math__WEBPACK_IMPORTED_MODULE_5__.fitToRange(position, range.start, range.end);
    }

    return this.positionToAngle(position);
  };
  /**
   * [getAnyRangePath description]
   *
   * @ignore Exclude from docs
   * @todo Description
   * @param start     [description]
   * @param end       [description]
   * @param location  [description]
   * @return [description]
   */


  ValueAxis.prototype.getAnyRangePath = function (start, end, location) {
    var startPosition = this.valueToPosition(start);
    var endPosition = this.valueToPosition(end);
    return this.getPositionRangePath(startPosition, endPosition); // Base class (Axis) gets range shape from AxisRenderer
  };
  /**
   * Returns text to show in a axis tooltip, based on specific position within
   * axis.
   *
   * The label will be formatted as per [[NumberFormatter]] set for the whole
   * chart, or explicitly for this Axis.
   *
   * @ignore Exclude from docs
   * @param position  Position (px)
   * @return Label (numeric value)
   */


  ValueAxis.prototype.getTooltipText = function (position) {
    var value = _core_utils_Math__WEBPACK_IMPORTED_MODULE_5__.round(this.positionToValue(position), this._stepDecimalPlaces + this.extraTooltipPrecision);
    var valueStr = this.tooltip.numberFormatter.format(value);

    if (!this._adapterO) {
      return valueStr;
    } else {
      return this._adapterO.apply("getTooltipText", valueStr);
    }
  };
  /**
   * Zooms axis to specific values.
   *
   * @param startValue      Start value
   * @param endValue        End value
   * @param skipRangeEvent  Do not invoke events
   * @param instantly       Do not play zoom animations
   */


  ValueAxis.prototype.zoomToValues = function (startValue, endValue, skipRangeEvent, instantly) {
    var start = (startValue - this.min) / (this.max - this.min);
    var end = (endValue - this.min) / (this.max - this.min);
    this.zoom({
      start: start,
      end: end
    }, skipRangeEvent, instantly);
  };

  Object.defineProperty(ValueAxis.prototype, "minZoomed", {
    /**
     * A smallest value in axis scale within current zoom.
     *
     * @return Min zoom value
     */
    get: function get() {
      if (!this.syncWithAxis) {
        return _core_utils_Math__WEBPACK_IMPORTED_MODULE_5__.max(this.min, this._minZoomed);
      } else {
        return this._minZoomed;
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(ValueAxis.prototype, "maxZoomed", {
    /**
     * A biggest value in axis scale within current zoom.
     * @return [description]
     */
    get: function get() {
      if (!this.syncWithAxis) {
        return _core_utils_Math__WEBPACK_IMPORTED_MODULE_5__.min(this.max, this._maxZoomed);
      } else {
        return this._maxZoomed;
      }
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Updates positioning of Axis breaks after something changes.
   *
   * @ignore Exclude from docs
   */

  ValueAxis.prototype.fixAxisBreaks = function () {
    var _this = this;

    _super.prototype.fixAxisBreaks.call(this);

    var axisBreaks = this._axisBreaks;

    if (axisBreaks && axisBreaks.length > 0) {
      // process breaks
      axisBreaks.each(function (axisBreak) {
        var startValue = axisBreak.adjustedStartValue;
        var endValue = axisBreak.adjustedEndValue; // break difference

        var axisBreakDif = endValue - startValue;

        var axisBreakGridCount = Math.ceil(axisBreakDif * axisBreak.breakSize) * _this._gridCount / (_this.max - _this.min); // calculate min, max and step for axis break


        var breakMinMaxStep = _this.adjustMinMax(startValue, endValue, axisBreakDif, axisBreakGridCount, true);

        axisBreak.adjustedStep = breakMinMaxStep.step;
        axisBreak.adjustedMin = breakMinMaxStep.min;
        axisBreak.adjustedMax = breakMinMaxStep.max;
      });
    }

    this._difference = this.adjustDifference(this.min, this.max);
  };
  /**
   * Returns value based on position.
   *
   * Please note that `position` represents position within axis which may be
   * zoomed and not correspond to Cursor's `position`.
   *
   * To convert Cursor's `position` to Axis' `position` use `toAxisPosition()` method.
   *
   * @see {@link https://www.amcharts.com/docs/v4/tutorials/tracking-cursors-position-via-api/#Tracking_Cursor_s_position} For more information about cursor tracking.
   * @param position  Relative position on axis (0-1)
   * @return Position label
   */


  ValueAxis.prototype.getPositionLabel = function (position) {
    var value = this.positionToValue(position);
    return this.numberFormatter.format(value);
  };
  /**
   * Shows Axis tooltip at specific value
   *
   * @param value Value
   */


  ValueAxis.prototype.showTooltipAt = function (value) {
    this.showTooltipAtPosition(this.valueToPosition(value));
  };
  /**
   * Copies all properties and related data from a different instance of Axis.
   *
   * @param source Source Axis
   */


  ValueAxis.prototype.copyFrom = function (source) {
    _super.prototype.copyFrom.call(this, source);

    this.min = source.min;
    this.max = source.max;
    this.calculateTotals = source.calculateTotals;
    this._baseValue = source.baseValue;
  };

  Object.defineProperty(ValueAxis.prototype, "syncWithAxis", {
    /**
     * @return Target axis
     */
    get: function get() {
      return this.getPropertyValue("syncWithAxis");
    },

    /**
     * Enables syncing of grid with another axis.
     *
     * To enable, set to a reference of the other `ValueAxis`. This axis will try
     * to maintain its scale in such way that its grid matches target axis grid.
     *
     * IMPORTANT #1: At this stage it's an experimental feature. Use it at your
     * own risk, as it may not work in 100% of the scenarios.
     *
     * IMPORTANT #2: `syncWithAxis` is not compatible with `strictMinMax` and
     * `sequencedInterpolation` settings.
     *
     * IMPORTANT #3: `syncWithAxis` is not compatible with scrollbars. Make sure
     * you do not add a scrollbar in the same direction as synced axes. For
     * example, if you have vertical synced axes, do not add `scrollbarY` on
     * your chart. It will create anomalies when used.
     *
     * IMPORTANT #4: `syncWithAxis` is not compatible with `XYCursor` if it has
     * its `behavior` set to either `zoomY` or `zoomXY`.
     *
     * @since 4.8.1
     * @param  axis  Target axis
     */
    set: function set(axis) {
      var _this = this;

      if (this.setPropertyValue("syncWithAxis", axis, true)) {
        if (axis) {
          this._disposers.push(axis.events.on("extremeschanged", this.handleSelectionExtremesChange, this, false));

          this._disposers.push(axis.events.on("selectionextremeschanged", this.handleSelectionExtremesChange, this, false));

          this._disposers.push(axis.events.on("startendchanged", this.handleSelectionExtremesChange, this, false));

          this.events.on("shown", this.handleSelectionExtremesChange, this, false);
          this.events.on("maxsizechanged", function () {
            _this.clearCache();

            _this._disposers.push(_core_Registry__WEBPACK_IMPORTED_MODULE_3__.registry.events.once("exitframe", function () {
              _this.handleSelectionExtremesChange();
            }));
          }, this, false);
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(ValueAxis.prototype, "treatZeroAs", {
    /**
     * @return Zero replacement value
     */
    get: function get() {
      return this.getPropertyValue("treatZeroAs");
    },

    /**
     * If set, zero values will be treated as this value.
     *
     * It is useful if you need to use data with zero-values on a logarithmic
     * axis scale.
     *
     * @since 4.9.34
     * @param  value  Zero replacement value
     */
    set: function set(value) {
      this.setPropertyValue("treatZeroAs", value, true);
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Syncs with a target axis.
   *
   * @param  min  Min
   * @param  max  Max
   * @param  step Step
   */

  ValueAxis.prototype.syncAxes = function (min, max, step) {
    var axis = this.syncWithAxis;

    if (axis) {
      if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.isNumber(min)) {
        min = this.min;
      }

      if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.isNumber(max)) {
        max = this.max;
      }

      if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.isNumber(step)) {
        step = this._step;
      }

      var count = Math.round((axis.maxZoomed - axis.minZoomed) / axis.step);
      var currentCount = Math.round((max - min) / step);

      if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.isNumber(count) && _core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.isNumber(currentCount)) {
        var synced = false;
        var c = 0;
        var diff = (max - min) * 0.01;
        var omin = min;
        var omax = max;
        var ostep = step;

        while (synced != true) {
          synced = this.checkSync(omin, omax, ostep, count);
          c++;

          if (c > 1000) {
            synced = true;
          }

          if (!synced) {
            //omin = min - diff * c;
            if (c / 3 == Math.round(c / 3)) {
              omin = min - diff * c;

              if (min >= 0 && omin < 0) {
                omin = 0;
              }
            } else {
              omax = max + diff * c;

              if (omax <= 0 && omax > 0) {
                omax = 0;
              }
            }

            var minMaxStep = this.adjustMinMax(omin, omax, omax - omin, this._gridCount, true);
            omin = minMaxStep.min;
            omax = minMaxStep.max;
            ostep = minMaxStep.step;
          } else {
            min = omin;
            max = omax;
            step = ostep;
          }
        }
      }
    }

    return {
      min: min,
      max: max,
      step: step
    };
  };
  /**
   * Returns `true` if axis needs to be resunced with some other axis.
   */


  ValueAxis.prototype.checkSync = function (min, max, step, count) {
    var currentCount = (max - min) / step;

    for (var i = 1; i < count; i++) {
      if (_core_utils_Math__WEBPACK_IMPORTED_MODULE_5__.round(currentCount / i, 1) == count || currentCount * i == count) {
        return true;
      }
    }

    return false;
  };
  /**
   * Processes JSON-based config before it is applied to the object.
   *
   * @ignore Exclude from docs
   * @param config  Config
   */


  ValueAxis.prototype.processConfig = function (config) {
    if (config) {
      // Set up axes
      if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.hasValue(config.syncWithAxis) && _core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.isString(config.syncWithAxis)) {
        if (this.map.hasKey(config.syncWithAxis)) {
          config.syncWithAxis = this.map.getKey(config.syncWithAxis);
        } else {
          this.processingErrors.push("[ValueAxis] No axis with id \"" + config.syncWithAxis + "\" found for `syncWithAxis`");
          delete config.xAxis;
        }
      }
    }

    _super.prototype.processConfig.call(this, config);
  };

  return ValueAxis;
}(_Axis__WEBPACK_IMPORTED_MODULE_0__.Axis);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_3__.registry.registeredClasses.ValueAxis = ValueAxis;
_core_Registry__WEBPACK_IMPORTED_MODULE_3__.registry.registeredClasses.ValueAxisDataItem = ValueAxisDataItem;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/ValueAxisBreak.js":
/*!**********************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/axes/ValueAxisBreak.js ***!
  \**********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "ValueAxisBreak": () => (/* binding */ ValueAxisBreak)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _AxisBreak__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AxisBreak */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisBreak.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/**
 * A module which defines functionality related to Value Axis Break.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */



/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Base class to define "breaks" on value axis.
 *
 * A "break" can be used to "cut out" specific ranges of the axis scale, e.g.
 * when comparing columns with relatively similar values, it would make sense
 * to cut out their mid section, so that their tip differences are more
 * prominent.
 *
 * @see {@link IValueAxisBreakEvents} for a list of available events
 * @see {@link IValueAxisBreakAdapters} for a list of available Adapters
 * @important
 */

var ValueAxisBreak =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(ValueAxisBreak, _super);
  /**
   * Constructor
   */


  function ValueAxisBreak() {
    var _this = _super.call(this) || this;

    _this.className = "ValueAxisBreak";

    _this.applyTheme();

    return _this;
  }

  Object.defineProperty(ValueAxisBreak.prototype, "startPosition", {
    /**
     * Pixel position of the break's start.
     *
     * @return Position (px)
     * @readonly
     */
    get: function get() {
      if (this.axis) {
        return this.axis.valueToPosition(this.adjustedStartValue);
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(ValueAxisBreak.prototype, "endPosition", {
    /**
     * Pixel position of the break's end.
     *
     * @return Position (px)
     * @readonly
     */
    get: function get() {
      if (this.axis) {
        return this.axis.valueToPosition(this.adjustedEndValue);
      }
    },
    enumerable: true,
    configurable: true
  });
  return ValueAxisBreak;
}(_AxisBreak__WEBPACK_IMPORTED_MODULE_0__.AxisBreak);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses.ValueAxisBreak = ValueAxisBreak;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/cursors/Cursor.js":
/*!*****************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/cursors/Cursor.js ***!
  \*****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Cursor": () => (/* binding */ Cursor)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _core_Container__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../core/Container */ "./node_modules/@amcharts/amcharts4/.internal/core/Container.js");
/* harmony import */ var _core_interaction_Interaction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/interaction/Interaction */ "./node_modules/@amcharts/amcharts4/.internal/core/interaction/Interaction.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_utils_Percent__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/utils/Percent */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Percent.js");
/* harmony import */ var _core_interaction_Mouse__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../core/interaction/Mouse */ "./node_modules/@amcharts/amcharts4/.internal/core/interaction/Mouse.js");
/* harmony import */ var _core_utils_Math__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../core/utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
/* harmony import */ var _core_utils_Utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../core/utils/Utils */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Utils.js");
/* harmony import */ var _core_utils_Type__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../core/utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/* harmony import */ var _core_utils_DOM__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../core/utils/DOM */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/DOM.js");
/* harmony import */ var _core_System__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../core/System */ "./node_modules/@amcharts/amcharts4/.internal/core/System.js");
/**
 * Cursor module
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */











/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Main Cursor class with common cursor functionality.
 *
 * Chart-specific cursors must extend this class.
 *
 * @see {@link ICursorEvents} for a list of available events
 * @see {@link ICursorAdapters} for a list of available Adapters
 * @todo Add description, examples
 * @todo Should we allow changing `_generalBehavior`?
 */

var Cursor =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_10__.__extends)(Cursor, _super);
  /**
   * Constructor
   */


  function Cursor() {
    var _this = // Init
    _super.call(this) || this;
    /**
     * Current cursor position during selection.
     *
     * @todo Better description
     */


    _this.point = {
      x: 0,
      y: 0
    };
    /**
     * Specifies the rules when cursor needs to be moved or hidden.
     */

    _this._stick = "none";
    _this.className = "Cursor"; // Set defaults

    _this.width = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_3__.percent)(100);
    _this.height = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_3__.percent)(100);
    _this.shouldClone = false;

    _this.hide(0);

    _this.trackable = true;
    _this.clickable = true;
    _this.isMeasured = false; // Add events on body to trigger down and up events (to start zooming or
    // selection)

    var interaction = (0,_core_interaction_Interaction__WEBPACK_IMPORTED_MODULE_1__.getInteraction)();

    _this._disposers.push(interaction.body.events.on("down", _this.handleCursorDown, _this));

    _this._disposers.push(interaction.body.events.on("up", _this.handleCursorUp, _this));

    _this._disposers.push(interaction.body.events.on("track", _this.handleCursorMove, _this)); // Apply theme


    _this.applyTheme();

    return _this;
  }
  /**
   * Handle pointer movement in document and update cursor position as needed.
   *
   * @ignore Exclude from docs
   * @param event Event
   */


  Cursor.prototype.handleCursorMove = function (event) {
    if (!this.interactionsEnabled || this.interactions.isTouchProtected && event.touch) {
      return;
    }

    if ((this._generalBehavior != "zoom" && this._generalBehavior != "pan" || !this.downPoint) && !(0,_core_interaction_Interaction__WEBPACK_IMPORTED_MODULE_1__.getInteraction)().isLocalElement(event.pointer, this.paper.svg, this.uid)) {
      // We want to let zoom/pan continue even if cursor is outside chart area
      if (!this.isHidden || !this.isHiding) {
        this.hide();
      }

      return;
    }

    var local = _core_utils_Utils__WEBPACK_IMPORTED_MODULE_6__.documentPointToSprite(event.pointer.point, this);

    if (this._stick == "hard" && this._stickPoint) {
      local = this._stickPoint;
    }

    if (this._stick == "soft" && this._stickPoint) {
      if (!this.fitsToBounds(local)) {
        local = this._stickPoint;
      }
    }

    if (this._adapterO) {
      this._adapterO.apply("cursorPoint", local);
    }

    this.triggerMove(local);
    return local;
  };
  /**
   * Hides actual SVG elements and handles hiding animations.
   *
   * @param duration  Fade out duration (ms)
   * @return Fade out duration (ms)
   * @ignore
   */


  Cursor.prototype.hideReal = function (duration) {
    if ((this._stick == "hard" || this._stick == "soft") && this._stickPoint) {
      return;
    }

    return _super.prototype.hideReal.call(this, duration);
  };
  /**
   * Places the cursor at specific point.
   *
   * The second parameter has following options:
   *
   * `"none"` - placed cursor will only be there until mouse/touch moves, then
   * it either moves to a new place (if pointer over plot area) or is hidden.
   *
   * `"soft"` - cursor will stay in the place if mouse/touch is happening
   * outside chart, but will move to a new place whe plot area is hovered or
   * touched.
   *
   * `"hard"` - cursor will stay in place no matter what, until it is moved by
   * another `triggerMove()` call.
   *
   * The third parameter - `force` (since `4.9.5`) - if set to `true` will
   * make cursor execute all of the actions associated with cursor move,
   * including line redraws, tooltip updates, etc. Useful when underlying
   * chart data is dynamically being updated.
   *
   * @param point  Point to place cursor at
   * @param stick  Level of cursor stickiness to the place
   * @param force  Force cursor move
   */


  Cursor.prototype.triggerMove = function (point, stick, force) {
    point.x = _core_utils_Math__WEBPACK_IMPORTED_MODULE_5__.round(point.x, 1);
    point.y = _core_utils_Math__WEBPACK_IMPORTED_MODULE_5__.round(point.y, 1);

    if (stick) {
      this._stick = stick;
    }

    if (stick == "hard" || stick == "soft") {
      this._stickPoint = point;
    }

    this.triggerMoveReal(point, force);
  };
  /**
   * Places the cursor at specific point.
   *
   * @param point Point to place cursor at
   */


  Cursor.prototype.triggerMoveReal = function (point, force) {
    if (this.point.x != point.x || this.point.y != point.y || force) {
      this.point = point;
      this.invalidatePosition(); // hide cursor if it's out of bounds

      if (this.fitsToBounds(point)) {
        this.show(0);
      } else {
        // unless we are selecting (mouse is down)
        if (!this.downPoint) {
          this.hide(0);
        }
      }

      if (this.visible) {
        this.getPositions();
        this.dispatch("cursorpositionchanged"); // not good to dispatch later (check step count example)
      }
    }
  };
  /**
   * Simulates pressing down (click/touch) action by a cursor.
   *
   * @param point               Point of action
   */


  Cursor.prototype.triggerDown = function (point) {
    this.triggerDownReal(point);
  };
  /**
   * Simulates pressing down (click/touch) action by a cursor.
   *
   * @param point               Point of action
   */


  Cursor.prototype.triggerDownReal = function (point) {
    switch (this._generalBehavior) {
      case "zoom":
        this.dispatchImmediately("zoomstarted");
        break;

      case "select":
        this.dispatchImmediately("selectstarted");
        break;

      case "pan":
        this.dispatchImmediately("panstarted");
        (0,_core_interaction_Interaction__WEBPACK_IMPORTED_MODULE_1__.getInteraction)().setGlobalStyle(_core_interaction_Mouse__WEBPACK_IMPORTED_MODULE_4__.MouseCursorStyle.grabbing);
        break;
    }
  };
  /**
   * Simulates the action of release of the mouse down / touch.
   *
   * @param point               Point of action
   */


  Cursor.prototype.triggerUp = function (point) {
    this.triggerUpReal(point);
  };
  /**
   * Simulates the action of release of the mouse down / touch.
   *
   * @param point               Point of action
   */


  Cursor.prototype.triggerUpReal = function (point) {
    _core_System__WEBPACK_IMPORTED_MODULE_9__.system.requestFrame();
    this.updatePoint(this.upPoint);
    var interaction = (0,_core_interaction_Interaction__WEBPACK_IMPORTED_MODULE_1__.getInteraction)();

    if (_core_utils_Math__WEBPACK_IMPORTED_MODULE_5__.getDistance(this._upPointOrig, this._downPointOrig) > interaction.getHitOption(this.interactions, "hitTolerance")) {
      switch (this._generalBehavior) {
        case "zoom":
          this.dispatch("zoomended");
          break;

        case "select":
          this.dispatch("selectended");
          break;

        case "pan":
          this.dispatch("panended");
          interaction.setGlobalStyle(_core_interaction_Mouse__WEBPACK_IMPORTED_MODULE_4__.MouseCursorStyle["default"]);
          break;
      }

      this.downPoint = undefined;
      this.updateSelection();
    }
    /*
    else {
        
        if(this._generalBehavior == "select"){
            this.dispatchImmediately("selectended");
        }
        this.dispatchImmediately("behaviorcanceled");
        interaction.setGlobalStyle(MouseCursorStyle.default);
        this.downPoint = undefined;
    }*/

  };
  /**
   * Updates selection dimensions on size change.
   *
   * @ignore Exclude from docs
   */


  Cursor.prototype.updateSelection = function () {};
  /**
   * Updates cursors current positions.
   */


  Cursor.prototype.getPositions = function () {
    // positions are used by axes or series
    this.xPosition = this.point.x / this.innerWidth;
    this.yPosition = 1 - this.point.y / this.innerHeight;
  };
  /**
   * Handles pointer down event so we can start zoom or selection.
   *
   * @ignore Exclude from docs
   * @param event Original event
   */


  Cursor.prototype.handleCursorDown = function (event) {
    if (!this.interactionsEnabled || this.interactions.isTouchProtected && event.touch || !(0,_core_interaction_Interaction__WEBPACK_IMPORTED_MODULE_1__.getInteraction)().isLocalElement(event.pointer, this.paper.svg, this.uid)) {
      return;
    } // Initiate blur so that whatever focused element on the page is unselected


    _core_utils_DOM__WEBPACK_IMPORTED_MODULE_8__.blur(); // Get local point

    var local = _core_utils_Utils__WEBPACK_IMPORTED_MODULE_6__.documentPointToSprite(event.pointer.point, this);

    if (this._stick == "hard" && this._stickPoint) {
      local = this._stickPoint;
    }

    if (this._adapterO) {
      this._adapterO.apply("cursorPoint", local);
    }

    if (!this.fitsToBounds(local)) {
      return;
    }

    this._downPointOrig = {
      x: local.x,
      y: local.y
    }; // We need to cancel the event to prevent gestures on touch devices

    if (event.event.cancelable && this.shouldPreventGestures(event.touch) && this.fitsToBounds(local)) {
      event.event.preventDefault();
    } // Make this happen


    this.triggerMove(local);
    this.triggerDown(local);
  };
  /**
   * Determines whether Cursor should prevent default action on move.
   *
   * Child classes should override this as necessary.
   *
   * @return Prevent default?
   */


  Cursor.prototype.shouldPreventGestures = function (touch) {
    return true;
  };
  /**
   * Updates the coordinates of where pointer down event occurred
   * (was pressed).
   */


  Cursor.prototype.updatePoint = function (point) {};
  /**
   * Handles pointer up event - finishes zoom or selection action.
   *
   * @ignore Exclude from docs
   * @param event Original event
   */


  Cursor.prototype.handleCursorUp = function (event) {
    if (!this.interactionsEnabled) {
      return;
    }

    if (!this.downPoint && !(0,_core_interaction_Interaction__WEBPACK_IMPORTED_MODULE_1__.getInteraction)().isLocalElement(event.pointer, this.paper.svg, this.uid)) {
      return;
    }

    var local = _core_utils_Utils__WEBPACK_IMPORTED_MODULE_6__.documentPointToSprite(event.pointer.point, this);

    if (this._adapterO) {
      this._adapterO.apply("cursorPoint", local);
    }

    if (!this.downPoint || !this.fitsToBounds(this.downPoint)) {
      return;
    }

    if (this._stick == "hard" && this._stickPoint) {
      local = this._stickPoint;
    }

    this._upPointOrig = {
      x: local.x,
      y: local.y
    };
    this.triggerMove(local);
    this.triggerUp(local);
  };

  Object.defineProperty(Cursor.prototype, "chart", {
    /**
     * @return Chart
     */
    get: function get() {
      return this._chart;
    },

    /**
     * A reference to a [[Chart]] the cursor belongs to.
     *
     * @param value  Chart
     */
    set: function set(value) {
      this._chart = value;

      if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_7__.hasValue(this._chart.plotContainer)) {
        (0,_core_interaction_Interaction__WEBPACK_IMPORTED_MODULE_1__.getInteraction)().lockElement(this._chart.plotContainer.interactions);
      }
    },
    enumerable: true,
    configurable: true
  });
  return Cursor;
}(_core_Container__WEBPACK_IMPORTED_MODULE_0__.Container);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_2__.registry.registeredClasses.Cursor = Cursor;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/cursors/RadarCursor.js":
/*!**********************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/cursors/RadarCursor.js ***!
  \**********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "RadarCursor": () => (/* binding */ RadarCursor)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _XYCursor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./XYCursor */ "./node_modules/@amcharts/amcharts4/.internal/charts/cursors/XYCursor.js");
/* harmony import */ var _core_utils_Percent__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/utils/Percent */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Percent.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_rendering_Path__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/rendering/Path */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Path.js");
/* harmony import */ var _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../core/utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
/* harmony import */ var _core_utils_Utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../core/utils/Utils */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Utils.js");
/* harmony import */ var _core_utils_Type__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../core/utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");








/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Cursor for [[RadarChart]].
 *
 * @see {@link IRadarCursorEvents} for a list of available events
 * @see {@link IRadarCursorAdapters} for a list of available Adapters
 */

var RadarCursor =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_7__.__extends)(RadarCursor, _super);
  /**
   * Constructor
   */


  function RadarCursor() {
    var _this = // Init
    _super.call(this) || this;

    _this.className = "RadarCursor";
    _this.radius = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_1__.percent)(100);
    _this.innerRadius = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_1__.percent)(0); // Apply theme

    _this.applyTheme();

    _this.mask = undefined;
    return _this;
  }
  /**
   * Checks if point is within bounds of a container.
   *
   * @ignore Exclude from docs
   * @param point  Point to check
   * @return Fits within container?
   */


  RadarCursor.prototype.fitsToBounds = function (point) {
    var radius = _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.getDistance(point); //if(!$math.isAngleInRange(angle, this.startAngle, this.endAngle)){
    //return false;
    //}

    if (radius < this.truePixelRadius + 1 && radius > this.pixelInnerRadius - 1) {
      // ok to add/remove some
      return true;
    }

    return false;
  };

  Object.defineProperty(RadarCursor.prototype, "startAngle", {
    /**
     * @return Start angle
     */
    get: function get() {
      return this.getPropertyValue("startAngle");
    },

    /**
     * Starting angle of the cursor's radial line.
     *
     * @param value Start angle
     */
    set: function set(value) {
      this.setPropertyValue("startAngle", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(RadarCursor.prototype, "endAngle", {
    /**
     * @return End angle
     */
    get: function get() {
      return this.getPropertyValue("endAngle");
    },

    /**
     * End angle of the cursor's radial line.
     *
     * @param value End angle
     */
    set: function set(value) {
      this.setPropertyValue("endAngle", value, true);
    },
    enumerable: true,
    configurable: true
  });

  RadarCursor.prototype.triggerMoveReal = function (point, force) {
    if (!this.xAxis || this.xAxis && (!this.xAxis.cursorTooltipEnabled || this.xAxis.tooltip.disabled)) {
      this.updateLineX(this.point);
    }

    if (!this.yAxis || this.yAxis && (!this.yAxis.cursorTooltipEnabled || this.yAxis.tooltip.disabled)) {
      this.updateLineY(this.point);
    }

    this.updateSelection();

    _super.prototype.triggerMoveReal.call(this, point, force);
  };
  /**
   * (Re)draws the horizontal (circular) cursor's line.
   *
   * @param point New target point
   */


  RadarCursor.prototype.updateLineX = function (point) {
    var radius = this.pixelRadius;
    var startAngle = this.startAngle;
    var endAngle = this.endAngle;
    var innerRadius = this.pixelInnerRadius;

    if (radius > 0 && _core_utils_Type__WEBPACK_IMPORTED_MODULE_6__.isNumber(startAngle) && _core_utils_Type__WEBPACK_IMPORTED_MODULE_6__.isNumber(endAngle) && _core_utils_Type__WEBPACK_IMPORTED_MODULE_6__.isNumber(innerRadius)) {
      var angle = _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.fitAngleToRange(_core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.getAngle(point), startAngle, endAngle);
      var path = void 0;

      if (this.lineX && this.lineX.visible) {
        this.lineX.moveTo({
          x: 0,
          y: 0
        }); // fill

        if (this.xAxis && this.fullWidthLineX) {
          var startPoint = this.xAxis.currentItemStartPoint;
          var endPoint = this.xAxis.currentItemEndPoint;

          if (startPoint && endPoint) {
            var fillStartAngle = _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.fitAngleToRange(_core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.getAngle(startPoint), startAngle, endAngle);
            var fillEndAngle = _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.fitAngleToRange(_core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.getAngle(endPoint), startAngle, endAngle);
            var arc = fillEndAngle - fillStartAngle; // clockwise
            // this is needed, normalizeAngle doesn't solve it

            if (startAngle < endAngle) {
              if (arc < 0) {
                arc += 360;
              }
            } // ccw
            else {
              if (arc > 0) {
                arc -= 360;
              }
            }

            angle -= arc / 2;
            path = _core_rendering_Path__WEBPACK_IMPORTED_MODULE_3__.moveTo({
              x: innerRadius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.cos(angle),
              y: innerRadius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.sin(angle)
            }) + _core_rendering_Path__WEBPACK_IMPORTED_MODULE_3__.lineTo({
              x: radius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.cos(angle),
              y: radius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.sin(angle)
            }) + _core_rendering_Path__WEBPACK_IMPORTED_MODULE_3__.arcTo(angle, arc, radius) + _core_rendering_Path__WEBPACK_IMPORTED_MODULE_3__.lineTo({
              x: innerRadius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.cos(angle + arc),
              y: innerRadius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.sin(angle + arc)
            }) + _core_rendering_Path__WEBPACK_IMPORTED_MODULE_3__.arcTo(angle + arc, -arc, innerRadius);
          }
        } // line


        if (!path) {
          path = _core_rendering_Path__WEBPACK_IMPORTED_MODULE_3__.moveTo({
            x: innerRadius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.cos(angle),
            y: innerRadius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.sin(angle)
          }) + _core_rendering_Path__WEBPACK_IMPORTED_MODULE_3__.lineTo({
            x: radius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.cos(angle),
            y: radius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.sin(angle)
          });
        }

        this.lineX.path = path;
      }
    }
  };
  /**
   * (Re)draws the vertical (radial) cursor's line.
   *
   * @param point New target point
   */


  RadarCursor.prototype.updateLineY = function (point) {
    if (this.lineY && this.lineY.visible) {
      var startAngle = this.startAngle;
      var endAngle = this.endAngle;
      var truePixelRadius = this.truePixelRadius;
      var radius = _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.fitToRange(_core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.getDistance(point), 0, this.truePixelRadius);

      if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_6__.isNumber(radius) && _core_utils_Type__WEBPACK_IMPORTED_MODULE_6__.isNumber(startAngle)) {
        this.lineY.moveTo({
          x: 0,
          y: 0
        });
        var path = void 0;
        var arc = endAngle - startAngle;

        if (this.yAxis && this.fullWidthLineY) {
          // fill
          var startPoint = this.yAxis.currentItemStartPoint;
          var endPoint = this.yAxis.currentItemEndPoint;

          if (startPoint && endPoint) {
            var innerRadius = _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.fitToRange(_core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.getDistance(startPoint), 0, truePixelRadius);
            radius = _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.fitToRange(_core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.getDistance(endPoint), 0, truePixelRadius);
            path = _core_rendering_Path__WEBPACK_IMPORTED_MODULE_3__.moveTo({
              x: radius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.cos(startAngle),
              y: radius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.sin(startAngle)
            }) + _core_rendering_Path__WEBPACK_IMPORTED_MODULE_3__.arcTo(startAngle, arc, radius);
            path += _core_rendering_Path__WEBPACK_IMPORTED_MODULE_3__.moveTo({
              x: innerRadius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.cos(endAngle),
              y: innerRadius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.sin(endAngle)
            }) + _core_rendering_Path__WEBPACK_IMPORTED_MODULE_3__.arcTo(endAngle, -arc, innerRadius);
          }
        }

        if (!path) {
          path = _core_rendering_Path__WEBPACK_IMPORTED_MODULE_3__.moveTo({
            x: radius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.cos(startAngle),
            y: radius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.sin(startAngle)
          }) + _core_rendering_Path__WEBPACK_IMPORTED_MODULE_3__.arcTo(startAngle, endAngle - startAngle, radius);
        }

        this.lineY.path = path;
      }
    }
  };
  /**
   * Updates selection dimensions on size change.
   *
   * @ignore Exclude from docs
   */


  RadarCursor.prototype.updateSelection = function () {
    if (this._usesSelection) {
      var downPoint = this.downPoint;

      if (downPoint) {
        var point = this.point;
        var radius = this.pixelRadius;
        var truePixelRadius = this.truePixelRadius;
        var innerRadius = this.pixelInnerRadius;
        var startAngle = Math.min(this.startAngle, this.endAngle);
        var endAngle = Math.max(this.startAngle, this.endAngle);
        var downAngle = _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.fitAngleToRange(_core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.getAngle(downPoint), startAngle, endAngle);
        var angle = _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.fitAngleToRange(_core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.getAngle(point), startAngle, endAngle);
        var downRadius = _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.getDistance(downPoint);

        if (downRadius < truePixelRadius) {
          var currentRadius = _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.fitToRange(_core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.getDistance(point), 0, truePixelRadius);
          this._prevAngle = angle;
          var path = _core_rendering_Path__WEBPACK_IMPORTED_MODULE_3__.moveTo({
            x: 0,
            y: 0
          });
          var downSin = _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.sin(downAngle);
          var downCos = _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.cos(downAngle);
          var sin = _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.sin(angle);
          var cos = _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.cos(angle);
          var behavior = this.behavior;

          if (behavior == "zoomX" || behavior == "selectX") {
            path += _core_rendering_Path__WEBPACK_IMPORTED_MODULE_3__.lineTo({
              x: radius * downCos,
              y: radius * downSin
            }) + _core_rendering_Path__WEBPACK_IMPORTED_MODULE_3__.arcTo(downAngle, angle - downAngle, radius) + _core_rendering_Path__WEBPACK_IMPORTED_MODULE_3__.lineTo({
              x: innerRadius * cos,
              y: innerRadius * sin
            }) + _core_rendering_Path__WEBPACK_IMPORTED_MODULE_3__.arcTo(angle, downAngle - angle, innerRadius);
          } else if (behavior == "zoomY" || behavior == "selectY") {
            path = _core_rendering_Path__WEBPACK_IMPORTED_MODULE_3__.moveTo({
              x: currentRadius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.cos(startAngle),
              y: currentRadius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.sin(startAngle)
            }) + _core_rendering_Path__WEBPACK_IMPORTED_MODULE_3__.arcTo(startAngle, endAngle - startAngle, currentRadius) + _core_rendering_Path__WEBPACK_IMPORTED_MODULE_3__.lineTo({
              x: downRadius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.cos(endAngle),
              y: downRadius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.sin(endAngle)
            }) + _core_rendering_Path__WEBPACK_IMPORTED_MODULE_3__.arcTo(endAngle, startAngle - endAngle, downRadius) + _core_rendering_Path__WEBPACK_IMPORTED_MODULE_3__.closePath();
          } else if (behavior == "zoomXY") {
            path = _core_rendering_Path__WEBPACK_IMPORTED_MODULE_3__.moveTo({
              x: currentRadius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.cos(downAngle),
              y: currentRadius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.sin(downAngle)
            }) + _core_rendering_Path__WEBPACK_IMPORTED_MODULE_3__.arcTo(downAngle, angle - downAngle, currentRadius) + _core_rendering_Path__WEBPACK_IMPORTED_MODULE_3__.lineTo({
              x: downRadius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.cos(angle),
              y: downRadius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.sin(angle)
            }) + _core_rendering_Path__WEBPACK_IMPORTED_MODULE_3__.arcTo(angle, downAngle - angle, downRadius) + _core_rendering_Path__WEBPACK_IMPORTED_MODULE_3__.closePath();
          }

          this.selection.path = path;
        }

        this.selection.moveTo({
          x: 0,
          y: 0
        });
      }
    }
  };
  /**
   * Updates cursors current positions.
   */


  RadarCursor.prototype.getPositions = function () {
    // positions are used by axes or series
    var chart = this.chart;

    if (chart) {
      var innerRadius = this.pixelInnerRadius;
      var radius = this.truePixelRadius - innerRadius;
      var startAngle = this.startAngle;
      var endAngle = this.endAngle;
      var angle = _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.fitAngleToRange(_core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.getAngle(this.point), startAngle, endAngle);
      var xPosition = (angle - startAngle) / (endAngle - startAngle);
      this.xPosition = xPosition;
      this.yPosition = _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.fitToRange((_core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.getDistance(this.point) - innerRadius) / radius, 0, 1);
    }
  };
  /**
   * Overriding inherited method, so that nothing happens when it's triggered.
   *
   * @ignore Exclude from docs
   */


  RadarCursor.prototype.updatePoint = function (point) {};
  /**
   * Updates Cursor's position when axis tooltip changes horizontal position.
   *
   * @param event Axis event
   */


  RadarCursor.prototype.handleXTooltipPosition = function (event) {
    if (this.xAxis.cursorTooltipEnabled) {
      var tooltip = this.xAxis.tooltip;
      this.updateLineX(_core_utils_Utils__WEBPACK_IMPORTED_MODULE_5__.svgPointToSprite({
        x: tooltip.pixelX,
        y: tooltip.pixelY
      }, this));
    }
  };
  /**
   * Updates Cursor's position when axis tooltip changes vertical position.
   *
   * @todo Description
   * @param event Axis event
   */


  RadarCursor.prototype.handleYTooltipPosition = function (event) {
    if (this.yAxis.cursorTooltipEnabled) {
      var tooltip = this.yAxis.tooltip;
      this.updateLineY(_core_utils_Utils__WEBPACK_IMPORTED_MODULE_5__.svgPointToSprite({
        x: tooltip.pixelX,
        y: tooltip.pixelY
      }, this));
    }
  };
  /**
   * needs to be overriden
   * @ignore
   */


  RadarCursor.prototype.updateLinePositions = function (point) {};
  /**
   * [getRanges description]
   *
   * @todo Description
   */


  RadarCursor.prototype.getRanges = function () {
    var downPoint = this.downPoint;

    if (downPoint) {
      var upPoint = this.upPoint;
      var chart = this.chart;

      if (chart) {
        var radius = this.pixelRadius;
        var startAngle = this.startAngle;
        var endAngle = this.endAngle;
        var downAngle = _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.fitAngleToRange(_core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.getAngle(downPoint), this.startAngle, this.endAngle);
        var upAngle = _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.fitAngleToRange(_core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.getAngle(upPoint), this.startAngle, this.endAngle);
        var downRadius = _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.fitToRange(_core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.getDistance(downPoint), 0, radius);
        var upRadius = _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.fitToRange(_core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.getDistance(upPoint), 0, radius);
        var startX = 0;
        var endX = 1;
        var startY = 0;
        var endY = 1;
        var behavior = this.behavior;

        if (behavior == "zoomX" || behavior == "selectX" || behavior == "zoomXY" || behavior == "selectXY") {
          var arc = endAngle - startAngle;
          startX = _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.round((downAngle - startAngle) / arc, 5);
          endX = _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.round((upAngle - startAngle) / arc, 5);
        }

        if (behavior == "zoomY" || behavior == "selectY" || behavior == "zoomXY" || behavior == "selectXY") {
          startY = _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.round(downRadius / radius, 5);
          endY = _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.round(upRadius / radius, 5);
        }

        this.xRange = {
          start: Math.min(startX, endX),
          end: Math.max(startX, endX)
        };
        this.yRange = {
          start: Math.min(startY, endY),
          end: Math.max(startY, endY)
        };

        if (this.behavior == "selectX" || this.behavior == "selectY" || this.behavior == "selectXY") {// void
        } else {
          this.selection.hide();
        }
      }
    }
  };
  /**
   * Overriding inherited method, so that nothing happens when `updateSize`
   * is triggered.
   *
   * RadarCursor is quite complicated and needs own sizing logic.
   *
   * @ignore Exclude from docs
   */


  RadarCursor.prototype.updateSize = function () {};

  Object.defineProperty(RadarCursor.prototype, "radius", {
    /**
     * @return Outer radius
     */
    get: function get() {
      return this.getPropertyValue("radius");
    },

    /**
     * Outer radius of the cursor's circular line.
     * Absolute (px) or relative ([[Percent]]).
     *
     * @param value  Outer radius
     */
    set: function set(value) {
      this.setPercentProperty("radius", value, false, false, 10, false);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(RadarCursor.prototype, "pixelRadius", {
    /**
     * Outer radius of the circular line in pixels.
     *
     * @return Outer radius (px)
     * @readonly
     */
    get: function get() {
      return _core_utils_Utils__WEBPACK_IMPORTED_MODULE_5__.relativeRadiusToValue(this.radius, this.truePixelRadius);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(RadarCursor.prototype, "truePixelRadius", {
    /**
     * [truePixelRadius description]
     *
     * @todo Description
     * @return Outer radius (px)
     * @readonly
     */
    get: function get() {
      return _core_utils_Utils__WEBPACK_IMPORTED_MODULE_5__.relativeToValue((0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_1__.percent)(100), _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.min(this.innerWidth / 2, this.innerHeight / 2));
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(RadarCursor.prototype, "innerRadius", {
    /**
     * @return Inner radius
     */
    get: function get() {
      return this.getPropertyValue("innerRadius");
    },

    /**
     * Inner radius of the cursor's circular line.
     * Absolute (px) or relative ([[Percent]]).
     *
     * @param value  Inner radius
     */
    set: function set(value) {
      this.setPercentProperty("innerRadius", value, false, false, 10, false);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(RadarCursor.prototype, "pixelInnerRadius", {
    /**
     * Inner radius of the circular line in pixels.
     *
     * @return Inner radius (px)
     * @readonly
     */
    get: function get() {
      var innerRadius = this.innerRadius;

      if (innerRadius instanceof _core_utils_Percent__WEBPACK_IMPORTED_MODULE_1__.Percent) {
        innerRadius = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_1__.percent)(100 * innerRadius.value * this.chart.innerRadiusModifyer);
      }

      return _core_utils_Utils__WEBPACK_IMPORTED_MODULE_5__.relativeRadiusToValue(innerRadius, this.truePixelRadius) || 0;
    },
    enumerable: true,
    configurable: true
  });
  /**
   *
   * @ignore Exclude from docs
   */

  RadarCursor.prototype.fixPoint = function (point) {
    // overriding xy method
    return point;
  };

  return RadarCursor;
}(_XYCursor__WEBPACK_IMPORTED_MODULE_0__.XYCursor);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_2__.registry.registeredClasses.RadarCursor = RadarCursor;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/cursors/XYCursor.js":
/*!*******************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/cursors/XYCursor.js ***!
  \*******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "XYCursor": () => (/* binding */ XYCursor)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Cursor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Cursor */ "./node_modules/@amcharts/amcharts4/.internal/charts/cursors/Cursor.js");
/* harmony import */ var _core_Sprite__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/Sprite */ "./node_modules/@amcharts/amcharts4/.internal/core/Sprite.js");
/* harmony import */ var _core_utils_Disposer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/utils/Disposer */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Disposer.js");
/* harmony import */ var _axes_ValueAxis__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../axes/ValueAxis */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/ValueAxis.js");
/* harmony import */ var _axes_DateAxis__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../axes/DateAxis */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/DateAxis.js");
/* harmony import */ var _series_XYSeries__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../series/XYSeries */ "./node_modules/@amcharts/amcharts4/.internal/charts/series/XYSeries.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_utils_Color__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../core/utils/Color */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Color.js");
/* harmony import */ var _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../core/utils/InterfaceColorSet */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/InterfaceColorSet.js");
/* harmony import */ var _core_interaction_Interaction__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../core/interaction/Interaction */ "./node_modules/@amcharts/amcharts4/.internal/core/interaction/Interaction.js");
/* harmony import */ var _core_interaction_Mouse__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../core/interaction/Mouse */ "./node_modules/@amcharts/amcharts4/.internal/core/interaction/Mouse.js");
/* harmony import */ var _core_utils_Math__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../core/utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
/* harmony import */ var _core_utils_Utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../core/utils/Utils */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Utils.js");
/* harmony import */ var _core_utils_Type__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../core/utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/* harmony import */ var _core_utils_Array__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../core/utils/Array */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Array.js");
/* harmony import */ var _core_rendering_Path__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../core/rendering/Path */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Path.js");
/**
 * Cursor for XY chart
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */

















/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * A cursor used on [[XYChart]].
 *
 * @see {@link IXYCursorEvents} for a list of available events
 * @see {@link IXYCursorAdapters} for a list of available Adapters
 * @todo Add description, examples
 */

var XYCursor =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_16__.__extends)(XYCursor, _super);
  /**
   * Constructor
   */


  function XYCursor() {
    var _this = // Init
    _super.call(this) || this;
    /**
     * Vertical cursor line element.
     */


    _this._lineX = new _core_utils_Disposer__WEBPACK_IMPORTED_MODULE_2__.MutableValueDisposer();
    /**
     * Horizontal cursor line element.
     */

    _this._lineY = new _core_utils_Disposer__WEBPACK_IMPORTED_MODULE_2__.MutableValueDisposer();
    /**
     * Horizontal [[Axis]].
     */

    _this._xAxis = new _core_utils_Disposer__WEBPACK_IMPORTED_MODULE_2__.MutableValueDisposer();
    /**
     * Vertical [[Axis]].
     */

    _this._yAxis = new _core_utils_Disposer__WEBPACK_IMPORTED_MODULE_2__.MutableValueDisposer();
    _this._snapToDisposers = [];
    _this.className = "XYCursor"; // Defaults

    _this.behavior = "zoomX";
    _this.maxPanOut = 0.1;
    var interfaceColors = new _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_8__.InterfaceColorSet();
    _this.snapOnPan = true; // Create selection element

    var selection = _this.createChild(_core_Sprite__WEBPACK_IMPORTED_MODULE_1__.Sprite);

    selection.shouldClone = false;
    selection.fillOpacity = 0.2;
    selection.fill = interfaceColors.getFor("alternativeBackground");
    selection.isMeasured = false;
    selection.visible = false;
    selection.interactionsEnabled = false;
    _this.selection = selection;

    _this._disposers.push(_this.selection); // Create cursor's vertical line


    var lineX = _this.createChild(_core_Sprite__WEBPACK_IMPORTED_MODULE_1__.Sprite);

    lineX.shouldClone = false;
    lineX.stroke = interfaceColors.getFor("grid");
    lineX.fill = (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_7__.color)();
    lineX.strokeDasharray = "3,3";
    lineX.isMeasured = false;
    lineX.strokeOpacity = 0.4;
    lineX.interactionsEnabled = false;
    lineX.y = 0; // important

    _this.lineX = lineX;

    _this._disposers.push(_this.lineX); // Create cursor's horizontal line


    var lineY = _this.createChild(_core_Sprite__WEBPACK_IMPORTED_MODULE_1__.Sprite);

    lineY.shouldClone = false;
    lineY.stroke = interfaceColors.getFor("grid");
    lineY.fill = (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_7__.color)();
    lineY.strokeDasharray = "3,3";
    lineY.isMeasured = false;
    lineY.strokeOpacity = 0.4;
    lineY.interactionsEnabled = false;
    lineY.x = 0; // important

    _this.lineY = lineY;

    _this._disposers.push(_this.lineY); // Add handler for size changes


    _this.events.on("sizechanged", _this.updateSize, _this, false);

    _this._disposers.push(_this._lineX);

    _this._disposers.push(_this._lineY);

    _this._disposers.push(_this._xAxis);

    _this._disposers.push(_this._yAxis);

    _this.mask = _this;
    _this.hideSeriesTooltipsOnSelection = true; // Apply theme

    _this.applyTheme();

    return _this;
  }
  /**
   * Updates cursor element dimensions on size change.
   *
   * @ignore Exclude from docs
   */


  XYCursor.prototype.updateSize = function () {
    if (this.lineX) {
      this.lineX.path = _core_rendering_Path__WEBPACK_IMPORTED_MODULE_15__.moveTo({
        x: 0,
        y: 0
      }) + _core_rendering_Path__WEBPACK_IMPORTED_MODULE_15__.lineTo({
        x: 0,
        y: this.innerHeight
      });
    }

    if (this.lineY) {
      this.lineY.path = _core_rendering_Path__WEBPACK_IMPORTED_MODULE_15__.moveTo({
        x: 0,
        y: 0
      }) + _core_rendering_Path__WEBPACK_IMPORTED_MODULE_15__.lineTo({
        x: this.innerWidth,
        y: 0
      });
    }
  };
  /**
   * Updates selection dimensions on size change.
   *
   * @ignore Exclude from docs
   */


  XYCursor.prototype.updateSelection = function () {
    if (this._usesSelection) {
      var downPoint = this.downPoint;
      var behavior = this.behavior;

      if (downPoint) {
        var point = this.point;

        if (this.lineX) {
          point.x = this.lineX.pixelX;
        }

        if (this.lineY) {
          point.y = this.lineY.pixelY;
        }

        var selection = this.selection;
        var x = Math.min(point.x, downPoint.x);
        var y = Math.min(point.y, downPoint.y);
        var w = _core_utils_Math__WEBPACK_IMPORTED_MODULE_11__.round(Math.abs(downPoint.x - point.x), this._positionPrecision);
        var h = _core_utils_Math__WEBPACK_IMPORTED_MODULE_11__.round(Math.abs(downPoint.y - point.y), this._positionPrecision);

        switch (behavior) {
          case "zoomX":
            y = 0;
            h = this.pixelHeight;
            break;

          case "zoomY":
            x = 0;
            w = this.pixelWidth;
            break;

          case "selectX":
            y = 0;
            h = this.pixelHeight;
            break;

          case "selectY":
            x = 0;
            w = this.pixelWidth;
            break;
        }

        selection.x = x;
        selection.y = y;
        selection.path = _core_rendering_Path__WEBPACK_IMPORTED_MODULE_15__.rectangle(w, h);
        selection.validatePosition(); // otherwise Edge shoes some incorrect size rectangle
      } else {
        if (this._generalBehavior != "select") {
          this.selection.hide();
        }
      }
    }
  };
  /**
   *
   * @ignore Exclude from docs
   */


  XYCursor.prototype.fixPoint = function (point) {
    point.x = Math.max(0, point.x);
    point.y = Math.max(0, point.y);
    point.x = Math.min(this.pixelWidth, point.x);
    point.y = Math.min(this.pixelHeight, point.y);
    return point;
  };
  /**
   * Places the cursor at specific point.
   *
   * @param point Point to place cursor at
   */


  XYCursor.prototype.triggerMoveReal = function (point, force) {
    _super.prototype.triggerMoveReal.call(this, point, force);

    var snapToSeries = this.snapToSeries;

    if (snapToSeries && !this.downPoint) {
      if (snapToSeries instanceof _series_XYSeries__WEBPACK_IMPORTED_MODULE_5__.XYSeries) {
        if (snapToSeries.isHidden) {
          this.updateLinePositions(point);
        }
      } else {
        var allHidden_1 = true;
        _core_utils_Array__WEBPACK_IMPORTED_MODULE_14__.each(snapToSeries, function (s) {
          if (!s.isHidden) {
            allHidden_1 = false;
          }
        });

        if (allHidden_1) {
          this.updateLinePositions(point);
        }
      }
    } else {
      this.updateLinePositions(point);
    }

    if (this.downPoint && _core_utils_Math__WEBPACK_IMPORTED_MODULE_11__.getDistance(this.downPoint, point) > 3) {
      if (this._generalBehavior == "pan") {
        this.getPanningRanges();
        this.dispatch("panning");
      }
    }
  };
  /**
   *
   * @ignore Exclude from docs
   */


  XYCursor.prototype.updateLinePositions = function (point) {
    point = this.fixPoint(this.point);

    if (this.lineX && this.lineX.visible && !this.xAxis) {
      this.lineX.x = point.x;
    }

    if (this.lineY && this.lineY.visible && !this.yAxis) {
      this.lineY.y = point.y;
    }

    this.updateSelection();
  };

  XYCursor.prototype.triggerDownReal = function (point) {
    if (this.visible && !this.isHiding) {
      if (this._generalBehavior == "select") {
        this.selection.parent = this.parent;
      }

      if (this.fitsToBounds(point)) {
        this.downPoint = {
          x: point.x,
          y: point.y
        };
        this.updatePoint(point); //this.updateLinePositions(point); // otherwise lines won't be in correct position and touch won't work fine

        this.point.x = this.downPoint.x;
        this.point.y = this.downPoint.y;
        var selection = this.selection;
        var selectionX = this.downPoint.x;
        var selectionY = this.downPoint.y;

        if (this._usesSelection) {
          selection.x = selectionX;
          selection.y = selectionY;
          selection.path = "";
          selection.show();
        }

        _super.prototype.triggerDownReal.call(this, point);
      } else {
        this.downPoint = undefined;
      }
    } else {
      this.downPoint = undefined;
    }
  };
  /**
   * Updates the coordinates of where pointer down event occurred
   * (was pressed).
   */


  XYCursor.prototype.updatePoint = function (point) {
    if (this.lineX) {
      point.x = this.lineX.pixelX;
    }

    if (this.lineY) {
      point.y = this.lineY.pixelY;
    }
  };
  /**
   * Handle action when cursor is released, which should perform an operation
   * based on its `behavior`, like zoom.
   *
   * @param  point  Release point
   */


  XYCursor.prototype.triggerUpReal = function (point) {
    if (this.hasMoved()) {
      if (this.downPoint) {
        this.upPoint = point;
        this.updatePoint(this.upPoint);

        if (this._generalBehavior != "pan") {
          this.getRanges();
        }

        if (this._generalBehavior != "select") {
          this.selection.hide();
        }

        _super.prototype.triggerUpReal.call(this, point);
      }
    } else {
      if (this._generalBehavior != "select") {
        this.selection.hide(0);
      } else {
        this.xRange = undefined;
        this.yRange = undefined;
        this.dispatchImmediately("selectended");
      } // reset cursor style, just in case


      if (this._generalBehavior == "pan") {
        var interaction = (0,_core_interaction_Interaction__WEBPACK_IMPORTED_MODULE_9__.getInteraction)();
        interaction.setGlobalStyle(_core_interaction_Mouse__WEBPACK_IMPORTED_MODULE_10__.MouseCursorStyle["default"]);
      }

      this.dispatchImmediately("behaviorcanceled");
    }

    this.downPoint = undefined;
    this.dispatch("cursorpositionchanged");
  };
  /**
   * Calculates if the cursor has moved enough based on its `behavior`.
   *
   * @return Moved?
   */


  XYCursor.prototype.hasMoved = function () {
    var distance;

    if (this.behavior == "zoomX" || this.behavior == "panX") {
      distance = _core_utils_Math__WEBPACK_IMPORTED_MODULE_11__.getHorizontalDistance(this._upPointOrig, this._downPointOrig);
    } else if (this.behavior == "zoomY" || this.behavior == "panY") {
      distance = _core_utils_Math__WEBPACK_IMPORTED_MODULE_11__.getVerticalDistance(this._upPointOrig, this._downPointOrig);
    } else {
      distance = _core_utils_Math__WEBPACK_IMPORTED_MODULE_11__.getDistance(this._upPointOrig, this._downPointOrig);
    }

    return distance > (0,_core_interaction_Interaction__WEBPACK_IMPORTED_MODULE_9__.getInteraction)().getHitOption(this.interactions, "hitTolerance");
  };
  /**
   * [getRanges description]
   *
   * @todo Description
   */


  XYCursor.prototype.getPanningRanges = function () {
    var startX = _core_utils_Math__WEBPACK_IMPORTED_MODULE_11__.round(this.downPoint.x / this.innerWidth, 5);
    var startY = 1 - _core_utils_Math__WEBPACK_IMPORTED_MODULE_11__.round(this.downPoint.y / this.innerHeight, 5);
    var currentX = _core_utils_Math__WEBPACK_IMPORTED_MODULE_11__.round(this.point.x / this.innerWidth, 5);
    var currentY = 1 - _core_utils_Math__WEBPACK_IMPORTED_MODULE_11__.round(this.point.y / this.innerHeight, 5);
    var deltaX = startX - currentX;
    var deltaY = startY - currentY;
    this.xRange = {
      start: deltaX,
      end: 1 + deltaX
    };
    this.yRange = {
      start: deltaY,
      end: 1 + deltaY
    };

    if (this.behavior == "panX") {
      this.yRange.start = 0;
      this.yRange.end = 1;
    }

    if (this.behavior == "panY") {
      this.xRange.start = 0;
      this.xRange.end = 1;
    }
  };
  /**
   * [getRanges description]
   *
   * @todo Description
   */


  XYCursor.prototype.getRanges = function () {
    if (this.lineX) {
      this.upPoint.x = this.lineX.pixelX;
    }

    if (this.lineY) {
      this.upPoint.y = this.lineY.pixelY;
    } // @todo Is this needed?


    _core_utils_Utils__WEBPACK_IMPORTED_MODULE_12__.used(this.selection);
    var startX = _core_utils_Math__WEBPACK_IMPORTED_MODULE_11__.round(this.downPoint.x / this.innerWidth, 5);
    var endX = _core_utils_Math__WEBPACK_IMPORTED_MODULE_11__.round(this.upPoint.x / this.innerWidth, 5);
    var startY = 1 - _core_utils_Math__WEBPACK_IMPORTED_MODULE_11__.round(this.downPoint.y / this.innerHeight, 5);
    var endY = 1 - _core_utils_Math__WEBPACK_IMPORTED_MODULE_11__.round(this.upPoint.y / this.innerHeight, 5);
    this.xRange = {
      start: _core_utils_Math__WEBPACK_IMPORTED_MODULE_11__.min(startX, endX),
      end: _core_utils_Math__WEBPACK_IMPORTED_MODULE_11__.max(startX, endX)
    };
    this.yRange = {
      start: _core_utils_Math__WEBPACK_IMPORTED_MODULE_11__.min(startY, endY),
      end: _core_utils_Math__WEBPACK_IMPORTED_MODULE_11__.max(startY, endY)
    };
  };

  Object.defineProperty(XYCursor.prototype, "behavior", {
    /**
     * Behavior
     */
    get: function get() {
      return this.getPropertyValue("behavior");
    },

    /**
     * Cursor's behavior when it's moved with pointer down:
     *
     * * `"zoomX"` - zooms horizontally.
     * * `"zoomY"` - zooms vertically.
     * * `"zoomXY"` - zooms both horizontally and vertically.
     * * `"selectX"` - selects a range horizontally.
     * * `"selectY"` - selects a range vertically.
     * * `"selectXY"` - selects a range both horizontally and vertically.
     * * `"panX"` - moves (pans) current selection horizontally.
     * * `"panY"` - moves (pans) current selection vertically.
     * * `"panXY"` - moves (pans) current selection both horizontally and vertically.
     * * `"none"` - does nothing with pointer down.
     *
     * E.g. "zoomXY" will mean that pressing a mouse (or touching) over plot area
     * and dragging it will start zooming the chart.
     *
     * NOTE: `"zoomXY"` acts differently when used on a `DateAxis`.
     * See [this note](https://www.amcharts.com/docs/v4/concepts/chart-cursor/#zoomXY_behavior_and_DateAxis).
     *
     * @param value Bheavior
     */
    set: function set(value) {
      this.setPropertyValue("behavior", value, true);
      this._usesSelection = false;

      if (value.indexOf("zoom") != -1) {
        this._generalBehavior = "zoom";
        this._usesSelection = true;
      }

      if (value.indexOf("select") != -1) {
        this._generalBehavior = "select";
        this._usesSelection = true;
      }

      if (value.indexOf("pan") != -1) {
        this._generalBehavior = "pan";
        this._usesSelection = false;
      }
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Determines whether Cursor should prevent default action on move.
   *
   * If cursor's behavior is "none", it should not obstruct the page scrolling.
   *
   * @return Prevent default?
   */

  XYCursor.prototype.shouldPreventGestures = function (touch) {
    return (!this.interactions.isTouchProtected || !touch) && this.behavior != "none";
  };

  Object.defineProperty(XYCursor.prototype, "fullWidthLineX", {
    /**
     * @return Full width?
     */
    get: function get() {
      return this.getPropertyValue("fullWidthLineX");
    },

    /**
     * Cursor's horizontal line is expanded to take full width of the related
     * Axis' cell/category.
     *
     * NOTE: this setting will work properly if `xAxis` is set and only in case
     * `xAxis` is [[CategoryAxis]] or [[DateAxis]].
     *
     * @param value Full width?
     */
    set: function set(value) {
      this.setPropertyValue("fullWidthLineX", value);

      if (!value) {
        this.updateSize();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(XYCursor.prototype, "fullWidthLineY", {
    /**
     * @return Full width?
     */
    get: function get() {
      return this.getPropertyValue("fullWidthLineY");
    },

    /**
     * Cursor's vertical line is expanded to take full width of the related
     * Axis' cell/category.
     *
     * NOTE: this setting will work properly if `yAxis` is set and only in case
     * `yAxis` is [[CategoryAxis]] or [[DateAxis]].
     *
     * @param value Full width?
     */
    set: function set(value) {
      this.setPropertyValue("fullWidthLineY", value);

      if (!value) {
        this.updateSize();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(XYCursor.prototype, "hideSeriesTooltipsOnSelection", {
    /**
     * @return hide tooltip?
     */
    get: function get() {
      return this.getPropertyValue("hideSeriesTooltipsOnSelection");
    },

    /**
     * If set to `true` this will hide series tooltips when selecting with cursor.
     *
     * @since 4.5.15
     * @param  value  hide tooltips?
     */
    set: function set(value) {
      this.setPropertyValue("hideSeriesTooltipsOnSelection", value);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(XYCursor.prototype, "maxTooltipDistance", {
    /**
     * @return Distance
     */
    get: function get() {
      return this.getPropertyValue("maxTooltipDistance");
    },

    /**
     * If set to a numeric value, cursor will display closest series' tooltips
     * plus tooltips from series that are closer to than `maxTooltipDistance` to
     * it.
     *
     * Set it to `-1` to always force one tooltip, even if there are multiple
     * data items in exactly same place.
     *
     * @since 4.7.18
     * @param  value  Distance
     */
    set: function set(value) {
      this.setPropertyValue("maxTooltipDistance", value);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(XYCursor.prototype, "maxPanOut", {
    /**
     * @return Full width?
     */
    get: function get() {
      return this.getPropertyValue("maxPanOut");
    },

    /**
     * If cursor behavior is panX or panY, we allow to pan plot out of it's max bounds for a better user experience.
     * This setting specifies relative value by how much we can pan out the plot
     *
     * @param value
     */
    set: function set(value) {
      this.setPropertyValue("maxPanOut", value);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(XYCursor.prototype, "xAxis", {
    /**
     * @return X axis
     */
    get: function get() {
      return this._xAxis.get();
    },

    /**
     * A reference to X [[Axis]].
     *
     * An XY cursor can live without `xAxis` set. You set xAxis for cursor when
     * you have axis tooltip enabled and you want cursor line to be at the same
     * position as tooltip.
     *
     * This works with [[CategoryAxis]] and [[DateAxis]] but not with
     * [[ValueAxis]].
     *
     * @todo Description (review)
     * @param axis X axis
     */
    set: function set(axis) {
      var _this = this;

      if (this._xAxis.get() != axis) {
        this._xAxis.set(axis, new _core_utils_Disposer__WEBPACK_IMPORTED_MODULE_2__.MultiDisposer([axis.tooltip.events.on("positionchanged", this.handleXTooltipPosition, this, false), axis.events.on("rangechangestarted", function (event) {
          _this.hide(0);

          _this.preventShow = true;
        }, undefined, false), axis.events.on("rangechangeended", function (event) {
          _this.preventShow = false;

          _this.hide(0);

          _this.dispatch("cursorpositionchanged");
        }, undefined, false)]));
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(XYCursor.prototype, "yAxis", {
    /**
     * @return Y Axis
     */
    get: function get() {
      return this._yAxis.get();
    },

    /**
     * A reference to Y [[Axis]].
     *
     * An XY cursor can live without `yAxis` set. You set xAxis for cursor when
     * you have axis tooltip enabled and you want cursor line to be at the same
     * position as tooltip.
     *
     * This works with [[CategoryAxis]] and [[DateAxis]] but not with
     * [[ValueAxis]].
     *
     * @todo Description (review)
     * @param axis Y axis
     */
    set: function set(axis) {
      var _this = this;

      if (this._yAxis.get() != axis) {
        this._yAxis.set(axis, new _core_utils_Disposer__WEBPACK_IMPORTED_MODULE_2__.MultiDisposer([axis.tooltip.events.on("positionchanged", this.handleYTooltipPosition, this, false), axis.events.on("rangechangestarted", function (event) {
          _this.hide(0);

          _this.__disabled = true;
        }, undefined, false), axis.events.on("rangechangeended", function (event) {
          _this.__disabled = false;

          _this.hide(0);

          _this.dispatch("cursorpositionchanged");
        }, undefined, false)]));
      }
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Updates Cursor's position when axis tooltip changes position.
   *
   * @ignore Exclude from docs
   * @param event Original Axis event
   */

  XYCursor.prototype.handleXTooltipPosition = function (event) {
    var tooltip = this.xAxis.tooltip;
    var point = _core_utils_Utils__WEBPACK_IMPORTED_MODULE_12__.svgPointToSprite({
      x: tooltip.pixelX,
      y: tooltip.pixelY
    }, this);
    var x = point.x;
    point.y = 1;

    if (this.lineX) {
      this.lineX.x = x;

      if (!this.fitsToBounds(point)) {
        this.hide();
      }
    }

    if (this.xAxis && this.fullWidthLineX) {
      var startPoint = this.xAxis.currentItemStartPoint;
      var endPoint = this.xAxis.currentItemEndPoint;

      if (startPoint && endPoint) {
        this.lineX.x = x;
        var width = endPoint.x - startPoint.x;
        this.lineX.path = _core_rendering_Path__WEBPACK_IMPORTED_MODULE_15__.rectangle(width, this.innerHeight, -width / 2);
      }
    }
  };
  /**
   * Updates Cursor's position when Y axis changes position or scale.
   *
   * @ignore Exclude from docs
   * @param event Original Axis event
   */


  XYCursor.prototype.handleYTooltipPosition = function (event) {
    var tooltip = this.yAxis.tooltip;
    var point = _core_utils_Utils__WEBPACK_IMPORTED_MODULE_12__.svgPointToSprite({
      x: tooltip.pixelX,
      y: tooltip.pixelY
    }, this);
    var y = point.y;
    point.x = 1;

    if (this.lineY) {
      this.lineY.y = y;

      if (!this.fitsToBounds(point)) {
        this.hide();
      }
    }

    if (this.yAxis && this.fullWidthLineY) {
      var startPoint = this.yAxis.currentItemStartPoint;
      var endPoint = this.yAxis.currentItemEndPoint;

      if (startPoint && endPoint) {
        this.lineY.y = y;
        var height = endPoint.y - startPoint.y;
        this.lineY.path = _core_rendering_Path__WEBPACK_IMPORTED_MODULE_15__.rectangle(this.innerWidth, height, 0, -height / 2);
      }
    }
  };

  Object.defineProperty(XYCursor.prototype, "lineX", {
    /**
     * @return Line element
     */
    get: function get() {
      return this._lineX.get();
    },

    /**
     * A Line element to use for X axis.
     *
     * @param lineX Line
     */
    set: function set(lineX) {
      if (lineX) {
        lineX.setElement(this.paper.add("path"));

        this._lineX.set(lineX, lineX.events.on("positionchanged", this.updateSelection, this, false));

        lineX.interactionsEnabled = false;
        lineX.parent = this;
      } else {
        this._lineX.reset();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(XYCursor.prototype, "lineY", {
    /**
     * @return Line element
     */
    get: function get() {
      return this._lineY.get();
    },

    /**
     * A Line element to use Y axis.
     *
     * @param lineY Line
     */
    set: function set(lineY) {
      if (lineY) {
        lineY.setElement(this.paper.add("path"));

        this._lineY.set(lineY, lineY.events.on("positionchanged", this.updateSelection, this, false));

        lineY.parent = this;
        lineY.interactionsEnabled = false;
      } else {
        this._lineY.reset();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(XYCursor.prototype, "selection", {
    /**
     * @return Selection rectangle
     */
    get: function get() {
      return this._selection;
    },

    /**
     * A selection element ([[Sprite]]).
     *
     * @param selection Selection rectangle
     */
    set: function set(selection) {
      this._selection = selection;

      if (selection) {
        selection.element = this.paper.add("path");
        selection.parent = this;
      }
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Processes JSON-based config before it is applied to the object.
   *
   * Looks if `xAxis` and `yAxis` is set via ID in JSON config, and replaces
   * with real references.
   *
   * @ignore Exclude from docs
   * @param config  Config
   */

  XYCursor.prototype.processConfig = function (config) {
    var _this = this;

    if (config) {
      // Set up axes
      if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_13__.hasValue(config.xAxis) && _core_utils_Type__WEBPACK_IMPORTED_MODULE_13__.isString(config.xAxis)) {
        if (this.map.hasKey(config.xAxis)) {
          config.xAxis = this.map.getKey(config.xAxis);
        } else {
          this.processingErrors.push("[XYCursor] No axis with id \"" + config.xAxis + "\" found for `xAxis`");
          delete config.xAxis;
        }
      }

      if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_13__.hasValue(config.yAxis) && _core_utils_Type__WEBPACK_IMPORTED_MODULE_13__.isString(config.yAxis)) {
        if (this.map.hasKey(config.yAxis)) {
          config.yAxis = this.map.getKey(config.yAxis);
        } else {
          this.processingErrors.push("[XYCursor] No axis with id \"" + config.yAxis + "\" found for `yAxis`");
          delete config.yAxis;
        }
      }

      if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_13__.hasValue(config.snapToSeries)) {
        var snapTo_1 = _core_utils_Type__WEBPACK_IMPORTED_MODULE_13__.isArray(config.snapToSeries) ? config.snapToSeries : [config.snapToSeries];
        var snapError_1 = false;
        _core_utils_Array__WEBPACK_IMPORTED_MODULE_14__.each(snapTo_1, function (snap, index) {
          if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_13__.isString(snap)) {
            if (_this.map.hasKey(snap)) {
              snapTo_1[index] = _this.map.getKey(snap);
            } else {
              _this.processingErrors.push("[XYCursor] No series with id \"" + snap + "\" found for `series`");

              snapError_1 = true;
            }
          }
        });

        if (snapError_1) {
          delete config.snapToSeries;
        } else {
          config.snapToSeries = snapTo_1;
        }
      }
    }

    _super.prototype.processConfig.call(this, config);
  };

  Object.defineProperty(XYCursor.prototype, "snapToSeries", {
    /**
     * @return {XYSeries | XYSeries[]}
     */
    get: function get() {
      return this.getPropertyValue("snapToSeries");
    },

    /**
     * Specifies to which series cursor lines should be snapped.
     *
     * Can be a single series instance or an array of series.
     *
     * @param {XYSeries | XYSeries[]}
     */
    set: function set(series) {
      var _this = this;

      if (this.setPropertyValue("snapToSeries", series)) {
        if (series instanceof _series_XYSeries__WEBPACK_IMPORTED_MODULE_5__.XYSeries) {
          series = [series];
        }

        if (this._snapToDisposers) {
          _core_utils_Array__WEBPACK_IMPORTED_MODULE_14__.each(this._snapToDisposers, function (disposer) {
            disposer.dispose();
          });
        }

        this._snapToDisposers = [];

        if (series) {
          _core_utils_Array__WEBPACK_IMPORTED_MODULE_14__.each(series, function (s) {
            _this._snapToDisposers.push(s.events.on("tooltipshownat", function () {
              _this.handleSnap(s);
            }, undefined, false));
          });
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(XYCursor.prototype, "snapOnPan", {
    /**
     * Should zoom selection "snap" into equal categories/intervals after panning
     * the chart? (when `behavior == "panX"`)
     *
     * @default true
     * @since 4.10.17
     * @return Snap on pan?
     */
    get: function get() {
      return this.getPropertyValue("snapOnPan");
    },

    /**
     * @param value Snap on pan?
     */
    set: function set(value) {
      this.setPropertyValue("snapOnPan", value);
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Snaps the zoom selection after chart is panned.
   *
   * @ignore
   */

  XYCursor.prototype.handleSnap = function (series) {
    if (!this.downPoint) {
      var x = series.getTooltipX() + series.xAxis.pixelX;
      var y = series.getTooltipY() + series.yAxis.pixelY;
      var xAxis = series.xAxis;
      var yAxis = series.yAxis;

      if (xAxis) {
        if (xAxis.renderer.opposite) {
          y -= this.pixelHeight;
        }
      }

      this.point = {
        x: x,
        y: y
      };
      this.getPositions();
      var xx = x;
      var yy = y;
      x -= this.pixelWidth;

      if (yAxis) {
        if (yAxis.renderer.opposite) {
          x += this.pixelWidth;
        }
      }

      var tooltip = series.tooltip;
      var duration = tooltip.animationDuration;
      var easing = tooltip.animationEasing;

      if (xAxis instanceof _axes_ValueAxis__WEBPACK_IMPORTED_MODULE_3__.ValueAxis && !(xAxis instanceof _axes_DateAxis__WEBPACK_IMPORTED_MODULE_4__.DateAxis) && yAxis instanceof _axes_ValueAxis__WEBPACK_IMPORTED_MODULE_3__.ValueAxis && !(yAxis instanceof _axes_DateAxis__WEBPACK_IMPORTED_MODULE_4__.DateAxis)) {
        series.yAxis.showTooltipAtPosition(this.yPosition);
        series.xAxis.showTooltipAtPosition(this.xPosition);
      } else {
        if (series.baseAxis == series.xAxis) {
          series.yAxis.showTooltipAtPosition(this.yPosition);
        }

        if (series.baseAxis == series.yAxis) {
          series.xAxis.showTooltipAtPosition(this.xPosition);
        }
      } //	this.lineX.animate([{ property: "y", to: y }], duration, easing);
      //	this.lineY.animate([{ property: "x", to: x }], duration, easing);


      this.lineY.x = x;
      this.lineX.y = y;

      if (!this.xAxis) {
        this.lineX.animate([{
          property: "x",
          to: xx
        }], duration, easing);
      }

      if (!this.yAxis) {
        this.lineY.animate([{
          property: "y",
          to: yy
        }], duration, easing);
      }
    }
  };
  /**
   * Destroys this object and all related data.
   */


  XYCursor.prototype.dispose = function () {
    this.hide(0);

    _super.prototype.dispose.call(this);
  };

  return XYCursor;
}(_Cursor__WEBPACK_IMPORTED_MODULE_0__.Cursor);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_6__.registry.registeredClasses.XYCursor = XYCursor;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/Bullet.js":
/*!******************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/elements/Bullet.js ***!
  \******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Bullet": () => (/* binding */ Bullet)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _core_Container__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../core/Container */ "./node_modules/@amcharts/amcharts4/.internal/core/Container.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_utils_Responsive__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/utils/Responsive */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Responsive.js");
/**
 * Module that defines everything related to building bullets.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */




/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Class used to creates bullets.
 *
 * @see {@link IBulletEvents} for a list of available events
 * @see {@link IBulletAdapters} for a list of available Adapters
 * @todo Usage example
 * @important
 */

var Bullet =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__extends)(Bullet, _super);
  /**
   * Constructor
   */


  function Bullet() {
    var _this = _super.call(this) || this;

    _this.className = "Bullet";
    _this.isMeasured = false;
    _this.tooltipX = 0;
    _this.tooltipY = 0;
    _this.layout = "none";
    _this.applyOnClones = true;
    _this.copyToLegendMarker = true;

    _this.applyTheme();

    return _this;
  }

  Object.defineProperty(Bullet.prototype, "locationX", {
    /**
     * @return Location (0-1)
     */
    get: function get() {
      return this.getPropertyValue("locationX");
    },

    /**
     * Relative horizontal location within cell. (0-1)
     *
     * @param value  Location (0-1)
     */
    set: function set(value) {
      if (this.setPropertyValue("locationX", value)) {
        var dataItem = this.dataItem;

        if (dataItem && dataItem.component) {
          dataItem.component.invalidate();
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Bullet.prototype, "locationY", {
    /**
     * @return Location (0-1)
     */
    get: function get() {
      return this.getPropertyValue("locationY");
    },

    /**
     * Relative vertical location within cell. (0-1)
     *
     * @param value  Location (0-1)
     */
    set: function set(value) {
      if (this.setPropertyValue("locationY", value)) {
        var dataItem = this.dataItem;

        if (dataItem && dataItem.component) {
          dataItem.component.invalidate();
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Bullet.prototype, "xField", {
    /**
     * @return [description]
     */
    get: function get() {
      return this.getPropertyValue("xField");
    },

    /**
     * [xField description]
     *
     * @todo Description
     * @param value  [description]
     */
    set: function set(value) {
      this.setPropertyValue("xField", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Bullet.prototype, "yField", {
    /**
     * @return [description]
     */
    get: function get() {
      return this.getPropertyValue("yField");
    },

    /**
     * [yField description]
     *
     * Description
     * @param value  [description]
     */
    set: function set(value) {
      this.setPropertyValue("yField", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Bullet.prototype, "isDynamic", {
    /**
     * @return Redraw on data change?
     */
    get: function get() {
      return this.getPropertyValue("isDynamic");
    },

    /**
     * Indicates if the bullet is "dynamic".
     *
     * In most cases the bullets remain the same, even if the underlying data
     * changes.
     *
     * However, in cases where bullet also displays a label, or its size depends
     * on data, it also needs to be redrawn when the underlying data changes.
     *
     * Only those bullets that have set `isDynamic = true` will be redrawn each
     * time data changes. Regular bullets will be reused as they are.
     *
     * @default false
     * @param value  Redraw on data change?
     */
    set: function set(value) {
      this.setPropertyValue("isDynamic", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Bullet.prototype, "copyToLegendMarker", {
    /**
     * @return Redraw on data change?
     */
    get: function get() {
      return this.getPropertyValue("copyToLegendMarker");
    },

    /**
     * Indicates if the bullet should be copied to legend marker
     *
     * @default false
     * @param value  Redraw on data change?
     */
    set: function set(value) {
      this.setPropertyValue("copyToLegendMarker", value);
    },
    enumerable: true,
    configurable: true
  });
  return Bullet;
}(_core_Container__WEBPACK_IMPORTED_MODULE_0__.Container);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses.Bullet = Bullet;
/**
 * Add default responsive rules
 */

/**
 * Hide bullets
 */

_core_utils_Responsive__WEBPACK_IMPORTED_MODULE_2__.defaultRules.push({
  relevant: _core_utils_Responsive__WEBPACK_IMPORTED_MODULE_2__.ResponsiveBreakpoints.isXS,
  state: function state(target, stateId) {
    if (target instanceof Bullet) {
      var state = target.states.create(stateId);
      state.properties.disabled = true;
      return state;
    }

    return null;
  }
});

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/Candlestick.js":
/*!***********************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/elements/Candlestick.js ***!
  \***********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Candlestick": () => (/* binding */ Candlestick)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Column__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Column */ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/Column.js");
/* harmony import */ var _core_elements_Line__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/elements/Line */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Line.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/**
 * Module that defines everything related to building Candlesticks.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */




/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Class used to creates Candlesticks.
 *
 * @see {@link ICandlestickEvents} for a list of available events
 * @see {@link ICandlestickAdapters} for a list of available Adapters
 * @todo Usage example
 * @important
 */

var Candlestick =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__extends)(Candlestick, _super);
  /**
   * Constructor
   */


  function Candlestick() {
    var _this = _super.call(this) || this;

    _this.className = "Candlestick";
    _this.layout = "none";
    return _this;
  }
  /**
   * @ignore
   */


  Candlestick.prototype.createAssets = function () {
    _super.prototype.createAssets.call(this);

    this.lowLine = this.createChild(_core_elements_Line__WEBPACK_IMPORTED_MODULE_1__.Line);
    this.lowLine.shouldClone = false;
    this.highLine = this.createChild(_core_elements_Line__WEBPACK_IMPORTED_MODULE_1__.Line);
    this.highLine.shouldClone = false;
  };
  /**
   * Copies all parameters from another [[Candlestick]].
   *
   * @param source Source Candlestick
   */


  Candlestick.prototype.copyFrom = function (source) {
    _super.prototype.copyFrom.call(this, source);

    if (this.lowLine) {
      this.lowLine.copyFrom(source.lowLine);
    }

    if (this.highLine) {
      this.highLine.copyFrom(source.highLine);
    }
  };

  return Candlestick;
}(_Column__WEBPACK_IMPORTED_MODULE_0__.Column);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_2__.registry.registeredClasses.Candlestick = Candlestick;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/ChordLink.js":
/*!*********************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/elements/ChordLink.js ***!
  \*********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "ChordLink": () => (/* binding */ ChordLink)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _FlowDiagramLink__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./FlowDiagramLink */ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/FlowDiagramLink.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_elements_QuadraticCurve__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/elements/QuadraticCurve */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/QuadraticCurve.js");
/* harmony import */ var _core_utils_Math__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
/* harmony import */ var _core_rendering_Path__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../core/rendering/Path */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Path.js");
/**
 * ChordLink module
 */






/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * This class creates a link (waved color-filled line) between two nodes in a
 * Chord Diagram.
 *
 * @see {@link IChordLinkEvents} for a list of available events
 * @see {@link IChordLinkAdapters} for a list of available Adapters
 * @important
 */

var ChordLink =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__extends)(ChordLink, _super);
  /**
   * Constructor
   */


  function ChordLink() {
    var _this = _super.call(this) || this;

    _this.className = "ChordLink";
    _this.middleLine = _this.createChild(_core_elements_QuadraticCurve__WEBPACK_IMPORTED_MODULE_2__.QuadraticCurve);
    _this.middleLine.shouldClone = false;
    _this.middleLine.strokeOpacity = 0;

    _this.applyTheme();

    return _this;
  }
  /**
   * (Re)validates (redraws) the link.
   *
   * @ignore Exclude from docs
   */


  ChordLink.prototype.validate = function () {
    _super.prototype.validate.call(this);

    if (!this.isTemplate) {
      var startAngle = this.startAngle;
      var endAngle = this.endAngle;
      var arc = this.arc;
      var radius = this.radius;
      var fromNode = this.dataItem.fromNode;
      var toNode = this.dataItem.toNode;
      var fromX = 0;
      var fromY = 0;

      if (fromNode) {
        fromX = fromNode.pixelX + fromNode.dx;
        fromY = fromNode.pixelY + fromNode.dy;
      }

      var toX = 0;
      var toY = 0;

      if (toNode) {
        toX = toNode.pixelX + toNode.dx;
        toY = toNode.pixelY + toNode.dy;
      }

      if (radius > 0) {
        var x1 = radius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_3__.cos(startAngle) + fromX;
        var y1 = radius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_3__.sin(startAngle) + fromY;
        var x2 = radius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_3__.cos(endAngle) + toX;
        var y2 = radius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_3__.sin(endAngle) + toY; //let cpAngle = startAngle + arc + (endAngle - startAngle - arc) / 2;
        //let arcWidth = $math.getDistance({x:x1, y:y1}, {x:x4, y:y4});
        //let cpx = (arcWidth) * $math.cos(cpAngle);
        //let cpy = (arcWidth) * $math.sin(cpAngle);

        var cp = {
          x: 0,
          y: 0
        };
        var path = _core_rendering_Path__WEBPACK_IMPORTED_MODULE_4__.moveTo({
          x: x1,
          y: y1
        });
        path += _core_rendering_Path__WEBPACK_IMPORTED_MODULE_4__.arcTo(startAngle, arc, radius);
        path += _core_rendering_Path__WEBPACK_IMPORTED_MODULE_4__.quadraticCurveTo({
          x: x2,
          y: y2
        }, cp);
        path += _core_rendering_Path__WEBPACK_IMPORTED_MODULE_4__.arcTo(endAngle, arc, radius);
        path += _core_rendering_Path__WEBPACK_IMPORTED_MODULE_4__.quadraticCurveTo({
          x: x1,
          y: y1
        }, cp);

        if (arc > 0) {
          this.link.path = path;
        } else {
          this.link.path = "";
        }

        if (this.maskBullets) {
          this.bulletsMask.path = path;
          this.bulletsContainer.mask = this.bulletsMask;
        }

        var mAngle1 = startAngle + arc / 2;
        var mAngle2 = endAngle + arc / 2;
        var middleLine = this.middleLine;
        middleLine.x1 = radius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_3__.cos(mAngle1) + fromX;
        middleLine.y1 = radius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_3__.sin(mAngle1) + fromY;
        middleLine.x2 = radius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_3__.cos(mAngle2) + toX;
        middleLine.y2 = radius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_3__.sin(mAngle2) + toY;
        middleLine.cpx = 0;
        middleLine.cpy = 0;
        middleLine.stroke = this.fill;
        this.positionBullets();
      }
    }
  };

  Object.defineProperty(ChordLink.prototype, "radius", {
    /**
     * @return End Y
     */
    get: function get() {
      return this.getPropertyValue("radius");
    },

    /**
     * [radius description]
     *
     * @todo Description
     * @param value End Y
     */
    set: function set(value) {
      this.setPropertyValue("radius", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(ChordLink.prototype, "arc", {
    /**
     * @return [description]
     */
    get: function get() {
      return this.getPropertyValue("arc");
    },

    /**
     * [arc description]
     *
     * @todo Description
     * @param value [description]
     */
    set: function set(value) {
      this.setPropertyValue("arc", value, true);
    },
    enumerable: true,
    configurable: true
  });
  return ChordLink;
}(_FlowDiagramLink__WEBPACK_IMPORTED_MODULE_0__.FlowDiagramLink);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses.ChordLink = ChordLink;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/ChordNode.js":
/*!*********************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/elements/ChordNode.js ***!
  \*********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "ChordNode": () => (/* binding */ ChordNode)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _FlowDiagramNode__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./FlowDiagramNode */ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/FlowDiagramNode.js");
/* harmony import */ var _axes_AxisLabelCircular__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../axes/AxisLabelCircular */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisLabelCircular.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_elements_Slice__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/elements/Slice */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Slice.js");
/* harmony import */ var _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../core/utils/InterfaceColorSet */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/InterfaceColorSet.js");
/* harmony import */ var _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../core/utils/Iterator */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Iterator.js");
/* harmony import */ var _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../core/utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
/* harmony import */ var _core_utils_Type__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../core/utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/* harmony import */ var _elements_Bullet__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../elements/Bullet */ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/Bullet.js");
/**
 * ChordNode module
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */










/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Creates a node in a Chord Diagram.
 *
 * A Chord node is a block with a value, which represents its size on the
 * diagram.
 *
 * Nodes are connected via [[ChordLink]] elements.
 *
 * @see {@link IChordNodeEvents} for a list of available events
 * @see {@link IChordNodeAdapters} for a list of available Adapters
 * @important
 */

var ChordNode =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_9__.__extends)(ChordNode, _super);
  /**
   * Constructor
   */


  function ChordNode() {
    var _this = _super.call(this) || this;

    _this.className = "ChordNode";

    var label = _this.createChild(_axes_AxisLabelCircular__WEBPACK_IMPORTED_MODULE_1__.AxisLabelCircular);

    label.location = 0.5;
    label.radius = 5;
    label.text = "{name}";
    label.zIndex = 1;
    label.shouldClone = false;
    _this.label = label;
    _this.layout = "none";

    _this.events.on("positionchanged", _this.updateRotation, _this, false);

    _this.isMeasured = false;
    _this.slice = _this.createChild(_core_elements_Slice__WEBPACK_IMPORTED_MODULE_3__.Slice);
    _this.slice.isMeasured = false;
    var hiddenState = _this.hiddenState;
    hiddenState.properties.fill = new _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_4__.InterfaceColorSet().getFor("disabledBackground");
    hiddenState.properties.opacity = 0.5;
    hiddenState.properties.visible = true;
    _this.setStateOnChildren = false;
    _this.slice.hiddenState.properties.visible = true;

    _this.adapter.add("tooltipX", function (tooltipX, target) {
      return target.slice.ix * (target.slice.radius - (target.slice.radius - target.slice.pixelInnerRadius) / 2);
    });

    _this.adapter.add("tooltipY", function (tooltipY, target) {
      return target.slice.iy * (target.slice.radius - (target.slice.radius - target.slice.pixelInnerRadius) / 2);
    });

    return _this;
  }
  /**
   * Invalidates all links, attached to this node.
   *
   * @ignore Exclude from docs
   */


  ChordNode.prototype.invalidateLinks = function () {
    var _this = this;

    _super.prototype.invalidateLinks.call(this);

    var label = this.label;
    var slice = this.slice;
    var chart = this.chart;

    if (chart && slice) {
      var sum = this.total;
      var arc_1 = slice.arc;
      var sliceStartAngle_1 = slice.startAngle;
      this.children.each(function (child) {
        if (child instanceof _elements_Bullet__WEBPACK_IMPORTED_MODULE_8__.Bullet) {
          var locationX = child.locationX;

          if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_7__.isNumber(locationX)) {
            locationX = 0.5;
          }

          var locationY = child.locationY;

          if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_7__.isNumber(locationY)) {
            locationY = 1;
          }

          var childAngle = sliceStartAngle_1 + arc_1 * locationX;
          var childRadius = locationY * slice.radius;
          child.x = childRadius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.cos(childAngle);
          child.y = childRadius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.sin(childAngle);
        }
      });
      var labelAngle = sliceStartAngle_1 + arc_1 * label.location;
      var startAngle = sliceStartAngle_1 + (1 - sum / this.adjustedTotal) * arc_1 * 0.5; // if value of a node is > then sum of the links, add to center link

      if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_7__.isNaN(startAngle)) {
        startAngle = sliceStartAngle_1;
      }

      label.fixPosition(labelAngle, slice.radius);
      this.nextAngle = startAngle;

      if (this._outgoingSorted) {
        _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_5__.each(this._outgoingSorted, function (dataItem) {
          var link = dataItem.link;
          link.parent = _this.chart.linksContainer;
          var value = dataItem.getWorkingValue("value");

          if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_7__.isNumber(value)) {
            if (chart.nonRibbon) {
              var percentWidth = link.percentWidth;

              if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_7__.isNumber(percentWidth)) {
                percentWidth = 5;
              }

              percentWidth = percentWidth / 100;
              link.startAngle = sliceStartAngle_1 + arc_1 / 2 - arc_1 / 2 * percentWidth;
              link.arc = arc_1 * percentWidth;
            } else {
              link.arc = value * chart.valueAngle;
              link.startAngle = _this.nextAngle;
              _this.nextAngle += link.arc;
            }

            if (!dataItem.toNode) {
              link.endAngle = link.startAngle;
            }

            link.radius = slice.pixelInnerRadius;
          } //link.validate();

        });
      }

      if (this._incomingSorted) {
        _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_5__.each(this._incomingSorted, function (dataItem) {
          var link = dataItem.link;
          link.radius = slice.pixelInnerRadius;

          if (chart.nonRibbon) {
            var percentWidth = link.percentWidth;

            if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_7__.isNumber(percentWidth)) {
              percentWidth = 5;
            }

            percentWidth = percentWidth / 100;
            link.endAngle = sliceStartAngle_1 + arc_1 / 2 - arc_1 / 2 * percentWidth;
            link.arc = arc_1 * percentWidth;
          } else {
            link.endAngle = _this.nextAngle;
            var value = dataItem.getWorkingValue("value");

            if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_7__.isNumber(value)) {
              link.arc = value * chart.valueAngle; // yes, this is needed

              _this.nextAngle += link.arc;
            }
          }

          if (!dataItem.fromNode) {
            link.startAngle = link.endAngle;
          } //link.validate();

        });
      }
    }
  };
  /**
   * @ignore
   * updates slice start angle so that when we drag a node it would face the center
   */


  ChordNode.prototype.updateRotation = function () {
    var slice = this.slice;
    var mAngle = this.trueStartAngle + slice.arc / 2;
    var radius = slice.radius;
    var tx = radius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.cos(mAngle);
    var ty = radius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.sin(mAngle);
    var angle = _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.getAngle({
      x: tx + this.pixelX,
      y: ty + this.pixelY
    });
    slice.startAngle = this.trueStartAngle + (angle - mAngle);
    this.dx = -this.pixelX;
    this.dy = -this.pixelY;
  };
  /**
   * Copies properties and labels from another [[ChordNode]].
   *
   * @param source  Source node
   */


  ChordNode.prototype.copyFrom = function (source) {
    _super.prototype.copyFrom.call(this, source);

    this.label.copyFrom(source.label);
    this.slice.copyFrom(source.slice);
  };

  return ChordNode;
}(_FlowDiagramNode__WEBPACK_IMPORTED_MODULE_0__.FlowDiagramNode);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_2__.registry.registeredClasses.ChordNode = ChordNode;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/CircleBullet.js":
/*!************************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/elements/CircleBullet.js ***!
  \************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "CircleBullet": () => (/* binding */ CircleBullet)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Bullet__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Bullet */ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/Bullet.js");
/* harmony import */ var _core_elements_Circle__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/elements/Circle */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Circle.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/**
 * Bullet module
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */




/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Creates a bullet with a textual label.
 *
 * Uses [[Label]] instance to draw the label, so the label itself is
 * configurable.
 *
 * @see {@link IBulletEvents} for a list of available events
 * @see {@link IBulletAdapters} for a list of available Adapters
 * @todo Usage example
 * @important
 */

var CircleBullet =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__extends)(CircleBullet, _super);
  /**
   * Constructor
   */


  function CircleBullet() {
    var _this = _super.call(this) || this;

    _this.className = "CircleBullet";

    var circle = _this.createChild(_core_elements_Circle__WEBPACK_IMPORTED_MODULE_1__.Circle);

    circle.shouldClone = false;
    circle.radius = 5;
    circle.isMeasured = false;
    _this.circle = circle;

    _this.applyTheme();

    return _this;
  }
  /**
   * Copies all proprities and related stuff from another instance of
   * [[CircleBullet]].
   *
   * @param source  Source element
   */


  CircleBullet.prototype.copyFrom = function (source) {
    _super.prototype.copyFrom.call(this, source);

    this.circle.copyFrom(source.circle);
  };

  return CircleBullet;
}(_Bullet__WEBPACK_IMPORTED_MODULE_0__.Bullet);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_2__.registry.registeredClasses.CircleBullet = CircleBullet;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/ClockHand.js":
/*!*********************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/elements/ClockHand.js ***!
  \*********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "ClockHand": () => (/* binding */ ClockHand)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _core_Container__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../core/Container */ "./node_modules/@amcharts/amcharts4/.internal/core/Container.js");
/* harmony import */ var _core_elements_Circle__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/elements/Circle */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Circle.js");
/* harmony import */ var _core_elements_Trapezoid__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/elements/Trapezoid */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Trapezoid.js");
/* harmony import */ var _core_utils_Disposer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/utils/Disposer */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Disposer.js");
/* harmony import */ var _core_utils_Percent__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../core/utils/Percent */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Percent.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../core/utils/InterfaceColorSet */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/InterfaceColorSet.js");
/* harmony import */ var _core_utils_Utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../core/utils/Utils */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Utils.js");
/* harmony import */ var _core_utils_Type__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../core/utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/**
 * Functionality for drawing simple ClockHands
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */










/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * ClockHand class is capable of drawing a simple pointy shape with optionally
 * rounderd corners and an icon.
 *
 * @see {@link IClockHandEvents} for a list of available events
 * @see {@link IClockHandAdapters} for a list of available Adapters
 * @todo Improve
 * @important
 */

var ClockHand =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_9__.__extends)(ClockHand, _super);
  /**
   * Constructor
   */


  function ClockHand() {
    var _this = // Init
    _super.call(this) || this;
    /**
     * An Axis hand is related to.
     */


    _this._axis = new _core_utils_Disposer__WEBPACK_IMPORTED_MODULE_3__.MutableValueDisposer();
    _this.className = "ClockHand";
    var interfaceColors = new _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_6__.InterfaceColorSet();
    _this.fill = interfaceColors.getFor("alternativeBackground");
    _this.stroke = _this.fill;
    var pin = new _core_elements_Circle__WEBPACK_IMPORTED_MODULE_1__.Circle();
    pin.radius = 5;
    _this.pin = pin;
    _this.isMeasured = false;
    _this.startWidth = 5;
    _this.endWidth = 1;
    _this.width = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_4__.percent)(100);
    _this.height = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_4__.percent)(100);
    _this.radius = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_4__.percent)(100);
    _this.innerRadius = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_4__.percent)(0);
    var hand = new _core_elements_Trapezoid__WEBPACK_IMPORTED_MODULE_2__.Trapezoid();
    _this.hand = hand;

    _this._disposers.push(_this._axis); // Apply theme


    _this.applyTheme();

    return _this;
  }
  /**
   * Re(validates) the clock hand, effectively redrawing it.
   *
   * @ignore Exclude from docs
   */


  ClockHand.prototype.validate = function () {
    _super.prototype.validate.call(this);

    var hand = this.hand;
    hand.width = this.pixelWidth;
    var h = Math.max(this.startWidth, this.endWidth);
    hand.height = h;
    hand.leftSide = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_4__.percent)(this.startWidth / h * 100);
    hand.rightSide = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_4__.percent)(this.endWidth / h * 100);

    if (this.axis) {
      var renderer = this.axis.renderer;
      var x0 = _core_utils_Utils__WEBPACK_IMPORTED_MODULE_7__.relativeRadiusToValue(this.innerRadius, renderer.pixelRadius);
      var x1 = _core_utils_Utils__WEBPACK_IMPORTED_MODULE_7__.relativeRadiusToValue(this.radius, renderer.pixelRadius);
      hand.x = x0;
      hand.y = -h / 2;
      hand.width = x1 - x0;
    }
  };

  Object.defineProperty(ClockHand.prototype, "pin", {
    /**
     * @return Pin element
     */
    get: function get() {
      return this._pin;
    },

    /**
     * A circle element used as hand's base. (pin)
     *
     * @param pin  Pin element
     */
    set: function set(pin) {
      if (this._pin) {
        this.removeDispose(this._pin);
      }

      if (pin) {
        this._pin = pin;
        pin.parent = this;

        this._disposers.push(pin);
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(ClockHand.prototype, "hand", {
    /**
     * @return Hand element
     */
    get: function get() {
      return this._hand;
    },

    /**
     * A trapezoid shape used for hand itself.
     *
     * The shape of the trapezoid is controlled by ClockHand's `startWidth` and
     * `endWidth` properties.
     *
     * Set `endWidth` to 1 (px) to make it pointy.
     *
     * @param hand  Hand element
     */
    set: function set(hand) {
      if (this._hand) {
        this.removeDispose(this._hand);
      }

      if (hand) {
        this._hand = hand;
        hand.parent = this;

        this._disposers.push(hand);
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(ClockHand.prototype, "radius", {
    /**
     * @return Radius
     */
    get: function get() {
      return this.getPropertyValue("radius");
    },

    /**
     * Radius of the hand's outer end. (tip)
     *
     * Absolute (px) or relative ([[Percent]]).
     *
     * @default Percent(0)
     * @param value  Radius
     */
    set: function set(value) {
      this.setPercentProperty("radius", value, true, false, 10, false);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(ClockHand.prototype, "innerRadius", {
    /**
     * @return Radius
     */
    get: function get() {
      return this.getPropertyValue("innerRadius");
    },

    /**
     * Radius of the hand's inner end. (base)
     *
     * Absolute (px) or relative ([[Percent]]).
     *
     * @default Percent(0)
     * @param value  Radius
     */
    set: function set(value) {
      this.setPercentProperty("innerRadius", value, true, false, 10, false);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(ClockHand.prototype, "startWidth", {
    /**
     * @return Width (px)
     */
    get: function get() {
      return this.getPropertyValue("startWidth");
    },

    /**
     * Width, in pixels, of the clock hand's inner end. (base)
     *
     * @default 5
     * @param value  Width (px)
     */
    set: function set(value) {
      this.setPropertyValue("startWidth", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(ClockHand.prototype, "endWidth", {
    /**
     * @return Width (px)
     */
    get: function get() {
      return this.getPropertyValue("endWidth");
    },

    /**
     * Width, in pixels, of the clock hand's outer end. (tip)
     *
     * @default 1
     * @param value  Width (px)
     */
    set: function set(value) {
      this.setPropertyValue("endWidth", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(ClockHand.prototype, "rotationDirection", {
    /**
     * @return rotationDirection
     */
    get: function get() {
      return this.getPropertyValue("rotationDirection");
    },

    /**
     * Rotation direction
     *
     * @default any
     * @param value
     */
    set: function set(value) {
      this.setPropertyValue("rotationDirection", value);
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Moves clock hand to particular value.
   *
   * If `duration` is set to a number in milliseconds, the hand will move
   * to the new position gracefully, rather than jumping rigth to it.
   *
   * Alternatively, you can also set `value` directly.
   *
   * @param value     New value
   * @param duration  Animation duration (ms)
   * @param easing  Animation easing function
   */

  ClockHand.prototype.showValue = function (value, duration, easing) {
    this._value = value;

    if (value != undefined) {
      if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.isNumber(duration)) {
        duration = 0;
      }

      if (this.axis) {
        var renderer = this.axis.renderer;
        var newAngle = renderer.positionToAngle(this.axis.anyToPosition(value));
        var currentAngle = this.rotation;

        if (this.rotationDirection == "clockWise") {
          if (newAngle < currentAngle) {
            this.rotation = currentAngle - 360;
          }
        }

        if (this.rotationDirection == "counterClockWise") {
          if (newAngle > currentAngle) {
            this.rotation = currentAngle + 360;
          }
        }

        this.animate({
          property: "rotation",
          to: newAngle
        }, duration, easing);
      }
    }
  };

  Object.defineProperty(ClockHand.prototype, "currentPosition", {
    /**
     * Returns hand's relative position on axis
     */
    get: function get() {
      if (this.axis) {
        var renderer = this.axis.renderer;
        return renderer.angleToPosition(this.rotation);
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(ClockHand.prototype, "value", {
    /**
     * @return Value
     */
    get: function get() {
      return this._value;
    },

    /**
     * A current value clock hand is pointing to.
     *
     * @param value  Value
     */
    set: function set(value) {
      this.showValue(value);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(ClockHand.prototype, "axis", {
    /**
     * @return Axis
     */
    get: function get() {
      return this._axis.get();
    },

    /**
     * An Axis clock hand is associated with.
     *
     * Hand's `value` relates to values on the Axis.
     *
     * @param axis  Axis
     */
    set: function set(axis) {
      if (this.axis != axis) {
        this._axis.set(axis, new _core_utils_Disposer__WEBPACK_IMPORTED_MODULE_3__.MultiDisposer([axis.events.on("datavalidated", this.updateValue, this, false), axis.events.on("datarangechanged", this.updateValue, this, false), axis.events.on("dataitemsvalidated", this.updateValue, this, false), axis.events.on("propertychanged", this.invalidate, this, false)]));
      }

      if (axis) {
        var chart = axis.chart;

        if (chart) {
          this.rotation = chart.startAngle;
        }
      }

      this.parent = axis.renderer;
      this.zIndex = 5;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Triggers `value` accessor, so that Hand animates to new position, in case
   * value has changed.
   *
   * @ignore Exclude from docs
   */

  ClockHand.prototype.updateValue = function () {
    this.value = this.value;
  };
  /**
  * Processes JSON-based config before it is applied to the object.
  *
  * @ignore Exclude from docs
  * @param config  Config
  */


  ClockHand.prototype.processConfig = function (config) {
    if (config) {
      // Connect clock hands with axes
      if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.hasValue(config.axis) && _core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.isString(config.axis) && this.map.hasKey(config.axis)) {
        config.axis = this.map.getKey(config.axis);
      }
    }

    _super.prototype.processConfig.call(this, config);
  };

  return ClockHand;
}(_core_Container__WEBPACK_IMPORTED_MODULE_0__.Container);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_5__.registry.registeredClasses.ClockHand = ClockHand;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/Column.js":
/*!******************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/elements/Column.js ***!
  \******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Column": () => (/* binding */ Column)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _core_Container__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../core/Container */ "./node_modules/@amcharts/amcharts4/.internal/core/Container.js");
/* harmony import */ var _core_elements_RoundedRectangle__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/elements/RoundedRectangle */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/RoundedRectangle.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_utils_Percent__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/utils/Percent */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Percent.js");
/* harmony import */ var _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../core/utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
/**
 * Module that defines everything related to building Columns.
 * It is a container which has column element which is a RoundedRectangle.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */






/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Class used to creates Columns.
 *
 * @see {@link IColumnEvents} for a list of available events
 * @see {@link IColumnAdapters} for a list of available Adapters
 * @todo Usage example
 * @important
 */

var Column =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__extends)(Column, _super);
  /**
   * Constructor
   */


  function Column() {
    var _this = _super.call(this) || this;

    _this.className = "Column";
    _this.width = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_3__.percent)(80);
    _this.height = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_3__.percent)(80); //this.isMeasured = true; // for correct position of the tooltip

    _this.events.disableType("transformed"); // not to bug parent


    _this.applyOnClones = true;
    _this.strokeOpacity = 1;
    _this.layout = "none";

    _this.createAssets(); // otherwise users will have to set layout themselves if they'll want to align, scale etc children


    _this.events.on("childadded", _this.handleKidAdded, _this, false);

    return _this;
  }
  /**
   * @ignore
   */


  Column.prototype.handleKidAdded = function () {
    if (this.layout == "none") {
      this.layout = "absolute";
    }
  };
  /**
   * @ignore
   */


  Column.prototype.createAssets = function () {
    this.column = this.createChild(_core_elements_RoundedRectangle__WEBPACK_IMPORTED_MODULE_1__.RoundedRectangle);
    this.column.shouldClone = false;
    this.column.isMeasured = false;
    this.column.cornerRadius(0, 0, 0, 0);

    this._disposers.push(this.column);
  };
  /**
   * @ignore Exclude from docs
   */


  Column.prototype.validate = function () {
    _super.prototype.validate.call(this);

    var column = this.column;

    if (column) {
      column.width = _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.min(this.pixelWidth, this.maxWidth);
      column.height = _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.min(this.pixelHeight, this.maxHeight);

      if (column.invalid) {
        column.validate(); // important!
      }
    }
  };
  /**
   * Copies all parameters from another [[Column]].
   *
   * @param source Source Column
   */


  Column.prototype.copyFrom = function (source) {
    _super.prototype.copyFrom.call(this, source);

    if (this.column) {
      this.column.copyFrom(source.column);
    }
  };

  Object.defineProperty(Column.prototype, "bbox", {
    /**
     * Returns bounding box (square) for this element.
     *
     * @ignore Exclude from docs
     */
    get: function get() {
      if (this.definedBBox) {
        return this.definedBBox;
      }

      if (this.column) {
        return {
          x: 0,
          y: 0,
          width: this.column.measuredWidth,
          height: this.column.measuredHeight
        };
      } else {
        return {
          x: 0,
          y: 0,
          width: _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.min(this.pixelWidth, this.maxWidth),
          height: _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.min(this.pixelHeight, this.maxHeight)
        };
      }
    },
    enumerable: true,
    configurable: true
  });
  return Column;
}(_core_Container__WEBPACK_IMPORTED_MODULE_0__.Container);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_2__.registry.registeredClasses.Column = Column;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/Column3D.js":
/*!********************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/elements/Column3D.js ***!
  \********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Column3D": () => (/* binding */ Column3D)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Column__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Column */ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/Column.js");
/* harmony import */ var _core_elements_3d_Rectangle3D__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/elements/3d/Rectangle3D */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/3d/Rectangle3D.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/**
 * Module that defines everything related to building 3D Columns.
 * It is a container which has column3D element which is a Rectangle3D.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */




/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Class used to creates Column3Ds.
 *
 * @see {@link IColumn3DEvents} for a list of available events
 * @see {@link IColumn3DAdapters} for a list of available Adapters
 * @todo Usage example
 * @important
 */

var Column3D =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__extends)(Column3D, _super);
  /**
   * Constructor
   */


  function Column3D() {
    var _this = _super.call(this) || this;

    _this.className = "Column3D";
    return _this;
  }
  /**
   * @ignore
   */


  Column3D.prototype.createAssets = function () {
    this.column3D = this.createChild(_core_elements_3d_Rectangle3D__WEBPACK_IMPORTED_MODULE_1__.Rectangle3D);
    this.column3D.shouldClone = false;
    this.column3D.strokeOpacity = 0; // some dirty hack so that if user access column, it won't get error

    this.column = this.column3D;
  };
  /**
   * @ignore Exclude from docs
   */


  Column3D.prototype.validate = function () {
    _super.prototype.validate.call(this);

    if (this.column3D) {
      this.column3D.width = this.pixelWidth;
      this.column3D.height = this.pixelHeight;

      if (this.column3D.invalid) {
        this.column3D.validate();
      }
    }
  };
  /**
   * Copies all parameters from another [[Column3D]].
   *
   * @param source Source Column3D
   */


  Column3D.prototype.copyFrom = function (source) {
    _super.prototype.copyFrom.call(this, source);

    if (this.column3D) {
      this.column3D.copyFrom(source.column3D);
    }
  };
  /**
   * Sets actual `fill` property on the SVG element, including applicable color
   * modifiers.
   *
   * @ignore Exclude from docs
   * @param value  Fill
   */


  Column3D.prototype.setFill = function (value) {
    _super.prototype.setFill.call(this, value);

    this.column.fill = value;
  };

  return Column3D;
}(_Column__WEBPACK_IMPORTED_MODULE_0__.Column);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_2__.registry.registeredClasses.Column3D = Column3D;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/ConeColumn.js":
/*!**********************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/elements/ConeColumn.js ***!
  \**********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "ConeColumn": () => (/* binding */ ConeColumn)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Column__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Column */ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/Column.js");
/* harmony import */ var _core_elements_3d_Cone__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/elements/3d/Cone */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/3d/Cone.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/**
 * Module that defines everything related to building Cone Columns.
 * It is a container which has coneColumn element which is a Cone.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */




/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Class used to creates ConeColumns.
 *
 * @see {@link IConeColumnEvents} for a list of available events
 * @see {@link IConeColumnAdapters} for a list of available Adapters
 * @todo Usage example
 * @important
 */

var ConeColumn =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__extends)(ConeColumn, _super);
  /**
   * Constructor
   */


  function ConeColumn() {
    var _this = _super.call(this) || this;

    _this.className = "ConeColumn";
    return _this;
  }
  /**
   * @ignore
   */


  ConeColumn.prototype.createAssets = function () {
    this.coneColumn = this.createChild(_core_elements_3d_Cone__WEBPACK_IMPORTED_MODULE_1__.Cone);
    this.coneColumn.shouldClone = false; // some dirty hack so that if user access column, it won't get error

    this.column = this.coneColumn;
  };
  /**
   * Copies all parameters from another [[ConeColumn]].
   *
   * @param source Source ConeColumn
   */


  ConeColumn.prototype.copyFrom = function (source) {
    _super.prototype.copyFrom.call(this, source);

    if (this.coneColumn) {
      this.coneColumn.copyFrom(source.coneColumn);
    }
  };

  return ConeColumn;
}(_Column__WEBPACK_IMPORTED_MODULE_0__.Column);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_2__.registry.registeredClasses.ConeColumn = ConeColumn;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/CurvedColumn.js":
/*!************************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/elements/CurvedColumn.js ***!
  \************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "CurvedColumn": () => (/* binding */ CurvedColumn)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Column__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Column */ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/Column.js");
/* harmony import */ var _core_Sprite__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/Sprite */ "./node_modules/@amcharts/amcharts4/.internal/core/Sprite.js");
/* harmony import */ var _core_rendering_Path__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/rendering/Path */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Path.js");
/* harmony import */ var _core_utils_Utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/utils/Utils */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Utils.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_rendering_Smoothing__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../core/rendering/Smoothing */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Smoothing.js");
/* harmony import */ var _core_utils_Percent__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../core/utils/Percent */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Percent.js");
/**
 * Module that defines everything related to building Curved Columns.
 * It is a container which has CurvedColumn element which is a Sprite.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */








/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Class used to creates CurvedColumns.
 *
 * @see {@link ICurvedColumnEvents} for a list of available events
 * @see {@link ICurvedColumnAdapters} for a list of available Adapters
 * @important
 */

var CurvedColumn =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_7__.__extends)(CurvedColumn, _super);
  /**
   * Constructor
   */


  function CurvedColumn() {
    var _this = _super.call(this) || this;

    _this.className = "CurvedColumn";
    return _this;
  }
  /**
   * [createAssets description]
   *
   * @todo Description
   * @ignore Exclude from docs
   */


  CurvedColumn.prototype.createAssets = function () {
    this.curvedColumn = this.createChild(_core_Sprite__WEBPACK_IMPORTED_MODULE_1__.Sprite);
    this.curvedColumn.shouldClone = false;
    this.setPropertyValue("tension", 0.7);
    this.width = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_6__.percent)(120);
    this.height = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_6__.percent)(120); // some dirty hack so that if user access column, it won't get error

    this.column = this.curvedColumn;
  };
  /**
   * Draws the element.
   *
   * @ignore Exclude from docs
   */


  CurvedColumn.prototype.draw = function () {
    _super.prototype.draw.call(this);

    var w = this.realWidth;
    var h = this.realHeight;
    var x = this.realX - this.pixelX;
    var y = this.realY - this.pixelY;
    var points; // TODO can this be removed ?

    _core_utils_Utils__WEBPACK_IMPORTED_MODULE_3__.used(this.width);
    var tensionX = 1;
    var tensionY = 1;

    if (this.orientation == "vertical") {
      tensionX = this.tension;
      points = [{
        x: 0,
        y: h + y
      }, {
        x: w / 2,
        y: y
      }, {
        x: w,
        y: h + y
      }];
    } else {
      tensionY = this.tension;
      h = Math.abs(h);
      points = [{
        x: x,
        y: h
      }, {
        x: x + w,
        y: h / 2
      }, {
        x: x,
        y: 0
      }];
    }

    var path = _core_rendering_Path__WEBPACK_IMPORTED_MODULE_2__.moveTo(points[0]) + new _core_rendering_Smoothing__WEBPACK_IMPORTED_MODULE_5__.Tension(tensionX, tensionY).smooth(points);
    this.column.path = path;
  };
  /**
   * Copies all parameters from another [[CurvedColumn]].
   *
   * @param source  Source CurvedColumn
   */


  CurvedColumn.prototype.copyFrom = function (source) {
    _super.prototype.copyFrom.call(this, source);

    if (this.curvedColumn) {
      this.curvedColumn.copyFrom(source.curvedColumn);
    }
  };

  Object.defineProperty(CurvedColumn.prototype, "tension", {
    /**
     * @return Tension (0-1)
     */
    get: function get() {
      return this.getPropertyValue("tension");
    },

    /**
     * Horizontal tension of the curve.
     *
     * Tension defines how "lose" the line will be.
     *
     * 1 is the maximum tension which would result in pointy columns with
     * straight edges.
     *
     * The smaller the tension th wider the column will be.
     *
     * @default 0.7
     * @param value tension (0-1)
     */
    set: function set(value) {
      this.setPropertyValue("tension", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(CurvedColumn.prototype, "orientation", {
    /**
     * Orientation
     */
    get: function get() {
      return this.getPropertyValue("orientation");
    },

    /**
     * Orientation of the column.
     *
     * Available options: "vertical" (default) and "horizontal".
     *
     * @default "vertical"
     * @param value  Orientation
     */
    set: function set(value) {
      this.setPropertyValue("orientation", value, true);
    },
    enumerable: true,
    configurable: true
  });
  return CurvedColumn;
}(_Column__WEBPACK_IMPORTED_MODULE_0__.Column);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_4__.registry.registeredClasses.CurvedColumn = CurvedColumn;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/ErrorBullet.js":
/*!***********************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/elements/ErrorBullet.js ***!
  \***********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "ErrorBullet": () => (/* binding */ ErrorBullet)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Bullet__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Bullet */ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/Bullet.js");
/* harmony import */ var _core_Sprite__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/Sprite */ "./node_modules/@amcharts/amcharts4/.internal/core/Sprite.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_rendering_Path__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/rendering/Path */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Path.js");
/**
 * Bullet module
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */





/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Creates a bullet with a textual label.
 *
 * Uses [[Label]] instance to draw the label, so the label itself is
 * configurable.
 *
 * @see {@link IBulletEvents} for a list of available events
 * @see {@link IBulletAdapters} for a list of available Adapters
 * @todo Usage example
 * @important
 */

var ErrorBullet =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_4__.__extends)(ErrorBullet, _super);
  /**
   * Constructor
   */


  function ErrorBullet() {
    var _this = _super.call(this) || this;

    _this.className = "ErrorBullet";
    _this.errorLine = _this.createChild(_core_Sprite__WEBPACK_IMPORTED_MODULE_1__.Sprite);
    _this.errorLine.shouldClone = false;
    _this.width = 20;
    _this.height = 20;
    _this.strokeOpacity = 1;
    _this.isDynamic = true;
    return _this;
  }

  ErrorBullet.prototype.validatePosition = function () {
    _super.prototype.validatePosition.call(this);

    var w = this.pixelWidth / 2;
    var h = this.pixelHeight / 2;
    this.errorLine.path = _core_rendering_Path__WEBPACK_IMPORTED_MODULE_3__.moveTo({
      x: -w,
      y: -h
    }) + _core_rendering_Path__WEBPACK_IMPORTED_MODULE_3__.lineTo({
      x: w,
      y: -h
    }) + _core_rendering_Path__WEBPACK_IMPORTED_MODULE_3__.moveTo({
      x: 0,
      y: -h
    }) + _core_rendering_Path__WEBPACK_IMPORTED_MODULE_3__.lineTo({
      x: 0,
      y: h
    }) + _core_rendering_Path__WEBPACK_IMPORTED_MODULE_3__.moveTo({
      x: -w,
      y: h
    }) + _core_rendering_Path__WEBPACK_IMPORTED_MODULE_3__.lineTo({
      x: w,
      y: h
    });
  };
  /**
   * Copies all proprities and related stuff from another instance of
   * [[ErrorBullet]].
   *
   * @param source  Source element
   */


  ErrorBullet.prototype.copyFrom = function (source) {
    _super.prototype.copyFrom.call(this, source);

    this.errorLine.copyFrom(source.errorLine);
  };

  return ErrorBullet;
}(_Bullet__WEBPACK_IMPORTED_MODULE_0__.Bullet);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_2__.registry.registeredClasses.ErrorBullet = ErrorBullet;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/FlowDiagramLink.js":
/*!***************************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/elements/FlowDiagramLink.js ***!
  \***************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "FlowDiagramLink": () => (/* binding */ FlowDiagramLink)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _core_Sprite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../core/Sprite */ "./node_modules/@amcharts/amcharts4/.internal/core/Sprite.js");
/* harmony import */ var _core_Container__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/Container */ "./node_modules/@amcharts/amcharts4/.internal/core/Container.js");
/* harmony import */ var _core_rendering_fills_LinearGradient__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/rendering/fills/LinearGradient */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/LinearGradient.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _elements_Bullet__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../elements/Bullet */ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/Bullet.js");
/* harmony import */ var _core_utils_Color__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../core/utils/Color */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Color.js");
/* harmony import */ var _core_utils_List__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../core/utils/List */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/List.js");
/* harmony import */ var _core_elements_Polyline__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../core/elements/Polyline */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Polyline.js");
/* harmony import */ var _core_elements_Line__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../core/elements/Line */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Line.js");
/* harmony import */ var _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../core/utils/InterfaceColorSet */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/InterfaceColorSet.js");
/* harmony import */ var _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../core/utils/Iterator */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Iterator.js");
/* harmony import */ var _core_utils_Type__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../core/utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/**
 * FlowDiagramLink module
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */













/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * This class creates a link (waved color-filled line) between two nodes in a
 * Flow Diagram.
 *
 * @see {@link IFlowDiagramLinkEvents} for a list of available events
 * @see {@link IFlowDiagramLinkAdapters} for a list of available Adapters
 * @important
 */

var FlowDiagramLink =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_12__.__extends)(FlowDiagramLink, _super);
  /**
   * Constructor
   */


  function FlowDiagramLink() {
    var _this = _super.call(this) || this;

    _this.className = "FlowDiagramLink";
    var interfaceColors = new _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_9__.InterfaceColorSet();
    _this.maskBullets = false;
    _this.colorMode = "fromNode";
    _this.layout = "none";
    _this.isMeasured = false;
    _this.startAngle = 0;
    _this.endAngle = 0;
    _this.strokeOpacity = 0; // this is very important, otherwise the container will be shifted

    _this.verticalCenter = "none";
    _this.horizontalCenter = "none";
    _this.tooltipText = "{fromName}→{toName}:{value.value}";
    _this.tooltipLocation = 0.5;
    _this.link = _this.createChild(_core_Sprite__WEBPACK_IMPORTED_MODULE_0__.Sprite);
    _this.link.shouldClone = false;

    _this.link.setElement(_this.paper.add("path"));

    _this.link.isMeasured = false;
    _this.fillOpacity = 0.2;
    _this.fill = interfaceColors.getFor("alternativeBackground");

    _this.applyTheme();

    return _this;
  }
  /**
   * Positions bullets
   * @ignore
   */


  FlowDiagramLink.prototype.positionBullets = function () {
    var _this = this;

    _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_10__.each(this.bullets.iterator(), function (bullet) {
      bullet.parent = _this.bulletsContainer;
      bullet.maxWidth = _this.maxWidth;
      bullet.maxHeight = _this.maxHeight;

      _this.positionBullet(bullet);
    });
  };

  Object.defineProperty(FlowDiagramLink.prototype, "bulletsContainer", {
    /**
     * Bullets container
     */
    get: function get() {
      if (!this._bulletsContainer) {
        var bulletsContainer = this.createChild(_core_Container__WEBPACK_IMPORTED_MODULE_1__.Container);
        bulletsContainer.shouldClone = false;
        bulletsContainer.layout = "none";
        this._bulletsContainer = bulletsContainer;
      }

      return this._bulletsContainer;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(FlowDiagramLink.prototype, "bulletsMask", {
    /**
     * Bullets mask sprite
     */
    get: function get() {
      if (!this._bulletsMask) {
        var bulletsMask = this.createChild(_core_Sprite__WEBPACK_IMPORTED_MODULE_0__.Sprite);
        bulletsMask.shouldClone = false;
        bulletsMask.setElement(this.paper.add("path"));
        bulletsMask.isMeasured = false;
        this._bulletsMask = bulletsMask;
      }

      return this._bulletsMask;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Positions bullets at relative bullet.locationX position on the link.
   * @ignore
   */

  FlowDiagramLink.prototype.positionBullet = function (bullet) {
    var location = bullet.locationX;

    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_11__.isNumber(location)) {
      location = bullet.locationY;
    }

    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_11__.isNumber(location)) {
      location = 0.5;
    }

    var point = this.middleLine.positionToPoint(location);
    bullet.moveTo(point);
    var rotationField = bullet.propertyFields.rotation;
    var angle;

    if (bullet.dataItem) {
      var dataContext = bullet.dataItem.dataContext;
      angle = dataContext[rotationField];
    }

    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_11__.isNumber(angle)) {
      angle = point.angle;
    }

    bullet.rotation = angle;
  };

  Object.defineProperty(FlowDiagramLink.prototype, "startAngle", {
    /**
     * @return Start angle
     */
    get: function get() {
      return this.getPropertyValue("startAngle");
    },

    /**
     * [startAngle description]
     *
     * @todo Description
     * @param value  Start angle
     */
    set: function set(value) {
      this.setPropertyValue("startAngle", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(FlowDiagramLink.prototype, "endAngle", {
    /**
     * @return End angle
     */
    get: function get() {
      return this.getPropertyValue("endAngle");
    },

    /**
     * [endAngle description]
     *
     * @todo Description
     * @param value  End angle
     */
    set: function set(value) {
      this.setPropertyValue("endAngle", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(FlowDiagramLink.prototype, "colorMode", {
    /**
     * Fill mode
     */
    get: function get() {
      return this.getPropertyValue("colorMode");
    },

    /**
     * Should link be filled with a solid color, color of from node, color of toNode or gradient between node colors.
     * Some of the links, like ChordLink does not support gradiens well.
     *
     * @param value  Fill mode
     */
    set: function set(value) {
      if (value == "gradient") {
        var color = this.fill;
        this.gradient.stops.clear();

        if (color instanceof _core_utils_Color__WEBPACK_IMPORTED_MODULE_5__.Color) {
          this.gradient.addColor(color);
          this.gradient.addColor(color);
        }

        this.fill = this.gradient;
        this.stroke = this.gradient;
      }

      this.setPropertyValue("colorMode", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(FlowDiagramLink.prototype, "maskBullets", {
    /**
     * @return mask bullets value
     */
    get: function get() {
      return this.getPropertyValue("maskBullets");
    },

    /**
     * Should link bullets be masked or not
     *
     * @param value
     * @default false
     */
    set: function set(value) {
      this.setPropertyValue("maskBullets", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(FlowDiagramLink.prototype, "tooltipLocation", {
    /**
     * Tooltip location value
     */
    get: function get() {
      return this.getPropertyValue("tooltipLocation");
    },

    /**
     * Relative location of a tooltip.
     * @default 0.5
     *
     * @param value
     */
    set: function set(value) {
      this.setPropertyValue("tooltipLocation", value, true);
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Adds color steps in the link gradient.
   *
   * @param value  Fill option
   */

  FlowDiagramLink.prototype.setFill = function (value) {
    _super.prototype.setFill.call(this, value);

    var gradient = this._gradient;

    if (gradient && value instanceof _core_utils_Color__WEBPACK_IMPORTED_MODULE_5__.Color) {
      gradient.stops.clear();
      gradient.addColor(value);
      gradient.addColor(value);
    }
  };
  /**
   * Updates bounding box based on element dimension settings.
   *
   * @ignore Exclude from docs
   */


  FlowDiagramLink.prototype.measureElement = function () {};

  Object.defineProperty(FlowDiagramLink.prototype, "bullets", {
    /**
     * List of bullets
     *
     * @return [description]
     */
    get: function get() {
      var _this = this;

      if (!this._bullets) {
        this._bullets = new _core_utils_List__WEBPACK_IMPORTED_MODULE_6__.ListTemplate(new _elements_Bullet__WEBPACK_IMPORTED_MODULE_4__.Bullet());

        this._disposers.push(new _core_utils_List__WEBPACK_IMPORTED_MODULE_6__.ListDisposer(this._bullets));

        this._disposers.push(this._bullets.template);

        this._bullets.events.on("inserted", function (event) {
          event.newValue.events.on("propertychanged", function (event) {
            if (event.property == "locationX" || event.property == "locationY") {
              _this.positionBullet(event.target);
            }
          }, undefined, false);
        }, undefined, false);
      }

      return this._bullets;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Copies properties from another [[FlowDiagramLink]].
   *
   * @param source  Source link
   */

  FlowDiagramLink.prototype.copyFrom = function (source) {
    _super.prototype.copyFrom.call(this, source);

    this.bullets.copyFrom(source.bullets);
    var middleLine = this.middleLine;

    if (middleLine) {
      if (middleLine instanceof _core_elements_Line__WEBPACK_IMPORTED_MODULE_8__.Line && source.middleLine instanceof _core_elements_Line__WEBPACK_IMPORTED_MODULE_8__.Line) {
        middleLine.copyFrom(source.middleLine);
      }

      if (middleLine instanceof _core_elements_Polyline__WEBPACK_IMPORTED_MODULE_7__.Polyline && source.middleLine instanceof _core_elements_Polyline__WEBPACK_IMPORTED_MODULE_7__.Polyline) {
        middleLine.copyFrom(source.middleLine);
      }
    }

    this.link.copyFrom(source.link);
  };
  /**
   * @ignore Exclude from docs
   * @return Tooltip X (px)
   */


  FlowDiagramLink.prototype.getTooltipX = function () {
    if (this.middleLine) {
      return this.middleLine.positionToPoint(this.tooltipLocation).x;
    }
  };
  /**
   * @ignore Exclude from docs
   * @return Tooltip Y (px)
   */


  FlowDiagramLink.prototype.getTooltipY = function () {
    if (this.middleLine) {
      return this.middleLine.positionToPoint(this.tooltipLocation).y;
    }
  };

  Object.defineProperty(FlowDiagramLink.prototype, "gradient", {
    /**
     * A gradiend instance that is used to provided colored gradient fills for
     * the Flow link.
     */
    get: function get() {
      if (!this._gradient) {
        this._gradient = new _core_rendering_fills_LinearGradient__WEBPACK_IMPORTED_MODULE_2__.LinearGradient();
      }

      return this._gradient;
    },
    enumerable: true,
    configurable: true
  });
  return FlowDiagramLink;
}(_core_Container__WEBPACK_IMPORTED_MODULE_1__.Container);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_3__.registry.registeredClasses.FlowDiagramLink = FlowDiagramLink;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/FlowDiagramNode.js":
/*!***************************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/elements/FlowDiagramNode.js ***!
  \***************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "FlowDiagramNode": () => (/* binding */ FlowDiagramNode)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _core_Container__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../core/Container */ "./node_modules/@amcharts/amcharts4/.internal/core/Container.js");
/* harmony import */ var _core_Sprite__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/Sprite */ "./node_modules/@amcharts/amcharts4/.internal/core/Sprite.js");
/* harmony import */ var _core_utils_List__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/utils/List */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/List.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../core/utils/InterfaceColorSet */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/InterfaceColorSet.js");
/* harmony import */ var _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../core/utils/Iterator */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Iterator.js");
/* harmony import */ var _core_utils_String__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../core/utils/String */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/String.js");
/* harmony import */ var _core_utils_Order__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../core/utils/Order */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Order.js");
/* harmony import */ var _core_utils_Number__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../core/utils/Number */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Number.js");
/* harmony import */ var _core_elements_RoundedRectangle__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../core/elements/RoundedRectangle */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/RoundedRectangle.js");
/* harmony import */ var _core_utils_Object__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../core/utils/Object */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Object.js");
/* harmony import */ var _Legend__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../Legend */ "./node_modules/@amcharts/amcharts4/.internal/charts/Legend.js");
/**
 * FlowDiagramNode module
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */













/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Creates a node in a Flow Diagram.
 *
 * A Flow node is a block with a value, which represents its size on the
 * diagram.
 *
 * Nodes are connected via [[FlowLink]] elements.
 *
 * @see {@link IFlowDiagramNodeEvents} for a list of available events
 * @see {@link IFlowDiagramNodeAdapters} for a list of available Adapters
 * @important
 */

var FlowDiagramNode =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_12__.__extends)(FlowDiagramNode, _super);
  /**
   * Constructor
   */


  function FlowDiagramNode() {
    var _this = _super.call(this) || this;
    /**
     * Settings for the appearance of the related legend items.
     */


    _this.legendSettings = new _Legend__WEBPACK_IMPORTED_MODULE_11__.LegendSettings();
    _this.className = "FlowDiagramNode";
    _this.isMeasured = false; // TODO can this be removed ?

    new _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_4__.InterfaceColorSet();
    _this.draggable = true;
    _this.inert = true;
    _this.setStateOnChildren = true;

    _this.events.on("positionchanged", _this.invalidateLinks, _this, false);

    _this.events.on("sizechanged", _this.invalidateLinks, _this, false);

    return _this; //this.events.on("hit", this.handleHit, this, false);
  }
  /**
   * @ignore
   */


  FlowDiagramNode.prototype.handleHit = function (event) {
    if (this.isHidden || this.isHiding) {
      this.show();
    } else {
      this.hide();
    }
  };
  /**
   * Shows hidden node.
   *
   * @param duration  Duration of reveal animation (ms)
   * @return Animation
   */


  FlowDiagramNode.prototype.show = function (duration) {
    var animation = _super.prototype.show.call(this, duration);

    this.outgoingDataItems.each(function (dataItem) {
      if (!dataItem.toNode || dataItem.toNode && !dataItem.toNode.isHidden) {
        dataItem.setWorkingValue("value", dataItem.getValue("value"), duration);
        dataItem.link.show();
      }
    });
    this.incomingDataItems.each(function (dataItem) {
      if (!dataItem.fromNode || dataItem.fromNode && !dataItem.fromNode.isHidden) {
        dataItem.setWorkingValue("value", dataItem.getValue("value"), duration);
        dataItem.link.show();
      }
    });
    return animation;
  };
  /**
   * Hides node.
   *
   * @param duration  Duration of hiding animation (ms)
   * @return Animation
   */


  FlowDiagramNode.prototype.hide = function (duration) {
    var animation = _super.prototype.hide.call(this, duration);

    this.outgoingDataItems.each(function (dataItem) {
      dataItem.setWorkingValue("value", 0, duration);
      dataItem.link.hide();
    });
    this.incomingDataItems.each(function (dataItem) {
      dataItem.setWorkingValue("value", 0, duration);
      dataItem.link.hide();
    });
    return animation;
  };
  /**
   * Marks node as invalid, for redrawal in the next update cycle.
   *
   * @ignore Exclude from docs
   */


  FlowDiagramNode.prototype.validate = function () {
    if (!this.isDisposed()) {
      _super.prototype.validate.call(this);

      this.invalidateLinks();
    }
  };
  /**
   * Invalidates all links, attached to this node.
   *
   * @ignore Exclude from docs
   */


  FlowDiagramNode.prototype.invalidateLinks = function () {
    var _this = this;

    this.outgoingDataItems.each(function (dataItem) {
      var link = dataItem.link;

      if (link.colorMode == "fromNode") {
        link.fill = link.dataItem.fromNode.color;
      }

      if (link.colorMode == "gradient") {
        link.fill = link.gradient;
        link.stroke = link.gradient;
        var stop_1 = link.gradient.stops.getIndex(0);

        if (stop_1) {
          stop_1.color = _this.color;
          link.gradient.validate();
        }
      }
    });
    this.incomingDataItems.each(function (dataItem) {
      var link = dataItem.link;

      if (link.colorMode == "toNode") {
        link.fill = link.dataItem.toNode.color;
      }

      if (link.colorMode == "gradient") {
        link.fill = link.gradient;
        link.stroke = link.gradient;
        var stop_2 = link.gradient.stops.getIndex(1);

        if (stop_2) {
          stop_2.color = _this.color;
          link.gradient.validate();
        }
      }
    });
  };

  Object.defineProperty(FlowDiagramNode.prototype, "incomingDataItems", {
    /**
     * List of incoming items (links).
     *
     * @readonly
     * @return Incoming items
     */
    get: function get() {
      var _this = this;

      if (!this._incomingDataItems) {
        var incomingDataItems = new _core_utils_List__WEBPACK_IMPORTED_MODULE_2__.List();
        incomingDataItems.events.on("inserted", function () {
          if (_this.chart.sortBy == "name") {
            _this._incomingSorted = _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_5__.sort(_this._incomingDataItems.iterator(), function (x, y) {
              return _core_utils_String__WEBPACK_IMPORTED_MODULE_6__.order(x.fromName, y.fromName);
            });
          } else if (_this.chart.sortBy == "value") {
            _this._incomingSorted = _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_5__.sort(_this._incomingDataItems.iterator(), function (x, y) {
              return _core_utils_Order__WEBPACK_IMPORTED_MODULE_7__.reverse(_core_utils_Number__WEBPACK_IMPORTED_MODULE_8__.order(x.value, y.value));
            });
          } else {
            _this._incomingSorted = _this._incomingDataItems.iterator();
          }
        }, undefined, false);
        this._incomingDataItems = incomingDataItems;
      }

      return this._incomingDataItems;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(FlowDiagramNode.prototype, "outgoingDataItems", {
    /**
     * List of outgoing items (links).
     *
     * @readonly
     * @return Outgoing items
     */
    get: function get() {
      var _this = this;

      if (!this._outgoingDataItems) {
        var outgoingDataItems = new _core_utils_List__WEBPACK_IMPORTED_MODULE_2__.List();
        outgoingDataItems.events.on("inserted", function () {
          if (_this.chart.sortBy == "name") {
            _this._outgoingSorted = _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_5__.sort(_this._outgoingDataItems.iterator(), function (x, y) {
              return _core_utils_String__WEBPACK_IMPORTED_MODULE_6__.order(x.fromName, y.fromName);
            });
          } else if (_this.chart.sortBy == "value") {
            _this._outgoingSorted = _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_5__.sort(_this._outgoingDataItems.iterator(), function (x, y) {
              return _core_utils_Order__WEBPACK_IMPORTED_MODULE_7__.reverse(_core_utils_Number__WEBPACK_IMPORTED_MODULE_8__.order(x.value, y.value));
            });
          } else {
            _this._outgoingSorted = _this._outgoingDataItems.iterator();
          }
        }, undefined, false);
        this._outgoingDataItems = outgoingDataItems;
      }

      return this._outgoingDataItems;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(FlowDiagramNode.prototype, "name", {
    /**
     * @return Name
     */
    get: function get() {
      return this.getPropertyValue("name");
    },

    /**
     * A name of the node.
     *
     * @param value  Name
     */
    set: function set(value) {
      this.setPropertyValue("name", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(FlowDiagramNode.prototype, "total", {
    /**
     * @return Value
     */
    get: function get() {
      return this.getPropertyValue("total");
    },

    /**
     * Sum of all incoming+outgoing link values
     *
     * @param value  Value
     */
    set: function set(value) {
      this.setPropertyValue("total", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(FlowDiagramNode.prototype, "totalIncoming", {
    /**
     * @return Value
     */
    get: function get() {
      return this.getPropertyValue("totalIncoming");
    },

    /**
     * Sum of all incomming link values.
     *
     * @param value  Value
     */
    set: function set(value) {
      this.setPropertyValue("totalIncoming", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(FlowDiagramNode.prototype, "totalOutgoing", {
    /**
     * @return Value
     */
    get: function get() {
      return this.getPropertyValue("totalOutgoing");
    },

    /**
     * Sum of all outgoing link values.
     *
     * @param value  Value
     */
    set: function set(value) {
      this.setPropertyValue("totalOutgoing", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(FlowDiagramNode.prototype, "color", {
    /**
     * @return Color
     */
    get: function get() {
      return this.getPropertyValue("color");
    },

    /**
     * Node's color.
     *
     * @param value  Color
     */
    set: function set(value) {
      this.setColorProperty("color", value);

      if (this._background) {
        this._background.fill = value;
      }

      this.fill = value;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Creates elements in related legend container, that mimics the look of this
   * Series.
   *
   * @ignore Exclude from docs
   * @param marker  Legend item container
   */

  FlowDiagramNode.prototype.createLegendMarker = function (marker) {
    var w = marker.pixelWidth;
    var h = marker.pixelHeight;
    marker.removeChildren();
    var column = marker.createChild(_core_elements_RoundedRectangle__WEBPACK_IMPORTED_MODULE_9__.RoundedRectangle);
    column.shouldClone = false;
    _core_utils_Object__WEBPACK_IMPORTED_MODULE_10__.copyProperties(this, column, _core_Sprite__WEBPACK_IMPORTED_MODULE_1__.visualProperties);
    column.stroke = this.fill;
    column.copyFrom(this);
    column.padding(0, 0, 0, 0); // if columns will have padding (which is often), legend marker will be very narrow

    column.width = w;
    column.height = h;
    var legendDataItem = marker.dataItem;
    legendDataItem.color = column.fill;
    legendDataItem.colorOrig = column.fill;
  };

  Object.defineProperty(FlowDiagramNode.prototype, "legendDataItem", {
    /**
     * @return Data item
     */
    get: function get() {
      return this._legendDataItem;
    },

    /**
     * Legend data item that corresponds to this series.
     *
     * @param value  Data item
     */
    set: function set(value) {
      this._legendDataItem = value;

      this._legendDataItem.itemContainer.deepInvalidate();
    },
    enumerable: true,
    configurable: true
  });
  return FlowDiagramNode;
}(_core_Container__WEBPACK_IMPORTED_MODULE_0__.Container);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_3__.registry.registeredClasses.FlowDiagramNode = FlowDiagramNode;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/FunnelSlice.js":
/*!***********************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/elements/FunnelSlice.js ***!
  \***********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "FunnelSlice": () => (/* binding */ FunnelSlice)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _core_Container__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../core/Container */ "./node_modules/@amcharts/amcharts4/.internal/core/Container.js");
/* harmony import */ var _core_Sprite__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/Sprite */ "./node_modules/@amcharts/amcharts4/.internal/core/Sprite.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_utils_Percent__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/utils/Percent */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Percent.js");
/* harmony import */ var _core_utils_Utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../core/utils/Utils */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Utils.js");
/* harmony import */ var _core_rendering_Path__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../core/rendering/Path */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Path.js");
/**
 * Module that defines everything related to building Funnel slices.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */







/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Class used to create [[FunnelSlice]] elements.
 *
 * @see {@link IFunnelSliceEvents} for a list of available events
 * @see {@link IFunnelSliceAdapters} for a list of available adapters
 * @see {@link https://www.amcharts.com/docs/v4/chart-types/sliced-chart/} for documentation
 * @important
 */

var FunnelSlice =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_6__.__extends)(FunnelSlice, _super);
  /**
   * Constructor
   */


  function FunnelSlice() {
    var _this = _super.call(this) || this;

    _this.slice = _this.createChild(_core_Sprite__WEBPACK_IMPORTED_MODULE_1__.Sprite);
    _this.slice.shouldClone = false;

    _this.slice.setElement(_this.paper.add("path"));

    _this.slice.isMeasured = false;
    _this.orientation = "vertical";
    _this.bottomWidth = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_3__.percent)(100);
    _this.topWidth = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_3__.percent)(100);
    _this.isMeasured = false;
    _this.width = 10;
    _this.height = 10;
    _this.expandDistance = 0;
    _this.className = "FunnelSlice";

    _this.applyTheme();

    return _this;
  }
  /**
   * Draws the element.
   */


  FunnelSlice.prototype.draw = function () {
    _super.prototype.draw.call(this);

    var pt = this.pixelPaddingTop;
    var pb = this.pixelPaddingBottom;
    var pr = this.pixelPaddingRight;
    var pl = this.pixelPaddingLeft;
    var w = this.pixelWidth - pr - pl;
    var h = this.pixelHeight - pt - pb;
    var ed = this.expandDistance;
    var path = "";

    if (this.orientation == "vertical") {
      var tw = _core_utils_Utils__WEBPACK_IMPORTED_MODULE_4__.relativeToValue(this.topWidth, w);
      var bw = _core_utils_Utils__WEBPACK_IMPORTED_MODULE_4__.relativeToValue(this.bottomWidth, w);
      var tl = {
        x: (w - tw) / 2 + pl,
        y: pt
      };
      var tr = {
        x: (w + tw) / 2 + pl,
        y: pt
      };
      var br = {
        x: (w + bw) / 2 + pl,
        y: pt + h
      };
      var bl = {
        x: (w - bw) / 2 + pl,
        y: pt + h
      };
      var cpr = {
        x: tr.x + (br.x - tr.x) / 2 + ed * h,
        y: tr.y + 0.5 * h
      };
      var cpl = {
        x: tl.x + (bl.x - tl.x) / 2 - ed * h,
        y: tl.y + 0.5 * h
      };
      var qp1 = _core_rendering_Path__WEBPACK_IMPORTED_MODULE_5__.lineTo(br);
      var qp2 = _core_rendering_Path__WEBPACK_IMPORTED_MODULE_5__.lineTo(tl);

      if (ed != 0) {
        qp1 = _core_rendering_Path__WEBPACK_IMPORTED_MODULE_5__.quadraticCurveTo(br, cpr);
        qp2 = _core_rendering_Path__WEBPACK_IMPORTED_MODULE_5__.quadraticCurveTo(tl, cpl);
      }

      path = _core_rendering_Path__WEBPACK_IMPORTED_MODULE_5__.moveTo(tl) + _core_rendering_Path__WEBPACK_IMPORTED_MODULE_5__.lineTo(tr) + qp1 + _core_rendering_Path__WEBPACK_IMPORTED_MODULE_5__.lineTo(bl) + qp2;
      this.tickPoint = {
        x: tr.x + (br.x - tr.x) / 2,
        y: tr.y + (br.y - tr.y) / 2
      };
    } else {
      var tw = _core_utils_Utils__WEBPACK_IMPORTED_MODULE_4__.relativeToValue(this.topWidth, h);
      var bw = _core_utils_Utils__WEBPACK_IMPORTED_MODULE_4__.relativeToValue(this.bottomWidth, h);
      var tt = {
        x: pl,
        y: (h - tw) / 2 + pt
      };
      var tb = {
        x: pl,
        y: (h + tw) / 2 + pt
      };
      var bt = {
        x: pl + w,
        y: (h - bw) / 2 + pt
      };
      var bb = {
        x: pl + w,
        y: (h + bw) / 2 + pt
      };
      var cpr = {
        y: tt.y + (bt.y - tt.y) / 2 - ed * w,
        x: tt.x + 0.5 * w
      };
      var cpl = {
        y: tb.y + (bb.y - tb.y) / 2 + ed * w,
        x: tb.x + 0.5 * w
      };
      var qp1 = _core_rendering_Path__WEBPACK_IMPORTED_MODULE_5__.lineTo(bt);
      var qp2 = _core_rendering_Path__WEBPACK_IMPORTED_MODULE_5__.lineTo(tb);

      if (ed != 0) {
        qp1 = _core_rendering_Path__WEBPACK_IMPORTED_MODULE_5__.quadraticCurveTo(bt, cpr);
        qp2 = _core_rendering_Path__WEBPACK_IMPORTED_MODULE_5__.quadraticCurveTo(tb, cpl);
      }

      path = _core_rendering_Path__WEBPACK_IMPORTED_MODULE_5__.moveTo(tb) + _core_rendering_Path__WEBPACK_IMPORTED_MODULE_5__.lineTo(tt) + qp1 + _core_rendering_Path__WEBPACK_IMPORTED_MODULE_5__.lineTo(bb) + qp2;
      this.tickPoint = {
        y: tb.y + (bb.y - tb.y) / 2,
        x: tb.x + (bb.x - tb.x) / 2
      };
    }

    this.slice.path = path;
    this.invalidateLayout();
  };

  FunnelSlice.prototype.getPoint = function (locationX, locationY) {
    var pt = this.pixelPaddingTop;
    var pb = this.pixelPaddingBottom;
    var pr = this.pixelPaddingRight;
    var pl = this.pixelPaddingLeft;
    var w = this.pixelWidth - pr - pl;
    var h = this.pixelHeight - pt - pb;

    if (this.orientation == "vertical") {
      var tw = _core_utils_Utils__WEBPACK_IMPORTED_MODULE_4__.relativeToValue(this.topWidth, w);
      var bw = _core_utils_Utils__WEBPACK_IMPORTED_MODULE_4__.relativeToValue(this.bottomWidth, w);
      var tl = {
        x: (w - tw) / 2 + pl,
        y: pt
      };
      var tr = {
        x: (w + tw) / 2 + pl,
        y: pt
      };
      var br = {
        x: (w + bw) / 2 + pl,
        y: pt + h
      };
      var bl = {
        x: (w - bw) / 2 + pl,
        y: pt + h
      };
      var mlx = tl.x + (bl.x - tl.x) * locationY;
      var mrx = tr.x + (br.x - tr.x) * locationY;
      return {
        x: mlx + (mrx - mlx) * locationX,
        y: tr.y + (br.y - tr.y) * locationY
      };
    } else {
      var tw = _core_utils_Utils__WEBPACK_IMPORTED_MODULE_4__.relativeToValue(this.topWidth, h);
      var bw = _core_utils_Utils__WEBPACK_IMPORTED_MODULE_4__.relativeToValue(this.bottomWidth, h);
      var tt = {
        x: pl,
        y: (h - tw) / 2 + pt
      };
      var tb = {
        x: pl,
        y: (h + tw) / 2 + pt
      };
      var bt = {
        x: pl + w,
        y: (h - bw) / 2 + pt
      };
      var bb = {
        x: pl + w,
        y: (h + bw) / 2 + pt
      };
      var mty = tt.y + (bt.y - tt.y) * locationX;
      var mby = tb.y + (bb.y - tb.y) * locationX;
      return {
        y: mty + (mby - mty) * locationY,
        x: tt.x + (bt.x - tt.x) * locationX
      };
    }
  };

  Object.defineProperty(FunnelSlice.prototype, "bottomWidth", {
    /**
     * @return bottom width
     */
    get: function get() {
      return this.getPropertyValue("bottomWidth");
    },

    /**
     * Bottom width in pixels or percent.
     *
     * IMPORTANT: this setting might be used to set dimensions if you use slice
     * as a standalone element. If it's a part of [[FunnelSeries]] this setting
     * becomes read-only as it will be automatically reset by series.
     *
     * @param value  Bottom width
     */
    set: function set(value) {
      this.setPercentProperty("bottomWidth", value, true, false, 10, false);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(FunnelSlice.prototype, "topWidth", {
    /**
     * @return Top width
     */
    get: function get() {
      return this.getPropertyValue("topWidth");
    },

    /**
     * Top width in pixels or percent.
     *
     * IMPORTANT: this setting might be used to set dimensions if you use slice
     * as a standalone element. If it's a part of [[FunnelSeries]] this setting
     * becomes read-only as it will be automatically reset by series.
     *
     * @param value  Top width
     */
    set: function set(value) {
      this.setPercentProperty("topWidth", value, true, false, 10, false);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(FunnelSlice.prototype, "orientation", {
    /**
     * @return Orientation
     */
    get: function get() {
      return this.getPropertyValue("orientation");
    },

    /**
     * Orientation of the funnel slice: "horizontal" or "vertical".
     *
     * IMPORTANT: this setting might be used to set orintation if you use slice
     * as a standalone element. If it's a part of [[FunnelSeries]] this setting
     * becomes read-only as it will be automatically reset by series.
     *
     * @param value  Orientation
     */
    set: function set(value) {
      this.setPropertyValue("orientation", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(FunnelSlice.prototype, "expandDistance", {
    /**
     * @return expandDistance
     */
    get: function get() {
      return this.getPropertyValue("expandDistance");
    },

    /**
     * A relative distance slice's sides should be bent to. It's relative to the
     * height of the slice.
     *
     * Zero (default) will mean the sides will be perfectly straight.
     *
     * Positive value will make them bend outwards, resulting in "puffed" slices.
     *
     * Negative values will make them bend inwards.
     *
     * @default 0
     * @param {number}
     */
    set: function set(value) {
      this.setPropertyValue("expandDistance", value, true);
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Copies all parameters from another [[Sprite]].
   *
   * @param source Source Sprite
   */

  FunnelSlice.prototype.copyFrom = function (source) {
    _super.prototype.copyFrom.call(this, source);

    if (this.slice) {
      this.slice.copyFrom(source.slice);
    }
  };

  return FunnelSlice;
}(_core_Container__WEBPACK_IMPORTED_MODULE_0__.Container);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_2__.registry.registeredClasses.FunnelSlice = FunnelSlice;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/FunnelTick.js":
/*!**********************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/elements/FunnelTick.js ***!
  \**********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "FunnelTick": () => (/* binding */ FunnelTick)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _elements_Tick__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../elements/Tick */ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/Tick.js");
/* harmony import */ var _core_utils_Disposer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/utils/Disposer */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Disposer.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_utils_Utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/utils/Utils */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Utils.js");
/* harmony import */ var _core_rendering_Path__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../core/rendering/Path */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Path.js");
/**
 * Funnel tick module.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */






/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Draws an tick line for a funnel slice connecting it to a related label.
 *
 * @see {@link IFunnelTickEvents} for a list of available events
 * @see {@link IFunnelTickAdapters} for a list of available Adapters
 */

var FunnelTick =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__extends)(FunnelTick, _super);
  /**
   * Constructor
   */


  function FunnelTick() {
    var _this = _super.call(this) || this;
    /**
     * A label element this tick is attached to.
     */


    _this._label = new _core_utils_Disposer__WEBPACK_IMPORTED_MODULE_1__.MutableValueDisposer();
    /**
     * A slice element this tick is attached to.
     */

    _this._slice = new _core_utils_Disposer__WEBPACK_IMPORTED_MODULE_1__.MutableValueDisposer();
    _this.className = "FunnelTick";
    _this.element = _this.paper.add("path");

    _this._disposers.push(_this._label);

    _this._disposers.push(_this._slice);

    _this.setPropertyValue("locationX", 0);

    _this.setPropertyValue("locationY", 0);

    _this.applyTheme();

    return _this;
  }
  /**
   * Draws the tick element.
   *
   * @ignore Exclude from docs
   */


  FunnelTick.prototype.draw = function () {
    _super.prototype.draw.call(this);

    var slice = this.slice;
    var point = slice.getPoint(this.locationX, this.locationY);

    if (point) {
      var label = this.label;
      var series = slice.dataItem.component;
      var p0 = void 0;
      var p1 = void 0;
      var p2 = void 0;

      if (series.orientation == "vertical") {
        var x1 = label.pixelX;
        var y1 = label.pixelY;

        if (!series.labelsOpposite) {
          x1 += label.maxRight;
        }

        p0 = _core_utils_Utils__WEBPACK_IMPORTED_MODULE_3__.spritePointToSprite(point, slice, this.parent);
        p2 = _core_utils_Utils__WEBPACK_IMPORTED_MODULE_3__.spritePointToSprite({
          x: x1,
          y: y1
        }, label.parent, this.parent);
        p1 = {
          x: label.parent.pixelX - this.length,
          y: p2.y
        };

        if (!series.labelsOpposite) {
          p1.x = label.parent.measuredWidth + this.length;
        }
      } else {
        var x1 = label.pixelX;
        var y1 = label.pixelY;

        if (!series.labelsOpposite) {
          y1 += label.maxBottom;
        }

        p0 = _core_utils_Utils__WEBPACK_IMPORTED_MODULE_3__.spritePointToSprite(point, slice, this.parent);
        p2 = _core_utils_Utils__WEBPACK_IMPORTED_MODULE_3__.spritePointToSprite({
          x: x1,
          y: y1
        }, label.parent, this.parent);
        p1 = {
          x: p2.x,
          y: label.parent.pixelY - this.length
        };

        if (!series.labelsOpposite) {
          p1.y = label.parent.measuredHeight + this.length;
        }
      }

      this.path = _core_rendering_Path__WEBPACK_IMPORTED_MODULE_4__.moveTo(p0) + _core_rendering_Path__WEBPACK_IMPORTED_MODULE_4__.lineTo(p1) + _core_rendering_Path__WEBPACK_IMPORTED_MODULE_4__.lineTo(p2);
    }
  };

  Object.defineProperty(FunnelTick.prototype, "slice", {
    /**
     * @return FunnelSlice
     */
    get: function get() {
      return this._slice.get();
    },

    /**
     * [[FunnelSlice]] element tick is attached to.
     *
     * @param slice  Slice
     */
    set: function set(slice) {
      this._slice.set(slice, new _core_utils_Disposer__WEBPACK_IMPORTED_MODULE_1__.MultiDisposer([slice.events.on("transformed", this.invalidate, this, false), slice.events.on("validated", this.invalidate, this, false)]));
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(FunnelTick.prototype, "label", {
    /**
     * @return Label
     */
    get: function get() {
      return this._label.get();
    },

    /**
     * [[Label]] element tick is attached to.
     *
     * @param label  Label
     */
    set: function set(label) {
      this._label.set(label, label.events.on("transformed", this.invalidate, this, false));
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(FunnelTick.prototype, "locationX", {
    /**
     * @return Location (0-1)
     */
    get: function get() {
      return this.getPropertyValue("locationX");
    },

    /**
     * A relative horizontal position within target element a tick is pointing
     * to.
     *
     * A scale is from 0 to 1, where 0 means left edge, and 1 right edge.
     *
     * You can also set any value in-between (e.g. 0.5 will point to the middle
     * of the slice), or outside 0-1 range, which will put tick anchor position
     * outside target element.
     *
     * @param value  Location (0-1)
     */
    set: function set(value) {
      this.setPropertyValue("locationX", value, false, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(FunnelTick.prototype, "locationY", {
    /**
     * @return Location (0-1)
     */
    get: function get() {
      return this.getPropertyValue("locationY");
    },

    /**
     * A relative vertical position within target element a tick is pointing
     * to.
     *
     * A scale is from 0 to 1, where 0 means top edge, and 1 bottom edge.
     *
     * You can also set any value in-between (e.g. 0.5 will point to the middle
     * of the slice), or outside 0-1 range, which will put tick anchor position
     * outside target element.
     *
     * @param value  Location (0-1)
     */
    set: function set(value) {
      this.setPropertyValue("locationY", value, false, true);
    },
    enumerable: true,
    configurable: true
  });
  return FunnelTick;
}(_elements_Tick__WEBPACK_IMPORTED_MODULE_0__.Tick);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_2__.registry.registeredClasses.FunnelTick = FunnelTick;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/HeatLegend.js":
/*!**********************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/elements/HeatLegend.js ***!
  \**********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "HeatLegend": () => (/* binding */ HeatLegend)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _core_Container__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../core/Container */ "./node_modules/@amcharts/amcharts4/.internal/core/Container.js");
/* harmony import */ var _core_rendering_fills_LinearGradient__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/rendering/fills/LinearGradient */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/LinearGradient.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_utils_Color__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/utils/Color */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Color.js");
/* harmony import */ var _core_utils_List__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../core/utils/List */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/List.js");
/* harmony import */ var _core_utils_Percent__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../core/utils/Percent */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Percent.js");
/* harmony import */ var _charts_axes_ValueAxis__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../charts/axes/ValueAxis */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/ValueAxis.js");
/* harmony import */ var _charts_axes_AxisRendererX__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../charts/axes/AxisRendererX */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisRendererX.js");
/* harmony import */ var _charts_axes_AxisRendererY__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../charts/axes/AxisRendererY */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisRendererY.js");
/* harmony import */ var _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../core/utils/Iterator */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Iterator.js");
/* harmony import */ var _core_utils_Type__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../core/utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/* harmony import */ var _core_utils_Colors__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../core/utils/Colors */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Colors.js");
/* harmony import */ var _core_elements_RoundedRectangle__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../core/elements/RoundedRectangle */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/RoundedRectangle.js");
/**
 * HeatLegend module
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */














/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * This class creates a link (waved color-filled line) between two nodes in a
 * Sankey Diagram.
 *
 * @see {@link IHeatLegendEvents} for a list of available events
 * @see {@link IHeatLegendAdapters} for a list of available Adapters
 * @important
 */

var HeatLegend =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_13__.__extends)(HeatLegend, _super);
  /**
   * Constructor
   */


  function HeatLegend() {
    var _this = _super.call(this) || this;

    _this.className = "HeatLegend";
    _this.markerContainer = _this.createChild(_core_Container__WEBPACK_IMPORTED_MODULE_0__.Container);
    _this.markerContainer.shouldClone = false;
    _this.markerCount = 1; // Create a template container and list for the a marker

    var marker = new _core_elements_RoundedRectangle__WEBPACK_IMPORTED_MODULE_12__.RoundedRectangle();
    marker.minHeight = 20;
    marker.minWidth = 20;
    marker.interactionsEnabled = false;
    marker.fillOpacity = 1;
    marker.cornerRadius(0, 0, 0, 0);
    _this.markerContainer.minHeight = 20;
    _this.markerContainer.minWidth = 20;
    _this.orientation = "horizontal";
    _this.markers = new _core_utils_List__WEBPACK_IMPORTED_MODULE_4__.ListTemplate(marker);

    _this._disposers.push(new _core_utils_List__WEBPACK_IMPORTED_MODULE_4__.ListDisposer(_this.markers));

    _this._disposers.push(_this.markers.template);

    _this.applyTheme();

    return _this;
  }

  HeatLegend.prototype.getMinFromRules = function (property) {
    var series = this.series;

    if (series) {
      var minValue_1;
      _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_9__.eachContinue(series.heatRules.iterator(), function (heatRule) {
        if (heatRule.property == property) {
          minValue_1 = heatRule.min;
          return false;
        }

        return true;
      });
      return minValue_1;
    }
  };

  HeatLegend.prototype.getMaxFromRules = function (property) {
    var series = this.series;

    if (series) {
      var maxValue_1;
      _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_9__.each(series.heatRules.iterator(), function (heatRule) {
        if (heatRule.property == property) {
          maxValue_1 = heatRule.max;
          return false;
        }

        return true;
      });
      return maxValue_1;
    }
  };
  /**
   *
   * @ignore Exclude from docs
   */


  HeatLegend.prototype.validate = function () {
    _super.prototype.validate.call(this);

    this.valueAxis.renderer.inversed = this.reverseOrder;
    var series = this.series;
    var minColor = this.minColor;
    var maxColor = this.maxColor;

    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_10__.hasValue(minColor)) {
      minColor = (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_3__.toColor)(this.getMinFromRules("fill"));
    }

    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_10__.hasValue(maxColor)) {
      maxColor = (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_3__.toColor)(this.getMaxFromRules("fill"));
    }

    if (series) {
      var seriesFill = series.fill;

      if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_10__.hasValue(minColor) && seriesFill instanceof _core_utils_Color__WEBPACK_IMPORTED_MODULE_3__.Color) {
        minColor = seriesFill;
      }

      if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_10__.hasValue(maxColor) && seriesFill instanceof _core_utils_Color__WEBPACK_IMPORTED_MODULE_3__.Color) {
        maxColor = seriesFill;
      }
    }

    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_10__.hasValue(maxColor)) {
      maxColor = (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_3__.toColor)(this.getMaxFromRules("fill"));
    }

    var minOpacity = _core_utils_Type__WEBPACK_IMPORTED_MODULE_10__.toNumber(this.getMinFromRules("fillOpacity"));

    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_10__.isNumber(minOpacity)) {
      minOpacity = 1;
    }

    var maxOpacity = _core_utils_Type__WEBPACK_IMPORTED_MODULE_10__.toNumber(this.getMaxFromRules("fillOpacity"));

    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_10__.isNumber(maxOpacity)) {
      maxOpacity = 1;
    }

    var minStrokeOpacity = _core_utils_Type__WEBPACK_IMPORTED_MODULE_10__.toNumber(this.getMinFromRules("strokeOpacity"));

    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_10__.isNumber(minStrokeOpacity)) {
      minStrokeOpacity = 1;
    }

    var maxStrokeOpacity = _core_utils_Type__WEBPACK_IMPORTED_MODULE_10__.toNumber(this.getMaxFromRules("strokeOpacity"));

    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_10__.isNumber(maxStrokeOpacity)) {
      maxStrokeOpacity = 1;
    }

    var minStroke = (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_3__.toColor)(this.getMinFromRules("stroke"));
    var maxStroke = (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_3__.toColor)(this.getMaxFromRules("stroke")); //if (series) {

    for (var i = 0; i < this.markerCount; i++) {
      var marker = this.markers.getIndex(i);

      if (!marker) {
        marker = this.markers.create();
        marker.parent = this.markerContainer;
        marker.height = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_5__.percent)(100);
        marker.width = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_5__.percent)(100);
      }

      if (this.markerCount == 1) {
        var gradient = new _core_rendering_fills_LinearGradient__WEBPACK_IMPORTED_MODULE_1__.LinearGradient();

        if (this.reverseOrder) {
          gradient.addColor(maxColor, maxOpacity);
          gradient.addColor(minColor, minOpacity);
        } else {
          gradient.addColor(minColor, minOpacity);
          gradient.addColor(maxColor, maxOpacity);
        }

        if (this.orientation == "vertical") {
          gradient.rotation = -90;
        }

        marker.fill = gradient;

        if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_10__.hasValue(minStroke) && _core_utils_Type__WEBPACK_IMPORTED_MODULE_10__.hasValue(maxStroke)) {
          var strokeGradient = new _core_rendering_fills_LinearGradient__WEBPACK_IMPORTED_MODULE_1__.LinearGradient();

          if (this.reverseOrder) {
            strokeGradient.addColor(maxStroke, maxStrokeOpacity);
            strokeGradient.addColor(minStroke, minStrokeOpacity);
          } else {
            strokeGradient.addColor(minStroke, minStrokeOpacity);
            strokeGradient.addColor(maxStroke, maxStrokeOpacity);
          }

          if (this.orientation == "vertical") {
            strokeGradient.rotation = -90;
          }

          marker.stroke = strokeGradient;
        }
      } else {
        var c = i;

        if (this.reverseOrder) {
          c = this.markerCount - i - 1;
        }

        var color = new _core_utils_Color__WEBPACK_IMPORTED_MODULE_3__.Color(_core_utils_Colors__WEBPACK_IMPORTED_MODULE_11__.interpolate(minColor.rgb, maxColor.rgb, c / this.markerCount));
        marker.fill = color;
        var opacity = minOpacity + (maxOpacity - minOpacity) * c / this.markerCount;
        marker.fillOpacity = opacity;

        if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_10__.hasValue(minStroke) && _core_utils_Type__WEBPACK_IMPORTED_MODULE_10__.hasValue(maxStroke)) {
          var color_1 = new _core_utils_Color__WEBPACK_IMPORTED_MODULE_3__.Color(_core_utils_Colors__WEBPACK_IMPORTED_MODULE_11__.interpolate(minStroke.rgb, maxStroke.rgb, c / this.markerCount));
          marker.stroke = color_1;
          var opacity_1 = minStrokeOpacity + (maxStrokeOpacity - minStrokeOpacity) * c / this.markerCount;
          marker.strokeOpacity = opacity_1;
        }
      }
    }

    var renderer = this.valueAxis.renderer;

    if (this.markerCount > 1) {
      if (this.orientation == "horizontal") {
        renderer.minGridDistance = this.measuredWidth / this.markerCount;
      } else {
        renderer.minGridDistance = this.measuredHeight / this.markerCount;
      }
    }

    this.valueAxis.invalidate();

    for (var i = this.markerCount, len = this.markers.length; i < len; i++) {
      this.markers.getIndex(i).parent = undefined;
    }
  };

  Object.defineProperty(HeatLegend.prototype, "minColor", {
    /**
     * Returns minColor value
     * @return {Color}
     */
    get: function get() {
      return this.getPropertyValue("minColor");
    },

    /**
     * Min color of a heat legend. If a series is set for the legend, minColor is taken from series.
     *
     * @param {Color}
     */
    set: function set(value) {
      if (!(value instanceof _core_utils_Color__WEBPACK_IMPORTED_MODULE_3__.Color)) {
        value = (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_3__.toColor)(value);
      }

      this.setColorProperty("minColor", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(HeatLegend.prototype, "maxColor", {
    /**
     * Returns maxColor value
     * @return {Color}
     */
    get: function get() {
      return this.getPropertyValue("maxColor");
    },

    /**
     * Max color of a heat legend. If a series is set for the legend, maxColor is taken from series.
     *
     * @param {Color}
     */
    set: function set(value) {
      if (!(value instanceof _core_utils_Color__WEBPACK_IMPORTED_MODULE_3__.Color)) {
        value = (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_3__.toColor)(value);
      }

      this.setColorProperty("maxColor", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(HeatLegend.prototype, "markerCount", {
    /**
     * Returns number of color squares (markers).
     * @return {number}
     */
    get: function get() {
      return this.getPropertyValue("markerCount");
    },

    /**
     * Number of color squares (markers) in the heat legend. If only 1 marker is used, it will be filled with gradient.
     *
     * @param {number}
     */
    set: function set(value) {
      this.setPropertyValue("markerCount", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(HeatLegend.prototype, "minValue", {
    /**
     * Returns minimum value of heat legend.
     * @return {number}
     */
    get: function get() {
      return this.getPropertyValue("minValue");
    },

    /**
     * Minimum value of heat legend's value axis. If a series is set for the legend, min is taken from series.
     *
     * @param {number}
     */
    set: function set(value) {
      this.setPropertyValue("minValue", value);
      this.valueAxis.min = value;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(HeatLegend.prototype, "maxValue", {
    /**
     * Returns maximum value of heat legend.
     * @return {number}
     */
    get: function get() {
      return this.getPropertyValue("maxValue");
    },

    /**
     * Maximum value of heat legend's value axis. If a series is set for the legend, max is taken from series.
     *
     * @param {number}
     */
    set: function set(value) {
      this.setPropertyValue("maxValue", value);
      this.valueAxis.max = value;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(HeatLegend.prototype, "orientation", {
    /**
     * Returns orientation value.
     *
     * @return {"horizontal" | "vertical"}
     */
    get: function get() {
      return this.getPropertyValue("orientation");
    },

    /**
    * Heat legend orientation. Note, if you change orientation of a heat legend, you must set value axis renderer properties after that, as with orientation renderer changes.
    *
    * @param {"horizontal" | "vertical"}
    */
    set: function set(value) {
      this.setPropertyValue("orientation", value, true);
      var markerContainer = this.markerContainer;
      var valueAxis = this.valueAxis; // HORIZONTAL

      if (value == "horizontal") {
        if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_10__.hasValue(this.width)) {
          this.width = 200;
        }

        this.height = undefined;
        valueAxis.width = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_5__.percent)(100);
        valueAxis.height = undefined;
        valueAxis.tooltip.pointerOrientation = "vertical";
        this.layout = "vertical";
        markerContainer.width = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_5__.percent)(100);
        markerContainer.height = undefined;

        if (!(valueAxis.renderer instanceof _charts_axes_AxisRendererX__WEBPACK_IMPORTED_MODULE_7__.AxisRendererX)) {
          valueAxis.renderer = new _charts_axes_AxisRendererX__WEBPACK_IMPORTED_MODULE_7__.AxisRendererX();
        }
      } // VERTICAL
      else {
        if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_10__.hasValue(this.height)) {
          this.height = 200;
        }

        this.width = undefined;
        this.layout = "horizontal";
        markerContainer.width = undefined;
        markerContainer.height = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_5__.percent)(100);
        valueAxis.height = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_5__.percent)(100);
        valueAxis.width = undefined;
        valueAxis.tooltip.pointerOrientation = "horizontal";

        if (!(valueAxis.renderer instanceof _charts_axes_AxisRendererY__WEBPACK_IMPORTED_MODULE_8__.AxisRendererY)) {
          valueAxis.renderer = new _charts_axes_AxisRendererY__WEBPACK_IMPORTED_MODULE_8__.AxisRendererY();
        }

        valueAxis.renderer.inside = true;
        valueAxis.renderer.labels.template.inside = true;
        this.markerContainer.reverseOrder = true;
      }

      var renderer = valueAxis.renderer;
      renderer.grid.template.disabled = true;
      renderer.axisFills.template.disabled = true;
      renderer.baseGrid.disabled = true;
      renderer.labels.template.padding(2, 3, 2, 3);
      renderer.minHeight = undefined;
      renderer.minWidth = undefined;
      this.markerContainer.layout = value;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(HeatLegend.prototype, "valueAxis", {
    /**
     * Returns valueAxis value.
     * @return {ValueAxis}
     */
    get: function get() {
      if (!this._valueAxis) {
        this.valueAxis = this.createChild(_charts_axes_ValueAxis__WEBPACK_IMPORTED_MODULE_6__.ValueAxis);
        this.valueAxis.shouldClone = false;
      }

      return this._valueAxis;
    },

    /**
     * Sets a value axis of heat legend. Value axis for heat legend is created automatically.
     * @param {ValueAxis}
     */
    set: function set(valueAxis) {
      this._valueAxis = valueAxis;
      valueAxis.parent = this;
      valueAxis.strictMinMax = true;
      this.orientation = this.orientation;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(HeatLegend.prototype, "series", {
    /**
     * Returns series value.
     * @return {Series}
     */
    get: function get() {
      return this._series;
    },

    /**
     * You can set series for heat legend. It will take min, max, minColor and maxColor values from this series.
     * @param series
     */
    set: function set(series) {
      var _this = this;

      this._series = series;
      var dataField = "value";

      try {
        var dataFieldDefined = series.heatRules.getIndex(0).dataField;

        if (dataFieldDefined) {
          dataField = dataFieldDefined;
        }
      } catch (err) {}

      this.updateMinMax(series.dataItem.values[dataField].low, series.dataItem.values[dataField].high);
      series.dataItem.events.on("calculatedvaluechanged", function (event) {
        _this.updateMinMax(series.dataItem.values[dataField].low, series.dataItem.values[dataField].high);
      }, undefined, false);
      series.heatRules.events.on("inserted", this.invalidate, this, false);
      series.heatRules.events.on("removed", this.invalidate, this, false);
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Updates min/max of value axis.
   * @ignore
   */

  HeatLegend.prototype.updateMinMax = function (min, max) {
    var valueAxis = this.valueAxis;

    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_10__.isNumber(this.minValue)) {
      valueAxis.min = min;
      valueAxis.invalidate();
    }

    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_10__.isNumber(this.maxValue)) {
      valueAxis.max = max;
      valueAxis.invalidate();
    }
  };
  /**
   * Processes JSON-based config before it is applied to the object.
   *
   * @ignore Exclude from docs
   * @param config  Config
   */


  HeatLegend.prototype.processConfig = function (config) {
    if (config) {
      // Set up series
      if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_10__.hasValue(config.series) && _core_utils_Type__WEBPACK_IMPORTED_MODULE_10__.isString(config.series)) {
        if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_10__.isString(config.series)) {
          if (this.map.hasKey(config.series)) {
            config.series = this.map.getKey(config.series);
          } else {
            var seriesId_1 = config.series;
            var disposer_1 = this.map.events.on("insertKey", function (ev) {
              if (ev.key == seriesId_1) {
                this.series = ev.newValue;
                disposer_1.dispose();
              }
            }, this);

            this._disposers.push(disposer_1);

            delete config.series;
          }
        }
      }
    }

    _super.prototype.processConfig.call(this, config);
  };

  return HeatLegend;
}(_core_Container__WEBPACK_IMPORTED_MODULE_0__.Container);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_2__.registry.registeredClasses.HeatLegend = HeatLegend;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/LabelBullet.js":
/*!***********************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/elements/LabelBullet.js ***!
  \***********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "LabelBullet": () => (/* binding */ LabelBullet)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Bullet__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Bullet */ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/Bullet.js");
/* harmony import */ var _core_elements_Label__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/elements/Label */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Label.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_utils_Color__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/utils/Color */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Color.js");
/* harmony import */ var _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../core/utils/InterfaceColorSet */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/InterfaceColorSet.js");
/**
 * Bullet module
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */






/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Creates a bullet with a textual label.
 *
 * Uses [[Label]] instance to draw the label, so the label itself is
 * configurable.
 *
 * @see {@link IBulletEvents} for a list of available events
 * @see {@link IBulletAdapters} for a list of available Adapters
 * @todo Usage example
 * @important
 */

var LabelBullet =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__extends)(LabelBullet, _super);
  /**
   * Constructor
   */


  function LabelBullet() {
    var _this = _super.call(this) || this;

    _this.className = "LabelBullet";

    var label = _this.createChild(_core_elements_Label__WEBPACK_IMPORTED_MODULE_1__.Label);

    label.shouldClone = false;
    label.verticalCenter = "middle";
    label.horizontalCenter = "middle";
    label.truncate = true;
    label.hideOversized = false;
    label.maxWidth = 500;
    label.maxHeight = 500;
    label.stroke = (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_3__.color)();
    label.strokeOpacity = 0;
    label.fill = new _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_4__.InterfaceColorSet().getFor("text");

    _this.events.on("maxsizechanged", _this.handleMaxSize, _this, false);

    _this.label = label; // not good, as lineSeries will have labels somewhere in the middle.
    //this.locationX = 0.5;
    //this.locationY = 0.5;

    _this.applyTheme();

    return _this;
  }

  LabelBullet.prototype.handleMaxSize = function () {
    this.label.maxWidth = this.maxWidth;
    this.label.maxHeight = this.maxHeight;
  };
  /**
   * Copies all proprities and related stuff from another instance of
   * [[LabelBullet]].
   *
   * @param source  Source element
   */


  LabelBullet.prototype.copyFrom = function (source) {
    _super.prototype.copyFrom.call(this, source);

    this.label.copyFrom(source.label);
  };

  return LabelBullet;
}(_Bullet__WEBPACK_IMPORTED_MODULE_0__.Bullet);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_2__.registry.registeredClasses.LabelBullet = LabelBullet;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/NavigationBar.js":
/*!*************************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/elements/NavigationBar.js ***!
  \*************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "NavigationBar": () => (/* binding */ NavigationBar),
/* harmony export */   "NavigationBarDataItem": () => (/* binding */ NavigationBarDataItem)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _core_Component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../core/Component */ "./node_modules/@amcharts/amcharts4/.internal/core/Component.js");
/* harmony import */ var _core_DataItem__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/DataItem */ "./node_modules/@amcharts/amcharts4/.internal/core/DataItem.js");
/* harmony import */ var _core_utils_List__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/utils/List */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/List.js");
/* harmony import */ var _core_elements_TextLink__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/elements/TextLink */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/TextLink.js");
/* harmony import */ var _core_elements_Triangle__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../core/elements/Triangle */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Triangle.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../core/utils/InterfaceColorSet */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/InterfaceColorSet.js");
/* harmony import */ var _core_utils_Percent__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../core/utils/Percent */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Percent.js");
/* harmony import */ var _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../core/utils/Iterator */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Iterator.js");
/**
 * Functionality for drawing simple NavigationBar.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */










/**
 * ============================================================================
 * DATA ITEM
 * ============================================================================
 * @hidden
 */

/**
 * Defines a [[DataItem]] for [[NavigationBar]].
 *
 * @see {@link DataItem}
 */

var NavigationBarDataItem =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_9__.__extends)(NavigationBarDataItem, _super);
  /**
   * Constructor
   */


  function NavigationBarDataItem() {
    var _this = _super.call(this) || this;

    _this.className = "NavigationBarDataItem";

    _this.applyTheme();

    return _this;
  }

  Object.defineProperty(NavigationBarDataItem.prototype, "name", {
    /**
     * @return Name
     */
    get: function get() {
      return this.properties["name"];
    },

    /**
     * Name of the navigation bar item.
     *
     * @param value  Name
     */
    set: function set(value) {
      this.setProperty("name", value);
    },
    enumerable: true,
    configurable: true
  });
  return NavigationBarDataItem;
}(_core_DataItem__WEBPACK_IMPORTED_MODULE_1__.DataItem);


/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * NavigationBar class can be used to create a multi-level breadcrumb-style
 * navigation control.
 *
 * @see {@link INavigationBarEvents} for a list of available events
 * @see {@link INavigationBarAdapters} for a list of available Adapters
 * @todo Implement better
 * @important
 */

var NavigationBar =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_9__.__extends)(NavigationBar, _super);
  /**
   * Constructor
   */


  function NavigationBar() {
    var _this = // Init
    _super.call(this) || this;

    _this.className = "NavigationBar";
    var interfaceColors = new _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_6__.InterfaceColorSet();
    var textLink = new _core_elements_TextLink__WEBPACK_IMPORTED_MODULE_3__.TextLink();
    textLink.valign = "middle";
    textLink.paddingTop = 8;
    textLink.paddingBottom = 8;
    _this.paddingBottom = 2;
    _this.links = new _core_utils_List__WEBPACK_IMPORTED_MODULE_2__.ListTemplate(textLink);

    _this._disposers.push(new _core_utils_List__WEBPACK_IMPORTED_MODULE_2__.ListDisposer(_this.links));

    _this._disposers.push(textLink);

    _this._linksIterator = new _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_8__.ListIterator(_this.links, function () {
      return _this.links.create();
    });
    _this._linksIterator.createNewItems = true;
    var triangle = new _core_elements_Triangle__WEBPACK_IMPORTED_MODULE_4__.Triangle();
    triangle.direction = "right";
    triangle.width = 8;
    triangle.height = 12;
    triangle.fill = interfaceColors.getFor("alternativeBackground");
    triangle.fillOpacity = 0.5;
    triangle.valign = "middle";
    triangle.marginLeft = 10;
    triangle.marginRight = 10;
    _this.separators = new _core_utils_List__WEBPACK_IMPORTED_MODULE_2__.ListTemplate(triangle);

    _this._disposers.push(new _core_utils_List__WEBPACK_IMPORTED_MODULE_2__.ListDisposer(_this.separators));

    _this._disposers.push(triangle);

    var activeLink = new _core_elements_TextLink__WEBPACK_IMPORTED_MODULE_3__.TextLink();
    _this.activeLink = activeLink;
    activeLink.copyFrom(textLink);
    activeLink.valign = "middle";
    activeLink.fontWeight = "bold";
    _this.width = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_7__.percent)(100);
    _this.layout = "grid";
    _this.dataFields.name = "name"; // Apply theme

    _this.applyTheme();

    return _this;
  }
  /**
   * Completely redraws the navigation bar.
   *
   * @ignore Exclude from docs
   */


  NavigationBar.prototype.validateDataElements = function () {
    this.removeChildren();

    this._linksIterator.reset();

    _super.prototype.validateDataElements.call(this); //@todo: dispose

  };
  /**
   * Creates a visual element for a data item (nav item).
   *
   * @ignore Exclude from docs
   * @param dataItem  Data item
   */


  NavigationBar.prototype.validateDataElement = function (dataItem) {
    _super.prototype.validateDataElement.call(this, dataItem);

    var textLink;

    if (dataItem.index < this.dataItems.length - 1) {
      textLink = this._linksIterator.getLast();
      textLink.parent = this;
      var separator = this.separators.create();
      separator.parent = this;
      separator.valign = "middle";
    } else {
      textLink = this.activeLink;
      textLink.events.copyFrom(this.links.template.events);
      textLink.hide(0);
      textLink.show();
      textLink.parent = this;
    }

    textLink.dataItem = dataItem;
    textLink.text = dataItem.name;
    textLink.validate();
  };

  return NavigationBar;
}(_core_Component__WEBPACK_IMPORTED_MODULE_0__.Component);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_5__.registry.registeredClasses.NavigationBar = NavigationBar;
_core_Registry__WEBPACK_IMPORTED_MODULE_5__.registry.registeredClasses.NavigationBarDataItem = NavigationBarDataItem;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/OHLC.js":
/*!****************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/elements/OHLC.js ***!
  \****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "OHLC": () => (/* binding */ OHLC)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Candlestick__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Candlestick */ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/Candlestick.js");
/* harmony import */ var _core_elements_Line__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/elements/Line */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Line.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/**
 * Module that defines everything related to building OHLCs.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */




/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Class used to creates OHLCs.
 *
 * @see {@link IOHLCEvents} for a list of available events
 * @see {@link IOHLCAdapters} for a list of available Adapters
 * @todo Usage example
 * @important
 */

var OHLC =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__extends)(OHLC, _super);
  /**
   * Constructor
   */


  function OHLC() {
    var _this = _super.call(this) || this;

    _this.className = "OHLC";
    _this.layout = "none";
    return _this;
  }
  /**
   * @ignore
   */


  OHLC.prototype.createAssets = function () {
    //super.createAssets();
    this.openLine = this.createChild(_core_elements_Line__WEBPACK_IMPORTED_MODULE_1__.Line);
    this.openLine.shouldClone = false;
    this.highLowLine = this.createChild(_core_elements_Line__WEBPACK_IMPORTED_MODULE_1__.Line);
    this.highLowLine.shouldClone = false;
    this.closeLine = this.createChild(_core_elements_Line__WEBPACK_IMPORTED_MODULE_1__.Line);
    this.closeLine.shouldClone = false;
  };
  /**
   * Copies all parameters from another [[OHLC]].
   *
   * @param source Source OHLC
   */


  OHLC.prototype.copyFrom = function (source) {
    _super.prototype.copyFrom.call(this, source);

    if (this.openLine) {
      this.openLine.copyFrom(source.openLine);
    }

    if (this.highLowLine) {
      this.highLowLine.copyFrom(source.highLowLine);
    }

    if (this.closeLine) {
      this.closeLine.copyFrom(source.closeLine);
    }
  };

  return OHLC;
}(_Candlestick__WEBPACK_IMPORTED_MODULE_0__.Candlestick);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_2__.registry.registeredClasses.OHLC = OHLC;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/PieTick.js":
/*!*******************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/elements/PieTick.js ***!
  \*******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "PieTick": () => (/* binding */ PieTick)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _elements_Tick__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../elements/Tick */ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/Tick.js");
/* harmony import */ var _core_utils_Disposer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/utils/Disposer */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Disposer.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/**
 * Pie tick module.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */




/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Draws an tick line for a pie slice connecting it to a related label.
 *
 * @see {@link IPieTickEvents} for a list of available events
 * @see {@link IPieTickAdapters} for a list of available Adapters
 */

var PieTick =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__extends)(PieTick, _super);
  /**
   * Constructor
   */


  function PieTick() {
    var _this = _super.call(this) || this;
    /**
     * A label element this tick is attached to.
     */


    _this._label = new _core_utils_Disposer__WEBPACK_IMPORTED_MODULE_1__.MutableValueDisposer();
    /**
     * A slice element this tick is attached to.
     */

    _this._slice = new _core_utils_Disposer__WEBPACK_IMPORTED_MODULE_1__.MutableValueDisposer();
    _this.className = "PieTick";
    _this.element = _this.paper.add("polyline");

    _this._disposers.push(_this._label);

    _this._disposers.push(_this._slice);

    _this.applyTheme();

    return _this;
  }
  /**
   * Draws the tick element.
   *
   * @ignore Exclude from docs
   */


  PieTick.prototype.draw = function () {
    _super.prototype.draw.call(this);

    var slice = this.slice;
    var label = this.label;
    var series = slice.dataItem.component;

    if (slice && slice.radius > 0 && label && label.text) {
      var x0 = slice.dx + slice.slice.dx + slice.pixelX + slice.ix * slice.radius * slice.scale;
      var y0 = slice.dy + slice.slice.dy + slice.pixelY + slice.iy * slice.radiusY * slice.scale;
      var x1 = void 0;
      var y1 = void 0;
      var x2 = void 0;
      var y2 = void 0;

      if (series.alignLabels) {
        x1 = label.pixelX - this.length;
        y1 = label.pixelY;
        x2 = label.pixelX;
        y2 = y1;

        if (label.horizontalCenter == "right") {
          x1 += 2 * this.length;
          x2 = x1 - this.length;
        }
      } else {
        var r = label.pixelRadius(slice.radius);
        x1 = x0 + r * slice.ix;
        y1 = y0 + r * slice.iy;
        x2 = x1;
        y2 = y1;
      }

      this.element.attr({
        "points": [x0, y0, x1, y1, x2, y2]
      });
    }
  };

  Object.defineProperty(PieTick.prototype, "slice", {
    /**
     * @return Slice
     */
    get: function get() {
      return this._slice.get();
    },

    /**
     * Slice element tick is attached to.
     *
     * @param slice  Slice
     */
    set: function set(slice) {
      this._slice.set(slice, new _core_utils_Disposer__WEBPACK_IMPORTED_MODULE_1__.MultiDisposer([slice.events.on("transformed", this.invalidate, this), slice.events.on("validated", this.invalidate, this)]));
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(PieTick.prototype, "label", {
    /**
     * @return Label
     */
    get: function get() {
      return this._label.get();
    },

    /**
     * Label element tick is attached to.
     *
     * @param label  Label
     */
    set: function set(label) {
      this._label.set(label, label.events.on("transformed", this.invalidate, this, false));
    },
    enumerable: true,
    configurable: true
  });
  return PieTick;
}(_elements_Tick__WEBPACK_IMPORTED_MODULE_0__.Tick);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_2__.registry.registeredClasses.PieTick = PieTick;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/RadarColumn.js":
/*!***********************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/elements/RadarColumn.js ***!
  \***********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "RadarColumn": () => (/* binding */ RadarColumn)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Column__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Column */ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/Column.js");
/* harmony import */ var _core_elements_Slice__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/elements/Slice */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Slice.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_utils_Type__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/**
 * Module that defines everything related to building RadarColumns.
 * It is a container which has radarColumn element which is a Slice.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */





/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Class used to creates RadarColumns.
 *
 * @see {@link IRadarColumnEvents} for a list of available events
 * @see {@link IRadarColumnAdapters} for a list of available Adapters
 * @todo Usage example
 * @important
 */

var RadarColumn =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_4__.__extends)(RadarColumn, _super);
  /**
   * Constructor
   */


  function RadarColumn() {
    var _this = _super.call(this) || this;

    _this.className = "RadarColumn";
    return _this;
  }
  /**
   * @ignore
   */


  RadarColumn.prototype.createAssets = function () {
    this.radarColumn = this.createChild(_core_elements_Slice__WEBPACK_IMPORTED_MODULE_1__.Slice);
    this.radarColumn.shouldClone = false;
    this.radarColumn.strokeOpacity = undefined; // some dirty hack so that if user access column, it won't get error

    this.column = this.radarColumn;
  };
  /**
   * Copies all parameters from another [[RadarColumn]].
   *
   * @param source Source RadarColumn
   */


  RadarColumn.prototype.copyFrom = function (source) {
    _super.prototype.copyFrom.call(this, source);

    if (this.radarColumn) {
      this.radarColumn.copyFrom(source.radarColumn);
    }
  };
  /**
   * X coordinate for the slice tooltip.
   *
   * @return X
   * @ignore
   */


  RadarColumn.prototype.getTooltipX = function () {
    var value = this.getPropertyValue("tooltipX");

    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_3__.isNumber(value)) {
      return this.radarColumn.getTooltipX();
    }

    return value;
  };
  /**
   * Y coordinate for the slice tooltip.
   *
   * @return Y
   * @ignore
   */


  RadarColumn.prototype.getTooltipY = function () {
    var value = this.getPropertyValue("tooltipX");

    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_3__.isNumber(value)) {
      return this.radarColumn.getTooltipY();
    }

    return value;
  };

  return RadarColumn;
}(_Column__WEBPACK_IMPORTED_MODULE_0__.Column);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_2__.registry.registeredClasses.RadarColumn = RadarColumn;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/SankeyLink.js":
/*!**********************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/elements/SankeyLink.js ***!
  \**********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "SankeyLink": () => (/* binding */ SankeyLink)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _FlowDiagramLink__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./FlowDiagramLink */ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/FlowDiagramLink.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_elements_Polyspline__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/elements/Polyspline */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Polyspline.js");
/* harmony import */ var _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/utils/InterfaceColorSet */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/InterfaceColorSet.js");
/* harmony import */ var _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../core/utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
/* harmony import */ var _core_utils_Type__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../core/utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/* harmony import */ var _core_rendering_Smoothing__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../core/rendering/Smoothing */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Smoothing.js");
/* harmony import */ var _core_rendering_Path__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../core/rendering/Path */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Path.js");
/**
 * SankeyLink module
 */









/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * This class creates a link (waved color-filled line) between two nodes in a
 * Sankey Diagram.
 *
 * @see {@link ISankeyLinkEvents} for a list of available events
 * @see {@link ISankeyLinkAdapters} for a list of available Adapters
 * @important
 */

var SankeyLink =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_8__.__extends)(SankeyLink, _super);
  /**
   * Constructor
   */


  function SankeyLink() {
    var _this = _super.call(this) || this;

    _this.className = "SankeyLink"; // TODO can this be removed ?

    new _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_3__.InterfaceColorSet();
    _this.tension = 0.8;
    _this.controlPointDistance = 0.2;
    _this.startAngle = 0;
    _this.endAngle = 0;
    _this.linkWidth = 0;
    _this.startX = 0;
    _this.endX = 0;
    _this.startY = 0;
    _this.endY = 0;
    _this.middleLine = _this.createChild(_core_elements_Polyspline__WEBPACK_IMPORTED_MODULE_2__.Polyspline);
    _this.middleLine.shouldClone = false;
    _this.middleLine.strokeOpacity = 0;

    _this.applyTheme();

    return _this;
  }

  SankeyLink.prototype.makeBackwards = function () {
    if (this.states.getKey("backwards") != undefined) {
      this.setState("backwards");
    }
  };
  /**
   * (Re)validates (redraws) the link.
   *
   * @ignore Exclude from docs
   */


  SankeyLink.prototype.validate = function () {
    var _a, _b, _c, _d;

    _super.prototype.validate.call(this);

    if (!this.isTemplate) {
      var x0 = this.startX;
      var y0 = this.startY;
      var x1 = this.endX;
      var y1 = this.endY;

      if (this.states.getKey("backwards")) {
        this.setState("default");
      }

      if (this.dataItem) {
        var chart = this.dataItem.component;

        if (chart) {
          if (chart.orientation == "horizontal") {
            if (x1 < x0) {
              _a = (0,tslib__WEBPACK_IMPORTED_MODULE_8__.__read)([x1, x0], 2), x0 = _a[0], x1 = _a[1];
              _b = (0,tslib__WEBPACK_IMPORTED_MODULE_8__.__read)([y1, y0], 2), y0 = _b[0], y1 = _b[1];
              this.makeBackwards();
            }
          } else {
            if (y1 < y0) {
              _c = (0,tslib__WEBPACK_IMPORTED_MODULE_8__.__read)([y1, y0], 2), y0 = _c[0], y1 = _c[1];
              _d = (0,tslib__WEBPACK_IMPORTED_MODULE_8__.__read)([x1, x0], 2), x0 = _d[0], x1 = _d[1];
              this.makeBackwards();
            }
          }
        }
      }

      if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_5__.isNumber(x1)) {
        x1 = x0;
      }

      if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_5__.isNumber(y1)) {
        y1 = y0;
      }

      var startAngle = this.startAngle;
      var endAngle = this.endAngle;
      var w = this.linkWidth;
      var path = "";
      var xt0 = x0;
      var yt0 = y0;
      var xt1 = x1;
      var yt1 = y1;
      var xb0 = x0 + w * _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.sin(startAngle);
      var xb1 = x1 + w * _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.sin(endAngle);
      var yb0 = y0 + w * _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.cos(startAngle);
      var yb1 = y1 + w * _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.cos(endAngle);
      var xm0 = x0 + w / 2 * _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.sin(startAngle);
      var xm1 = x1 + w / 2 * _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.sin(endAngle);
      var ym0 = y0 + w / 2 * _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.cos(startAngle);
      var ym1 = y1 + w / 2 * _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.cos(endAngle);
      this.zIndex = this.zIndex || this.dataItem.index;
      var tensionX = this.tension + (1 - this.tension) * _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.sin(startAngle);
      var tensionY = this.tension + (1 - this.tension) * _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.cos(startAngle);
      this.middleLine.tensionX = tensionX;
      this.middleLine.tensionY = tensionY;

      if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_5__.isNumber(w) && _core_utils_Type__WEBPACK_IMPORTED_MODULE_5__.isNumber(x0) && _core_utils_Type__WEBPACK_IMPORTED_MODULE_5__.isNumber(x1) && _core_utils_Type__WEBPACK_IMPORTED_MODULE_5__.isNumber(y0) && _core_utils_Type__WEBPACK_IMPORTED_MODULE_5__.isNumber(y1)) {
        // solves issues with gradient fill of straight lines
        if (_core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.round(xt0, 3) == _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.round(xt1, 3)) {
          xt1 += 0.01;
        }

        if (_core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.round(yt0, 3) == _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.round(yt1, 3)) {
          yt1 += 0.01;
        }

        if (_core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.round(xb0, 3) == _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.round(xb1, 3)) {
          xb1 += 0.01;
        }

        if (_core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.round(yb0, 3) == _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.round(yb1, 3)) {
          yb1 += 0.01;
        }

        var minX = Math.min(xb0, xb1, xt0, xt1);
        var minY = Math.min(yb0, yb1, yt0, yt1);
        var maxX = Math.max(xb0, xb1, xt0, xt1);
        var maxY = Math.max(yb0, yb1, yt0, yt1);
        this._bbox = {
          x: minX,
          y: minY,
          width: maxX - minX,
          height: maxY - minY
        };
        var cpd = this.controlPointDistance;
        var kxt0 = xt0 + (xt1 - xt0) * cpd * _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.cos(startAngle);
        var kyt0 = yt0 + (yt1 - yt0) * cpd * _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.sin(startAngle);
        var kxt1 = xt1 - (xt1 - xt0) * cpd * _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.cos(endAngle);
        var kyt1 = yt1 - (yt1 - yt0) * cpd * _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.sin(endAngle);
        var kxm0 = xm0 + (xm1 - xm0) * cpd * _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.cos(startAngle);
        var kym0 = ym0 + (ym1 - ym0) * cpd * _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.sin(startAngle);
        var kxm1 = xm1 - (xm1 - xm0) * cpd * _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.cos(endAngle);
        var kym1 = ym1 - (ym1 - ym0) * cpd * _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.sin(endAngle);
        var angle = _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.getAngle({
          x: kxt0,
          y: kyt0
        }, {
          x: kxt1,
          y: kyt1
        });
        var dx = (w / _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.cos(angle) - w) / _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.tan(angle) * _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.cos(startAngle);
        var dy = (w / _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.sin(angle) - w) * _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.tan(angle) * _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.sin(startAngle);
        var kxb0 = -dx / 2 + xb0 + (xb1 - xb0) * cpd * _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.cos(startAngle);
        var kyb0 = -dy / 2 + yb0 + (yb1 - yb0) * cpd * _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.sin(startAngle);
        var kxb1 = -dx / 2 + xb1 - (xb1 - xb0) * cpd * _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.cos(endAngle);
        var kyb1 = -dy / 2 + yb1 - (yb1 - yb0) * cpd * _core_utils_Math__WEBPACK_IMPORTED_MODULE_4__.sin(endAngle);

        if (ym1 == ym0) {
          ym1 += 0.01;
        }

        this.middleLine.segments = [[{
          x: xm0,
          y: ym0
        }, {
          x: kxm0,
          y: kym0
        }, {
          x: kxm1,
          y: kym1
        }, {
          x: xm1,
          y: ym1
        }]];
        kxt0 += dx / 2;
        kyt0 += dy / 2;
        kxt1 += dx / 2;
        kyt1 += dy / 2;
        path += _core_rendering_Path__WEBPACK_IMPORTED_MODULE_7__.moveTo({
          x: xt0,
          y: yt0
        });
        path += new _core_rendering_Smoothing__WEBPACK_IMPORTED_MODULE_6__.Tension(tensionX, tensionY).smooth([{
          x: xt0,
          y: yt0
        }, {
          x: kxt0,
          y: kyt0
        }, {
          x: kxt1,
          y: kyt1
        }, {
          x: xt1,
          y: yt1
        }]);
        path += _core_rendering_Path__WEBPACK_IMPORTED_MODULE_7__.lineTo({
          x: xb1,
          y: yb1
        });
        path += new _core_rendering_Smoothing__WEBPACK_IMPORTED_MODULE_6__.Tension(tensionX, tensionY).smooth([{
          x: xb1,
          y: yb1
        }, {
          x: kxb1,
          y: kyb1
        }, {
          x: kxb0,
          y: kyb0
        }, {
          x: xb0,
          y: yb0
        }]);
        path += _core_rendering_Path__WEBPACK_IMPORTED_MODULE_7__.closePath();
      }

      this.link.path = path;

      if (this.maskBullets) {
        this.bulletsMask.path = path;
        this.bulletsContainer.mask = this.bulletsMask;
      }

      this.positionBullets();
    }
  };

  Object.defineProperty(SankeyLink.prototype, "startX", {
    /**
     * @return Start X
     */
    get: function get() {
      return this.getPropertyValue("startX");
    },

    /**
     * [startX description]
     *
     * @todo Description
     * @param value  Start X
     */
    set: function set(value) {
      this.setPropertyValue("startX", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(SankeyLink.prototype, "endX", {
    /**
     * @return End X
     */
    get: function get() {
      return this.getPropertyValue("endX");
    },

    /**
     * [endX description]
     *
     * @todo Description
     * @param value  End X
     */
    set: function set(value) {
      this.setPropertyValue("endX", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(SankeyLink.prototype, "startY", {
    /**
     * @return Start Y
     */
    get: function get() {
      return this.getPropertyValue("startY");
    },

    /**
     * [startY description]
     *
     * @todo Description
     * @param value  Start Y
     */
    set: function set(value) {
      this.setPropertyValue("startY", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(SankeyLink.prototype, "endY", {
    /**
     * @return End Y
     */
    get: function get() {
      return this.getPropertyValue("endY");
    },

    /**
     * [endY description]
     *
     * @todo Description
     * @param value End Y
     */
    set: function set(value) {
      this.setPropertyValue("endY", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(SankeyLink.prototype, "linkWidth", {
    /**
     * @return [description]
     */
    get: function get() {
      return this.getPropertyValue("linkWidth");
    },

    /**
     * [linkWidth description]
     *
     * @todo Description
     * @param value [description]
     */
    set: function set(value) {
      this.setPropertyValue("linkWidth", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(SankeyLink.prototype, "controlPointDistance", {
    /**
     * @return relative control point distance
     */
    get: function get() {
      return this.getPropertyValue("controlPointDistance");
    },

    /**
     * Distance of control point of a link, defines relative distance from a node at which linke should bend
     * @default 0.2
     * @param value
     */
    set: function set(value) {
      this.setPropertyValue("controlPointDistance", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(SankeyLink.prototype, "tension", {
    /**
     * @return tension value
     */
    get: function get() {
      return this.getPropertyValue("tension");
    },

    /**
     * Tension of a spline, 1 would make the link to have sharp edges
     * @default 0.8
     * @param value
     */
    set: function set(value) {
      this.setPropertyValue("tension", value, true);
    },
    enumerable: true,
    configurable: true
  });
  return SankeyLink;
}(_FlowDiagramLink__WEBPACK_IMPORTED_MODULE_0__.FlowDiagramLink);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses.SankeyLink = SankeyLink;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/SankeyNode.js":
/*!**********************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/elements/SankeyNode.js ***!
  \**********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "SankeyNode": () => (/* binding */ SankeyNode)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _FlowDiagramNode__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./FlowDiagramNode */ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/FlowDiagramNode.js");
/* harmony import */ var _LabelBullet__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./LabelBullet */ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/LabelBullet.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/utils/InterfaceColorSet */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/InterfaceColorSet.js");
/* harmony import */ var _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../core/utils/Iterator */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Iterator.js");
/* harmony import */ var _core_utils_Type__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../core/utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/* harmony import */ var _core_utils_Utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../core/utils/Utils */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Utils.js");
/**
 * SankeyNode module
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */








/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Creates a node in a Sankey Diagram.
 *
 * A Sankey node is a block with a value, which represents its size on the
 * diagram.
 *
 * Nodes are connected via [[SankeyLink]] elements.
 *
 * @see {@link ISankeyNodeEvents} for a list of available events
 * @see {@link ISankeyNodeAdapters} for a list of available Adapters
 * @important
 */

var SankeyNode =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_7__.__extends)(SankeyNode, _super);
  /**
   * Constructor
   */


  function SankeyNode() {
    var _this = _super.call(this) || this;
    /**
     * [nextInCoord description]
     *
     * @ignore Exclude from docs
     * @todo Description
     */


    _this.nextInCoord = 0;
    /**
     * [nextOutCoord description]
     *
     * @ignore Exclude from docs
     * @todo Description
     */

    _this.nextOutCoord = 0;
    _this.className = "SankeyNode";
    _this.width = 10;
    _this.height = 10;

    var nameLabel = _this.createChild(_LabelBullet__WEBPACK_IMPORTED_MODULE_1__.LabelBullet);

    nameLabel.shouldClone = false; //@should we auto update these locations if position is changed?

    nameLabel.locationX = 1;
    nameLabel.locationY = 0.5;
    nameLabel.label.text = "{name}"; //nameLabel.label.textElement.hideOversized = false;

    nameLabel.width = 150;
    nameLabel.height = 150;
    nameLabel.label.horizontalCenter = "left";
    nameLabel.label.padding(0, 5, 0, 5);
    _this.nameLabel = nameLabel;

    var valueLabel = _this.createChild(_LabelBullet__WEBPACK_IMPORTED_MODULE_1__.LabelBullet);

    valueLabel.shouldClone = false;
    valueLabel.label.hideOversized = false;
    valueLabel.locationX = 0.5;
    valueLabel.locationY = 0.5;
    valueLabel.width = 150;
    valueLabel.height = 150; //valueLabel.label.text = "{value}";

    valueLabel.label.horizontalCenter = "middle";
    _this.valueLabel = valueLabel;
    var hiddenState = _this.hiddenState;
    hiddenState.properties.fill = new _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_3__.InterfaceColorSet().getFor("disabledBackground");
    hiddenState.properties.opacity = 0.5;
    hiddenState.properties.visible = true;

    _this.background.hiddenState.copyFrom(hiddenState);

    return _this;
  }
  /**
   * Invalidates all links, attached to this node.
   *
   * @ignore Exclude from docs
   */


  SankeyNode.prototype.invalidateLinks = function () {
    var _this = this;

    _super.prototype.invalidateLinks.call(this);

    this.nextInCoord = 0;
    this.nextOutCoord = 0;
    var chart = this.chart;

    if (chart) {
      var orientation_1 = chart.orientation;

      if (this._incomingSorted) {
        _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_4__.each(this._incomingSorted, function (dataItem) {
          var link = dataItem.link;
          var value = dataItem.getWorkingValue("value");

          if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_5__.isNumber(value)) {
            link.parent = _this.chart.linksContainer;
            var x = void 0;
            var y = void 0;
            var angle = void 0;

            if (orientation_1 == "horizontal") {
              x = _this.pixelX + _this.dx;
              y = _this.nextInCoord + _this.pixelY + _this.dy;
              angle = 0;
            } else {
              y = _this.pixelY + _this.dy;
              x = _this.nextInCoord + _this.pixelX + _this.dx;
              angle = 90;
            }

            link.endX = x;
            link.endY = y;
            link.startAngle = angle;
            link.endAngle = angle;
            link.gradient.rotation = angle;
            link.linkWidth = value * chart.valueHeight;

            if (!dataItem.fromNode) {
              if (orientation_1 == "horizontal") {
                link.maxWidth = 200;
                link.startX = _this.pixelX + _this.dx - link.maxWidth;
                link.startY = link.endY;
              } else {
                link.maxHeight = 200;
                link.startX = link.endX;
                link.startY = _this.pixelY + _this.dy - link.maxHeight;
              } // TODO is this needed ?


              _core_utils_Utils__WEBPACK_IMPORTED_MODULE_6__.used(link.gradient);
              link.fill = dataItem.toNode.color;
              var stop_1 = link.gradient.stops.getIndex(0);

              if (stop_1) {
                if (link.colorMode == "gradient") {
                  stop_1.color = _this.color;
                }

                stop_1.opacity = 0;
                link.fill = link.gradient;
                link.stroke = link.gradient;
                link.gradient.validate();
              }
            } //link.validate();


            _this.nextInCoord += link.linkWidth;
          }
        });
      }

      if (this._outgoingSorted) {
        _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_4__.each(this._outgoingSorted, function (dataItem) {
          var link = dataItem.link;
          link.parent = _this.chart.linksContainer;
          var value = dataItem.getWorkingValue("value");

          if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_5__.isNumber(value)) {
            var x = void 0;
            var y = void 0;
            var angle = void 0;

            if (orientation_1 == "horizontal") {
              angle = 0;
              x = _this.pixelX + _this.pixelWidth + _this.dx - 1;
              y = _this.nextOutCoord + _this.pixelY + _this.dy;
            } else {
              angle = 90;
              x = _this.nextOutCoord + _this.pixelX + _this.dx;
              y = _this.pixelY + _this.pixelHeight + _this.dy - 1;
            }

            link.startX = x;
            link.startY = y;
            link.startAngle = angle;
            link.endAngle = angle;
            link.gradient.rotation = angle;
            link.linkWidth = value * _this.chart.valueHeight;

            if (!dataItem.toNode) {
              if (orientation_1 == "horizontal") {
                link.maxWidth = 200;
                link.endX = _this.pixelX + link.maxWidth + _this.dx;
                link.endY = link.startY;
              } else {
                link.maxHeight = 200;
                link.endX = link.startX;
                link.endY = _this.pixelY + link.maxHeight + _this.dy;
              }

              link.opacity = _this.opacity;
              var stop_2 = link.gradient.stops.getIndex(1);

              if (stop_2) {
                if (link.colorMode == "gradient") {
                  stop_2.color = _this.color;
                }

                stop_2.opacity = 0;
                link.fill = link.gradient;
                link.stroke = link.gradient;
                link.gradient.validate();
              }
            } //link.validate();


            _this.nextOutCoord += link.linkWidth;
          }
        });
      }
    }

    this.positionBullet(this.nameLabel);
    this.positionBullet(this.valueLabel);
  };
  /**
   * Positions the bullet so it is centered within the node element.
   *
   * @param bullet  Target bullet
   */


  SankeyNode.prototype.positionBullet = function (bullet) {
    if (bullet) {
      bullet.x = this.measuredWidth * bullet.locationX;
      bullet.y = this.measuredHeight * bullet.locationY;
    }
  };

  Object.defineProperty(SankeyNode.prototype, "level", {
    /**
     * @return Level
     */
    get: function get() {
      return this.getPropertyValue("level");
    },

    /**
     * A level node is displayed at. (0 - ...)
     *
     * Levels are measured from left to right.
     *
     * The nodes in the left-most column will have `level = 0`.
     *
     * Nodes in second column - `level = 1`, etc.
     *
     * @param value  Level
     */
    set: function set(value) {
      this.setPropertyValue("level", value, true);
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Copies properties and labels from another [[SankeyNode]].
   *
   * @param source  Source node
   */

  SankeyNode.prototype.copyFrom = function (source) {
    _super.prototype.copyFrom.call(this, source);

    this.nameLabel.copyFrom(source.nameLabel);
    this.valueLabel.copyFrom(source.valueLabel);
  };

  return SankeyNode;
}(_FlowDiagramNode__WEBPACK_IMPORTED_MODULE_0__.FlowDiagramNode);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_2__.registry.registeredClasses.SankeyNode = SankeyNode;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/Tick.js":
/*!****************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/elements/Tick.js ***!
  \****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Tick": () => (/* binding */ Tick)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _core_Sprite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../core/Sprite */ "./node_modules/@amcharts/amcharts4/.internal/core/Sprite.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/utils/InterfaceColorSet */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/InterfaceColorSet.js");
/**
 * Tick module
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */




/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * A basic Tick class.
 *
 * A tick is a short dash, mainly connecting an object like axis or slice to
 * it's textual label.
 *
 * @see {@link ITickEvents} for a list of available events
 * @see {@link ITickAdapters} for a list of available Adapters
 * @important
 */

var Tick =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__extends)(Tick, _super);
  /**
   * Constructor
   */


  function Tick() {
    var _this = _super.call(this) || this;

    _this.className = "Tick";
    var interfaceColors = new _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_2__.InterfaceColorSet();
    _this.fillOpacity = 0;
    _this.length = 6;
    _this.strokeOpacity = 0.2;
    _this.stroke = interfaceColors.getFor("grid");
    _this.isMeasured = false;
    _this.nonScalingStroke = true;

    _this.applyTheme();

    return _this;
  }

  Object.defineProperty(Tick.prototype, "length", {
    /**
     * @return Length (px)
     */
    get: function get() {
      if (this.disabled) {
        return 0;
      }

      return this.getPropertyValue("length");
    },

    /**
     * Length of the tick in pixels.
     *
     * @param value  Length (px)
     */
    set: function set(value) {
      this.setPropertyValue("length", value, true);
    },
    enumerable: true,
    configurable: true
  });
  return Tick;
}(_core_Sprite__WEBPACK_IMPORTED_MODULE_0__.Sprite);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses.Tick = Tick;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/XYChartScrollbar.js":
/*!****************************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/elements/XYChartScrollbar.js ***!
  \****************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "XYChartScrollbar": () => (/* binding */ XYChartScrollbar)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _core_elements_Scrollbar__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../core/elements/Scrollbar */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Scrollbar.js");
/* harmony import */ var _core_Sprite__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/Sprite */ "./node_modules/@amcharts/amcharts4/.internal/core/Sprite.js");
/* harmony import */ var _core_utils_List__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/utils/List */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/List.js");
/* harmony import */ var _core_utils_Disposer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/utils/Disposer */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Disposer.js");
/* harmony import */ var _types_XYChart__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../types/XYChart */ "./node_modules/@amcharts/amcharts4/.internal/charts/types/XYChart.js");
/* harmony import */ var _axes_ValueAxis__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../axes/ValueAxis */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/ValueAxis.js");
/* harmony import */ var _axes_DateAxis__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../axes/DateAxis */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/DateAxis.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../core/utils/InterfaceColorSet */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/InterfaceColorSet.js");
/* harmony import */ var _core_rendering_filters_DesaturateFilter__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../core/rendering/filters/DesaturateFilter */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/filters/DesaturateFilter.js");
/* harmony import */ var _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../core/utils/Iterator */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Iterator.js");
/* harmony import */ var _core_utils_Type__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../core/utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/* harmony import */ var _core_rendering_Path__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../core/rendering/Path */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Path.js");
/* harmony import */ var _core_utils_Utils__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../core/utils/Utils */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Utils.js");
/* harmony import */ var _core_utils_Percent__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../core/utils/Percent */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Percent.js");
/* harmony import */ var _core_utils_Color__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../core/utils/Color */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Color.js");
/* harmony import */ var _core_Options__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../core/Options */ "./node_modules/@amcharts/amcharts4/.internal/core/Options.js");
/**
 * A module with functionality for buildin a scrollbar with an XY graph in it.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */


















/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * A special version of the Scrollbar that has an XY chart in it.
 *
 * Used mainly as an advanced scrollbar with a preview for other XY charts.
 *
 * However, can be used as standalone element.
 *
 * @see {@link IXYChartScrollbarEvents} for a list of available events
 * @see {@link IXYChartScrollbarAdapters} for a list of available Adapters
 * @important
 */

var XYChartScrollbar =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_17__.__extends)(XYChartScrollbar, _super);
  /**
   * Constructor
   */


  function XYChartScrollbar() {
    var _this = _super.call(this) || this;
    /**
     * A chart element Scrollbar is for.
     */


    _this._chart = new _core_utils_Disposer__WEBPACK_IMPORTED_MODULE_3__.MutableValueDisposer();
    _this.className = "XYChartScrollbar";
    var interfaceColors = new _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_8__.InterfaceColorSet();

    _this.padding(0, 0, 0, 0);

    var scrollbarChart = _this.createChild(_types_XYChart__WEBPACK_IMPORTED_MODULE_4__.XYChart);

    scrollbarChart.shouldClone = false;
    scrollbarChart.margin(0, 0, 0, 0);
    scrollbarChart.padding(0, 0, 0, 0);
    scrollbarChart.interactionsEnabled = false;
    _this._scrollbarChart = scrollbarChart;

    if (!_core_utils_Utils__WEBPACK_IMPORTED_MODULE_13__.isIE()) {
      var filter = new _core_rendering_filters_DesaturateFilter__WEBPACK_IMPORTED_MODULE_9__.DesaturateFilter();
      filter.filterUnits = "userSpaceOnUse";
      scrollbarChart.plotContainer.filters.push(filter);
    }

    _this._disposers.push(_this._scrollbarChart);

    _this.minHeight = 60;
    _this.minWidth = 60;

    var unselectedOverlay = _this.createChild(_core_Sprite__WEBPACK_IMPORTED_MODULE_1__.Sprite);

    unselectedOverlay.shouldClone = false;
    unselectedOverlay.setElement(_this.paper.add("path"));
    unselectedOverlay.fill = interfaceColors.getFor("background");
    unselectedOverlay.fillOpacity = 0.8;
    unselectedOverlay.interactionsEnabled = false;
    unselectedOverlay.isMeasured = false;
    unselectedOverlay.toBack();
    _this._unselectedOverlay = unselectedOverlay;

    _this._disposers.push(_this._unselectedOverlay);

    scrollbarChart.toBack();

    _this.background.cornerRadius(0, 0, 0, 0);

    var thumbBackground = _this.thumb.background;
    thumbBackground.cornerRadius(0, 0, 0, 0);
    thumbBackground.fillOpacity = 0;
    thumbBackground.fill = interfaceColors.getFor("background");
    var hoverState = thumbBackground.states.getKey("hover");

    if (hoverState) {
      hoverState.properties.fillOpacity = 0.2;
    }

    var downState = thumbBackground.states.getKey("down");

    if (downState) {
      downState.properties.fillOpacity = 0.4;
    }

    _this._disposers.push(_this._chart);

    _this.applyTheme();

    return _this;
  }

  Object.defineProperty(XYChartScrollbar.prototype, "series", {
    /**
     * A list of series that are used to draw graph(s) on the scrollbar.
     *
     * @readonly
     * @return Series
     */
    get: function get() {
      if (!this._series) {
        this._series = new _core_utils_List__WEBPACK_IMPORTED_MODULE_2__.List();

        this._disposers.push(this._series.events.on("inserted", this.handleSeriesAdded, this, false));

        this._disposers.push(this._series.events.on("removed", this.handleSeriesRemoved, this, false));
      }

      return this._series;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Decorates a new series when they are pushed into a `series` list.
   *
   * @param event Event
   */

  XYChartScrollbar.prototype.handleSeriesAdded = function (event) {
    var _this = this;

    var sourceSeries = event.newValue;

    if (!sourceSeries.xAxis || !sourceSeries.yAxis) {
      return;
    }

    var scrollbarChart = this.scrollbarChart;
    scrollbarChart.zoomOutButton.disabled = true;
    this.chart = sourceSeries.chart;
    scrollbarChart.dateFormatter.inputDateFormat = this.chart.dateFormatter.inputDateFormat; // Ensure that scrollbar chart shares the same locale as parent chart

    scrollbarChart.language.locale = this.chart.language.locale;
    var addXAxis = true;
    var addYAxis = true; // check if we haven't added clone of x or y axis before

    _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_10__.each(this.series.iterator(), function (series) {
      if (series != sourceSeries) {
        if (series.xAxis == sourceSeries.xAxis && _this.scrollbarChart.xAxes.length > 0) {
          addXAxis = false;
        }

        if (series.yAxis == sourceSeries.yAxis && _this.scrollbarChart.yAxes.length > 0) {
          addYAxis = false;
        }
      }
    });
    sourceSeries.events.on("beforedisposed", function () {
      _this.series.removeValue(sourceSeries);
    });
    var interfaceColors = new _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_8__.InterfaceColorSet();
    var series = sourceSeries.clone();

    if (_core_Options__WEBPACK_IMPORTED_MODULE_16__.options.onlyShowOnViewport || _core_Options__WEBPACK_IMPORTED_MODULE_16__.options.queue) {
      this.addDisposer(this.chart.events.on("removedfromqueue", function () {
        scrollbarChart.invalidateData();
      }));
    }

    if (_core_utils_Utils__WEBPACK_IMPORTED_MODULE_13__.isIE()) {
      series.stroke = (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_15__.color)("#aaaaaa");
      series.fill = series.stroke;
      series.propertyFields.fill = undefined;
      series.propertyFields.stroke = undefined;
    }

    sourceSeries.scrollbarSeries = series;

    if (addXAxis) {
      var xAxis = sourceSeries.xAxis.clone();
      scrollbarChart.xAxes.moveValue(xAxis);
      xAxis.title.disabled = true;
      xAxis.rangeChangeDuration = 0; //xAxis.id = sourceSeries.uid;

      var renderer = xAxis.renderer;
      renderer.ticks.template.disabled = true;
      renderer.inside = true;
      renderer.labels.template.inside = true;
      renderer.line.strokeOpacity = 0;
      renderer.minLabelPosition = 0.02;
      renderer.maxLabelPosition = 0.98;
      renderer.line.disabled = true;
      renderer.axisFills.template.disabled = true;
      renderer.baseGrid.disabled = true;
      renderer.grid.template.strokeOpacity = 0.05;
      renderer.minWidth = undefined;
      renderer.minHeight = undefined;
      renderer.padding(0, 0, 0, 0);
      renderer.chart = scrollbarChart;
      renderer.margin(0, 0, 0, 0);
      xAxis.width = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_14__.percent)(100);
      var labelsTemplate = renderer.labels.template;
      labelsTemplate.fillOpacity = 0.5;
      xAxis.maxZoomCount = undefined;
      xAxis.minZoomCount = undefined;

      if (xAxis instanceof _axes_DateAxis__WEBPACK_IMPORTED_MODULE_6__.DateAxis) {
        var vAxis_1 = xAxis;
        var sourceAxis = sourceSeries.xAxis;
        vAxis_1.groupCount = sourceAxis.groupCount * 5;
        vAxis_1.min = undefined;
        vAxis_1.max = undefined;

        this._disposers.push(vAxis_1.clonedFrom.events.on("extremeschanged", function () {
          if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_11__.isNumber(vAxis_1.clonedFrom.minDefined)) {
            vAxis_1.min = vAxis_1.clonedFrom.minDefined;
          }

          if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_11__.isNumber(vAxis_1.clonedFrom.maxDefined)) {
            vAxis_1.max = vAxis_1.clonedFrom.maxDefined;
          }
        }, undefined, false));
      } else if (xAxis instanceof _axes_ValueAxis__WEBPACK_IMPORTED_MODULE_5__.ValueAxis) {
        var vAxis_2 = xAxis;
        vAxis_2.min = undefined;
        vAxis_2.max = undefined;

        if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_11__.isNumber(vAxis_2.clonedFrom.minDefined)) {
          vAxis_2.min = undefined;
        }

        if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_11__.isNumber(vAxis_2.clonedFrom.maxDefined)) {
          vAxis_2.max = undefined;
        }

        this._disposers.push(vAxis_2.clonedFrom.events.on("extremeschanged", function () {
          if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_11__.isNumber(vAxis_2.clonedFrom.minDefined)) {
            vAxis_2.min = vAxis_2.clonedFrom.min;
          }

          if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_11__.isNumber(vAxis_2.clonedFrom.maxDefined)) {
            vAxis_2.max = vAxis_2.clonedFrom.max;
          }
        }, undefined, false));
      }

      series.xAxis = xAxis;
    } else {
      this.scrollbarChart.xAxes.each(function (xAxis) {
        if (xAxis.clonedFrom == sourceSeries.xAxis) {
          series.xAxis = xAxis;
        }
      });
    }

    if (addYAxis) {
      var yAxis = sourceSeries.yAxis.clone();
      scrollbarChart.yAxes.moveValue(yAxis);
      yAxis.title.disabled = true;
      yAxis.rangeChangeDuration = 0;
      var renderer = yAxis.renderer;
      renderer.ticks.template.disabled = true;
      renderer.inside = true;
      renderer.labels.template.inside = true;
      renderer.line.strokeOpacity = 0;
      renderer.minLabelPosition = 0.02;
      renderer.maxLabelPosition = 0.98;
      renderer.line.disabled = true;
      renderer.axisFills.template.disabled = true;
      renderer.grid.template.stroke = interfaceColors.getFor("background");
      renderer.baseGrid.disabled = true;
      renderer.grid.template.strokeOpacity = 0.05;
      renderer.minWidth = undefined;
      renderer.minHeight = undefined;
      renderer.chart = scrollbarChart;
      renderer.padding(0, 0, 0, 0);
      renderer.margin(0, 0, 0, 0);
      yAxis.height = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_14__.percent)(100);
      var labelsTemplate = renderer.labels.template;
      labelsTemplate.fillOpacity = 0.5;
      series.yAxis = yAxis;
      yAxis.maxZoomCount = undefined;
      yAxis.minZoomCount = undefined;

      if (yAxis instanceof _axes_DateAxis__WEBPACK_IMPORTED_MODULE_6__.DateAxis) {
        var vAxis_3 = yAxis;
        vAxis_3.min = undefined;
        vAxis_3.max = undefined;
        var sourceAxis = sourceSeries.yAxis;
        yAxis.groupCount = sourceAxis.groupCount * 5;

        this._disposers.push(vAxis_3.clonedFrom.events.on("extremeschanged", function () {
          if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_11__.isNumber(vAxis_3.clonedFrom.minDefined)) {
            vAxis_3.min = vAxis_3.clonedFrom.minDefined;
          }

          if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_11__.isNumber(vAxis_3.clonedFrom.maxDefined)) {
            vAxis_3.max = vAxis_3.clonedFrom.maxDefined;
          }
        }));
      } else if (yAxis instanceof _axes_ValueAxis__WEBPACK_IMPORTED_MODULE_5__.ValueAxis) {
        var vAxis_4 = yAxis;
        vAxis_4.min = undefined;
        vAxis_4.max = undefined;

        if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_11__.isNumber(vAxis_4.clonedFrom.minDefined)) {
          vAxis_4.min = undefined;
        }

        if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_11__.isNumber(vAxis_4.clonedFrom.maxDefined)) {
          vAxis_4.max = undefined;
        }

        this._disposers.push(vAxis_4.clonedFrom.events.on("extremeschanged", function () {
          if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_11__.isNumber(vAxis_4.clonedFrom.minDefined)) {
            vAxis_4.min = vAxis_4.clonedFrom.minDefined;
          }

          if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_11__.isNumber(vAxis_4.clonedFrom.maxDefined)) {
            vAxis_4.max = vAxis_4.clonedFrom.maxDefined;
          }
        }));
      }
    } else {
      this.scrollbarChart.yAxes.each(function (yAxis) {
        if (yAxis.clonedFrom == sourceSeries.yAxis) {
          series.yAxis = yAxis;
        }
      });
    }

    series.rangeChangeDuration = 0;
    series.interpolationDuration = 0;
    series.defaultState.transitionDuration = 0;
    series.showOnInit = false;

    this._disposers.push(series.events.on("validated", this.zoomOutAxes, this, false)); // data might be set drectly on series


    this._disposers.push(sourceSeries.events.on("datavalidated", function () {
      if (series.data != sourceSeries.data) {
        // data setter doesn't check this
        series.data = sourceSeries.data;
      }
    }, undefined, false));

    series.defaultState.properties.visible = true;
    scrollbarChart.series.push(series);
    this.updateByOrientation();
  };
  /**
   * @ignore
   */


  XYChartScrollbar.prototype.updateByOrientation = function () {
    var _this = this;

    if (this._scrollbarChart) {
      _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_10__.each(this._scrollbarChart.xAxes.iterator(), function (xAxis) {
        var renderer = xAxis.renderer;

        if (_this.orientation == "vertical") {
          renderer.grid.template.disabled = true;
          renderer.labels.template.disabled = true;
          renderer.minGridDistance = 10;
        } else {
          renderer.grid.template.disabled = false;
          renderer.labels.template.disabled = false;
          renderer.minGridDistance = xAxis.clonedFrom.renderer.minGridDistance;
        }
      });
      _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_10__.each(this._scrollbarChart.yAxes.iterator(), function (yAxis) {
        var renderer = yAxis.renderer;

        if (_this.orientation == "horizontal") {
          renderer.grid.template.disabled = true;
          renderer.labels.template.disabled = true;
          renderer.minGridDistance = 10;
        } else {
          renderer.grid.template.disabled = false;
          renderer.labels.template.disabled = false;
          renderer.minGridDistance = yAxis.clonedFrom.renderer.minGridDistance;
        }
      });
    }
  };
  /**
   * Cleans up after series are removed from Scrollbar.
   *
   * @param event  Event
   */


  XYChartScrollbar.prototype.handleSeriesRemoved = function (event) {
    var sourceSeries = event.oldValue;
    var scrollbarChart = this.scrollbarChart;
    scrollbarChart.series.each(function (series) {
      if (series && series.clonedFrom == sourceSeries) {
        scrollbarChart.series.removeValue(series);
      }
    });

    if (scrollbarChart.series.length == 0) {
      scrollbarChart.xAxes.clear();
      scrollbarChart.yAxes.clear();
    }

    try {
      sourceSeries.events.off("validated", this.zoomOutAxes, this);
    } catch (err) {}
  };

  Object.defineProperty(XYChartScrollbar.prototype, "scrollbarChart", {
    /**
     * A chart element that is used to display graphs in the Scrollbar.
     *
     * This is not the same as `chart`. It's a totally independent instance of
     * [[XYChart]] with separate config, series, etc.
     *
     * It can be configured just like any other [[XYChart]].
     *
     * @readonly
     * @return Scrollbar's internal chart
     */
    get: function get() {
      return this._scrollbarChart;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(XYChartScrollbar.prototype, "chart", {
    /**
     * @return Chart
     */
    get: function get() {
      return this._chart.get();
    },

    /**
     * A chart that Scrollbar belongs to.
     *
     * @param chart  Chart
     */
    set: function set(chart) {
      if (this._chart.get() !== chart) {
        this._chart.set(chart, chart.events.on("datavalidated", this.handleDataChanged, this, false));

        this.handleDataChanged();
        this._scrollbarChart.dataProvider = chart; // this makes scrollbar chart do not validate data untill charts' data is validated
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(XYChartScrollbar.prototype, "unselectedOverlay", {
    /**
     * A [[Sprite]] object representing overlay that is used to dim area of the
     * scrollbar that is currently not selected.
     *
     * Use its `fillOpacity` to set opacity of the fill, with `0` (zero)
     * completely disabling the dimming, and `1` making unselected area completely
     * blank.
     *
     * @since 4.6.1
     * @readonly
     * @return Unselected area curtain element
     */
    get: function get() {
      return this._unselectedOverlay;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Updates Scrollbar's internal chart's data when the main chart's data
   * changes.
   *
   * @ignore Exclude from docs
   */

  XYChartScrollbar.prototype.handleDataChanged = function () {
    if (this.chart.data != this.scrollbarChart.data) {
      this.scrollbarChart.data = this.chart.data;
    } else {
      // add data is handled in XYChart
      // invalidating all data caused the problem: https://github.com/amcharts/amcharts4/issues/2096
      this.scrollbarChart.invalidateRawData();
    }
  };
  /**
   * Zooms out all axes on the internal chart.
   */


  XYChartScrollbar.prototype.zoomOutAxes = function () {
    var scrollbarChart = this.scrollbarChart;
    _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_10__.each(scrollbarChart.xAxes.iterator(), function (x) {
      x.zoom({
        start: 0,
        end: 1
      }, true, true);
    });
    _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_10__.each(scrollbarChart.yAxes.iterator(), function (y) {
      y.zoom({
        start: 0,
        end: 1
      }, true, true);
    });
  };
  /**
   * Updates scrollbar thumb.
   *
   * @ignore
   */


  XYChartScrollbar.prototype.updateThumb = function (dispatchEvents) {
    if (dispatchEvents === void 0) {
      dispatchEvents = true;
    }

    _super.prototype.updateThumb.call(this, dispatchEvents);

    if (this._unselectedOverlay) {
      var thumb = this.thumb;
      var x = thumb.pixelX || 0;
      var y = thumb.pixelY || 0;
      var w = thumb.pixelWidth || 0;
      var h = thumb.pixelHeight || 0;
      var path = "";

      if (this.orientation == "horizontal") {
        path = _core_rendering_Path__WEBPACK_IMPORTED_MODULE_12__.rectToPath({
          x: -1,
          y: 0,
          width: x,
          height: h
        });
        path += _core_rendering_Path__WEBPACK_IMPORTED_MODULE_12__.rectToPath({
          x: x + w,
          y: 0,
          width: (this.pixelWidth || 0) - x - w,
          height: h
        });
      } else {
        path = _core_rendering_Path__WEBPACK_IMPORTED_MODULE_12__.rectToPath({
          x: 0,
          y: 0,
          width: w,
          height: y
        });
        path += _core_rendering_Path__WEBPACK_IMPORTED_MODULE_12__.rectToPath({
          x: 0,
          y: y + h,
          width: w,
          height: (this.pixelHeight || 0) - y - h
        });
      }

      this._unselectedOverlay.path = path;
    }
  };
  /**
   * Processes JSON-based config before it is applied to the object.
   *
   * @ignore Exclude from docs
   * @param config  Config
   */


  XYChartScrollbar.prototype.processConfig = function (config) {
    if (config) {
      if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_11__.hasValue(config.series) && _core_utils_Type__WEBPACK_IMPORTED_MODULE_11__.isArray(config.series)) {
        for (var i = 0, len = config.series.length; i < len; i++) {
          var series = config.series[i];

          if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_11__.hasValue(series) && _core_utils_Type__WEBPACK_IMPORTED_MODULE_11__.isString(series)) {
            if (this.map.hasKey(series)) {
              config.series[i] = this.map.getKey(series);
            } else {
              throw Error("XYChartScrollbar error: Series with id `" + series + "` does not exist.");
            }
          }
        }
      }
    }

    _super.prototype.processConfig.call(this, config);
  };

  return XYChartScrollbar;
}(_core_elements_Scrollbar__WEBPACK_IMPORTED_MODULE_0__.Scrollbar);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_7__.registry.registeredClasses.XYChartScrollbar = XYChartScrollbar;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/series/CandlestickSeries.js":
/*!***************************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/series/CandlestickSeries.js ***!
  \***************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "CandlestickSeries": () => (/* binding */ CandlestickSeries),
/* harmony export */   "CandlestickSeriesDataItem": () => (/* binding */ CandlestickSeriesDataItem)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _ColumnSeries__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ColumnSeries */ "./node_modules/@amcharts/amcharts4/.internal/charts/series/ColumnSeries.js");
/* harmony import */ var _core_Sprite__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/Sprite */ "./node_modules/@amcharts/amcharts4/.internal/core/Sprite.js");
/* harmony import */ var _elements_Candlestick__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../elements/Candlestick */ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/Candlestick.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../core/utils/InterfaceColorSet */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/InterfaceColorSet.js");
/* harmony import */ var _core_utils_Utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../core/utils/Utils */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Utils.js");
/* harmony import */ var _core_utils_Object__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../core/utils/Object */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Object.js");
/* harmony import */ var _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../core/utils/Iterator */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Iterator.js");
/* harmony import */ var _core_utils_Type__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../core/utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/**
 * Candlestick Series module.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */










/**
 * ============================================================================
 * DATA ITEM
 * ============================================================================
 * @hidden
 */

/**
 * Defines a [[DataItem]] for [[CandlestickSeries]].
 *
 * @see {@link DataItem}
 */

var CandlestickSeriesDataItem =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_9__.__extends)(CandlestickSeriesDataItem, _super);
  /**
   * Defines a type of [[Component]] this data item is used for
   * @todo Disabled to work around TS bug (see if we can re-enable it again)
   */
  //public _component!: CandlestickSeries;

  /**
   * Constructor
   */


  function CandlestickSeriesDataItem() {
    var _this = _super.call(this) || this;

    _this.values.lowValueX = {};
    _this.values.lowValueY = {};
    _this.values.highValueX = {};
    _this.values.highValueY = {};
    _this.className = "CandlestickSeriesDataItem";

    _this.applyTheme();

    return _this;
  }

  Object.defineProperty(CandlestickSeriesDataItem.prototype, "lowValueX", {
    /**
     * @return Value
     */
    get: function get() {
      return this.values.lowValueX.value;
    },

    /**
     * Low value for horizontal axis.
     *
     * @param value  Value
     */
    set: function set(value) {
      this.setValue("lowValueX", value);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(CandlestickSeriesDataItem.prototype, "lowValueY", {
    /**
     * @return Value
     */
    get: function get() {
      return this.values.lowValueY.value;
    },

    /**
     * Low value for vertical axis.
     *
     * @param value  Value
     */
    set: function set(value) {
      this.setValue("lowValueY", value);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(CandlestickSeriesDataItem.prototype, "highValueX", {
    /**
     * @return Value
     */
    get: function get() {
      return this.values.highValueX.value;
    },

    /**
     * High value for horizontal axis.
     *
     * @param value  Value
     */
    set: function set(value) {
      this.setValue("highValueX", value);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(CandlestickSeriesDataItem.prototype, "highValueY", {
    /**
     * @return Value
     */
    get: function get() {
      return this.values.highValueY.value;
    },

    /**
     * High value for vertical axis.
     *
     * @param value  Value
     */
    set: function set(value) {
      this.setValue("highValueY", value);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(CandlestickSeriesDataItem.prototype, "closeValueX", {
    /**
     * @return Value
     */
    get: function get() {
      return this.values.valueX.value;
    },

    /**
     * Close value for horizontal axis.
     *
     * This is an alias for `valueX` added for convenience only.
     *
     * @param value  Value
     */
    set: function set(value) {
      this.setValue("valueX", value);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(CandlestickSeriesDataItem.prototype, "closeValueY", {
    /**
     * @return Value
     */
    get: function get() {
      return this.values.valueY.value;
    },

    /**
     * Close value for vertical axis.
     *
     * This is an alias for `valueX` added for convenience only.
     *
     * @param value  Value
     */
    set: function set(value) {
      this.setValue("valueY", value);
    },
    enumerable: true,
    configurable: true
  });
  return CandlestickSeriesDataItem;
}(_ColumnSeries__WEBPACK_IMPORTED_MODULE_0__.ColumnSeriesDataItem);


/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Defines [[Series]] for a candlestick graph.
 *
 * @see {@link ICandlestickSeriesEvents} for a list of available Events
 * @see {@link ICandlestickSeriesAdapters} for a list of available Adapters
 * @todo Example
 * @important
 */

var CandlestickSeries =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_9__.__extends)(CandlestickSeries, _super);
  /**
   * Constructor
   */


  function CandlestickSeries() {
    var _this = _super.call(this) || this;

    _this.className = "CandlestickSeries";
    _this.groupFields.lowValueX = "low";
    _this.groupFields.lowValueY = "low";
    _this.groupFields.highValueX = "high";
    _this.groupFields.highValueY = "high";
    _this.strokeOpacity = 1;
    var interfaceColors = new _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_4__.InterfaceColorSet();
    var positiveColor = interfaceColors.getFor("positive");
    var negativeColor = interfaceColors.getFor("negative");
    _this.dropFromOpenState.properties.fill = negativeColor;
    _this.dropFromOpenState.properties.stroke = negativeColor;
    _this.riseFromOpenState.properties.fill = positiveColor;
    _this.riseFromOpenState.properties.stroke = positiveColor;

    _this.applyTheme();

    return _this;
  }
  /**
   * Sets defaults that instantiate some objects that rely on parent, so they
   * cannot be set in constructor.
   */


  CandlestickSeries.prototype.applyInternalDefaults = function () {
    _super.prototype.applyInternalDefaults.call(this);

    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.hasValue(this.readerTitle)) {
      this.readerTitle = this.language.translate("Candlestick Series");
    }
  };
  /**
   * Returns a new/empty DataItem of the type appropriate for this object.
   *
   * @see {@link DataItem}
   * @return Data Item
   */


  CandlestickSeries.prototype.createDataItem = function () {
    return new CandlestickSeriesDataItem();
  };
  /**
   * Validates data item's element, effectively redrawing it.
   *
   * @ignore Exclude from docs
   * @param dataItem  Data item
   */


  CandlestickSeries.prototype.validateDataElementReal = function (dataItem) {
    _super.prototype.validateDataElementReal.call(this, dataItem);

    this.validateCandlestick(dataItem);
  };

  CandlestickSeries.prototype.validateCandlestick = function (dataItem) {
    var column = dataItem.column;

    if (column) {
      var lowLine_1 = column.lowLine;
      var highLine_1 = column.highLine;

      if (this.baseAxis == this.xAxis) {
        var x = column.pixelWidth / 2;
        lowLine_1.x = x;
        highLine_1.x = x;
        var open_1 = dataItem.getWorkingValue(this.yOpenField);
        var close_1 = dataItem.getWorkingValue(this.yField);
        var yOpen = this.yAxis.getY(dataItem, this.yOpenField);
        var yClose = this.yAxis.getY(dataItem, this.yField);
        var yLow = this.yAxis.getY(dataItem, this.yLowField);
        var yHigh = this.yAxis.getY(dataItem, this.yHighField);
        var pixelY = column.pixelY;
        lowLine_1.y1 = yLow - pixelY;
        highLine_1.y1 = yHigh - pixelY;

        if (open_1 < close_1) {
          lowLine_1.y2 = yOpen - pixelY;
          highLine_1.y2 = yClose - pixelY;
        } else {
          lowLine_1.y2 = yClose - pixelY;
          highLine_1.y2 = yOpen - pixelY;
        }
      }

      if (this.baseAxis == this.yAxis) {
        var y = column.pixelHeight / 2;
        lowLine_1.y = y;
        highLine_1.y = y;
        var open_2 = dataItem.getWorkingValue(this.xOpenField);
        var close_2 = dataItem.getWorkingValue(this.xField);
        var xOpen = this.xAxis.getX(dataItem, this.xOpenField);
        var xClose = this.xAxis.getX(dataItem, this.xField);
        var xLow = this.xAxis.getX(dataItem, this.xLowField);
        var xHigh = this.xAxis.getX(dataItem, this.xHighField);
        var pixelX = column.pixelX;
        lowLine_1.x1 = xLow - pixelX;
        highLine_1.x1 = xHigh - pixelX;

        if (open_2 < close_2) {
          lowLine_1.x2 = xOpen - pixelX;
          highLine_1.x2 = xClose - pixelX;
        } else {
          lowLine_1.x2 = xClose - pixelX;
          highLine_1.x2 = xOpen - pixelX;
        }
      }

      _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_7__.each(this.axisRanges.iterator(), function (axisRange) {
        // LOW LINE
        var rangeColumn = dataItem.rangesColumns.getKey(axisRange.uid);

        if (rangeColumn) {
          var rangeLowLine = rangeColumn.lowLine;
          rangeLowLine.x = lowLine_1.x;
          rangeLowLine.y = lowLine_1.y;
          rangeLowLine.x1 = lowLine_1.x1;
          rangeLowLine.x2 = lowLine_1.x2;
          rangeLowLine.y1 = lowLine_1.y1;
          rangeLowLine.y2 = lowLine_1.y2; // HIGH LINE

          var rangehighLine = rangeColumn.highLine;
          rangehighLine.x = highLine_1.x;
          rangehighLine.y = highLine_1.y;
          rangehighLine.x1 = highLine_1.x1;
          rangehighLine.x2 = highLine_1.x2;
          rangehighLine.y1 = highLine_1.y1;
          rangehighLine.y2 = highLine_1.y2;
        }
      });
    }
  };

  Object.defineProperty(CandlestickSeries.prototype, "xLowField", {
    /**
     * A data field to look for "low" value for horizontal axis.
     *
     * @ignore Exclude from docs
     * @return Field name
     */
    get: function get() {
      return this._xLowField;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(CandlestickSeries.prototype, "yLowField", {
    /**
     * A data field to look for "low" value for vertical axis.
     *
     * @ignore Exclude from docs
     * @return Field name
     */
    get: function get() {
      return this._yLowField;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(CandlestickSeries.prototype, "xHighField", {
    /**
     * A data field to look for "high" value for horizontal axis.
     *
     * @ignore Exclude from docs
     * @return Field name
     */
    get: function get() {
      return this._xHighField;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(CandlestickSeries.prototype, "yHighField", {
    /**
     * A data field to look for "high" value for vertical axis.
     *
     * @ignore Exclude from docs
     * @return Field name
     */
    get: function get() {
      return this._yHighField;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Sets up which data fields to use for data access.
   */

  CandlestickSeries.prototype.defineFields = function () {
    _super.prototype.defineFields.call(this);

    var xAxis = this.xAxis;
    var yAxis = this.yAxis;

    if (xAxis && yAxis) {
      if (this.baseAxis == xAxis) {
        var yAxisFieldName = _core_utils_Utils__WEBPACK_IMPORTED_MODULE_5__.capitalize(yAxis.axisFieldName);
        this._yLowField = "low" + yAxisFieldName + "Y";
        this._yHighField = "high" + yAxisFieldName + "Y";
      }

      if (this.baseAxis == yAxis) {
        var xAxisFieldName = _core_utils_Utils__WEBPACK_IMPORTED_MODULE_5__.capitalize(xAxis.axisFieldName);
        this._xLowField = "low" + xAxisFieldName + "X";
        this._xHighField = "high" + xAxisFieldName + "X";
      }

      this.addValueField(xAxis, this._xValueFields, this._xLowField);
      this.addValueField(xAxis, this._xValueFields, this._xHighField);
      this.addValueField(yAxis, this._yValueFields, this._yLowField);
      this.addValueField(yAxis, this._yValueFields, this._yHighField);
    }
  };
  /**
   * Creates elements in related legend container, that mimics the look of this
   * Series.
   *
   * @ignore Exclude from docs
   * @param marker  Legend item container
   */


  CandlestickSeries.prototype.createLegendMarker = function (marker) {
    var w = marker.pixelWidth;
    var h = marker.pixelHeight;
    marker.removeChildren();
    var column = marker.createChild(_elements_Candlestick__WEBPACK_IMPORTED_MODULE_2__.Candlestick);
    column.shouldClone = false;
    column.copyFrom(this.columns.template);
    var cw;
    var ch;
    var highLine = column.lowLine;
    var lowLine = column.highLine;

    if (this.baseAxis == this.yAxis) {
      cw = w / 3;
      ch = h;
      highLine.y = h / 2;
      lowLine.y = h / 2;
      highLine.x2 = w / 3;
      lowLine.x2 = w / 3;
      lowLine.x = w / 3 * 2;
      column.column.x = w / 3;
    } else {
      cw = w;
      ch = h / 3;
      highLine.x = w / 2;
      lowLine.x = w / 2;
      highLine.y2 = h / 3;
      lowLine.y2 = h / 3;
      lowLine.y = h / 3 * 2;
      column.column.y = h / 3;
    }

    column.width = cw;
    column.height = ch;
    _core_utils_Object__WEBPACK_IMPORTED_MODULE_6__.copyProperties(this, marker, _core_Sprite__WEBPACK_IMPORTED_MODULE_1__.visualProperties);
    _core_utils_Object__WEBPACK_IMPORTED_MODULE_6__.copyProperties(this.columns.template, column, _core_Sprite__WEBPACK_IMPORTED_MODULE_1__.visualProperties);
    column.stroke = this.riseFromOpenState.properties.stroke;
    column.fill = column.stroke;
    var legendDataItem = marker.dataItem;
    legendDataItem.color = column.fill;
    legendDataItem.colorOrig = column.fill;
  };
  /**
   * Returns an element to use for Candlestick
   * @ignore
   * @return Element.
   */


  CandlestickSeries.prototype.createColumnTemplate = function () {
    return new _elements_Candlestick__WEBPACK_IMPORTED_MODULE_2__.Candlestick();
  };

  return CandlestickSeries;
}(_ColumnSeries__WEBPACK_IMPORTED_MODULE_0__.ColumnSeries);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_3__.registry.registeredClasses.CandlestickSeries = CandlestickSeries;
_core_Registry__WEBPACK_IMPORTED_MODULE_3__.registry.registeredClasses.CandlestickSeriesDataItem = CandlestickSeriesDataItem;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/series/ColumnSeries.js":
/*!**********************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/series/ColumnSeries.js ***!
  \**********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "ColumnSeries": () => (/* binding */ ColumnSeries),
/* harmony export */   "ColumnSeriesDataItem": () => (/* binding */ ColumnSeriesDataItem)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _XYSeries__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./XYSeries */ "./node_modules/@amcharts/amcharts4/.internal/charts/series/XYSeries.js");
/* harmony import */ var _core_Sprite__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/Sprite */ "./node_modules/@amcharts/amcharts4/.internal/core/Sprite.js");
/* harmony import */ var _core_Container__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/Container */ "./node_modules/@amcharts/amcharts4/.internal/core/Container.js");
/* harmony import */ var _core_utils_List__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/utils/List */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/List.js");
/* harmony import */ var _core_utils_Dictionary__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../core/utils/Dictionary */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Dictionary.js");
/* harmony import */ var _axes_ValueAxis__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../axes/ValueAxis */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/ValueAxis.js");
/* harmony import */ var _axes_CategoryAxis__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../axes/CategoryAxis */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/CategoryAxis.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _elements_Column__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../elements/Column */ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/Column.js");
/* harmony import */ var _core_elements_RoundedRectangle__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../core/elements/RoundedRectangle */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/RoundedRectangle.js");
/* harmony import */ var _core_utils_Percent__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../core/utils/Percent */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Percent.js");
/* harmony import */ var _core_utils_Math__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../core/utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
/* harmony import */ var _core_utils_Object__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../core/utils/Object */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Object.js");
/* harmony import */ var _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../core/utils/Iterator */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Iterator.js");
/* harmony import */ var _core_utils_Array__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../core/utils/Array */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Array.js");
/* harmony import */ var _core_utils_Type__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../core/utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/* harmony import */ var _core_utils_Disposer__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../core/utils/Disposer */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Disposer.js");
/**
 * Column series module.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */


















/**
 * ============================================================================
 * DATA ITEM
 * ============================================================================
 * @hidden
 */

/**
 * Defines a [[DataItem]] for [[ColumnSeries]].
 *
 * @see {@link DataItem}
 */

var ColumnSeriesDataItem =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_17__.__extends)(ColumnSeriesDataItem, _super);
  /**
   * Constructor
   */


  function ColumnSeriesDataItem() {
    var _this = _super.call(this) || this;

    _this.className = "ColumnSeriesDataItem";
    _this.locations["dateX"] = 0.5;
    _this.locations["dateY"] = 0.5;
    _this.locations["categoryX"] = 0.5;
    _this.locations["categoryY"] = 0.5;

    _this.applyTheme();

    return _this;
  }

  Object.defineProperty(ColumnSeriesDataItem.prototype, "column", {
    /**
     * @return Column
     */
    get: function get() {
      return this._column;
    },

    /**
     * A column used to draw a column for this data item.
     *
     * @param column
     */
    set: function set(column) {
      this.setColumn(column);
    },
    enumerable: true,
    configurable: true
  });

  ColumnSeriesDataItem.prototype.setColumn = function (column) {
    var _this = this;

    if (this._column && column != this._column) {
      _core_utils_Array__WEBPACK_IMPORTED_MODULE_14__.remove(this.sprites, this._column);
    }

    this._column = column;

    if (column) {
      var prevDataItem = column.dataItem;

      if (prevDataItem && prevDataItem != this) {
        prevDataItem.column = undefined;
      }

      this.addSprite(column);

      this._disposers.push(new _core_utils_Disposer__WEBPACK_IMPORTED_MODULE_16__.Disposer(function () {
        // TODO investigate why component is undefined
        // https://codepen.io/team/amcharts/pen/dac4be245d658233a6d7e5597df2208b?editors=0010
        if (_this.component) {
          _this.component.columns.removeValue(column);
        }
      }));
    }
  };

  Object.defineProperty(ColumnSeriesDataItem.prototype, "width", {
    get: function get() {
      var width = this.properties.width;

      if (this._adapterO) {
        width = this._adapterO.apply("width", width);
      }

      return width;
    },
    set: function set(value) {
      if (this.properties.width != value) {
        this.properties.width = value;

        if (this.component) {
          this.component.validateDataElement(this);
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(ColumnSeriesDataItem.prototype, "height", {
    get: function get() {
      var height = this.properties.height;

      if (this._adapterO) {
        height = this._adapterO.apply("height", height);
      }

      return height;
    },
    set: function set(value) {
      if (this.properties.height != value) {
        this.properties.height = value;

        if (this.component) {
          this.component.validateDataElement(this);
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(ColumnSeriesDataItem.prototype, "rangesColumns", {
    /**
     * A dictionary storing axes ranges columns by axis uid
     */
    get: function get() {
      if (!this._rangesColumns) {
        this._rangesColumns = new _core_utils_Dictionary__WEBPACK_IMPORTED_MODULE_4__.Dictionary();
      }

      return this._rangesColumns;
    },
    enumerable: true,
    configurable: true
  });
  return ColumnSeriesDataItem;
}(_XYSeries__WEBPACK_IMPORTED_MODULE_0__.XYSeriesDataItem);


/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Defines [[Series]] for a column graph.
 *
 * @see {@link IColumnSeriesEvents} for a list of available Events
 * @see {@link IColumnSeriesAdapters} for a list of available Adapters
 * @todo Example
 * @important
 */

var ColumnSeries =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_17__.__extends)(ColumnSeries, _super);
  /**
   * Constructor
   */


  function ColumnSeries() {
    var _this = _super.call(this) || this;
    /**
     * Start location within cell for columns.
     */


    _this._startLocation = 0;
    /**
     * End location within cell for columns.
     */

    _this._endLocation = 1;
    _this.className = "ColumnSeries";
    _this.width = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_10__.percent)(100);
    _this.height = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_10__.percent)(100);
    _this.strokeOpacity = 0;
    _this.fillOpacity = 1;
    _this.clustered = true;

    var columnsContainer = _this.mainContainer.createChild(_core_Container__WEBPACK_IMPORTED_MODULE_2__.Container);

    columnsContainer.shouldClone = false;
    columnsContainer.isMeasured = false;
    columnsContainer.layout = "none";
    _this._columnsContainer = columnsContainer;
    _this.columns.template.pixelPerfect = false;
    _this.tooltipColorSource = _this.columns.template;

    _this.applyTheme();

    return _this;
  }

  Object.defineProperty(ColumnSeries.prototype, "columnsContainer", {
    /**
     * A container that columns are created in.
     *
     * @ignore Exclude from docs
     */
    get: function get() {
      return this._columnsContainer;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Sets defaults that instantiate some objects that rely on parent, so they
   * cannot be set in constructor.
   */

  ColumnSeries.prototype.applyInternalDefaults = function () {
    _super.prototype.applyInternalDefaults.call(this);

    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_15__.hasValue(this.readerTitle)) {
      this.readerTitle = this.language.translate("Column Series");
    }
  };
  /**
   * Returns a new/empty DataItem of the type appropriate for this object.
   *
   * @see {@link DataItem}
   * @return Data Item
   */


  ColumnSeries.prototype.createDataItem = function () {
    return new ColumnSeriesDataItem();
  };
  /**
   * (Re)validates the whole series, effectively causing it to redraw.
   *
   * @ignore Exclude from docs
   */


  ColumnSeries.prototype.validate = function () {
    //@todo Check if we can do better than use `instanceof`
    // find start/end locations based on clustered/stacked settings
    // go through chart series instead of base axis series, because axis series doesn't maintain order
    var _this = this;

    this.group.node.removeAttribute("fill");

    if (this.chart && this.xAxis && this.yAxis) {
      var baseAxisSeries = this.chart.series;
      var clusterCount_1 = 0;
      var index_1 = 0;
      var sortedByAxis_1 = [];
      _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_13__.each(baseAxisSeries.iterator(), function (series) {
        if (series instanceof ColumnSeries) {
          if (_this.baseAxis == series.baseAxis) {
            var index_2;

            if (_this.baseAxis == _this.xAxis) {
              index_2 = _this.chart.yAxes.indexOf(series.yAxis);
            } else {
              index_2 = _this.chart.xAxes.indexOf(series.xAxis);
            }

            sortedByAxis_1.push({
              series: series,
              axis: index_2
            });
          }
        }
      });
      sortedByAxis_1.sort(function (a, b) {
        return a.axis - b.axis;
      });
      var prevAxisIndex_1;
      _core_utils_Array__WEBPACK_IMPORTED_MODULE_14__.each(sortedByAxis_1, function (sortedItem) {
        var series = sortedItem.series;

        if (series instanceof ColumnSeries) {
          if (!series.stacked && series.clustered || prevAxisIndex_1 != sortedItem.axis && series.clustered) {
            clusterCount_1++;
          }

          if (series == _this) {
            index_1 = clusterCount_1 - 1;
          }
        }

        prevAxisIndex_1 = sortedItem.axis;
      });

      if (!this.clustered) {
        index_1 = 0;
        clusterCount_1 = 1;
      }

      var renderer = this.baseAxis.renderer;
      var cellStartLocation = renderer.cellStartLocation;
      var cellEndLocation = renderer.cellEndLocation;
      this._startLocation = cellStartLocation + index_1 / clusterCount_1 * (cellEndLocation - cellStartLocation);
      this._endLocation = cellStartLocation + (index_1 + 1) / clusterCount_1 * (cellEndLocation - cellStartLocation);
      var xAxis = this.xAxis;
      var yAxis = this.yAxis;

      if (xAxis instanceof _axes_CategoryAxis__WEBPACK_IMPORTED_MODULE_6__.CategoryAxis && yAxis instanceof _axes_ValueAxis__WEBPACK_IMPORTED_MODULE_5__.ValueAxis) {
        if (xAxis.sortBySeries == this) {
          this.sortCategoryAxis(xAxis, "valueY");
        }
      }

      if (yAxis instanceof _axes_CategoryAxis__WEBPACK_IMPORTED_MODULE_6__.CategoryAxis && xAxis instanceof _axes_ValueAxis__WEBPACK_IMPORTED_MODULE_5__.ValueAxis) {
        if (yAxis.sortBySeries == this) {
          this.sortCategoryAxis(yAxis, "valueX");
        }
      }
    }

    _super.prototype.validate.call(this);

    for (var i = 0; i < this.startIndex; i++) {
      var dataItem = this.dataItems.getIndex(i);
      this.disableUnusedColumns(dataItem);
    }

    for (var i = this.dataItems.length - 1; i > this.endIndex; i--) {
      var dataItem = this.dataItems.getIndex(i);
      this.disableUnusedColumns(dataItem);
    }

    this._propertiesChanged = false;
  };

  ColumnSeries.prototype.sortCategoryAxis = function (axis, key) {
    var _this = this;

    this.dataItems.values.sort(function (x, y) {
      return y.values[key].workingValue - x.values[key].workingValue;
    });
    var i = 0;
    this.dataItems.each(function (dataItem) {
      dataItem._index = i;
      i++;
    });
    axis.dataItems.each(function (dataItem) {
      var axis = dataItem.component;
      var currentPosition = axis.categoryToPosition(dataItem.category) - dataItem.deltaPosition;
      var seriesDataItem = axis.getSeriesDataItemByCategory(dataItem.category, _this);

      if (seriesDataItem) {
        var index = _this.dataItems.indexOf(seriesDataItem);

        dataItem._index = index;
        var deltaPosition = _core_utils_Math__WEBPACK_IMPORTED_MODULE_11__.round((index + 0.5) / _this.dataItems.length - currentPosition, 3);

        if (dataItem.deltaAnimation && !dataItem.deltaAnimation.isDisposed() && dataItem.deltaAnimation.animationOptions[0].to == deltaPosition) {// void
        } else if (deltaPosition != _core_utils_Math__WEBPACK_IMPORTED_MODULE_11__.round(dataItem.deltaPosition, 3)) {
          if (dataItem.deltaAnimation) {
            dataItem.deltaAnimation.stop();
          }

          dataItem.deltaAnimation = dataItem.animate({
            property: "deltaPosition",
            from: -deltaPosition,
            to: 0
          }, axis.interpolationDuration, axis.interpolationEasing);

          _this._disposers.push(dataItem.deltaAnimation);
        }
      }
    });
    axis.dataItems.values.sort(function (x, y) {
      return x.index - y.index;
    });
  };
  /**
   * Validates data item's element, effectively redrawing it.
   *
   * @ignore Exclude from docs
   * @param dataItem  Data item
   */


  ColumnSeries.prototype.validateDataElement = function (dataItem) {
    // important oder here, first real, then super. we need this to know size
    if (this.chart && this.xAxis && this.yAxis) {
      this.validateDataElementReal(dataItem);

      _super.prototype.validateDataElement.call(this, dataItem);
    }
  };
  /**
   * Returns relative start location for the data item.
   *
   * @param dataItem  Data item
   * @return Location (0-1)
   */


  ColumnSeries.prototype.getStartLocation = function (dataItem) {
    var startLocation = this._startLocation;

    if (this.baseAxis == this.xAxis) {
      startLocation += dataItem.locations[this.xOpenField] - 0.5;
    } else {
      startLocation += dataItem.locations[this.yOpenField] - 0.5;
    }

    return startLocation;
  };
  /**
   * [handleDataItemWorkingValueChange description]
   *
   * @ignore Exclude from docs
   */

  /*
  public handleDataItemWorkingValueChange(dataItem?: this["_dataItem"], name?: string): void {
     if (this.simplifiedProcessing) {
         this.validateDataElement(dataItem);
     }
     else {
         super.handleDataItemWorkingValueChange(dataItem, name);
     }
  }*/

  /**
   * Returns relative end location for the data item.
   *
   * @param dataItem  Data item
   * @return Location (0-1)
   */


  ColumnSeries.prototype.getEndLocation = function (dataItem) {
    var endLocation = this._endLocation;

    if (this.baseAxis == this.xAxis) {
      endLocation += dataItem.locations[this.xField] - 0.5;
    } else {
      endLocation += dataItem.locations[this.yField] - 0.5;
    }

    return endLocation;
  };
  /**
   * Validates data item's elements.
   *
   * @ignore Exclude from docs
   * @param dataItem  Data item
   */


  ColumnSeries.prototype.validateDataElementReal = function (dataItem) {
    var _this = this; //	if (dataItem.hasValue([this.xField, this.yField])) { // todo: this doesn't work with categories, think of a better way


    var l;
    var r;
    var t;
    var b;
    var startLocation = this.getStartLocation(dataItem);
    var endLocation = this.getEndLocation(dataItem);
    var xField = this.xField;
    var xOpenField = this.xOpenField;
    var yField = this.yField;
    var yOpenField = this.yOpenField;
    var template = this.columns.template;
    var percentWidth = template.percentWidth;
    var percentHeight = template.percentHeight;
    var pixelWidth = template.pixelWidth;
    var pixelHeight = template.pixelHeight;
    var maxWidth = template.maxWidth;
    var maxHeight = template.maxHeight;
    var paddingLeft = template.pixelPaddingLeft;
    var paddingRight = template.pixelPaddingRight;
    var paddingTop = template.pixelPaddingTop;
    var paddingBottom = template.pixelPaddingBottom;
    var outOfBounds = false;
    var diw = dataItem.width;

    if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_15__.hasValue(diw)) {
      if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_15__.isNumber(diw)) {
        pixelWidth = diw;
      }

      if (diw instanceof _core_utils_Percent__WEBPACK_IMPORTED_MODULE_10__.Percent) {
        percentWidth = diw.value * 100;
      }
    }

    var dih = dataItem.height;

    if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_15__.hasValue(dih)) {
      if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_15__.isNumber(dih)) {
        pixelHeight = dih;
      }

      if (dih instanceof _core_utils_Percent__WEBPACK_IMPORTED_MODULE_10__.Percent) {
        percentHeight = dih.value * 100;
      }
    } // two category axes


    if (this.xAxis instanceof _axes_CategoryAxis__WEBPACK_IMPORTED_MODULE_6__.CategoryAxis && this.yAxis instanceof _axes_CategoryAxis__WEBPACK_IMPORTED_MODULE_6__.CategoryAxis) {
      if (!dataItem.hasValue(this._xValueFields) || !dataItem.hasValue(this._yValueFields)) {
        return;
      }

      startLocation = 0;
      endLocation = 1;

      if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_15__.isNaN(percentWidth)) {
        var offset = _core_utils_Math__WEBPACK_IMPORTED_MODULE_11__.round((endLocation - startLocation) * (1 - percentWidth / 100) / 2, 5);
        startLocation += offset;
        endLocation -= offset;
      }

      l = this.xAxis.getX(dataItem, xOpenField, startLocation);
      r = this.xAxis.getX(dataItem, xField, endLocation); // in case width is set in pixels

      if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_15__.isNaN(percentWidth)) {
        var offset = (r - l - pixelWidth) / 2;
        l += offset;
        r -= offset;
      } // in case max width is set in pixels


      if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_15__.isNaN(maxWidth) && maxWidth < Math.abs(r - l)) {
        var offset = (r - l - maxWidth) / 2;
        l += offset;
        r -= offset;
      }

      startLocation = 0;
      endLocation = 1;

      if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_15__.isNaN(percentHeight)) {
        var offset = _core_utils_Math__WEBPACK_IMPORTED_MODULE_11__.round((1 - percentHeight / 100) / 2, 5);
        startLocation += offset;
        endLocation -= offset;
      }

      t = this.yAxis.getY(dataItem, yOpenField, startLocation);
      b = this.yAxis.getY(dataItem, yField, endLocation); // in case width is set in pixels

      if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_15__.isNaN(percentHeight)) {
        var offset = (b - t - pixelHeight) / 2;
        b += offset;
        t -= offset;
      } // in case max width is set in pixels


      if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_15__.isNaN(maxHeight) && maxHeight < Math.abs(b - t)) {
        var offset = (b - t - maxHeight) / 2;
        b += offset;
        t -= offset;
      }

      r = this.fixHorizontalCoordinate(r);
      l = this.fixHorizontalCoordinate(l);
      t = this.fixVerticalCoordinate(t);
      b = this.fixVerticalCoordinate(b);
    } else if (this.baseAxis == this.xAxis) {
      if (!dataItem.hasValue(this._yValueFields)) {
        return;
      } // in case width is set in percent


      if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_15__.isNaN(percentWidth)) {
        var offset = _core_utils_Math__WEBPACK_IMPORTED_MODULE_11__.round((endLocation - startLocation) * (1 - percentWidth / 100) / 2, 5);
        startLocation += offset;
        endLocation -= offset;
      }

      l = this.xAxis.getX(dataItem, xOpenField, startLocation);
      r = this.xAxis.getX(dataItem, xField, endLocation); // in case width is set in pixels

      if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_15__.isNaN(percentWidth)) {
        var offset = (r - l - pixelWidth) / 2;
        l += offset;
        r -= offset;
      } // in case width is set in pixels


      if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_15__.isNaN(maxWidth) && maxWidth < Math.abs(r - l)) {
        var offset = (r - l - maxWidth) / 2;
        l += offset;
        r -= offset;
      }

      var bottomLocation = dataItem.locations[yOpenField];
      var topLocation = dataItem.locations[yField]; // otherwise gantt chart will start items in the middle of a cell

      if (this.yAxis instanceof _axes_ValueAxis__WEBPACK_IMPORTED_MODULE_5__.ValueAxis) {
        if (this.dataFields[this.yField] != this.dataFields[this.yOpenField]) {
          bottomLocation = 0;
          topLocation = 0;
        }
      }

      b = this.yAxis.getY(dataItem, yOpenField, bottomLocation);
      t = this.yAxis.getY(dataItem, yField, topLocation); // used to save location for bullets, but it's not a good approach
      // dataItem.locations[xField] = startLocation + (endLocation - startLocation) / 2;

      var axisLenght = Math.ceil(this.yAxis.axisLength);

      if (t < 0 && b < 0 || t > axisLenght && b > axisLenght) {
        outOfBounds = true;
      }

      t = this.fixVerticalCoordinate(t);
      b = this.fixVerticalCoordinate(b);

      if (Math.abs(r - l) - paddingLeft - paddingRight == 0) {
        outOfBounds = true;
      }
    } // horizontal bars
    else {
      if (!dataItem.hasValue(this._xValueFields)) {
        return;
      }

      if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_15__.isNaN(percentHeight)) {
        var offset = _core_utils_Math__WEBPACK_IMPORTED_MODULE_11__.round((endLocation - startLocation) * (1 - percentHeight / 100) / 2, 5);
        startLocation += offset;
        endLocation -= offset;
      }

      t = this.yAxis.getY(dataItem, yOpenField, startLocation);
      b = this.yAxis.getY(dataItem, yField, endLocation); // in case height is set in pixels

      if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_15__.isNaN(percentHeight)) {
        var offset = (b - t - pixelHeight) / 2;
        b -= offset;
        t += offset;
      } // in case height is set in pixels


      if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_15__.isNaN(maxHeight) && maxHeight < Math.abs(b - t)) {
        var offset = (b - t - maxHeight) / 2;
        b -= offset;
        t += offset;
      }

      var rightLocation = dataItem.locations[xField];
      var leftLocation = dataItem.locations[xOpenField]; // otherwise gantt chart will start items in the middle of a cell

      if (this.xAxis instanceof _axes_ValueAxis__WEBPACK_IMPORTED_MODULE_5__.ValueAxis) {
        if (this.dataFields[this.xField] != this.dataFields[this.xOpenField]) {
          rightLocation = 0;
          leftLocation = 0;
        }
      }

      r = this.xAxis.getX(dataItem, xField, rightLocation);
      l = this.xAxis.getX(dataItem, xOpenField, leftLocation); // used to save location for bullets, but it's not a good approach
      // dataItem.locations[yField] = startLocation + (endLocation - startLocation) / 2;

      var axisLenght = Math.ceil(this.xAxis.axisLength);

      if (r < 0 && l < 0 || r > axisLenght && l > axisLenght) {
        outOfBounds = true;
      }

      r = this.fixHorizontalCoordinate(r);
      l = this.fixHorizontalCoordinate(l);

      if (Math.abs(t - b) - paddingTop - paddingBottom == 0) {
        outOfBounds = true;
      }
    }

    var w = Math.abs(r - l);
    var h = Math.abs(b - t);
    var x = Math.min(l, r);
    var y = Math.min(t, b);

    if (!outOfBounds) {
      var column_1;

      if (!dataItem.column) {
        column_1 = this.columns.create(); //$object.forceCopyProperties(this.columns.template, column, visualProperties);

        _core_utils_Object__WEBPACK_IMPORTED_MODULE_12__.copyProperties(this, column_1, _core_Sprite__WEBPACK_IMPORTED_MODULE_1__.visualProperties); // need this because 3d columns are not in the same container

        _core_utils_Object__WEBPACK_IMPORTED_MODULE_12__.copyProperties(this.columns.template, column_1, _core_Sprite__WEBPACK_IMPORTED_MODULE_1__.visualProperties); // second time, no force, so that columns.template would override series properties

        dataItem.addSprite(column_1);
        dataItem.column = column_1;
        column_1.paper = this.paper; // sometimes pattern is not drawn if is set with adapter without this.
        // accessibility

        if (this.itemsFocusable()) {
          if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_15__.hasValue(this.role)) {
            this.role = "menu";
          }

          if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_15__.hasValue(column_1.role)) {
            column_1.role = "menuitem";
          }

          column_1.focusable = true;
        } else {
          if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_15__.hasValue(this.role)) {
            this.role = "list";
          }

          if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_15__.hasValue(column_1.role)) {
            column_1.role = "listitem";
          }

          column_1.focusable = false;
        }

        if (column_1.focusable) {
          column_1.events.on("focus", function (ev) {
            column_1.readerTitle = _this.populateString(_this.itemReaderText, dataItem);
          }, undefined, false);
          column_1.events.on("blur", function (ev) {
            column_1.readerTitle = "";
          }, undefined, false);
        }

        if (column_1.hoverable) {
          column_1.events.on("over", function (ev) {
            column_1.readerTitle = _this.populateString(_this.itemReaderText, dataItem);
          }, undefined, false);
          column_1.events.on("out", function (ev) {
            column_1.readerTitle = "";
          }, undefined, false);
        }

        column_1.parent = this.columnsContainer;
        column_1.virtualParent = this;
      } else {
        column_1 = dataItem.column;

        if (this._propertiesChanged) {
          _core_utils_Object__WEBPACK_IMPORTED_MODULE_12__.copyProperties(this, column_1, _core_Sprite__WEBPACK_IMPORTED_MODULE_1__.visualProperties);
          _core_utils_Object__WEBPACK_IMPORTED_MODULE_12__.copyProperties(this.columns.template, column_1, _core_Sprite__WEBPACK_IMPORTED_MODULE_1__.visualProperties);
          _core_utils_Array__WEBPACK_IMPORTED_MODULE_14__.each(_core_Sprite__WEBPACK_IMPORTED_MODULE_1__.visualProperties, function (property) {
            column_1[property] = column_1[property];
          });
        }
      }

      column_1.width = w;
      column_1.height = h;
      column_1.x = x;
      column_1.y = y;
      column_1.realX = l;
      column_1.realY = t;
      column_1.realWidth = r - l;
      column_1.realHeight = b - t;
      this.setColumnStates(column_1);

      if (column_1.invalid) {
        column_1.validate(); // validate as if it was used previously, it will flicker with previous dimensions
      }

      column_1.__disabled = false; //column.returnAfterTemp();

      _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_13__.each(this.axisRanges.iterator(), function (axisRange) {
        var rangeColumn = dataItem.rangesColumns.getKey(axisRange.uid);

        if (!rangeColumn) {
          rangeColumn = _this.columns.create(); //$object.forceCopyProperties(this.columns.template, rangeColumn, visualProperties);

          _core_utils_Object__WEBPACK_IMPORTED_MODULE_12__.copyProperties(axisRange.contents, rangeColumn, _core_Sprite__WEBPACK_IMPORTED_MODULE_1__.visualProperties); // need this because 3d columns are not in the same container

          dataItem.addSprite(rangeColumn);
          dataItem.rangesColumns.setKey(axisRange.uid, rangeColumn);
          rangeColumn.paper = _this.paper; // sometimes pattern is not drawn if is set with adapter without this.
        }

        rangeColumn.parent = axisRange.contents;
        rangeColumn.width = w;
        rangeColumn.height = h;
        rangeColumn.x = x;
        rangeColumn.y = y;

        _this.setColumnStates(rangeColumn);

        if (rangeColumn.invalid) {
          rangeColumn.validate(); // validate as if it was used previously, it will flicker with previous dimensions
        }

        rangeColumn.__disabled = false; //rangeColumn.returnAfterTemp();
      });
    } else {
      this.disableUnusedColumns(dataItem);
    }

    dataItem.itemWidth = w;
    dataItem.itemHeight = h;
  };
  /**
   * @ignore
   */


  ColumnSeries.prototype.disableUnusedColumns = function (dataItem) {
    if (dataItem) {
      if (dataItem.column) {
        // otherwise might flicker when enabling
        dataItem.column.width = 0;
        dataItem.column.height = 0;
        dataItem.column.__disabled = true;
      }

      _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_13__.each(this.axisRanges.iterator(), function (axisRange) {
        var rangeColumn = dataItem.rangesColumns.getKey(axisRange.uid);

        if (rangeColumn) {
          // otherwise might flicker when enabling
          rangeColumn.width = 0;
          rangeColumn.height = 0;
          rangeColumn.__disabled = true;
        }
      });
    }
  };
  /**
   * Apply different state/coloring to columns based on the change value.
   *
   * @param sprite  Sprite to apply state to
   * @todo Do not apply accessibility to wicks of the candlesticks
   */


  ColumnSeries.prototype.setColumnStates = function (sprite) {
    if (this._dropFromOpenState || this._dropFromPreviousState || this._riseFromOpenState || this._riseFromPreviousState) {
      var dataItem = sprite.dataItem;

      if (this.xAxis instanceof _axes_ValueAxis__WEBPACK_IMPORTED_MODULE_5__.ValueAxis || this.yAxis instanceof _axes_ValueAxis__WEBPACK_IMPORTED_MODULE_5__.ValueAxis) {
        var open_1;
        var value = void 0;
        var change = void 0;

        if (this.baseAxis == this.yAxis) {
          if (this.xOpenField && this.xField && this.xAxis instanceof _axes_ValueAxis__WEBPACK_IMPORTED_MODULE_5__.ValueAxis) {
            open_1 = dataItem.getValue(this.xOpenField);
            value = dataItem.getValue(this.xField);
          }

          change = dataItem.getValue(this.xAxis.axisFieldName + "X", "previousChange");
        } else {
          if (this.yOpenField && this.yField && this.yAxis instanceof _axes_ValueAxis__WEBPACK_IMPORTED_MODULE_5__.ValueAxis) {
            open_1 = dataItem.getValue(this.yOpenField);
            value = dataItem.getValue(this.yField);
          }

          change = dataItem.getValue(this.yAxis.axisFieldName + "Y", "previousChange");
        }

        if (value < open_1) {
          dataItem.droppedFromOpen = true;
          sprite.defaultState.copyFrom(this._dropFromOpenState);
          sprite.setState(this._dropFromOpenState, 0);
        } else {
          dataItem.droppedFromOpen = false;
          sprite.defaultState.copyFrom(this._riseFromOpenState);
          sprite.setState(this._riseFromOpenState, 0);
        }

        if (change < 0) {
          dataItem.droppedFromPrevious = true;
          sprite.defaultState.copyFrom(this._dropFromPreviousState);
          sprite.setState(this._dropFromPreviousState, 0);
        } else {
          dataItem.droppedFromPrevious = false;
          sprite.defaultState.copyFrom(this._riseFromPreviousState);
          sprite.setState(this._riseFromPreviousState, 0);
        }
      }
    }
  };

  Object.defineProperty(ColumnSeries.prototype, "columns", {
    /**
     * A list of column elements in the series.
     *
     * @return Columns
     */
    get: function get() {
      if (!this._columns) {
        this._columns = new _core_utils_List__WEBPACK_IMPORTED_MODULE_3__.ListTemplate(this.createColumnTemplate());

        this._disposers.push(new _core_utils_List__WEBPACK_IMPORTED_MODULE_3__.ListDisposer(this._columns));

        this._disposers.push(this._columns.template);
      }

      return this._columns;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Creates and returns a column element to use as a template.
   *
   * @return Column template
   */

  ColumnSeries.prototype.createColumnTemplate = function () {
    return new _elements_Column__WEBPACK_IMPORTED_MODULE_8__.Column();
  };

  Object.defineProperty(ColumnSeries.prototype, "clustered", {
    /**
     * @return Clustered?
     */
    get: function get() {
      return this.getPropertyValue("clustered");
    },

    /**
     * Cluster this series columns?
     *
     * Setting to `false` will make columns overlap with other series.
     *
     * @default true
     * @param value  Clustered?
     */
    set: function set(value) {
      this.setPropertyValue("clustered", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(ColumnSeries.prototype, "dropFromOpenState", {
    /**
     * @return State
     */
    get: function get() {
      if (!this._dropFromOpenState) {
        this._dropFromOpenState = this.states.create("dropFromOpenState");
      }

      return this._dropFromOpenState;
    },

    /**
     * A state to apply to a column when close value is lower than open value.
     *
     * Can be used to differentiate appearance based on value relations.
     *
     * NOTE: this will work only if at least one axis is [[ValueAxis]].
     *
     * @readonly You can modify state object, but can't overwrite it
     * @param  value  State
     */
    set: function set(value) {
      this._dropFromOpenState = value;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(ColumnSeries.prototype, "dropFromPreviousState", {
    /**
     * @return State
     */
    get: function get() {
      if (!this._dropFromPreviousState) {
        this._dropFromPreviousState = this.states.create("dropFromPreviousState");
      }

      return this._dropFromPreviousState;
    },

    /**
     * A state to apply to a column when its value is lower value of a previous
     * column.
     *
     * Can be used to differentiate appearance based on value relations.
     *
     * @readonly You can modify state object, but can't overwrite it
     * @param  value  State
     */
    set: function set(value) {
      this._dropFromPreviousState = value;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(ColumnSeries.prototype, "riseFromOpenState", {
    /**
     * @return State
     */
    get: function get() {
      if (!this._riseFromOpenState) {
        this._riseFromOpenState = this.states.create("riseFromOpenState");
      }

      return this._riseFromOpenState;
    },

    /**
     * A state to apply to a column when close value is same or higher than open
     * value.
     *
     * Can be used to differentiate appearance based on value relations.
     *
     * NOTE: this will work only if at least one axis is [[ValueAxis]].
     *
     * @readonly You can modify state object, but can't overwrite it
     * @param  value  State
     */
    set: function set(value) {
      this._riseFromOpenState = value;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(ColumnSeries.prototype, "riseFromPreviousState", {
    /**
     * @return State
     */
    get: function get() {
      if (!this._riseFromPreviousState) {
        this._riseFromPreviousState = this.states.create("riseFromPreviousState");
      }

      return this._riseFromPreviousState;
    },

    /**
     * A state to apply to a column when its value is same or higher than value
     * of a previous column.
     *
     * Can be used to differentiate appearance based on value relations.
     *
     * @readonly You can modify state object, but can't overwrite it
     * @param  value  State
     */
    set: function set(value) {
      this._riseFromPreviousState = value;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Updates value of the related legend item.
   *
   * @ignore Exclude from docs
   * @param dataItem  Data item
   */

  ColumnSeries.prototype.updateLegendValue = function (dataItem, notRange) {
    var _this = this;

    _super.prototype.updateLegendValue.call(this, dataItem, notRange);

    if (this.legendDataItem) {
      var marker = this.legendDataItem.marker;
      var fromOpenState_1;
      var fromPreviousState_1;

      if (dataItem) {
        if (dataItem.droppedFromOpen) {
          fromOpenState_1 = this._dropFromOpenState;
        } else {
          fromOpenState_1 = this._riseFromOpenState;
        }

        if (dataItem.droppedFromPrevious) {
          fromPreviousState_1 = this._dropFromPreviousState;
        } else {
          fromPreviousState_1 = this._riseFromPreviousState;
        }
      }

      _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_13__.each(marker.children.iterator(), function (child) {
        if (dataItem) {
          child.setState(fromPreviousState_1);
          child.setState(fromOpenState_1);
        } else {
          // todo: think what to do here, maybe apply above states based on totals?
          child.setState(_this._riseFromPreviousState);
          child.setState(_this._riseFromOpenState);
        }
      });
    }
  };
  /**
   * Creates elements in related legend container, that mimics the look of this
   * Series.
   *
   * @ignore Exclude from docs
   * @param marker  Legend item container
   */


  ColumnSeries.prototype.createLegendMarker = function (marker) {
    var w = marker.pixelWidth;
    var h = marker.pixelHeight;
    marker.removeChildren();
    var column = marker.createChild(_core_elements_RoundedRectangle__WEBPACK_IMPORTED_MODULE_9__.RoundedRectangle);
    column.shouldClone = false;
    _core_utils_Object__WEBPACK_IMPORTED_MODULE_12__.copyProperties(this, column, _core_Sprite__WEBPACK_IMPORTED_MODULE_1__.visualProperties);
    column.copyFrom(this.columns.template);
    column.padding(0, 0, 0, 0); // if columns will have padding (which is often), legend marker will be very narrow

    column.width = w;
    column.height = h;
    var legendDataItem = marker.dataItem;
    legendDataItem.color = this.fill;
    legendDataItem.colorOrig = this.fill;
  };
  /**
   * Copies all properties from another instance of [[ColumnSeries]].
   *
   * @param source  Source series
   */


  ColumnSeries.prototype.copyFrom = function (source) {
    _super.prototype.copyFrom.call(this, source);

    this.columns.template.copyFrom(source.columns.template);
  };
  /**
  * returns bullet x location
  * @ignore
  */


  ColumnSeries.prototype.getBulletLocationX = function (bullet, field) {
    if (this.baseAxis == this.xAxis) {
      var bulletLocationX = bullet.locationX;

      if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_15__.isNumber(bulletLocationX)) {
        bulletLocationX = 0.5;
      }

      var endLocation = this.getEndLocation(bullet.dataItem);
      var startLocation = this.getStartLocation(bullet.dataItem);
      return endLocation - (endLocation - startLocation) * bulletLocationX;
    } else {
      return _super.prototype.getBulletLocationX.call(this, bullet, field);
    }
  };
  /**
  * returns bullet y location
  * @ignore
  */


  ColumnSeries.prototype.getBulletLocationY = function (bullet, field) {
    if (this.baseAxis == this.yAxis) {
      var bulletLocationY = bullet.locationY;

      if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_15__.isNumber(bulletLocationY)) {
        bulletLocationY = 0.5;
      }

      var endLocation = this.getEndLocation(bullet.dataItem);
      var startLocation = this.getStartLocation(bullet.dataItem);
      return endLocation - (endLocation - startLocation) * bulletLocationY;
    } else {
      return _super.prototype.getBulletLocationY.call(this, bullet, field);
    }
  };

  ColumnSeries.prototype.getAdjustedXLocation = function (dataItem, field, bulletLocationX) {
    //if (this.baseAxis == this.xAxis) {
    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_15__.isNumber(bulletLocationX)) {
      if (dataItem) {
        bulletLocationX = dataItem.locations[field];
      } else {
        bulletLocationX = 0.5;
      }
    }

    return this._endLocation - (this._endLocation - this._startLocation) * (1 - bulletLocationX); //}
    //else {
    //	return super.getAdjustedXLocation(dataItem, field);
    //}
  };

  ColumnSeries.prototype.getAdjustedYLocation = function (dataItem, field, bulletLocationY) {
    //if (this.baseAxis == this.yAxis) {
    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_15__.isNumber(bulletLocationY)) {
      if (dataItem) {
        bulletLocationY = dataItem.locations[field];
      } else {
        bulletLocationY = 0.5;
      }
    }

    return this._endLocation - (this._endLocation - this._startLocation) * bulletLocationY; //}
    //else {
    //	return super.getAdjustedYLocation(dataItem, field);
    //}
  };
  /**
   * @ignore Exclude from docs
   */


  ColumnSeries.prototype.fixVerticalCoordinate = function (coordinate) {
    var paddingBottom = this.columns.template.pixelPaddingBottom;
    var paddingTop = this.columns.template.pixelPaddingTop;
    var minY = -paddingTop;
    var maxY = this.yAxis.axisLength + paddingBottom;
    return _core_utils_Math__WEBPACK_IMPORTED_MODULE_11__.fitToRange(coordinate, minY, maxY);
  };
  /**
   * @ignore Exclude from docs
   */


  ColumnSeries.prototype.fixHorizontalCoordinate = function (coordinate) {
    var paddingLeft = this.columns.template.pixelPaddingLeft;
    var paddingRight = this.columns.template.pixelPaddingRight;
    var minX = -paddingLeft;
    var maxX = this.xAxis.axisLength + paddingRight;
    return _core_utils_Math__WEBPACK_IMPORTED_MODULE_11__.fitToRange(coordinate, minX, maxX);
  };
  /**
   * @ignore
   */


  ColumnSeries.prototype.disposeData = function () {
    _super.prototype.disposeData.call(this);

    this.columns.clear();
  };

  return ColumnSeries;
}(_XYSeries__WEBPACK_IMPORTED_MODULE_0__.XYSeries);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_7__.registry.registeredClasses.ColumnSeries = ColumnSeries;
_core_Registry__WEBPACK_IMPORTED_MODULE_7__.registry.registeredClasses.ColumnSeriesDataItem = ColumnSeriesDataItem;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/series/ColumnSeries3D.js":
/*!************************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/series/ColumnSeries3D.js ***!
  \************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "ColumnSeries3D": () => (/* binding */ ColumnSeries3D),
/* harmony export */   "ColumnSeries3DDataItem": () => (/* binding */ ColumnSeries3DDataItem)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _series_ColumnSeries__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../series/ColumnSeries */ "./node_modules/@amcharts/amcharts4/.internal/charts/series/ColumnSeries.js");
/* harmony import */ var _elements_Column3D__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../elements/Column3D */ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/Column3D.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/**
 * 3D column series module.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */




/**
 * ============================================================================
 * DATA ITEM
 * ============================================================================
 * @hidden
 */

var ColumnSeries3DDataItem =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__extends)(ColumnSeries3DDataItem, _super);
  /**
   * Constructor
   */


  function ColumnSeries3DDataItem() {
    var _this = _super.call(this) || this;

    _this.className = "ColumnSeries3DDataItem";

    _this.applyTheme();

    return _this;
  }

  return ColumnSeries3DDataItem;
}(_series_ColumnSeries__WEBPACK_IMPORTED_MODULE_0__.ColumnSeriesDataItem);


/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Defines [[Series]] for a 3D column graph.
 *
 * @see {@link IColumnSeries3DEvents} for a list of available Events
 * @see {@link IColumnSeries3DAdapters} for a list of available Adapters
 * @todo Example
 * @important
 */

var ColumnSeries3D =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__extends)(ColumnSeries3D, _super);
  /**
   * Constructor
   */


  function ColumnSeries3D() {
    var _this = _super.call(this) || this;

    _this.className = "ColumnSeries3D";
    _this.columns.template.column3D.applyOnClones = true;
    _this.columns.template.hiddenState.properties.visible = true;

    _this.applyTheme();

    return _this;
  }

  Object.defineProperty(ColumnSeries3D.prototype, "columnsContainer", {
    /**
     * @ignore
     */
    get: function get() {
      var chart = this.chart;

      if (chart && chart.columnsContainer && chart.leftAxesContainer.layout != "vertical" && chart.rightAxesContainer.layout != "vertical" && chart.bottomAxesContainer.layout != "horizontal" && chart.topAxesContainer.layout != "horizontal") {
        return chart.columnsContainer;
      } else {
        return this._columnsContainer;
      }
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Validates data item's elements.
   *
   * @ignore Exclude from docs
   * @param dataItem  Data item
   */

  ColumnSeries3D.prototype.validateDataElementReal = function (dataItem) {
    _super.prototype.validateDataElementReal.call(this, dataItem);

    if (dataItem.column) {
      dataItem.column.dx = this.dx;
      dataItem.column.dy = this.dy;
      dataItem.column.visible = this.visible;
    }
  };
  /**
   * Validates data item's elements.
   *
   * @ignore Exclude from docs
   */


  ColumnSeries3D.prototype.validateDataElements = function () {
    _super.prototype.validateDataElements.call(this);

    if (this.chart) {
      this.chart.invalidateLayout();
    }
  };
  /**
   * Returns an element to use for 3D bar.
   * @ignore
   * @return Element.
   */


  ColumnSeries3D.prototype.createColumnTemplate = function () {
    return new _elements_Column3D__WEBPACK_IMPORTED_MODULE_1__.Column3D();
  };

  Object.defineProperty(ColumnSeries3D.prototype, "depth", {
    /**
     * @ignore Exclude from docs
     * @return Depth (px)
     */
    get: function get() {
      return this.getPropertyValue("depth");
    },

    /**
     * Depth (height) of the slices in the series in pixels.
     *
     * @ignore Exclude from docs
     * @param value  Depth (px)
     */
    set: function set(value) {
      this.setPropertyValue("depth", value, true);
      var template = this.columns.template; // todo: Cone is not Rectangle3D, maybe we should do some I3DShape?

      template.column3D.depth = value;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(ColumnSeries3D.prototype, "angle", {
    /**
     * @ignore Exclude from docs
     * @return Angle (0-360)
     */
    get: function get() {
      return this.getPropertyValue("angle");
    },

    /**
     * Angle of view for the slices in series. (0-360)
     *
     * @ignore Exclude from docs
     * @param value  Angle (0-360)
     */
    set: function set(value) {
      this.setPropertyValue("angle", value);
      var template = this.columns.template;
      template.column3D.angle = value;
    },
    enumerable: true,
    configurable: true
  });
  return ColumnSeries3D;
}(_series_ColumnSeries__WEBPACK_IMPORTED_MODULE_0__.ColumnSeries);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_2__.registry.registeredClasses.ColumnSeries3D = ColumnSeries3D;
_core_Registry__WEBPACK_IMPORTED_MODULE_2__.registry.registeredClasses.ColumnSeries3DDataItem = ColumnSeries3DDataItem;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/series/ConeSeries.js":
/*!********************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/series/ConeSeries.js ***!
  \********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "ConeSeries": () => (/* binding */ ConeSeries),
/* harmony export */   "ConeSeriesDataItem": () => (/* binding */ ConeSeriesDataItem)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _ColumnSeries__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ColumnSeries */ "./node_modules/@amcharts/amcharts4/.internal/charts/series/ColumnSeries.js");
/* harmony import */ var _elements_ConeColumn__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../elements/ConeColumn */ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/ConeColumn.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_rendering_Path__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/rendering/Path */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Path.js");
/**
 * ConeSeries module
 * Not recommended using if you use scrollbars or your chart is zoomable in some other way.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */





/**
 * ============================================================================
 * DATA ITEM
 * ============================================================================
 * @hidden
 */

/**
 * Defines a [[DataItem]] for [[ConeSeries]].
 *
 * @see {@link DataItem}
 */

var ConeSeriesDataItem =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_4__.__extends)(ConeSeriesDataItem, _super);
  /**
   * Constructor
   */


  function ConeSeriesDataItem() {
    var _this = _super.call(this) || this;

    _this.className = "ConeSeriesDataItem";

    _this.applyTheme();

    return _this;
  }

  return ConeSeriesDataItem;
}(_ColumnSeries__WEBPACK_IMPORTED_MODULE_0__.ColumnSeriesDataItem);


/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Defines [[Series]] for a cone graph.
 *
 * @see {@link IConeSeriesEvents} for a list of available Events
 * @see {@link IConeSeriesAdapters} for a list of available Adapters
 * @todo Example
 * @important
 */

var ConeSeries =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_4__.__extends)(ConeSeries, _super);
  /**
   * Constructor
   */


  function ConeSeries() {
    var _this = _super.call(this) || this;

    _this.className = "ConeSeries";

    _this.applyTheme();

    return _this;
  }
  /**
   * Returns an element to use for Candlestick
   * @ignore
   * @return Element.
   */


  ConeSeries.prototype.createColumnTemplate = function () {
    return new _elements_ConeColumn__WEBPACK_IMPORTED_MODULE_1__.ConeColumn();
  };
  /**
   * Returns an SVG path to use as series mask.
   *
   * @return SVG path
   */


  ConeSeries.prototype.getMaskPath = function () {
    var dx = 0;
    var dy = 0;
    var column = this.columns.getIndex(0);

    if (column) {
      if (this.baseAxis == this.xAxis) {
        dy = column.coneColumn.innerWidth / 2 + 1;
      } else {
        dx = column.coneColumn.innerHeight / 2 + 1;
      }

      return _core_rendering_Path__WEBPACK_IMPORTED_MODULE_3__.rectToPath({
        x: -dx,
        y: 0,
        width: this.xAxis.axisLength + dx,
        height: this.yAxis.axisLength + dy
      });
    }
  };
  /**
   * Validates data item's elements.
   *
   * @ignore Exclude from docs
   * @param dataItem  Data item
   */


  ConeSeries.prototype.validateDataElementReal = function (dataItem) {
    _super.prototype.validateDataElementReal.call(this, dataItem);

    var column = dataItem.column;

    if (column) {
      var coneColumn = dataItem.column.coneColumn;
      coneColumn.fill = dataItem.column.fill;

      if (this.baseAxis == this.yAxis) {
        coneColumn.orientation = "horizontal";
      } else {
        coneColumn.orientation = "vertical";
      }
    }
  };

  return ConeSeries;
}(_ColumnSeries__WEBPACK_IMPORTED_MODULE_0__.ColumnSeries);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_2__.registry.registeredClasses.ConeSeries = ConeSeries;
_core_Registry__WEBPACK_IMPORTED_MODULE_2__.registry.registeredClasses.ConeSeriesDataItem = ConeSeriesDataItem;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/series/CurvedColumnSeries.js":
/*!****************************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/series/CurvedColumnSeries.js ***!
  \****************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "CurvedColumnSeries": () => (/* binding */ CurvedColumnSeries),
/* harmony export */   "CurvedColumnSeriesDataItem": () => (/* binding */ CurvedColumnSeriesDataItem)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _ColumnSeries__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ColumnSeries */ "./node_modules/@amcharts/amcharts4/.internal/charts/series/ColumnSeries.js");
/* harmony import */ var _elements_CurvedColumn__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../elements/CurvedColumn */ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/CurvedColumn.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/**
 * CurvedColumnSeries module.
 *
 * Not recommended using if you use scrollbars or your chart is zoomable in some other way.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */




/**
 * ============================================================================
 * DATA ITEM
 * ============================================================================
 * @hidden
 */

/**
 * Defines a [[DataItem]] for [[CurvedColumnSeries]].
 *
 * @see {@link DataItem}
 */

var CurvedColumnSeriesDataItem =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__extends)(CurvedColumnSeriesDataItem, _super);
  /**
   * Constructor
   */


  function CurvedColumnSeriesDataItem() {
    var _this = _super.call(this) || this;

    _this.className = "CurvedColumnSeriesDataItem";

    _this.applyTheme();

    return _this;
  }

  return CurvedColumnSeriesDataItem;
}(_ColumnSeries__WEBPACK_IMPORTED_MODULE_0__.ColumnSeriesDataItem);


/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Defines [[Series]] for a curved columns graph.
 *
 * @see {@link ICurvedColumnSeriesEvents} for a list of available Events
 * @see {@link ICurvedColumnSeriesAdapters} for a list of available Adapters
 * @important
 */

var CurvedColumnSeries =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__extends)(CurvedColumnSeries, _super);
  /**
   * Constructor
   */


  function CurvedColumnSeries() {
    var _this = _super.call(this) || this;

    _this.className = "CurvedColumnSeries";

    _this.applyTheme();

    return _this;
  }
  /**
   * Returns an element to use for the curved column.
   *
   * @ignore Exclude from docs
   * @return Element.
   */


  CurvedColumnSeries.prototype.createColumnTemplate = function () {
    return new _elements_CurvedColumn__WEBPACK_IMPORTED_MODULE_1__.CurvedColumn();
  };
  /**
   * Validates data item's elements.
   *
   * @ignore Exclude from docs
   * @param dataItem  Data item
   */


  CurvedColumnSeries.prototype.validateDataElementReal = function (dataItem) {
    _super.prototype.validateDataElementReal.call(this, dataItem);

    var column = dataItem.column;
    column = dataItem.column;

    if (column) {
      var curvedColumn = dataItem.column.curvedColumn;
      curvedColumn.fill = dataItem.column.fill;

      if (this.baseAxis == this.yAxis) {
        column.orientation = "horizontal";
      } else {
        column.orientation = "vertical";
      }
    }
  };

  return CurvedColumnSeries;
}(_ColumnSeries__WEBPACK_IMPORTED_MODULE_0__.ColumnSeries);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_2__.registry.registeredClasses.CurvedColumnSeries = CurvedColumnSeries;
_core_Registry__WEBPACK_IMPORTED_MODULE_2__.registry.registeredClasses.CurvedColumnSeriesDataItem = CurvedColumnSeriesDataItem;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/series/FunnelSeries.js":
/*!**********************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/series/FunnelSeries.js ***!
  \**********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "FunnelSeries": () => (/* binding */ FunnelSeries),
/* harmony export */   "FunnelSeriesDataItem": () => (/* binding */ FunnelSeriesDataItem)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _PercentSeries__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./PercentSeries */ "./node_modules/@amcharts/amcharts4/.internal/charts/series/PercentSeries.js");
/* harmony import */ var _elements_FunnelSlice__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../elements/FunnelSlice */ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/FunnelSlice.js");
/* harmony import */ var _elements_FunnelTick__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../elements/FunnelTick */ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/FunnelTick.js");
/* harmony import */ var _core_utils_List__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/utils/List */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/List.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_utils_Math__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../core/utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
/* harmony import */ var _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../core/utils/Iterator */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Iterator.js");
/* harmony import */ var _core_utils_Type__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../core/utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/* harmony import */ var _core_utils_Array__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../core/utils/Array */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Array.js");
/* harmony import */ var _core_utils_Percent__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../core/utils/Percent */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Percent.js");
/* harmony import */ var _core_utils_Disposer__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../core/utils/Disposer */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Disposer.js");
/* harmony import */ var _core_Options__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../core/Options */ "./node_modules/@amcharts/amcharts4/.internal/core/Options.js");
/**
 * Defines Funnel Chart Series.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */













/**
 * ============================================================================
 * DATA ITEM
 * ============================================================================
 * @hidden
 */
//@todo: sequenced?

/**
 * Defines a [[DataItem]] for [[FunnelSeries]].
 *
 * @see {@link DataItem}
 */

var FunnelSeriesDataItem =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_12__.__extends)(FunnelSeriesDataItem, _super);
  /**
   * Constructor
   */


  function FunnelSeriesDataItem() {
    var _this = _super.call(this) || this;

    _this.className = "FunnelSeriesDataItem"; // this helps to invalidate series when value is 0 an it is hidden (no other events are triggered then)

    _this.events.on("visibilitychanged", function () {
      if (_this.component) {
        _this.component.invalidateDataItems();
      }
    }, _this, false);

    _this.applyTheme();

    return _this;
  }

  Object.defineProperty(FunnelSeriesDataItem.prototype, "sliceLink", {
    /**
     * A [[FunnelSlice]] element, related to this data item ([[FunnelSlice]]).
     *
     * @readonly
     * @return Slice element
     */
    get: function get() {
      var _this = this;

      if (!this._sliceLink) {
        var sliceLink_1 = this.component.sliceLinks.create();
        this._sliceLink = sliceLink_1;

        this._disposers.push(sliceLink_1);

        sliceLink_1.parent = this.component.slicesContainer;

        this._disposers.push(new _core_utils_Disposer__WEBPACK_IMPORTED_MODULE_10__.Disposer(function () {
          if (_this.component) {
            _this.component.sliceLinks.removeValue(sliceLink_1);
          }
        }));

        this.addSprite(sliceLink_1);
        sliceLink_1.visible = this.visible;
      }

      return this._sliceLink;
    },
    enumerable: true,
    configurable: true
  });
  return FunnelSeriesDataItem;
}(_PercentSeries__WEBPACK_IMPORTED_MODULE_0__.PercentSeriesDataItem);


/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Defines [[Series]] for a FunnelSlice series on a [[SlicedChart]].
 *
 * @see {@link IFunnelSeriesEvents} for a list of available Events
 * @see {@link IFunnelSeriesAdapters} for a list of available Adapters
 * @see {@link https://www.amcharts.com/docs/v4/chart-types/sliced-chart/} for documentation
 * @important
 */

var FunnelSeries =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_12__.__extends)(FunnelSeries, _super);
  /**
   * Constructor
   */


  function FunnelSeries() {
    var _this = _super.call(this) || this;

    _this._nextY = 0;
    _this.className = "FunnelSeries";
    _this.orientation = "vertical";
    _this.width = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_9__.percent)(100);
    _this.height = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_9__.percent)(100);
    _this.slicesContainer.width = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_9__.percent)(100);
    _this.slicesContainer.height = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_9__.percent)(100);

    _this._disposers.push(_this.slicesContainer.events.on("maxsizechanged", _this.invalidateDataItems, _this, false));

    _this.labelsOpposite = true;
    _this.labelsContainer.layout = "absolute";
    _this.bottomRatio = 0;

    _this.applyTheme();

    return _this;
  }
  /**
   * Creates a [[FunnelSlice]] element.
   *
   * @return Slice
   */


  FunnelSeries.prototype.createSlice = function () {
    return new _elements_FunnelSlice__WEBPACK_IMPORTED_MODULE_1__.FunnelSlice();
  };
  /**
   * Creates a [[FunnelTick]] element.
   *
   * @return Tick
   */


  FunnelSeries.prototype.createTick = function () {
    return new _elements_FunnelTick__WEBPACK_IMPORTED_MODULE_2__.FunnelTick();
  };
  /**
   * Sets defaults that instantiate some objects that rely on parent, so they
   * cannot be set in constructor.
   */


  FunnelSeries.prototype.applyInternalDefaults = function () {
    _super.prototype.applyInternalDefaults.call(this);

    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_7__.hasValue(this.readerTitle)) {
      this.readerTitle = this.language.translate("Funnel Series");
    }
  };
  /**
   * Returns a new/empty DataItem of the type appropriate for this object.
   *
   * @see {@link DataItem}
   * @return Data Item
   */


  FunnelSeries.prototype.createDataItem = function () {
    return new FunnelSeriesDataItem();
  };
  /**
   * Inits FunnelSlice.
   *
   * @param slice to init
   */


  FunnelSeries.prototype.initSlice = function (slice) {
    slice.isMeasured = false;
    slice.defaultState.properties.scale = 1;
    slice.observe("scale", this.handleSliceScale, this);
    slice.observe(["dx", "dy", "x", "y"], this.handleSliceMove, this);
    slice.tooltipText = "{category}: {value.percent.formatNumber('#.#p')} ({value.value})";
    var hoverState = slice.states.create("hover");
    hoverState.properties.expandDistance = 0.2;
  };
  /**
   * [initLabel description]
   *
   * @todo Description
   * @param label [description]
   */


  FunnelSeries.prototype.initLabel = function (label) {
    _super.prototype.initLabel.call(this, label);

    label.verticalCenter = "middle";
    label.horizontalCenter = "middle";
    label.isMeasured = true;
    label.padding(5, 5, 5, 5);
  };
  /**
   * (Re)validates the whole series, effectively causing it to redraw.
   *
   * @ignore Exclude from docs
   */


  FunnelSeries.prototype.validate = function () {
    _super.prototype.validate.call(this);

    this._nextY = 0;
  };
  /**
   * [validateDataElements description]
   *
   * @todo Description
   * @ignore Exclude from docs
   */


  FunnelSeries.prototype.validateDataElements = function () {
    var _this = this;

    var slicesContainer = this.slicesContainer;
    var labelsContainer = this.labelsContainer;
    var labelTemplate = this.labels.template;

    if (this.alignLabels) {
      labelTemplate.interactionsEnabled = true;
      slicesContainer.isMeasured = true;
      labelsContainer.isMeasured = true;
    } else {
      labelTemplate.interactionsEnabled = false;
      slicesContainer.isMeasured = false;
      labelsContainer.isMeasured = false;
    }

    var total = 0;
    var count = 0;
    this.dataItems.each(function (dItem) {
      if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_7__.hasValue(dItem.value)) {
        count++;

        if (dItem.value > 0) {
          total += Math.abs(dItem.getWorkingValue("value") / dItem.value);
        } else {
          if (_this.ignoreZeroValues) {
            count--;
          } else {
            if (!dItem.visible || dItem.__disabled || dItem.isHiding) {
              count--;
            } else {
              total += 1;
            }
          }
        }
      }
    });
    this._total = 1 / count * total;
    this._count = count;

    _super.prototype.validateDataElements.call(this);

    this.arrangeLabels();
  };
  /**
   * [getNextValue description]
   *
   * @todo Description
   * @param dataItem  [description]
   * @return [description]
   */


  FunnelSeries.prototype.getNextValue = function (dataItem) {
    var index = dataItem.index;
    var nextValue = dataItem.getWorkingValue("value");

    if (index < this.dataItems.length - 1) {
      var nextItem = this.dataItems.getIndex(index + 1);
      nextValue = nextItem.getWorkingValue("value");

      if (!nextItem.visible || nextItem.isHiding || nextItem.__disabled || nextItem.value == 0 && this.ignoreZeroValues) {
        return this.getNextValue(nextItem);
      }
    }

    return nextValue;
  };
  /**
   * [formDataElement description]
   *
   * @todo Description
   */


  FunnelSeries.prototype.formDataElement = function () {};
  /**
   * Validates data item's element, effectively redrawing it.
   *
   * @ignore Exclude from docs
   * @param dataItem  Data item
   */


  FunnelSeries.prototype.validateDataElement = function (dataItem) {
    var _this = this; //if ($type.hasValue(dataItem.value)) {
    // FunnelSlice


    var slice = dataItem.slice;
    slice.orientation = this.orientation;
    var sliceLink = dataItem.sliceLink;
    sliceLink.orientation = this.orientation;
    var tick = dataItem.tick;
    var label = dataItem.label;
    tick.slice = slice;
    tick.label = label;

    if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_7__.hasValue(dataItem.value)) {
      this.decorateSlice(dataItem);
      _core_utils_Array__WEBPACK_IMPORTED_MODULE_8__.each(dataItem.sprites, function (sprite) {
        if (dataItem.value == 0 && _this.ignoreZeroValues) {
          sprite.__disabled = true;
        } else {
          sprite.__disabled = false;
        }
      });
    } else {
      _core_utils_Array__WEBPACK_IMPORTED_MODULE_8__.each(dataItem.sprites, function (sprite) {
        sprite.__disabled = true;
      });
    }

    if (dataItem.index == this.dataItems.length - 1) {
      sliceLink.disabled = true;
    } // do this at the end, otherwise bullets won't be positioned properly


    _super.prototype.validateDataElement.call(this, dataItem);

    sliceLink.fill = slice.fill; //}
  };
  /**
   * [decorateSlice description]
   *
   * @todo Description
   * @param dataItem [description]
   */


  FunnelSeries.prototype.decorateSlice = function (dataItem) {
    var slice = dataItem.slice;
    var sliceLink = dataItem.sliceLink;
    var label = dataItem.label;
    var tick = dataItem.tick;
    var maxWidth = this.slicesContainer.innerWidth;
    var maxHeight = this.slicesContainer.innerHeight;
    var nextValue = this.getNextValue(dataItem);
    var workingValue = Math.abs(dataItem.getWorkingValue("value"));
    var bottomRatio = this.bottomRatio;
    var d = 1;

    if (dataItem.value != 0) {
      d = workingValue / Math.abs(dataItem.value);
    } else {
      if (dataItem.__disabled || dataItem.isHiding || !dataItem.visible) {
        d = 0.000001;
      }
    }

    if (this.ignoreZeroValues && dataItem.value == 0) {
      dataItem.__disabled = true;
      return;
    } else {
      dataItem.__disabled = false;
    }

    if (this._nextY == Infinity) {
      this._nextY = 0;
    }

    if (this.orientation == "vertical") {
      var linkHeight = sliceLink.pixelHeight * d;
      maxHeight = maxHeight + linkHeight; // to avoid one link gap in the bottom

      slice.topWidth = workingValue / this.dataItem.values.value.high * maxWidth;
      slice.bottomWidth = (workingValue - (workingValue - nextValue) * bottomRatio) / this.dataItem.values.value.high * maxWidth;
      sliceLink.topWidth = slice.bottomWidth;
      sliceLink.bottomWidth = (workingValue - (workingValue - nextValue)) / this.dataItem.values.value.high * maxWidth;
      slice.y = this._nextY;
      slice.height = Math.min(100000, _core_utils_Math__WEBPACK_IMPORTED_MODULE_5__.max(0, maxHeight / this._count * d / this._total - linkHeight));
      slice.x = maxWidth / 2;

      if (!this.alignLabels) {
        label.x = slice.x;
      } else {
        label.x = undefined;
      }

      label.y = slice.pixelY + slice.pixelHeight * tick.locationY;
      this._nextY += slice.pixelHeight + linkHeight;
      sliceLink.y = this._nextY - linkHeight;
      sliceLink.x = slice.x;
    } else {
      var linkWidth = sliceLink.pixelWidth * d;
      maxWidth = maxWidth + linkWidth; // to avoid one link gap in the bottom

      slice.topWidth = workingValue / this.dataItem.values.value.high * maxHeight;
      slice.bottomWidth = (workingValue - (workingValue - nextValue) * bottomRatio) / this.dataItem.values.value.high * maxHeight;
      sliceLink.topWidth = slice.bottomWidth;
      sliceLink.bottomWidth = (workingValue - (workingValue - nextValue)) / this.dataItem.values.value.high * maxHeight;
      slice.x = this._nextY;
      slice.width = Math.min(100000, maxWidth / this._count * d * 1 / this._total - linkWidth);
      slice.y = maxHeight / 2;

      if (!this.alignLabels) {
        label.y = slice.y;
      } else {
        label.y = this.labelsContainer.measuredHeight;
      }

      label.x = slice.pixelX + slice.pixelWidth * tick.locationX;
      this._nextY += slice.pixelWidth + linkWidth;
      sliceLink.x = this._nextY - linkWidth;
      sliceLink.y = slice.y;
    }
  };

  FunnelSeries.prototype.getLastLabel = function (index) {
    if (index > 0) {
      var lastLabel = this.labels.getIndex(index);

      if (lastLabel.__disabled || !lastLabel.visible) {
        return this.getLastLabel(index - 1);
      } else {
        return lastLabel;
      }
    }
  };
  /**
   * [arrangeLabels description]
   *
   * @todo Description
   */


  FunnelSeries.prototype.arrangeLabels = function () {
    if (this.alignLabels) {
      var count = this.labels.length;

      if (count > 1) {
        var lastLabel = this.getLastLabel(count - 1);

        if (lastLabel) {
          var lastY = lastLabel.pixelY;
          var lastX = lastLabel.pixelX;

          if (count > 1) {
            for (var i = count - 2; i >= 0; i--) {
              var label = this.labels.getIndex(i);

              if (label.visible && !label.__disabled) {
                if (label.invalid) {
                  label.validate();
                }

                if (this.orientation == "vertical") {
                  if (label.pixelY + label.measuredHeight > lastY) {
                    label.y = Math.min(1000000, lastY - label.measuredHeight);
                  }
                } // horizontal
                else {
                  if (label.pixelX + label.measuredWidth > lastX) {
                    label.x = Math.min(1000000, lastX - label.measuredWidth);
                  }
                }

                lastY = label.pixelY;
                lastX = label.pixelX;
              }
            }

            lastY = 0;
            lastX = 0;

            for (var i = 0; i < count; i++) {
              var label = this.labels.getIndex(i);

              if (label.visible && !label.__disabled) {
                if (label.invalid) {
                  label.validate();
                }

                if (this.orientation == "vertical") {
                  if (label.pixelY < lastY) {
                    label.y = Math.min(1000000, lastY);
                  }
                } // horizontal
                else {
                  if (label.pixelX < lastX) {
                    label.x = Math.min(1000000, lastX);
                  }
                }

                lastY += label.measuredHeight;
                lastX += label.measuredWidth;
              }
            }
          }
        }
      }
    }
  };
  /**
   * Positions series bullet.
   *
   * @ignore Exclude from docs
   * @param bullet  Bullet
   */


  FunnelSeries.prototype.positionBullet = function (bullet) {
    _super.prototype.positionBullet.call(this, bullet);

    var dataItem = bullet.dataItem;
    var slice = dataItem.slice;
    var locationX = bullet.locationX;

    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_7__.isNumber(locationX)) {
      locationX = 0.5;
    }

    var locationY = bullet.locationY;

    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_7__.isNumber(locationY)) {
      locationY = 1;
    }

    bullet.x = slice.pixelX + slice.measuredWidth * locationX;
    bullet.y = slice.pixelY + slice.measuredHeight * locationY;
  };

  Object.defineProperty(FunnelSeries.prototype, "orientation", {
    /**
     * @return Orientation
     */
    get: function get() {
      return this.getPropertyValue("orientation");
    },

    /**
     * Orientation of the funnel slices: "horizontal" or "vertical" (default).
     *
     * @default "vertical"
     * @param value Orientation
     */
    set: function set(value) {
      if (this.setPropertyValue("orientation", value)) {
        this.labelsOpposite = this.labelsOpposite;
        this.invalidate();

        if (value == "vertical") {
          this.ticks.template.locationX = 1;
          this.ticks.template.locationY = 0.5;
          this.labels.template.rotation = 0;
          this.layout = "horizontal";
        } else {
          this.ticks.template.locationX = 0.5;
          this.ticks.template.locationY = 1;
          this.labels.template.rotation = -90;
          this.layout = "vertical";
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(FunnelSeries.prototype, "bottomRatio", {
    /**
     * @return {number}
     */
    get: function get() {
      return this.getPropertyValue("bottomRatio");
    },

    /**
     * Indicates how slice's bottom will change in relation to slices top AND
     * next slices top.
     *
     * Basically it's a relative value (0-1) that indicates bottom width
     * position between current slice's top width and the top withd of the next
     * one.
     *
     * The scale goes from 0 (closer to current slice width) to 1 (closer to next
     * slice with).
     *
     * `0` (default) will mean that bottom will be the same as top, resulting in
     * a prefectly square slice.
     *
     * From the data-viz standpoint `0` is a correct setting, since area of the
     * slices will depict their value correctly.
     *
     * `1` will mean that slice will become trapezoid with its bottom matching
     * width of the next slice.
     *
     * `0.5` will make bottom width be in the middle of width of current slice
     * and the next slice.
     *
     * @default 0
     * @param {number}
     */
    set: function set(value) {
      if (this.setPropertyValue("bottomRatio", value)) {
        this.invalidate();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(FunnelSeries.prototype, "sliceLinks", {
    /**
     * A list of elements linking each actual slice.
     *
     * Please note that links are [[FunnelSlice]] objects, just like real links,
     * so they have all the same configuration options.
     *
     * You can use `template` of this link, to specify how links will look.
     *
     * ```TypeScript
     * series.sliceLinks.template.fillOpacity = 0.5;
     * ```
     * ```JavaScript
     * series.sliceLinks.template.fillOpacity = 0.5;
     * ```
     * ```JSON
     * {
     *   // ...
     *   "series": [{
     *     "type": "FunnelSeries",
     *      // ...
     *      "sliceLinks": {
     *        "fillOpacity": 0.5
     *      }
     *   }]
     * }
     * ```
     *
     * @return Funnel links
     */
    get: function get() {
      if (!this._sliceLinks) {
        var sliceLink = new _elements_FunnelSlice__WEBPACK_IMPORTED_MODULE_1__.FunnelSlice();
        sliceLink.applyOnClones = true;
        sliceLink.fillOpacity = 0.5;
        sliceLink.expandDistance = -0.3;
        sliceLink.hiddenState.properties.opacity = 0;

        this._disposers.push(sliceLink);

        this._sliceLinks = new _core_utils_List__WEBPACK_IMPORTED_MODULE_3__.ListTemplate(sliceLink);

        this._disposers.push(new _core_utils_List__WEBPACK_IMPORTED_MODULE_3__.ListDisposer(this._sliceLinks));
      }

      return this._sliceLinks;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Shows hidden series.
   *
   * @param duration  Duration of reveal animation (ms)
   * @return Animation
   */

  FunnelSeries.prototype.show = function (duration) {
    var _this = this;

    var startIndex = this.startIndex;
    var endIndex = this.endIndex;
    var interpolationDuration = this.defaultState.transitionDuration;

    if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_7__.isNumber(duration)) {
      interpolationDuration = duration;
    }

    if (!_core_Options__WEBPACK_IMPORTED_MODULE_11__.options.animationsEnabled) {
      interpolationDuration = 0;
    }

    var delay = 0;
    _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_6__.each(_core_utils_Iterator__WEBPACK_IMPORTED_MODULE_6__.indexed(this.dataItems.iterator()), function (a) {
      var i = a[0];
      var dataItem = a[1];

      if (_this.sequencedInterpolation) {
        delay = _this.sequencedInterpolationDelay * i + interpolationDuration * (i - startIndex) / (endIndex - startIndex);
      }

      dataItem.show(interpolationDuration, delay, ["value"]);
    });

    var animation = _super.prototype.show.call(this, duration);

    return animation;
  };
  /**
   * Hides series.
   *
   * @param duration  Duration of hiding animation (ms)
   * @return Animation
   */


  FunnelSeries.prototype.hide = function (duration) {
    var _this = this;

    var fields = ["value"];
    var value = 0;
    var startIndex = this.startIndex;
    var endIndex = this.endIndex;
    var delay = 0;
    var interpolationDuration = this.hiddenState.transitionDuration;

    if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_7__.isNumber(duration)) {
      interpolationDuration = duration;
    }

    if (!_core_Options__WEBPACK_IMPORTED_MODULE_11__.options.animationsEnabled) {
      interpolationDuration = 0;
    }

    _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_6__.each(_core_utils_Iterator__WEBPACK_IMPORTED_MODULE_6__.indexed(this.dataItems.iterator()), function (a) {
      var i = a[0];
      var dataItem = a[1];

      if (_this.sequencedInterpolation) {
        delay = _this.sequencedInterpolationDelay * i + interpolationDuration * (i - startIndex) / (endIndex - startIndex);
      }

      dataItem.hide(interpolationDuration, delay, value, fields);
    });

    var animation = _super.prototype.hide.call(this, duration);

    if (animation && !animation.isFinished()) {
      animation.delay(delay);
    }

    return animation;
  };
  /**
   * @ignore
   */


  FunnelSeries.prototype.setAlignLabels = function (value) {
    _super.prototype.setAlignLabels.call(this, value);

    this.ticks.template.disabled = !value;
    var labelsContainer = this.labelsContainer;

    if (labelsContainer) {
      // do not align
      if (!value) {
        labelsContainer.width = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_9__.percent)(100);
        labelsContainer.height = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_9__.percent)(100);
      } //align
      else {
        labelsContainer.height = undefined;
        labelsContainer.width = undefined;
        labelsContainer.margin(10, 10, 10, 10);
      }
    }

    this.labelsOpposite = this.labelsOpposite;
  };

  Object.defineProperty(FunnelSeries.prototype, "labelsOpposite", {
    /**
     * @return Labels on opposite side?
     */
    get: function get() {
      return this.getPropertyValue("labelsOpposite");
    },

    /**
     * Put labels on the oppsite side of the series?
     *
     * This setting is only used if `alignLabels = true`.
     *
     * If set to `true` (default) labels will be drawn to the right (on vertical
     * series), or to the bottom (on horizontal series).
     *
     * If set to `false`, labels will be positioned to the left or top
     * respectively.
     *
     * @default true
     * @since 4.1.13
     * @param  value  Labels on opposite side?
     */
    set: function set(value) {
      this.setPropertyValue("labelsOpposite", value);
      var labelTemplate = this.labels.template;
      var labelAlign = "none";
      var labelValign = "none";

      if (!this.alignLabels) {
        if (this.orientation == "vertical") {
          labelAlign = "center";
        } else {
          labelValign = "middle";
        }
      } else {
        // opposite (left/bottom)
        if (value) {
          this.labelsContainer.toFront(); // left

          if (this.orientation == "vertical") {
            this.ticks.template.locationX = 1;
            labelTemplate.horizontalCenter = "left";
            labelAlign = "right";
          } // bottom
          else {
            this.ticks.template.locationY = 1;
            labelTemplate.horizontalCenter = "right";
            labelValign = "bottom";
          }
        } // non oposite (right/top)
        else {
          this.labelsContainer.toBack(); // right

          if (this.orientation == "vertical") {
            this.ticks.template.locationX = 0;
            labelAlign = "left";
          } // top
          else {
            labelValign = "top";
            this.ticks.template.locationY = 0;
          }
        }
      }

      labelTemplate.align = labelAlign;
      labelTemplate.valign = labelValign;
      this.validateLayout();
      this.ticks.each(function (tick) {
        tick.invalidate();
      });
      this.invalidateDataItems();
    },
    enumerable: true,
    configurable: true
  });
  return FunnelSeries;
}(_PercentSeries__WEBPACK_IMPORTED_MODULE_0__.PercentSeries);


/**
 * bboxter class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_4__.registry.registeredClasses.FunnelSeries = FunnelSeries;
_core_Registry__WEBPACK_IMPORTED_MODULE_4__.registry.registeredClasses.FunnelSeriesDataItem = FunnelSeriesDataItem;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/series/LineSeries.js":
/*!********************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/series/LineSeries.js ***!
  \********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "LineSeries": () => (/* binding */ LineSeries),
/* harmony export */   "LineSeriesDataItem": () => (/* binding */ LineSeriesDataItem)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _XYSeries__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./XYSeries */ "./node_modules/@amcharts/amcharts4/.internal/charts/series/XYSeries.js");
/* harmony import */ var _core_Sprite__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/Sprite */ "./node_modules/@amcharts/amcharts4/.internal/core/Sprite.js");
/* harmony import */ var _core_Container__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/Container */ "./node_modules/@amcharts/amcharts4/.internal/core/Container.js");
/* harmony import */ var _core_utils_List__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/utils/List */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/List.js");
/* harmony import */ var _LineSeriesSegment__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./LineSeriesSegment */ "./node_modules/@amcharts/amcharts4/.internal/charts/series/LineSeriesSegment.js");
/* harmony import */ var _axes_ValueAxis__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../axes/ValueAxis */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/ValueAxis.js");
/* harmony import */ var _axes_DateAxis__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../axes/DateAxis */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/DateAxis.js");
/* harmony import */ var _axes_DurationAxis__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../axes/DurationAxis */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/DurationAxis.js");
/* harmony import */ var _axes_CategoryAxis__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../axes/CategoryAxis */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/CategoryAxis.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_elements_Line__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../core/elements/Line */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Line.js");
/* harmony import */ var _core_elements_Label__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../core/elements/Label */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Label.js");
/* harmony import */ var _core_elements_Rectangle__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../core/elements/Rectangle */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Rectangle.js");
/* harmony import */ var _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../core/utils/Iterator */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Iterator.js");
/* harmony import */ var _core_utils_Object__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../core/utils/Object */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Object.js");
/* harmony import */ var _core_utils_Type__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../core/utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/* harmony import */ var _core_utils_Array__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../core/utils/Array */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Array.js");
/* harmony import */ var _elements_Bullet__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../elements/Bullet */ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/Bullet.js");
/**
 * Line series module.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */



















/**
 * ============================================================================
 * DATA ITEM
 * ============================================================================
 * @hidden
 */

/**
 * Defines a [[DataItem]] for [[LineSeries]].
 *
 * @see {@link DataItem}
 */

var LineSeriesDataItem =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_18__.__extends)(LineSeriesDataItem, _super);
  /**
   * Constructor
   */


  function LineSeriesDataItem() {
    var _this = _super.call(this) || this;

    _this.className = "LineSeriesDataItem";
    return _this;
  }

  return LineSeriesDataItem;
}(_XYSeries__WEBPACK_IMPORTED_MODULE_0__.XYSeriesDataItem);


/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Defines [[Series]] for a line graph.
 *
 * @see {@link ILineSeriesEvents} for a list of available Events
 * @see {@link ILineSeriesAdapters} for a list of available Adapters
 * @todo Example
 * @important
 */

var LineSeries =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_18__.__extends)(LineSeries, _super);
  /**
   * Constructor
   */


  function LineSeries() {
    var _this = _super.call(this) || this;
    /**
     * Minimum distance in pixels between two adjacent points.
     *
     * If the distance is less than this setting, a point is skipped.
     *
     * This allows acceptable performance with huge amounts of data points.
     *
     * @default 0.5
     */


    _this.minDistance = 0.5;
    _this.segments = new _core_utils_List__WEBPACK_IMPORTED_MODULE_3__.ListTemplate(_this.createSegment());
    _this.segments.template.applyOnClones = true;

    _this._disposers.push(new _core_utils_List__WEBPACK_IMPORTED_MODULE_3__.ListDisposer(_this.segments));

    _this._disposers.push(_this.segments.template);

    _this._segmentsIterator = new _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_13__.ListIterator(_this.segments, function () {
      return _this.segments.create();
    });
    _this._segmentsIterator.createNewItems = true;
    _this.className = "LineSeries";
    _this.strokeOpacity = 1;
    _this.fillOpacity = 0;
    _this.connect = true;
    _this.tensionX = 1;
    _this.tensionY = 1;
    _this.autoGapCount = 1.1;
    _this.smoothing = "bezier";
    _this.segmentsContainer = _this.mainContainer.createChild(_core_Container__WEBPACK_IMPORTED_MODULE_2__.Container);
    _this.segmentsContainer.isMeasured = false; // line series might have multiple segments and it has a separate sprite for fill and stroke for each segment. So we need to observe all the changes on series and set them on the segments
    // todo: we need list here, otherwise everything will be redrawn event on change of properties like tooltipX or similar.
    // this.addEventListener(SpriteEvent.PROPERTY_CHANGED, this.validateDataElements, false, this);

    _this.bulletsContainer.toFront();

    _this.applyTheme();

    return _this;
  }
  /**
   * Sets defaults that instantiate some objects that rely on parent, so they
   * cannot be set in constructor.
   */


  LineSeries.prototype.applyInternalDefaults = function () {
    _super.prototype.applyInternalDefaults.call(this);

    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_15__.hasValue(this.readerTitle)) {
      this.readerTitle = this.language.translate("Line Series");
    }
  };
  /**
   * @ignore
   */


  LineSeries.prototype.createSegment = function () {
    return new _LineSeriesSegment__WEBPACK_IMPORTED_MODULE_4__.LineSeriesSegment();
  };
  /**
   * Returns a new/empty DataItem of the type appropriate for this object.
   *
   * @see {@link DataItem}
   * @return Data Item
   */


  LineSeries.prototype.createDataItem = function () {
    return new LineSeriesDataItem();
  };
  /**
   * Inits data item's working values.
   *
   * @param dataItem  Data item
   * @param index     Data item's index
   */


  LineSeries.prototype.setInitialWorkingValues = function (dataItem) {
    // this makes data items animate when added
    var yAxis = this._yAxis.get();

    var xAxis = this._xAxis.get();

    if (this.appeared && this.visible) {
      var previousDataItem = this.dataItems.getIndex(dataItem.index - 1);
      dataItem.component = this; // as these values are set before, we don't know component yet

      if (this.baseAxis == xAxis) {
        if (yAxis instanceof _axes_ValueAxis__WEBPACK_IMPORTED_MODULE_5__.ValueAxis) {
          var initialY = yAxis.minZoomed;

          if (previousDataItem) {
            initialY = previousDataItem.values["valueY"].workingValue;
          } // this makes line animate from previous point to newly added point


          dataItem.setWorkingValue("valueY", initialY, 0);
          dataItem.setWorkingValue("valueY", dataItem.values.valueY.value);

          if (xAxis instanceof _axes_DateAxis__WEBPACK_IMPORTED_MODULE_6__.DateAxis) {
            dataItem.setWorkingLocation("dateX", dataItem.locations.dateX - 1, 0); // instantly move it to previous

            dataItem.setWorkingLocation("dateX", dataItem.locations.dateX); // animate to it's location
          } else if (xAxis instanceof _axes_DurationAxis__WEBPACK_IMPORTED_MODULE_7__.DurationAxis) {
            if (previousDataItem) {
              var value = dataItem.valueX;
              dataItem.setWorkingValue("valueX", previousDataItem.valueX, 0); // instantly move it to previous

              dataItem.setWorkingValue("valueX", value); // animate to new value
            }
          }
        }
      }

      if (this.baseAxis == yAxis) {
        if (xAxis instanceof _axes_ValueAxis__WEBPACK_IMPORTED_MODULE_5__.ValueAxis) {
          var initialX = xAxis.minZoomed;

          if (previousDataItem) {
            initialX = previousDataItem.values["valueX"].workingValue;
          }

          dataItem.setWorkingValue("valueX", initialX, 0);
          dataItem.setWorkingValue("valueX", dataItem.values.valueX.value);

          if (yAxis instanceof _axes_DateAxis__WEBPACK_IMPORTED_MODULE_6__.DateAxis) {
            dataItem.setWorkingLocation("dateY", dataItem.locations.dateX - 1, 0); // instantly move it to previous

            dataItem.setWorkingLocation("dateY", dataItem.locations.dateY); // animate to it's location
          } else if (yAxis instanceof _axes_DurationAxis__WEBPACK_IMPORTED_MODULE_7__.DurationAxis) {
            if (previousDataItem) {
              var value = dataItem.valueY;
              dataItem.setWorkingValue("valueY", previousDataItem.valueY, 0); // instantly move it to previous

              dataItem.setWorkingValue("valueY", value); // animate to new value
            }
          }
        }
      }
    } else {
      if (this.baseAxis == xAxis) {
        if (yAxis instanceof _axes_ValueAxis__WEBPACK_IMPORTED_MODULE_5__.ValueAxis) {
          if (xAxis instanceof _axes_DateAxis__WEBPACK_IMPORTED_MODULE_6__.DateAxis) {
            dataItem.setWorkingLocation("dateX", dataItem.locations.dateX);
          }

          if (xAxis instanceof _axes_CategoryAxis__WEBPACK_IMPORTED_MODULE_8__.CategoryAxis) {
            dataItem.setWorkingLocation("categoryX", dataItem.locations.categoryX);
          }
        }
      }

      if (this.baseAxis == yAxis) {
        if (xAxis instanceof _axes_ValueAxis__WEBPACK_IMPORTED_MODULE_5__.ValueAxis) {
          if (yAxis instanceof _axes_DateAxis__WEBPACK_IMPORTED_MODULE_6__.DateAxis) {
            dataItem.setWorkingLocation("dateY", dataItem.locations.dateY);
          }

          if (yAxis instanceof _axes_CategoryAxis__WEBPACK_IMPORTED_MODULE_8__.CategoryAxis) {
            dataItem.setWorkingLocation("categoryY", dataItem.locations.categoryY);
          }
        }
      }
    }
  };
  /**
   * Updates corresponding legend data item with current values.
   *
   * @ignore Exclude from docs
   * @param dataItem  Data item
   */


  LineSeries.prototype.updateLegendValue = function (dataItem, notRange) {
    _super.prototype.updateLegendValue.call(this, dataItem, notRange); //This is hack to save some methos, used to set tooltip color source only


    if (dataItem && dataItem.segment) {
      this.tooltipColorSource = dataItem.segment;
    }
  };
  /**
   * (Re)validates the whole series, effectively causing it to redraw.
   *
   * @ignore Exclude from docs
   */


  LineSeries.prototype.validate = function () {
    var _this = this;

    _super.prototype.validate.call(this);

    if (this.xAxis && this.yAxis) {
      this._segmentsIterator.reset();

      this.openSegmentWrapper(this._adjustedStartIndex);
      _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_13__.each(this.axisRanges.iterator(), function (range) {
        _this.openSegmentWrapper(_this._adjustedStartIndex, range);
      });
      _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_13__.each(this._segmentsIterator.iterator(), function (segment) {
        segment.__disabled = true;
      });
    }
  };
  /**
   * [sliceData description]
   *
   * @todo Description
   */


  LineSeries.prototype.sliceData = function () {
    var startIndex = this.startIndex;
    var endIndex = this.endIndex; // we need extra one item to both sides with values for line series, otherwise the line will not continue out of bounds of the chart while scrolling
    // find first to the left
    // TODO use iterator instead

    for (var i = this.startIndex - 1; i >= 0; i--) {
      var dataItem = this.dataItems.getIndex(i);

      if (dataItem && dataItem.hasValue(this._xValueFields) && dataItem.hasValue(this._yValueFields)) {
        startIndex = i;
        break;
      }
    }

    this._adjustedStartIndex = this.findAdjustedIndex(startIndex, ["stroke", "strokeWidth", "strokeDasharray", "strokeOpacity", "fill", "fillOpacity", "opacity"]); // find first to the right
    // TODO use iterator instead

    for (var i = this.endIndex, len = this.dataItems.length; i < len; i++) {
      var dataItem = this.dataItems.getIndex(i);

      if (dataItem && dataItem.hasValue(this._xValueFields) && dataItem.hasValue(this._yValueFields)) {
        endIndex = i + 1;
        break;
      }
    }

    this._workingStartIndex = startIndex;
    this._workingEndIndex = endIndex;
  };
  /**
   * @ignore
   */


  LineSeries.prototype.findAdjustedIndex = function (adjustedIndex, properties) {
    var _this = this;

    var propertyFields = this.propertyFields;
    var startIndex = adjustedIndex;
    _core_utils_Array__WEBPACK_IMPORTED_MODULE_16__.each(properties, function (property) {
      if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_15__.hasValue(propertyFields[property])) {
        for (var i = startIndex; i >= 0; i--) {
          var dataItem = _this.dataItems.getIndex(i);

          if (dataItem) {
            if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_15__.hasValue(dataItem.properties[property])) {
              if (adjustedIndex > i) {
                adjustedIndex = i;
              }

              break;
            }
          }
        }
      }
    });
    return adjustedIndex;
  };
  /**
   * Wraps openSegment call with iterative solution to prevent stack overflow
   *
   * @param openIndex  Index
   * @param axisRange  Range
   */


  LineSeries.prototype.openSegmentWrapper = function (openIndex, axisRange) {
    var params = {
      "index": openIndex,
      "axisRange": axisRange
    };

    do {
      params = this.openSegment(params.index, params.axisRange);
    } while (params);
  };

  LineSeries.prototype.getSegment = function () {
    var segment = this._segmentsIterator.getFirst();

    segment.series = this;

    if (segment.isDisposed()) {
      this.segments.removeValue(segment);
      return this.getSegment();
    }

    return segment;
  };
  /**
   * [openSegment description]
   *
   * @todo Description
   * @param openIndex  [description]
   * @param axisRange  [description]
   */


  LineSeries.prototype.openSegment = function (openIndex, axisRange) {
    var addToClose = false;
    var points = [];
    openIndex = Math.min(openIndex, this.dataItems.length);
    var endIndex = Math.min(this._workingEndIndex, this.dataItems.length);
    this._workingEndIndex = Math.min(this._workingEndIndex, this.dataItems.length);
    var closeIndex;
    var propertiesChanged = false;
    var segment = this.getSegment();
    segment.strokeDasharray = undefined;
    segment.__disabled = false;

    if (axisRange) {
      segment.parent = axisRange.contents;
      _core_utils_Object__WEBPACK_IMPORTED_MODULE_14__.copyProperties(axisRange.contents, segment, _core_Sprite__WEBPACK_IMPORTED_MODULE_1__.visualProperties);
    } else {
      _core_utils_Object__WEBPACK_IMPORTED_MODULE_14__.copyProperties(this, segment, _core_Sprite__WEBPACK_IMPORTED_MODULE_1__.visualProperties);
      segment.filters.clear();
      segment.parent = this.segmentsContainer;
    }

    this.group.node.removeAttribute("fill");
    var connect = this.connect;
    var valuesFound = false; // some flag to avoid multiple closes if no values found

    for (var i = openIndex; i < endIndex; i++) {
      var dataItem = this.dataItems.getIndex(i);
      dataItem.segment = segment;

      if (dataItem.hasProperties) {
        // if this is first item of segment
        if (i == openIndex) {
          this.updateSegmentProperties(dataItem.properties, segment);
        } else {
          // this time we only need to know if properties changed, so we don't pass segment
          propertiesChanged = this.updateSegmentProperties(dataItem.properties, segment, true);
        }
      }

      if (dataItem.hasValue(this._xValueFields) && dataItem.hasValue(this._yValueFields)) {
        this.addPoints(points, dataItem, this.xField, this.yField);
        valuesFound = true;
      } else {
        // if no values in first data item, go to next
        if (i == openIndex) {
          continue;
        } else {
          // stop cycle
          if (!connect && valuesFound) {
            closeIndex = i;
            break;
          }
        }
      }

      closeIndex = i;

      if (this.baseAxis instanceof _axes_DateAxis__WEBPACK_IMPORTED_MODULE_6__.DateAxis) {
        var next = this.dataItems.getIndex(i + 1);

        if (next && this.baseAxis.makeGap(next, dataItem)) {
          addToClose = true;
          break;
        }
      }

      if (propertiesChanged) {
        break;
      }
    }

    return this.closeSegment(segment, points, openIndex, closeIndex, axisRange, addToClose);
  };
  /**
   * [addPoints description]
   *
   * @todo Description
   * @param points    [description]
   * @param dataItem  [description]
   * @param xField    [description]
   * @param yField    [description]
   * @param backwards [description]
   */


  LineSeries.prototype.addPoints = function (points, dataItem, xField, yField, backwards) {
    var point = this.getPoint(dataItem, xField, yField, dataItem.workingLocations[xField], dataItem.workingLocations[yField]);

    if (!backwards) {
      dataItem.point = point;
    }

    points.push(point);
  };
  /**
   * [closeSegment description]
   *
   * @todo Description
   * @param segment    [description]
   * @param points     [description]
   * @param openIndex  [description]
   * @param closeIndex [description]
   * @param axisRange  [description]
   */


  LineSeries.prototype.closeSegment = function (segment, points, openIndex, closeIndex, axisRange, add) {
    var closePoints = [];

    if (this.dataFields[this._xOpenField] || this.dataFields[this._yOpenField] || this.stacked) {
      for (var i = closeIndex; i >= openIndex; i--) {
        var dataItem = this.dataItems.getIndex(i);

        if (dataItem.hasValue(this._xValueFields) && dataItem.hasValue(this._yValueFields)) {
          // not sure, this means that open point will only be added if value is also set for this point, but maybe it's ok.
          this.addPoints(closePoints, dataItem, this.xOpenField, this.yOpenField, true);
        }
      }
    } else {
      var baseAxis = this.baseAxis;
      var count = points.length;
      var xAxis = this.xAxis;
      var yAxis = this.yAxis;

      if (count > 0) {
        if (baseAxis == xAxis) {
          closePoints.push({
            x: points[count - 1].x,
            y: yAxis.basePoint.y
          }); // last x

          closePoints.push({
            x: points[0].x,
            y: yAxis.basePoint.y
          }); // first x
        } else {
          closePoints.push({
            x: xAxis.basePoint.x,
            y: points[count - 1].y
          }); // last y

          closePoints.push({
            x: xAxis.basePoint.x,
            y: points[0].y
          }); // first y
        }
      }
    }

    this.drawSegment(segment, points, closePoints);

    if (add) {
      closeIndex++;
    }

    if (closeIndex < this._workingEndIndex - 1) {
      return {
        "index": closeIndex,
        "axisRange": axisRange
      };
    } else {
      return null;
    }
  };
  /**
   * Draws the line segment.
   *
   * @param segment     Segment
   * @param points      Segment points
   * @param closePoints Segment close points
   */


  LineSeries.prototype.drawSegment = function (segment, points, closePoints) {
    segment.drawSegment(points, closePoints, this.tensionX, this.tensionY);
  };
  /**
   * Segement will get its colors from `this.dataItem`, as thats how
   * `getPropertyValue()` method works.
   *
   * We pass `lineSeriesDataItem.properties` as item here each time when a flag
   * `hasProperties` is set to `true` on data item (this means it can contain
   * some properties set).
   *
   * @param itemProperties  Item properties
   * @param segment         Segment
   * @return Properties changed?
   */


  LineSeries.prototype.updateSegmentProperties = function (itemProperties, segment, checkOnly) {
    var changed = false;
    _core_utils_Object__WEBPACK_IMPORTED_MODULE_14__.each(itemProperties, function (propertyName, value) {
      // some value must be defined
      if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_15__.hasValue(value)) {
        var currentValue = segment[propertyName];
        var currentValueStr = void 0; // current value can be Color, number, anything. So we check if it has toString, otherwise just do String().
        // toString() will return hex if it's color. The only problem is that it will return lowercased hex and if we have uppercase in data, it will think that it changed

        if (currentValue) {
          if (currentValue.toString) {
            currentValueStr = currentValue.toString();
          } else {
            currentValueStr = currentValue; // not doing String(currentValue) as this will make all Objects the same
          }
        }

        var valueStr = void 0;

        if (value) {
          if (value.toString) {
            valueStr = value.toString();
          } else {
            valueStr = value; // not doing String(currentValue) as this will make all Objects the same
          }
        }

        if (currentValue == value || currentValueStr != undefined && valueStr != undefined && currentValueStr == valueStr) {// void
        } else {
          if (!checkOnly) {
            segment[propertyName] = value;
          }

          changed = true;
        }
      }
    });
    return changed;
  };

  Object.defineProperty(LineSeries.prototype, "connect", {
    /**
     * @return Connect?
     */
    get: function get() {
      return this.getPropertyValue("connect");
    },

    /**
     * Connect the lines over empty data points?
     *
     * If set to `true` the line will connect two adjacent data points by a
     * straight line. Even if there are data points with missing values
     * in-between.
     *
     * If you set this to `false`, the line will break when there are missing
     * values.
     *
     * @see {@link https://www.amcharts.com/docs/v4/chart-types/xy-chart/#Line_series_with_gaps} for more information about this feature
     * @default true
     * @param value  Connect?
     */
    set: function set(value) {
      if (this.setPropertyValue("connect", value)) {
        this.invalidate();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(LineSeries.prototype, "tensionX", {
    /**
     * @return Horizontal tension (0-1)
     */
    get: function get() {
      return this.getPropertyValue("tensionX");
    },

    /**
     * Horizontal tension setting of the line (0-1).
     *
     * Can be used to create smoothed lines. It works like this:
     *
     * Accepted values are in the range between 0 and 1. The biggest value (1)
     * will mean that the "tension" is very high, so the line is maximally
     * attracted to the points it connects, hence the straight line.
     *
     * Using smaller numbers will "relax" the tension, creating some curving.
     *
     * The smaller the tension setting, the more relaxed the line and the more
     * wide the curve.
     *
     * This setting is for horizontal tension, meaning the curve will bend in
     * such way that it never goes below or above connecting points. To enable
     * vertical bending as well, use `tensionY`.
     *
     * IMPORTANT: line smoothing works best when data items are placed at regular
     * intervals. For setups where data items are spaced erratically, enabling
     * smoothing might result in awkwardly looking lines.
     *
     * @default 1
     * @param value  Horizontal tension (0-1)
     */
    set: function set(value) {
      this.setPropertyValue("tensionX", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(LineSeries.prototype, "tensionY", {
    /**
     * @return Vertical tension (0-1)
     */
    get: function get() {
      return this.getPropertyValue("tensionY");
    },

    /**
     * Can be used to create smoothed lines. It works like this:
     *
     * Accepted values are in the range between 0 and 1. The biggest value (1)
     * will mean that the "tension" is very high, so the line is maximally
     * attracted to the points it connects, hence the straight line.
     *
     * Using smaller numbers will "relax" the tension, creating some curving.
     *
     * The smaller the tension setting, the more relaxed the line and the more
     * wide the curve.
     *
     * This setting is for vertical tension, meaning the curve might bend in
     * such way that it will go below or above connected points.
     *
     * Combine this setting with `tensionX` to create beautifully looking
     * smoothed line series.
     *
     * @default 1
     * @param value  Vertical tension (0-1)
     */
    set: function set(value) {
      this.setPropertyValue("tensionY", value, true);
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Creates elements in related legend container, that mimics the look of this
   * Series.
   *
   * @ignore Exclude from docs
   * @param marker  Legend item container
   */

  LineSeries.prototype.createLegendMarker = function (marker) {
    var _this = this;

    var w = marker.pixelWidth;
    var h = marker.pixelHeight;
    marker.disposeChildren();
    var line = marker.createChild(_core_elements_Line__WEBPACK_IMPORTED_MODULE_10__.Line);
    line.shouldClone = false; //line.copyFrom(<any>this); coppies events which is not good

    _core_utils_Object__WEBPACK_IMPORTED_MODULE_14__.copyProperties(this, line, _core_Sprite__WEBPACK_IMPORTED_MODULE_1__.visualProperties);
    line.x2 = w;
    line.y = h / 2;
    line.y2 = 0.00001;
    line.visible = true;

    if (this.fillOpacity > 0) {
      var fill = marker.createChild(_core_elements_Rectangle__WEBPACK_IMPORTED_MODULE_12__.Rectangle); //fill.copyFrom(<any>this); coppies events which is not good

      _core_utils_Object__WEBPACK_IMPORTED_MODULE_14__.copyProperties(this, fill, _core_Sprite__WEBPACK_IMPORTED_MODULE_1__.visualProperties);
      fill.width = w;
      fill.height = h;
      fill.y = 0;
      fill.strokeOpacity = 0;
      fill.visible = true;
      line.y = 0;
    }

    var legendDataItem = marker.dataItem;
    legendDataItem.color = this.stroke;
    legendDataItem.colorOrig = this.fill;
    _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_13__.eachContinue(this.bullets.iterator(), function (bullet) {
      if (bullet instanceof _elements_Bullet__WEBPACK_IMPORTED_MODULE_17__.Bullet && !bullet.copyToLegendMarker) {
        return false;
      }

      var hasLabels = false;

      if (bullet instanceof _core_Container__WEBPACK_IMPORTED_MODULE_2__.Container) {
        // do not copy bullets with labels
        _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_13__.each(bullet.children.iterator(), function (child) {
          if (child instanceof _core_elements_Label__WEBPACK_IMPORTED_MODULE_11__.Label) {
            hasLabels = true;
            return true;
          }
        });
      }

      if (!hasLabels) {
        var clone = bullet.clone();
        clone.parent = marker;
        clone.isMeasured = true;
        clone.tooltipText = undefined;
        clone.x = w / 2;

        if (_this.fillOpacity > 0) {
          clone.y = 0;
        } else {
          clone.y = h / 2;
        }

        clone.visible = true; // otherwise will not transit to color after hiding

        if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_15__.hasValue(clone.fill)) {
          clone.fill = _this.fill;
        }

        if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_15__.hasValue(clone.stroke)) {
          clone.stroke = _this.stroke;
        }

        return false;
      }
    });
  };
  /**
   * @ignore
   */


  LineSeries.prototype.disposeData = function () {
    _super.prototype.disposeData.call(this);

    this.segments.clear();
  };

  Object.defineProperty(LineSeries.prototype, "autoGapCount", {
    /**
     * @return Gap count
     */
    get: function get() {
      return this.getPropertyValue("autoGapCount");
    },

    /**
     * If `connect = false` and distance between two data points is bigger
     * than `baseInterval * autoGapCount`, a line will break automatically.
     *
     * @since 4.2.4
     * @param  value  Gap count
     */
    set: function set(value) {
      this.setPropertyValue("autoGapCount", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(LineSeries.prototype, "smoothing", {
    /**
     * @return Smoothing algorithm
     */
    get: function get() {
      return this.getPropertyValue("smoothing");
    },

    /**
     * Smoothing algorithm to be used for lines.
     *
     * Available options: `"bezier"` (default), `"monotoneX"`, and `"monotoneY"`.
     *
     * Monotone options are best suited for data with irregular intervals. Use `"monotoneX"` for
     * horizontal lines, and `"monotoneY"` vertical ones.
     *
     * NOTE: Both "monotone" algorithms will ignore `tensionX` and `tensionY` settings.
     *
     * @since 4.10.0
     * @param  value  Smoothing algorithm
     */
    set: function set(value) {
      this.setPropertyValue("smoothing", value, true);
    },
    enumerable: true,
    configurable: true
  });
  return LineSeries;
}(_XYSeries__WEBPACK_IMPORTED_MODULE_0__.XYSeries);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_9__.registry.registeredClasses.LineSeries = LineSeries;
_core_Registry__WEBPACK_IMPORTED_MODULE_9__.registry.registeredClasses.LineSeriesDataItem = LineSeriesDataItem;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/series/LineSeriesSegment.js":
/*!***************************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/series/LineSeriesSegment.js ***!
  \***************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "LineSeriesSegment": () => (/* binding */ LineSeriesSegment)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _core_Container__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../core/Container */ "./node_modules/@amcharts/amcharts4/.internal/core/Container.js");
/* harmony import */ var _core_Sprite__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/Sprite */ "./node_modules/@amcharts/amcharts4/.internal/core/Sprite.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_rendering_Path__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/rendering/Path */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Path.js");
/* harmony import */ var _core_utils_Object__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../core/utils/Object */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Object.js");
/* harmony import */ var _core_utils_Type__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../core/utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/* harmony import */ var _core_utils_Color__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../core/utils/Color */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Color.js");
/* harmony import */ var _core_rendering_Smoothing__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../core/rendering/Smoothing */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Smoothing.js");
/**
 * Line series segment module.
 * @todo Add description about what this is
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */









/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Represents a line series segment.
 *
 * A line segment can be used to apply different properties to a part of the
 * line series, between two data points.
 *
 * @see {@link ILineSeriesSegmentEvents} for a list of available events
 * @see {@link ILineSeriesSegmentAdapters} for a list of available Adapters
 * @todo Example
 */

var LineSeriesSegment =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_8__.__extends)(LineSeriesSegment, _super);
  /**
   * Constructor
   */


  function LineSeriesSegment() {
    var _this = // Init
    _super.call(this) || this;

    _this.className = "LineSeriesSegment"; // Set defaults

    _this.isMeasured = false;
    _this.interactionsEnabled = false;
    _this.layout = "none"; // Create fill element

    var fillSprite = _this.createChild(_core_Sprite__WEBPACK_IMPORTED_MODULE_1__.Sprite);

    _this.fillSprite = fillSprite;
    fillSprite.shouldClone = false;
    fillSprite.setElement(_this.paper.add("path"));
    fillSprite.isMeasured = false;

    _this._disposers.push(fillSprite); // Create line element


    var strokeSprite = _this.createChild(_core_Sprite__WEBPACK_IMPORTED_MODULE_1__.Sprite);

    _this.strokeSprite = strokeSprite;
    strokeSprite.shouldClone = false;
    strokeSprite.fill = (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_6__.color)();
    strokeSprite.setElement(_this.paper.add("path"));
    strokeSprite.isMeasured = false;

    _this._disposers.push(strokeSprite);

    return _this;
  }
  /**
   * Draws the series segment.
   *
   * @ignore Exclude from docs
   * @param points       Points to connect
   * @param closePoints  ?
   * @param smoothnessX  Horizontal bezier setting (?)
   * @param smoothnessY  Vertical bezier setting (?)
   */


  LineSeriesSegment.prototype.drawSegment = function (points, closePoints, smoothnessX, smoothnessY) {
    if (!this.disabled) {
      if (points.length > 0 && closePoints.length > 0 && _core_utils_Type__WEBPACK_IMPORTED_MODULE_5__.isNumber(points[0].x) && _core_utils_Type__WEBPACK_IMPORTED_MODULE_5__.isNumber(points[0].y)) {
        // first moveTo helps to avoid Chrome straight line in the mask bug.
        var path = _core_rendering_Path__WEBPACK_IMPORTED_MODULE_3__.moveTo({
          x: points[0].x - 0.2,
          y: points[0].y - 0.2
        }) + _core_rendering_Path__WEBPACK_IMPORTED_MODULE_3__.moveTo(points[0]);
        var series = this.series;

        if (series.smoothing == "bezier") {
          path += new _core_rendering_Smoothing__WEBPACK_IMPORTED_MODULE_7__.Tension(smoothnessX, smoothnessY).smooth(points);
        } else if (series.smoothing == "monotoneX") {
          path += new _core_rendering_Smoothing__WEBPACK_IMPORTED_MODULE_7__.MonotoneX({
            closed: false
          }).smooth(points);
        } else if (series.smoothing == "monotoneY") {
          path += new _core_rendering_Smoothing__WEBPACK_IMPORTED_MODULE_7__.MonotoneY({
            closed: false
          }).smooth(points);
        }

        if (this.strokeOpacity == 0 || this.strokeSprite.strokeOpacity == 0) {// like this and not if != 0, otherwise ranges stroke won't be drawn.
        } else {
          this.strokeSprite.path = path;
        }

        if (this.fillOpacity > 0 || this.fillSprite.fillOpacity > 0) {
          // helps to avoid drawing fill object if fill is not visible
          if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_5__.isNumber(closePoints[0].x) && _core_utils_Type__WEBPACK_IMPORTED_MODULE_5__.isNumber(closePoints[0].y)) {
            path += _core_rendering_Path__WEBPACK_IMPORTED_MODULE_3__.lineTo(closePoints[0]);

            if (series.smoothing == "bezier") {
              path += new _core_rendering_Smoothing__WEBPACK_IMPORTED_MODULE_7__.Tension(smoothnessX, smoothnessY).smooth(closePoints);
            } else if (series.smoothing == "monotoneX") {
              path += new _core_rendering_Smoothing__WEBPACK_IMPORTED_MODULE_7__.MonotoneX({
                closed: false
              }).smooth(closePoints);
            } else if (series.smoothing == "monotoneY") {
              path += new _core_rendering_Smoothing__WEBPACK_IMPORTED_MODULE_7__.MonotoneY({
                closed: false
              }).smooth(closePoints);
            }

            path += _core_rendering_Path__WEBPACK_IMPORTED_MODULE_3__.lineTo(points[0]);
            path += _core_rendering_Path__WEBPACK_IMPORTED_MODULE_3__.closePath();
            this.fillSprite.path = path;
          }
        }
      } else {
        this.fillSprite.path = "";
        this.strokeSprite.path = "";
      }
    }
  };
  /**
   * Copies properties from a [[Sprite]] to both line and fill elements.
   *
   * @param source Source [[Sprite]] to copy properties from
   */


  LineSeriesSegment.prototype.copyFrom = function (source) {
    _super.prototype.copyFrom.call(this, source);

    var lineElement = this.strokeSprite;
    _core_utils_Object__WEBPACK_IMPORTED_MODULE_4__.copyProperties(source, lineElement.properties, _core_Sprite__WEBPACK_IMPORTED_MODULE_1__.visualProperties);
    lineElement.events.copyFrom(source.strokeSprite.events);
    lineElement.fillOpacity = 0;
    var fillElement = this.fillSprite;
    _core_utils_Object__WEBPACK_IMPORTED_MODULE_4__.copyProperties(source, fillElement.properties, _core_Sprite__WEBPACK_IMPORTED_MODULE_1__.visualProperties);
    fillElement.events.copyFrom(source.fillSprite.events);
    fillElement.strokeOpacity = 0;
  };

  return LineSeriesSegment;
}(_core_Container__WEBPACK_IMPORTED_MODULE_0__.Container);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_2__.registry.registeredClasses.LineSeriesSegment = LineSeriesSegment;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/series/OHLCSeries.js":
/*!********************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/series/OHLCSeries.js ***!
  \********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "OHLCSeries": () => (/* binding */ OHLCSeries),
/* harmony export */   "OHLCSeriesDataItem": () => (/* binding */ OHLCSeriesDataItem)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _CandlestickSeries__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./CandlestickSeries */ "./node_modules/@amcharts/amcharts4/.internal/charts/series/CandlestickSeries.js");
/* harmony import */ var _core_Sprite__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/Sprite */ "./node_modules/@amcharts/amcharts4/.internal/core/Sprite.js");
/* harmony import */ var _elements_OHLC__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../elements/OHLC */ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/OHLC.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_utils_Object__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../core/utils/Object */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Object.js");
/* harmony import */ var _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../core/utils/Iterator */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Iterator.js");
/* harmony import */ var _core_utils_Type__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../core/utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/**
 * Candlestick Series module.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */








/**
 * ============================================================================
 * DATA ITEM
 * ============================================================================
 * @hidden
 */

/**
 * Defines a [[DataItem]] for [[OHLCSeries]].
 *
 * @see {@link DataItem}
 */

var OHLCSeriesDataItem =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_7__.__extends)(OHLCSeriesDataItem, _super);
  /**
   * Defines a type of [[Component]] this data item is used for
   * @todo Disabled to work around TS bug (see if we can re-enable it again)
   */
  //public _component!: OHLCSeries;

  /**
   * Constructor
   */


  function OHLCSeriesDataItem() {
    var _this = _super.call(this) || this;

    _this.className = "OHLCSeriesDataItem";

    _this.applyTheme();

    return _this;
  }

  return OHLCSeriesDataItem;
}(_CandlestickSeries__WEBPACK_IMPORTED_MODULE_0__.CandlestickSeriesDataItem);


/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Defines [[Series]] for a candlestick graph.
 *
 * @see {@link IOHLCSeriesEvents} for a list of available Events
 * @see {@link IOHLCSeriesAdapters} for a list of available Adapters
 * @todo Example
 * @important
 */

var OHLCSeries =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_7__.__extends)(OHLCSeries, _super);
  /**
   * Constructor
   */


  function OHLCSeries() {
    var _this = _super.call(this) || this;

    _this.className = "OHLCSeries";

    _this.applyTheme();

    return _this;
  }
  /**
   * Sets defaults that instantiate some objects that rely on parent, so they
   * cannot be set in constructor.
   */


  OHLCSeries.prototype.applyInternalDefaults = function () {
    _super.prototype.applyInternalDefaults.call(this);

    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_6__.hasValue(this.readerTitle)) {
      this.readerTitle = this.language.translate("OHLC Series");
    }
  };
  /**
   * Returns a new/empty DataItem of the type appropriate for this object.
   *
   * @see {@link DataItem}
   * @return Data Item
   */


  OHLCSeries.prototype.createDataItem = function () {
    return new OHLCSeriesDataItem();
  };

  OHLCSeries.prototype.validateCandlestick = function (dataItem) {
    var column = dataItem.column;

    if (column) {
      var openLine_1 = column.openLine;
      var highLowLine_1 = column.highLowLine;
      var closeLine_1 = column.closeLine;

      if (this.baseAxis == this.xAxis) {
        var x = column.pixelWidth / 2;
        highLowLine_1.x = x; // TODO can these be removed ?

        dataItem.getWorkingValue(this.yOpenField);
        dataItem.getWorkingValue(this.yField);
        var yOpen = this.yAxis.getY(dataItem, this.yOpenField);
        var yClose = this.yAxis.getY(dataItem, this.yField);
        var yLow = this.yAxis.getY(dataItem, this.yLowField);
        var yHigh = this.yAxis.getY(dataItem, this.yHighField);
        var pixelY = column.pixelY;
        openLine_1.y1 = yOpen - pixelY;
        openLine_1.y2 = yOpen - pixelY;
        openLine_1.x1 = 0;
        openLine_1.x2 = x;
        closeLine_1.y1 = yClose - pixelY;
        closeLine_1.y2 = yClose - pixelY;
        closeLine_1.x1 = x;
        closeLine_1.x2 = 2 * x;
        highLowLine_1.y1 = yHigh - pixelY;
        highLowLine_1.y2 = yLow - pixelY;
      }

      if (this.baseAxis == this.yAxis) {
        var y = column.pixelHeight / 2;
        highLowLine_1.y = y; // TODO can these be removed ?

        dataItem.getWorkingValue(this.xOpenField);
        dataItem.getWorkingValue(this.xField);
        var xOpen = this.xAxis.getX(dataItem, this.xOpenField);
        var xClose = this.xAxis.getX(dataItem, this.xField);
        var xLow = this.xAxis.getX(dataItem, this.xLowField);
        var xHigh = this.xAxis.getX(dataItem, this.xHighField);
        var pixelX = column.pixelX;
        openLine_1.x1 = xOpen - pixelX;
        openLine_1.x2 = xOpen - pixelX;
        openLine_1.y1 = y;
        openLine_1.y2 = 2 * y;
        closeLine_1.x1 = xClose - pixelX;
        closeLine_1.x2 = xClose - pixelX;
        closeLine_1.y1 = 0;
        closeLine_1.y2 = y;
        highLowLine_1.x1 = xHigh - pixelX;
        highLowLine_1.x2 = xLow - pixelX;
      }

      _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_5__.each(this.axisRanges.iterator(), function (axisRange) {
        var rangeColumn = dataItem.rangesColumns.getKey(axisRange.uid);

        if (rangeColumn) {
          var rangeOpenLine = rangeColumn.openLine;
          rangeOpenLine.x = openLine_1.x;
          rangeOpenLine.y = openLine_1.y;
          rangeOpenLine.x1 = openLine_1.x1;
          rangeOpenLine.x2 = openLine_1.x2;
          rangeOpenLine.y1 = openLine_1.y1;
          rangeOpenLine.y2 = openLine_1.y2;
          var rangeCloseLine = rangeColumn.closeLine;
          rangeCloseLine.x = closeLine_1.x;
          rangeCloseLine.y = closeLine_1.y;
          rangeCloseLine.x1 = closeLine_1.x1;
          rangeCloseLine.x2 = closeLine_1.x2;
          rangeCloseLine.y1 = closeLine_1.y1;
          rangeCloseLine.y2 = closeLine_1.y2;
          var rangeHighLowLine = rangeColumn.highLowLine;
          rangeHighLowLine.x = highLowLine_1.x;
          rangeHighLowLine.y = highLowLine_1.y;
          rangeHighLowLine.x1 = highLowLine_1.x1;
          rangeHighLowLine.x2 = highLowLine_1.x2;
          rangeHighLowLine.y1 = highLowLine_1.y1;
          rangeHighLowLine.y2 = highLowLine_1.y2;
        }
      });
    }
  };
  /**
   * Creates elements in related legend container, that mimics the look of this
   * Series.
   *
   * @ignore Exclude from docs
   * @param marker  Legend item container
   */


  OHLCSeries.prototype.createLegendMarker = function (marker) {
    var w = marker.pixelWidth;
    var h = marker.pixelHeight;
    marker.removeChildren();
    var column = marker.createChild(_elements_OHLC__WEBPACK_IMPORTED_MODULE_2__.OHLC);
    column.shouldClone = false;
    column.copyFrom(this.columns.template);
    var cw;
    var ch;
    var openLine = column.openLine;
    var closeLine = column.closeLine;
    var highLowLine = column.highLowLine;

    if (this.baseAxis == this.yAxis) {
      cw = w / 3;
      ch = h;
      highLowLine.y = h / 2;
      highLowLine.x2 = w;
      openLine.x = w / 3 * 2;
      openLine.y2 = h / 2;
      closeLine.x = w / 3;
      closeLine.y2 = h;
      closeLine.y1 = h / 2;
    } else {
      cw = w;
      ch = h / 3;
      highLowLine.x = w / 2;
      highLowLine.y2 = h;
      openLine.y = h / 3 * 2;
      openLine.x2 = w / 2;
      closeLine.y = h / 3;
      closeLine.x2 = w;
      closeLine.x1 = w / 2;
    }

    column.width = cw;
    column.height = ch;
    _core_utils_Object__WEBPACK_IMPORTED_MODULE_4__.copyProperties(this, marker, _core_Sprite__WEBPACK_IMPORTED_MODULE_1__.visualProperties);
    _core_utils_Object__WEBPACK_IMPORTED_MODULE_4__.copyProperties(this.columns.template, column, _core_Sprite__WEBPACK_IMPORTED_MODULE_1__.visualProperties);
    column.stroke = this.riseFromOpenState.properties.stroke;
    var legendDataItem = marker.dataItem;
    legendDataItem.color = column.stroke;
    legendDataItem.colorOrig = column.stroke;
  };
  /**
   * Returns an element to use for Candlestick
   * @ignore
   * @return Element.
   */


  OHLCSeries.prototype.createColumnTemplate = function () {
    return new _elements_OHLC__WEBPACK_IMPORTED_MODULE_2__.OHLC();
  };

  return OHLCSeries;
}(_CandlestickSeries__WEBPACK_IMPORTED_MODULE_0__.CandlestickSeries);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_3__.registry.registeredClasses.OHLCSeries = OHLCSeries;
_core_Registry__WEBPACK_IMPORTED_MODULE_3__.registry.registeredClasses.OHLCSeriesDataItem = OHLCSeriesDataItem;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/series/PercentSeries.js":
/*!***********************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/series/PercentSeries.js ***!
  \***********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "PercentSeries": () => (/* binding */ PercentSeries),
/* harmony export */   "PercentSeriesDataItem": () => (/* binding */ PercentSeriesDataItem)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Series__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Series */ "./node_modules/@amcharts/amcharts4/.internal/charts/series/Series.js");
/* harmony import */ var _core_Sprite__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/Sprite */ "./node_modules/@amcharts/amcharts4/.internal/core/Sprite.js");
/* harmony import */ var _core_elements_Label__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/elements/Label */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Label.js");
/* harmony import */ var _core_utils_Color__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/utils/Color */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Color.js");
/* harmony import */ var _elements_Tick__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../elements/Tick */ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/Tick.js");
/* harmony import */ var _core_utils_List__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../core/utils/List */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/List.js");
/* harmony import */ var _core_Container__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../core/Container */ "./node_modules/@amcharts/amcharts4/.internal/core/Container.js");
/* harmony import */ var _core_utils_ColorSet__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../core/utils/ColorSet */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/ColorSet.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../core/utils/Iterator */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Iterator.js");
/* harmony import */ var _core_utils_Ease__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../core/utils/Ease */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Ease.js");
/* harmony import */ var _core_utils_Type__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../core/utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/* harmony import */ var _core_utils_Disposer__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../core/utils/Disposer */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Disposer.js");
/* harmony import */ var _core_utils_Responsive__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../core/utils/Responsive */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Responsive.js");
/**
 * Defines Percent Chart Series.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */















/**
 * ============================================================================
 * DATA ITEM
 * ============================================================================
 * @hidden
 */
//@todo: sequenced?

/**
 * Defines a [[DataItem]] for [[PercentSeries]].
 *
 * @see {@link DataItem}
 */

var PercentSeriesDataItem =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_14__.__extends)(PercentSeriesDataItem, _super);
  /**
   * Constructor
   */


  function PercentSeriesDataItem() {
    var _this = _super.call(this) || this;

    _this.className = "PercentSeriesDataItem";

    _this.applyTheme();

    return _this;
  }
  /**
   * Adds an `id` attribute the the slice element and returns its id.
   *
   * @ignore Exclude from docs
   */


  PercentSeriesDataItem.prototype.uidAttr = function () {
    return this.slice.uidAttr();
  };
  /**
   * Hide the data item (and corresponding visual elements).
   *
   * @param duration  Duration (ms)
   * @param delay     Delay hiding (ms)
   * @param toValue   Target value for animation
   * @param fields    Fields to animate while hiding
   */


  PercentSeriesDataItem.prototype.hide = function (duration, delay, toValue, fields) {
    if (!fields) {
      fields = ["value"];
    }

    return _super.prototype.hide.call(this, duration, delay, 0, fields);
  };
  /**
   * Sets visibility of the Data Item.
   *
   * @param value Data Item
   */


  PercentSeriesDataItem.prototype.setVisibility = function (value, noChangeValues) {
    if (!noChangeValues) {
      if (value) {
        this.setWorkingValue("value", this.values["value"].value, 0, 0);
      } else {
        this.setWorkingValue("value", 0, 0, 0);
      }
    }

    _super.prototype.setVisibility.call(this, value, noChangeValues);
  };
  /**
   * Show hidden data item (and corresponding visual elements).
   *
   * @param duration  Duration (ms)
   * @param delay     Delay hiding (ms)
   * @param fields    Fields to animate while hiding
   */


  PercentSeriesDataItem.prototype.show = function (duration, delay, fields) {
    if (!fields) {
      fields = ["value"];
    }

    return _super.prototype.show.call(this, duration, delay, fields);
  };

  Object.defineProperty(PercentSeriesDataItem.prototype, "category", {
    /**
     * @return Category
     */
    get: function get() {
      return this.properties.category;
    },

    /**
     * Category.
     *
     * @param value  Category
     */
    set: function set(value) {
      this.setProperty("category", value);
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Creates a marker used in the legend for this slice.
   *
   * @ignore Exclude from docs
   * @param marker  Marker container
   */

  PercentSeriesDataItem.prototype.createLegendMarker = function (marker) {
    this.component.createLegendMarker(marker, this);
  };

  Object.defineProperty(PercentSeriesDataItem.prototype, "legendDataItem", {
    /**
     * @return Legend data item
     */
    get: function get() {
      return this._legendDataItem;
    },

    /**
     * A legend's data item, that corresponds to this data item.
     *
     * @param value  Legend data item
     */
    set: function set(value) {
      this._legendDataItem = value;

      if (value.label) {
        value.label.dataItem = this;
      }

      if (value.valueLabel) {
        value.valueLabel.dataItem = this;
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(PercentSeriesDataItem.prototype, "tick", {
    /**
     * A Tick element, related to this data item. (slice)
     *
     * @readonly
     * @return Tick element
     */
    get: function get() {
      var _this = this;

      if (!this._tick) {
        var tick_1 = this.component.ticks.create();
        this._tick = tick_1;
        this.addSprite(tick_1);

        this._disposers.push(tick_1);

        tick_1.parent = this.component.ticksContainer;

        this._disposers.push(new _core_utils_Disposer__WEBPACK_IMPORTED_MODULE_12__.Disposer(function () {
          if (_this.component) {
            _this.component.ticks.removeValue(tick_1);
          }
        }));

        tick_1.visible = this.visible;
      }

      return this._tick;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(PercentSeriesDataItem.prototype, "label", {
    /**
     * A Label element, related to this data item. (slice)
     *
     * @readonly
     * @return Label element
     */
    get: function get() {
      var _this = this;

      if (!this._label) {
        var label_1 = this.component.labels.create();
        this.addSprite(label_1);
        this._label = label_1;

        this._disposers.push(label_1);

        label_1.parent = this.component.labelsContainer;

        this._disposers.push(new _core_utils_Disposer__WEBPACK_IMPORTED_MODULE_12__.Disposer(function () {
          if (_this.component) {
            _this.component.labels.removeValue(label_1);
          }
        }));

        label_1.visible = this.visible;
      }

      return this._label;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(PercentSeriesDataItem.prototype, "slice", {
    /**
     * An element, related to this data item. (slice)
     *
     * @readonly
     * @return Slice element
     */
    get: function get() {
      var _this = this;

      if (!this._slice) {
        var component_1 = this.component;
        var slice_1 = component_1.slices.create();
        this.addSprite(slice_1);
        this._slice = slice_1;

        this._disposers.push(slice_1);

        slice_1.parent = component_1.slicesContainer;

        this._disposers.push(new _core_utils_Disposer__WEBPACK_IMPORTED_MODULE_12__.Disposer(function () {
          component_1.slices.removeValue(slice_1);
        }));

        slice_1.visible = this.visible; // Apply accessibility

        if (component_1.itemsFocusable()) {
          if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_11__.hasValue(this.component.role)) {
            this.component.role = "menu";
          }

          if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_11__.hasValue(slice_1.role)) {
            slice_1.role = "menuitem";
          }

          slice_1.focusable = true;
        } else {
          if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_11__.hasValue(this.component.role)) {
            this.component.role = "list";
          }

          if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_11__.hasValue(slice_1.role)) {
            slice_1.role = "listitem";
          }

          slice_1.focusable = false;
        } // Apply screen reader label


        if (slice_1.focusable) {
          slice_1.events.on("focus", function (ev) {
            slice_1.readerTitle = component_1.populateString(component_1.itemReaderText, _this);
          }, undefined, false);
          slice_1.events.on("blur", function (ev) {
            slice_1.readerTitle = "";
          }, undefined, false);
        }

        if (slice_1.hoverable) {
          slice_1.events.on("over", function (ev) {
            slice_1.readerTitle = component_1.populateString(component_1.itemReaderText, _this);
          }, undefined, false);
          slice_1.events.on("out", function (ev) {
            slice_1.readerTitle = "";
          }, undefined, false);
        }
      }

      return this._slice;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(PercentSeriesDataItem.prototype, "hiddenInLegend", {
    /**
     * @return Disabled in legend?
     */
    get: function get() {
      return this.properties.hiddenInLegend;
    },

    /**
     * Should dataItem (slice) be hidden in legend?
     *
     * @param value Visible in legend?
     */
    set: function set(value) {
      this.setProperty("hiddenInLegend", value);
    },
    enumerable: true,
    configurable: true
  });
  return PercentSeriesDataItem;
}(_Series__WEBPACK_IMPORTED_MODULE_0__.SeriesDataItem);


/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Defines [[PercentSeries]] which is a base class for [[PieSeries]],
 * [[FunnelSeries]], and [[PyramidSeries]].
 *
 * @see {@link IPercentSeriesEvents} for a list of available Events
 * @see {@link IPercentSeriesAdapters} for a list of available Adapters
 */

var PercentSeries =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_14__.__extends)(PercentSeries, _super);
  /**
   * Constructor
   */


  function PercentSeries() {
    var _this = _super.call(this) || this;

    _this.className = "PercentSeries";
    _this._addAllDataItems = false;
    _this.colors = new _core_utils_ColorSet__WEBPACK_IMPORTED_MODULE_7__.ColorSet();
    _this.colors.step = 1;
    _this.isMeasured = true;
    _this.calculatePercent = true;

    var slicesContainer = _this.createChild(_core_Container__WEBPACK_IMPORTED_MODULE_6__.Container);

    slicesContainer.shouldClone = false;
    slicesContainer.isMeasured = false;
    _this.slicesContainer = slicesContainer;

    var ticksContainer = _this.createChild(_core_Container__WEBPACK_IMPORTED_MODULE_6__.Container);

    ticksContainer.shouldClone = false;
    ticksContainer.isMeasured = false;
    ticksContainer.layout = "none";
    _this.ticksContainer = ticksContainer;

    var labelsContainer = _this.createChild(_core_Container__WEBPACK_IMPORTED_MODULE_6__.Container);

    labelsContainer.shouldClone = false;
    labelsContainer.isMeasured = false;
    labelsContainer.layout = "none";
    _this.labelsContainer = labelsContainer;
    _this.alignLabels = false;

    _this.bulletsContainer.toFront(); // Make all slices focusable


    _this.skipFocusThreshold = 50;
    var defaultState = _this.defaultState;
    defaultState.transitionEasing = _core_utils_Ease__WEBPACK_IMPORTED_MODULE_10__.sinOut; // Accessibility

    _this.itemReaderText = "{category}: {value.percent.formatNumber('#.#p')}";

    _this.applyTheme();

    return _this;
  }
  /**
   * Creates a slice element.
   *
   * @return Slice
   */


  PercentSeries.prototype.createSlice = function () {
    return new _core_Sprite__WEBPACK_IMPORTED_MODULE_1__.Sprite();
  };
  /**
   * Creates a tick element.
   *
   * @return Tick
   */


  PercentSeries.prototype.createTick = function () {
    return new _elements_Tick__WEBPACK_IMPORTED_MODULE_4__.Tick();
  };
  /**
   * Sreates label element.
   *
   * @return label
   */


  PercentSeries.prototype.createLabel = function () {
    return new _core_elements_Label__WEBPACK_IMPORTED_MODULE_2__.Label();
  };

  Object.defineProperty(PercentSeries.prototype, "slices", {
    /**
     * A list of slice elements for the series.
     *
     * Use its `template` to configure look and behavior of the slices. E.g.:
     *
     * ```TypeScript
     * series.slices.template.stroke = am4core.color("#fff");
     * series.slices.template.strokeWidth = 2;
     * ```
     * ```JavaScript
     * series.slices.template.stroke = am4core.color("#fff");
     * series.slices.template.strokeWidth = 2;
     * ```
     * ```JSON
     * {
     *   // ...
     *   "series": [{
     *     // ...
     *     "slices": {
     *       "stroke": "#fff",
     *       "strokeWidth": 2
     *     }
     *   }]
     * }
     * ```
     *
     * @see {@link https://www.amcharts.com/docs/v4/concepts/list-templates/} for more information about list templates
     * @return Slices
     */
    get: function get() {
      if (!this._slices) {
        var slice = this.createSlice();
        slice.applyOnClones = true;

        this._disposers.push(slice);

        this.initSlice(slice);
        this._slices = new _core_utils_List__WEBPACK_IMPORTED_MODULE_5__.ListTemplate(slice);

        this._disposers.push(new _core_utils_List__WEBPACK_IMPORTED_MODULE_5__.ListDisposer(this._slices));
      }

      return this._slices;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(PercentSeries.prototype, "ticks", {
    /**
     * A list of tick elements for the series. Ticks connect slice to its label.
     *
     * Use its `template` to configure look and behavior of the ticks. E.g.:
     *
     * ```TypeScript
     * series.ticks.template.strokeWidth = 2;
     * ```
     * ```JavaScript
     * series.ticks.template.strokeWidth = 2;
     * ```
     * ```JSON
     * {
     *   // ...
     *   "series": [{
     *     // ...
     *     "ticks": {
     *       "strokeWidth": 2
     *     }
     *   }]
     * }
     * ```
     *
     * @see {@link https://www.amcharts.com/docs/v4/concepts/list-templates/} for more information about list templates
     * @return Ticks
     */
    get: function get() {
      if (!this._ticks) {
        var tick = this.createTick();
        tick.applyOnClones = true;

        this._disposers.push(tick);

        this.initTick(tick);
        this._ticks = new _core_utils_List__WEBPACK_IMPORTED_MODULE_5__.ListTemplate(tick);

        this._disposers.push(new _core_utils_List__WEBPACK_IMPORTED_MODULE_5__.ListDisposer(this._ticks));
      }

      return this._ticks;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(PercentSeries.prototype, "labels", {
    /**
     * A list of slice label elements for the series.
     *
     * Use its `template` to configure look and behavior of the labels. E.g.:
     *
     * ```TypeScript
     * series.labels.template.fill = am4core.color("#c00");
     * series.labels.template.fontSize = 20;
     * ```
     * ```JavaScript
     * series.labels.template.fill = am4core.color("#c00");
     * series.labels.template.fontSize = 20;
     * ```
     * ```JSON
     * {
     *   // ...
     *   "series": [{
     *     // ...
     *     "labels": {
     *       "stroke": "#c00",
     *       "fontSize": 20
     *     }
     *   }]
     * }
     * ```
     *
     * @see {@link https://www.amcharts.com/docs/v4/concepts/list-templates/} for more information about list templates
     * @return Labels
     */
    get: function get() {
      if (!this._labels) {
        var label = this.createLabel();
        label.applyOnClones = true;

        this._disposers.push(label);

        this.initLabel(label);
        this._labels = new _core_utils_List__WEBPACK_IMPORTED_MODULE_5__.ListTemplate(label);

        this._disposers.push(new _core_utils_List__WEBPACK_IMPORTED_MODULE_5__.ListDisposer(this._labels));
      }

      return this._labels;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Returns a new/empty DataItem of the type appropriate for this object.
   *
   * @see {@link DataItem}
   * @return Data Item
   */

  PercentSeries.prototype.createDataItem = function () {
    return new PercentSeriesDataItem();
  };
  /**
   * Creates and returns a new slice element.
   *
   * @param sliceType  Type of the slice element
   * @return Slice
   */


  PercentSeries.prototype.initSlice = function (slice) {};

  PercentSeries.prototype.initLabel = function (label) {
    label.text = "{category}: {value.percent.formatNumber('#.0p')}";
    label.isMeasured = false;
    label.padding(5, 5, 5, 5);
  };

  PercentSeries.prototype.initTick = function (label) {};
  /**
   * Validates (processes) data items.
   *
   * @ignore Exclude from docs
   */


  PercentSeries.prototype.validateDataItems = function () {
    this.colors.reset();

    if (this.patterns) {
      this.patterns.reset();
    }

    _super.prototype.validateDataItems.call(this);
  };
  /**
   * Validates data item's element, effectively redrawing it.
   *
   * @ignore Exclude from docs
   * @param dataItem  Data item
   */


  PercentSeries.prototype.validateDataElement = function (dataItem) {
    var slice = dataItem.slice;

    if (slice) {
      if (slice.fill == undefined) {
        if (this.patterns) {
          if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_11__.hasValue(slice.stroke)) {
            slice.stroke = this.colors.next();
          }

          slice.fill = this.patterns.next();

          if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_11__.hasValue(slice.fillOpacity)) {
            slice.fill.backgroundOpacity = slice.fillOpacity;
          }

          if (slice.stroke instanceof _core_utils_Color__WEBPACK_IMPORTED_MODULE_3__.Color) {
            slice.fill.stroke = slice.stroke;
            slice.fill.fill = slice.stroke;
          }
        } else {
          slice.fill = this.colors.next();
        }
      } else {
        this.colors.currentStep += this.colors.step;
      }

      if (slice.stroke == undefined) {
        slice.stroke = slice.fill;
      }
    } // do this at the end, otherwise bullets won't be positioned properly


    _super.prototype.validateDataElement.call(this, dataItem);

    if (slice) {
      dataItem.bullets.each(function (key, bullet) {
        if (bullet.fill == undefined) {
          bullet.fill = slice.fill;
        }

        if (bullet.stroke == undefined) {
          bullet.stroke = slice.stroke;
        }
      });
    }

    this.updateLegendValue(dataItem);
  };
  /**
   * Validates (processes) data.
   *
   * @ignore Exclude from docs
   */


  PercentSeries.prototype.validateData = function () {
    _super.prototype.validateData.call(this);

    if (this.chart) {
      this.chart.feedLegend();
    }
  };
  /**
   * Arranges slice labels according to position settings.
   *
   * @ignore Exclude from docs
   * @param dataItems  Data items
   */


  PercentSeries.prototype.arrangeLabels = function (dataItems) {
    for (var i = 0, len = dataItems.length; i < len; i++) {
      var dataItem = dataItems[i];
      var label = dataItem.label;

      if (label) {
        if (label.invalid) {
          label.validate();
        }

        var lh = label.measuredHeight;

        if (!label.visible) {
          lh = 0;
        }

        if (label.pixelY - lh / 2 < -this.maxHeight / 2) {
          label.y = -this.maxHeight / 2 + lh / 2;
        }

        var nextLabel = this.getNextLabel(i + 1, dataItems);
        var bottom = label.pixelY + lh;

        if (nextLabel) {
          if (nextLabel.y < bottom) {
            nextLabel.y = bottom;
          }
        }
      }
    }
  };

  PercentSeries.prototype.arrangeLabels2 = function (dataItems) {
    var previousTop = this.maxHeight / 2;

    for (var i = dataItems.length - 1; i >= 0; i--) {
      var dataItem = dataItems[i];
      var label = dataItem.label;

      if (label) {
        if (label.invalid) {
          label.validate();
        }

        var lh = label.measuredHeight;

        if (!label.visible) {
          lh = 0;
        }

        if (i == dataItems.length - 1) {
          previousTop += lh / 2;
        }

        if (label.pixelY + lh > previousTop) {
          label.y = previousTop - lh;
          previousTop = label.y;
        }
      }
    }
  };
  /**
   * Returns the next label according to `index`.
   *
   * @param index      Current index
   * @param dataItems  Data items
   * @return Label element
   */


  PercentSeries.prototype.getNextLabel = function (index, dataItems) {
    if (dataItems.length >= index) {
      var nextDataItem = dataItems[index];

      if (nextDataItem) {
        if (nextDataItem.label) {
          if (nextDataItem.visible) {
            return nextDataItem.label;
          } else {
            return this.getNextLabel(index + 1, dataItems);
          }
        } else {
          return this.getNextLabel(index + 1, dataItems);
        }
      }
    }
  };

  Object.defineProperty(PercentSeries.prototype, "colors", {
    /**
     * @return Color set
     */
    get: function get() {
      return this.getPropertyValue("colors");
    },

    /**
     * A color set to be used for slices.
     *
     * For each new subsequent slice, the chart will assign the next color in
     * this set.
     *
     * @param value  Color set
     */
    set: function set(value) {
      this.setPropertyValue("colors", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(PercentSeries.prototype, "patterns", {
    /**
     * @return Pattern set
     */
    get: function get() {
      return this.getPropertyValue("patterns");
    },

    /**
     * A [[PatternSet]] to use when creating patterned fills for slices.
     *
     * @since 4.7.5
     * @param value  Pattern set
     */
    set: function set(value) {
      this.setPropertyValue("patterns", value, true);
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Binds related legend data item's visual settings to this series' visual
   * settings.
   *
   * @ignore Exclude from docs
   * @param marker    Container
   * @param dataItem  Data item
   */

  PercentSeries.prototype.createLegendMarker = function (marker, dataItem) {
    _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_9__.each(marker.children.iterator(), function (child) {
      var slice = dataItem.slice;
      child.defaultState.properties.fill = slice.fill;
      child.defaultState.properties.stroke = slice.stroke;
      child.defaultState.properties.fillOpacity = slice.fillOpacity;
      child.defaultState.properties.strokeOpacity = slice.strokeOpacity;
      child.fill = slice.fill;
      child.stroke = slice.stroke;
      child.fillOpacity = slice.fillOpacity;
      child.strokeOpacity = slice.strokeOpacity;

      if (child.fill == undefined) {
        child.__disabled = true;
      }

      var legendDataItem = marker.dataItem;
      legendDataItem.color = slice.fill;
      legendDataItem.colorOrig = slice.fill;
      child.addDisposer(slice.events.on("propertychanged", function (ev) {
        if (ev.property == "fill") {
          child.__disabled = false;

          if (!child.isActive) {
            child.fill = slice.fill;
          }

          child.defaultState.properties.fill = slice.fill;
          legendDataItem.color = slice.fill;
          legendDataItem.colorOrig = slice.fill;
        }

        if (ev.property == "stroke") {
          if (!child.isActive) {
            child.stroke = slice.stroke;
          }

          child.defaultState.properties.stroke = slice.stroke;
        }

        if (ev.property == "strokeOpacity") {
          if (!child.isActive) {
            child.strokeOpacity = slice.strokeOpacity;
          }

          child.defaultState.properties.strokeOpacity = slice.strokeOpacity;
        }
      }, undefined, false));
    });
  };
  /**
   * Repositions bullets when slice's size changes.
   *
   * @ignore Exclude from docs
   * @param event  Event
   */


  PercentSeries.prototype.handleSliceScale = function (event) {
    var _this = this;

    var slice = event.target;
    var dataItem = slice.dataItem;

    if (dataItem && dataItem.bullets) {
      _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_9__.each(dataItem.bullets.iterator(), function (a) {
        var value = a[1];

        _this.positionBullet(value);
      });
    }
  };
  /**
   * Repositions bullet and labels when slice moves.
   *
   * @ignore Exclude from docs
   * @param event  Event
   */


  PercentSeries.prototype.handleSliceMove = function (event) {};
  /**
   * Copies all properties from another instance of [[PercentSeries]].
   *
   * @param source  Source series
   */


  PercentSeries.prototype.copyFrom = function (source) {
    _super.prototype.copyFrom.call(this, source);

    this.slices.template.copyFrom(source.slices.template);
    this.labels.template.copyFrom(source.labels.template);
    this.ticks.template.copyFrom(source.ticks.template);
    this.colors = source.colors.clone();
  };

  Object.defineProperty(PercentSeries.prototype, "alignLabels", {
    /**
     * @return Align labels?
     */
    get: function get() {
      return this.getPropertyValue("alignLabels");
    },

    /**
     * Align labels into nice vertical columns?
     *
     * This will ensure that labels never overlap with each other.
     *
     * Arranging labels into columns makes them more readble, and better user
     * experience.
     *
     * If set to `false` labels will be positioned at `label.radius` distance,
     * and may, in some cases, overlap.
     *
     * @default true
     * @param value  Align labels?
     */
    set: function set(value) {
      this.setAlignLabels(value);
    },
    enumerable: true,
    configurable: true
  });
  /**
   * @ignore
   */

  PercentSeries.prototype.setAlignLabels = function (value) {
    this.setPropertyValue("alignLabels", value, true);
  };

  Object.defineProperty(PercentSeries.prototype, "ignoreZeroValues", {
    /**
     * @return Ignore zero values
     */
    get: function get() {
      return this.getPropertyValue("ignoreZeroValues");
    },

    /**
     * If set to `true` the chart will not show slices with zero values.
     *
     * @default false
     * @since 4.7.9
     * @param  value  Ignore zero values
     */
    set: function set(value) {
      this.setPropertyValue("ignoreZeroValues", value, true);
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Updates corresponding legend data item with current values.
   *
   * @ignore Exclude from docs
   * @param dataItem  Data item
   */

  PercentSeries.prototype.updateLegendValue = function (dataItem) {
    if (dataItem) {
      var legendDataItem = dataItem.legendDataItem;
      var legendSettings = dataItem.legendSettings;

      if (legendDataItem && legendSettings) {
        if (legendSettings) {
          if (legendSettings.labelText) {
            legendDataItem.label.text = legendSettings.labelText;
          }

          if (legendSettings.itemLabelText) {
            legendDataItem.label.text = legendSettings.itemLabelText;
          }

          if (legendSettings.valueText) {
            legendDataItem.valueLabel.text = legendSettings.valueText;
          }

          if (legendSettings.itemValueText) {
            legendDataItem.valueLabel.text = legendSettings.itemValueText;
          }
        }
      }
    }
  };

  return PercentSeries;
}(_Series__WEBPACK_IMPORTED_MODULE_0__.Series);


/**
 * bboxter class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_8__.registry.registeredClasses.PercentSeries = PercentSeries;
_core_Registry__WEBPACK_IMPORTED_MODULE_8__.registry.registeredClasses.PercentSeriesDataItem = PercentSeriesDataItem;
/**
 * Add default responsive rules
 */

/**
 * Disable labels and ticks.
 */

_core_utils_Responsive__WEBPACK_IMPORTED_MODULE_13__.defaultRules.push({
  relevant: _core_utils_Responsive__WEBPACK_IMPORTED_MODULE_13__.ResponsiveBreakpoints.maybeXS,
  state: function state(target, stateId) {
    if (target instanceof PercentSeries) {
      var state = target.states.create(stateId);
      var labelState = target.labels.template.states.create(stateId);
      labelState.properties.disabled = true;
      var tickState = target.ticks.template.states.create(stateId);
      tickState.properties.disabled = true;
      return state;
    }

    return null;
  }
});

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/series/PictorialStackedSeries.js":
/*!********************************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/series/PictorialStackedSeries.js ***!
  \********************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "PictorialStackedSeries": () => (/* binding */ PictorialStackedSeries),
/* harmony export */   "PictorialStackedSeriesDataItem": () => (/* binding */ PictorialStackedSeriesDataItem)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _PyramidSeries__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./PyramidSeries */ "./node_modules/@amcharts/amcharts4/.internal/charts/series/PyramidSeries.js");
/* harmony import */ var _core_Sprite__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/Sprite */ "./node_modules/@amcharts/amcharts4/.internal/core/Sprite.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_utils_Math__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
/* harmony import */ var _core_utils_Type__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../core/utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/* harmony import */ var _core_utils_Percent__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../core/utils/Percent */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Percent.js");
/**
 * Defines Pictorial Stacked Series.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */







/**
 * ============================================================================
 * DATA ITEM
 * ============================================================================
 * @hidden
 */
//@todo: sequenced?

/**
 * Defines a [[DataItem]] for [[PictorialStackedSeries]].
 *
 * @see {@link DataItem}
 */

var PictorialStackedSeriesDataItem =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_6__.__extends)(PictorialStackedSeriesDataItem, _super);
  /**
   * Constructor
   */


  function PictorialStackedSeriesDataItem() {
    var _this = _super.call(this) || this;

    _this.className = "PictorialStackedSeriesDataItem";

    _this.applyTheme();

    return _this;
  }

  return PictorialStackedSeriesDataItem;
}(_PyramidSeries__WEBPACK_IMPORTED_MODULE_0__.PyramidSeriesDataItem);


/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Defines [[Series]] for a PictorialStacked series on a [[SlicedChart]].
 *
 * @see {@link IPictorialStackedSeriesEvents} for a list of available Events
 * @see {@link IPictorialStackedSeriesAdapters} for a list of available Adapters
 * @see {@link https://www.amcharts.com/docs/v4/chart-types/sliced-chart/} for documentation
 * @important
 */

var PictorialStackedSeries =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_6__.__extends)(PictorialStackedSeries, _super);
  /**
   * Constructor
   */


  function PictorialStackedSeries() {
    var _this = _super.call(this) || this;

    _this.className = "PictorialStackedSeries";
    _this.topWidth = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_5__.percent)(100);
    _this.bottomWidth = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_5__.percent)(100);
    _this.valueIs = "height";

    _this.applyTheme();

    _this.startLocation = 0;
    _this.endLocation = 1;
    _this.align = "center";
    _this.valign = "middle";
    _this._maskSprite = _this.slicesContainer.createChild(_core_Sprite__WEBPACK_IMPORTED_MODULE_1__.Sprite);
    _this._maskSprite.visible = false;
    _this._maskSprite.zIndex = 100;
    _this._maskSprite.shouldClone = false;
    return _this;
  }
  /**
   * Sizes the mask to fit the series.
   *
   * @ignore
   */


  PictorialStackedSeries.prototype.validateDataElements = function () {
    var maxWidth = this.slicesContainer.maxWidth;
    var maxHeight = this.slicesContainer.maxHeight;
    var maskSprite = this._maskSprite; //maskSprite.validatePosition(); // for some reason size of the maskSprite is 0x0 after we removed validatePosition in afterdraw

    var pictureWidth = maskSprite.measuredWidth / maskSprite.scale;
    var pictureHeight = maskSprite.measuredHeight / maskSprite.scale;
    var scale = _core_utils_Math__WEBPACK_IMPORTED_MODULE_3__.min(maxHeight / pictureHeight, maxWidth / pictureWidth);

    if (scale == Infinity) {
      scale = 1; // can't return here, won't draw legend properly
    }

    scale = _core_utils_Math__WEBPACK_IMPORTED_MODULE_3__.max(0.001, scale);
    var startLocation = this.startLocation;
    var endLocation = this.endLocation;
    var newWidth = _core_utils_Math__WEBPACK_IMPORTED_MODULE_3__.min(maxWidth, pictureWidth * scale);
    var newHeight = _core_utils_Math__WEBPACK_IMPORTED_MODULE_3__.min(maxHeight, pictureHeight * scale);
    maskSprite.scale = scale;

    if (this.orientation == "vertical") {
      this.topWidth = newWidth + 4;
      this.bottomWidth = newWidth + 4;
      this.pyramidHeight = newHeight * (endLocation - startLocation);
      maskSprite.x = maxWidth / 2;
      maskSprite.y = newHeight / 2;
    } else {
      this.topWidth = newHeight + 4;
      this.bottomWidth = newHeight + 4;
      this.pyramidHeight = newWidth * (endLocation - startLocation);
      maskSprite.valign = "middle";
      maskSprite.x = newWidth / 2;
      maskSprite.y = maxHeight / 2;
    }

    maskSprite.verticalCenter = "middle";
    maskSprite.horizontalCenter = "middle";

    _super.prototype.validateDataElements.call(this);

    var y;
    var x;

    if (this.orientation == "vertical") {
      if (this.valign == "bottom") {
        y = maxHeight - newHeight;
      }

      if (this.valign == "middle") {
        y = (maxHeight - newHeight) / 2;
      }

      if (this.valign == "top") {
        y = 0;
      }

      if (this.align == "left") {
        x = -(maxWidth - newWidth) / 2;
      }

      if (this.align == "center") {
        x = 0;
      }

      if (this.align == "right") {
        x = (maxWidth - newWidth) / 2;
      }

      this.slices.template.dy = startLocation * newHeight;

      if (this.alignLabels) {
        this.slicesContainer.dx = x;
      }
    } else {
      if (this.valign == "bottom") {
        y = (maxHeight - newHeight) / 2;
      }

      if (this.valign == "middle") {
        y = 0;
      }

      if (this.valign == "top") {
        y = -(maxHeight - newHeight) / 2;
      }

      if (this.align == "left") {
        x = 0;
      }

      if (this.align == "center") {
        x = (maxWidth - newWidth) / 2;
      }

      if (this.align == "right") {
        x = maxWidth - newWidth;
      }

      this.slices.template.dx = startLocation * newWidth;

      if (this.alignLabels) {
        this.slicesContainer.dy = y;
      }
    }

    this.slicesContainer.x = x;
    this.labelsContainer.x = x;
    this.ticksContainer.x = x;
    this.slicesContainer.y = y;
    this.labelsContainer.y = y;
    this.ticksContainer.y = y;

    if (newWidth > 0 && newHeight > 0) {
      this.slicesContainer.mask = maskSprite;
    }
  };
  /**
   * Sets defaults that instantiate some objects that rely on parent, so they
   * cannot be set in constructor.
   */


  PictorialStackedSeries.prototype.applyInternalDefaults = function () {
    _super.prototype.applyInternalDefaults.call(this);

    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_4__.hasValue(this.readerTitle)) {
      this.readerTitle = this.language.translate("Pyramid Series");
    }
  };
  /**
   * Returns a new/empty DataItem of the type appropriate for this object.
   *
   * @see {@link DataItem}
   * @return Data Item
   */


  PictorialStackedSeries.prototype.createDataItem = function () {
    return new PictorialStackedSeriesDataItem();
  };

  Object.defineProperty(PictorialStackedSeries.prototype, "maskSprite", {
    /**
     * A [[Sprite]] element that is used as a series mask.
     *
     * If set, this element's shape will be used to apply shape to the whole
     * stacked pictorial series.
     *
     * You can use this element's `path` property to set an SVG path for the
     * shape:
     *
     * ```TypeScript
     * let iconPath = "M511.82,329.991c-0.256-1.212-1.064-2.244-2.192-2.784l-24.396-11.684c17.688-29.776,11.804-68.912-15.58-91.88 c-53.756-45.084-131.696-70.936-213.828-70.936c-82.128,0-160.068,25.856-213.82,70.936c-27.416,22.992-33.28,62.18-15.524,91.972 L2.276,327.203c-1.128,0.54-1.936,1.572-2.192,2.792c-0.256,1.22,0.08,2.496,0.896,3.436l21.204,24.388 c0.764,0.88,1.868,1.376,3.02,1.376c0.084,0,0.172,0,0.26-0.008c1.244-0.084,2.384-0.74,3.072-1.776l14.852-22.376 c12.648,10.112,28.392,15.776,44.916,15.776c16.872,0,33.284-5.98,46.232-16.836c27.828-23.34,73.172-37.272,121.288-37.272 c48.12,0,93.464,13.932,121.296,37.272c12.944,10.856,29.36,16.836,46.228,16.836c16.596,0,32.4-5.724,45.08-15.916l14.94,22.512 c0.692,1.04,1.824,1.696,3.076,1.776c0.084,0.008,0.172,0.008,0.256,0.008c1.156,0,2.256-0.496,3.02-1.376l21.2-24.388C511.74,332.487,512.068,331.211,511.82,329.991z";
     * // ...
     * series.maskSprite.path = iconPath;
     * ```
     * ```JavaScript
     * let iconPath = "M511.82,329.991c-0.256-1.212-1.064-2.244-2.192-2.784l-24.396-11.684c17.688-29.776,11.804-68.912-15.58-91.88 c-53.756-45.084-131.696-70.936-213.828-70.936c-82.128,0-160.068,25.856-213.82,70.936c-27.416,22.992-33.28,62.18-15.524,91.972 L2.276,327.203c-1.128,0.54-1.936,1.572-2.192,2.792c-0.256,1.22,0.08,2.496,0.896,3.436l21.204,24.388 c0.764,0.88,1.868,1.376,3.02,1.376c0.084,0,0.172,0,0.26-0.008c1.244-0.084,2.384-0.74,3.072-1.776l14.852-22.376 c12.648,10.112,28.392,15.776,44.916,15.776c16.872,0,33.284-5.98,46.232-16.836c27.828-23.34,73.172-37.272,121.288-37.272 c48.12,0,93.464,13.932,121.296,37.272c12.944,10.856,29.36,16.836,46.228,16.836c16.596,0,32.4-5.724,45.08-15.916l14.94,22.512 c0.692,1.04,1.824,1.696,3.076,1.776c0.084,0.008,0.172,0.008,0.256,0.008c1.156,0,2.256-0.496,3.02-1.376l21.2-24.388C511.74,332.487,512.068,331.211,511.82,329.991z";
     * // ...
     * series.maskSprite.path = iconPath;
     * ```
     * ```JSON
     * let iconPath = "M511.82,329.991c-0.256-1.212-1.064-2.244-2.192-2.784l-24.396-11.684c17.688-29.776,11.804-68.912-15.58-91.88 c-53.756-45.084-131.696-70.936-213.828-70.936c-82.128,0-160.068,25.856-213.82,70.936c-27.416,22.992-33.28,62.18-15.524,91.972 L2.276,327.203c-1.128,0.54-1.936,1.572-2.192,2.792c-0.256,1.22,0.08,2.496,0.896,3.436l21.204,24.388 c0.764,0.88,1.868,1.376,3.02,1.376c0.084,0,0.172,0,0.26-0.008c1.244-0.084,2.384-0.74,3.072-1.776l14.852-22.376 c12.648,10.112,28.392,15.776,44.916,15.776c16.872,0,33.284-5.98,46.232-16.836c27.828-23.34,73.172-37.272,121.288-37.272 c48.12,0,93.464,13.932,121.296,37.272c12.944,10.856,29.36,16.836,46.228,16.836c16.596,0,32.4-5.724,45.08-15.916l14.94,22.512 c0.692,1.04,1.824,1.696,3.076,1.776c0.084,0.008,0.172,0.008,0.256,0.008c1.156,0,2.256-0.496,3.02-1.376l21.2-24.388C511.74,332.487,512.068,331.211,511.82,329.991z";
     * // ...
     * {
     *   // ...
     *   "series": [{
     *     "type": "PictorialStackedSeries",
     *     // ...
     *     "maskSprite": {
     *       "path": iconPath
     *     }
     *   }]
     * }
     * ```
     *
     * @return Mask sprite
     */
    get: function get() {
      return this._maskSprite;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Inits FunnelSlice.
   *
   * @param slice to init
   */

  PictorialStackedSeries.prototype.initSlice = function (slice) {
    _super.prototype.initSlice.call(this, slice);

    var hs = slice.states.getKey("hover");

    if (hs) {
      hs.properties.expandDistance = 0;
    }
  };

  Object.defineProperty(PictorialStackedSeries.prototype, "startLocation", {
    /**
     * @return  Start location
     */
    get: function get() {
      return this.getPropertyValue("startLocation");
    },

    /**
     * Relative location to start series from.
     *
     * Range of values: 0 to 1.
     *
     * This setting indicates where actual slices will start relatively to the
     * whole height/width of the series.
     *
     * For example, if we want slices to start at 30% from the top/left of the
     * series, we can set `startLocation = 0.3`.
     *
     * To fill shape outside of the location range, use background of the
     * property `slicesContainer`.
     *
     * ```TypeScript
     * series.startLocation = 0.2;
     * series.endLocation = 0.8;
     * series.slicesContainer.background.fill = am4core.color("#eee");
     * ```
     * ```JavaScript
     * series.startLocation = 0.2;
     * series.endLocation = 0.8;
     * series.slicesContainer.background.fill = am4core.color("#eee");
     * ```
     * ```JSON
     * {
     *   // ...
     *   "series": [{
     *     // ...
     *     "startLocation": 0.2,
     *     "endLocation": 0.8,
     *     "slicesContainer": {
     *       "background": {
     *         "fill": "#eee"
     *       }
     *     }
     *   }]
     * }
     * ```
     *
     * @default 0
     * @since 4.1.13
     * @param  value  Start location
     */
    set: function set(value) {
      if (this.setPropertyValue("startLocation", value)) {
        this.invalidateDataItems();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(PictorialStackedSeries.prototype, "endLocation", {
    /**
     * @return End location
     */
    get: function get() {
      return this.getPropertyValue("endLocation");
    },

    /**
     * Relative location to end series at.
     *
     * Range of values: 0 to 1.
     *
     * This setting indicates where actual slices will end relatively to the
     * whole height/width of the series.
     *
     * For example, if we want slices to end at 70% from the top/left of the
     * series, we can set `endLocation = 0.7`.
     *
     * To fill shape outside of the location range, use background of the
     * property `slicesContainer`.
     *
     * ```TypeScript
     * series.startLocation = 0.2;
     * series.endLocation = 0.8;
     * series.slicesContainer.background.fill = am4core.color("#eee");
     * ```
     * ```JavaScript
     * series.startLocation = 0.2;
     * series.endLocation = 0.8;
     * series.slicesContainer.background.fill = am4core.color("#eee");
     * ```
     * ```JSON
     * {
     *   // ...
     *   "series": [{
     *     // ...
     *     "startLocation": 0.2,
     *     "endLocation": 0.8,
     *     "slicesContainer": {
     *       "background": {
     *         "fill": "#eee"
     *       }
     *     }
     *   }]
     * }
     * ```
     *
     * @default 1
     * @since 4.1.13
     * @param  value  End location
     */
    set: function set(value) {
      if (this.setPropertyValue("endLocation", value)) {
        this.invalidateDataItems();
      }
    },
    enumerable: true,
    configurable: true
  });
  return PictorialStackedSeries;
}(_PyramidSeries__WEBPACK_IMPORTED_MODULE_0__.PyramidSeries);


/**
 * bboxter class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_2__.registry.registeredClasses.PictorialStackedSeries = PictorialStackedSeries;
_core_Registry__WEBPACK_IMPORTED_MODULE_2__.registry.registeredClasses.PictorialStackedSeriesDataItem = PictorialStackedSeriesDataItem;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/series/PieSeries.js":
/*!*******************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/series/PieSeries.js ***!
  \*******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "PieSeries": () => (/* binding */ PieSeries),
/* harmony export */   "PieSeriesDataItem": () => (/* binding */ PieSeriesDataItem)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _PercentSeries__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./PercentSeries */ "./node_modules/@amcharts/amcharts4/.internal/charts/series/PercentSeries.js");
/* harmony import */ var _core_elements_Slice__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/elements/Slice */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Slice.js");
/* harmony import */ var _axes_AxisLabelCircular__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../axes/AxisLabelCircular */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisLabelCircular.js");
/* harmony import */ var _elements_PieTick__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../elements/PieTick */ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/PieTick.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_utils_Math__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../core/utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
/* harmony import */ var _core_utils_Type__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../core/utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/* harmony import */ var _core_utils_Percent__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../core/utils/Percent */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Percent.js");
/**
 * Defines Pie Chart Series.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */


 //import { Slice3D } from "../../core/elements/3D/Slice3D";







/**
 * ============================================================================
 * DATA ITEM
 * ============================================================================
 * @hidden
 */
//@todo: sequenced?

/**
 * Defines a [[DataItem]] for [[PieSeries]].
 *
 * @see {@link DataItem}
 */

var PieSeriesDataItem =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_8__.__extends)(PieSeriesDataItem, _super);
  /**
   * Constructor
   */


  function PieSeriesDataItem() {
    var _this = _super.call(this) || this;

    _this.className = "PieSeriesDataItem";
    _this.values.radiusValue = {};

    _this.applyTheme();

    return _this;
  }

  Object.defineProperty(PieSeriesDataItem.prototype, "radiusValue", {
    /**
     * @return Radius
     */
    get: function get() {
      return this.values.radiusValue.value;
    },

    /**
     * Slice's radius, if other than default.
     *
     * @param value  Radius
     */
    set: function set(value) {
      this.setValue("radiusValue", value);
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Hide the data item (and corresponding visual elements).
   *
   * @param duration  Duration (ms)
   * @param delay     Delay hiding (ms)
   * @param toValue   Target value for animation
   * @param fields    Fields to animate while hiding
   */

  PieSeriesDataItem.prototype.hide = function (duration, delay, toValue, fields) {
    return _super.prototype.hide.call(this, duration, delay, 0, ["value", "radiusValue"]);
  };
  /**
   * Show hidden data item (and corresponding visual elements).
   *
   * @param duration  Duration (ms)
   * @param delay     Delay hiding (ms)
   * @param fields    Fields to animate while hiding
   */


  PieSeriesDataItem.prototype.show = function (duration, delay, fields) {
    return _super.prototype.show.call(this, duration, delay, ["value", "radiusValue"]);
  };

  return PieSeriesDataItem;
}(_PercentSeries__WEBPACK_IMPORTED_MODULE_0__.PercentSeriesDataItem);


/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Defines [[Series]] for a slice series on a Pie chart.
 *
 * @see {@link IPieSeriesEvents} for a list of available Events
 * @see {@link IPieSeriesAdapters} for a list of available Adapters
 * @todo Example
 * @important
 */

var PieSeries =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_8__.__extends)(PieSeries, _super);
  /**
   * Constructor
   */


  function PieSeries() {
    var _this = _super.call(this) || this;

    _this.className = "PieSeries";
    _this.alignLabels = true; //this.startAngle = -90;
    //this.endAngle = 270;

    _this.layout = "none";
    _this.labels.template.radius = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_7__.percent)(5);

    _this.addDisposer(_this.labels.template.events.on("enabled", _this.invalidate, _this, false));

    _this.applyTheme();

    return _this;
  }
  /**
   * creates slice
   */


  PieSeries.prototype.createSlice = function () {
    return new _core_elements_Slice__WEBPACK_IMPORTED_MODULE_1__.Slice();
  };
  /**
   * creates tick
   */


  PieSeries.prototype.createTick = function () {
    return new _elements_PieTick__WEBPACK_IMPORTED_MODULE_3__.PieTick();
  };
  /**
   * creates label
   */


  PieSeries.prototype.createLabel = function () {
    return new _axes_AxisLabelCircular__WEBPACK_IMPORTED_MODULE_2__.AxisLabelCircular();
  };
  /**
   * Sets defaults that instantiate some objects that rely on parent, so they
   * cannot be set in constructor.
   */


  PieSeries.prototype.applyInternalDefaults = function () {
    _super.prototype.applyInternalDefaults.call(this);

    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_6__.hasValue(this.readerTitle)) {
      this.readerTitle = this.language.translate("Pie Slice Series");
    }
  };
  /**
   * Returns a new/empty DataItem of the type appropriate for this object.
   *
   * @see {@link DataItem}
   * @return Data Item
   */


  PieSeries.prototype.createDataItem = function () {
    return new PieSeriesDataItem();
  };
  /**
   * Inits slice.
   *
   * @param slice to init
   */


  PieSeries.prototype.initSlice = function (slice) {
    slice.isMeasured = false;
    slice.defaultState.properties.scale = 1;
    slice.observe("scale", this.handleSliceScale, this);
    slice.observe(["dx", "dy", "x", "y", "shiftRadius"], this.handleSliceMove, this);
    slice.tooltipText = "{category}: {value.percent.formatNumber('#.#p')} ({value.value})";
    var hoverState = slice.states.create("hover");
    hoverState.properties.scale = 1.05;
    var defaultState = slice.defaultState;
    defaultState.properties.shiftRadius = 0;
    slice.togglable = true;
    slice.events.on("toggled", function (event) {
      event.target.hideTooltip(); // The following takes care of removing hover on subsequent click of
      // a slice

      if (event.target.interactions.lastHitPointer && event.target.interactions.lastHitPointer.touch && !event.target.isActive) {
        event.target.isHover = false;
      }
    });
    var activeState = slice.states.create("active");
    activeState.properties.shiftRadius = 0.10;
  };
  /**
   * (Re)validates the whole series, effectively causing it to redraw.
   *
   * @ignore Exclude from docs
   */


  PieSeries.prototype.validate = function () {
    this._leftItems = [];
    this._rightItems = [];
    this._currentStartAngle = this.startAngle;
    this._arcRect = _core_utils_Math__WEBPACK_IMPORTED_MODULE_5__.getArcRect(this.startAngle, this.endAngle);
    this._maxRadiusPercent = 0;

    for (var i = this.startIndex; i < this.endIndex; i++) {
      var dataItem = this.dataItems.getIndex(i);
      var radiusValuePercent = dataItem.values.radiusValue.percent;

      if (radiusValuePercent > this._maxRadiusPercent) {
        this._maxRadiusPercent = radiusValuePercent;
      }
    }

    _super.prototype.validate.call(this);

    if (this.alignLabels) {
      if (this.startAngle > this.endAngle) {
        this._rightItems.reverse();
      } else {
        this._leftItems.reverse();
      }

      this._rightItems.sort(function (a, b) {
        var aAngle = (a.slice.middleAngle + 360) % 360;
        var bAngle = (b.slice.middleAngle + 360) % 360;

        if (aAngle > 270) {
          aAngle -= 360;
        }

        if (bAngle > 270) {
          bAngle -= 360;
        }

        if (aAngle < bAngle) {
          return -1;
        } else if (aAngle > bAngle) {
          return 1;
        } else {
          return 0;
        }
      });

      this._leftItems.sort(function (a, b) {
        var aAngle = (a.slice.middleAngle + 360) % 360;
        var bAngle = (b.slice.middleAngle + 360) % 360;

        if (aAngle < bAngle) {
          return 1;
        } else if (aAngle > bAngle) {
          return -1;
        } else {
          return 0;
        }
      });

      this.arrangeLabels(this._rightItems);
      this.arrangeLabels2(this._rightItems);
      this.arrangeLabels(this._leftItems);
      this.arrangeLabels2(this._leftItems);
    }
  };
  /**
   * Validates data item's element, effectively redrawing it.
   *
   * @ignore Exclude from docs
   * @param dataItem  Data item
   */


  PieSeries.prototype.validateDataElement = function (dataItem) {
    if (this.pixelRadius > 0) {
      if (this.ignoreZeroValues && (dataItem.value == 0 || dataItem.value == null)) {
        dataItem.__disabled = true;
      } else {
        dataItem.__disabled = false;
      } // SLICE


      var slice = dataItem.slice;
      slice.radius = this.pixelRadius;

      if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_6__.isNumber(dataItem.radiusValue)) {
        slice.radius = this.pixelInnerRadius + (this.pixelRadius - this.pixelInnerRadius) * dataItem.values.radiusValue.percent / this._maxRadiusPercent;
      }

      if (!(slice.innerRadius instanceof _core_utils_Percent__WEBPACK_IMPORTED_MODULE_7__.Percent)) {
        slice.innerRadius = this.pixelInnerRadius;
      }

      slice.startAngle = this._currentStartAngle;
      slice.arc = Math.abs(dataItem.values.value.percent) * (this.endAngle - this.startAngle) / 100; // LABEL

      if (!this.labels.template.disabled) {
        var label = dataItem.label;
        var tick = dataItem.tick;
        tick.slice = slice;
        tick.label = label;
        var normalizedMiddleAngle = (slice.middleAngle + 360) % 360; // force angle to be 0 - 360;

        var point = void 0;

        if (this.alignLabels) {
          var labelRadius = label.pixelRadius(slice.radius);
          var x = tick.length + labelRadius;
          label.dx = 0;
          label.dy = 0;
          label.verticalCenter = "middle";
          var arcRect = this._arcRect; // right half

          if (normalizedMiddleAngle > 270 || normalizedMiddleAngle <= 90) {
            x += (arcRect.width + arcRect.x) * this.pixelRadius;
            label.horizontalCenter = "left";

            this._rightItems.push(dataItem);
          } // left half
          else {
            x -= arcRect.x * this.pixelRadius;
            label.horizontalCenter = "right";

            this._leftItems.push(dataItem);

            x *= -1;
          }

          var distance = slice.radius + tick.length + labelRadius;
          point = {
            x: x,
            y: slice.iy * distance
          };
          label.moveTo(point);
        } else {
          var depth = slice["depth"];

          if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_6__.isNumber(depth)) {
            depth = 0;
          }

          label.fixPosition(slice.middleAngle, slice.radius, slice.radiusY, 0, -depth);
        }
      }

      this._currentStartAngle += slice.arc; // do this at the end, otherwise bullets won't be positioned properly

      _super.prototype.validateDataElement.call(this, dataItem);
    }
  };

  Object.defineProperty(PieSeries.prototype, "radius", {
    /**
     * @return Radius
     */
    get: function get() {
      return this.getPropertyValue("radius");
    },

    /**
     * Outer radius for the series' slices in pixels or [[Percent]].
     *
     * @param value  Radius
     */
    set: function set(value) {
      if (this.setPercentProperty("radius", value, true, false, 10, false)) {
        this.invalidateDataItems();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(PieSeries.prototype, "pixelRadius", {
    /**
     * @return Radius
     * @ignore
     */
    get: function get() {
      return this._pixelRadius;
    },

    /**
     * @ignore
     */
    set: function set(value) {
      if (this._pixelRadius != value) {
        this._pixelRadius = value;
        this.invalidateDataItems();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(PieSeries.prototype, "pixelInnerRadius", {
    /**
     * @return Pixel inner radius
     * @ignore
     */
    get: function get() {
      return this._pixelInnerRadius;
    },

    /**
     * @ignore
     */
    set: function set(value) {
      if (this._pixelInnerRadius != value) {
        this._pixelInnerRadius = value;
        this.invalidateDataItems();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(PieSeries.prototype, "innerRadius", {
    /**
     * @ignore Exclude from docs
     * @return Radius
     */
    get: function get() {
      return this.getPropertyValue("innerRadius");
    },

    /**
     * Inner radius for the series' slices in pixels.
     *
     * @ignore Exclude from docs
     * @todo Redo so that users can set it
     * @param value  Radius
     */
    set: function set(value) {
      this.setPercentProperty("innerRadius", value, true, false, 10, false);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(PieSeries.prototype, "startAngle", {
    /**
     * @return Angle
     */
    get: function get() {
      var startAngle = this.getPropertyValue("startAngle");

      if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_6__.isNumber(startAngle)) {
        return startAngle;
      } else {
        return this._startAngleInternal;
      }
    },

    /**
     * Start angle for the series' slices in degrees. (0-360)
     *
     * @param value  Angle
     */
    set: function set(value) {
      this.setPropertyValue("startAngle", _core_utils_Math__WEBPACK_IMPORTED_MODULE_5__.normalizeAngle(value), true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(PieSeries.prototype, "endAngle", {
    /**
     * @return Angle
     */
    get: function get() {
      var endAngle = this.getPropertyValue("endAngle");

      if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_6__.isNumber(endAngle)) {
        return endAngle;
      } else {
        return this._endAngleInternal;
      }
    },

    /**
     * End angle for the series' slices in degrees. (0-360)
     *
     * @param value  Angle
     */
    set: function set(value) {
      this.setPropertyValue("endAngle", value, true);
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Positions series bullet.
   *
   * @ignore Exclude from docs
   * @param bullet  Bullet
   */

  PieSeries.prototype.positionBullet = function (bullet) {
    _super.prototype.positionBullet.call(this, bullet);

    var dataItem = bullet.dataItem;
    var slice = dataItem.slice;
    var locationX = bullet.locationX;

    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_6__.isNumber(locationX)) {
      locationX = 0.5;
    }

    var locationY = bullet.locationY;

    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_6__.isNumber(locationY)) {
      locationY = 1;
    }

    var angle = slice.startAngle + slice.arc * locationX;
    bullet.x = locationY * slice.radius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_5__.cos(angle);
    bullet.y = locationY * slice.radiusY * _core_utils_Math__WEBPACK_IMPORTED_MODULE_5__.sin(angle);
  };
  /**
   * Repositions bullet and labels when slice moves.
   *
   * @ignore Exclude from docs
   * @param event  Event
   */


  PieSeries.prototype.handleSliceMove = function (event) {
    if (!this.alignLabels) {
      var slice = event.target;
      var dataItem = slice.dataItem; // moving textelement, as label dx and dy are already employed for aligning
      //@labeltodo

      if (dataItem) {
        var label = dataItem.label;

        if (label) {
          label.dx = label.fdx + slice.dx + slice.pixelX;
          label.dy = label.fdy + slice.dy + slice.pixelY;
        }
      }
    }
  };

  Object.defineProperty(PieSeries.prototype, "bbox", {
    /**
     * Returns bounding box (square) for this element.
     *
     * @ignore Exclude from docs
     */
    get: function get() {
      if (this.definedBBox) {
        return this.definedBBox;
      }

      var chart = this.chart;

      if (chart) {
        return _core_utils_Math__WEBPACK_IMPORTED_MODULE_5__.getArcRect(chart.startAngle, chart.endAngle, this.pixelRadius);
      }

      return _core_utils_Math__WEBPACK_IMPORTED_MODULE_5__.getArcRect(this.startAngle, this.endAngle, this.pixelRadius);
    },
    enumerable: true,
    configurable: true
  });
  return PieSeries;
}(_PercentSeries__WEBPACK_IMPORTED_MODULE_0__.PercentSeries);


/**
 * bboxter class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_4__.registry.registeredClasses.PieSeries = PieSeries;
_core_Registry__WEBPACK_IMPORTED_MODULE_4__.registry.registeredClasses.PieSeriesDataItem = PieSeriesDataItem;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/series/PieSeries3D.js":
/*!*********************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/series/PieSeries3D.js ***!
  \*********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "PieSeries3D": () => (/* binding */ PieSeries3D),
/* harmony export */   "PieSeries3DDataItem": () => (/* binding */ PieSeries3DDataItem)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _series_PieSeries__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../series/PieSeries */ "./node_modules/@amcharts/amcharts4/.internal/charts/series/PieSeries.js");
/* harmony import */ var _core_elements_3d_Slice3D__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/elements/3d/Slice3D */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/3d/Slice3D.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_utils_Type__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */





/**
 * ============================================================================
 * DATA ITEM
 * ============================================================================
 * @hidden
 */

/**
 * Defines a [[DataItem]] for [[PieSeries3D]].
 *
 * @see {@link DataItem}
 */

var PieSeries3DDataItem =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_4__.__extends)(PieSeries3DDataItem, _super);
  /**
   * Constructor
   */


  function PieSeries3DDataItem() {
    var _this = _super.call(this) || this;

    _this.className = "PieSeries3DDataItem";
    _this.values.depthValue = {};

    _this.applyTheme();

    return _this;
  }

  Object.defineProperty(PieSeries3DDataItem.prototype, "depthValue", {
    /**
     * @return Depth
     */
    get: function get() {
      return this.values["depthValue"].value;
    },

    /**
     * Slice depth (height).
     *
     * @param value  Depth
     */
    set: function set(value) {
      this.setValue("depthValue", value);
    },
    enumerable: true,
    configurable: true
  });
  return PieSeries3DDataItem;
}(_series_PieSeries__WEBPACK_IMPORTED_MODULE_0__.PieSeriesDataItem);


/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Defines [[Series]] for a slice series on a 3D pie chart.
 *
 * @see {@link IPieSeries3DEvents} for a list of available Events
 * @see {@link IPieSeries3DAdapters} for a list of available Adapters
 * @todo Example
 * @important
 */

var PieSeries3D =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_4__.__extends)(PieSeries3D, _super);
  /**
   * Constructor
   */


  function PieSeries3D() {
    var _this = _super.call(this) || this;

    _this.className = "PieSeries3D";

    _this.applyTheme();

    return _this;
  }
  /**
   * Returns a new/empty DataItem of the type appropriate for this object
   * @see {@link DataItem}
   * @return Data Item
   */


  PieSeries3D.prototype.createDataItem = function () {
    return new PieSeries3DDataItem();
  };
  /**
   * creates slice
   */


  PieSeries3D.prototype.createSlice = function () {
    return new _core_elements_3d_Slice3D__WEBPACK_IMPORTED_MODULE_1__.Slice3D();
  };
  /**
   * Validates data item's element, effectively redrawing it.
   *
   * @ignore Exclude from docs
   * @param dataItem  Data item
   */


  PieSeries3D.prototype.validateDataElement = function (dataItem) {
    var slice = dataItem.slice;
    var depth = this.depth;

    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_3__.isNumber(depth)) {
      depth = this.chart.depth;
    }

    var depthPercent = dataItem.values.depthValue.percent;

    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_3__.isNumber(depthPercent)) {
      depthPercent = 100;
    }

    slice.depth = depthPercent * depth / 100;
    var angle = this.angle;

    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_3__.isNumber(angle)) {
      angle = this.chart.angle;
    }

    slice.angle = angle;

    _super.prototype.validateDataElement.call(this, dataItem);
  };
  /**
   * (Re)validates the whole series, effectively causing it to redraw.
   *
   * @ignore Exclude from docs
   */


  PieSeries3D.prototype.validate = function () {
    _super.prototype.validate.call(this);

    for (var i = this._workingStartIndex; i < this._workingEndIndex; i++) {
      var dataItem = this.dataItems.getIndex(i);
      var slice = dataItem.slice;
      var startAngle = slice.startAngle; // find quarter
      //q0 || q1

      if (startAngle >= -90 && startAngle < 90) {
        slice.toFront();
      } //q2 || q3
      else if (startAngle >= 90) {
        slice.toBack();
      }
    }
  };

  Object.defineProperty(PieSeries3D.prototype, "depth", {
    /**
     * @return Depth (px)
     */
    get: function get() {
      return this.getPropertyValue("depth");
    },

    /**
     * Depth (height) of the pie slice in pixels.
     *
     * @param value  Depth (px)
     */
    set: function set(value) {
      this.setPropertyValue("depth", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(PieSeries3D.prototype, "angle", {
    /**
     * @return Angle
     */
    get: function get() {
      return this.getPropertyValue("angle");
    },

    /**
     * Angle of the view point of the 3D pie. (0-360)
     *
     * @param value  Angle
     */
    set: function set(value) {
      this.setPropertyValue("angle", value);
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Positions series bullet.
   *
   * @ignore Exclude from docs
   * @param bullet  Bullet
   */

  PieSeries3D.prototype.positionBullet = function (bullet) {
    _super.prototype.positionBullet.call(this, bullet);

    var dataItem = bullet.dataItem;
    var slice = dataItem.slice;
    bullet.y = bullet.pixelY - slice.depth;
  };

  return PieSeries3D;
}(_series_PieSeries__WEBPACK_IMPORTED_MODULE_0__.PieSeries);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_2__.registry.registeredClasses.PieSeries3D = PieSeries3D;
_core_Registry__WEBPACK_IMPORTED_MODULE_2__.registry.registeredClasses.PieSeries3DDataItem = PieSeries3DDataItem;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/series/PyramidSeries.js":
/*!***********************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/series/PyramidSeries.js ***!
  \***********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "PyramidSeries": () => (/* binding */ PyramidSeries),
/* harmony export */   "PyramidSeriesDataItem": () => (/* binding */ PyramidSeriesDataItem)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _FunnelSeries__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./FunnelSeries */ "./node_modules/@amcharts/amcharts4/.internal/charts/series/FunnelSeries.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_utils_Type__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/* harmony import */ var _core_utils_Utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/utils/Utils */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Utils.js");
/* harmony import */ var _core_utils_Percent__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../core/utils/Percent */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Percent.js");
/**
 * Defines Pyramid Series.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */






/**
 * ============================================================================
 * DATA ITEM
 * ============================================================================
 * @hidden
 */
//@todo: sequenced?

/**
 * Defines a [[DataItem]] for [[PyramidSeries]].
 *
 * @see {@link DataItem}
 */

var PyramidSeriesDataItem =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__extends)(PyramidSeriesDataItem, _super);
  /**
   * Constructor
   */


  function PyramidSeriesDataItem() {
    var _this = _super.call(this) || this;

    _this.className = "PyramidSeriesDataItem";

    _this.applyTheme();

    return _this;
  }

  return PyramidSeriesDataItem;
}(_FunnelSeries__WEBPACK_IMPORTED_MODULE_0__.FunnelSeriesDataItem);


/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Defines [[Series]] for a FunnelSlice series on a [[SlicedChart]].
 *
 * @see {@link IPyramidSeriesEvents} for a list of available Events
 * @see {@link IPyramidSeriesAdapters} for a list of available Adapters
 * @see {@link https://www.amcharts.com/docs/v4/chart-types/sliced-chart/} for documentation
 * @important
 */

var PyramidSeries =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__extends)(PyramidSeries, _super);
  /**
   * Constructor
   */


  function PyramidSeries() {
    var _this = _super.call(this) || this;

    _this.className = "PyramidSeries";
    _this.topWidth = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_4__.percent)(0);
    _this.bottomWidth = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_4__.percent)(100);
    _this.pyramidHeight = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_4__.percent)(100);
    _this.valueIs = "area";
    _this.sliceLinks.template.width = 0;
    _this.sliceLinks.template.height = 0;

    _this.applyTheme();

    return _this;
  }
  /**
   * Sets defaults that instantiate some objects that rely on parent, so they
   * cannot be set in constructor.
   */


  PyramidSeries.prototype.applyInternalDefaults = function () {
    _super.prototype.applyInternalDefaults.call(this);

    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_2__.hasValue(this.readerTitle)) {
      this.readerTitle = this.language.translate("Pyramid Series");
    }
  };
  /**
   * Returns a new/empty DataItem of the type appropriate for this object.
   *
   * @see {@link DataItem}
   * @return Data Item
   */


  PyramidSeries.prototype.createDataItem = function () {
    return new PyramidSeriesDataItem();
  };
  /**
   * (Re)validates the whole series, effectively causing it to redraw.
   *
   * @ignore Exclude from docs
   */


  PyramidSeries.prototype.validate = function () {
    _super.prototype.validate.call(this);

    this._nextWidth = undefined;
  };
  /**
   * [getNextValue description]
   *
   * @todo Description
   * @param dataItem [description]
   * @return [description]
   */


  PyramidSeries.prototype.getNextValue = function (dataItem) {
    var index = dataItem.index;
    var nextValue = dataItem.getWorkingValue("value");

    if (index < this.dataItems.length - 1) {
      var nextItem = this.dataItems.getIndex(index + 1);
      nextValue = nextItem.getWorkingValue("value");
    }

    if (nextValue == 0) {
      nextValue = 0.000001;
    }

    return nextValue;
  };
  /**
   * [validateDataElements description]
   *
   * @todo Description
   * @ignore Exclude from docs
   */


  PyramidSeries.prototype.validateDataElements = function () {
    var _this = this;

    var maxWidth = this.slicesContainer.innerWidth;
    var maxHeight = this.slicesContainer.innerHeight;
    this.dataItems.each(function (dataItem) {
      if (dataItem.value > 0) {
        var relValue = dataItem.getWorkingValue("value") / dataItem.value;
        var sliceLink = dataItem.sliceLink;

        if (_this.orientation == "vertical") {
          maxHeight -= sliceLink.pixelHeight * relValue;
        } else {
          maxWidth -= sliceLink.pixelWidth * relValue;
        }
      }
    });
    this._pyramidHeight = _core_utils_Utils__WEBPACK_IMPORTED_MODULE_3__.relativeToValue(this.pyramidHeight, maxHeight);
    this._pyramidWidth = _core_utils_Utils__WEBPACK_IMPORTED_MODULE_3__.relativeToValue(this.pyramidHeight, maxWidth);

    if (this.orientation == "vertical") {
      var y = (maxHeight - this._pyramidHeight) / 2;
      this.slicesContainer.y = y;
      this.labelsContainer.y = y;
      this.ticksContainer.y = y;
    } else {
      var x = (maxWidth - this._pyramidWidth) / 2;
      this.slicesContainer.x = x;
      this.labelsContainer.x = x;
      this.ticksContainer.x = x;
    }

    _super.prototype.validateDataElements.call(this);
  };
  /**
   * [decorateSlice description]
   *
   * @todo Description
   * @param dataItem [description]
   */


  PyramidSeries.prototype.decorateSlice = function (dataItem) {
    var sum = this.dataItem.values.value.absoluteSum;

    if (sum == 0) {
      return;
    }

    var slice = dataItem.slice;
    var sliceLink = dataItem.sliceLink;
    var label = dataItem.label;
    var tick = dataItem.tick; // TODO can this be removed ?

    this.getNextValue(dataItem);
    var workingValue = Math.abs(dataItem.getWorkingValue("value"));
    var pyramidWidth = this._pyramidWidth;
    var pyramidHeight = this._pyramidHeight;
    var maxWidth = this.slicesContainer.innerWidth;
    var maxHeight = this.slicesContainer.innerHeight;
    var linkWidth = sliceLink.pixelWidth;
    var linkHeight = sliceLink.pixelHeight;

    if ((dataItem.value == 0 || dataItem.value == null) && this.ignoreZeroValues) {
      dataItem.__disabled = true;
    } else {
      dataItem.__disabled = false;
    }

    if (this.orientation == "vertical") {
      var topWidth = _core_utils_Utils__WEBPACK_IMPORTED_MODULE_3__.relativeToValue(this.topWidth, maxWidth);

      if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_2__.isNumber(this._nextWidth)) {
        this._nextWidth = topWidth;
      }

      var bottomWidth = _core_utils_Utils__WEBPACK_IMPORTED_MODULE_3__.relativeToValue(this.bottomWidth, maxWidth);
      var sliceTopWidth = this._nextWidth;
      var angle = Math.atan2(pyramidHeight, topWidth - bottomWidth);
      var c = Math.tan(Math.PI / 2 - angle);

      if (c == 0) {
        c = 0.00000001;
      }

      var sliceHeight = void 0;
      var sliceBottomWidth = void 0;

      if (this.valueIs == "area") {
        var totalSquare = (topWidth + bottomWidth) / 2 * pyramidHeight;
        var square = totalSquare * workingValue / sum;
        var s = Math.abs(sliceTopWidth * sliceTopWidth - 2 * square * c);
        sliceHeight = (sliceTopWidth - Math.sqrt(s)) / c;

        if (sliceHeight > 0) {
          sliceBottomWidth = (2 * square - sliceHeight * sliceTopWidth) / sliceHeight;
        } else {
          sliceBottomWidth = sliceTopWidth;
        }
      } else {
        sliceHeight = pyramidHeight * workingValue / sum;
        sliceBottomWidth = sliceTopWidth - sliceHeight * c;
      }

      slice.height = sliceHeight;
      slice.width = maxWidth;
      slice.bottomWidth = sliceBottomWidth;
      slice.topWidth = sliceTopWidth;
      sliceLink.topWidth = slice.bottomWidth;
      sliceLink.bottomWidth = slice.bottomWidth;
      slice.y = this._nextY; //slice.x = maxWidth / 2;

      if (!this.alignLabels) {
        label.x = maxWidth / 2;
      } else {
        label.x = 0;
      }

      label.y = slice.pixelY + slice.pixelHeight * tick.locationY + slice.dy;
      this._nextY += slice.pixelHeight + linkHeight * workingValue / Math.max(Math.abs(dataItem.value), 0.00000001);
      sliceLink.y = this._nextY - linkHeight;
      sliceLink.x = maxWidth / 2;
    } else {
      var topWidth = _core_utils_Utils__WEBPACK_IMPORTED_MODULE_3__.relativeToValue(this.topWidth, maxHeight);

      if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_2__.isNumber(this._nextWidth)) {
        this._nextWidth = topWidth;
      }

      var bottomWidth = _core_utils_Utils__WEBPACK_IMPORTED_MODULE_3__.relativeToValue(this.bottomWidth, maxHeight);
      var sliceTopWidth = this._nextWidth;
      var angle = Math.atan2(pyramidWidth, topWidth - bottomWidth);
      var c = Math.tan(Math.PI / 2 - angle);

      if (c == 0) {
        c = 0.00000001;
      }

      var sliceWidth = void 0;
      var sliceBottomWidth = void 0;

      if (this.valueIs == "area") {
        var totalSquare = (topWidth + bottomWidth) / 2 * pyramidWidth;
        var square = totalSquare * workingValue / sum;
        sliceWidth = (sliceTopWidth - Math.sqrt(sliceTopWidth * sliceTopWidth - 2 * square * c)) / c;
        sliceBottomWidth = (2 * square - sliceWidth * sliceTopWidth) / sliceWidth;
      } else {
        sliceWidth = pyramidWidth * workingValue / sum;
        sliceBottomWidth = sliceTopWidth - sliceWidth * c;
      }

      slice.width = sliceWidth;
      slice.height = maxHeight;
      slice.bottomWidth = sliceBottomWidth;
      slice.topWidth = sliceTopWidth;
      sliceLink.topWidth = slice.bottomWidth;
      sliceLink.bottomWidth = slice.bottomWidth;
      slice.x = this._nextY;

      if (!this.alignLabels) {
        label.y = maxHeight / 2;
      } else {
        label.y = this.labelsContainer.measuredHeight;
      }

      label.x = slice.pixelX + slice.pixelWidth * tick.locationX + slice.dx;
      this._nextY += slice.pixelWidth + linkWidth * workingValue / Math.max(Math.abs(dataItem.value), 0.00000001);
      sliceLink.x = this._nextY - linkWidth;
      sliceLink.y = maxHeight / 2;
    }

    this._nextWidth = slice.bottomWidth;
  };

  Object.defineProperty(PyramidSeries.prototype, "topWidth", {
    /**
     * @return {number | Percent}
     */
    get: function get() {
      return this.getPropertyValue("topWidth");
    },

    /**
     * Width of the pyramid's tip in pixels or relative (`Percent`).
     *
     * `0%` (default) means the pyramid will be perfectly pointy.
     * `50%` will have a cut off / blunt top that is half the width of the chart.
     * `100%` will take the whole width of the chart.
     *
     * If you need the downward-pointing pyramid, you might want to `topWidth` to
     * `100%` and `bottomWidth` to `0%`.
     *
     * @default 0%
     * @param {number | Percent}
     */
    set: function set(value) {
      if (this.setPercentProperty("topWidth", value, false, false, 10, false)) {
        this.invalidate();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(PyramidSeries.prototype, "pyramidHeight", {
    /**
     * @return {number | Percent}
     */
    get: function get() {
      return this.getPropertyValue("pyramidHeight");
    },

    /**
     * Height of pyramid
     *
     *
     * @default 100%
     * @param {number | Percent}
     */
    set: function set(value) {
      if (this.setPercentProperty("pyramidHeight", value, false, false, 10, false)) {
        this.invalidate();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(PyramidSeries.prototype, "bottomWidth", {
    /**
     * @return {number | Percent}
     */
    get: function get() {
      return this.getPropertyValue("bottomWidth");
    },

    /**
     * Width of the pyramid's bottom (bsae) in pixels or relative (`Percent`).
     *
     * `0%` means the pyramid's botto will be pointy.
     * `50%` will have a cut off / blunt bottom that is half the width of the chart.
     * `100%` (default) will take the whole width of the chart.
     *
     * If you need the downward-pointing pyramid, you might want to `topWidth` to
     * `100%` and `bottomWidth` to `0%`.
     *
     * @param {number | Percent}
     */
    set: function set(value) {
      if (this.setPercentProperty("bottomWidth", value, false, false, 10, false)) {
        this.invalidate();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(PyramidSeries.prototype, "valueIs", {
    /**
     * @return {"area" | "height"}
     */
    get: function get() {
      return this.getPropertyValue("valueIs");
    },

    /**
     * Indicates how slice's value will influence its size.
     *
     * `"area"` (default) means that the whole area of the pyramid (counting in
     * modifications by `topWidth` and `bottomWidth`) will be divvied up between
     * slices based on their value.
     *
     * With this setting at `"area"` the area of the trapezoids of each slice
     * will represent their value relatively to values of the other slices.
     *
     * This is a correct way to depict "weight" of each slice based on their
     * values.
     *
     * `"height"` means whole height (as opposed to area) of the pyramid will be
     * divvied up between slices. Actual slice width or area is not counted in.
     *
     * From the data-viz standpoint this does not make a lot of sense, since
     * slices with lesser values might appear more prominent if they are placed
     * towards thick end of the pyramid since their areas will be bigger.
     *
     * @default "area"
     * @param {"area" | "height"}
     */
    set: function set(value) {
      if (this.setPropertyValue("valueIs", value)) {
        this.invalidate();
      }
    },
    enumerable: true,
    configurable: true
  });
  return PyramidSeries;
}(_FunnelSeries__WEBPACK_IMPORTED_MODULE_0__.FunnelSeries);


/**
 * bboxter class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses.PyramidSeries = PyramidSeries;
_core_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses.PyramidSeriesDataItem = PyramidSeriesDataItem;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/series/RadarColumnSeries.js":
/*!***************************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/series/RadarColumnSeries.js ***!
  \***************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "RadarColumnSeries": () => (/* binding */ RadarColumnSeries),
/* harmony export */   "RadarColumnSeriesDataItem": () => (/* binding */ RadarColumnSeriesDataItem)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _series_ColumnSeries__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../series/ColumnSeries */ "./node_modules/@amcharts/amcharts4/.internal/charts/series/ColumnSeries.js");
/* harmony import */ var _core_Sprite__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/Sprite */ "./node_modules/@amcharts/amcharts4/.internal/core/Sprite.js");
/* harmony import */ var _axes_CategoryAxis__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../axes/CategoryAxis */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/CategoryAxis.js");
/* harmony import */ var _elements_RadarColumn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../elements/RadarColumn */ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/RadarColumn.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_rendering_Path__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../core/rendering/Path */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Path.js");
/* harmony import */ var _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../core/utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
/* harmony import */ var _core_utils_Object__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../core/utils/Object */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Object.js");
/* harmony import */ var _core_utils_Percent__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../core/utils/Percent */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Percent.js");
/* harmony import */ var _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../core/utils/Iterator */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Iterator.js");
/* harmony import */ var _core_utils_Array__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../core/utils/Array */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Array.js");
/* harmony import */ var _core_utils_Type__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../core/utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/**
 * Radar column series module.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */













/**
 * ============================================================================
 * DATA ITEM
 * ============================================================================
 * @hidden
 */

/**
 * Defines a [[DataItem]] for [[RadarColumnSeries]].
 *
 * @see {@link DataItem}
 */

var RadarColumnSeriesDataItem =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_12__.__extends)(RadarColumnSeriesDataItem, _super);
  /**
   * Constructor
   */


  function RadarColumnSeriesDataItem() {
    var _this = _super.call(this) || this;

    _this.className = "ColumnSeriesDataItem";

    _this.applyTheme();

    return _this;
  }

  return RadarColumnSeriesDataItem;
}(_series_ColumnSeries__WEBPACK_IMPORTED_MODULE_0__.ColumnSeriesDataItem);


/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Defines [[Series]] for a 3D column graph.
 *
 * @see {@link IRadarColumnSeriesEvents} for a list of available Events
 * @see {@link IRadarColumnSeriesAdapters} for a list of available Adapters
 * @todo Example
 * @important
 */

var RadarColumnSeries =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_12__.__extends)(RadarColumnSeries, _super);
  /**
   * Constructor
   */


  function RadarColumnSeries() {
    var _this = _super.call(this) || this;

    _this.className = "RadarColumnSeries";

    _this.applyTheme();

    return _this;
  }
  /**
   * Creates and returns a RadarColumn element to use as column in radar chart.
   *
   * @return RadarColumn.
   */


  RadarColumnSeries.prototype.createColumnTemplate = function () {
    return new _elements_RadarColumn__WEBPACK_IMPORTED_MODULE_3__.RadarColumn();
  };
  /**
   * (Re)validates the whole series, effectively causing it to redraw.
   *
   * @ignore Exclude from docs
   */


  RadarColumnSeries.prototype.validate = function () {
    // so that radius would be updated
    if (this.chart.invalid) {
      this.chart.validate();
    }

    _super.prototype.validate.call(this);
  };
  /**
   * @ignore
   */


  RadarColumnSeries.prototype.disableUnusedColumns = function (dataItem) {
    if (dataItem) {
      if (dataItem.column) {
        dataItem.column.__disabled = true;
      }

      _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_9__.each(this.axisRanges.iterator(), function (axisRange) {
        var rangeColumn = dataItem.rangesColumns.getKey(axisRange.uid);

        if (rangeColumn) {
          rangeColumn.__disabled = true;
        }
      });
    }
  };
  /**
   * Validates data item's element, effectively redrawing it.
   *
   * @ignore Exclude from docs
   * @param dataItem  Data item
   */


  RadarColumnSeries.prototype.validateDataElementReal = function (dataItem) {
    var _this = this;

    var startAngle = this.chart.startAngle;
    var endAngle = this.chart.endAngle;
    var yField = this.yField;
    var yOpenField = this.yOpenField;
    var xField = this.xField;
    var xOpenField = this.xOpenField;
    var lAngle;
    var rAngle;
    var tRadius;
    var bRadius;
    var startLocation = this.getStartLocation(dataItem);
    var endLocation = this.getEndLocation(dataItem);
    var cellAngle = (endAngle - startAngle) / (this.dataItems.length * (this.end - this.start));
    var radarColumn = dataItem.column;

    if (!radarColumn) {
      radarColumn = this.columns.create();
      dataItem.column = radarColumn;
      _core_utils_Object__WEBPACK_IMPORTED_MODULE_7__.copyProperties(this, radarColumn, _core_Sprite__WEBPACK_IMPORTED_MODULE_1__.visualProperties); // need this 

      _core_utils_Object__WEBPACK_IMPORTED_MODULE_7__.copyProperties(this.columns.template, radarColumn, _core_Sprite__WEBPACK_IMPORTED_MODULE_1__.visualProperties); // second time, no force, so that columns.template would override series properties			

      dataItem.addSprite(radarColumn);
      radarColumn.paper = this.paper; // sometimes pattern is not drawn if is set with adapter without this.

      this.setColumnStates(radarColumn);
    }

    var width = radarColumn.width;
    var percentWidth = 100;

    if (width instanceof _core_utils_Percent__WEBPACK_IMPORTED_MODULE_8__.Percent) {
      percentWidth = width.percent;
    }

    var offset = _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.round((endLocation - startLocation) * (1 - percentWidth / 100) / 2, 5);
    startLocation += offset;
    endLocation -= offset; // two category axes

    if (this.xAxis instanceof _axes_CategoryAxis__WEBPACK_IMPORTED_MODULE_2__.CategoryAxis && this.yAxis instanceof _axes_CategoryAxis__WEBPACK_IMPORTED_MODULE_2__.CategoryAxis) {
      tRadius = _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.getDistance({
        x: this.yAxis.getX(dataItem, yField, 0, "valueY"),
        y: this.yAxis.getY(dataItem, yField, 0, "valueY")
      });
      bRadius = _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.getDistance({
        x: this.yAxis.getX(dataItem, yOpenField, 1, "valueY"),
        y: this.yAxis.getY(dataItem, yOpenField, 1, "valueY")
      });
      lAngle = this.xAxis.getAngle(dataItem, xOpenField, 0, "valueX");
      rAngle = this.xAxis.getAngle(dataItem, xField, 1, "valueX");
      startAngle = startAngle + startLocation * cellAngle;
      endAngle = endAngle - (1 - endLocation) * cellAngle;
    } else if (this.baseAxis == this.xAxis) {
      tRadius = _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.getDistance({
        x: this.yAxis.getX(dataItem, yField, dataItem.locations[yField], "valueY"),
        y: this.yAxis.getY(dataItem, yField, dataItem.locations[yField], "valueY")
      });
      bRadius = _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.getDistance({
        x: this.yAxis.getX(dataItem, yOpenField, dataItem.locations[yOpenField], "valueY"),
        y: this.yAxis.getY(dataItem, yOpenField, dataItem.locations[yOpenField], "valueY")
      });
      lAngle = this.xAxis.getAngle(dataItem, xOpenField, startLocation, "valueX");
      rAngle = this.xAxis.getAngle(dataItem, xField, endLocation, "valueX");
      startAngle = startAngle + startLocation * cellAngle;
      endAngle = endAngle - (1 - endLocation) * cellAngle;
    } else {
      tRadius = _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.getDistance({
        x: this.yAxis.getX(dataItem, yField, startLocation, "valueY"),
        y: this.yAxis.getY(dataItem, yField, startLocation, "valueY")
      });
      bRadius = _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.getDistance({
        x: this.yAxis.getX(dataItem, yOpenField, endLocation, "valueY"),
        y: this.yAxis.getY(dataItem, yOpenField, endLocation, "valueY")
      });

      if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_11__.isNumber(width)) {
        var abs = Math.abs(tRadius - bRadius);

        if (abs > width) {
          var d = (abs - width) / 2;
          tRadius += d;
          bRadius -= d;
        }
      }

      lAngle = this.xAxis.getAngle(dataItem, xField, dataItem.locations[xField], "valueX");
      rAngle = this.xAxis.getAngle(dataItem, xOpenField, dataItem.locations[xOpenField], "valueX");
    }

    if (rAngle < lAngle) {
      var temp = rAngle;
      rAngle = lAngle;
      lAngle = temp;
    }

    lAngle = _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.fitToRange(lAngle, startAngle, endAngle);
    rAngle = _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.fitToRange(rAngle, startAngle, endAngle);
    var slice = radarColumn.radarColumn;
    slice.startAngle = lAngle;
    var arc = rAngle - lAngle;

    if (arc > 0) {
      slice.arc = arc;
      slice.radius = tRadius;
      slice.innerRadius = bRadius;
      radarColumn.__disabled = false;
      radarColumn.parent = this.columnsContainer;
      _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_9__.each(this.axisRanges.iterator(), function (axisRange) {
        var rangeColumn = dataItem.rangesColumns.getKey(axisRange.uid);

        if (!rangeColumn) {
          rangeColumn = _this.columns.create();
          _core_utils_Object__WEBPACK_IMPORTED_MODULE_7__.forceCopyProperties(_this.columns.template, rangeColumn, _core_Sprite__WEBPACK_IMPORTED_MODULE_1__.visualProperties);
          _core_utils_Object__WEBPACK_IMPORTED_MODULE_7__.copyProperties(axisRange.contents, rangeColumn, _core_Sprite__WEBPACK_IMPORTED_MODULE_1__.visualProperties); // need this because 3d columns are not in the same container

          if (rangeColumn.dataItem) {
            _core_utils_Array__WEBPACK_IMPORTED_MODULE_10__.remove(rangeColumn.dataItem.sprites, rangeColumn);
          }

          dataItem.addSprite(rangeColumn);
          rangeColumn.paper = _this.paper; // sometimes pattern is not drawn if is set with adapter without this.					

          _this.setColumnStates(rangeColumn);

          dataItem.rangesColumns.setKey(axisRange.uid, rangeColumn);
        }

        var slice = rangeColumn.radarColumn;
        slice.startAngle = lAngle;
        slice.arc = arc;
        slice.radius = tRadius;
        slice.innerRadius = bRadius;

        if (slice.invalid) {
          slice.paper = _this.paper;
          slice.validate(); // validate as if it was used previously, it will flicker with previous dimensions
        }

        rangeColumn.__disabled = false;
        rangeColumn.parent = axisRange.contents;
      });
    } else {
      this.disableUnusedColumns(dataItem);
    }
  };
  /**
   * Returns an [[IPoint]] coordinates of the specific Serie's data point.
   *
   * @param    dataItem   Data item
   * @param    xKey       Name of X data field
   * @param    yKey       Name of Y data field
   * @param    locationX  X location
   * @param    locationY  Y location
   * @param    stackKeyX  ?
   * @param    stackKeyY  ?
   * @returns             Coordinates
   */


  RadarColumnSeries.prototype.getPoint = function (dataItem, xKey, yKey, locationX, locationY, stackKeyX, stackKeyY) {
    if (!stackKeyX) {
      stackKeyX = "valueX";
    }

    if (!stackKeyY) {
      stackKeyY = "valueY";
    }

    var x = this.yAxis.getX(dataItem, yKey, locationY, stackKeyY);
    var y = this.yAxis.getY(dataItem, yKey, locationY, stackKeyY);
    var radius = _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.getDistance({
      x: x,
      y: y
    }); // hack to be able to determine angle later

    if (radius == 0) {
      radius = 0.00001;
    }

    var angle = this.xAxis.getAngle(dataItem, xKey, locationX, stackKeyX);
    return {
      x: radius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.cos(angle),
      y: radius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.sin(angle)
    };
  };
  /**
   * Returns an SVG path to be used as a mask for the series.
   *
   * @return SVG path
   */


  RadarColumnSeries.prototype.getMaskPath = function () {
    var renderer = this.yAxis.renderer;
    return _core_rendering_Path__WEBPACK_IMPORTED_MODULE_5__.arc(renderer.startAngle, renderer.endAngle - renderer.startAngle, renderer.pixelRadius, renderer.pixelInnerRadius);
  };

  RadarColumnSeries.prototype.positionBulletReal = function (bullet, positionX, positionY) {
    var xAxis = this.xAxis;
    var yAxis = this.yAxis;

    if (positionX < xAxis.start || positionX > xAxis.end || positionY < yAxis.start || positionY > yAxis.end) {
      bullet.visible = false;
    }

    bullet.moveTo(this.xAxis.renderer.positionToPoint(positionX, positionY));
  };

  RadarColumnSeries.prototype.setXAxis = function (axis) {
    _super.prototype.setXAxis.call(this, axis);

    this.updateRendererRefs();
  };

  RadarColumnSeries.prototype.setYAxis = function (axis) {
    _super.prototype.setYAxis.call(this, axis);

    this.updateRendererRefs();
  };

  RadarColumnSeries.prototype.updateRendererRefs = function () {
    var rendererX = this.xAxis.renderer;
    var rendererY = this.yAxis.renderer;
    rendererX.axisRendererY = rendererY;
  };

  return RadarColumnSeries;
}(_series_ColumnSeries__WEBPACK_IMPORTED_MODULE_0__.ColumnSeries);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_4__.registry.registeredClasses.RadarColumnSeries = RadarColumnSeries;
_core_Registry__WEBPACK_IMPORTED_MODULE_4__.registry.registeredClasses.RadarColumnSeriesDataItem = RadarColumnSeriesDataItem;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/series/RadarSeries.js":
/*!*********************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/series/RadarSeries.js ***!
  \*********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "RadarSeries": () => (/* binding */ RadarSeries),
/* harmony export */   "RadarSeriesDataItem": () => (/* binding */ RadarSeriesDataItem)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _LineSeries__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./LineSeries */ "./node_modules/@amcharts/amcharts4/.internal/charts/series/LineSeries.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
/* harmony import */ var _core_rendering_Path__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/rendering/Path */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Path.js");
/**
 * Radar series module.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */




 //import { AxisRendererCircular } from "../axes/AxisRendererCircular";
//import { Sprite } from "../../core/Sprite";

/**
 * ============================================================================
 * DATA ITEM
 * ============================================================================
 * @hidden
 */

/**
 * Defines a [[DataItem]] for [[RadarSeries]].
 *
 * @see {@link DataItem}
 */

var RadarSeriesDataItem =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_4__.__extends)(RadarSeriesDataItem, _super);
  /**
   * Constructor
   */


  function RadarSeriesDataItem() {
    var _this = _super.call(this) || this;

    _this.className = "RadarSeriesDataItem";

    _this.setLocation("dateX", 0, 0);

    _this.setLocation("dateY", 0, 0);

    _this.setLocation("categoryX", 0, 0);

    _this.setLocation("categoryY", 0, 0);

    _this.applyTheme();

    return _this;
  }

  return RadarSeriesDataItem;
}(_LineSeries__WEBPACK_IMPORTED_MODULE_0__.LineSeriesDataItem);


/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Defines [[Series]] for a radar graph.
 *
 * @see {@link IRadarSeriesEvents} for a list of available Events
 * @see {@link IRadarSeriesAdapters} for a list of available Adapters
 * @todo Example
 * @important
 */

var RadarSeries =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_4__.__extends)(RadarSeries, _super);
  /**
   * Constructor
   */


  function RadarSeries() {
    var _this = _super.call(this) || this;

    _this.className = "RadarSeries";
    _this.connectEnds = true;

    _this.applyTheme();

    return _this;
  }
  /**
   * (Re)validates the whole series, effectively causing it to redraw.
   *
   * @ignore Exclude from docs
   */


  RadarSeries.prototype.validate = function () {
    // so that radius would be updated
    if (this.chart.invalid) {
      this.chart.validate();
    }

    _super.prototype.validate.call(this);
  };
  /**
   * Returns a new/empty DataItem of the type appropriate for this object.
   *
   * @see {@link DataItem}
   * @return Data Item
   */


  RadarSeries.prototype.createDataItem = function () {
    return new RadarSeriesDataItem();
  };
  /**
   * Returns an [[IPoint]] coordinates of the specific Serie's data point.
   *
   * @param    dataItem   Data item
   * @param    xKey       Name of X data field
   * @param    yKey       Name of Y data field
   * @param    locationX  X location
   * @param    locationY  Y location
   * @param    stackKeyX  ?
   * @param    stackKeyY  ?
   * @returns             Coordinates
   */


  RadarSeries.prototype.getPoint = function (dataItem, xKey, yKey, locationX, locationY, stackKeyX, stackKeyY) {
    if (!stackKeyX) {
      stackKeyX = "valueX";
    }

    if (!stackKeyY) {
      stackKeyY = "valueY";
    }

    var x = this.yAxis.getX(dataItem, yKey, locationY, stackKeyY);
    var y = this.yAxis.getY(dataItem, yKey, locationY, stackKeyY);
    var radius = _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.getDistance({
      x: x,
      y: y
    }); // hack to be able to determine angle later

    if (radius == 0) {
      radius = 0.00001;
    }

    var angle = this.xAxis.getAngle(dataItem, xKey, locationX, stackKeyX);
    var startAngle = this.chart.startAngle;
    var endAngle = this.chart.endAngle; //		angle = $math.fitToRange(angle, startAngle, endAngle);

    if (angle < startAngle || angle > endAngle) {
      return undefined;
    } else {
      return {
        x: radius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.cos(angle),
        y: radius * _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.sin(angle)
      };
    }
  };
  /**
   * [addPoints description]
   *
   * @todo Description
   * @param points    [description]
   * @param dataItem  [description]
   * @param xField    [description]
   * @param yField    [description]
   * @param backwards [description]
   */


  RadarSeries.prototype.addPoints = function (points, dataItem, xField, yField, backwards) {
    var point = this.getPoint(dataItem, xField, yField, dataItem.locations[xField], dataItem.locations[yField]);

    if (point) {
      points.push(point);
    }
  };
  /**
   * Returns an SVG path to be used as a mask for the series.
   *
   * @return SVG path
   */


  RadarSeries.prototype.getMaskPath = function () {
    var renderer = this.yAxis.renderer;
    return _core_rendering_Path__WEBPACK_IMPORTED_MODULE_3__.arc(renderer.startAngle, renderer.endAngle - renderer.startAngle, renderer.pixelRadius, renderer.pixelInnerRadius);
  };
  /**
   * [drawSegment description]
   *
   * @todo Description
   * @param segment      [description]
   * @param points       [description]
   * @param closePoints  [description]
   */


  RadarSeries.prototype.drawSegment = function (segment, points, closePoints) {
    var axis = this.yAxis;
    var renderer = axis.renderer;

    if (this.connectEnds && Math.abs(renderer.endAngle - renderer.startAngle) == 360) {
      // adds one point to the beginning of closePoints array, if needed
      if (this.dataFields[this._xOpenField] || this.dataFields[this._yOpenField] || this.stacked) {
        points.push(points[0]);

        if (closePoints.length > 0) {
          closePoints.unshift(closePoints[closePoints.length - 1]);
        }
      }
    }

    _super.prototype.drawSegment.call(this, segment, points, closePoints);
  };

  Object.defineProperty(RadarSeries.prototype, "connectEnds", {
    /**
     * @return Connect?
     */
    get: function get() {
      return this.getPropertyValue("connectEnds");
    },

    /**
     * Should the last and and first data points be connected, forming a complete
     * closed circle?
     *
     * @default true
     * @param value  Connect?
     */
    set: function set(value) {
      this.setPropertyValue("connectEnds", value, true);
    },
    enumerable: true,
    configurable: true
  });

  RadarSeries.prototype.positionBulletReal = function (bullet, positionX, positionY) {
    var xAxis = this.xAxis;
    var yAxis = this.yAxis;

    if (positionX < xAxis.start || positionX > xAxis.end || positionY < yAxis.start || positionY > yAxis.end) {
      bullet.visible = false;
    }

    bullet.moveTo(this.xAxis.renderer.positionToPoint(positionX, positionY));
  };

  RadarSeries.prototype.setXAxis = function (axis) {
    _super.prototype.setXAxis.call(this, axis);

    this.updateRendererRefs();
  };

  RadarSeries.prototype.setYAxis = function (axis) {
    _super.prototype.setYAxis.call(this, axis);

    this.updateRendererRefs();
  };

  RadarSeries.prototype.updateRendererRefs = function () {
    var rendererX = this.xAxis.renderer;
    var rendererY = this.yAxis.renderer;
    rendererX.axisRendererY = rendererY;
  };

  return RadarSeries;
}(_LineSeries__WEBPACK_IMPORTED_MODULE_0__.LineSeries);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses.RadarSeries = RadarSeries;
_core_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses.RadarSeriesDataItem = RadarSeriesDataItem;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/series/Series.js":
/*!****************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/series/Series.js ***!
  \****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Series": () => (/* binding */ Series),
/* harmony export */   "SeriesDataItem": () => (/* binding */ SeriesDataItem)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _core_Component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../core/Component */ "./node_modules/@amcharts/amcharts4/.internal/core/Component.js");
/* harmony import */ var _core_Sprite__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/Sprite */ "./node_modules/@amcharts/amcharts4/.internal/core/Sprite.js");
/* harmony import */ var _core_utils_List__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/utils/List */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/List.js");
/* harmony import */ var _core_utils_Dictionary__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/utils/Dictionary */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Dictionary.js");
/* harmony import */ var _core_DataItem__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../core/DataItem */ "./node_modules/@amcharts/amcharts4/.internal/core/DataItem.js");
/* harmony import */ var _core_Container__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../core/Container */ "./node_modules/@amcharts/amcharts4/.internal/core/Container.js");
/* harmony import */ var _core_elements_Tooltip__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../core/elements/Tooltip */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Tooltip.js");
/* harmony import */ var _elements_Bullet__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../elements/Bullet */ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/Bullet.js");
/* harmony import */ var _Legend__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../Legend */ "./node_modules/@amcharts/amcharts4/.internal/charts/Legend.js");
/* harmony import */ var _core_Options__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../core/Options */ "./node_modules/@amcharts/amcharts4/.internal/core/Options.js");
/* harmony import */ var _core_utils_Color__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../core/utils/Color */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Color.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../core/utils/Iterator */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Iterator.js");
/* harmony import */ var _core_utils_Math__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../core/utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
/* harmony import */ var _core_utils_Ease__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../core/utils/Ease */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Ease.js");
/* harmony import */ var _core_utils_Utils__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../core/utils/Utils */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Utils.js");
/* harmony import */ var _core_utils_Object__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../core/utils/Object */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Object.js");
/* harmony import */ var _core_utils_Type__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../core/utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/* harmony import */ var _core_utils_Array__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../core/utils/Array */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Array.js");
/* harmony import */ var _core_utils_Colors__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../core/utils/Colors */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Colors.js");
/**
 * Functionality for any series-based elements, like Line Series (graphs),
 * Pie slice lists, etc.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */





















/**
 * ============================================================================
 * DATA ITEM
 * ============================================================================
 * @hidden
 */

/**
 * Defines a [[DataItem]] for [[Series]].
 *
 * @see {@link DataItem}
 */

var SeriesDataItem =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_20__.__extends)(SeriesDataItem, _super);
  /**
   * Constructor
   */


  function SeriesDataItem() {
    var _this = _super.call(this) || this;

    _this.className = "SeriesDataItem"; //@todo Should we make `bullets` list disposable?
    //this._disposers.push(new DictionaryDisposer(this.bullets));

    _this.values.value = {};
    _this.values.value = {};

    _this.applyTheme();

    return _this;
  }

  Object.defineProperty(SeriesDataItem.prototype, "bullets", {
    /**
     * A dictionary of data items bullets, where key is uid of a bullet template.
     */
    get: function get() {
      if (!this._bullets) {
        this._bullets = new _core_utils_Dictionary__WEBPACK_IMPORTED_MODULE_3__.Dictionary();

        this._disposers.push(new _core_utils_Dictionary__WEBPACK_IMPORTED_MODULE_3__.DictionaryDisposer(this._bullets));
      }

      return this._bullets;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Destroys this object and all related data.
   */

  SeriesDataItem.prototype.dispose = function () {
    this.bullets.clear();

    _super.prototype.dispose.call(this);
  };

  Object.defineProperty(SeriesDataItem.prototype, "value", {
    /**
     * @return Value
     */
    get: function get() {
      return this.values.value.value;
    },

    /**
     * data items's numeric value.
     *
     * @param value  Value
     */
    set: function set(value) {
      this.setValue("value", value);
    },
    enumerable: true,
    configurable: true
  });
  return SeriesDataItem;
}(_core_DataItem__WEBPACK_IMPORTED_MODULE_4__.DataItem);


/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Defines base class for any kind of serial data.
 *
 * @see {@link ISeriesEvents} for a list of available Events
 * @see {@link ISeriesAdapters} for a list of available Adapters
 * @todo Separate axis-related stuff to some other class so that MapSeries would not have unrelated stuff
 */

var Series =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_20__.__extends)(Series, _super);
  /**
   * Constructor
   */


  function Series() {
    var _this = _super.call(this) || this;
    /**
     * Should this series excluded from the axis scale calculations?
     *
     * @default false
     */


    _this._ignoreMinMax = false;
    /**
     * Should series' bullets?
     *
     * @default true
     */

    _this._showBullets = true;
    /**
     * Settings for the appearance of the related legend items.
     */

    _this.legendSettings = new _Legend__WEBPACK_IMPORTED_MODULE_8__.LegendSettings();
    /**
     * Lowest overal values by type.
     */

    _this._tmin = new _core_utils_Dictionary__WEBPACK_IMPORTED_MODULE_3__.Dictionary();
    /**
     * Highest overal values by type.
     */

    _this._tmax = new _core_utils_Dictionary__WEBPACK_IMPORTED_MODULE_3__.Dictionary();
    /**
     * Lowest values in current selection by type.
     */

    _this._smin = new _core_utils_Dictionary__WEBPACK_IMPORTED_MODULE_3__.Dictionary();
    /**
     * Highest values in current selection by type.
     */

    _this._smax = new _core_utils_Dictionary__WEBPACK_IMPORTED_MODULE_3__.Dictionary();
    /**
     * [dataItemsByAxis description]
     *
     * Both by category and date.
     *
     * @ignore Exclude from docs
     * @todo Description
     */

    _this.dataItemsByAxis = new _core_utils_Dictionary__WEBPACK_IMPORTED_MODULE_3__.Dictionary();
    /**
     * Normally series items are focusable using keyboard, so that people can
     * select them with a TAB key. However, if there are a lot of data points on
     * screen it might be long and useless to tab through all o fthem.
     *
     * This is where `skipFocusThreshold` comes in. If there are more items than
     * the value set here, we will not make those focusable and rather let screen
     * reader software rely on the series summary, or authors provide alternative
     * detailed information display, such as HTML table.
     *
     * Different series might have different threshold defaults.
     */

    _this.skipFocusThreshold = 20;
    /**
     * Used to indicate if `itemReaderText` was changed "from the outside".
     */

    _this._itemReaderTextChanged = false;
    /**
     * Most of the series use absolute values. However sometimes various
     * calculated percent values are need, e.g. item's percent representation
     * across all values in series, etc.
     *
     * It's a resource-intensive operation, so it is disabled by default.
     *
     * If you need percents to be calculated, e.g. for showing them in tooltips,
     * or creating 100% stacks, this setting needs to be set to `true`.
     *
     * NOTE: `PieChart`, which relies on slice percentages, has this
     * automatically set to `true`.
     *
     * @default false
     */

    _this.calculatePercent = false;
    /**
     * When `calculatePercent` is enabled and data item's percent value is
     * calculated, last item's real value is used instead of its working value.
     *
     * This is done for the animations when last item in series (e.g. slice in
     * a `PieSeries`) is hidden or shown. (if we would use real value, the
     * calculated percent would always be 100%).
     *
     * Sometimes there is a need (e.g. for drill-down Sunburst) to disable this
     * hack by setting `usePercentHack` to `false`.
     *
     * @since 4.9.13
     * @default true
     */

    _this.usePercentHack = true;
    /**
     * Specifies if series should be automatically disposed when removing from
     * chart's `series` list.
     *
     * @default true
     */

    _this.autoDispose = true;
    /**
     * When chart/series' data is processed, all kinds of derivative values are
     * calculated. E.g. sum, min, max, change, etc. This is a potentially
     * time-consuming operation, especially prominent in data-heavy charts.
     *
     * If your chart does not need those values, and you have a lot of data,
     * setting this to `true` might give a dramatic increase in initial chart
     * load speed.
     *
     * Please note, regular column and line series usage scenarios do not
     * require derivative values. Those come into play only when you do advanced
     * functionality like coloring segments of charts in different colors
     * depending on change between open and close values, have stacked series, or
     * display any of the derived values, like percent, in tooltips or bullets.
     *
     * @default false
     */

    _this.simplifiedProcessing = false;

    if (_this.constructor === Series) {
      throw new Error("'Series' cannot be instantiated directly. Please use a specific series type.");
    }

    _this.className = "Series";
    _this.isMeasured = false;
    _this.layout = "none";
    _this.shouldClone = false;

    _this.setPropertyValue("hidden", false);

    _this.axisRanges = new _core_utils_List__WEBPACK_IMPORTED_MODULE_2__.List();

    _this.axisRanges.events.on("inserted", _this.processAxisRange, _this, false);

    _this.minBulletDistance = 0; // otherwise we'll have a lot of cases when people won't see bullets and think it's a bug

    _this.mainContainer = _this.createChild(_core_Container__WEBPACK_IMPORTED_MODULE_5__.Container);
    _this.mainContainer.shouldClone = false;
    _this.mainContainer.mask = _this.createChild(_core_Sprite__WEBPACK_IMPORTED_MODULE_1__.Sprite);

    _this._disposers.push(_this.mainContainer); // all bullets should go on top of lines/fills. So we add a separate container for bullets and later set it's parent to chart.bulletsContainer


    var bulletsContainer = _this.mainContainer.createChild(_core_Container__WEBPACK_IMPORTED_MODULE_5__.Container);

    _this._shouldBeReady.push(bulletsContainer);

    bulletsContainer.shouldClone = false;
    bulletsContainer.layout = "none";
    bulletsContainer.virtualParent = _this;

    _this._disposers.push(bulletsContainer);

    _this.bulletsContainer = bulletsContainer;
    _this.tooltip = new _core_elements_Tooltip__WEBPACK_IMPORTED_MODULE_6__.Tooltip();
    _this.tooltip.virtualParent = _this;

    _this._disposers.push(_this.tooltip);

    _this.hiddenState.transitionEasing = _core_utils_Ease__WEBPACK_IMPORTED_MODULE_14__.cubicIn; // this data item holds sums, averages, etc

    _this.dataItem = _this.createDataItem();

    _this._disposers.push(_this.dataItem);

    _this.dataItem.component = _this; // Apply accessibility

    _this.role = "group";

    _this.applyTheme();

    return _this;
  }
  /**
   * We need this here so that class names can be applied to bullets container.
   *
   * @ignore Exclude from docs
   */


  Series.prototype.applyTheme = function () {
    _super.prototype.applyTheme.call(this);

    if (_core_Options__WEBPACK_IMPORTED_MODULE_9__.options.autoSetClassName && this.bulletsContainer) {
      this.bulletsContainer.className = this.className + "-bullets";
      this.bulletsContainer.setClassName();
    }
  };
  /**
   * Sets defaults that instantiate some objects that rely on parent, so they
   * cannot be set in constructor.
   */


  Series.prototype.applyInternalDefaults = function () {
    _super.prototype.applyInternalDefaults.call(this);

    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.hasValue(this.readerTitle)) {
      this.readerTitle = this.language.translate("Series");
    }
  };
  /**
   * Returns a new/empty DataItem of the type appropriate for this object.
   *
   * @see {@link DataItem}
   * @return Data Item
   */


  Series.prototype.createDataItem = function () {
    return new SeriesDataItem();
  };

  Object.defineProperty(Series.prototype, "chart", {
    /**
     * @return Chart
     */
    get: function get() {
      return this._chart;
    },

    /**
     * Chart series is used on.
     *
     * @param value  Chart
     */
    set: function set(value) {
      this._chart = value;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Positions bullet.
   *
   * @param bullet  Sprite
   */

  Series.prototype.positionBullet = function (bullet) {// Placeholder method for extending classes to override.
  };
  /**
   * Decorates newly created bullet after it has been instert into the list.
   *
   * @param event  List event
   * @todo investigate why itemReaderText is undefined
   */


  Series.prototype.processBullet = function (event) {
    var _this = this;

    var bullet = event.newValue;
    bullet.isTemplate = true; // Add accessibility options to bullet
    // If there are relatively few bullets, make them focusable

    this.events.once("datavalidated", function (ev) {
      if (_this.itemsFocusable()) {
        bullet.focusable = true;
      }
    });
    this.invalidate();
  };
  /**
   * removes bullets
   *
   * @param event  List event
   */


  Series.prototype.removeBullet = function (event) {
    var bullet = event.oldValue;
    this.dataItems.each(function (dataItem) {
      var eachBullet = dataItem.bullets.getKey(bullet.uid);

      if (eachBullet) {
        eachBullet.dispose();
      }
    });
    this.invalidate();
  };
  /**
   * Validates data items.
   *
   * @ignore Exclude from docs
   */


  Series.prototype.validateDataItems = function () {
    _super.prototype.validateDataItems.call(this);

    this.processValues(false);
  };
  /**
   * Returns first value for the specific key in the series.
   *
   * @param key  Key
   * @return Value
   * @todo Description
   * @todo Convert to propert object property iterator
   */


  Series.prototype.getFirstValue = function (key, startIndex) {
    // find first

    /*
    return $iter.findMap(this.dataItems.iterator(), (dataItem) => {
        for (let key in dataItem.values) {
            if ($object.hasKey(dataItem.values, key)) {
                let value: number = dataItem.values[key].workingValue;
                if ($type.isNumber(value)) {
                    return value;
                }
            }
        }
          return null;
    });*/
    //if (startIndex > 0 && startIndex < this.dataItems.length - 1) {
    //startIndex++;
    //}
    for (var i = startIndex; i >= 0; i--) {
      var dataItem = this.dataItems.getIndex(i);
      var value = dataItem.getActualWorkingValue(key);

      if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.isNumber(value)) {
        return value;
      }
    }

    return null;
  };
  /**
   * Returns first value for the specific key in the series.
   *
   * @param key  Key
   * @return Value
   * @todo Description
   * @todo Convert to propert object property iterator
   */


  Series.prototype.getAbsoluteFirstValue = function (key) {
    for (var i = 0; i < this.dataItems.length; i++) {
      var dataItem = this.dataItems.getIndex(i);
      var value = dataItem.values[key].value;

      if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.isNumber(value)) {
        return value;
      }
    }

    return null;
  };
  /**
   * [rangeChangeUpdate description]
   *
   * @todo Description
   */


  Series.prototype.rangeChangeUpdate = function () {
    _super.prototype.rangeChangeUpdate.call(this);

    this.processValues(true);
  };
  /**
   * [processValues description]
   *
   * @todo Description
   * @todo Convert to propert object property iterator
   * @param dataItems [description]
   */


  Series.prototype.processValues = function (working) {
    var _this = this;

    if (!this.simplifiedProcessing) {
      var dataItems = this.dataItems;
      var count_1 = {};
      var sum_1 = {};
      var absoluteSum_1 = {};
      var low_1 = {};
      var high_1 = {};
      var open_1 = {};
      var close_1 = {};
      var previous_1 = {};
      var first_1 = {};
      var absoluteFirst_1 = {}; //let duration: number = 0; // todo: check if series uses selection.change or selection.change.percent and set duration to interpolationduration

      var startIndex_1 = _core_utils_Math__WEBPACK_IMPORTED_MODULE_13__.max(0, this.startIndex);
      startIndex_1 = _core_utils_Math__WEBPACK_IMPORTED_MODULE_13__.min(startIndex_1, this.dataItems.length);
      var endIndex = _core_utils_Math__WEBPACK_IMPORTED_MODULE_13__.min(this.endIndex, this.dataItems.length);

      if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.isNumber(startIndex_1)) {
        startIndex_1 = 0;
      }

      if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.isNumber(endIndex)) {
        endIndex = this.dataItems.length;
      }

      if (startIndex_1 > 0) {
        var dataItem_1 = dataItems.getIndex(startIndex_1 - 1);
        _core_utils_Object__WEBPACK_IMPORTED_MODULE_16__.each(dataItem_1.values, function (key, values) {
          var value = dataItem_1.getActualWorkingValue(key);

          if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.isNumber(value)) {
            // save previous
            previous_1[key] = value;
          }
        });
      }

      var _loop_1 = function _loop_1(i) {
        var dataItem_2 = dataItems.getIndex(i);
        _core_utils_Object__WEBPACK_IMPORTED_MODULE_16__.each(dataItem_2.values, function (key, values) {
          var value = dataItem_2.getActualWorkingValue(key); //if (i >= startIndex && i <= endIndex) { // do not add to count, sum etc if it is not within start/end index

          if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.isNumber(value)) {
            // count values
            if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.isNumber(count_1[key])) {
              count_1[key] = 0;
            }

            count_1[key]++; // sum values

            if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.isNumber(sum_1[key])) {
              sum_1[key] = 0;
            }

            sum_1[key] += value; // absolute sum values

            if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.isNumber(absoluteSum_1[key])) {
              absoluteSum_1[key] = 0;
            }

            absoluteSum_1[key] += Math.abs(value); // open

            if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.isNumber(open_1[key])) {
              open_1[key] = value;
            } // close


            close_1[key] = value; // low

            if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.isNumber(low_1[key])) {
              low_1[key] = value;
            } else {
              if (low_1[key] > value) {
                low_1[key] = value;
              }
            } // high


            if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.isNumber(high_1[key])) {
              high_1[key] = value;
            } else {
              if (high_1[key] < value) {
                high_1[key] = value;
              }
            }

            if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.isNumber(first_1[key])) {
              first_1[key] = _this.getFirstValue(key, startIndex_1);
            }

            if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.isNumber(absoluteFirst_1[key])) {
              absoluteFirst_1[key] = _this.getAbsoluteFirstValue(key);
            } // change


            dataItem_2.setCalculatedValue(key, value - first_1[key], "change"); // change from start percent
            // will fail if first value is 0

            dataItem_2.setCalculatedValue(key, (value - first_1[key]) / first_1[key] * 100, "changePercent");
            dataItem_2.setCalculatedValue(key, value - absoluteFirst_1[key], "startChange");
            dataItem_2.setCalculatedValue(key, (value - absoluteFirst_1[key]) / absoluteFirst_1[key] * 100, "startChangePercent"); // previous change

            var prevValue = previous_1[key];

            if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.isNumber(prevValue)) {
              prevValue = value;
            }

            dataItem_2.setCalculatedValue(key, value - prevValue, "previousChange"); // previous change percent

            dataItem_2.setCalculatedValue(key, (value - prevValue) / prevValue * 100, "previousChangePercent"); // save previous

            previous_1[key] = value;
          }
        });
      };

      for (var i = startIndex_1; i < endIndex; i++) {
        _loop_1(i);
      }

      if (this.calculatePercent) {
        var _loop_2 = function _loop_2(i) {
          var dataItem_3 = dataItems.getIndex(i);
          _core_utils_Object__WEBPACK_IMPORTED_MODULE_16__.each(dataItem_3.values, function (key) {
            var ksum = absoluteSum_1[key];
            var value = dataItem_3.getActualWorkingValue(key);

            if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.isNumber(value)) {
              if (ksum > 0) {
                if (_this.usePercentHack) {
                  // this hack is made in order to make it possible to animate single slice to 0
                  // if there is only one slice left, percent value is always 100%, so it won't animate
                  // so we use real value of a slice instead of current value
                  if (value == ksum) {
                    ksum = dataItem_3.values[key].value;
                  }
                }

                var percent = value / ksum * 100;
                dataItem_3.setCalculatedValue(key, percent, "percent");
              } else {
                dataItem_3.setCalculatedValue(key, 0, "percent");
              }
            }
          });
        };

        for (var i = startIndex_1; i < endIndex; i++) {
          _loop_2(i);
        }
      } // calculate one before first (cant do that in cycle, as we don't know open yet
      // when drawing line chart we should draw line to the invisible data point to the left, otherwise the line will always look like it starts from the selected point
      // so we do startIndex - 1


      if (startIndex_1 > 0) {
        var zeroItem_1 = dataItems.getIndex(startIndex_1 - 1);
        _core_utils_Object__WEBPACK_IMPORTED_MODULE_16__.each(zeroItem_1.values, function (key) {
          var value = zeroItem_1.values[key].value; // change

          zeroItem_1.setCalculatedValue(key, value - open_1[key], "change"); // change percent

          zeroItem_1.setCalculatedValue(key, (value - open_1[key]) / open_1[key] * 100, "changePercent");
        });
      } // we save various data like sum, average to dataPoint of the series


      var dataItem_4 = this.dataItem;
      _core_utils_Object__WEBPACK_IMPORTED_MODULE_16__.each(dataItem_4.values, function (key) {
        dataItem_4.setCalculatedValue(key, sum_1[key], "sum");
        dataItem_4.setCalculatedValue(key, absoluteSum_1[key], "absoluteSum");
        dataItem_4.setCalculatedValue(key, sum_1[key] / count_1[key], "average");
        dataItem_4.setCalculatedValue(key, open_1[key], "open");
        dataItem_4.setCalculatedValue(key, close_1[key], "close");
        dataItem_4.setCalculatedValue(key, low_1[key], "low");
        dataItem_4.setCalculatedValue(key, high_1[key], "high");
        dataItem_4.setCalculatedValue(key, count_1[key], "count");
      });
    }
  };
  /**
   * (Re)validates the whole series, effectively causing it to redraw.
   *
   * @ignore Exclude from docs
   */


  Series.prototype.validate = function () {
    if (_core_utils_Utils__WEBPACK_IMPORTED_MODULE_15__.isIE()) {
      this.filters.clear();
    }

    _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_12__.each(this.axisRanges.iterator(), function (axisRange) {
      //axisRange.contents.disposeChildren(); // not good for columns, as they are reused
      //			axisRange.appendChildren();
      axisRange.validate();
    });

    _super.prototype.validate.call(this);

    var bulletsContainer = this.bulletsContainer;
    bulletsContainer.fill = this.fill;
    bulletsContainer.stroke = this.stroke;
    bulletsContainer.x = this.pixelX;
    bulletsContainer.y = this.pixelY;

    if (this.bulletsContainer.children.length > 0) {
      if (this._showBullets) {
        for (var i = 0; i < this.startIndex; i++) {
          var dataItem = this.dataItems.getIndex(i);

          if (dataItem) {
            dataItem.bullets.each(function (key, bullet) {
              bullet.__disabled = true;
            });
          }
        }

        for (var i = this.dataItems.length - 1; i > this.endIndex; i--) {
          var dataItem = this.dataItems.getIndex(i);

          if (dataItem) {
            dataItem.bullets.each(function (key, bullet) {
              bullet.__disabled = true;
            });
          }
        }
      } else {
        this.bulletsContainer.children.each(function (bullet) {
          bullet.__disabled = true;
        });
      }
    }

    this.updateTooltipBounds();
  };
  /**
   * @ignore
   */


  Series.prototype.updateTooltipBounds = function () {
    if (this.topParent) {
      var x = 0;
      var y = 0;
      var w = this.topParent.maxWidth;
      var h = this.topParent.maxHeight;
      var rect = {
        x: x,
        y: y,
        width: w,
        height: h
      };
      this.tooltip.setBounds(rect);
    }
  };

  Series.prototype.shouldCreateBullet = function (dataItem, bulletTemplate) {
    return true;
  };
  /**
   * Validates data item's element, effectively redrawing it.
   *
   * @ignore Exclude from docs
   * @param dataItem  Data item
   */


  Series.prototype.validateDataElement = function (dataItem) {
    var _this = this;

    _super.prototype.validateDataElement.call(this, dataItem);

    if (this._showBullets) {
      if (!this.isHidden) {
        this.bulletsContainer.visible = true;
      }

      this.bullets.each(function (bulletTemplate) {
        // always better to use the same, this helps to avoid redrawing
        var bullet = dataItem.bullets.getKey(bulletTemplate.uid);

        if (_this.shouldCreateBullet(dataItem, bulletTemplate)) {
          if (!bullet) {
            var disabledField = bulletTemplate.propertyFields.disabled;
            var dataContext = dataItem.dataContext;

            if (disabledField && dataContext && dataContext[disabledField] === false) {
              bulletTemplate.applyOnClones = false;
              bulletTemplate.disabled = false;
              bullet = bulletTemplate.clone();
              bulletTemplate.disabled = true;
              bulletTemplate.applyOnClones = true;
            } else {
              bullet = bulletTemplate.clone();
            }

            bullet.shouldClone = false;
            dataItem.addSprite(bullet);

            if (!_this.visible || _this.isHiding) {
              bullet.hide(0);
            }
          }

          var currentDataItem = bullet.dataItem;

          if (currentDataItem != dataItem) {
            // set to undefined in order not to reuse
            if (currentDataItem) {
              currentDataItem.bullets.setKey(bulletTemplate.uid, undefined);
            }

            var readerText_1 = _this.itemReaderText;

            if (bullet instanceof _elements_Bullet__WEBPACK_IMPORTED_MODULE_7__.Bullet) {
              if (!readerText_1) {
                readerText_1 = "{" + bullet.xField + "}: {" + bullet.yField + "}";
              }

              if (bullet.isDynamic) {
                dataItem.events.on("workingvaluechanged", bullet.deepInvalidate, bullet, false); //dataItem.events.on("calculatedvaluechanged", bullet.deepInvalidate, bullet, false);

                _this.dataItem.events.on("workingvaluechanged", bullet.deepInvalidate, bullet, false);
              }

              bullet.deepInvalidate();
            } // Add accessibility to bullet


            if (bullet.focusable) {
              bullet.events.on("focus", function (ev) {
                bullet.readerTitle = _this.populateString(readerText_1, bullet.dataItem);
              }, undefined, false);
              bullet.events.on("blur", function (ev) {
                bullet.readerTitle = "";
              }, undefined, false);
            }

            if (bullet.hoverable) {
              bullet.events.on("over", function (ev) {
                bullet.readerTitle = _this.populateString(readerText_1, bullet.dataItem);
              }, undefined, false);
              bullet.events.on("out", function (ev) {
                bullet.readerTitle = "";
              }, undefined, false);
            }
          }

          bullet.parent = _this.bulletsContainer;
          dataItem.bullets.setKey(bulletTemplate.uid, bullet); // pass max w/h so we'd know if we should show/hide somethings

          bullet.maxWidth = dataItem.itemWidth;
          bullet.maxHeight = dataItem.itemHeight;
          bullet.__disabled = false;

          _this.positionBullet(bullet);
        } else {
          if (bullet) {
            bullet.__disabled = true;
          }
        }
      });
    } else {
      this.bulletsContainer.visible = false;
    }
  };
  /**
   * [handleDataItemWorkingValueChange description]
   *
   * @ignore Exclude from docs
   */


  Series.prototype.handleDataItemWorkingValueChange = function (dataItem, name) {
    if (!this.dataRangeInvalid) {
      this.invalidateProcessedData();
    }
  };

  Object.defineProperty(Series.prototype, "ignoreMinMax", {
    /**
     * @return Exclude from calculations?
     */
    get: function get() {
      return this._ignoreMinMax;
    },

    /**
     * Should this series excluded from the axis scale calculations?
     *
     * @default false
     * @param value  Exclude from calculations?
     */
    set: function set(value) {
      this._ignoreMinMax = value;
      this.invalidateDataItems();
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Create a mask for the series.
   *
   * @ignore Exclude from docs
   */

  Series.prototype.createMask = function () {// A placeholder method for extending classes to override.
  };
  /**
   * Process axis range after it has been added to the list.
   *
   * @param event  Event
   */


  Series.prototype.processAxisRange = function (event) {
    // create container if not existing
    if (!this.rangesContainer) {
      this.rangesContainer = this.createChild(_core_Container__WEBPACK_IMPORTED_MODULE_5__.Container);
      this.rangesContainer.shouldClone = false;
      this.rangesContainer.isMeasured = false;
    }

    var axisRange = event.newValue;

    if (axisRange) {
      axisRange.contents.parent = this.rangesContainer;
      axisRange.isRange = true;
      axisRange.events.on("valuechanged", this.invalidateDataItems, this, false);
    }
  };
  /**
   * [getAxisField description]
   *
   * @ignore Exclude from docs
   * @todo Description
   * @param axis  [description]
   * @return [description]
   */


  Series.prototype.getAxisField = function (axis) {
    return;
  };
  /**
   * Shows the tooltip at specific position.
   *
   * @ignore Exclude from docs
   * @param xPosition  X
   * @param yPosition  Y
   */


  Series.prototype.showTooltipAtPosition = function (xPosition, yPosition) {// Placeholder method for extending classes to override.
  };

  Object.defineProperty(Series.prototype, "minBulletDistance", {
    /**
     * @return Distance (px)
     */
    get: function get() {
      return this.getPropertyValue("minBulletDistance");
    },

    /**
     * Minimal distance between data points in pixels.
     *
     * If distance gets smaller than this, bullets are turned off to avoid
     * overlapping.
     *
     * `0` (zero) disables this behavior.
     *
     * IMPORTANT: This setting will work only when Series' base axis
     * is [[CategoryAxis]] or [[DateAxis]]. If base axis is [[ValueAxis]] the
     * setting will be ignored, because it would be a huge overhead to measure
     * distance between each and every bullet.
     *
     * @default 0
     * @param value  Distance (px)
     */
    set: function set(value) {
      this.setPropertyValue("minBulletDistance", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Series.prototype, "bullets", {
    /**
     * A list of bullets that will be added to each and every items in the
     * series.
     *
     * You can push any object that is a descendant of a [[Sprite]] here. All
     * items added to this list will be copied and used as a bullet on all data
     * items, including their properties, events, etc.
     *
     * @see {@link https://www.amcharts.com/docs/v4/concepts/bullets/} for more info about the concept of Bullets
     * @return List of bullets.
     */
    get: function get() {
      if (!this._bullets) {
        this._bullets = new _core_utils_List__WEBPACK_IMPORTED_MODULE_2__.ListTemplate(new _elements_Bullet__WEBPACK_IMPORTED_MODULE_7__.Bullet());
        this._bullets.template.virtualParent = this;

        this._bullets.events.on("inserted", this.processBullet, this, false);

        this._bullets.events.on("removed", this.removeBullet, this, false);

        this._disposers.push(new _core_utils_List__WEBPACK_IMPORTED_MODULE_2__.ListDisposer(this._bullets));

        this._disposers.push(this._bullets.template);
      }

      return this._bullets;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Binds related legend data item's visual settings to this series' visual
   * settings.
   *
   * @ignore Exclude from docs
   * @param marker  Legend item container
   */

  Series.prototype.createLegendMarker = function (marker) {// This is a placeholder method for extending classes to override.
  };

  Object.defineProperty(Series.prototype, "hiddenInLegend", {
    /**
     * @return Hidden in legend?
     */
    get: function get() {
      return this.getPropertyValue("hiddenInLegend");
    },

    /**
     * Should the series be hidden in legend?
     *
     * @param value Hidden in legend?
     */
    set: function set(value) {
      if (this.setPropertyValue("hiddenInLegend", value)) {
        if (this.chart) {
          this.chart.feedLegend();
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Series.prototype, "name", {
    /**
     * @return Name
     */
    get: function get() {
      return this.getPropertyValue("name");
    },

    /**
     * Series' name.
     *
     * @param value  Name
     */
    set: function set(value) {
      this.setPropertyValue("name", value);
      var legendDataItem = this.legendDataItem;

      if (legendDataItem) {
        legendDataItem.component.invalidate();
        legendDataItem.component.invalidateRawData();
      }

      this.readerTitle = value;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Series.prototype, "itemReaderText", {
    /**
     * @return Screen reader text template
     */
    get: function get() {
      // Get explicitly set reader text
      var readerText = this._itemReaderText; // Not set? Let's try something else

      if (!readerText) {
        // Tooltip text?
        if (this.tooltipText) {
          readerText = _core_utils_Utils__WEBPACK_IMPORTED_MODULE_15__.plainText(this.tooltipText);
        } else if (this.tooltipHTML) {
          readerText = _core_utils_Utils__WEBPACK_IMPORTED_MODULE_15__.plainText(this.tooltipHTML);
        }
      }

      if (!this._adapterO) {
        return readerText;
      } else {
        return this._adapterO.apply("itemReaderText", readerText);
      }
    },

    /**
     * Screen reader text to be applied to each individual data item, such
     * as bullets, columns or slices.
     *
     * The template can contain field reference meta codes, i.e. `{dateX}`,
     * `{valueY}`, etc.
     *
     * Any text formatting options, e.g. `[bold]` will be ignored.
     *
     * @param value Screen reader text template
     */
    set: function set(value) {
      this._itemReaderText = value;
      this._itemReaderTextChanged = true;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Returns if number of data items in the series are beyond non-focusable
   * count and should not be available for TAB-through.
   *
   * @ignore Exclude from docs
   * @return Items focusable?
   */

  Series.prototype.itemsFocusable = function () {
    return this.dataItems.length >= this.skipFocusThreshold ? false : true;
  };

  Object.defineProperty(Series.prototype, "legendDataItem", {
    /**
     * @return Data item
     */
    get: function get() {
      return this._legendDataItem;
    },

    /**
     * Legend data item that corresponds to this series.
     *
     * @param value  Data item
     */
    set: function set(value) {
      this._legendDataItem = value;

      this._legendDataItem.itemContainer.deepInvalidate();
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Updates corresponding legend data item with current values.
   *
   * @ignore Exclude from docs
   * @param dataItem  Data item
   */

  Series.prototype.updateLegendValue = function (dataItem, notRange) {
    // if this series has legend item
    if (this.legendDataItem) {
      var legendSettings = this.legendSettings;
      var legendDataItem = this.legendDataItem;
      var label = legendDataItem.label;
      var valueLabel = legendDataItem.valueLabel; // update legend

      if (dataItem && !dataItem.isDisposed() || notRange) {
        if (valueLabel) {
          if (legendSettings.itemValueText) {
            valueLabel.text = legendSettings.itemValueText;
          }

          valueLabel.dataItem = dataItem;
        }

        if (label) {
          if (legendSettings.itemLabelText) {
            label.text = legendSettings.itemLabelText;
          }

          label.dataItem = dataItem;
        }
      } else {
        if (label) {
          // if itemLabelText is set, means we have to reset label even if labelText is not set
          if (legendSettings.labelText || legendSettings.itemLabelText != undefined) {
            label.text = legendSettings.labelText;
          }

          label.dataItem = this.dataItem;
        }

        if (valueLabel) {
          if (legendSettings.valueText || legendSettings.itemValueText != undefined) {
            valueLabel.text = legendSettings.valueText;
          }

          valueLabel.dataItem = this.dataItem;
        }
      }
    }
  };
  /**
   * Copies all properties from another instance of [[Series]].
   *
   * @param source  Source series
   */


  Series.prototype.copyFrom = function (source) {
    this.bullets.copyFrom(source.bullets);
    this.bulletsContainer.copyFrom(source.bulletsContainer);
    this.calculatePercent = source.calculatePercent;
    this.usePercentHack = source.usePercentHack;
    this.simplifiedProcessing = source.simplifiedProcessing;

    _super.prototype.copyFrom.call(this, source);
  };
  /**
   * Displays a modal or console message with error, and halts any further
   * processing of this element.
   *
   * @param e Error
   */


  Series.prototype.raiseCriticalError = function (e) {
    if (this._chart && this._chart.modal) {
      this._chart.modal.content = this._chart.adapter.apply("criticalError", e).message;
      this._chart.modal.closable = false;

      if (!_core_Options__WEBPACK_IMPORTED_MODULE_9__.options.suppressErrors) {
        this._chart.modal.open();
      }

      this._chart.disabled = true;
    }

    if (_core_Options__WEBPACK_IMPORTED_MODULE_9__.options.verbose) {
      console.log(e);
    }
  };
  /**
   * Applies filters to the element.
   *
   * @ignore Exclude from docs
   */


  Series.prototype.applyFilters = function () {
    var _this = this;

    _super.prototype.applyFilters.call(this);

    this.bulletsContainer.filters.clear(); // copyFrom of a list copies, does not clone

    _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_12__.each(this.filters.iterator(), function (filter) {
      _this.bulletsContainer.filters.push(filter.clone());
    });
  };

  Object.defineProperty(Series.prototype, "heatRules", {
    /**
     * A list of heat rules to apply to series' elements based on the value
     * of the data item.
     *
     * Heat rules can be any "numeric" (including `Color`) property, and can also
     * be applied to child objects of series, like columns, bullets, etc.
     *
     * E.g.:
     *
     * ```TypeScript
     * series.heatRules.push({
     *  "target": series.columns.template,
     *  "property": "fill",
     *  "min": am4core.color("#F5DBCB"),
     *  "max": am4core.color("#ED7B84"),
     *  "dataField": "valueY"
     *});
     *```
     * ```Javacript
     * series.heatRules.push({
     *  "target": series.columns.template,
     *  "property": "fill",
     *  "min": am4core.color("#F5DBCB"),
     *  "max": am4core.color("#ED7B84"),
     *  "dataField": "valueY"
     *});
     *```
     *```JSON
     *{
     *  // ...
     *  "series": [{
     *    "type": "ColumnSeries",
     *    "heatRules": [{
     *      "target": "columns.template",
     *      "property": "fill",
     *      "min": "#F5DBCB",
     *      "max": "#ED7B84",
     *      "dataField": "valueY"
     *    }]
     *  }]
     *}
     *```
     *
     * @see {@link https://www.amcharts.com/docs/v4/concepts/series/#Heat_maps} for more about heat rules
     * @return  Heat rules
     */
    get: function get() {
      var _this = this;

      if (!this._heatRules) {
        this._heatRules = new _core_utils_List__WEBPACK_IMPORTED_MODULE_2__.List();

        this._heatRules.events.on("inserted", function (event) {
          var heatRule = event.newValue;
          var target = heatRule.target;

          if (target) {
            var dataField_1 = heatRule.dataField;

            if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.hasValue(dataField_1)) {
              dataField_1 = "value";
            }

            var seriesDataItem_1 = _this.dataItem;
            var property_1 = heatRule.property;
            var minValue = _core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.toNumber(heatRule.minValue);
            var maxValue = _core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.toNumber(heatRule.maxValue);

            if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.isNumber(minValue) && !_core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.isNumber(maxValue)) {
              _this.dataItem.events.on("calculatedvaluechanged", function (event) {
                if (event.property == dataField_1) {
                  _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_12__.each(_this.dataItems.iterator(), function (dataItem) {
                    var foundSprite = false;
                    _core_utils_Array__WEBPACK_IMPORTED_MODULE_18__.each(dataItem.sprites, function (sprite) {
                      if (sprite.clonedFrom == target) {
                        var anySprite = sprite;
                        anySprite[property_1] = anySprite[property_1];
                        foundSprite = true;
                      }
                    });

                    if (!foundSprite) {
                      _core_utils_Array__WEBPACK_IMPORTED_MODULE_18__.each(dataItem.sprites, function (sprite) {
                        if (sprite instanceof _core_Container__WEBPACK_IMPORTED_MODULE_5__.Container) {
                          _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_12__.each(sprite.children.iterator(), function (child) {
                            if (child.className == target.className) {
                              var anyChild = child;
                              anyChild[property_1] = anyChild[property_1];
                            } // giveup here
                            else if (child instanceof _core_Container__WEBPACK_IMPORTED_MODULE_5__.Container) {
                              child.deepInvalidate();
                            }
                          });
                        }
                      });
                    }
                  });
                }
              });
            }

            _this.dataItems.template.events.on("workingvaluechanged", function (event) {
              if (event.property == dataField_1) {
                var dataItem = event.target;
                var foundSprite_1 = false;
                _core_utils_Array__WEBPACK_IMPORTED_MODULE_18__.each(dataItem.sprites, function (sprite) {
                  if (sprite.clonedFrom == target) {
                    var anySprite = sprite;
                    anySprite[property_1] = anySprite[property_1];
                    foundSprite_1 = true;
                  }
                });

                if (!foundSprite_1) {
                  _core_utils_Array__WEBPACK_IMPORTED_MODULE_18__.each(dataItem.sprites, function (sprite) {
                    if (sprite instanceof _core_Container__WEBPACK_IMPORTED_MODULE_5__.Container) {
                      _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_12__.each(sprite.children.iterator(), function (child) {
                        if (child.className == target.className) {
                          var anyChild = child;
                          anyChild[property_1] = anyChild[property_1];
                        } // givup here
                        else if (child instanceof _core_Container__WEBPACK_IMPORTED_MODULE_5__.Container) {
                          child.deepInvalidate();
                        }
                      });
                    }
                  });
                }
              }
            });

            target.adapter.add(property_1, function (value, ruleTarget, property) {
              var minValue = _core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.toNumber(heatRule.minValue);
              var maxValue = _core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.toNumber(heatRule.maxValue);
              var min = heatRule.min;
              var max = heatRule.max;

              if (ruleTarget instanceof _core_Sprite__WEBPACK_IMPORTED_MODULE_1__.Sprite) {
                var anySprite = ruleTarget;
                var propertyField = anySprite.propertyFields[property];

                if (propertyField && ruleTarget.dataItem) {
                  var dataContext = ruleTarget.dataItem.dataContext;

                  if (dataContext && _core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.hasValue(dataContext[propertyField])) {
                    return value;
                  }
                }
              }

              var dataItem = ruleTarget.dataItem;

              if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.isNumber(minValue)) {
                minValue = seriesDataItem_1.values[dataField_1].low;
              }

              if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.isNumber(maxValue)) {
                maxValue = seriesDataItem_1.values[dataField_1].high;
              }

              if (dataItem) {
                var fieldValues = dataItem.values[dataField_1];

                if (fieldValues) {
                  var workingValue = dataItem.getActualWorkingValue(dataField_1);

                  if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.hasValue(min) && _core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.hasValue(max) && _core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.isNumber(minValue) && _core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.isNumber(maxValue) && _core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.isNumber(workingValue)) {
                    var percent = void 0;

                    if (heatRule.logarithmic) {
                      percent = (Math.log(workingValue) * Math.LOG10E - Math.log(minValue) * Math.LOG10E) / (Math.log(maxValue) * Math.LOG10E - Math.log(minValue) * Math.LOG10E);
                    } else {
                      percent = (workingValue - minValue) / (maxValue - minValue);
                    }

                    if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.isNumber(workingValue) && (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.isNumber(percent) || Math.abs(percent) == Infinity)) {
                      percent = 0.5;
                    } // fixes problems if all values are the same


                    if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.isNumber(min)) {
                      return min + (max - min) * percent;
                    } else if (min instanceof _core_utils_Color__WEBPACK_IMPORTED_MODULE_10__.Color) {
                      return new _core_utils_Color__WEBPACK_IMPORTED_MODULE_10__.Color(_core_utils_Colors__WEBPACK_IMPORTED_MODULE_19__.interpolate(min.rgb, max.rgb, percent));
                    }
                  }
                }
              }

              return value;
            });
          }
        });
      }

      return this._heatRules;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Processes JSON-based config before it is applied to the object.
   *
   * @ignore Exclude from docs
   * @param config  Config
   */

  Series.prototype.processConfig = function (config) {
    var heatRules;

    if (config) {
      // Set up bullets
      if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.hasValue(config.bullets) && _core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.isArray(config.bullets)) {
        for (var i = 0, len = config.bullets.length; i < len; i++) {
          var bullets = config.bullets[i];

          if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.hasValue(bullets.type)) {
            bullets.type = "Bullet";
          }
        }
      } // Let's take heatRules out of the config, so that we can process
      // them later, when bullets are already there


      if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.hasValue(config.heatRules) && _core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.isArray(config.heatRules)) {
        heatRules = config.heatRules;
        delete config.heatRules;
      }
    }

    _super.prototype.processConfig.call(this, config); // Process heat rules again, when all other elements are ready


    if (heatRules) {
      for (var i = 0, len = heatRules.length; i < len; i++) {
        var rule = heatRules[i]; // Resolve target

        var target = this;

        if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.hasValue(rule.target) && _core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.isString(rule.target)) {
          // Check if we can find this element by id
          if (this.map.hasKey(rule.target)) {
            target = this.map.getKey(rule.target);
          } else {
            var parts = rule.target.split(".");

            for (var x = 0; x < parts.length; x++) {
              if (target instanceof _core_utils_List__WEBPACK_IMPORTED_MODULE_2__.List) {
                var listitem = target.getIndex(_core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.toNumber(parts[x]));

                if (!listitem) {
                  target = target[parts[x]];
                } else {
                  target = listitem;
                }
              } else {
                var maybeIndex = parts[x].match(/^(.*)\[([0-9]+)\]/);

                if (maybeIndex) {
                  if (target[maybeIndex[1]] instanceof _core_utils_List__WEBPACK_IMPORTED_MODULE_2__.List) {
                    target = target[maybeIndex[1]].getIndex(_core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.toNumber(maybeIndex[2]));
                  } else {
                    target = target[maybeIndex[1]][_core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.toNumber(maybeIndex[2])];
                  }
                } else {
                  target = target[parts[x]];
                }
              }
            }
          }
        }

        rule.target = target; // Resolve colors and percents

        if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.hasValue(rule.min)) {
          rule.min = this.maybeColorOrPercent(rule.min);
        }

        if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.hasValue(rule.max)) {
          rule.max = this.maybeColorOrPercent(rule.max);
        }
      }

      _super.prototype.processConfig.call(this, {
        heatRules: heatRules
      });
    }
  };
  /**
   * Returns visibility value
   * @ignore
   */

  /*
      protected getVisibility(): boolean {
          let hidden = this.getPropertyValue("hidden");
          if (hidden) {
              return false;
          }
          else {
              return super.getVisibility();
          }
      }*/

  /**
   * This function is used to sort element's JSON config properties, so that
   * some properties that absolutely need to be processed last, can be put at
   * the end.
   *
   * @ignore Exclude from docs
   * @param a  Element 1
   * @param b  Element 2
   * @return Sorting number
   */


  Series.prototype.configOrder = function (a, b) {
    if (a == b) {
      return 0;
    } // Must come last
    else if (a == "heatRules") {
      return 1;
    } else if (b == "heatRules") {
      return -1;
    } else {
      return _super.prototype.configOrder.call(this, a, b);
    }
  };
  /**
   * Sets `visibility` property:
   *
   * * `true` - visible
   * * `false` - hidden
   *
   * @param value  true - visible, false - hidden
   * @return Current visibility
   */


  Series.prototype.setVisibility = function (value) {
    _super.prototype.setVisibility.call(this, value);

    this.bulletsContainer.visible = value;
  };

  return Series;
}(_core_Component__WEBPACK_IMPORTED_MODULE_0__.Component);


/**
 * Register class, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_11__.registry.registeredClasses.Series = Series;
_core_Registry__WEBPACK_IMPORTED_MODULE_11__.registry.registeredClasses.SeriesDataItem = SeriesDataItem;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/series/StepLineSeries.js":
/*!************************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/series/StepLineSeries.js ***!
  \************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "StepLineSeries": () => (/* binding */ StepLineSeries),
/* harmony export */   "StepLineSeriesDataItem": () => (/* binding */ StepLineSeriesDataItem)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _LineSeries__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./LineSeries */ "./node_modules/@amcharts/amcharts4/.internal/charts/series/LineSeries.js");
/* harmony import */ var _StepLineSeriesSegment__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./StepLineSeriesSegment */ "./node_modules/@amcharts/amcharts4/.internal/charts/series/StepLineSeriesSegment.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_utils_Math__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
/**
 * Step line series module.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */





/**
 * ============================================================================
 * DATA ITEM
 * ============================================================================
 * @hidden
 */

/**
 * Defines a [[DataItem]] for [[StepLineSeries]].
 *
 * @see {@link DataItem}
 */

var StepLineSeriesDataItem =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_4__.__extends)(StepLineSeriesDataItem, _super);
  /**
   * Constructor
   */


  function StepLineSeriesDataItem() {
    var _this = _super.call(this) || this;

    _this.className = "StepLineSeriesDataItem";

    _this.applyTheme();

    return _this;
  }

  return StepLineSeriesDataItem;
}(_LineSeries__WEBPACK_IMPORTED_MODULE_0__.LineSeriesDataItem);


/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Defines [[Series]] for a step line graph.
 *
 * @see {@link IStepLineSeriesEvents} for a list of available Events
 * @see {@link IStepLineSeriesAdapters} for a list of available Adapters
 * @todo Example
 * @important
 */

var StepLineSeries =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_4__.__extends)(StepLineSeries, _super);
  /**
   * Constructor
   */


  function StepLineSeries() {
    var _this = _super.call(this) || this;

    _this.className = "StepLineSeries";

    _this.applyTheme();

    _this.startLocation = 0;
    _this.endLocation = 1;
    return _this;
  }
  /**
   * Returns a new/empty DataItem of the type appropriate for this object.
   *
   * @see {@link DataItem}
   * @return Data Item
   */


  StepLineSeries.prototype.createDataItem = function () {
    return new StepLineSeriesDataItem();
  };
  /**
   * [addPoints description]
   *
   * @todo Description
   * @param points     [description]
   * @param dataItem   [description]
   * @param xField     [description]
   * @param yField     [description]
   * @param backwards  [description]
   */


  StepLineSeries.prototype.addPoints = function (points, dataItem, xField, yField, backwards) {
    var startLocationX;
    var endLocationX;
    var startLocationY;
    var endLocationY;

    if (this.baseAxis == this.xAxis) {
      startLocationX = this.startLocation;
      endLocationX = this.endLocation;
      startLocationY = this.getAdjustedXLocation(dataItem, this.yOpenField);
      endLocationY = this.getAdjustedXLocation(dataItem, this.yField);
    }

    if (this.baseAxis == this.yAxis) {
      startLocationY = this.startLocation;
      endLocationY = this.endLocation;
      startLocationX = this.getAdjustedXLocation(dataItem, this.xOpenField);
      endLocationX = this.getAdjustedXLocation(dataItem, this.xField);
    }

    var x0 = this.xAxis.getX(dataItem, xField, startLocationX);
    var y0 = this.yAxis.getY(dataItem, yField, startLocationY);
    var x1 = this.xAxis.getX(dataItem, xField, endLocationX);
    var y1 = this.yAxis.getY(dataItem, yField, endLocationY);
    x0 = _core_utils_Math__WEBPACK_IMPORTED_MODULE_3__.fitToRange(x0, -100000, 100000); // from geometric point of view this is not right, but practically it's ok. this is done to avoid too big objects.

    y0 = _core_utils_Math__WEBPACK_IMPORTED_MODULE_3__.fitToRange(y0, -100000, 100000); // from geometric point of view this is not right, but practically it's ok. this is done to avoid too big objects.

    x1 = _core_utils_Math__WEBPACK_IMPORTED_MODULE_3__.fitToRange(x1, -100000, 100000); // from geometric point of view this is not right, but practically it's ok. this is done to avoid too big objects.

    y1 = _core_utils_Math__WEBPACK_IMPORTED_MODULE_3__.fitToRange(y1, -100000, 100000); // from geometric point of view this is not right, but practically it's ok. this is done to avoid too big objects.
    // this might make an impression that points are duplicated, and they indeed are, but this is needed to handle gaps in data

    if (!this.noRisers) {
      if (points.length > 1) {
        var prevPoint = points[points.length - 1];

        if (this.baseAxis == this.xAxis) {
          if (backwards) {
            points.push({
              x: prevPoint.x,
              y: y1
            });
          } else {
            points.push({
              x: x0,
              y: prevPoint.y
            });
          }
        }

        if (this.baseAxis == this.yAxis) {
          if (backwards) {
            points.push({
              x: x1,
              y: prevPoint.y
            });
          } else {
            points.push({
              x: prevPoint.x,
              y: y0
            });
          }
        }
      }
    }

    var point0 = {
      x: x0,
      y: y0
    };
    var point1 = {
      x: x1,
      y: y1
    };

    if (backwards) {
      points.push(point1, point0);
    } else {
      points.push(point0, point1);
    }
  };
  /**
   * Draws the line segment.
   *
   * @param segment     Segment
   * @param points      Segment points
   * @param closePoints Segment close points
   */


  StepLineSeries.prototype.drawSegment = function (segment, points, closePoints) {
    var vertical = false;

    if (this.yAxis == this.baseAxis) {
      vertical = true;
    }

    segment.drawSegment(points, closePoints, this.tensionX, this.tensionY, this.noRisers, vertical);
  };
  /**
   * @ignore
   */


  StepLineSeries.prototype.createSegment = function () {
    return new _StepLineSeriesSegment__WEBPACK_IMPORTED_MODULE_1__.StepLineSeriesSegment();
  };

  Object.defineProperty(StepLineSeries.prototype, "noRisers", {
    /**
     * @return No risers
     */
    get: function get() {
      return this.getPropertyValue("noRisers");
    },

    /**
     * Specifies if step line series should draw only horizontal (or only
     * vertical, depending on base axis) lines, instead of connecting them with
     * vertical (or horizontal) lines.
     *
     * @default false
     * @param value  No risers
     */
    set: function set(value) {
      this.setPropertyValue("noRisers", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(StepLineSeries.prototype, "startLocation", {
    /**
     * @return Location (0-1)
     */
    get: function get() {
      return this.getPropertyValue("startLocation");
    },

    /**
     * start location of the step
     *
     * @param value Location (0-1)
     * @default 0
     */
    set: function set(value) {
      this.setPropertyValue("startLocation", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(StepLineSeries.prototype, "endLocation", {
    /**
     * @return Location (0-1)
     */
    get: function get() {
      return this.getPropertyValue("endLocation");
    },

    /**
     * Step end location.
     *
     * @param value Location (0-1)
     * #default 1
     */
    set: function set(value) {
      this.setPropertyValue("endLocation", value, true);
    },
    enumerable: true,
    configurable: true
  });
  return StepLineSeries;
}(_LineSeries__WEBPACK_IMPORTED_MODULE_0__.LineSeries);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_2__.registry.registeredClasses.StepLineSeries = StepLineSeries;
_core_Registry__WEBPACK_IMPORTED_MODULE_2__.registry.registeredClasses.StepLineSeriesDataItem = StepLineSeriesDataItem;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/series/StepLineSeriesSegment.js":
/*!*******************************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/series/StepLineSeriesSegment.js ***!
  \*******************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "StepLineSeriesSegment": () => (/* binding */ StepLineSeriesSegment)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _LineSeriesSegment__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./LineSeriesSegment */ "./node_modules/@amcharts/amcharts4/.internal/charts/series/LineSeriesSegment.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_rendering_Path__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/rendering/Path */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Path.js");
/**
 * Line series segment module.
 * @todo Add description about what this is
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */




/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Represents a line series segment.
 *
 * A line segment can be used to apply different properties to a part of the
 * line series, between two data points.
 *
 * @see {@link IStepLineSeriesSegmentEvents} for a list of available events
 * @see {@link IStepLineSeriesSegmentAdapters} for a list of available Adapters
 * @todo Example
 */

var StepLineSeriesSegment =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__extends)(StepLineSeriesSegment, _super);
  /**
   * Constructor
   */


  function StepLineSeriesSegment() {
    var _this = // Init
    _super.call(this) || this;

    _this.className = "StepLineSeriesSegment";
    return _this;
  }
  /**
   * Draws the series segment.
   *
   * @ignore Exclude from docs
   * @param points       Points to connect
   * @param closePoints  ?
   * @param smoothnessX  Horizontal bezier setting (?)
   * @param smoothnessY  Vertical bezier setting (?)
   */


  StepLineSeriesSegment.prototype.drawSegment = function (points, closePoints, smoothnessX, smoothnessY, noRisers, vertical) {
    if (points.length > 0 && closePoints.length > 0) {
      if (noRisers) {
        var path = _core_rendering_Path__WEBPACK_IMPORTED_MODULE_2__.moveTo(points[0]);

        if (points.length > 0) {
          for (var i = 1; i < points.length; i++) {
            var point = points[i];

            if (i / 2 == Math.round(i / 2)) {
              path += _core_rendering_Path__WEBPACK_IMPORTED_MODULE_2__.moveTo(point);
            } else {
              path += _core_rendering_Path__WEBPACK_IMPORTED_MODULE_2__.lineTo(point);
            }
          }
        }

        this.strokeSprite.path = path;

        if (this.fillOpacity > 0 || this.fillSprite.fillOpacity > 0) {
          // helps to avoid drawing fill object if fill is not visible
          path = _core_rendering_Path__WEBPACK_IMPORTED_MODULE_2__.moveTo(points[0]) + _core_rendering_Path__WEBPACK_IMPORTED_MODULE_2__.polyline(points);
          path += _core_rendering_Path__WEBPACK_IMPORTED_MODULE_2__.lineTo(closePoints[0]) + _core_rendering_Path__WEBPACK_IMPORTED_MODULE_2__.polyline(closePoints);
          path += _core_rendering_Path__WEBPACK_IMPORTED_MODULE_2__.lineTo(points[0]);
          path += _core_rendering_Path__WEBPACK_IMPORTED_MODULE_2__.closePath();
          this.fillSprite.path = path;
        } else {}
      } else {
        var path = _core_rendering_Path__WEBPACK_IMPORTED_MODULE_2__.moveTo(points[0]) + _core_rendering_Path__WEBPACK_IMPORTED_MODULE_2__.polyline(points);
        this.strokeSprite.path = path;

        if (this.fillOpacity > 0 || this.fillSprite.fillOpacity > 0) {
          // helps to avoid drawing fill object if fill is not visible
          path += _core_rendering_Path__WEBPACK_IMPORTED_MODULE_2__.lineTo(closePoints[0]) + _core_rendering_Path__WEBPACK_IMPORTED_MODULE_2__.polyline(closePoints);
          path += _core_rendering_Path__WEBPACK_IMPORTED_MODULE_2__.lineTo(points[0]);
          path += _core_rendering_Path__WEBPACK_IMPORTED_MODULE_2__.closePath();
          this.fillSprite.path = path;
        }
      }
    } else {
      this.strokeSprite.path = "";
      this.fillSprite.path = "";
    }
  };

  return StepLineSeriesSegment;
}(_LineSeriesSegment__WEBPACK_IMPORTED_MODULE_0__.LineSeriesSegment);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses.StepLineSeriesSegment = StepLineSeriesSegment;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/series/TreeMapSeries.js":
/*!***********************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/series/TreeMapSeries.js ***!
  \***********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "TreeMapSeries": () => (/* binding */ TreeMapSeries),
/* harmony export */   "TreeMapSeriesDataItem": () => (/* binding */ TreeMapSeriesDataItem)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _ColumnSeries__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ColumnSeries */ "./node_modules/@amcharts/amcharts4/.internal/charts/series/ColumnSeries.js");
/* harmony import */ var _core_Sprite__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/Sprite */ "./node_modules/@amcharts/amcharts4/.internal/core/Sprite.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/utils/InterfaceColorSet */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/InterfaceColorSet.js");
/* harmony import */ var _core_utils_Type__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../core/utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/* harmony import */ var _core_elements_RoundedRectangle__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../core/elements/RoundedRectangle */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/RoundedRectangle.js");
/* harmony import */ var _core_utils_Object__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../core/utils/Object */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Object.js");
/**
 * TreeMap series module.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */








/**
 * ============================================================================
 * DATA ITEM
 * ============================================================================
 * @hidden
 */

/**
 * Defines a [[DataItem]] for [[TreeMapSeries]].
 *
 * @see {@link DataItem}
 */

var TreeMapSeriesDataItem =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_7__.__extends)(TreeMapSeriesDataItem, _super);
  /**
   * Constructor
   */


  function TreeMapSeriesDataItem() {
    var _this = _super.call(this) || this;

    _this.className = "TreeMapSeriesDataItem";

    _this.applyTheme();

    return _this;
  }

  Object.defineProperty(TreeMapSeriesDataItem.prototype, "parentName", {
    /**
     * Data for the this particular item.
     *
     * @param value  Item's data
     */
    //public set dataContext(value: Object) {
    //	this._dataContext = value;
    //}

    /**
     * @return Item's data
     */

    /*
    public get dataContext(): Object {
       // It's because data of tree series is TreeMapDataItems.
       if (this._dataContext) {
           return (<any>this._dataContext).dataContext;
       }
    }*/

    /**
     * The name of the item's parent item.
     *
     * @return Parent name
     */
    get: function get() {
      var treeMapDataItem = this.treeMapDataItem;

      if (treeMapDataItem && treeMapDataItem.parent) {
        return treeMapDataItem.parent.name;
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(TreeMapSeriesDataItem.prototype, "value", {
    /**
     * Item's numeric value.
     *
     * @readonly
     * @return Value
     */
    get: function get() {
      var treeMapDataItem = this.treeMapDataItem;

      if (treeMapDataItem) {
        return treeMapDataItem.value;
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(TreeMapSeriesDataItem.prototype, "treeMapDataItem", {
    /**
     * A corresponding data item from the tree map.
     *
     * @readonly
     * @return Data item
     */
    get: function get() {
      return this._dataContext;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Hides the Data Item and related visual elements.
   *
   * @param duration  Animation duration (ms)
   * @param delay     Delay animation (ms)
   * @param toValue   A value to set to `fields` when hiding
   * @param fields    A list of data fields to set value to `toValue`
   */

  TreeMapSeriesDataItem.prototype.hide = function (duration, delay, toValue, fields) {
    var treeMapDataItem = this.treeMapDataItem;

    if (treeMapDataItem) {
      treeMapDataItem.hide(duration);
    }

    return _super.prototype.hide.call(this, duration, delay, toValue, fields);
  };
  /**
   * Shows the Data Item and related visual elements.
   *
   * @param duration  Animation duration (ms)
   * @param delay     Delay animation (ms)
   * @param fields    A list of fields to set values of
   */


  TreeMapSeriesDataItem.prototype.show = function (duration, delay, fields) {
    var treeMapDataItem = this.treeMapDataItem;

    if (treeMapDataItem) {
      treeMapDataItem.show(duration, delay, fields);
    }

    return _super.prototype.show.call(this, duration, delay, fields);
  };

  return TreeMapSeriesDataItem;
}(_ColumnSeries__WEBPACK_IMPORTED_MODULE_0__.ColumnSeriesDataItem);


/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Defines Series for a TreeMap chart.
 *
 * @see {@link ITreeMapSeriesEvents} for a list of available Events
 * @see {@link ITreeMapSeriesAdapters} for a list of available Adapters
 * @todo Example
 * @important
 */

var TreeMapSeries =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_7__.__extends)(TreeMapSeries, _super);
  /**
   * Constructor
   */


  function TreeMapSeries() {
    var _this = _super.call(this) || this;

    _this.className = "TreeMapSeries";

    _this.applyTheme();

    _this.fillOpacity = 1;
    _this.strokeOpacity = 1;
    _this.minBulletDistance = 0;
    _this.columns.template.tooltipText = "{parentName} {name}: {value}"; //@todo add format number?

    _this.columns.template.configField = "config";
    var interfaceColors = new _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_3__.InterfaceColorSet();
    _this.stroke = interfaceColors.getFor("background");
    _this.dataFields.openValueX = "x0";
    _this.dataFields.valueX = "x1";
    _this.dataFields.openValueY = "y0";
    _this.dataFields.valueY = "y1";
    _this.sequencedInterpolation = false;
    _this.showOnInit = false; // otherwise nodes don't stack nicely to each other

    _this.columns.template.pixelPerfect = false;
    return _this;
  }
  /**
   * Processes data item.
   *
   * @param dataItem     Data item
   * @param dataContext  Raw data
   * @param index        Index of the data item
   */


  TreeMapSeries.prototype.processDataItem = function (dataItem, dataContext) {
    dataContext.seriesDataItem = dataItem; // save a reference here. dataContext is TreeMapDataItem and we need to know dataItem sometimes

    _super.prototype.processDataItem.call(this, dataItem, dataContext);
  };
  /**
   * Returns a new/empty DataItem of the type appropriate for this object.
   *
   * @see {@link DataItem}
   * @return Data Item
   */


  TreeMapSeries.prototype.createDataItem = function () {
    return new TreeMapSeriesDataItem();
  };
  /**
   * Shows series.
   *
   * @param duration  Duration of fade in (ms)
   * @return Animation
   */


  TreeMapSeries.prototype.show = function (duration) {
    if (this.preventShow) {
      return;
    }

    var interpolationDuration = this.defaultState.transitionDuration;

    if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_4__.isNumber(duration)) {
      interpolationDuration = duration;
    }

    this.dataItems.each(function (dataItem) {
      //dataItem.treeMapDataItem.setWorkingValue("value", dataItem.treeMapDataItem.values.value.value);
      dataItem.show(duration);
    });
    return _super.prototype.showReal.call(this, interpolationDuration);
  };
  /**
   * Hides series.
   *
   * @param duration  Duration of fade out (ms)
   * @return Animation
   */


  TreeMapSeries.prototype.hide = function (duration) {
    var interpolationDuration = this.defaultState.transitionDuration;

    if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_4__.isNumber(duration)) {
      interpolationDuration = duration;
    }

    var animation = _super.prototype.hideReal.call(this, interpolationDuration);

    this.dataItems.each(function (dataItem) {
      //dataItem.treeMapDataItem.setWorkingValue("value", 0);
      dataItem.hide(duration);
    });
    return animation;
  };
  /**
   * Process values.
   *
   * @ignore Exclude from docs
   */


  TreeMapSeries.prototype.processValues = function () {// Just overriding so that inherited method does not kick in.
  };
  /**
   * Returns relative start location for the data item.
   *
   * @param dataItem  Data item
   * @return Location (0-1)
   */


  TreeMapSeries.prototype.getStartLocation = function (dataItem) {
    return 0;
  };
  /**
   * Returns relative end location for the data item.
   *
   * @param dataItem  Data item
   * @return Location (0-1)
   */


  TreeMapSeries.prototype.getEndLocation = function (dataItem) {
    return 1;
  };
  /**
   * @ignore
   */


  TreeMapSeries.prototype.dataChangeUpdate = function () {};
  /**
   * Processes JSON-based config before it is applied to the object.
   *
   * @ignore Exclude from docs
   * @param config  Config
   */


  TreeMapSeries.prototype.processConfig = function (config) {
    if (config) {
      // Add empty data fields if the they are not set, so that XYSeries
      // dataField check does not result in error.
      if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_4__.hasValue(config.dataFields) || !_core_utils_Type__WEBPACK_IMPORTED_MODULE_4__.isObject(config.dataFields)) {
        config.dataFields = {};
      }
    }

    _super.prototype.processConfig.call(this, config);
  };
  /**
   * Creates elements in related legend container, that mimics the look of this
   * Series.
   *
   * @ignore Exclude from docs
   * @param marker  Legend item container
   */


  TreeMapSeries.prototype.createLegendMarker = function (marker) {
    var w = marker.pixelWidth;
    var h = marker.pixelHeight;
    marker.removeChildren();
    var column = marker.createChild(_core_elements_RoundedRectangle__WEBPACK_IMPORTED_MODULE_5__.RoundedRectangle);
    column.shouldClone = false;
    _core_utils_Object__WEBPACK_IMPORTED_MODULE_6__.copyProperties(this, column, _core_Sprite__WEBPACK_IMPORTED_MODULE_1__.visualProperties); //column.copyFrom(<any>this.columns.template);

    column.padding(0, 0, 0, 0); // if columns will have padding (which is often), legend marker will be very narrow

    column.width = w;
    column.height = h;
    var legendDataItem = marker.dataItem;
    legendDataItem.color = column.fill;
    legendDataItem.colorOrig = column.fill;
  };

  TreeMapSeries.prototype.disableUnusedColumns = function (dataItem) {
    _super.prototype.disableUnusedColumns.call(this, dataItem);

    if (dataItem.column) {
      dataItem.column.__disabled = false;
    }
  };

  return TreeMapSeries;
}(_ColumnSeries__WEBPACK_IMPORTED_MODULE_0__.ColumnSeries);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_2__.registry.registeredClasses.TreeMapSeries = TreeMapSeries;
_core_Registry__WEBPACK_IMPORTED_MODULE_2__.registry.registeredClasses.TreeMapSeriesDataItem = TreeMapSeriesDataItem;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/series/XYSeries.js":
/*!******************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/series/XYSeries.js ***!
  \******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "XYSeries": () => (/* binding */ XYSeries),
/* harmony export */   "XYSeriesDataItem": () => (/* binding */ XYSeriesDataItem)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Series__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Series */ "./node_modules/@amcharts/amcharts4/.internal/charts/series/Series.js");
/* harmony import */ var _core_Sprite__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/Sprite */ "./node_modules/@amcharts/amcharts4/.internal/core/Sprite.js");
/* harmony import */ var _axes_ValueAxis__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../axes/ValueAxis */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/ValueAxis.js");
/* harmony import */ var _core_utils_Dictionary__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/utils/Dictionary */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Dictionary.js");
/* harmony import */ var _core_utils_Disposer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../core/utils/Disposer */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Disposer.js");
/* harmony import */ var _types_XYChart__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../types/XYChart */ "./node_modules/@amcharts/amcharts4/.internal/charts/types/XYChart.js");
/* harmony import */ var _axes_CategoryAxis__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../axes/CategoryAxis */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/CategoryAxis.js");
/* harmony import */ var _axes_DateAxis__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../axes/DateAxis */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/DateAxis.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../core/utils/Iterator */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Iterator.js");
/* harmony import */ var _core_utils_Math__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../core/utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
/* harmony import */ var _core_utils_Utils__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../core/utils/Utils */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Utils.js");
/* harmony import */ var _core_utils_Type__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../core/utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/* harmony import */ var _core_utils_Time__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../core/utils/Time */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Time.js");
/* harmony import */ var _core_utils_Array__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../core/utils/Array */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Array.js");
/* harmony import */ var _core_utils_Object__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../core/utils/Object */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Object.js");
/* harmony import */ var _core_rendering_Path__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../core/rendering/Path */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Path.js");
/* harmony import */ var _core_Options__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../core/Options */ "./node_modules/@amcharts/amcharts4/.internal/core/Options.js");
/**
 * XY series module.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */



















/**
 * ============================================================================
 * DATA ITEM
 * ============================================================================
 * @hidden
 */

/**
 * Defines a [[DataItem]] for [[XYSeries]].
 *
 * @see {@link DataItem}
 */

var XYSeriesDataItem =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_18__.__extends)(XYSeriesDataItem, _super);
  /**
   * Constructor
   */


  function XYSeriesDataItem() {
    var _this = _super.call(this) || this;

    _this.className = "XYSeriesDataItem";
    _this.values.customValue = {};
    _this.values.valueX = {
      stack: 0
    };
    _this.values.valueY = {
      stack: 0
    };
    _this.values.openValueX = {};
    _this.values.openValueY = {};
    _this.values.dateX = {};
    _this.values.dateY = {};
    _this.values.openDateX = {};
    _this.values.openDateY = {};

    _this.setLocation("dateX", 0.5, 0);

    _this.setLocation("dateY", 0.5, 0);

    _this.setLocation("categoryX", 0.5, 0);

    _this.setLocation("categoryY", 0.5, 0);

    _this.applyTheme();

    return _this;
  }

  Object.defineProperty(XYSeriesDataItem.prototype, "valueX", {
    /**
     * @return Value
     */
    get: function get() {
      return this.values.valueX.value;
    },

    /**
     * Item's numeric value on X value axis.
     *
     * @param value  Value
     */
    set: function set(value) {
      this.setValue("valueX", value);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(XYSeriesDataItem.prototype, "customValue", {
    /**
     * @return Value
     */
    get: function get() {
      return this.values.customValue.value;
    },

    /**
     * Item's custom numeric value.
     *
     * @param value  Value
     */
    set: function set(value) {
      this.setValue("customValue", value);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(XYSeriesDataItem.prototype, "valueY", {
    /**
     * @return Value
     */
    get: function get() {
      return this.values.valueY.value;
    },

    /**
     * Item's numeric value on Y value axis.
     *
     * @param value  Value
     */
    set: function set(value) {
      this.setValue("valueY", value);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(XYSeriesDataItem.prototype, "dateX", {
    /**
     * @return Date
     */
    get: function get() {
      return this.getDate("dateX");
    },

    /**
     * Item's date value on X date-based axis.
     *
     * @param date  Date
     */
    set: function set(date) {
      this.setDate("dateX", date);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(XYSeriesDataItem.prototype, "dateY", {
    /**
     * @return Date
     */
    get: function get() {
      return this.getDate("dateY");
    },

    /**
     * Item's date value on Y date-based axis.
     *
     * @param date  Date
     */
    set: function set(date) {
      this.setDate("dateY", date);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(XYSeriesDataItem.prototype, "categoryX", {
    /**
     * @return Category
     */
    get: function get() {
      return this.categories.categoryX;
    },

    /**
     * Item's category on X category axis.
     *
     * @param category  Category
     */
    set: function set(category) {
      this.setCategory("categoryX", category);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(XYSeriesDataItem.prototype, "categoryY", {
    /**
     * @return Category
     */
    get: function get() {
      return this.categories.categoryY;
    },

    /**
     * Item's category on Y category axis.
     *
     * @param category  Category
     */
    set: function set(category) {
      this.setCategory("categoryY", category);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(XYSeriesDataItem.prototype, "openValueX", {
    /**
     * @return Value
     */
    get: function get() {
      return this.values.openValueX.value;
    },

    /**
     * Item's open numeric value on X value axis.
     *
     * @param value  Value
     */
    set: function set(value) {
      this.setValue("openValueX", value);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(XYSeriesDataItem.prototype, "openValueY", {
    /**
     * @return Value
     */
    get: function get() {
      return this.values.openValueY.value;
    },

    /**
     * Item's open numeric value on Y value axis.
     *
     * @param value  Value
     */
    set: function set(value) {
      this.setValue("openValueY", value);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(XYSeriesDataItem.prototype, "openDateX", {
    /**
     * @return Date
     */
    get: function get() {
      return this.getDate("openDateX");
    },

    /**
     * Item's open date value on X date-based axis.
     *
     * @param date  Date
     */
    set: function set(date) {
      this.setDate("openDateX", date);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(XYSeriesDataItem.prototype, "openDateY", {
    /**
     * @return Date
     */
    get: function get() {
      return this.getDate("openDateY");
    },

    /**
     * Item's open date value on Y date-based axis.
     *
     * @param date  Date
     */
    set: function set(date) {
      this.setDate("openDateY", date);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(XYSeriesDataItem.prototype, "openCategoryX", {
    /**
     * @return Category
     */
    get: function get() {
      return this.categories.openCategoryX;
    },

    /**
     * Item's open category on X category axis.
     *
     * @param category  Category
     */
    set: function set(category) {
      this.setCategory("openCategoryX", category);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(XYSeriesDataItem.prototype, "openCategoryY", {
    /**
     * @return Category
     */
    get: function get() {
      return this.categories.openCategoryY;
    },

    /**
     * Item's open category on Y category axis.
     *
     * @param category  Category
     */
    set: function set(category) {
      this.setCategory("openCategoryY", category);
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Return smallest value out of all item's value fields.
   *
   * @ignore Exclude from docs
   * @param fields      Fields to check in
   * @param working     Include working (temporary) values
   * @param stackValue  If item is in a stack, the value item starts as
   * @return Value
   */

  XYSeriesDataItem.prototype.getMin = function (fields, working, stackValue) {
    var _this = this; //if (this.visible) {  // dumped because of non smooth zooming


    var min;

    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_12__.isNumber(stackValue)) {
      stackValue = 0;
    }

    _core_utils_Array__WEBPACK_IMPORTED_MODULE_14__.each(fields, function (field) {
      var value;

      if (working) {
        value = _this.getWorkingValue(field);
      } else {
        value = _this.getValue(field);
      }

      value += stackValue;

      if (value < min || !_core_utils_Type__WEBPACK_IMPORTED_MODULE_12__.isNumber(min)) {
        min = value;
      }
    });
    return min; //}
  };
  /**
   * Return biggest value out of all item's value fields.
   *
   * @ignore Exclude from docs
   * @param fields      Fields to check in
   * @param working     Include working (temporary) values
   * @param stackValue  If item is in a stack, the value item starts as
   * @return Value
   */


  XYSeriesDataItem.prototype.getMax = function (fields, working, stackValue) {
    var _this = this; //if (this.visible) { // dumped because of non smooth zooming


    var max;

    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_12__.isNumber(stackValue)) {
      stackValue = 0;
    }

    _core_utils_Array__WEBPACK_IMPORTED_MODULE_14__.each(fields, function (field) {
      var value;

      if (working) {
        value = _this.getWorkingValue(field);
      } else {
        value = _this.getValue(field);
      }

      value += stackValue;

      if (value > max || !_core_utils_Type__WEBPACK_IMPORTED_MODULE_12__.isNumber(max)) {
        max = value;
      }
    });
    return max; //}
  };

  return XYSeriesDataItem;
}(_Series__WEBPACK_IMPORTED_MODULE_0__.SeriesDataItem);


/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Defines Series for [[XYChart]].
 *
 * @see {@link IXYSeriesEvents} for a list of available Events
 * @see {@link IXYSeriesAdapters} for a list of available Adapters
 * @important
 */

var XYSeries =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_18__.__extends)(XYSeries, _super);
  /**
   * Constructor
   */


  function XYSeries() {
    var _this = _super.call(this) || this;
    /**
     * Indicates which of the series' `dataFields` to calculate aggregate values
     * for.
     *
     * Available data fields for all [[XYSeries]] are:
     * `valueX`, `valueY`, `openValueX`, and `openValueY`.
     *
     * [[CandlestickSeries]] adds:
     * `lowValueX`, `lowValueY`, `highValueX`, and `highValueY`.
     *
     * Available options:
     * `"open"`, `"close"`, `"low"`, `"high"`, `"average"`, `"sum"`.
     *
     * Defaults are as follows:
     * * `valueX`: `"close"`
     * * `valueY`: `"close"`
     * * `openValueX`: `"open"`
     * * `openValueY`: `"open"`
     * * `lowValueX`: `"low"`
     * * `lowValueY`: `"low"`
     * * `highValueX`: `"high"`
     * * `highValueY`: `"high"`
     *
     * Is required only if data being plotted on a `DateAxis` and
     * its `groupData` is set to `true`.
     *
     * ```TypeScript
     * let dateAxis = chart.xAxes.push(new am4charts.DateAxis());
     * dateAxis.groupData = true;
     *
     * let valueAxis = chart.xAxes.push(new am4charts.valueAxis());
     *
     * let series = chart.series.push(new am4charts.LineSeries());
     * series.dataFields.dateX = "date";
     * series.dataFields.valueY = "value";
     * series.groupFields.valueY = "average";
     * ```
     * ```JavaScript
     * var dateAxis = chart.xAxes.push(new am4charts.DateAxis());
     * dateAxis.groupData = true;
     *
     * var valueAxis = chart.xAxes.push(new am4charts.valueAxis());
     *
     * var series = chart.series.push(new am4charts.LineSeries());
     * series.dataFields.dateX = "date";
     * series.dataFields.valueY = "value";
     * series.groupFields.valueY = "average";
     * ```
     * ```JSON
     * {
     *   // ...
     *   "xAxes": [{
     *     "type": "DateAxis",
     *     "groupData": true
     *   }],
     *   "yAxes": [{
     *     "type": "ValueAxis"
     *   }],
     *   "series": [{
     *     "type": "LineSeries",
     *     "dataFields": {
     *       "dateX": "date",
     *       "valueY": "value"
     *     },
     *     "groupFields": {
     *       "valueY": "average"
     *     }
     *   }]
     * }
     * ```
     *
     * The above setup will ensure, that if there are many data items within
     * selected range, they will be grouped into aggregated data points, using
     * average value of all the values.
     *
     * For example if we have 2 years worth of daily data (~700 data items), when
     * fully zoomed out, the chart would show ~100 data items instead: one for
     * each week in those two years.
     *
     * Grouping will occur automatically, based on current selection range, and
     * will change dynamically when user zooms in/out the chart.
     *
     * @see {@link https://www.amcharts.com/docs/v4/concepts/axes/date-axis/#Dynamic_data_item_grouping} for more information about dynamic data item grouping.
     * @since 4.7.0
     */


    _this.groupFields = {};
    /**
     * X axis the series is attached to.
     */

    _this._xAxis = new _core_utils_Disposer__WEBPACK_IMPORTED_MODULE_4__.MutableValueDisposer();
    /**
     * Y axis the series is attached to.
     */

    _this._yAxis = new _core_utils_Disposer__WEBPACK_IMPORTED_MODULE_4__.MutableValueDisposer();
    /**
     * [_xValueFields description]
     *
     * @todo Description
     */

    _this._xValueFields = [];
    /**
     * [_yValueFields description]
     *
     * @todo Description
     */

    _this._yValueFields = [];
    /**
     * @ignore
     */

    _this._baseInterval = {};
    /**
     * @ignore
     */

    _this.dataGrouped = false;
    /**
     * @ignore
     */

    _this.usesShowFields = false;
    /**
     * @ignore
     */

    _this._dataSetChanged = false;
    _this._maxxX = 100000;
    _this._maxxY = 100000;
    _this._propertiesChanged = false;
    /**
     * @ignore
     */

    _this.outOfRange = false;
    _this.className = "XYSeries";
    _this.isMeasured = false;
    _this.groupFields.valueX = "close";
    _this.groupFields.valueY = "close";
    _this.groupFields.customValue = "close";
    _this.groupFields.openValueX = "open";
    _this.groupFields.openValueY = "open";
    _this.cursorTooltipEnabled = true;
    _this.cursorHoverEnabled = true;
    _this.excludeFromTotal = false;
    _this.mainContainer.mask = new _core_Sprite__WEBPACK_IMPORTED_MODULE_1__.Sprite();

    _this.mainContainer.mask.setElement(_this.paper.add("path"));

    _this.stacked = false;
    _this.snapTooltip = false;
    _this._showBullets = false;
    _this.tooltip.pointerOrientation = "horizontal";
    _this.properties.stackToNegative = true;
    _this.hideTooltipWhileZooming = true;

    _this.setPropertyValue("maskBullets", true);

    _this.tooltip.events.on("hidden", function () {
      _this.returnBulletDefaultState();
    }, undefined, false);

    _this._disposers.push(_this._xAxis);

    _this._disposers.push(_this._yAxis);

    _this.observe(_core_Sprite__WEBPACK_IMPORTED_MODULE_1__.visualProperties, function () {
      if (_this.inited) {
        _this._propertiesChanged = true;

        if (_this.legendDataItem) {
          _this.legendDataItem.childrenCreated = false;
        }

        if (_this.chart && _this.chart.legend) {
          _this.chart.legend.invalidateDataItems();
        }

        _this.invalidate();
      }
    }, undefined, false);

    _this.applyTheme();

    return _this;
  }
  /**
   * Sets defaults that instantiate some objects that rely on parent, so they
   * cannot be set in constructor.
   */


  XYSeries.prototype.applyInternalDefaults = function () {
    _super.prototype.applyInternalDefaults.call(this);

    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_12__.hasValue(this.readerTitle)) {
      this.readerTitle = this.language.translate("X/Y Series");
    }
  };
  /**
   * Returns a new/empty DataItem of the type appropriate for this object.
   *
   * @see {@link DataItem}
   * @return Data Item
   */


  XYSeries.prototype.createDataItem = function () {
    return new XYSeriesDataItem();
  };
  /**
   * @ignore
   */


  XYSeries.prototype.resetExtremes = function () {
    this._tmin.clear();

    this._tmax.clear();

    this._smin.clear();

    this._smax.clear();
  };
  /**
   * @ignore
   */


  XYSeries.prototype.dataChangeUpdate = function () {
    this.dataGrouped = false;
    this._baseInterval = {};
    this._currentDataSetId = "";
    this.resetExtremes();

    if (this.xAxis) {
      this.xAxis.seriesDataChangeUpdate(this);
    }

    if (this.yAxis) {
      this.yAxis.seriesDataChangeUpdate(this);
    }
  };
  /**
   * (Re)validates the series' data.
   *
   * @ignore Exclude from docs
   */


  XYSeries.prototype.validateData = function () {
    this._baseInterval = {};
    var dataFields = this.dataFields;

    if (dataFields.valueYShow || dataFields.openValueXShow || dataFields.openValueXShow || dataFields.openValueYShow) {
      this.usesShowFields = true;
    } else {
      this.usesShowFields = false;
    }

    this.defineFields();

    if (this.data.length > 0) {
      this.dataChangeUpdate();
    }

    _super.prototype.validateData.call(this);

    this.updateItemReaderText();

    if (this.chart) {
      if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_12__.hasValue(this.dataFields[this._xField]) || !_core_utils_Type__WEBPACK_IMPORTED_MODULE_12__.hasValue(this.dataFields[this._yField])) {
        throw Error("Data fields for series \"" + (this.name ? this.name : this.uid) + "\" are not properly defined.");
      }
    } // 4.7.21 solves 51540


    if (this.inited && this.isHidden) {
      this.hide(0);
    }

    this.dataGrouped = false;
  };
  /**
   * Processes data item.
   *
   * @param dataItem     Data item
   * @param dataContext  Raw data
   * @param index        Index of the data item
   */


  XYSeries.prototype.processDataItem = function (dataItem, dataContext) {
    try {
      _super.prototype.processDataItem.call(this, dataItem, dataContext);

      this.xAxis.processSeriesDataItem(dataItem, "X");
      this.yAxis.processSeriesDataItem(dataItem, "Y");
      this.setInitialWorkingValues(dataItem);
    } catch (e) {
      if (this._chart) {
        this._chart.raiseCriticalError(e);
      }
    }
  };
  /**
   *
   * When validating raw data, instead of processing data item, we update it
   *
   * @ignore Exclude from docs
   * @param item
   */


  XYSeries.prototype.updateDataItem = function (dataItem) {
    _super.prototype.updateDataItem.call(this, dataItem); //dataItem.events.disable();


    this.xAxis.processSeriesDataItem(dataItem, "X");
    this.yAxis.processSeriesDataItem(dataItem, "Y"); //dataItem.events.enable();		
  };
  /**
   * Inits data item's working values.
   *
   * @param dataItem  Data item
   * @param index     Data item's index
   */


  XYSeries.prototype.setInitialWorkingValues = function (dataItem) {};
  /**
   * @ignore
   */


  XYSeries.prototype.disposeData = function () {
    _super.prototype.disposeData.call(this);

    var xAxis = this.xAxis;
    var yAxis = this.yAxis;

    if (xAxis) {
      var dataItemsX = this.dataItemsByAxis.getKey(xAxis.uid);

      if (dataItemsX) {
        dataItemsX.clear();
      }

      if (xAxis instanceof _axes_CategoryAxis__WEBPACK_IMPORTED_MODULE_6__.CategoryAxis) {
        this.clearCatAxis(xAxis);
      }
    }

    if (yAxis) {
      var dataItemsY = this.dataItemsByAxis.getKey(yAxis.uid);

      if (dataItemsY) {
        dataItemsY.clear();
      }

      if (yAxis instanceof _axes_CategoryAxis__WEBPACK_IMPORTED_MODULE_6__.CategoryAxis) {
        this.clearCatAxis(yAxis);
      }
    }
  };
  /**
   * @ignore
   */


  XYSeries.prototype.clearCatAxis = function (axis) {
    var uid = this.uid;
    axis.dataItems.each(function (dataItem) {
      if (dataItem.seriesDataItems[uid]) {
        dataItem.seriesDataItems[uid] = [];
      }
    });
  };
  /**
   * Sets up which data fields to use for data access.
   */


  XYSeries.prototype.defineFields = function () {
    var xAxis = this.xAxis;
    var yAxis = this.yAxis;

    if (xAxis && yAxis) {
      var xAxisFieldName = xAxis.axisFieldName;
      var xField = xAxisFieldName + "X";
      var xOpenField = "open" + _core_utils_Utils__WEBPACK_IMPORTED_MODULE_11__.capitalize(xAxisFieldName) + "X";
      var yAxisFieldName = yAxis.axisFieldName;
      var yField = yAxisFieldName + "Y";
      var yOpenField = "open" + _core_utils_Utils__WEBPACK_IMPORTED_MODULE_11__.capitalize(yAxisFieldName) + "Y";
      this._xField = xField;
      this._yField = yField;

      if (this.dataFields[xOpenField]) {
        this._xOpenField = xOpenField;
      }

      if (this.dataFields[yOpenField]) {
        this._yOpenField = yOpenField;
      }

      if (!this.dataFields[yOpenField] && this.baseAxis == yAxis) {
        this._yOpenField = yField;
      }

      if (!this.dataFields[xOpenField] && this.baseAxis == xAxis) {
        this._xOpenField = xField;
      }

      if (this.stacked && this.baseAxis == xAxis) {
        this._xOpenField = xField;
      }

      if (this.stacked && this.baseAxis == yAxis) {
        this._yOpenField = yField;
      }

      if (xAxis instanceof _axes_CategoryAxis__WEBPACK_IMPORTED_MODULE_6__.CategoryAxis && yAxis instanceof _axes_CategoryAxis__WEBPACK_IMPORTED_MODULE_6__.CategoryAxis) {
        if (!this._yOpenField) {
          this._yOpenField = yField;
        }
      }

      this._xValueFields = [];
      this._yValueFields = [];
      this.addValueField(xAxis, this._xValueFields, this._xField);
      this.addValueField(xAxis, this._xValueFields, this._xOpenField);
      this.addValueField(yAxis, this._yValueFields, this._yField);
      this.addValueField(yAxis, this._yValueFields, this._yOpenField);
    }
  };
  /**
   * [axis description]
   *
   * @todo Description
   * @param axis    Axis
   * @param fields  Fields (?)
   * @param field   Field
   */


  XYSeries.prototype.addValueField = function (axis, fields, field) {
    if (axis instanceof _axes_ValueAxis__WEBPACK_IMPORTED_MODULE_2__.ValueAxis) {
      if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_12__.hasValue(this.dataFields[field]) && fields.indexOf(field) == -1) {
        fields.push(field);
      }
    }
  };
  /**
   * Sets category field from the category axis.
   *
   * User might set field for category axis only, but not for series. In such
   * case, we take field value from axis and set it for series.
   *
   * @param field  Field
   * @param axis   Axis
   */


  XYSeries.prototype.setCategoryAxisField = function (field, axis) {
    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_12__.hasValue(this.dataFields[field])) {
      this.dataFields[field] = axis.dataFields.category;
    }
  };
  /**
   * Sets date field from the date axis.
   *
   * User might set field for category axis only, but not for series. In such
   * case, we take field value from axis and set it for series.
   *
   * @param field  Field
   * @param axis   Axis
   */


  XYSeries.prototype.setDateAxisField = function (field, axis) {
    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_12__.hasValue(this.dataFields[field])) {
      this.dataFields[field] = axis.dataFields.date;
    }
  };
  /**
   * Performs after-draw tasks, e.g. creates masks.
   */


  XYSeries.prototype.afterDraw = function () {
    _super.prototype.afterDraw.call(this);

    this.createMask();
  };
  /**
   * Create a mask for the series.
   *
   * @ignore Exclude from docs
   */


  XYSeries.prototype.createMask = function () {
    // this mask from which we cut out ranges. does not work well if ranges overlap.
    if (this.mainContainer.mask) {
      var path_1 = this.getMaskPath(); // @todo: this approach won't work well on circluar or other non x/y axes

      _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_9__.each(this.axisRanges.iterator(), function (range) {
        if (range.axisFill.fillPath) {
          range.axisFill.validate();
          path_1 += range.axisFill.fillPath;
        }
      });
      this.mainContainer.mask.path = path_1;
    }
  };
  /**
   * Returns an SVG path to use as series mask.
   *
   * @return SVG path
   */


  XYSeries.prototype.getMaskPath = function () {
    if (this.xAxis && this.yAxis) {
      return _core_rendering_Path__WEBPACK_IMPORTED_MODULE_16__.rectToPath({
        x: 0,
        y: 0,
        width: this.xAxis.axisLength,
        height: this.yAxis.axisLength
      });
    }

    return "";
  };
  /**
   * Returns axis data field to use.
   *
   * @param axis  Axis
   * @return Field name
   */


  XYSeries.prototype.getAxisField = function (axis) {
    if (axis == this.xAxis) {
      return this.xField;
    }

    if (axis == this.yAxis) {
      return this.yField;
    }
  };
  /**
   * Validates data items.
   *
   * @ignore Exclude from docs
   */


  XYSeries.prototype.validateDataItems = function () {
    var chart = this.chart;

    if (chart) {
      this._maxxX = _core_utils_Math__WEBPACK_IMPORTED_MODULE_10__.max(100000, chart.plotContainer.maxWidth * 2);
      this._maxxY = _core_utils_Math__WEBPACK_IMPORTED_MODULE_10__.max(100000, chart.plotContainer.maxHeight * 2);
    } // this helps date axis to check which baseInterval we should use


    var xAxis = this.xAxis;
    var yAxis = this.yAxis;

    if (xAxis && yAxis) {
      xAxis.updateAxisBySeries();
      yAxis.updateAxisBySeries();
    }

    _super.prototype.validateDataItems.call(this);

    if (xAxis && yAxis) {
      xAxis.postProcessSeriesDataItems(this);
      yAxis.postProcessSeriesDataItems(this);
    }
  };
  /**
   * Validates data range.
   *
   * @ignore Exclude from docs
   */


  XYSeries.prototype.validateDataRange = function () {
    var xAxis = this.xAxis;
    var yAxis = this.yAxis;

    if (xAxis && yAxis) {
      if (xAxis.dataRangeInvalid) {
        xAxis.validateDataRange();
      }

      if (yAxis.dataRangeInvalid) {
        yAxis.validateDataRange();
      }
    }

    _super.prototype.validateDataRange.call(this);
  };
  /**
   * (Re)validates the whole series, effectively causing it to redraw.
   *
   * @ignore Exclude from docs
   */


  XYSeries.prototype.validate = function () {
    var xAxis = this.xAxis;
    var yAxis = this.yAxis;

    if (xAxis && yAxis) {
      if (xAxis.invalid) {
        xAxis.validate();
      }

      if (yAxis.invalid) {
        yAxis.validate();
      }

      this.y = yAxis.pixelY;
      this.x = xAxis.pixelX;
      this._showBullets = true;
      var minBulletDistance = this.minBulletDistance;

      if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_12__.isNumber(minBulletDistance)) {
        if (this.baseAxis.axisLength / (this.endIndex - this.startIndex) < minBulletDistance) {
          this._showBullets = false;
        }
      }
    }

    this.updateTooltip();

    if (xAxis instanceof _axes_DateAxis__WEBPACK_IMPORTED_MODULE_7__.DateAxis && xAxis.groupData && !this.dataGrouped || yAxis instanceof _axes_DateAxis__WEBPACK_IMPORTED_MODULE_7__.DateAxis && yAxis.groupData && !this.dataGrouped) {
      return;
    }

    _super.prototype.validate.call(this);

    var chart = this.chart;
    var maskBullets = this.maskBullets;

    if (chart && maskBullets) {
      if (chart.className == "XYChart") {
        if (chart.leftAxesContainer.layout == "vertical" || chart.rightAxesContainer.layout == "vertical") {
          if (this.yAxis) {
            this.bulletsContainer.mask = this.yAxis.renderer.gridContainer;
          } else {
            this.bulletsContainer.mask = undefined;
          }
        }

        if (chart.topAxesContainer.layout == "horizontal" || chart.bottomAxesContainer.layout == "horizontal") {
          if (this.xAxis) {
            this.bulletsContainer.mask = this.xAxis.renderer.gridContainer;
          } else {
            this.bulletsContainer.mask = undefined;
          }
        }
      }
    }
  };

  Object.defineProperty(XYSeries.prototype, "xAxis", {
    /**
     * @return Axis
     */
    get: function get() {
      if (this.chart) {
        if (!this._xAxis.get()) {
          var axis = this.chart.xAxes.getIndex(0);

          if (!axis) {
            throw Error("There are no X axes on chart.");
          }

          this.xAxis = axis;
        }

        return this._xAxis.get();
      }
    },

    /**
     * X axis the series is attached to.
     *
     * @param axis  Axis
     */
    set: function set(axis) {
      this.setXAxis(axis);
    },
    enumerable: true,
    configurable: true
  });

  XYSeries.prototype.setXAxis = function (axis) {
    var oldAxis = this._xAxis.get();

    if (oldAxis != axis) {
      if (oldAxis) {
        this.dataItemsByAxis.removeKey(oldAxis.uid); // TODO why is this here ?

        this._xAxis.dispose(); // temp @todo: why it is not disposed?


        oldAxis.series.removeValue(this);
      }

      this._xAxis.set(axis, axis.registerSeries(this));

      this.dataItemsByAxis.setKey(axis.uid, new _core_utils_Dictionary__WEBPACK_IMPORTED_MODULE_3__.Dictionary());
      this.invalidateData();
    }
  };

  Object.defineProperty(XYSeries.prototype, "yAxis", {
    /**
     * @return Axis
     */
    get: function get() {
      if (this.chart) {
        if (!this._yAxis.get()) {
          var axis = this.chart.yAxes.getIndex(0);

          if (!axis) {
            throw Error("There are no Y axes on chart.");
          }

          this.yAxis = axis;
        }

        return this._yAxis.get();
      }
    },

    /**
     * Y axis the series is attached to.
     *
     * @param axis  Axis
     */
    set: function set(axis) {
      this.setYAxis(axis);
    },
    enumerable: true,
    configurable: true
  });

  XYSeries.prototype.setYAxis = function (axis) {
    var oldAxis = this._yAxis.get();

    if (oldAxis != axis) {
      if (oldAxis) {
        this.dataItemsByAxis.removeKey(oldAxis.uid); // TODO why is this here ?

        this._yAxis.dispose(); // temp @todo: why it is not disposed?


        oldAxis.series.removeValue(this);
      }

      this._yAxis.set(axis, axis.registerSeries(this));

      if (axis.chart instanceof _types_XYChart__WEBPACK_IMPORTED_MODULE_5__.XYChart) {
        axis.chart.handleYAxisSet(this);
      }

      this.dataItemsByAxis.setKey(axis.uid, new _core_utils_Dictionary__WEBPACK_IMPORTED_MODULE_3__.Dictionary());
      this.invalidateData();
    }
  };

  Object.defineProperty(XYSeries.prototype, "baseAxis", {
    /**
     * @return Axis
     */
    get: function get() {
      var xAxis = this.xAxis;
      var yAxis = this.yAxis;

      if (!this._baseAxis && xAxis && yAxis) {
        if (yAxis instanceof _axes_DateAxis__WEBPACK_IMPORTED_MODULE_7__.DateAxis) {
          this._baseAxis = yAxis;
        }

        if (xAxis instanceof _axes_DateAxis__WEBPACK_IMPORTED_MODULE_7__.DateAxis) {
          this._baseAxis = xAxis;
        }

        if (yAxis instanceof _axes_CategoryAxis__WEBPACK_IMPORTED_MODULE_6__.CategoryAxis) {
          this._baseAxis = yAxis;
        }

        if (xAxis instanceof _axes_CategoryAxis__WEBPACK_IMPORTED_MODULE_6__.CategoryAxis) {
          this._baseAxis = xAxis;
        }

        if (!this._baseAxis) {
          this._baseAxis = xAxis;
        }
      }

      return this._baseAxis;
    },

    /**
     * The main (base) axis.
     *
     * This is the axis that series fills will go to, or grow animations will
     * happen from.
     *
     * @param value  Axis
     */
    set: function set(value) {
      if (this._baseAxis != value) {
        this._baseAxis = value;
        this.invalidate();
      }
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Adds one or several (array) of data items to the existing data.
   *
   * @param rawDataItem One or many raw data item objects
   */

  XYSeries.prototype.addData = function (rawDataItem, removeCount, skipRaw) {
    _super.prototype.addData.call(this, rawDataItem, removeCount, skipRaw);

    var scrollbarSeries = this.scrollbarSeries;

    if (scrollbarSeries) {
      this.scrollbarSeries.addData(rawDataItem, removeCount, true);
      this.scrollbarSeries._parseDataFrom = this._parseDataFrom;
    }
  };

  XYSeries.prototype.setData = function (value) {
    _super.prototype.setData.call(this, value);

    if (this.scrollbarSeries) {
      this.scrollbarSeries.setData(value);
    }
  };
  /**
   * Makes the chart use particular data set.
   *
   * If `id` is not provided or there is no such data set, main data will be
   * used.
   *
   * @ignore
   * @since 4.7.0
   * @param  id  Data set id
   */


  XYSeries.prototype.setDataSet = function (id) {
    var changed = _super.prototype.setDataSet.call(this, id);

    if (changed) {
      this._dataSetChanged = true;
      var dataItems = this.dataItems;
      this.resetExtremes();

      if (dataItems && dataItems.length > 0) {
        var xAxis = this.xAxis;
        var yAxis = this.yAxis;
        this._prevStartIndex = undefined;
        this._prevEndIndex = undefined;
        this._startIndex = undefined;
        this._endIndex = undefined;

        if (!this.appeared) {
          this.processValues(false); // this will slow down!
        }

        if (xAxis instanceof _axes_DateAxis__WEBPACK_IMPORTED_MODULE_7__.DateAxis && xAxis == this.baseAxis) {
          this._tmin.setKey(xAxis.uid, dataItems.getIndex(0).dateX.getTime());

          this._tmax.setKey(xAxis.uid, dataItems.getIndex(dataItems.length - 1).dateX.getTime());

          this.dispatch("extremeschanged");
        }

        if (yAxis instanceof _axes_DateAxis__WEBPACK_IMPORTED_MODULE_7__.DateAxis && yAxis == this.baseAxis) {
          this._tmin.setKey(yAxis.uid, dataItems.getIndex(0).dateY.getTime());

          this._tmax.setKey(yAxis.uid, dataItems.getIndex(dataItems.length - 1).dateY.getTime());

          this.dispatch("extremeschanged");
        }
      }
    }

    return changed;
  };
  /**
   * Processes values after data items' were added.
   *
   * @ignore Exclude from docs
   * @param dataItems  Data items
   */


  XYSeries.prototype.processValues = function (working) {
    _super.prototype.processValues.call(this, working);

    var xAxis = this.xAxis;
    var yAxis = this.yAxis;

    if (!xAxis || !yAxis) {
      return;
    }

    var dataItems = this.dataItems;
    var minX = Infinity;
    var maxX = -Infinity;
    var minY = Infinity;
    var maxY = -Infinity;
    var startIndex = this.startIndex;
    var endIndex = this.endIndex;
    var workingStartIndex = startIndex;
    var workingEndIndex = endIndex;

    if (!working) {
      startIndex = 0;
      endIndex = this.dataItems.length;
    }

    for (var i = startIndex; i < endIndex; i++) {
      var dataItem = dataItems.getIndex(i);
      this.getStackValue(dataItem, working);
      var stackX = dataItem.getValue("valueX", "stack");
      var stackY = dataItem.getValue("valueY", "stack");
      minX = _core_utils_Math__WEBPACK_IMPORTED_MODULE_10__.min(dataItem.getMin(this._xValueFields, working, stackX), minX);
      minY = _core_utils_Math__WEBPACK_IMPORTED_MODULE_10__.min(dataItem.getMin(this._yValueFields, working, stackY), minY);
      maxX = _core_utils_Math__WEBPACK_IMPORTED_MODULE_10__.max(dataItem.getMax(this._xValueFields, working, stackX), maxX);
      maxY = _core_utils_Math__WEBPACK_IMPORTED_MODULE_10__.max(dataItem.getMax(this._yValueFields, working, stackY), maxY); // if it's stacked, pay attention to stack value

      if (this.stacked) {
        if (this.baseAxis == xAxis) {
          if (stackY < minY) {
            minY = stackY;
          }

          if (stackY > maxY) {
            maxY = stackY;
          }
        }

        if (this.baseAxis == yAxis) {
          if (stackX < minX) {
            minX = stackX;
          }

          if (stackX > maxX) {
            maxX = stackX;
          }
        }
      }
    } // this is mainly for value axis to calculate total and perecent.total of each series category


    xAxis.processSeriesDataItems();
    yAxis.processSeriesDataItems();
    var xAxisId = xAxis.uid;
    var yAxisId = yAxis.uid;

    if (this.xAxis instanceof _axes_ValueAxis__WEBPACK_IMPORTED_MODULE_2__.ValueAxis && (minX == Infinity || maxX == -Infinity)) {
      this._smin.setKey(xAxisId, undefined);

      this._smax.setKey(xAxisId, undefined);

      this.dispatchImmediately("selectionextremeschanged");
      return;
    }

    if (this.yAxis instanceof _axes_ValueAxis__WEBPACK_IMPORTED_MODULE_2__.ValueAxis && (minY == Infinity || maxY == -Infinity)) {
      this._smin.setKey(yAxisId, undefined);

      this._smax.setKey(yAxisId, undefined);

      this.dispatchImmediately("selectionextremeschanged");
      return;
    }

    if (!working) {
      if (this._tmin.getKey(xAxisId) != minX || this._tmax.getKey(xAxisId) != maxX || this._tmin.getKey(yAxisId) != minY || this._tmax.getKey(yAxisId) != maxY) {
        this._tmin.setKey(xAxisId, minX);

        this._tmax.setKey(xAxisId, maxX);

        this._tmin.setKey(yAxisId, minY);

        this._tmax.setKey(yAxisId, maxY);

        var stackedSeries = this.stackedSeries;

        if (stackedSeries) {
          if (stackedSeries.isDisposed()) {
            this.stackedSeries = undefined;
          } else {
            stackedSeries.processValues(false);
          }
        }

        this.dispatchImmediately("extremeschanged");
      }
    }

    if (startIndex != workingStartIndex || endIndex != workingEndIndex) {
      minX = Infinity;
      maxX = -Infinity;
      minY = Infinity;
      maxY = -Infinity;

      for (var i = workingStartIndex; i < workingEndIndex; i++) {
        var dataItem = dataItems.getIndex(i);
        this.getStackValue(dataItem, working);
        var stackX = dataItem.getValue("valueX", "stack");
        var stackY = dataItem.getValue("valueY", "stack");
        minX = _core_utils_Math__WEBPACK_IMPORTED_MODULE_10__.min(dataItem.getMin(this._xValueFields, working, stackX), minX);
        minY = _core_utils_Math__WEBPACK_IMPORTED_MODULE_10__.min(dataItem.getMin(this._yValueFields, working, stackY), minY);
        maxX = _core_utils_Math__WEBPACK_IMPORTED_MODULE_10__.max(dataItem.getMax(this._xValueFields, working, stackX), maxX);
        maxY = _core_utils_Math__WEBPACK_IMPORTED_MODULE_10__.max(dataItem.getMax(this._yValueFields, working, stackY), maxY); // if it's stacked, pay attention to stack value

        if (this.stacked) {
          if (this.baseAxis == xAxis) {
            if (stackY < minY) {
              minY = stackY;
            }

            if (stackY > maxY) {
              maxY = stackY;
            }
          }

          if (this.baseAxis == yAxis) {
            if (stackX < minX) {
              minX = stackX;
            }

            if (stackX > maxX) {
              maxX = stackX;
            }
          }
        }
      }
    }

    if (this.xAxis instanceof _axes_ValueAxis__WEBPACK_IMPORTED_MODULE_2__.ValueAxis && (minX == Infinity || maxX == -Infinity)) {
      this._smin.setKey(xAxisId, undefined);

      this._smax.setKey(xAxisId, undefined);

      this.dispatchImmediately("selectionextremeschanged");
      return;
    }

    if (this.yAxis instanceof _axes_ValueAxis__WEBPACK_IMPORTED_MODULE_2__.ValueAxis && (minY == Infinity || maxY == -Infinity)) {
      this._smin.setKey(yAxisId, undefined);

      this._smax.setKey(yAxisId, undefined);

      this.dispatchImmediately("selectionextremeschanged");
      return;
    }

    if (this._smin.getKey(xAxisId) != minX || this._smax.getKey(xAxisId) != maxX || this._smin.getKey(yAxisId) != minY || this._smax.getKey(yAxisId) != maxY) {
      this._smin.setKey(xAxisId, minX);

      this._smax.setKey(xAxisId, maxX);

      this._smin.setKey(yAxisId, minY);

      this._smax.setKey(yAxisId, maxY);

      if (this.appeared || this.start != 0 || this.end != 1 || this.dataItems != this.mainDataSet) {
        /// new, helps to handle issues with change percent
        var changed = false;

        if (yAxis instanceof _axes_ValueAxis__WEBPACK_IMPORTED_MODULE_2__.ValueAxis && !(yAxis instanceof _axes_DateAxis__WEBPACK_IMPORTED_MODULE_7__.DateAxis)) {
          var tmin = this._tmin.getKey(yAxisId);

          if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_12__.isNumber(tmin) || (this.usesShowFields || this._dataSetChanged || xAxis instanceof _axes_DateAxis__WEBPACK_IMPORTED_MODULE_7__.DateAxis && xAxis.groupData && this.isShowing) && minY < tmin || this.stackedSeries && !this.isHidden) {
            this._tmin.setKey(yAxisId, minY);

            changed = true;
          }

          var tmax = this._tmax.getKey(yAxisId);

          if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_12__.isNumber(tmax) || (this.usesShowFields || this._dataSetChanged || xAxis instanceof _axes_DateAxis__WEBPACK_IMPORTED_MODULE_7__.DateAxis && xAxis.groupData && this.isShowing) && maxY > tmax || this.stackedSeries && !this.isHidden) {
            this._tmax.setKey(yAxisId, maxY);

            changed = true;
          }
        }

        if (xAxis instanceof _axes_ValueAxis__WEBPACK_IMPORTED_MODULE_2__.ValueAxis && !(xAxis instanceof _axes_DateAxis__WEBPACK_IMPORTED_MODULE_7__.DateAxis)) {
          var tmin = this._tmin.getKey(xAxisId);

          if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_12__.isNumber(tmin) || (this.usesShowFields || this._dataSetChanged || yAxis instanceof _axes_DateAxis__WEBPACK_IMPORTED_MODULE_7__.DateAxis && yAxis.groupData && this.isShowing) && minX < tmin || this.stackedSeries && !this.isHidden) {
            this._tmin.setKey(xAxisId, minX);

            changed = true;
          }

          var tmax = this._tmax.getKey(xAxisId);

          if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_12__.isNumber(tmax) || (this.usesShowFields || this._dataSetChanged || yAxis instanceof _axes_DateAxis__WEBPACK_IMPORTED_MODULE_7__.DateAxis && yAxis.groupData && this.isShowing) && maxX > tmax || this.stackedSeries && !this.isHidden) {
            this._tmax.setKey(xAxisId, maxX);

            changed = true;
          }
        }

        if (changed) {
          this.dispatchImmediately("extremeschanged");
        }

        if (this.start == 0 && this.end == 1) {
          // yes, its ok. otherwise min/max won't be updated when zooming out
          this._dataSetChanged = false;
        }

        this.dispatchImmediately("selectionextremeschanged");
      }
    }

    if (!working && this.stacked) {
      this.processValues(true);
    }
  };
  /**
   * Hides element's [[Tooltip]].
   *
   * @see {@link Tooltip}
   */


  XYSeries.prototype.hideTooltip = function (duration) {
    _super.prototype.hideTooltip.call(this, duration);

    this.returnBulletDefaultState();
    this._prevTooltipDataItem = undefined;
  };
  /**
   * Shows series tooltip at specific position.
   *
   * @param xPosition  X
   * @param yPosition  Y
   */


  XYSeries.prototype.showTooltipAtPosition = function (xPosition, yPosition) {
    var dataItem;

    if (this.visible && !this.isHiding && !this.isShowing) {
      var xAxis = this._xAxis.get();

      var yAxis = this._yAxis.get();

      if (xAxis == this.baseAxis) {
        dataItem = xAxis.getSeriesDataItem(this, xAxis.toAxisPosition(xPosition), this.snapTooltip);
      }

      if (yAxis == this.baseAxis) {
        dataItem = yAxis.getSeriesDataItem(this, yAxis.toAxisPosition(yPosition), this.snapTooltip);
      }

      var point = this.showTooltipAtDataItem(dataItem);

      if (point) {
        return point;
      } // so that if tooltip is shown on columns or bullets for it not to be hidden


      if (!this.tooltipText && !this.tooltipHTML) {
        return;
      }
    }

    this.hideTooltip();
  };

  XYSeries.prototype.getAdjustedXLocation = function (dataItem, field, bulletLocationX) {
    return dataItem.locations[field];
  };

  XYSeries.prototype.getAdjustedYLocation = function (dataItem, field, bulletLocationY) {
    return dataItem.locations[field];
  };
  /**
   * Shows series tooltip at specific dataItem.
   *
   * @param dataItem
   */


  XYSeries.prototype.showTooltipAtDataItem = function (dataItem) {
    var e_1, _a;

    var cursor = this.chart.cursor;

    if (cursor && cursor.hideSeriesTooltipsOnSelection && cursor.selection.visible && cursor.downPoint) {
      this.hideTooltip();
      return;
    }

    this.returnBulletDefaultState(dataItem);

    if (dataItem && dataItem.visible) {
      this.updateLegendValue(dataItem);

      if (this.cursorTooltipEnabled) {
        this.tooltipDataItem = dataItem; // todo: add tooltipXField and tooltipYField.

        var tooltipXField = this.tooltipXField;
        var tooltipYField = this.tooltipYField;

        if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_12__.hasValue(dataItem[tooltipXField]) && _core_utils_Type__WEBPACK_IMPORTED_MODULE_12__.hasValue(dataItem[tooltipYField])) {
          var tooltipPoint = this.getPoint(dataItem, tooltipXField, tooltipYField, this.getAdjustedXLocation(dataItem, tooltipXField), this.getAdjustedYLocation(dataItem, tooltipYField));

          if (tooltipPoint) {
            if (this.chart.className == "XYChart" && (tooltipPoint.y < -1 || tooltipPoint.y > this.yAxis.pixelHeight + 1 || tooltipPoint.x < -1 || tooltipPoint.x > this.xAxis.pixelWidth + 1)) {// void
            } else {
              this.tooltipX = tooltipPoint.x;
              this.tooltipY = tooltipPoint.y;

              if (this._prevTooltipDataItem != dataItem) {
                this.dispatchImmediately("tooltipshownat", {
                  type: "tooltipshownat",
                  target: this,
                  dataItem: dataItem
                });
                this._prevTooltipDataItem = dataItem;
              }

              if (this.cursorHoverEnabled) {
                try {
                  for (var _b = (0,tslib__WEBPACK_IMPORTED_MODULE_18__.__values)(dataItem.sprites), _c = _b.next(); !_c.done; _c = _b.next()) {
                    var sprite = _c.value;

                    if (!sprite.parent.visible || sprite.isHidden || sprite.__disabled || sprite.disabled || sprite.isHiding) {} else {
                      if (!sprite.interactions.isRealHover) {
                        sprite.dispatchImmediately("over");
                        sprite.interactions.isRealHover = true;
                      }

                      sprite.isHover = true;
                    }
                  }
                } catch (e_1_1) {
                  e_1 = {
                    error: e_1_1
                  };
                } finally {
                  try {
                    if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
                  } finally {
                    if (e_1) throw e_1.error;
                  }
                }
              }

              if (this.showTooltip()) {
                return _core_utils_Utils__WEBPACK_IMPORTED_MODULE_11__.spritePointToSvg({
                  x: tooltipPoint.x,
                  y: tooltipPoint.y
                }, this);
              }

              return;
            }
          }
        }
      }
    } else {
      this.updateLegendValue(dataItem, true);
    }
  };
  /**
   * Returns default state to bullets when tooltip is shown at some other data
   * item or hidden
   */


  XYSeries.prototype.returnBulletDefaultState = function (dataItem) {
    var e_2, _a;

    if (this._prevTooltipDataItem && this._prevTooltipDataItem != dataItem) {
      try {
        for (var _b = (0,tslib__WEBPACK_IMPORTED_MODULE_18__.__values)(this._prevTooltipDataItem.sprites), _c = _b.next(); !_c.done; _c = _b.next()) {
          var sprite = _c.value;

          if (!sprite.isDisposed()) {
            var fireEvent = sprite.interactions.isRealHover;
            sprite.isHover = false;

            if (fireEvent) {
              sprite.dispatchImmediately("out");
            }
          } else {
            this._prevTooltipDataItem = undefined;
          }
        }
      } catch (e_2_1) {
        e_2 = {
          error: e_2_1
        };
      } finally {
        try {
          if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
        } finally {
          if (e_2) throw e_2.error;
        }
      }
    }
  };

  XYSeries.prototype.shouldCreateBullet = function (dataItem, bulletTemplate) {
    // use series xField/yField if bullet doesn't have fields set
    var xField = bulletTemplate.xField;

    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_12__.hasValue(xField)) {
      xField = this.xField;
    }

    var yField = bulletTemplate.yField;

    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_12__.hasValue(yField)) {
      yField = this.yField;
    }

    if (this.xAxis instanceof _axes_ValueAxis__WEBPACK_IMPORTED_MODULE_2__.ValueAxis && !dataItem.hasValue([xField]) || this.yAxis instanceof _axes_ValueAxis__WEBPACK_IMPORTED_MODULE_2__.ValueAxis && !dataItem.hasValue([yField])) {
      return false;
    }

    if (bulletTemplate.disabled) {
      var disabledField = bulletTemplate.propertyFields.disabled;
      var dataContext = dataItem.dataContext;

      if (dataContext && dataContext[disabledField] === false) {
        return true;
      } else {
        return false;
      }
    }

    return true;
  };
  /**
   * @ignore
   */


  XYSeries.prototype.updateTooltip = function () {
    if (!this.hideTooltipWhileZooming && this.tooltip && !this.tooltip.isHidden && !this.isHiding && !this.isHidden && this.tooltipDataItem) {
      this.showTooltipAtDataItem(this.tooltipDataItem);
    }
  };
  /**
   * @ignore
   */


  XYSeries.prototype.positionBullet = function (bullet) {
    _super.prototype.positionBullet.call(this, bullet);

    var dataItem = bullet.dataItem; // use series xField/yField if bullet doesn't have fields set

    var xField = bullet.xField;

    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_12__.hasValue(xField)) {
      xField = this.xField;
    }

    var yField = bullet.yField;

    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_12__.hasValue(yField)) {
      yField = this.yField;
    }

    var xAxis = this.xAxis;
    var yAxis = this.yAxis;

    if (xAxis instanceof _axes_ValueAxis__WEBPACK_IMPORTED_MODULE_2__.ValueAxis && !dataItem.hasValue([xField]) || yAxis instanceof _axes_ValueAxis__WEBPACK_IMPORTED_MODULE_2__.ValueAxis && !dataItem.hasValue([yField])) {
      bullet.visible = false;
    } else {
      var bulletLocationX = this.getBulletLocationX(bullet, xField);
      var bulletLocationY = this.getBulletLocationY(bullet, yField);
      var point = this.getPoint(dataItem, xField, yField, bulletLocationX, bulletLocationY);

      if (point) {
        var xOpenField = this.xOpenField;
        var yOpenField = this.yOpenField;
        var positionX = void 0;
        var positionY = void 0;

        if (xAxis instanceof _axes_DateAxis__WEBPACK_IMPORTED_MODULE_7__.DateAxis) {
          if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_12__.isNumber(bulletLocationX)) {
            bulletLocationX = 0;
          }

          var openValue = void 0;
          var closeValue = dataItem.getWorkingValue(xField);

          if (!xOpenField) {
            if (xAxis == this.baseAxis) {
              openValue = xAxis.baseValue;
            }
          } else {
            openValue = dataItem.getWorkingValue(xOpenField);
          }

          if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_12__.isNumber(openValue)) {
            openValue = closeValue;
          }

          var stack = dataItem.getValue("valueX", "stack");
          openValue += stack;
          closeValue += stack;

          if (openValue == closeValue) {
            var baseInterval = xAxis.baseInterval;
            var dateFormatter = xAxis.dateFormatter;
            openValue = _core_utils_Time__WEBPACK_IMPORTED_MODULE_13__.round(new Date(openValue), baseInterval.timeUnit, baseInterval.count, dateFormatter.firstDayOfWeek, dateFormatter.utc, undefined, dateFormatter.timezoneMinutes, dateFormatter.timezone).getTime();
            closeValue = _core_utils_Time__WEBPACK_IMPORTED_MODULE_13__.add(new Date(openValue), baseInterval.timeUnit, baseInterval.count, dateFormatter.utc).getTime();
          }

          var middleValue = void 0;

          if (xAxis == this.baseAxis) {
            middleValue = openValue + (closeValue - openValue) * bulletLocationX;
          } else {
            middleValue = openValue + (closeValue - openValue) * (1 - bulletLocationX);
          }

          positionX = xAxis.valueToPosition(middleValue);
        } else if (xAxis instanceof _axes_ValueAxis__WEBPACK_IMPORTED_MODULE_2__.ValueAxis) {
          if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_12__.isNumber(bulletLocationX)) {
            bulletLocationX = 0;
          }

          var openValue = void 0;
          var closeValue = dataItem.getWorkingValue(xField);

          if (!xOpenField) {
            openValue = xAxis.baseValue;
          } else {
            openValue = dataItem.getWorkingValue(xOpenField);
          }

          var stack = dataItem.getValue("valueX", "stack");
          openValue += stack;
          closeValue += stack;
          var middleValue = openValue + (closeValue - openValue) * (1 - bulletLocationX);
          positionX = xAxis.valueToPosition(middleValue);
        } else if (xAxis instanceof _axes_CategoryAxis__WEBPACK_IMPORTED_MODULE_6__.CategoryAxis) {
          var rightLocation = this.getAdjustedXLocation(dataItem, xField, bullet.locationX);
          var leftLocation = this.getAdjustedXLocation(dataItem, xOpenField, bullet.locationX);
          positionX = xAxis.categoryToPosition(dataItem[xField], rightLocation);
          var openPositionX = void 0;

          if (xOpenField) {
            openPositionX = xAxis.categoryToPosition(dataItem[xOpenField], leftLocation);
          }

          if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_12__.isNumber(openPositionX)) {
            openPositionX = 1;
          }

          positionX = openPositionX + (positionX - openPositionX) * bulletLocationX;
        }

        if (yAxis instanceof _axes_DateAxis__WEBPACK_IMPORTED_MODULE_7__.DateAxis) {
          if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_12__.isNumber(bulletLocationY)) {
            bulletLocationY = 0;
          }

          var openValue = void 0;
          var closeValue = dataItem.getWorkingValue(yField);

          if (!yOpenField) {
            if (yAxis == this.baseAxis) {
              openValue = yAxis.baseValue;
            }
          } else {
            openValue = dataItem.getWorkingValue(yOpenField);
          }

          if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_12__.isNumber(openValue)) {
            openValue = closeValue;
          }

          var stack = dataItem.getValue("valueY", "stack");
          openValue += stack;
          closeValue += stack;

          if (openValue == closeValue) {
            var baseInterval = yAxis.baseInterval;
            var dateFormatter = yAxis.dateFormatter;
            openValue = _core_utils_Time__WEBPACK_IMPORTED_MODULE_13__.round(new Date(openValue), baseInterval.timeUnit, baseInterval.count, dateFormatter.firstDayOfWeek, dateFormatter.utc, undefined, dateFormatter.timezoneMinutes, dateFormatter.timezone).getTime();
            closeValue = _core_utils_Time__WEBPACK_IMPORTED_MODULE_13__.add(new Date(openValue), baseInterval.timeUnit, baseInterval.count, dateFormatter.utc).getTime();
          }

          var middleValue = void 0;

          if (yAxis == this.baseAxis) {
            middleValue = openValue + (closeValue - openValue) * bulletLocationY;
          } else {
            middleValue = openValue + (closeValue - openValue) * (1 - bulletLocationY);
          }

          positionY = yAxis.valueToPosition(middleValue);
        } else if (yAxis instanceof _axes_ValueAxis__WEBPACK_IMPORTED_MODULE_2__.ValueAxis) {
          if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_12__.isNumber(bulletLocationY)) {
            bulletLocationY = 0;
          }

          var openValue = void 0;
          var closeValue = dataItem.getWorkingValue(yField);

          if (!yOpenField) {
            openValue = yAxis.baseValue;
          } else {
            openValue = dataItem.getWorkingValue(yOpenField);
          }

          var stack = dataItem.getValue("valueY", "stack");
          openValue += stack;
          closeValue += stack;
          var middleValue = openValue + (closeValue - openValue) * (1 - bulletLocationY);
          positionY = yAxis.valueToPosition(middleValue);
        } else if (yAxis instanceof _axes_CategoryAxis__WEBPACK_IMPORTED_MODULE_6__.CategoryAxis) {
          positionY = yAxis.categoryToPosition(dataItem[yField], bulletLocationY);
          var topLocation = this.getAdjustedYLocation(dataItem, yField, bullet.locationY);
          var bottomLocation = this.getAdjustedYLocation(dataItem, yOpenField, bullet.locationY);
          positionY = yAxis.categoryToPosition(dataItem[yField], topLocation);
          var openPositionY = void 0;

          if (yOpenField) {
            openPositionY = yAxis.categoryToPosition(dataItem[yOpenField], bottomLocation);
          }

          if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_12__.isNumber(openPositionY)) {
            openPositionY = 1;
          }

          positionY = openPositionY + (positionY - openPositionY) * bulletLocationY;
        }

        bullet.visible = true;
        this.positionBulletReal(bullet, positionX, positionY);
      } else {
        bullet.visible = false;
      }
    }
  };

  XYSeries.prototype.positionBulletReal = function (bullet, positionX, positionY) {
    bullet.x = this.xAxis.renderer.positionToPoint(positionX, positionY).x;
    bullet.y = this.yAxis.renderer.positionToPoint(positionY, positionX).y;
  };
  /**
   * returns bullet x location
   * @ignore
   */


  XYSeries.prototype.getBulletLocationX = function (bullet, field) {
    var bulletLocation = bullet.locationX;
    var dataItem = bullet.dataItem;

    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_12__.isNumber(bulletLocation)) {
      bulletLocation = dataItem.workingLocations[field];
    }

    return bulletLocation;
  };
  /**
   * Returns bullet x location
   * @ignore
   */


  XYSeries.prototype.getBulletLocationY = function (bullet, field) {
    var bulletLocation = bullet.locationY;
    var dataItem = bullet.dataItem;

    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_12__.isNumber(bulletLocation)) {
      bulletLocation = dataItem.workingLocations[field];
    }

    return bulletLocation;
  };
  /**
   * This method must be called if you update Series' data fields that might
   * affect stacking of the series.
   *
   * Since individual `dataField` changes are not being monitored, you need
   * todo it manually for changes to take affect.
   *
   * @since 4.7.21
   */


  XYSeries.prototype.updateStacking = function () {
    var _this = this;

    this.invalidateDataItems();

    if (this.chart) {
      this.chart.series.each(function (series) {
        if (series.baseAxis == _this.baseAxis) {
          series.stackedSeries = undefined;
          series.invalidateDataItems();
          series.invalidateProcessedData();
        }
      });
    }
  };

  Object.defineProperty(XYSeries.prototype, "stacked", {
    /**
     * @return Can be stacked?
     */
    get: function get() {
      return this.getPropertyValue("stacked");
    },

    /**
     * Can items from this series be included into stacks?
     *
     * Note: proper stacking is only possible if series have the same number
     * of data items. To ensure this, don't set data directly on series
     * but do this on chart instead.
     *
     * @default false
     * @param stacked  Can be stacked?
     */
    set: function set(stacked) {
      if (this.setPropertyValue("stacked", stacked, true)) {
        this.updateStacking();
        var xAxis = this.xAxis;
        var yAxis = this.yAxis;

        if (!stacked) {
          var field_1;

          if (xAxis != this.baseAxis && xAxis instanceof _axes_ValueAxis__WEBPACK_IMPORTED_MODULE_2__.ValueAxis) {
            field_1 = this.xField;
          }

          if (yAxis != this.baseAxis && yAxis instanceof _axes_ValueAxis__WEBPACK_IMPORTED_MODULE_2__.ValueAxis) {
            field_1 = this.yField;
          }

          if (field_1) {
            this.dataItems.each(function (dataItem) {
              dataItem.setCalculatedValue(field_1, 0, "stack");
            });
          }
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(XYSeries.prototype, "snapTooltip", {
    /**
     * @return Should snap?
     */
    get: function get() {
      return this.getPropertyValue("snapTooltip");
    },

    /**
     * Should the nearest tooltip be shown if no data item is found on the
     * current cursor position? In order this to work, you should set snapTooltip = false on the series baseAxis.
     *
     * @default false
     * @param value  Should snap?
     */
    set: function set(value) {
      this.setPropertyValue("snapTooltip", value);
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Shows hidden series.
   *
   * @param duration  Duration of reveal animation (ms)
   * @return Animation
   */

  XYSeries.prototype.show = function (duration) {
    var _this = this;

    if (this.isHidden) {
      if (this.appeared && this.xAxis instanceof _axes_DateAxis__WEBPACK_IMPORTED_MODULE_7__.DateAxis && this.xAxis.groupData) {
        this._tmin.setKey(this.yAxis.uid, undefined);

        this._tmax.setKey(this.yAxis.uid, undefined);
      }

      if (this.appeared && this.yAxis instanceof _axes_DateAxis__WEBPACK_IMPORTED_MODULE_7__.DateAxis && this.yAxis.groupData) {
        this._tmin.setKey(this.xAxis.uid, undefined);

        this._tmax.setKey(this.xAxis.uid, undefined);
      }
    }

    var fields;

    if (this.xAxis instanceof _axes_ValueAxis__WEBPACK_IMPORTED_MODULE_2__.ValueAxis && this.xAxis != this.baseAxis) {
      fields = this._xValueFields;
    }

    if (this.yAxis instanceof _axes_ValueAxis__WEBPACK_IMPORTED_MODULE_2__.ValueAxis && this.yAxis != this.baseAxis) {
      fields = this._yValueFields;
    }

    var startIndex = this.startIndex;
    var endIndex = this.endIndex;
    var delay = 0;
    var interpolationDuration = this.defaultState.transitionDuration;

    if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_12__.isNumber(duration)) {
      interpolationDuration = duration;
    }

    if (!_core_Options__WEBPACK_IMPORTED_MODULE_17__.options.animationsEnabled) {
      interpolationDuration = 0;
    }

    var anim;
    _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_9__.each(_core_utils_Iterator__WEBPACK_IMPORTED_MODULE_9__.indexed(this.dataItems.iterator()), function (a) {
      var i = a[0];
      var dataItem = a[1];
      var realDuration = interpolationDuration;

      if (i < _this.startIndex - 10 || i > _this.endIndex + 10) {
        realDuration = 0;
        delay = 0;
      }

      if (_this.sequencedInterpolation && realDuration > 0) {
        delay = _this.sequencedInterpolationDelay * i + interpolationDuration * (i - startIndex) / (endIndex - startIndex);
      }

      anim = dataItem.show(realDuration, delay, fields);
    }); // other data sets

    this.dataSets.each(function (key, dataSet) {
      if (dataSet != _this.dataItems) {
        dataSet.each(function (dataItem) {
          dataItem.events.disable();
          dataItem.show(0, 0, fields);
          dataItem.events.enable();
        });
      }
    });

    if (this.mainDataSet != this.dataItems) {
      this.mainDataSet.each(function (dataItem) {
        dataItem.events.disable();
        dataItem.show(0, 0, fields);
        dataItem.events.enable();
      });
    }

    var animation = _super.prototype.show.call(this, duration);

    if (anim && !anim.isFinished()) {
      animation = anim;
    }

    if (this.hidden) {
      this.dispatchImmediately("selectionextremeschanged");
      this.hidden = false;
    }

    return animation;
  };
  /**
   * Hides series.
   *
   * @param duration  Duration of hiding animation (ms)
   * @return Animation
   */


  XYSeries.prototype.hide = function (duration) {
    var _this = this;

    var fields;
    var value;
    var xAxis = this.xAxis;

    if (xAxis instanceof _axes_ValueAxis__WEBPACK_IMPORTED_MODULE_2__.ValueAxis && xAxis != this.baseAxis) {
      fields = this._xValueFields; // animate to zero if 0 is within zoomMin/zoomMax

      if (this.stacked || xAxis.minZoomed < xAxis.baseValue && xAxis.maxZoomed > xAxis.baseValue || this.stackedSeries) {
        value = xAxis.baseValue;
      } else {
        value = xAxis.min;
      }
    }

    var yAxis = this.yAxis;

    if (yAxis instanceof _axes_ValueAxis__WEBPACK_IMPORTED_MODULE_2__.ValueAxis && yAxis != this.baseAxis) {
      fields = this._yValueFields; // animate to zero if 0 is within zoomMin/zoomMax

      if (this.stacked || yAxis.minZoomed < yAxis.baseValue && yAxis.maxZoomed > yAxis.baseValue || this.stackedSeries) {
        value = yAxis.baseValue;
      } else {
        value = yAxis.min;
      }
    } //if ($type.hasValue(fields)) {


    var startIndex = this.startIndex;
    var endIndex = this.endIndex;
    var interpolationDuration = this.hiddenState.transitionDuration;

    if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_12__.isNumber(duration)) {
      interpolationDuration = duration;
    }

    if (!_core_Options__WEBPACK_IMPORTED_MODULE_17__.options.animationsEnabled) {
      interpolationDuration = 0;
    }

    var delay = 0;
    var anim;
    _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_9__.each(_core_utils_Iterator__WEBPACK_IMPORTED_MODULE_9__.indexed(this.dataItems.iterator()), function (a) {
      var i = a[0];
      var dataItem = a[1];
      var realDuration = interpolationDuration;

      if (i < _this.startIndex - 10 || i > _this.endIndex + 10) {
        realDuration = 0;
      }

      if (realDuration == 0) {
        dataItem.hide(0, 0, value, fields);
      } else {
        if (_this.sequencedInterpolation && realDuration > 0) {
          delay = _this.sequencedInterpolationDelay * i + interpolationDuration * (i - startIndex) / (endIndex - startIndex);
        }

        anim = dataItem.hide(realDuration, delay, value, fields);
      }
    }); // other data sets

    this.dataSets.each(function (key, dataSet) {
      if (dataSet != _this.dataItems) {
        dataSet.each(function (dataItem) {
          dataItem.events.disable();
          dataItem.hide(0, 0, value, fields);
          dataItem.events.enable();
        });
      }
    });

    if (this.mainDataSet != this.dataItems) {
      this.mainDataSet.each(function (dataItem) {
        dataItem.events.disable();
        dataItem.hide(0, 0, value, fields);
        dataItem.events.enable();
      });
    }

    var animation = _super.prototype.hide.call(this, interpolationDuration);

    if (animation && !animation.isFinished()) {
      animation.delay(delay);
    }

    if (anim && !anim.isFinished()) {
      animation = anim;
    } // helps to avoid flicker. otherwise columns will show up at full size and only on next frame will animate from 0


    this.validateDataElements(); //}

    return animation;
  };
  /**
   * [handleDataItemWorkingValueChange description]
   *
   * @ignore Exclude from docs
   */


  XYSeries.prototype.handleDataItemWorkingValueChange = function (dataItem, name) {
    _super.prototype.handleDataItemWorkingValueChange.call(this, dataItem, name); // to calculate stack values


    var axisSeries = this.baseAxis.series;
    _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_9__.each(axisSeries.iterator(), function (series) {
      if (series.stacked || series.stackedSeries) {
        series.invalidateProcessedData();
      }
    });
  };
  /**
   * [getStackValue description]
   *
   * @ignore Exclude from docs
   * @todo Description
   * @param dataItem  Data item
   */


  XYSeries.prototype.getStackValue = function (dataItem, working) {
    // todo: here wer stack x and y values only. question is - what should we do with other values, like openX, openY?
    // if this series is not stacked or new stack begins, return.
    var _this = this;

    var xAxis = this.xAxis;
    var yAxis = this.yAxis;

    if (!this.stacked || !xAxis || !yAxis) {
      return;
    } else {
      // it might seem that it's better to go through base axis series, but we do not maintain the same order as in chart.series there.
      var chart = this.chart;
      var index = chart.series.indexOf(this);
      var field_2;

      if (xAxis != this.baseAxis && xAxis instanceof _axes_ValueAxis__WEBPACK_IMPORTED_MODULE_2__.ValueAxis) {
        field_2 = this.xField;
      }

      if (yAxis != this.baseAxis && yAxis instanceof _axes_ValueAxis__WEBPACK_IMPORTED_MODULE_2__.ValueAxis) {
        field_2 = this.yField;
      }

      if (!field_2) {
        return;
      } //this is good for removing series, otherwise stack values will remain the same and chart won't pay atention when adding/removing series			


      dataItem.setCalculatedValue(field_2, 0, "stack");
      _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_9__.eachContinue(chart.series.range(0, index).backwards().iterator(), function (prevSeries) {
        // stacking is only possible if both axes are the same
        if (prevSeries.xAxis == xAxis && prevSeries.yAxis == yAxis && prevSeries.className == _this.className) {
          // saving value
          prevSeries.stackedSeries = _this;
          var prevDataItem = prevSeries.dataItems.getIndex(dataItem.index); // indexes should match

          if (prevDataItem && prevDataItem.hasValue(_this._xValueFields) && prevDataItem.hasValue(_this._yValueFields)) {
            var value = dataItem.getValue(field_2);
            var prevValue = void 0;
            var prevRealValue = prevDataItem.getValue(field_2) + prevDataItem.getValue(field_2, "stack");

            if (working) {
              prevValue = prevDataItem.getWorkingValue(field_2) + prevDataItem.getValue(field_2, "stack");
            } else {
              prevValue = prevDataItem.getValue(field_2) + prevDataItem.getValue(field_2, "stack");
            }

            if (_this.stackToNegative) {
              if (value >= 0 && prevRealValue >= 0 || value < 0 && prevRealValue < 0) {
                dataItem.setCalculatedValue(field_2, prevValue, "stack");
                return false;
              } else if (!prevSeries.stacked) {
                return false;
              }
            } else {
              dataItem.setCalculatedValue(field_2, prevValue, "stack");
              return false;
            }
          } else if (!prevSeries.stacked) {
            return false;
          }
        }

        return true;
      });
    }
  };

  Object.defineProperty(XYSeries.prototype, "stackToNegative", {
    /**
     * @return Stack to base line
     */
    get: function get() {
      return this.getPropertyValue("stackToNegative");
    },

    /**
     * This setting indicates how negative values are treated in stacked stacked
     * series.
     *
     * If set to `true` (default), negative values will stack on the base line.
     *
     * If set to `false`, negative value will stack in relation to the previous
     * value in the stack.
     *
     * @since 4.9.34
     * @param  value  Stack to base line
     */
    set: function set(value) {
      this.setPropertyValue("stackToNegative", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(XYSeries.prototype, "xField", {
    /**
     * [xField description]
     *
     * @ignore Exclude from docs
     * @todo Description
     * @return [description]
     */
    get: function get() {
      return this._xField;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(XYSeries.prototype, "yField", {
    /**
     * [yField description]
     *
     * @ignore Exclude from docs
     * @todo Description
     * @return [description]
     */
    get: function get() {
      return this._yField;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(XYSeries.prototype, "xOpenField", {
    /**
     * [xOpenField description]
     *
     * @ignore Exclude from docs
     * @todo Description
     * @return [description]
     */
    get: function get() {
      return this._xOpenField;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(XYSeries.prototype, "yOpenField", {
    /**
     * [yOpenField description]
     *
     * @ignore Exclude from docs
     * @todo Description
     * @return [description]
     */
    get: function get() {
      return this._yOpenField;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(XYSeries.prototype, "tooltipXField", {
    /**
     * @ignore Exclude from docs
     * @todo Description
     * @return [description]
     */
    get: function get() {
      if (this._tooltipXField) {
        return this._tooltipXField;
      }

      return this._xField;
    },

    /**
     * [tooltipXField description]
     *
     * @ignore Exclude from docs
     * @todo Description
     * @param value [description]
     */
    set: function set(value) {
      this._tooltipXField = value;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(XYSeries.prototype, "tooltipYField", {
    /**
     * @ignore Exclude from docs
     * @todo Description
     * @return [description]
     */
    get: function get() {
      if (this._tooltipYField) {
        return this._tooltipYField;
      }

      return this._yField;
    },

    /**
     * [tooltipYField description]
     *
     * @ignore Exclude from docs
     * @todo Description
     * @param value [description]
     */
    set: function set(value) {
      this._tooltipYField = value;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Returns lowest value in the series for the specific axis.
   *
   * @ignore Exclude from docs
   * @param axis  Axis
   * @return value
   */

  XYSeries.prototype.min = function (axis) {
    return this._tmin.getKey(axis.uid);
  };
  /**
   * Returns highest value in the series for the specific axis.
   *
   * @ignore Exclude from docs
   * @param axis  Axis
   * @return value
   */


  XYSeries.prototype.max = function (axis) {
    return this._tmax.getKey(axis.uid);
  };
  /**
   * Returns lowest value in the series for the specific axis within current
   * selection.
   *
   * @ignore Exclude from docs
   * @param axis  Axis
   * @return value
   */


  XYSeries.prototype.selectionMin = function (axis) {
    var value = this._smin.getKey(axis.uid); // not good, because bad if there are no items with values in selection
    //if (!$type.isNumber(value)) {
    //value = this.min(axis);
    //}		


    return value;
  };
  /**
   * Returns highest value in the series for the specific axis within current
   * selection.
   *
   * @ignore Exclude from docs
   * @param axis  Axis
   * @return value
   */


  XYSeries.prototype.selectionMax = function (axis) {
    var value = this._smax.getKey(axis.uid); // not good, because bad if there are no items with values in selection
    //if (!$type.isNumber(value)) {
    //value = this.max(axis);
    //}


    return value;
  };
  /**
   * Processes JSON-based config before it is applied to the object.
   *
   * @ignore Exclude from docs
   * @param config  Config
   */


  XYSeries.prototype.processConfig = function (config) {
    if (config) {
      // Set up base axes
      if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_12__.hasValue(config.baseAxis) && _core_utils_Type__WEBPACK_IMPORTED_MODULE_12__.isString(config.baseAxis)) {
        if (this.map.hasKey(config.baseAxis)) {
          config.baseAxis = this.map.getKey(config.baseAxis);
        } else {
          this.processingErrors.push("[XYSeries (" + (this.name || "unnamed") + ")] No axis with id \"" + config.baseAxis + "\" found for `baseAxis`.");
          delete config.baseAxis;
        }
      } // Set up axes


      if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_12__.hasValue(config.xAxis) && _core_utils_Type__WEBPACK_IMPORTED_MODULE_12__.isString(config.xAxis)) {
        if (this.map.hasKey(config.xAxis)) {
          config.xAxis = this.map.getKey(config.xAxis);
        } else {
          this.processingErrors.push("[XYSeries (" + (this.name || "unnamed") + ")] No axis with id \"" + config.xAxis + "\" found for `xAxis`.");
          delete config.xAxis;
        }
      }

      if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_12__.hasValue(config.yAxis) && _core_utils_Type__WEBPACK_IMPORTED_MODULE_12__.isString(config.yAxis)) {
        if (this.map.hasKey(config.yAxis)) {
          config.yAxis = this.map.getKey(config.yAxis);
        } else {
          this.processingErrors.push("[XYSeries (" + (this.name || "unnamed") + ")] No axis with id \"" + config.yAxis + "\" found for `yAxis`.");
          delete config.yAxis;
        }
      } // Set up axis ranges


      if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_12__.hasValue(config.axisRanges) && _core_utils_Type__WEBPACK_IMPORTED_MODULE_12__.isArray(config.axisRanges)) {
        for (var i = 0, len = config.axisRanges.length; i < len; i++) {
          var range = config.axisRanges[i];

          if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_12__.hasValue(range.type)) {
            range.type = "AxisDataItem";
          }

          if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_12__.hasValue(range.axis) && _core_utils_Type__WEBPACK_IMPORTED_MODULE_12__.isString(range.axis) && this.map.hasKey(range.axis)) {
            range.component = this.map.getKey(range.axis);
          } else if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_12__.hasValue(range.component) && _core_utils_Type__WEBPACK_IMPORTED_MODULE_12__.isString(range.component) && this.map.hasKey(range.component)) {
            range.component = this.map.getKey(range.component);
          }
        }
      } // Parse date fields based on the series fields


      if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_12__.hasValue(config.dataFields) || !_core_utils_Type__WEBPACK_IMPORTED_MODULE_12__.isObject(config.dataFields)) {
        this.processingErrors.push("`dataFields` is not set for series [" + (this.name || "unnamed") + "]");
      }
    }

    _super.prototype.processConfig.call(this, config);
  };
  /**
   * Returns an [[IPoint]] coordinates of the specific Serie's data point.
   *
   * @param    dataItem   Data item
   * @param    xKey       Name of X data field
   * @param    yKey       Name of Y data field
   * @param    locationX  X location
   * @param    locationY  Y location
   * @param    stackKeyX  ?
   * @param    stackKeyY  ?
   * @returns             Coordinates
   */


  XYSeries.prototype.getPoint = function (dataItem, xKey, yKey, locationX, locationY, stackKeyX, stackKeyY) {
    if (this.xAxis && this.yAxis) {
      var x = this.xAxis.getX(dataItem, xKey, locationX);
      var y = this.yAxis.getY(dataItem, yKey, locationY);
      x = _core_utils_Math__WEBPACK_IMPORTED_MODULE_10__.fitToRange(x, -this._maxxX, this._maxxX); // from geometric point of view this is not right, but practically it's ok. this is done to avoid too big objects.

      y = _core_utils_Math__WEBPACK_IMPORTED_MODULE_10__.fitToRange(y, -this._maxxY, this._maxxY); // from geometric point of view this is not right, but practically it's ok. this is done to avoid too big objects.

      return {
        x: x,
        y: y
      };
    }
  };
  /**
   * Updates item reader text based on the type and set up of axis.
   */


  XYSeries.prototype.updateItemReaderText = function () {
    // We do not want to overwrite this if `itemReaderText` was changed by
    // user code.
    if (this._itemReaderTextChanged) {
      return;
    }

    var text = "";
    _core_utils_Object__WEBPACK_IMPORTED_MODULE_15__.each(this.dataFields, function (key, val) {
      text += "{" + key + "} ";
    });
    this.itemReaderText = text;
    this._itemReaderTextChanged = false;
  };

  Object.defineProperty(XYSeries.prototype, "cursorTooltipEnabled", {
    /**
     * @return Display tooltip?
     */
    get: function get() {
      return this.getPropertyValue("cursorTooltipEnabled");
    },

    /**
     * Indicates if series should display a tooltip for chart's cursor.
     *
     * If set to `true` (default), the tooltips set for all series item's
     * elements like columns and bullets will be automatically shown
     * when [[XYCursor]] passes over category/date, even if its not hovered
     * directly over the item.
     *
     * Set this to `false` to disable such behavior and display item-specific
     * tooltips only when hovered directly over them
     *
     * @default true
     * @param value Display tooltip?
     */
    set: function set(value) {
      this.setPropertyValue("cursorTooltipEnabled", value);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(XYSeries.prototype, "cursorHoverEnabled", {
    /**
     * @return Hover enabled?
     */
    get: function get() {
      return this.getPropertyValue("cursorHoverEnabled");
    },

    /**
     * Indicates if series should apply hover state on bullets/columns/etc when
     * cursor is over the data item.
     *
     * If set to `true` (default) and chart cursor is enabled on th chart,
     * hovering over date/category will trigger hover states on related Series
     * items like bullets and columns.
     *
     * @default true
     * @since 4.2.2
     * @param  value  Hover enabled?
     */
    set: function set(value) {
      this.setPropertyValue("cursorHoverEnabled", value);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(XYSeries.prototype, "excludeFromTotal", {
    /**
     * @return Exclude from totals?
     */
    get: function get() {
      return this.getPropertyValue("excludeFromTotal");
    },

    /**
     * Indicates if series' values should be excluded when calculating totals.
     *
     * @default false
     * @since 4.4.9
     * @param  value  Exclude from totals?
     */
    set: function set(value) {
      this.setPropertyValue("excludeFromTotal", value);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(XYSeries.prototype, "hideTooltipWhileZooming", {
    /**
     * @return Hide tooltip while zooming?
     */
    get: function get() {
      return this.getPropertyValue("hideTooltipWhileZooming");
    },

    /**
     * Indicates if series' tooltip should be hidden while series axis range is
     * animating (zooming).
     *
     * @default true
     * @since 4.7.16
     * @param  value  Hide tooltip while zooming?
     */
    set: function set(value) {
      this.setPropertyValue("hideTooltipWhileZooming", value);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(XYSeries.prototype, "maskBullets", {
    /**
     * @return Mask bullets?
     */
    get: function get() {
      return this.getPropertyValue("maskBullets");
    },

    /**
     * Indicates if series' bullets should be masked.
     *
     * @default true
     * @since 4.7.17
     * @param  value  Mask bullets?
     */
    set: function set(value) {
      this.setPropertyValue("maskBullets", value);
      var chart = this.chart;

      if (chart) {
        if (value) {
          this.bulletsContainer.parent = chart.bulletsContainer;
        } else {
          this.bulletsContainer.parent = chart.axisBulletsContainer;
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Copies all properties from another instance of [[Series]].
   *
   * @param source  Source series
   */

  XYSeries.prototype.copyFrom = function (source) {
    this.groupFields = _core_utils_Utils__WEBPACK_IMPORTED_MODULE_11__.copyProperties(source.groupFields, {});

    _super.prototype.copyFrom.call(this, source);
  };
  /**
   * Destroys this object and all related data.
   */


  XYSeries.prototype.dispose = function () {
    if (this.scrollbarSeries) {
      this.scrollbarSeries.dispose();
    }

    _super.prototype.dispose.call(this);
  };

  return XYSeries;
}(_Series__WEBPACK_IMPORTED_MODULE_0__.Series);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_8__.registry.registeredClasses.XYSeries = XYSeries;
_core_Registry__WEBPACK_IMPORTED_MODULE_8__.registry.registeredClasses.XYSeriesDataItem = XYSeriesDataItem;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/types/ChordDiagram.js":
/*!*********************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/types/ChordDiagram.js ***!
  \*********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "ChordDiagram": () => (/* binding */ ChordDiagram),
/* harmony export */   "ChordDiagramDataItem": () => (/* binding */ ChordDiagramDataItem)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _FlowDiagram__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./FlowDiagram */ "./node_modules/@amcharts/amcharts4/.internal/charts/types/FlowDiagram.js");
/* harmony import */ var _core_utils_Percent__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/utils/Percent */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Percent.js");
/* harmony import */ var _core_Container__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/Container */ "./node_modules/@amcharts/amcharts4/.internal/core/Container.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _elements_ChordNode__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../elements/ChordNode */ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/ChordNode.js");
/* harmony import */ var _elements_ChordLink__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../elements/ChordLink */ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/ChordLink.js");
/* harmony import */ var _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../core/utils/Iterator */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Iterator.js");
/* harmony import */ var _core_utils_Math__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../core/utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
/* harmony import */ var _core_utils_Type__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../core/utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/* harmony import */ var _core_utils_Utils__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../core/utils/Utils */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Utils.js");
/**
 * Chord diagram module.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */











/**
 * ============================================================================
 * DATA ITEM
 * ============================================================================
 * @hidden
 */
//@todo rearange notes after dragged

/**
 * Defines a [[DataItem]] for [[ChordDiagram]].
 *
 * @see {@link DataItem}
 */

var ChordDiagramDataItem =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_10__.__extends)(ChordDiagramDataItem, _super);
  /**
   * Constructor
   */


  function ChordDiagramDataItem() {
    var _this = _super.call(this) || this;

    _this.className = "ChordDiagramDataItem";

    _this.applyTheme();

    return _this;
  }

  return ChordDiagramDataItem;
}(_FlowDiagram__WEBPACK_IMPORTED_MODULE_0__.FlowDiagramDataItem);


/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Creates a Chord Diagram chart.
 *
 * @see {@link IChordDiagramEvents} for a list of available Events
 * @see {@link IChordDiagramAdapters} for a list of available Adapters
 * @see {@link https://www.amcharts.com/docs/v4/chart-types/chord-diagram/} for documentation
 * @important
 */

var ChordDiagram =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_10__.__extends)(ChordDiagram, _super);
  /**
   * Constructor
   */


  function ChordDiagram() {
    var _this = // Init
    _super.call(this) || this;
    /**
     * [valueAngle description]
     *
     * @ignore Exclude from docs
     * @todo Description
     */


    _this.valueAngle = 0;
    _this.className = "ChordDiagram";
    _this.startAngle = -90;
    _this.endAngle = 270;
    _this.radius = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_1__.percent)(80);
    _this.innerRadius = -15;
    _this.nodePadding = 5;

    var chordContainer = _this.chartContainer.createChild(_core_Container__WEBPACK_IMPORTED_MODULE_2__.Container);

    chordContainer.align = "center";
    chordContainer.valign = "middle";
    chordContainer.shouldClone = false;
    chordContainer.layout = "absolute";
    _this.chordContainer = chordContainer;
    _this.nodesContainer.parent = chordContainer;
    _this.linksContainer.parent = chordContainer;

    _this.chartContainer.events.on("maxsizechanged", _this.invalidate, _this, false); // Apply theme


    _this.applyTheme();

    return _this;
  }
  /**
   * Redraws the chart.
   *
   * @ignore Exclude from docs
   */


  ChordDiagram.prototype.validate = function () {
    var _this = this;

    var chartContainer = this.chartContainer;
    var endAngle = this.endAngle;
    var startAngle = this.startAngle + this.nodePadding / 2;
    var rect = _core_utils_Math__WEBPACK_IMPORTED_MODULE_7__.getArcRect(this.startAngle, this.endAngle, 1);
    var innerRect = {
      x: 0,
      y: 0,
      width: 0,
      height: 0
    };
    rect = _core_utils_Math__WEBPACK_IMPORTED_MODULE_7__.getCommonRectangle([rect, innerRect]);
    var maxRadius = Math.min(chartContainer.innerWidth / rect.width, chartContainer.innerHeight / rect.height);

    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.isNumber(maxRadius)) {
      maxRadius = 0;
    }

    var radius = _core_utils_Utils__WEBPACK_IMPORTED_MODULE_9__.relativeRadiusToValue(this.radius, maxRadius);
    var pixelInnerRadius = _core_utils_Utils__WEBPACK_IMPORTED_MODULE_9__.relativeRadiusToValue(this.innerRadius, radius, true);
    var total = this.dataItem.values.value.sum;
    var count = 0;
    var newTotal = 0;
    _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_6__.each(this._sorted, function (strNode) {
      var node = strNode[1];

      _this.getNodeValue(node);

      count++;
      var value = node.total;

      if (node.total / total < _this.minNodeSize) {
        value = total * _this.minNodeSize;
      }

      newTotal += value;
    });
    this.valueAngle = (endAngle - this.startAngle - this.nodePadding * count) / newTotal;
    _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_6__.each(this._sorted, function (strNode) {
      var node = strNode[1];
      var slice = node.slice;
      slice.radius = radius;
      slice.innerRadius = pixelInnerRadius;
      var value = node.total;

      if (node.total / total < _this.minNodeSize) {
        value = total * _this.minNodeSize;
      }

      node.adjustedTotal = value;
      var arc;

      if (_this.nonRibbon) {
        arc = (endAngle - _this.startAngle) / count - _this.nodePadding;
      } else {
        arc = _this.valueAngle * value;
      }

      slice.arc = arc;
      slice.startAngle = startAngle;
      node.trueStartAngle = startAngle;
      node.parent = _this.nodesContainer;
      node.validate(); // otherwise flickers - nodes are already created, but not yet positioned etc.

      startAngle += arc + _this.nodePadding;
    });
    this.chordContainer.definedBBox = {
      x: radius * rect.x,
      y: radius * rect.y,
      width: radius * rect.width,
      height: radius * rect.height
    };
    this.chordContainer.invalidateLayout();

    _super.prototype.validate.call(this);
  };
  /**
   * Sets defaults that instantiate some objects that rely on parent, so they
   * cannot be set in constructor.
   */


  ChordDiagram.prototype.applyInternalDefaults = function () {
    _super.prototype.applyInternalDefaults.call(this); // Add a default screen reader title for accessibility
    // This will be overridden in screen reader if there are any `titles` set


    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.hasValue(this.readerTitle)) {
      this.readerTitle = this.language.translate("Chord diagram");
    }
  };
  /**
   * Creates and returns a new data item.
   *
   * @return Data item
   */


  ChordDiagram.prototype.createDataItem = function () {
    return new ChordDiagramDataItem();
  };

  Object.defineProperty(ChordDiagram.prototype, "startAngle", {
    /**
     * @return Start angle (degrees)
     */
    get: function get() {
      return this.getPropertyValue("startAngle");
    },

    /**
     * Starting angle of the Radar face. (degrees)
     *
     * Normally, a circular radar face begins (the radial axis is drawn) at the
     * top center. (at -90 degrees)
     *
     * You can use `startAngle` to change this setting.
     *
     * E.g. setting this to 0 will make the radial axis start horizontally to
     * the right, as opposed to vertical.
     *
     * For a perfect circle the absolute sum of `startAngle` and `endAngle`
     * needs to be 360.
     *
     * However, it's **not** necessary to do so. You can set those to lesser
     * numbers, to create semi-circles.
     *
     * E.g. `startAngle = -90` with `endAngle = 0` will create a radar face that
     * looks like a quarter of a circle.
     *
     * @default -90
     * @param value  Start angle (degrees)
     */
    set: function set(value) {
      this.setPropertyValue("startAngle", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(ChordDiagram.prototype, "endAngle", {
    /**
     * @return End angle (degrees)
     */
    get: function get() {
      return this.getPropertyValue("endAngle");
    },

    /**
     * Starting angle of the Radar face. (degrees)
     *
     * Normally, a circular radar face ends (the radial axis is drawn) exactly
     * where it has started, forming a full 360 circle. (at 270 degrees)
     *
     * You can use `endAngle` to end the circle somewhere else.
     *
     * E.g. setting this to 180 will make the radar face end at horizontal line
     * to the left off the center.
     *
     * For a perfect circle the absolute sum of `startAngle` and `endAngle`
     * needs to be 360.
     *
     * However, it's **not** necessary to do so. You can set those to lesser
     * numbers, to create semi-circles.
     *
     * E.g. `startAngle = -90` with `endAngle = 0` will create a radar face that
     * looks like a quarter of a circle.
     *
     * @default -90
     * @param value  End angle (degrees)
     */
    set: function set(value) {
      this.setPropertyValue("endAngle", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(ChordDiagram.prototype, "radius", {
    /**
     * @return Outer radius
     */
    get: function get() {
      return this.getPropertyValue("radius");
    },

    /**
     * Outer radius of the Radar face.
     *
     * This can either be in absolute pixel value, or relative [[Percent]].
     *
     * @param value  Outer radius
     */
    set: function set(value) {
      this.setPercentProperty("radius", value, true, false, 10, false);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(ChordDiagram.prototype, "innerRadius", {
    /**
     * @return Inner radius
     */
    get: function get() {
      return this.getPropertyValue("innerRadius");
    },

    /**
     * Inner radius of the Chord nodes.
     *
     * This can either be in absolute pixel value, or relative [[Percent]].
     *
     * @param value  Outer radius
     */
    set: function set(value) {
      this.setPercentProperty("innerRadius", value, true, false, 10, false);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(ChordDiagram.prototype, "nonRibbon", {
    /**
     * @return Non-ribbon
     */
    get: function get() {
      return this.getPropertyValue("nonRibbon");
    },

    /**
     *
     * If you set this to true, all the lines will be of the same width. This is done by making middleLine of a ChordLink visible.
     *
     * @param value
     */
    set: function set(value) {
      this.setPropertyValue("nonRibbon", value, true);
      this.links.template.middleLine.strokeOpacity = 1;
      this.links.template.link.fillOpacity = 0;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * @ignore
   */

  ChordDiagram.prototype.createNode = function () {
    var node = new _elements_ChordNode__WEBPACK_IMPORTED_MODULE_4__.ChordNode();

    this._disposers.push(node);

    return node;
  };
  /**
   * @ignore
   */


  ChordDiagram.prototype.createLink = function () {
    var link = new _elements_ChordLink__WEBPACK_IMPORTED_MODULE_5__.ChordLink();

    this._disposers.push(link);

    return link;
  };

  return ChordDiagram;
}(_FlowDiagram__WEBPACK_IMPORTED_MODULE_0__.FlowDiagram);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_3__.registry.registeredClasses.ChordDiagram = ChordDiagram;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/types/FlowDiagram.js":
/*!********************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/types/FlowDiagram.js ***!
  \********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "FlowDiagram": () => (/* binding */ FlowDiagram),
/* harmony export */   "FlowDiagramDataItem": () => (/* binding */ FlowDiagramDataItem)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Chart__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Chart */ "./node_modules/@amcharts/amcharts4/.internal/charts/Chart.js");
/* harmony import */ var _core_utils_List__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/utils/List */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/List.js");
/* harmony import */ var _core_utils_Dictionary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/utils/Dictionary */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Dictionary.js");
/* harmony import */ var _core_Container__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/Container */ "./node_modules/@amcharts/amcharts4/.internal/core/Container.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _elements_FlowDiagramNode__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../elements/FlowDiagramNode */ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/FlowDiagramNode.js");
/* harmony import */ var _elements_FlowDiagramLink__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../elements/FlowDiagramLink */ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/FlowDiagramLink.js");
/* harmony import */ var _core_rendering_fills_LinearGradientModifier__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../core/rendering/fills/LinearGradientModifier */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/LinearGradientModifier.js");
/* harmony import */ var _core_utils_ColorSet__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../core/utils/ColorSet */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/ColorSet.js");
/* harmony import */ var _core_utils_Color__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../core/utils/Color */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Color.js");
/* harmony import */ var _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../core/utils/Iterator */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Iterator.js");
/* harmony import */ var _core_utils_Type__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../core/utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/* harmony import */ var _core_utils_Number__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../core/utils/Number */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Number.js");
/* harmony import */ var _core_utils_Order__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../core/utils/Order */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Order.js");
/* harmony import */ var _core_utils_Disposer__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../core/utils/Disposer */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Disposer.js");
/**
 * FlowDiagram module.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */
















/**
 * ============================================================================
 * DATA ITEM
 * ============================================================================
 * @hidden
 */
//@todo rearange notes after dragged

/**
 * Defines a [[DataItem]] for [[FlowDiagram]].
 *
 * @see {@link DataItem}
 */

var FlowDiagramDataItem =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_15__.__extends)(FlowDiagramDataItem, _super);
  /**
   * Constructor
   */


  function FlowDiagramDataItem() {
    var _this = _super.call(this) || this;

    _this.className = "FlowDiagramDataItem";
    _this.values.value = {};

    _this.applyTheme();

    return _this;
  }

  Object.defineProperty(FlowDiagramDataItem.prototype, "fromName", {
    /**
     * @return name
     */
    get: function get() {
      return this.properties.fromName;
    },

    /**
     * Source node's name.
     *
     * @param value  Name
     */
    set: function set(value) {
      this.setProperty("fromName", value);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(FlowDiagramDataItem.prototype, "toName", {
    /**
     * @return name
     */
    get: function get() {
      return this.properties.toName;
    },

    /**
     * Destination node's name.
     *
     * @param value  Name
     */
    set: function set(value) {
      this.setProperty("toName", value);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(FlowDiagramDataItem.prototype, "color", {
    /**
     * @return color
     */
    get: function get() {
      return this.properties.color;
    },

    /**
     * Node color
     *
     * @param value  Name
     */
    set: function set(value) {
      this.setProperty("color", (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_9__.toColor)(value));
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(FlowDiagramDataItem.prototype, "value", {
    /**
     * @return Value
     */
    get: function get() {
      return this.values.value.value;
    },

    /**
     * Link's value.
     *
     * @param value  Value
     */
    set: function set(value) {
      this.setValue("value", value);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(FlowDiagramDataItem.prototype, "link", {
    /**
     * A visual element, representing link between the source and target nodes.
     *
     * Link's actual thickness will be determined by `value` of this link and
     * `value` of the source node.
     *
     * @readonly
     * @return Link element
     */
    get: function get() {
      var _this = this;

      if (!this._link) {
        var link_1 = this.component.links.create();
        this._link = link_1;
        this.addSprite(link_1);

        this._disposers.push(new _core_utils_Disposer__WEBPACK_IMPORTED_MODULE_14__.Disposer(function () {
          if (_this.component) {
            _this.component.links.removeValue(link_1);
          }
        }));
      }

      return this._link;
    },
    enumerable: true,
    configurable: true
  });
  return FlowDiagramDataItem;
}(_Chart__WEBPACK_IMPORTED_MODULE_0__.ChartDataItem);


/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Creates a Pie chart
 * @see {@link IFlowDiagramEvents} for a list of available Events
 * @see {@link IFlowDiagramAdapters} for a list of available Adapters
 * @important
 */

var FlowDiagram =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_15__.__extends)(FlowDiagram, _super);
  /**
   * Constructor
   */


  function FlowDiagram() {
    var _this = // Init
    _super.call(this) || this;
    /**
     * A Color Set to use when applying/generating colors for each subsequent
     * node.
     */


    _this.colors = new _core_utils_ColorSet__WEBPACK_IMPORTED_MODULE_8__.ColorSet();
    _this.className = "FlowDiagram";
    _this.nodePadding = 20;
    _this.sortBy = "none";
    _this.sequencedInterpolation = true;
    _this.colors.step = 2;
    _this.minNodeSize = 0.02;

    var linksContainer = _this.chartContainer.createChild(_core_Container__WEBPACK_IMPORTED_MODULE_3__.Container);

    linksContainer.shouldClone = false;
    linksContainer.layout = "none";
    linksContainer.isMeasured = false;
    _this.linksContainer = linksContainer;

    var nodesContainer = _this.chartContainer.createChild(_core_Container__WEBPACK_IMPORTED_MODULE_3__.Container);

    nodesContainer.shouldClone = false;
    nodesContainer.layout = "none";
    nodesContainer.isMeasured = false;
    _this.nodesContainer = nodesContainer; // this data item holds sums, averages, etc

    _this.dataItem = _this.createDataItem();
    _this.dataItem.component = _this; // Apply theme

    _this.applyTheme();

    return _this;
  }

  FlowDiagram.prototype.dispose = function () {
    _super.prototype.dispose.call(this);

    this.dataItem.dispose();
  };
  /**
   * (Re)validates chart's data, effectively causing the chart to redraw.
   *
   * @ignore Exclude from docs
   */


  FlowDiagram.prototype.validateData = function () {
    var _this = this;

    if (this._parseDataFrom == 0) {
      this.nodes.clear();
    }

    this.sortNodes();
    this.colors.reset();

    _super.prototype.validateData.call(this);

    var sum = 0;
    var count = 0;
    var low;
    var high; // build blocks

    _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_10__.each(this.dataItems.iterator(), function (dataItem) {
      var fromName = dataItem.fromName;

      if (fromName) {
        var node = _this.nodes.getKey(fromName);

        if (!node) {
          node = _this.nodes.create(fromName);
          node.name = fromName;
          node.chart = _this;
          node.dataItem = dataItem;
        }

        dataItem.fromNode = node;
        dataItem.fromNode.outgoingDataItems.push(dataItem);
      }

      var toName = dataItem.toName;

      if (toName) {
        var node = _this.nodes.getKey(toName);

        if (!node) {
          node = _this.nodes.create(toName);
          node.name = toName;
          node.chart = _this;
          node.dataItem = dataItem;
        }

        dataItem.toNode = node;
        dataItem.toNode.incomingDataItems.push(dataItem);
      }

      if (!dataItem.fromNode) {
        var strokeModifier = new _core_rendering_fills_LinearGradientModifier__WEBPACK_IMPORTED_MODULE_7__.LinearGradientModifier();
        strokeModifier.opacities = [0, 1];
        dataItem.link.strokeModifier = strokeModifier;
      }

      if (!dataItem.toNode) {
        var fillModifier = new _core_rendering_fills_LinearGradientModifier__WEBPACK_IMPORTED_MODULE_7__.LinearGradientModifier();
        fillModifier.opacities = [1, 0];
        dataItem.link.strokeModifier = fillModifier;
      }

      var value = dataItem.value;

      if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_11__.isNumber(value)) {
        sum += value;
        count++;

        if (low > value || !_core_utils_Type__WEBPACK_IMPORTED_MODULE_11__.isNumber(low)) {
          low = value;
        }

        if (high < value || !_core_utils_Type__WEBPACK_IMPORTED_MODULE_11__.isNumber(high)) {
          high = value;
        }
      }
    });
    var key = "value";
    this.dataItem.setCalculatedValue(key, high, "high");
    this.dataItem.setCalculatedValue(key, low, "low");
    this.dataItem.setCalculatedValue(key, sum, "sum");
    this.dataItem.setCalculatedValue(key, sum / count, "average");
    this.dataItem.setCalculatedValue(key, count, "count");
    _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_10__.each(this.nodes.iterator(), function (strNode) {
      var node = strNode[1];

      if (node.fill instanceof _core_utils_Color__WEBPACK_IMPORTED_MODULE_9__.Color) {
        node.color = node.fill;
      }

      if (node.color == undefined) {
        node.color = _this.colors.next();
      }

      if (node.dataItem.color != undefined) {
        node.color = node.dataItem.color;
      }

      if (!node.dataItem.visible) {
        node.hide(0);
      }

      _this.getNodeValue(node);
    });
    this.sortNodes();
    this.feedLegend();
  };
  /**
   * [handleDataItemWorkingValueChange description]
   *
   * @ignore Exclude from docs
   */


  FlowDiagram.prototype.handleDataItemWorkingValueChange = function (dataItem, name) {
    this.invalidate();
  };
  /**
   * Sorts nodes by either their values or names, based on `sortBy` setting.
   */


  FlowDiagram.prototype.sortNodes = function () {
    if (this.sortBy == "name") {
      this._sorted = this.nodes.sortedIterator();
    } else if (this.sortBy == "value") {
      this._sorted = _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_10__.sort(this.nodes.iterator(), function (x, y) {
        return _core_utils_Order__WEBPACK_IMPORTED_MODULE_13__.reverse(_core_utils_Number__WEBPACK_IMPORTED_MODULE_12__.order(x[1].total, y[1].total));
      });
    } else {
      this._sorted = this.nodes.iterator();
    }
  };
  /**
   * Updates a cummulative value of the node.
   *
   * A node's value is determined by summing values of all of the incoming
   * links or all of the outgoing links, whichever results in bigger number.
   *
   * @param node  Node value
   */


  FlowDiagram.prototype.getNodeValue = function (node) {
    // todo: totalIncomming totalOutgoing, total
    var incomingTotal = 0;
    var outgoingTotal = 0;
    _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_10__.each(node.incomingDataItems.iterator(), function (dataItem) {
      var value = dataItem.getWorkingValue("value");

      if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_11__.isNumber(value)) {
        incomingTotal += value;
      }
    });
    _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_10__.each(node.outgoingDataItems.iterator(), function (dataItem) {
      var value = dataItem.getWorkingValue("value");

      if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_11__.isNumber(value)) {
        outgoingTotal += value;
      }
    });
    node.total = incomingTotal + outgoingTotal;
    node.totalIncoming = incomingTotal;
    node.totalOutgoing = outgoingTotal;
  };

  ;
  /**
   * Changes the sort type of the nodes.
   *
   * This will actually reshuffle nodes using nice animation.
   */

  FlowDiagram.prototype.changeSorting = function () {
    this.sortNodes();
  };
  /**
   * Sets defaults that instantiate some objects that rely on parent, so they
   * cannot be set in constructor.
   */


  FlowDiagram.prototype.applyInternalDefaults = function () {
    _super.prototype.applyInternalDefaults.call(this); // Add a default screen reader title for accessibility
    // This will be overridden in screen reader if there are any `titles` set


    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_11__.hasValue(this.readerTitle)) {
      this.readerTitle = this.language.translate("Flow diagram");
    }
  };
  /**
   * Creates and returns a new data item.
   *
   * @return Data item
   */


  FlowDiagram.prototype.createDataItem = function () {
    return new FlowDiagramDataItem();
  };

  Object.defineProperty(FlowDiagram.prototype, "nodePadding", {
    /**
     * @return Padding (px)
     */
    get: function get() {
      return this.getPropertyValue("nodePadding");
    },

    /**
     * Padding for node square in pixels.
     *
     * Padding will add extra space around node's name label.
     *
     * @param value Padding (px)
     */
    set: function set(value) {
      this.setPropertyValue("nodePadding", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(FlowDiagram.prototype, "sortBy", {
    /**
     * @returns Node sorting
     */
    get: function get() {
      return this.getPropertyValue("sortBy");
    },

    /**
     * Sort nodes by "name" or "value" or do not sort at all. If not sorted, nodes will appear in the same order as they are in the data.
     * @default "none"
     * @param value  Node sorting
     */
    set: function set(value) {
      this.setPropertyValue("sortBy", value);
      this.changeSorting();
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(FlowDiagram.prototype, "minNodeSize", {
    /**
     * @returns min node size
     */
    get: function get() {
      return this.getPropertyValue("minNodeSize");
    },

    /**
     * Sometimes nodes can get very small if their value is little. With this setting you
     * can set min size of a node (this is relative value from the total size of all nodes)
     * @default 0.02
     * @param value  Node sorting
     */
    set: function set(value) {
      this.setPropertyValue("minNodeSize", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(FlowDiagram.prototype, "nodes", {
    /**
     * A list of chart's nodes.
     *
     * @param {DictionaryTemplate<string, this["_node"]>}
     */
    get: function get() {
      if (!this._nodes) {
        var template = this.createNode();
        template.events.on("hit", function (event) {
          event.target.handleHit(event);
        });
        this._nodes = new _core_utils_Dictionary__WEBPACK_IMPORTED_MODULE_2__.DictionaryTemplate(template);

        this._disposers.push(new _core_utils_Dictionary__WEBPACK_IMPORTED_MODULE_2__.DictionaryDisposer(this._nodes));
      }

      return this._nodes;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * @ignore
   */

  FlowDiagram.prototype.createNode = function () {
    var node = new _elements_FlowDiagramNode__WEBPACK_IMPORTED_MODULE_5__.FlowDiagramNode();

    this._disposers.push(node);

    return node;
  };

  Object.defineProperty(FlowDiagram.prototype, "links", {
    /**
     * A list of chart's links.
     *
     * @param {ListTemplate<this["_link"]>}
     */
    get: function get() {
      if (!this._links) {
        this._links = new _core_utils_List__WEBPACK_IMPORTED_MODULE_1__.ListTemplate(this.createLink());

        this._disposers.push(new _core_utils_List__WEBPACK_IMPORTED_MODULE_1__.ListDisposer(this._links));
      }

      return this._links;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * @ignore
   */

  FlowDiagram.prototype.createLink = function () {
    var link = new _elements_FlowDiagramLink__WEBPACK_IMPORTED_MODULE_6__.FlowDiagramLink();

    this._disposers.push(link);

    return link;
  };
  /**
   * Setups the legend to use the chart's data.
   * @ignore
   */


  FlowDiagram.prototype.feedLegend = function () {
    var legend = this.legend;

    if (legend) {
      var legendData_1 = [];
      this.nodes.each(function (key, node) {
        legendData_1.push(node);
      });
      legend.data = legendData_1;
      legend.dataFields.name = "name";
    }
  };
  /**
   * @ignore
   */


  FlowDiagram.prototype.disposeData = function () {
    _super.prototype.disposeData.call(this);

    this.nodes.clear();
  };

  return FlowDiagram;
}(_Chart__WEBPACK_IMPORTED_MODULE_0__.Chart);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_4__.registry.registeredClasses.FlowDiagram = FlowDiagram;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/types/GaugeChart.js":
/*!*******************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/types/GaugeChart.js ***!
  \*******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "GaugeChart": () => (/* binding */ GaugeChart),
/* harmony export */   "GaugeChartDataItem": () => (/* binding */ GaugeChartDataItem)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _RadarChart__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./RadarChart */ "./node_modules/@amcharts/amcharts4/.internal/charts/types/RadarChart.js");
/* harmony import */ var _core_utils_List__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/utils/List */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/List.js");
/* harmony import */ var _elements_ClockHand__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../elements/ClockHand */ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/ClockHand.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_utils_Type__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../core/utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/**
 * Module for building Gauge charts.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */






/**
 * ============================================================================
 * DATA ITEM
 * ============================================================================
 * @hidden
 */

/**
 * Defines a [[DataItem]] for [[GaugeChart]].
 *
 * @see {@link DataItem}
 */

var GaugeChartDataItem =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__extends)(GaugeChartDataItem, _super);
  /**
   * Constructor
   */


  function GaugeChartDataItem() {
    var _this = _super.call(this) || this;

    _this.className = "GaugeChartDataItem";

    _this.applyTheme();

    return _this;
  }

  return GaugeChartDataItem;
}(_RadarChart__WEBPACK_IMPORTED_MODULE_0__.RadarChartDataItem);


/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Creates a Gauge chart.
 *
 * @see {@link IGaugeChartEvents} for a list of available Events
 * @see {@link IGaugeChartAdapters} for a list of available Adapters
 * @see {@link https://www.amcharts.com/docs/v4/chart-types/gauge-chart/} for documentation
 * @important
 */

var GaugeChart =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__extends)(GaugeChart, _super);
  /**
   * Constructor
   */


  function GaugeChart() {
    var _this = // Init
    _super.call(this) || this;

    _this.className = "GaugeChart";
    _this.startAngle = 180;
    _this.endAngle = 360;
    _this.hands = new _core_utils_List__WEBPACK_IMPORTED_MODULE_1__.ListTemplate(new _elements_ClockHand__WEBPACK_IMPORTED_MODULE_2__.ClockHand());

    _this.hands.events.on("inserted", _this.processHand, _this, false);

    _this._disposers.push(new _core_utils_List__WEBPACK_IMPORTED_MODULE_1__.ListDisposer(_this.hands));

    _this._disposers.push(_this.hands.template); // Apply theme


    _this.applyTheme();

    return _this;
  }
  /**
   * Sets defaults that instantiate some objects that rely on parent, so they
   * cannot be set in constructor.
   */


  GaugeChart.prototype.applyInternalDefaults = function () {
    _super.prototype.applyInternalDefaults.call(this); // Add a default screen reader title for accessibility
    // This will be overridden in screen reader if there are any `titles` set


    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_4__.hasValue(this.readerTitle)) {
      this.readerTitle = this.language.translate("Gauge chart");
    }
  };
  /**
   * Decorates a [[ClockHand]] when it is added to the chart.
   *
   * @param event  Event
   */


  GaugeChart.prototype.processHand = function (event) {
    var hand = event.newValue;

    if (!hand.axis) {
      hand.axis = this.xAxes.getIndex(0);
    }
  };
  /**
   * This function is used to sort element's JSON config properties, so that
   * some properties that absolutely need to be processed last, can be put at
   * the end.
   *
   * @ignore Exclude from docs
   * @param a  Element 1
   * @param b  Element 2
   * @return Sorting number
   */


  GaugeChart.prototype.configOrder = function (a, b) {
    if (a == b) {
      return 0;
    } // Must come last
    else if (a == "hands") {
      return 1;
    } else if (b == "hands") {
      return -1;
    } else {
      return _super.prototype.configOrder.call(this, a, b);
    }
  };

  return GaugeChart;
}(_RadarChart__WEBPACK_IMPORTED_MODULE_0__.RadarChart);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_3__.registry.registeredClasses.GaugeChart = GaugeChart;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/types/PercentChart.js":
/*!*********************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/types/PercentChart.js ***!
  \*********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "PercentChart": () => (/* binding */ PercentChart),
/* harmony export */   "PercentChartDataItem": () => (/* binding */ PercentChartDataItem)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _SerialChart__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./SerialChart */ "./node_modules/@amcharts/amcharts4/.internal/charts/types/SerialChart.js");
/* harmony import */ var _series_PercentSeries__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../series/PercentSeries */ "./node_modules/@amcharts/amcharts4/.internal/charts/series/PercentSeries.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/utils/Iterator */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Iterator.js");
/**
 * Percent chart module.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */





/**
 * ============================================================================
 * DATA ITEM
 * ============================================================================
 * @hidden
 */

/**
 * Defines a [[DataItem]] for [[PercentChart]].
 *
 * @see {@link DataItem}
 */

var PercentChartDataItem =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_4__.__extends)(PercentChartDataItem, _super);
  /**
   * Constructor
   */


  function PercentChartDataItem() {
    var _this = _super.call(this) || this;

    _this.className = "PercentChartDataItem";

    _this.applyTheme();

    return _this;
  }

  return PercentChartDataItem;
}(_SerialChart__WEBPACK_IMPORTED_MODULE_0__.SerialChartDataItem);


/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * This is a base class for "percent-based" chart types like Pie and Funnel.
 *
 * @see {@link IPercentChartEvents} for a list of available Events
 * @see {@link IPercentChartAdapters} for a list of available Adapters
 * @see {@link https://www.amcharts.com/docs/v4/chart-types/pie-chart/} for Pie chart documentation
 * @see {@link https://www.amcharts.com/docs/v4/chart-types/sliced-chart/} for Sliced chart documentation
 */

var PercentChart =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_4__.__extends)(PercentChart, _super);
  /**
   * Constructor
   */


  function PercentChart() {
    var _this = // Init
    _super.call(this) || this;

    _this.className = "PercentChart";
    _this.align = "none";
    _this.valign = "none"; // so that the chart is always drawn, even the legend wants all the space

    _this.chartContainer.minHeight = 50;
    _this.chartContainer.minWidth = 50; // Apply theme

    _this.applyTheme();

    return _this;
  }
  /**
   * (Re)validates chart data.
   *
   * @ignore Exclude from docs
   */


  PercentChart.prototype.validateData = function () {
    _super.prototype.validateData.call(this);

    this.feedLegend();
  };
  /**
   * Setups the legend to use the chart's data.
   * @ignore
   */


  PercentChart.prototype.feedLegend = function () {
    var legend = this.legend;

    if (legend) {
      var legendData_1 = [];
      _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_3__.each(this.series.iterator(), function (series) {
        if (!series.hiddenInLegend) {
          _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_3__.each(series.dataItems.iterator(), function (dataItem) {
            if (!dataItem.hiddenInLegend) {
              legendData_1.push(dataItem);

              if (!dataItem.legendSettings) {
                dataItem.legendSettings = series.legendSettings;
              }
            }
          });
        }
      });
      legend.data = legendData_1;
      legend.dataFields.name = "category";
    }
  };
  /**
   * Creates a new [[PercentSeries]].
   *
   * @return New series
   */


  PercentChart.prototype.createSeries = function () {
    return new _series_PercentSeries__WEBPACK_IMPORTED_MODULE_1__.PercentSeries();
  };
  /**
   * @ignore
   */


  PercentChart.prototype.setLegend = function (legend) {
    _super.prototype.setLegend.call(this, legend);

    if (legend) {
      legend.labels.template.text = "{category}";
      legend.valueLabels.template.text = "{value.percent.formatNumber('#.0p')}";
      legend.itemContainers.template.events.on("over", function (event) {
        var percentSeriesDataItem = event.target.dataItem.dataContext;

        if (percentSeriesDataItem.visible && !percentSeriesDataItem.isHiding) {
          var slice = percentSeriesDataItem.slice;
          slice.dispatchImmediately("over");
          slice.isHover = true;
          slice.interactions.isRealHover = true;
        }
      });
      legend.itemContainers.template.events.on("out", function (event) {
        var percentSeriesDataItem = event.target.dataItem.dataContext;
        var slice = percentSeriesDataItem.slice;
        slice.dispatchImmediately("out");
        slice.isHover = false;
      });
    }
  };

  return PercentChart;
}(_SerialChart__WEBPACK_IMPORTED_MODULE_0__.SerialChart);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @hidden
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_2__.registry.registeredClasses.PercentChart = PercentChart;
_core_Registry__WEBPACK_IMPORTED_MODULE_2__.registry.registeredClasses.PercentChartDataItem = PercentChartDataItem;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/types/PieChart.js":
/*!*****************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/types/PieChart.js ***!
  \*****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "PieChart": () => (/* binding */ PieChart),
/* harmony export */   "PieChartDataItem": () => (/* binding */ PieChartDataItem)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _PercentChart__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./PercentChart */ "./node_modules/@amcharts/amcharts4/.internal/charts/types/PercentChart.js");
/* harmony import */ var _core_utils_Percent__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/utils/Percent */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Percent.js");
/* harmony import */ var _series_PieSeries__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../series/PieSeries */ "./node_modules/@amcharts/amcharts4/.internal/charts/series/PieSeries.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../core/utils/Iterator */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Iterator.js");
/* harmony import */ var _core_utils_Utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../core/utils/Utils */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Utils.js");
/* harmony import */ var _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../core/utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
/* harmony import */ var _core_utils_Type__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../core/utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/**
 * Pie chart module.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */









/**
 * ============================================================================
 * DATA ITEM
 * ============================================================================
 * @hidden
 */

/**
 * Defines a [[DataItem]] for [[PieChart]].
 *
 * @see {@link DataItem}
 */

var PieChartDataItem =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_8__.__extends)(PieChartDataItem, _super);
  /**
   * Constructor
   */


  function PieChartDataItem() {
    var _this = _super.call(this) || this;

    _this.className = "PieChartDataItem";

    _this.applyTheme();

    return _this;
  }

  return PieChartDataItem;
}(_PercentChart__WEBPACK_IMPORTED_MODULE_0__.PercentChartDataItem);


/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Creates a Pie chart.
 *
 * ```TypeScript
 * // Includes
 * import * as am4core from "@amcharts/amcharts4/core";
 * import * as am4charts from "@amcharts/amcharts4/charts";
 *
 * // Create chart
 * let chart = am4core.create("chartdiv", am4charts.PieChart);
 *
 * // Set data
 * chart.data = [{
 * 	"country": "Lithuania",
 * 	"litres": 501.9
 * }, {
 * 	"country": "Czechia",
 * 	"litres": 301.9
 * }, {
 * 	"country": "Ireland",
 * 	"litres": 201.1
 * }];
 *
 * // Create series
 * let series = chart.series.push(new am4charts.PieSeries());
 * series.dataFields.value = "litres";
 * series.dataFields.category = "country";
 * ```
 * ```JavaScript
 * // Create chart
 * var chart = am4core.create("chartdiv", am4charts.PieChart);
 *
 * // The following would work as well:
 * // var chart = am4core.create("chartdiv", "PieChart");
 *
 * // Set data
 * chart.data = [{
 * 	"country": "Lithuania",
 * 	"litres": 501.9
 * }, {
 * 	"country": "Czechia",
 * 	"litres": 301.9
 * }, {
 * 	"country": "Ireland",
 * 	"litres": 201.1
 * }];
 *
 * // Create series
 * var series = chart.series.push(new am4charts.PieSeries());
 * series.dataFields.value = "litres";
 * series.dataFields.category = "country";
 * ```
 * ```JSON
 * var chart = am4core.createFromConfig({
 *
 * 	// Series
 * 	"series": [{
 * 		"type": "PieSeries",
 * 		"dataFields": {
 * 			"value": "litres",
 * 			"category": "country"
 * 		}
 * 	}],
 *
 * 	// Data
 * 	"data": [{
 * 		"country": "Lithuania",
 * 		"litres": 501.9
 * 	}, {
 * 		"country": "Czechia",
 * 		"litres": 301.9
 * 	}, {
 * 		"country": "Ireland",
 * 		"litres": 201.1
 * 	}]
 *
 * }, "chartdiv", "PieChart");
 * ```
 *
 * @see {@link IPieChartEvents} for a list of available Events
 * @see {@link IPieChartAdapters} for a list of available Adapters
 * @see {@link https://www.amcharts.com/docs/v4/chart-types/pie-chart/} for documentation
 * @important
 */

var PieChart =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_8__.__extends)(PieChart, _super);
  /**
   * Constructor
   */


  function PieChart() {
    var _this = // Init
    _super.call(this) || this;

    _this.className = "PieChart"; // Set defaults

    _this.innerRadius = 0;
    _this.radius = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_1__.percent)(80);
    _this.align = "none";
    _this.valign = "none";
    _this.startAngle = -90;
    _this.endAngle = 270;
    var seriesContainer = _this.seriesContainer;
    seriesContainer.isMeasured = true;
    seriesContainer.valign = "middle";
    seriesContainer.align = "center";
    seriesContainer.layout = "absolute";
    seriesContainer.width = undefined;
    seriesContainer.height = undefined; // so that the pie is always drawn, even the legend wants all the space

    _this.chartContainer.minHeight = 50;
    _this.chartContainer.minWidth = 50;

    _this.chartContainer.events.on("maxsizechanged", _this.updateRadius, _this, false); // need this for the chart to change radius if legend is removed/disabled
    // Apply theme


    _this.applyTheme();

    return _this;
  }
  /**
   * Sets defaults that instantiate some objects that rely on parent, so they
   * cannot be set in constructor.
   */


  PieChart.prototype.applyInternalDefaults = function () {
    _super.prototype.applyInternalDefaults.call(this); // Add a default screen reader title for accessibility
    // This will be overridden in screen reader if there are any `titles` set


    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_7__.hasValue(this.readerTitle)) {
      this.readerTitle = this.language.translate("Pie chart");
    }
  };
  /**
   * (Re)validates the chart, causing it to redraw.
   *
   * @ignore Exclude from docs
   */


  PieChart.prototype.validateLayout = function () {
    _super.prototype.validateLayout.call(this);

    this.updateRadius();
  };
  /**
   * Decorates a new [[Series]] object with required parameters when it is
   * added to the chart.
   *
   * @ignore Exclude from docs
   * @param event  Event
   */


  PieChart.prototype.handleSeriesAdded = function (event) {
    _super.prototype.handleSeriesAdded.call(this, event);

    this._chartPixelRadius = undefined;
    this.updateSeriesAngles();
  };

  PieChart.prototype.updateSeriesAngles = function () {
    var _this = this;

    this.series.each(function (series) {
      series._startAngleInternal = _this.startAngle;
      series._endAngleInternal = _this.endAngle; //series.defaultState.properties.startAngle = this.startAngle;
      //series.defaultState.properties.endAngle = this.endAngle;
    });
  };
  /**
   * Recalculates pie's radius, based on a number of criteria.
   *
   * @ignore Exclude from docs
   */


  PieChart.prototype.updateRadius = function () {
    var chartCont = this.chartContainer;
    var rect = _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.getArcRect(this.startAngle, this.endAngle, 1);
    var innerRect = {
      x: 0,
      y: 0,
      width: 0,
      height: 0
    };
    var innerRadius = this.innerRadius;

    if (innerRadius instanceof _core_utils_Percent__WEBPACK_IMPORTED_MODULE_1__.Percent) {
      innerRect = _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.getArcRect(this.startAngle, this.endAngle, innerRadius.value);
    } // @todo handle this when innerRadius set in pixels (do it for radar also)


    rect = _core_utils_Math__WEBPACK_IMPORTED_MODULE_6__.getCommonRectangle([rect, innerRect]);
    var maxRadius = Math.min(chartCont.innerWidth / rect.width, chartCont.innerHeight / rect.height);

    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_7__.isNumber(maxRadius)) {
      maxRadius = 0;
    }

    var chartRadius = _core_utils_Utils__WEBPACK_IMPORTED_MODULE_5__.relativeRadiusToValue(this.radius, maxRadius);
    var chartPixelInnerRadius = _core_utils_Utils__WEBPACK_IMPORTED_MODULE_5__.relativeRadiusToValue(this.innerRadius, maxRadius);
    var seriesRadius = (chartRadius - chartPixelInnerRadius) / this.series.length;

    if (chartRadius != this._chartPixelRadius || chartPixelInnerRadius != this._chartPixelInnerRadius) {
      this._chartPixelRadius = chartRadius;
      this._chartPixelInnerRadius = chartPixelInnerRadius; //@todo: make it possible to set series radius in percent

      _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_4__.each(_core_utils_Iterator__WEBPACK_IMPORTED_MODULE_4__.indexed(this.series.iterator()), function (a) {
        var i = a[0];
        var series = a[1];
        var radius = chartPixelInnerRadius + _core_utils_Utils__WEBPACK_IMPORTED_MODULE_5__.relativeRadiusToValue(series.radius, chartRadius - chartPixelInnerRadius);
        var innerRadius = chartPixelInnerRadius + _core_utils_Utils__WEBPACK_IMPORTED_MODULE_5__.relativeRadiusToValue(series.innerRadius, chartRadius - chartPixelInnerRadius);

        if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_7__.isNumber(radius)) {
          radius = chartPixelInnerRadius + seriesRadius * (i + 1);
        }

        if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_7__.isNumber(innerRadius)) {
          innerRadius = chartPixelInnerRadius + seriesRadius * i;
        }

        series.pixelRadius = radius;
        series.pixelInnerRadius = innerRadius;
      });
      this.seriesContainer.definedBBox = {
        x: chartRadius * rect.x,
        y: chartRadius * rect.y,
        width: chartRadius * rect.width,
        height: chartRadius * rect.height
      };
      this.seriesContainer.invalidateLayout();
      this.bulletsContainer.x = this.seriesContainer.x;
      this.bulletsContainer.y = this.seriesContainer.y;
    }
  };

  Object.defineProperty(PieChart.prototype, "radius", {
    /**
     * @return Radius (px or relative)
     */
    get: function get() {
      return this.getPropertyValue("radius");
    },

    /**
     * Sets radius of the pie chart.
     *
     * Setting to a number will mean a fixed pixel radius.
     *
     * Setting to an instance of [[Percent]] will mean a relative radius to
     * available space.
     *
     * E.g.:
     *
     * ```TypeScript
     * // Set pie chart to be at 50% of the available space
     * pieChart.radius = am4core.percent(50);
     * ```
     * ```JavaScript
     * // Set pie chart to be at 50% of the available space
     * pieChart.radius = am4core.percent(50);
     * ```
     * ```JSON
     * {
     *   // Set pie chart to be at 50% of the available space
     *   "radius": "50%"
     * }
     * ```
     *
     * @default 80%
     * @param value  Radius (px or relative)
     */
    set: function set(value) {
      if (this.setPercentProperty("radius", value, true, false, 10, false)) {
        this.invalidateLayout();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(PieChart.prototype, "innerRadius", {
    /**
     * @return Relative inner radius (0-1)
     */
    get: function get() {
      return this.getPropertyValue("innerRadius");
    },

    /**
     * Sets relative inner radius (to create a donut chart).
     *
     * Setting to a number will mean a fixed pixel radius.
     *
     * Setting to an instance of [[Percent]] will mean a relative radius to
     * available space.
     *
     * NOTE: it's not related to `radius`.
     *
     * E.g.:
     *
     * ```TypeScript
     * // Set pie chart to be at 50% of the available space
     * pieChart.innerRadius = am4core.percent(50);
     * ```
     * ```JavaScript
     * // Set pie chart to be at 50% of the available space
     * pieChart.innerRadius = am4core.percent(50);
     * ```
     * ```JSON
     * {
     *   // Set pie chart to be at 50% of the available space
     *   "innerRadius": "50%"
     * }
     * ```
     *
     * @default 0
     * @param value  Relative inner radius (0-1)
     * @todo Setting things like `innerRadius` modifies `slice.radius` and it then looks like it is not the same value as in default state
     */
    set: function set(value) {
      this.setPercentProperty("innerRadius", value, true, false, 10, false);
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Creates a new [[PieSeries]].
   *
   * @return New series
   */

  PieChart.prototype.createSeries = function () {
    return new _series_PieSeries__WEBPACK_IMPORTED_MODULE_2__.PieSeries();
  };

  Object.defineProperty(PieChart.prototype, "startAngle", {
    /**
     * @return Start angle (degrees)
     */
    get: function get() {
      return this.getPropertyValue("startAngle");
    },

    /**
     * Starting angle of the Pie circle. (degrees)
     *
     * Normally, a pie chart begins (the left side of the first slice is drawn)
     * at the top center. (at -90 degrees)
     *
     * You can use `startAngle` to change this setting.
     *
     * E.g. setting this to 0 will make the first slice be drawn to the right.
     *
     * For a perfect circle the absolute sum of `startAngle` and `endAngle`
     * needs to be 360.
     *
     * However, it's **not** necessary to do so. You can set to those lesser
     * numbers, to create semi-circles.
     *
     * E.g. `startAngle = -90` with `endAngle = 0` will create a Pie chart that
     * looks like a quarter of a circle.
     *
     * NOTE: This setting is not supported in a 3D pie chart.
     *
     * @default -90
     * @param value  Start angle (degrees)
     */
    set: function set(value) {
      if (this.setPropertyValue("startAngle", value)) {
        this.updateRadius();
        this.updateSeriesAngles();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(PieChart.prototype, "endAngle", {
    /**
     * @return End angle (degrees)
     */
    get: function get() {
      return this.getPropertyValue("endAngle");
    },

    /**
     * End angle of the Pie circle. (degrees)
     *
     * Normally, a pie chart ends (the right side of the last slice is drawn)
     * at the top center. (at 270 degrees)
     *
     * You can use `endAngle` to change this setting.
     *
     * For a perfect circle the absolute sum of `startAngle` and `endAngle`
     * needs to be 360.
     *
     * However, it's **not** necessary to do so. You can set to those lesser
     * numbers, to create semi-circles.
     *
     * E.g. `startAngle = -90` with `endAngle = 0` will create a Pie chart that
     * looks like a quarter of a circle.
     *
     * NOTE: This setting is not supported in a 3D pie chart.
     *
     * @default 270
     * @param value  End angle (degrees)
     */
    set: function set(value) {
      if (this.setPropertyValue("endAngle", value)) {
        this.updateRadius();
        this.updateSeriesAngles();
      }
    },
    enumerable: true,
    configurable: true
  });
  return PieChart;
}(_PercentChart__WEBPACK_IMPORTED_MODULE_0__.PercentChart);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_3__.registry.registeredClasses.PieChart = PieChart;
_core_Registry__WEBPACK_IMPORTED_MODULE_3__.registry.registeredClasses.PieChartDataItem = PieChartDataItem;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/types/PieChart3D.js":
/*!*******************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/types/PieChart3D.js ***!
  \*******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "PieChart3D": () => (/* binding */ PieChart3D),
/* harmony export */   "PieChart3DDataItem": () => (/* binding */ PieChart3DDataItem)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _PieChart__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./PieChart */ "./node_modules/@amcharts/amcharts4/.internal/charts/types/PieChart.js");
/* harmony import */ var _series_PieSeries3D__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../series/PieSeries3D */ "./node_modules/@amcharts/amcharts4/.internal/charts/series/PieSeries3D.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_utils_Math__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
/**
 * 3D Pie chart module.
 */

/**
 * ============================================================================
 * Imports
 * ============================================================================
 * @hidden
 */





/**
 * ============================================================================
 * DATA ITEM
 * ============================================================================
 * @hidden
 */

/**
 * Defines a [[DataItem]] for [[PieChart3D]].
 *
 * @see {@link DataItem}
 */

var PieChart3DDataItem =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_4__.__extends)(PieChart3DDataItem, _super);
  /**
   * Constructor
   */


  function PieChart3DDataItem() {
    var _this = _super.call(this) || this;

    _this.className = "PieChart3DDataItem";

    _this.applyTheme();

    return _this;
  }

  return PieChart3DDataItem;
}(_PieChart__WEBPACK_IMPORTED_MODULE_0__.PieChartDataItem);


/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Creates a 3D Pie chart.
 *
 *  * ```TypeScript
 * // Includes
 * import * as am4core from "@amcharts/amcharts4/core";
 * import * as am4charts from "@amcharts/amcharts4/charts";
 *
 * // Create chart
 * let chart = am4core.create("chartdiv", am4charts.Pie3DChart);
 *
 * // Set data
 * chart.data = [{
 * 	"country": "Lithuania",
 * 	"litres": 501.9
 * }, {
 * 	"country": "Czechia",
 * 	"litres": 301.9
 * }, {
 * 	"country": "Ireland",
 * 	"litres": 201.1
 * }];
 *
 * // Create series
 * let series = chart.series.push(new am4charts.Pie3DSeries());
 * series.dataFields.value = "litres";
 * series.dataFields.category = "country";
 * ```
 * ```JavaScript
 * // Create chart
 * var chart = am4core.create("chartdiv", am4charts.Pie3DChart);
 *
 * // The following would work as well:
 * // var chart = am4core.create("chartdiv", "Pie3DChart");
 *
 * // Set data
 * chart.data = [{
 * 	"country": "Lithuania",
 * 	"litres": 501.9
 * }, {
 * 	"country": "Czechia",
 * 	"litres": 301.9
 * }, {
 * 	"country": "Ireland",
 * 	"litres": 201.1
 * }];
 *
 * // Create series
 * var series = chart.series.push(new am4charts.Pie3DSeries());
 * series.dataFields.value = "litres";
 * series.dataFields.category = "country";
 * ```
 * ```JSON
 * var chart = am4core.createFromConfig({
 *
 * 	// Series
 * 	"series": [{
 * 		"type": "Pie3DSeries",
 * 		"dataFields": {
 * 			"value": "litres",
 * 			"category": "country"
 * 		}
 * 	}],
 *
 * 	// Data
 * 	"data": [{
 * 		"country": "Lithuania",
 * 		"litres": 501.9
 * 	}, {
 * 		"country": "Czechia",
 * 		"litres": 301.9
 * 	}, {
 * 		"country": "Ireland",
 * 		"litres": 201.1
 * 	}]
 *
 * }, "chartdiv", "Pie3DChart");
 * ```
 *
 * @see {@link IPieChart3DEvents} for a list of available Events
 * @see {@link IPieChart3DAdapters} for a list of available Adapters
 * @see {@link https://www.amcharts.com/docs/v4/chart-types/pie-chart/} for documentation
 * @important
 */

var PieChart3D =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_4__.__extends)(PieChart3D, _super);
  /**
   * Constructor
   */


  function PieChart3D() {
    var _this = // Init
    _super.call(this) || this;

    _this.className = "PieChart3D";
    _this.depth = 20;
    _this.angle = 10; // Apply theme

    _this.applyTheme();

    return _this;
  }

  Object.defineProperty(PieChart3D.prototype, "depth", {
    /**
     * @return Depth (px)
     */
    get: function get() {
      return this.getPropertyValue("depth");
    },

    /**
     * Depth of the 3D pie in pixels.
     *
     * This will determine "height" of the pie.
     *
     * @default 20
     * @param value  Depth (px)
     */
    set: function set(value) {
      if (this.setPropertyValue("depth", value)) {
        this.invalidateDataUsers();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(PieChart3D.prototype, "angle", {
    /**
     * @return Angle (degrees)
     */
    get: function get() {
      return this.getPropertyValue("angle");
    },

    /**
     * An angle of a "point of view" in degrees. Possible range 0 - 90.
     *
     * @default 10
     * @param value  Angle (degrees)
     */
    set: function set(value) {
      value = _core_utils_Math__WEBPACK_IMPORTED_MODULE_3__.fitToRange(value, 0, 90);

      if (this.setPropertyValue("angle", value)) {
        this.invalidateDataUsers();
      }
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Creates and returns a new Series.
   *
   * @return New series
   */

  PieChart3D.prototype.createSeries = function () {
    return new _series_PieSeries3D__WEBPACK_IMPORTED_MODULE_1__.PieSeries3D();
  };

  return PieChart3D;
}(_PieChart__WEBPACK_IMPORTED_MODULE_0__.PieChart);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_2__.registry.registeredClasses.PieChart3D = PieChart3D;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/types/RadarChart.js":
/*!*******************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/types/RadarChart.js ***!
  \*******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "RadarChart": () => (/* binding */ RadarChart),
/* harmony export */   "RadarChartDataItem": () => (/* binding */ RadarChartDataItem)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _XYChart__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./XYChart */ "./node_modules/@amcharts/amcharts4/.internal/charts/types/XYChart.js");
/* harmony import */ var _core_utils_Percent__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/utils/Percent */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Percent.js");
/* harmony import */ var _series_RadarSeries__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../series/RadarSeries */ "./node_modules/@amcharts/amcharts4/.internal/charts/series/RadarSeries.js");
/* harmony import */ var _core_Container__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/Container */ "./node_modules/@amcharts/amcharts4/.internal/core/Container.js");
/* harmony import */ var _core_elements_Circle__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../core/elements/Circle */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Circle.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _axes_AxisRendererCircular__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../axes/AxisRendererCircular */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisRendererCircular.js");
/* harmony import */ var _axes_AxisRendererRadial__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../axes/AxisRendererRadial */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisRendererRadial.js");
/* harmony import */ var _core_utils_Utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../core/utils/Utils */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Utils.js");
/* harmony import */ var _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../core/utils/Iterator */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Iterator.js");
/* harmony import */ var _core_utils_Type__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../core/utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/* harmony import */ var _core_utils_Math__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../core/utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
/* harmony import */ var _core_rendering_Path__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../core/rendering/Path */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Path.js");
/**
 * Radar chart module.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */














/**
 * ============================================================================
 * DATA ITEM
 * ============================================================================
 * @hidden
 */

/**
 * Defines a [[DataItem]] for [[RadarChart]].
 *
 * @see {@link DataItem}
 */

var RadarChartDataItem =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_13__.__extends)(RadarChartDataItem, _super);
  /**
   * Constructor
   */


  function RadarChartDataItem() {
    var _this = _super.call(this) || this;

    _this.className = "RadarChartDataItem";

    _this.applyTheme();

    return _this;
  }

  return RadarChartDataItem;
}(_XYChart__WEBPACK_IMPORTED_MODULE_0__.XYChartDataItem);


/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Creates a Radar chart.
 *
 * @see {@link IRadarChartEvents} for a list of available Events
 * @see {@link IRadarChartAdapters} for a list of available Adapters
 * @see {@link https://www.amcharts.com/docs/v4/chart-types/radar-chart/} for documentation
 * @important
 */

var RadarChart =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_13__.__extends)(RadarChart, _super);
  /**
   * Constructor
   */


  function RadarChart() {
    var _this = // Init
    _super.call(this) || this;
    /**
     * Defines X axis renderer type.
     */


    _this._axisRendererX = _axes_AxisRendererCircular__WEBPACK_IMPORTED_MODULE_6__.AxisRendererCircular;
    /**
     * Defines Y axis renderer type.
     */

    _this._axisRendererY = _axes_AxisRendererRadial__WEBPACK_IMPORTED_MODULE_7__.AxisRendererRadial;
    /**
     * used by cursor. We adjust innerradius if start and end angle are close to each other
     * @ignore Exclude from docs
     */

    _this.innerRadiusModifyer = 1;
    /**
     * @ignore
     */

    _this.mr = 1;
    _this.className = "RadarChart";
    _this.startAngle = -90;
    _this.endAngle = 270;
    _this.radius = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_1__.percent)(80);
    _this.innerRadius = 0;

    var radarContainer = _this.plotContainer.createChild(_core_Container__WEBPACK_IMPORTED_MODULE_3__.Container);

    radarContainer.shouldClone = false;
    radarContainer.layout = "absolute";
    radarContainer.align = "center";
    radarContainer.valign = "middle";
    _this.seriesContainer.parent = radarContainer;
    _this.radarContainer = radarContainer;
    _this.bulletsContainer.parent = radarContainer;
    _this.axisBulletsContainer = radarContainer;
    _this._cursorContainer = radarContainer;

    _this.chartContainer.events.on("maxsizechanged", _this.invalidate, _this, false); // need this for the chart to change radius if legend is removed/disabled


    _this._bulletMask = radarContainer.createChild(_core_elements_Circle__WEBPACK_IMPORTED_MODULE_4__.Circle);
    _this._bulletMask.shouldClone = false;
    _this._bulletMask.element = _this.paper.add("path");
    _this._bulletMask.opacity = 0; // Apply theme

    _this.applyTheme();

    return _this;
  }
  /**
   * Sets defaults that instantiate some objects that rely on parent, so they
   * cannot be set in constructor.
   */


  RadarChart.prototype.applyInternalDefaults = function () {
    _super.prototype.applyInternalDefaults.call(this); // Add a default screen reader title for accessibility
    // This will be overridden in screen reader if there are any `titles` set


    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_10__.hasValue(this.readerTitle)) {
      this.readerTitle = this.language.translate("Radar chart");
    }
  };
  /**
   * Decorates Axis with required properties for this chart.
   *
   * @param axis  Axis
   */


  RadarChart.prototype.processAxis = function (axis) {
    _super.prototype.processAxis.call(this, axis);

    var renderer = axis.renderer;
    renderer.gridContainer.parent = renderer;
    renderer.breakContainer.parent = renderer;
    axis.parent = this.radarContainer;
    renderer.toBack();
  };
  /**
   * Updates all X axes after range change event.
   */


  RadarChart.prototype.handleXAxisRangeChange = function () {
    _super.prototype.handleXAxisRangeChange.call(this);

    _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_9__.each(this.yAxes.iterator(), function (axis) {
      axis.invalidate();
    });
  };
  /**
   * Updates all Y axes after range change event.
   */


  RadarChart.prototype.handleYAxisRangeChange = function () {
    _super.prototype.handleYAxisRangeChange.call(this);

    _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_9__.each(this.xAxes.iterator(), function (axis) {
      axis.invalidate();
    });
  };
  /**
   * Processes JSON-based config before it is applied to the object.
   *
   * @ignore Exclude from docs
   * @param config  Config
   */


  RadarChart.prototype.processConfig = function (config) {
    if (config) {
      // Set up cursor
      if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_10__.hasValue(config.cursor) && !_core_utils_Type__WEBPACK_IMPORTED_MODULE_10__.hasValue(config.cursor.type)) {
        config.cursor.type = "RadarCursor";
      } // Set up series


      if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_10__.hasValue(config.series) && _core_utils_Type__WEBPACK_IMPORTED_MODULE_10__.isArray(config.series)) {
        for (var i = 0, len = config.series.length; i < len; i++) {
          config.series[i].type = config.series[i].type || "RadarSeries";
        }
      } // Set up axes

      /*if ($type.hasValue(config.xAxes) && $type.isArray(config.xAxes)) {
          for (let i = 0, len = config.xAxes.length; i < len; i++) {
              config.xAxes[i].type = config.xAxes[i].type || "AxisRendererCircular";
          }
      }
      if ($type.hasValue(config.yAxes) && $type.isArray(config.yAxes)) {
          for (let i = 0, len = config.yAxes.length; i < len; i++) {
              config.yAxes[i].type = config.yAxes[i].type || "AxisRendererRadial";
          }
      }*/

    }

    _super.prototype.processConfig.call(this, config);
  };
  /**
   * Does calculations before drawing the chart.
   */


  RadarChart.prototype.beforeDraw = function () {
    _super.prototype.beforeDraw.call(this);

    var plotContainer = this.plotContainer;
    var rect = _core_utils_Math__WEBPACK_IMPORTED_MODULE_11__.getArcRect(this.startAngle, this.endAngle, 1);
    var innerRect = {
      x: 0,
      y: 0,
      width: 0,
      height: 0
    };
    var wr = plotContainer.innerWidth / rect.width;
    var hr = plotContainer.innerHeight / rect.height;
    var innerRadius = this.innerRadius;

    if (innerRadius instanceof _core_utils_Percent__WEBPACK_IMPORTED_MODULE_1__.Percent) {
      var value = innerRadius.value;
      var mr = Math.min(wr, hr);
      this.mr = mr;
      value = Math.max(mr * value, mr - Math.min(plotContainer.innerHeight, plotContainer.innerWidth)) / mr;
      innerRect = _core_utils_Math__WEBPACK_IMPORTED_MODULE_11__.getArcRect(this.startAngle, this.endAngle, value);
      this.innerRadiusModifyer = value / innerRadius.value;
      innerRadius = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_1__.percent)(value * 100);
    } // @todo handle this when innerRadius set in pixels (do it for pie also)


    rect = _core_utils_Math__WEBPACK_IMPORTED_MODULE_11__.getCommonRectangle([rect, innerRect]);
    var maxRadius = Math.min(plotContainer.innerWidth / rect.width, plotContainer.innerHeight / rect.height);
    var diameter = _core_utils_Utils__WEBPACK_IMPORTED_MODULE_8__.relativeRadiusToValue(this.radius, maxRadius) * 2 || 0;
    var radius = diameter / 2;
    var startAngle = this.startAngle;
    var endAngle = this.endAngle;
    this._pixelInnerRadius = _core_utils_Utils__WEBPACK_IMPORTED_MODULE_8__.relativeRadiusToValue(innerRadius, radius);
    this._bulletMask.path = _core_rendering_Path__WEBPACK_IMPORTED_MODULE_12__.arc(startAngle, endAngle - startAngle, radius, this._pixelInnerRadius);
    _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_9__.each(this.xAxes.iterator(), function (axis) {
      if (axis.renderer.useChartAngles) {
        axis.renderer.startAngle = startAngle;
        axis.renderer.endAngle = endAngle;
      }

      axis.width = diameter;
      axis.height = diameter; //axis.renderer.width = diameter;
      //axis.renderer.height = diameter;

      axis.renderer.pixelRadiusReal = radius; //axis.renderer.innerRadius = innerRadius;
    });
    _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_9__.each(this.yAxes.iterator(), function (axis) {
      axis.renderer.startAngle = startAngle;
      axis.renderer.endAngle = endAngle;
      axis.width = diameter;
      axis.height = diameter; //axis.renderer.width = diameter;
      //axis.renderer.height = diameter;

      axis.renderer.pixelRadiusReal = radius; //axis.renderer.innerRadius = innerRadius;
    });
    var cursor = this.cursor;

    if (cursor) {
      cursor.width = diameter;
      cursor.height = diameter;
      cursor.startAngle = startAngle;
      cursor.endAngle = endAngle;
    }

    this.radarContainer.definedBBox = {
      x: radius * rect.x,
      y: radius * rect.y,
      width: radius * rect.width,
      height: radius * rect.height
    };
    this.radarContainer.validatePosition();
  };
  /**
   * Creates and returns a new Series, suitable for RadarChart.
   *
   * @return New Series
   */


  RadarChart.prototype.createSeries = function () {
    return new _series_RadarSeries__WEBPACK_IMPORTED_MODULE_2__.RadarSeries();
  };

  Object.defineProperty(RadarChart.prototype, "startAngle", {
    /**
     * @return Start angle (degrees)
     */
    get: function get() {
      return this.getPropertyValue("startAngle");
    },

    /**
     * Starting angle of the Radar face. (degrees)
     *
     * Normally, a circular radar face begins (the radial axis is drawn) at the
     * top center. (at -90 degrees)
     *
     * You can use `startAngle` to change this setting.
     *
     * E.g. setting this to 0 will make the radial axis start horizontally to
     * the right, as opposed to vertical.
     *
     * For a perfect circle the absolute sum of `startAngle` and `endAngle`
     * needs to be 360.
     *
     * However, it's **not** necessary to do so. You can set those to lesser
     * numbers, to create semi-circles.
     *
     * E.g. `startAngle = -90` with `endAngle = 0` will create a radar face that
     * looks like a quarter of a circle.
     *
     * @default -90
     * @param value  Start angle (degrees)
     */
    set: function set(value) {
      this.setPropertyValue("startAngle", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(RadarChart.prototype, "endAngle", {
    /**
     * @return End angle (degrees)
     */
    get: function get() {
      return this.getPropertyValue("endAngle");
    },

    /**
     * Starting angle of the Radar face. (degrees)
     *
     * Normally, a circular radar face ends (the radial axis is drawn) exactly
     * where it has started, forming a full 360 circle. (at 270 degrees)
     *
     * You can use `endAngle` to end the circle somewhere else.
     *
     * E.g. setting this to 180 will make the radar face end at horizontal line
     * to the left off the center.
     *
     * For a perfect circle the absolute sum of `startAngle` and `endAngle`
     * needs to be 360.
     *
     * However, it's **not** necessary to do so. You can set those to lesser
     * numbers, to create semi-circles.
     *
     * E.g. `startAngle = -90` with `endAngle = 0` will create a radar face that
     * looks like a quarter of a circle.
     *
     * @default -90
     * @param value  End angle (degrees)
     */
    set: function set(value) {
      this.setPropertyValue("endAngle", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(RadarChart.prototype, "radius", {
    /**
     * @return Outer radius
     */
    get: function get() {
      return this.getPropertyValue("radius");
    },

    /**
     * Outer radius of the Radar face.
     *
     * This can either be in absolute pixel value, or relative [[Percent]].
     *
     * @param value  Outer radius
     */
    set: function set(value) {
      this.setPercentProperty("radius", value, true, false, 10, false);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(RadarChart.prototype, "pixelInnerRadius", {
    /**
     * @return Inner radius in pixels
     */
    get: function get() {
      return this._pixelInnerRadius;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(RadarChart.prototype, "innerRadius", {
    /**
     * @return Inner radius
     */
    get: function get() {
      return this.getPropertyValue("innerRadius");
    },

    /**
     * Inner radius of the radar face.
     *
     * This can either be in absolute pixel value, or relative [[Percent]].
     *
     * If set in Percent, it will be relative to `radius`. (outer radius)
     *
     * @param value Inner radius
     */
    set: function set(value) {
      this.setPercentProperty("innerRadius", value, true, false, 10, false);
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Triggers (re)rendering of the horizontal (X) axis.
   *
   * @ignore Exclude from docs
   * @param axis Axis
   */

  RadarChart.prototype.updateXAxis = function (renderer) {
    //do not call super!
    if (renderer) {
      renderer.processRenderer();
    }
  };
  /**
   * Triggers (re)rendering of the vertical (Y) axis.
   *
   * @ignore Exclude from docs
   * @param axis Axis
   */


  RadarChart.prototype.updateYAxis = function (renderer) {
    // do not call super!
    if (renderer) {
      renderer.processRenderer();
    }
  };

  return RadarChart;
}(_XYChart__WEBPACK_IMPORTED_MODULE_0__.XYChart);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_5__.registry.registeredClasses.RadarChart = RadarChart;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/types/SankeyDiagram.js":
/*!**********************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/types/SankeyDiagram.js ***!
  \**********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "SankeyDiagram": () => (/* binding */ SankeyDiagram),
/* harmony export */   "SankeyDiagramDataItem": () => (/* binding */ SankeyDiagramDataItem)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _FlowDiagram__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./FlowDiagram */ "./node_modules/@amcharts/amcharts4/.internal/charts/types/FlowDiagram.js");
/* harmony import */ var _core_utils_Percent__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/utils/Percent */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Percent.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _elements_SankeyNode__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../elements/SankeyNode */ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/SankeyNode.js");
/* harmony import */ var _elements_SankeyLink__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../elements/SankeyLink */ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/SankeyLink.js");
/* harmony import */ var _core_utils_Animation__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../core/utils/Animation */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Animation.js");
/* harmony import */ var _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../core/utils/Iterator */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Iterator.js");
/* harmony import */ var _core_utils_Math__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../core/utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
/* harmony import */ var _core_utils_Type__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../core/utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/* harmony import */ var _core_utils_Object__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../core/utils/Object */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Object.js");
/**
 * Sankey diagram module.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */











/**
 * ============================================================================
 * DATA ITEM
 * ============================================================================
 * @hidden
 */
//@todo rearange notes after dragged

/**
 * Defines a [[DataItem]] for [[SankeyDiagram]].
 *
 * @see {@link DataItem}
 */

var SankeyDiagramDataItem =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_10__.__extends)(SankeyDiagramDataItem, _super);
  /**
   * Constructor
   */


  function SankeyDiagramDataItem() {
    var _this = _super.call(this) || this;

    _this.className = "SankeyDiagramDataItem";

    _this.applyTheme();

    return _this;
  }

  return SankeyDiagramDataItem;
}(_FlowDiagram__WEBPACK_IMPORTED_MODULE_0__.FlowDiagramDataItem);


/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Creates a Sankey Diagram chart.
 *
 * @see {@link ISankeyDiagramEvents} for a list of available Events
 * @see {@link ISankeyDiagramAdapters} for a list of available Adapters
 * @see {@link https://www.amcharts.com/docs/v4/chart-types/sankey-diagram/} for documentation
 * @important
 */

var SankeyDiagram =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_10__.__extends)(SankeyDiagram, _super);
  /**
   * Constructor
   */


  function SankeyDiagram() {
    var _this = // Init
    _super.call(this) || this;

    _this.className = "SankeyDiagram";
    _this.orientation = "horizontal";
    _this.nodeAlign = "middle";
    _this.nodesContainer.width = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_1__.percent)(100);
    _this.nodesContainer.height = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_1__.percent)(100);
    _this.linksContainer.width = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_1__.percent)(100);
    _this.linksContainer.height = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_1__.percent)(100); // Apply theme

    _this.applyTheme();

    return _this;
  }
  /**
   * (Re)validates chart's data, effectively causing the chart to redraw.
   *
   * @ignore Exclude from docs
   */


  SankeyDiagram.prototype.validateData = function () {
    var _this = this;

    this._valueHeight = undefined;

    _super.prototype.validateData.call(this);

    this._levelCount = 0;
    this.nodes.each(function (key, node) {
      node.level = undefined;
    });
    this.nodes.each(function (key, node) {
      node.level = _this.getNodeLevel(node, 0);
      _this._levelCount = _core_utils_Math__WEBPACK_IMPORTED_MODULE_7__.max(_this._levelCount, node.level);
    });
  };
  /**
   * Returns node's highest level.
   *
   * @param node   Node
   * @param level  Current level
   * @return New level
   */


  SankeyDiagram.prototype.getNodeLevel = function (node, level) {
    var _this = this;

    var levels = [level];
    _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_6__.each(node.incomingDataItems.iterator(), function (link) {
      if (link.fromNode) {
        if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.isNumber(link.fromNode.level)) {
          levels.push(link.fromNode.level + 1);
        } else {
          _this._counter = 0;

          _this.checkLoop(link.fromNode);

          if (_this._counter < _this.dataItems.length) {
            levels.push(_this.getNodeLevel(link.fromNode, level + 1));
          }
        }
      }
    });
    return Math.max.apply(Math, (0,tslib__WEBPACK_IMPORTED_MODULE_10__.__spread)(levels));
  };
  /**
   * Checks if there's no loop in the ancestor chain.
   *
   * @param  node  Node
   */


  SankeyDiagram.prototype.checkLoop = function (node) {
    var _this = this;

    this._counter++;

    if (this._counter > this.dataItems.length) {
      return;
    }

    _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_6__.each(node.incomingDataItems.iterator(), function (link) {
      _this.checkLoop(link.fromNode);
    });
  };
  /**
   * Calculates relation between pixel height and total value.
   *
   * In Sankey the actual thickness of links and height of nodes will depend
   * on their values.
   */


  SankeyDiagram.prototype.calculateValueHeight = function () {
    var _this = this; // calculate sums of each level


    this._levelSum = {};
    this._levelNodesCount = {};
    this.maxSum = 0;
    var total = this.dataItem.values.value.sum;
    _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_6__.each(this._sorted, function (strNode) {
      var node = strNode[1];

      _this.getNodeValue(node);
    });
    this.nodes.each(function (key, node) {
      var level = node.level;
      var value = Math.max(node.totalIncoming, node.totalOutgoing);

      if (value / total < _this.minNodeSize) {
        value = total * _this.minNodeSize;
      }

      if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.isNumber(_this._levelSum[level])) {
        _this._levelSum[level] += value;
      } else {
        _this._levelSum[level] = value;
      }

      if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.isNumber(_this._levelNodesCount[level])) {
        _this._levelNodesCount[level]++;
      } else {
        _this._levelNodesCount[level] = 1;
      }
    });
    var availableHeight;

    if (this.orientation == "horizontal") {
      availableHeight = this.chartContainer.maxHeight - 1;
    } else {
      availableHeight = this.chartContainer.maxWidth - 1;
    }

    var maxSumLevel;
    var minHeight;
    _core_utils_Object__WEBPACK_IMPORTED_MODULE_9__.each(this._levelSum, function (key, value) {
      var realValue = value;
      var levelNodeCount = _this._levelNodesCount[key];
      var valueHeight = (availableHeight - (levelNodeCount - 1) * _this.nodePadding) / realValue;

      if (valueHeight == Infinity) {
        valueHeight = 0;
      }

      if (minHeight > valueHeight || !_core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.isNumber(minHeight)) {
        minHeight = valueHeight;
        _this.maxSum = realValue;
        maxSumLevel = _core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.toNumber(key);
      }
    });
    this._maxSumLevel = maxSumLevel;
    var maxSumLevelNodeCount = this._levelNodesCount[this._maxSumLevel];
    var valueHeight = (availableHeight - (maxSumLevelNodeCount - 1) * this.nodePadding) / this.maxSum;

    if (valueHeight == Infinity) {
      valueHeight = 0;
    }

    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.isNumber(this.valueHeight)) {
      this.valueHeight = valueHeight;
    } else {
      var finalHeight = void 0;

      try {
        finalHeight = this._heightAnimation.animationOptions[0].to;
      } catch (err) {} // without animations it will be non-smooth as maxValue jumps from one column to another


      if (finalHeight != valueHeight) {
        var duration = this.interpolationDuration;

        try {
          duration = this.nodes.template.states.getKey("active").transitionDuration;
        } catch (err) {}

        this._heightAnimation = new _core_utils_Animation__WEBPACK_IMPORTED_MODULE_5__.Animation(this, {
          property: "valueHeight",
          from: this.valueHeight,
          to: valueHeight
        }, duration, this.interpolationEasing).start();

        this._disposers.push(this._heightAnimation);
      }
    }
  };
  /**
   * Redraws the chart.
   *
   * @ignore Exclude from docs
   */


  SankeyDiagram.prototype.validate = function () {
    var _this = this;

    _super.prototype.validate.call(this);

    this.calculateValueHeight();
    var container = this.nodesContainer;
    var nextCoordinate = {};
    var maxSumLevelNodeCount = this._levelNodesCount[this._maxSumLevel];
    var total = this.dataItem.values.value.sum;
    var availableHeight;

    if (this.orientation == "horizontal") {
      availableHeight = this.chartContainer.maxHeight - 1;
    } else {
      availableHeight = this.chartContainer.maxWidth - 1;
    }

    _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_6__.each(this._sorted, function (strNode) {
      var node = strNode[1];
      var level = node.level;
      var levelCoordinate = 0;
      var nodeCount = _this._levelNodesCount[level];

      switch (_this.nodeAlign) {
        case "bottom":
          levelCoordinate = (_this.maxSum - _this._levelSum[level]) * _this.valueHeight - (nodeCount - maxSumLevelNodeCount) * _this.nodePadding;
          break;

        case "middle":
          levelCoordinate = (_this.maxSum - _this._levelSum[level]) * _this.valueHeight / 2 - (nodeCount - maxSumLevelNodeCount) * _this.nodePadding / 2;
          break;
      }

      if (_this.maxSum == 0) {
        switch (_this.nodeAlign) {
          case "bottom":
            levelCoordinate = availableHeight - nodeCount * (_this.minNodeSize * availableHeight + _this.nodePadding);
            break;

          case "middle":
            levelCoordinate = availableHeight / 2 - nodeCount / 2 * (_this.minNodeSize * availableHeight + _this.nodePadding);
            break;
        }
      }

      node.parent = container;
      var delta;
      var x;
      var y;
      var value = Math.max(node.totalIncoming, node.totalOutgoing);

      if (value / total < _this.minNodeSize) {
        value = total * _this.minNodeSize;
      }

      if (_this.orientation == "horizontal") {
        delta = (_this.innerWidth - node.pixelWidth) / _this._levelCount;
        x = delta * node.level;
        y = nextCoordinate[level] || levelCoordinate;
        var h = value * _this.valueHeight;

        if (total == 0 && h == 0) {
          h = _this.minNodeSize * availableHeight;
        }

        node.height = h;
        node.minX = x;
        node.maxX = x;
        nextCoordinate[level] = y + h + _this.nodePadding;
      } else {
        delta = (_this.innerHeight - node.pixelHeight) / _this._levelCount;
        x = nextCoordinate[level] || levelCoordinate;
        y = delta * node.level;
        var w = value * _this.valueHeight;

        if (total == 0 && w == 0) {
          w = _this.minNodeSize * availableHeight;
        }

        node.width = w;
        node.minY = y;
        node.maxY = y;
        nextCoordinate[level] = x + w + _this.nodePadding;
      }

      node.x = x;
      node.y = y;
    });
  };
  /**
   * Performs actual operations to reveal this element.
   *
   * @ignore Exclude from docs
   * @param duration Fade in duration (ms)
   * @return Fade in duration (ms)
   */


  SankeyDiagram.prototype.showReal = function (duration) {
    var _this = this;

    if (this.preventShow) {
      return;
    }

    if (this.interpolationDuration > 0) {
      var container_1 = this.nodesContainer;
      var i_1 = 0;
      _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_6__.each(this.links.iterator(), function (link) {
        link.hide(0);
      });
      _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_6__.each(this._sorted, function (strNode) {
        var node = strNode[1];
        var property;

        if (_this.orientation == "horizontal") {
          node.dx = -(container_1.pixelWidth - node.pixelWidth) / Math.max(_this._levelCount, 1);
          property = "dx";
        } else {
          node.dy = -(container_1.pixelHeight - node.pixelHeight) / Math.max(_this._levelCount, 1);
          property = "dy";
        }

        var delay = 0;
        var duration = _this.interpolationDuration;

        if (_this.sequencedInterpolation) {
          delay = _this.sequencedInterpolationDelay * i_1 + duration * i_1 / _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_6__.length(_this.nodes.iterator());
        }

        node.opacity = 0;
        node.invalidateLinks();
        node.animate([{
          property: "opacity",
          from: 0,
          to: 1
        }, {
          property: property,
          to: 0
        }], _this.interpolationDuration, _this.interpolationEasing).delay(delay);
        _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_6__.each(node.outgoingDataItems.iterator(), function (dataItem) {
          var animation = dataItem.link.show(_this.interpolationDuration);

          if (animation && !animation.isFinished()) {
            animation.delay(delay);
          }
        });
        _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_6__.each(node.incomingDataItems.iterator(), function (dataItem) {
          if (!dataItem.fromNode) {
            var animation = dataItem.link.show(_this.interpolationDuration);

            if (animation && !animation.isFinished()) {
              animation.delay(delay);
            }
          }
        });
        i_1++;
      });
    }

    return _super.prototype.showReal.call(this);
  };
  /**
   * Changes the sort type of the nodes.
   *
   * This will actually reshuffle nodes using nice animation.
   */


  SankeyDiagram.prototype.changeSorting = function () {
    var _this = this;

    this.sortNodes();
    var nextCoordinate = {};
    _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_6__.each(this._sorted, function (strNode) {
      var node = strNode[1];
      var level = node.level;
      var levelCoordinate = (_this.maxSum - _this._levelSum[level]) * _this.valueHeight / 2;
      var property;
      var nodeHeight;

      if (_this.orientation == "horizontal") {
        property = "y";
        nodeHeight = node.pixelHeight;
      } else {
        property = "x";
        nodeHeight = node.pixelWidth;
      }

      node.animate({
        property: property,
        to: nextCoordinate[level] || levelCoordinate
      }, _this.interpolationDuration, _this.interpolationEasing);
      nextCoordinate[level] = (nextCoordinate[level] || levelCoordinate) + nodeHeight + _this.nodePadding;
      node.invalidateLinks();
    });
  };
  /**
   * Sets defaults that instantiate some objects that rely on parent, so they
   * cannot be set in constructor.
   */


  SankeyDiagram.prototype.applyInternalDefaults = function () {
    _super.prototype.applyInternalDefaults.call(this); // Add a default screen reader title for accessibility
    // This will be overridden in screen reader if there are any `titles` set


    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.hasValue(this.readerTitle)) {
      this.readerTitle = this.language.translate("Sankey diagram");
    }
  };
  /**
   * Creates and returns a new data item.
   *
   * @return Data item
   */


  SankeyDiagram.prototype.createDataItem = function () {
    return new SankeyDiagramDataItem();
  };

  Object.defineProperty(SankeyDiagram.prototype, "nodeAlign", {
    /**
     * @returns Returns nodeAlign value
     */
    get: function get() {
      return this.getPropertyValue("nodeAlign");
    },

    /**
     * How to align nodes. In case layout is vertical, top means left and bottom means right
     *
     * @param value  Node sorting
     */
    set: function set(value) {
      this.setPropertyValue("nodeAlign", value);
      this.changeSorting();
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(SankeyDiagram.prototype, "orientation", {
    /**
     * @return Orientation
     */
    get: function get() {
      return this.getPropertyValue("orientation");
    },

    /**
     * Orientation of the chart: "horizontal" or "vertical";
     *
     * @param value Orientation
     */
    set: function set(value) {
      this.setPropertyValue("orientation", value, true);
      var nameLabel = this.nodes.template.nameLabel;

      if (value == "vertical") {
        this.nodes.template.width = undefined;
        nameLabel.label.horizontalCenter = "middle";
        nameLabel.locationX = 0.5;
      } else {
        this.nodes.template.height = undefined;
        nameLabel.label.horizontalCenter = "left";
        nameLabel.locationX = 1;
      }
    },
    enumerable: true,
    configurable: true
  });
  /**
   * @ignore
   */

  SankeyDiagram.prototype.createNode = function () {
    var node = new _elements_SankeyNode__WEBPACK_IMPORTED_MODULE_3__.SankeyNode();

    this._disposers.push(node);

    return node;
  };
  /**
   * @ignore
   */


  SankeyDiagram.prototype.createLink = function () {
    var link = new _elements_SankeyLink__WEBPACK_IMPORTED_MODULE_4__.SankeyLink();

    this._disposers.push(link);

    return link;
  };

  Object.defineProperty(SankeyDiagram.prototype, "valueHeight", {
    /**
     * @ignore
     */
    get: function get() {
      return this._valueHeight;
    },

    /**
     * @ignore
     */
    set: function set(value) {
      if (value != this._valueHeight) {
        this._valueHeight = value;
        this.invalidate();
      }
    },
    enumerable: true,
    configurable: true
  });
  /**
   * @ignore
   */

  SankeyDiagram.prototype.disposeData = function () {
    _super.prototype.disposeData.call(this);

    this._sorted = this.nodes.iterator();
  };

  return SankeyDiagram;
}(_FlowDiagram__WEBPACK_IMPORTED_MODULE_0__.FlowDiagram);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_2__.registry.registeredClasses.SankeyDiagram = SankeyDiagram;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/types/SerialChart.js":
/*!********************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/types/SerialChart.js ***!
  \********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "SerialChart": () => (/* binding */ SerialChart),
/* harmony export */   "SerialChartDataItem": () => (/* binding */ SerialChartDataItem)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Chart__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Chart */ "./node_modules/@amcharts/amcharts4/.internal/charts/Chart.js");
/* harmony import */ var _core_utils_List__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/utils/List */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/List.js");
/* harmony import */ var _core_Container__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/Container */ "./node_modules/@amcharts/amcharts4/.internal/core/Container.js");
/* harmony import */ var _series_Series__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../series/Series */ "./node_modules/@amcharts/amcharts4/.internal/charts/series/Series.js");
/* harmony import */ var _core_utils_Percent__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../core/utils/Percent */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Percent.js");
/* harmony import */ var _core_utils_ColorSet__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../core/utils/ColorSet */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/ColorSet.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../core/utils/Iterator */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Iterator.js");
/* harmony import */ var _core_utils_Type__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../core/utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/* harmony import */ var _core_utils_Array__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../core/utils/Array */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Array.js");
/* harmony import */ var _core_utils_Disposer__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../core/utils/Disposer */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Disposer.js");
/**
 * Serial chart module.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */












/**
 * ============================================================================
 * DATA ITEM
 * ============================================================================
 * @hidden
 */

/**
 * Defines a [[DataItem]] for [[SerialChart]].
 *
 * @see {@link DataItem}
 */

var SerialChartDataItem =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_11__.__extends)(SerialChartDataItem, _super);
  /**
   * Constructor
   */


  function SerialChartDataItem() {
    var _this = _super.call(this) || this;

    _this.className = "SerialChartDataItem";

    _this.applyTheme();

    return _this;
  }

  return SerialChartDataItem;
}(_Chart__WEBPACK_IMPORTED_MODULE_0__.ChartDataItem);


/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * A base class for all series-based charts, like XY, Pie, etc.
 *
 * Is not useful on its own.
 *
 * @see {@link ISerialChartEvents} for a list of available Events
 * @see {@link ISerialChartAdapters} for a list of available Adapters
 */

var SerialChart =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_11__.__extends)(SerialChart, _super);
  /**
   * Constructor
   */


  function SerialChart() {
    var _this = // Init
    _super.call(this) || this;

    _this.className = "SerialChart";
    _this.colors = new _core_utils_ColorSet__WEBPACK_IMPORTED_MODULE_5__.ColorSet();
    _this._usesData = false; // Create a container for series

    var seriesContainer = _this.chartContainer.createChild(_core_Container__WEBPACK_IMPORTED_MODULE_2__.Container);

    seriesContainer.shouldClone = false;
    seriesContainer.width = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_4__.percent)(100);
    seriesContainer.height = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_4__.percent)(100);
    seriesContainer.isMeasured = false;
    seriesContainer.layout = "none";
    seriesContainer.zIndex = 2;
    _this.seriesContainer = seriesContainer; // Create a container for bullets

    var bulletsContainer = _this.chartContainer.createChild(_core_Container__WEBPACK_IMPORTED_MODULE_2__.Container);

    bulletsContainer.shouldClone = false;
    bulletsContainer.width = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_4__.percent)(100);
    bulletsContainer.height = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_4__.percent)(100);
    bulletsContainer.isMeasured = false;
    bulletsContainer.zIndex = 3;
    bulletsContainer.layout = "none";
    _this.bulletsContainer = bulletsContainer; // Apply theme

    _this.applyTheme();

    return _this;
  }

  SerialChart.prototype.dispose = function () {
    _super.prototype.dispose.call(this);

    if (this.colors) {
      this.colors.dispose();
    }

    if (this.patterns) {
      this.patterns.dispose();
    }
  };
  /**
   * Sets defaults that instantiate some objects that rely on parent, so they
   * cannot be set in constructor
   */


  SerialChart.prototype.applyInternalDefaults = function () {
    _super.prototype.applyInternalDefaults.call(this); // Add a default screen reader title for accessibility
    // This will be overridden in screen reader if there are any `titles` set


    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.hasValue(this.readerTitle)) {
      this.readerTitle = this.language.translate("Serial chart");
    }
  };

  Object.defineProperty(SerialChart.prototype, "series", {
    /**
     * A list of chart's series.
     *
     * @return Chart's series
     */
    get: function get() {
      if (!this._series) {
        this._series = new _core_utils_List__WEBPACK_IMPORTED_MODULE_1__.ListTemplate(this.createSeries());

        this._series.events.on("inserted", this.handleSeriesAdded, this, false);

        this._series.events.on("removed", this.handleSeriesRemoved, this, false);

        this._disposers.push(new _core_utils_List__WEBPACK_IMPORTED_MODULE_1__.ListDisposer(this._series, false));

        this._disposers.push(this._series.template);
      }

      return this._series;
    },
    enumerable: true,
    configurable: true
  });

  SerialChart.prototype.handleSeriesRemoved = function (event) {
    var series = event.oldValue;
    this.dataUsers.removeValue(series);
    this.dataUsers.each(function (dataUser) {
      dataUser.invalidateDataItems();
    });

    if (series.autoDispose) {
      series.dispose();
    } else {
      series.parent = undefined;
      series.bulletsContainer.parent = undefined;
    } //this.feedLegend();


    var legend = this.legend;

    if (legend) {
      var dataItems = this.legend.dataItems;

      for (var i = dataItems.length - 1; i >= 0; i--) {
        var dataItem = dataItems.getIndex(i);

        if (dataItem && dataItem.dataContext == series) {
          legend.dataItems.remove(dataItem);
        }
      }

      for (var i = legend.data.length - 1; i >= 0; i--) {
        var di = legend.data[i];

        if (di && di == series) {
          _core_utils_Array__WEBPACK_IMPORTED_MODULE_9__.remove(legend.data, di);
        }
      }
    }
  };
  /**
   * Decorates a new [[Series]] object with required parameters when it is
   * added to the chart.
   *
   * @ignore Exclude from docs
   * @param event  Event
   */


  SerialChart.prototype.handleSeriesAdded = function (event) {
    var _this = this;

    var series = event.newValue;

    if (series.isDisposed()) {
      return;
    }

    series.chart = this;
    series.parent = this.seriesContainer;
    series.bulletsContainer.parent = this.bulletsContainer;

    this._dataUsers.moveValue(series);

    series.addDisposer(new _core_utils_Disposer__WEBPACK_IMPORTED_MODULE_10__.Disposer(function () {
      _this.dataUsers.removeValue(series);
    }));
    this.handleSeriesAdded2(series);
    this.handleLegendSeriesAdded(series);
  };

  SerialChart.prototype.handleLegendSeriesAdded = function (series) {
    if (!series.hiddenInLegend) {
      if (this.legend) {
        this.legend.addData(series);
      }
    }
  };

  SerialChart.prototype.handleSeriesAdded2 = function (series) {
    var _this = this;

    if (!this.dataInvalid) {
      this._disposers.push( // on exit only as data is usually passed after push
      _core_Registry__WEBPACK_IMPORTED_MODULE_6__.registry.events.once("exitframe", function () {
        if (!series.data || series.data.length == 0) {
          series.data = _this.data;

          if (series.showOnInit) {
            series.reinit();
            series.setPropertyValue("showOnInit", false);
            series.showOnInit = true;
          }

          if (!series.isDisposed()) {
            series.events.once("datavalidated", function () {
              if (series.data == _this.data) {
                series._data = [];
              }
            });
          }
        }
      }));
    }
  };
  /**
   * Setups the legend to use the chart's data.
   * @ignore
   */


  SerialChart.prototype.feedLegend = function () {
    var legend = this.legend;

    if (legend) {
      var legendData_1 = [];
      _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_7__.each(this.series.iterator(), function (series) {
        if (!series.hiddenInLegend) {
          legendData_1.push(series);
        }
      });
      legend.dataFields.name = "name";
      legend.data = legendData_1;
    }
  };
  /**
   * Creates and returns a new Series, suitable for this chart type.
   *
   * @return New series
   */


  SerialChart.prototype.createSeries = function () {
    return new _series_Series__WEBPACK_IMPORTED_MODULE_3__.Series();
  };

  Object.defineProperty(SerialChart.prototype, "colors", {
    /**
     * @return Color list
     */
    get: function get() {
      return this.getPropertyValue("colors");
    },

    /**
     * Chart's color list.
     *
     * This list can be used by a number of serial items, like applying a new
     * color for each Series added. Or, applying a new color for each slice
     * of a Pie chart.
     *
     * Please see [[ColorSet]] for information on how you can set up to generate
     * unique colors.
     *
     * A theme you are using may override default pre-defined colors.
     *
     * @param value Color list
     */
    set: function set(value) {
      this.setPropertyValue("colors", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(SerialChart.prototype, "patterns", {
    /**
     * @return Pattern set
     */
    get: function get() {
      return this.getPropertyValue("patterns");
    },

    /**
     * A [[PatternSet]] to use when creating patterned fills for slices.
     *
     * @since 4.7.5
     * @param value  Pattern set
     */
    set: function set(value) {
      this.setPropertyValue("patterns", value, true);
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Copies all parameters from another [[SerialChart]].
   *
   * @param source Source SerialChart
   */

  SerialChart.prototype.copyFrom = function (source) {
    _super.prototype.copyFrom.call(this, source);

    this.series.copyFrom(source.series);
  };
  /**
   * Hides the chart instantly and then shows it. If defaultState.transitionDuration > 0, this will result an animation in which properties of hidden state will animate to properties of visible state.
   */


  SerialChart.prototype.appear = function () {
    _super.prototype.appear.call(this);

    this.series.each(function (series) {
      if (series.showOnInit && series.inited) {
        series.appear();
      }
    });
  };

  return SerialChart;
}(_Chart__WEBPACK_IMPORTED_MODULE_0__.Chart);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_6__.registry.registeredClasses.SerialChart = SerialChart;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/types/SlicedChart.js":
/*!********************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/types/SlicedChart.js ***!
  \********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "SlicedChart": () => (/* binding */ SlicedChart),
/* harmony export */   "SlicedChartDataItem": () => (/* binding */ SlicedChartDataItem)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _PercentChart__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./PercentChart */ "./node_modules/@amcharts/amcharts4/.internal/charts/types/PercentChart.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_utils_Type__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/**
 * Sliced chart module.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */




/**
 * ============================================================================
 * DATA ITEM
 * ============================================================================
 * @hidden
 */

/**
 * Defines a [[DataItem]] for [[SlicedChart]].
 *
 * @see {@link DataItem}
 */

var SlicedChartDataItem =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__extends)(SlicedChartDataItem, _super);
  /**
   * Constructor
   */


  function SlicedChartDataItem() {
    var _this = _super.call(this) || this;

    _this.className = "SlicedChartDataItem";

    _this.applyTheme();

    return _this;
  }

  return SlicedChartDataItem;
}(_PercentChart__WEBPACK_IMPORTED_MODULE_0__.PercentChartDataItem);


/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Creates a Sliced chart.
 *
 * @see {@link ISlicedChartEvents} for a list of available Events
 * @see {@link ISlicedChartAdapters} for a list of available Adapters
 * @see {@link https://www.amcharts.com/docs/v4/chart-types/sliced-chart/} for documentation
 * @important
 */

var SlicedChart =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__extends)(SlicedChart, _super);
  /**
   * Constructor
   */


  function SlicedChart() {
    var _this = // Init
    _super.call(this) || this;

    _this.className = "SlicedChart";
    _this.seriesContainer.layout = "horizontal";

    _this.padding(15, 15, 15, 15); // Apply theme


    _this.applyTheme();

    return _this;
  }
  /**
   * Sets defaults that instantiate some objects that rely on parent, so they
   * cannot be set in constructor.
   */


  SlicedChart.prototype.applyInternalDefaults = function () {
    _super.prototype.applyInternalDefaults.call(this); // Add a default screen reader title for accessibility
    // This will be overridden in screen reader if there are any `titles` set


    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_2__.hasValue(this.readerTitle)) {
      this.readerTitle = this.language.translate("Sliced chart");
    }
  };
  /**
   * (Re)validates the chart, causing it to redraw.
   *
   * @ignore Exclude from docs
   */


  SlicedChart.prototype.validate = function () {
    _super.prototype.validate.call(this);
  };

  return SlicedChart;
}(_PercentChart__WEBPACK_IMPORTED_MODULE_0__.PercentChart);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses.SlicedChart = SlicedChart;
_core_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses.SlicedChartDataItem = SlicedChartDataItem;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/types/TreeMap.js":
/*!****************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/types/TreeMap.js ***!
  \****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "TreeMap": () => (/* binding */ TreeMap),
/* harmony export */   "TreeMapDataItem": () => (/* binding */ TreeMapDataItem)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _XYChart__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./XYChart */ "./node_modules/@amcharts/amcharts4/.internal/charts/types/XYChart.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_utils_Dictionary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/utils/Dictionary */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Dictionary.js");
/* harmony import */ var _axes_ValueAxis__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../axes/ValueAxis */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/ValueAxis.js");
/* harmony import */ var _series_TreeMapSeries__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../series/TreeMapSeries */ "./node_modules/@amcharts/amcharts4/.internal/charts/series/TreeMapSeries.js");
/* harmony import */ var _core_utils_ColorSet__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../core/utils/ColorSet */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/ColorSet.js");
/* harmony import */ var _core_interaction_Mouse__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../core/interaction/Mouse */ "./node_modules/@amcharts/amcharts4/.internal/core/interaction/Mouse.js");
/* harmony import */ var _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../core/utils/Iterator */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Iterator.js");
/* harmony import */ var _core_utils_Type__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../core/utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/* harmony import */ var _core_utils_Array__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../core/utils/Array */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Array.js");
/**
 * TreeMap chart module.
 *
 * Parts of the functionality used in this module are taken from D3.js library
 * (https://d3js.org/)
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */











/**
 * ============================================================================
 * DATA ITEM
 * ============================================================================
 * @hidden
 */

/**
 * Defines a [[DataItem]] for [[TreeMap]].
 *
 * @see {@link DataItem}
 */

var TreeMapDataItem =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_10__.__extends)(TreeMapDataItem, _super);
  /**
   * Constructor
   */


  function TreeMapDataItem() {
    var _this = _super.call(this) || this;
    /**
     * Required for squarify functionality.
     *
     * @ignore Exclude from docs
     */


    _this.rows = [];
    _this.className = "TreeMapDataItem";
    _this.values.value = {
      workingValue: 0
    };
    _this.values.x0 = {};
    _this.values.y0 = {};
    _this.values.x1 = {};
    _this.values.y1 = {};
    _this.hasChildren.children = true;

    _this.applyTheme();

    return _this;
  }

  Object.defineProperty(TreeMapDataItem.prototype, "legendDataItem", {
    /**
     * @return Legend data item
     */
    get: function get() {
      return this._legendDataItem;
    },

    /**
     * A legend's data item, that corresponds to this data item.
     *
     * @param value  Legend data item
     */
    set: function set(value) {
      this._legendDataItem = value;

      if (value.label) {
        value.label.dataItem = this;
      }

      if (value.valueLabel) {
        value.valueLabel.dataItem = this;
      }
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Returns a duration (ms) the Data Item should take to animate from one
   * value to another.
   *
   * If the duration is not specified via parameter, this method will try to
   * request a default duration from the related `Component`.
   *
   * @param duration  Default duration (ms)
   * @return Duration (ms)
   */

  TreeMapDataItem.prototype.getDuration = function () {
    return 0;
  };

  Object.defineProperty(TreeMapDataItem.prototype, "value", {
    /**
     * @return Value
     */
    get: function get() {
      var value = 0;

      if (!this.children || this.children.length == 0) {
        value = this.values["value"].workingValue;
      } else {
        _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_7__.each(this.children.iterator(), function (child) {
          var childValue = child.value;

          if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.isNumber(childValue)) {
            value += childValue;
          }
        });
      }

      return value;
      /*
      let value = this.values["value"].workingValue;
            if (!$type.isNumber(value)) {
          value = 0;
          if (this.children) {
              $iter.each(this.children.iterator(), (child) => {
                  if ($type.isNumber(child.value)) {
                      value += child.value;
                  }
              });
          }
      }
      return value;*/
    },

    /**
     * Numeric value of the item.
     *
     * @param value  Value
     */
    set: function set(value) {
      this.setValue("value", value);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(TreeMapDataItem.prototype, "percent", {
    /**
     * Percent value of a node
     */
    get: function get() {
      if (this.parent) {
        return this.value / this.parent.value * 100;
      }

      return 100;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(TreeMapDataItem.prototype, "x0", {
    /**
     * @return X
     */
    get: function get() {
      return this.values.x0.value;
    },

    /**
     * Item's X position.
     *
     * @ignore Exclude from docs
     * @todo Description (review)
     * @param value  X
     */
    set: function set(value) {
      this.setValue("x0", value);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(TreeMapDataItem.prototype, "x1", {
    /**
     * @return X
     */
    get: function get() {
      return this.values.x1.value;
    },

    /**
     * Item's X position.
     *
     * @ignore Exclude from docs
     * @todo Description (review)
     * @param value  X
     */
    set: function set(value) {
      this.setValue("x1", value);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(TreeMapDataItem.prototype, "y0", {
    /**
     * @return Y
     */
    get: function get() {
      return this.values.y0.value;
    },

    /**
     * Item's Y position.
     *
     * @ignore Exclude from docs
     * @todo Description (review)
     * @param value  Y
     */
    set: function set(value) {
      this.setValue("y0", value);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(TreeMapDataItem.prototype, "y1", {
    /**
     * @return Y
     */
    get: function get() {
      return this.values.y1.value;
    },

    /**
     * Item's Y position.
     *
     * @ignore Exclude from docs
     * @todo Description (review)
     * @param value  Y
     */
    set: function set(value) {
      this.setValue("y1", value);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(TreeMapDataItem.prototype, "name", {
    /**
     * @return Name
     */
    get: function get() {
      return this.properties.name;
    },

    /**
     * Item's name.
     *
     * @param name  Name
     */
    set: function set(name) {
      this.setProperty("name", name);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(TreeMapDataItem.prototype, "children", {
    /**
     * @return Item's children
     */
    get: function get() {
      return this.properties.children;
    },

    /**
     * A list of item's sub-children.
     *
     * Having children means that the TreeMap chat will automatically be
     * "drillable". Clicking on an item with children will zoom to the item, then
     * display its children.
     *
     * Treemap can have any level of nesting.
     *
     * @param children  Item's children
     */
    set: function set(children) {
      this.setProperty("children", children);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(TreeMapDataItem.prototype, "level", {
    /**
     * Depth level in the treemap hierarchy.
     *
     * The top-level item will have level set at 0. Its children will have
     * level 1, and so on.
     *
     * @readonly
     * @return Level
     */
    get: function get() {
      if (!this.parent) {
        return 0;
      } else {
        return this.parent.level + 1;
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(TreeMapDataItem.prototype, "color", {
    /**
     * @return Color
     */
    get: function get() {
      var color = this.properties.color;

      if (color == undefined) {
        if (this.parent) {
          color = this.parent.color;
        }
      }

      if (color == undefined) {
        if (this.component) {
          color = this.component.colors.getIndex(this.component.colors.step * this.index);
        }
      }

      return color;
    },

    /**
     * Item's color.
     *
     * If not set, will use parent's color, or, if that is not set either,
     * automatically assigned color from chart's color set. (`chart.colors`)
     *
     * @param value  Color
     */
    set: function set(value) {
      this.setProperty("color", value);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(TreeMapDataItem.prototype, "fill", {
    /**
     * @ignore
     * For the legend to work properly
     */
    get: function get() {
      return this.color;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(TreeMapDataItem.prototype, "series", {
    get: function get() {
      return this._series;
    },

    /**
     * Series of children data items
     * @todo: proper descrition
     */
    set: function set(series) {
      if (series != this._series) {
        if (this._series) {
          this.component.series.removeValue(this._series);

          this._series.dispose();
        }

        this._series = series;

        this._disposers.push(series);
      }
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Hides the Data Item and related visual elements.
   *
   * @param duration  Animation duration (ms)
   * @param delay     Delay animation (ms)
   * @param toValue   A value to set to `fields` when hiding
   * @param fields    A list of data fields to set value to `toValue`
   */

  TreeMapDataItem.prototype.hide = function (duration, delay, toValue, fields) {
    this.setWorkingValue("value", 0);

    if (this.children) {
      this.children.each(function (child) {
        child.hide(duration, delay, toValue, fields);
      });
    }

    var seriesDataItem = this.seriesDataItem;

    if (seriesDataItem) {
      seriesDataItem.bullets.each(function (key, value) {
        value.hide();
        value.preventShow = true;
      });
    }

    return _super.prototype.hide.call(this, duration, delay, toValue, fields);
  };
  /**
   * Shows the Data Item and related visual elements.
   *
   * @param duration  Animation duration (ms)
   * @param delay     Delay animation (ms)
   * @param fields    A list of fields to set values of
   */


  TreeMapDataItem.prototype.show = function (duration, delay, fields) {
    this.setWorkingValue("value", this.values.value.value);

    if (this.children) {
      this.children.each(function (child) {
        child.show(duration, delay, fields);
      });
    }

    var seriesDataItem = this.seriesDataItem;

    if (seriesDataItem) {
      seriesDataItem.bullets.each(function (key, value) {
        value.preventShow = false;
      });
    }

    return _super.prototype.show.call(this, duration, delay, fields);
  };

  return TreeMapDataItem;
}(_XYChart__WEBPACK_IMPORTED_MODULE_0__.XYChartDataItem);


/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Creates a TreeMap chart.
 *
 * @see {@link ITreeMapEvents} for a list of available Events
 * @see {@link ITreeMapAdapters} for a list of available Adapters
 * @see {@link https://www.amcharts.com/docs/v4/chart-types/treemap/} for documentation
 */

var TreeMap =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_10__.__extends)(TreeMap, _super);
  /**
   * Constructor
   */


  function TreeMap() {
    var _this = // Init
    _super.call(this) || this;
    /**
     * An algorithm used to divide area into squares based on their value.
     *
     * Available options: squarify (default), binaryTree, slice, dice, sliceDice.
     *
     * ```TypeScript
     * chart.layoutAlgorithm = chart.sliceDice;
     * ```
     * ```JavaScript
     * chart.layoutAlgorithm = chart.sliceDice;
     * ```
     * ```JSON
     * {
     *   // ...
     *   "layoutAlgorithm": "sliceDice",
     *   // ...
     * }
     * ```
     *
     * @see {@link https://www.amcharts.com/docs/v4/chart-types/treemap/#Area_division_methods} For more info and examples.
     * @default squarify
     */


    _this.layoutAlgorithm = _this.squarify;
    /**
     * Is the chart zoomable?
     *
     * If the chart is `zoomable`, and items have sub-items, the chart will
     * drill-down to sub-items when click on their parent item.
     *
     * @default true
     */

    _this.zoomable = true;
    _this.className = "TreeMap";
    _this._usesData = true;
    _this.maxLevels = 2;
    _this.currentLevel = 0;
    _this.hideParentColumns = false;
    _this.colors = new _core_utils_ColorSet__WEBPACK_IMPORTED_MODULE_5__.ColorSet();
    _this.sorting = "descending"; // create two value axes for the chart

    var xAxis = _this.xAxes.push(new _axes_ValueAxis__WEBPACK_IMPORTED_MODULE_3__.ValueAxis());

    xAxis.title.disabled = true;
    xAxis.strictMinMax = true;
    var xRenderer = xAxis.renderer;
    xRenderer.inside = true;
    xRenderer.labels.template.disabled = true;
    xRenderer.ticks.template.disabled = true;
    xRenderer.grid.template.disabled = true;
    xRenderer.axisFills.template.disabled = true;
    xRenderer.minGridDistance = 100;
    xRenderer.line.disabled = true;
    xRenderer.baseGrid.disabled = true; //xRenderer.inversed = true;

    var yAxis = _this.yAxes.push(new _axes_ValueAxis__WEBPACK_IMPORTED_MODULE_3__.ValueAxis());

    yAxis.title.disabled = true;
    yAxis.strictMinMax = true;
    var yRenderer = yAxis.renderer;
    yRenderer.inside = true;
    yRenderer.labels.template.disabled = true;
    yRenderer.ticks.template.disabled = true;
    yRenderer.grid.template.disabled = true;
    yRenderer.axisFills.template.disabled = true;
    yRenderer.minGridDistance = 100;
    yRenderer.line.disabled = true;
    yRenderer.baseGrid.disabled = true;
    yRenderer.inversed = true; // shortcuts

    _this.xAxis = xAxis;
    _this.yAxis = yAxis;
    var template = new _series_TreeMapSeries__WEBPACK_IMPORTED_MODULE_4__.TreeMapSeries();
    _this.seriesTemplates = new _core_utils_Dictionary__WEBPACK_IMPORTED_MODULE_2__.DictionaryTemplate(template);
    template.virtualParent = _this;

    _this._disposers.push(new _core_utils_Dictionary__WEBPACK_IMPORTED_MODULE_2__.DictionaryDisposer(_this.seriesTemplates));

    _this._disposers.push(template);

    _this.zoomOutButton.events.on("hit", function () {
      _this.zoomToChartDataItem(_this._homeDataItem);
    }, undefined, false);

    _this.seriesTemplates.events.on("insertKey", function (event) {
      event.newValue.isTemplate = true;
    }, undefined, false); // Apply theme


    _this.applyTheme();

    return _this;
  }

  Object.defineProperty(TreeMap.prototype, "navigationBar", {
    /**
     * Returns navigationBar if it is added to a chart
     */
    get: function get() {
      return this._navigationBar;
    },

    /**
     * A navigation bar used to show "breadcrumb" control, indicating current
     * drill-down path.
     */
    set: function set(navigationBar) {
      var _this = this;

      if (this._navigationBar != navigationBar) {
        this._navigationBar = navigationBar;
        navigationBar.parent = this;
        navigationBar.toBack();
        navigationBar.links.template.events.on("hit", function (event) {
          var dataItem = event.target.dataItem.dataContext;

          if (!dataItem.isDisposed()) {
            _this.zoomToChartDataItem(dataItem);

            _this.createTreeSeries(dataItem);
          }
        }, undefined, true);

        this._disposers.push(navigationBar);
      }
    },
    enumerable: true,
    configurable: true
  });
  /**
   * (Re)validates chart's data.
   *
   * @ignore Exclude from docs
   */

  TreeMap.prototype.validateData = function () {
    this.series.clear();
    this._tempSeries = [];

    _super.prototype.validateData.call(this);

    if (this._homeDataItem) {
      this._homeDataItem.dispose();
    }

    var homeDataItem = this.dataItems.template.clone(); // cant' use createDataItem here!

    this._homeDataItem = homeDataItem;
    _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_7__.each(this.dataItems.iterator(), function (dataItem) {
      dataItem.parent = homeDataItem;
    });
    homeDataItem.children = this.dataItems;
    homeDataItem.x0 = 0;
    homeDataItem.y0 = 0;
    homeDataItem.name = this._homeText;
    var maxX = 1000;
    var maxY = Math.round(maxX * this.pixelHeight / this.pixelWidth / 10) * 10 || 1000;
    homeDataItem.x1 = maxX;
    homeDataItem.y1 = maxY;
    this.xAxis.min = 0;
    this.xAxis.max = maxX;
    this.xAxis.getMinMax();
    this.yAxis.min = 0;
    this.yAxis.max = maxY;
    this.yAxis.getMinMax();
    this.layoutItems(homeDataItem);
    this.createTreeSeries(homeDataItem);
    this.feedLegend();
  };
  /**
   * Layouts and sizes all items according to their value and
   * `layoutAlgorithm`.
   *
   * @ignore Exclude from docs
   * @param parent  Parent data item
   */


  TreeMap.prototype.layoutItems = function (parent, sorting) {
    if (parent) {
      var children = parent.children;

      if (!sorting) {
        sorting = this.sorting;
      }

      if (sorting == "ascending") {
        children.values.sort(function (a, b) {
          return a.value - b.value;
        });
      }

      if (sorting == "descending") {
        children.values.sort(function (a, b) {
          return b.value - a.value;
        });
      }

      this._updateDataItemIndexes(0);

      this.layoutAlgorithm(parent);

      for (var i = 0, len = children.length; i < len; i++) {
        var node = children.getIndex(i);

        if (node.children) {
          this.layoutItems(node);
        }
      }
    }
  };
  /**
   * Creates and returns a new treemap series.
   *
   * @todo Description
   * @param dataItem  Data item to create series out of
   */


  TreeMap.prototype.createTreeSeries = function (dataItem) {
    var _this = this;

    this._tempSeries = [];
    var navigationData = [dataItem]; // create parent series and navigation data

    var parentDataItem = dataItem.parent;

    while (parentDataItem != undefined) {
      this.initSeries(parentDataItem);
      navigationData.push(parentDataItem);
      parentDataItem = parentDataItem.parent;
    }

    navigationData.reverse();

    if (this.navigationBar) {
      this.navigationBar.data = navigationData;
    } // create series and children series


    this.createTreeSeriesReal(dataItem); // add those which are not in the list

    _core_utils_Array__WEBPACK_IMPORTED_MODULE_9__.each(this._tempSeries, function (series) {
      if (_this.series.indexOf(series) == -1) {
        _this.series.push(series);
      }

      series.zIndex = series.level;
    });
  };
  /**
   * [createTreeSeriesReal description]
   *
   * @todo Description
   * @param dataItem [description]
   */


  TreeMap.prototype.createTreeSeriesReal = function (dataItem) {
    if (dataItem.children) {
      var level = dataItem.level;

      if (level < this.currentLevel + this.maxLevels) {
        this.initSeries(dataItem);

        for (var i = 0; i < dataItem.children.length; i++) {
          var child = dataItem.children.getIndex(i);

          if (child.children) {
            this.createTreeSeriesReal(child);
          }
        }
      }
    }
  };

  TreeMap.prototype.setData = function (value) {
    this.currentLevel = 0;
    this.currentlyZoomed = undefined;
    this.xAxis.start = 0;
    this.xAxis.end = 1;
    this.yAxis.start = 0;
    this.yAxis.end = 1;

    _super.prototype.setData.call(this, value);
  };
  /**
   * @ignore
   * Overriding, as tree map series are created on the fly all the time
   */


  TreeMap.prototype.seriesAppeared = function () {
    return true;
  };
  /**
   * Initializes the treemap series.
   *
   * @todo Description
   * @param dataItem  Chart data item
   */


  TreeMap.prototype.initSeries = function (dataItem) {
    var _this = this;

    if (!dataItem.series) {
      var series = void 0;
      var template = this.seriesTemplates.getKey(dataItem.level.toString());

      if (template) {
        series = template.clone();
      } else {
        series = this.series.create();
      } // for the legend to get {value}


      series.dataItem.dataContext = dataItem;
      series.name = dataItem.name;
      series.parentDataItem = dataItem;
      dataItem.series = series;
      var level = dataItem.level;
      series.level = level;
      var dataContext = dataItem.dataContext;

      if (dataContext) {
        series.config = dataContext.config;
      }

      this.dataUsers.removeValue(series); // series do not use data directly, that's why we remove it

      series.data = dataItem.children.values;
      series.fill = dataItem.color;
      series.columnsContainer.hide(0);
      series.bulletsContainer.hide(0);
      series.columns.template.adapter.add("fill", function (fill, target) {
        var dataItem = target.dataItem;

        if (dataItem) {
          var treeMapDataItem = dataItem.treeMapDataItem;

          if (treeMapDataItem) {
            target.fill = treeMapDataItem.color;
            target.adapter.remove("fill"); //@todo: make it possible adapters applied once?

            return treeMapDataItem.color;
          }
        }
      });

      if (this.zoomable && (dataItem.level > this.currentLevel || dataItem.children && dataItem.children.length > 0)) {
        series.columns.template.cursorOverStyle = _core_interaction_Mouse__WEBPACK_IMPORTED_MODULE_6__.MouseCursorStyle.pointer;

        if (this.zoomable) {
          series.columns.template.events.on("hit", function (event) {
            var seriesDataItem = event.target.dataItem;

            if (dataItem.level > _this.currentLevel) {
              _this.zoomToChartDataItem(seriesDataItem.treeMapDataItem.parent);
            } else {
              _this.zoomToSeriesDataItem(seriesDataItem);
            }
          }, this, undefined);
        }
      }
    }

    this._tempSeries.push(dataItem.series);
  };
  /**
   * Toggles bullets so that labels that belong to current drill level are
   * shown.
   *
   * @param duration  Animation duration (ms)
   */


  TreeMap.prototype.toggleBullets = function (duration) {
    var _this = this; // hide all series which are not in tempSeries


    _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_7__.each(this.series.iterator(), function (series) {
      if (_this._tempSeries.indexOf(series) == -1) {
        //series.hideReal(duration);
        series.columnsContainer.hide();
        series.bulletsContainer.hide(duration);
      } else {
        //series.showReal(duration);
        series.columnsContainer.show();
        series.bulletsContainer.show(duration);
        series.dataItems.each(function (dataItem) {
          dataItem.bullets.each(function (key, bullet) {
            bullet.show();
          });
        });

        if (series.level < _this.currentLevel) {
          if (_this.hideParentColumns) {
            series.columnsContainer.hide();
          }

          series.bulletsContainer.hide(duration);
        } else if (series.level == _this.currentLevel) {
          if (_this.maxLevels > 1) {
            series.dataItems.each(function (dataItem) {
              if (dataItem.treeMapDataItem.children) {
                dataItem.bullets.each(function (key, bullet) {
                  bullet.hide();
                });
              }
            });
          }
        }
      }
    });
  };
  /**
   * Zooms to particular item in series.
   *
   * @param dataItem  Data item
   */


  TreeMap.prototype.zoomToSeriesDataItem = function (dataItem) {
    this.zoomToChartDataItem(dataItem.treeMapDataItem);
  };
  /**
   * Zooms to particular item. If dataItem is not specified, the chart will zoom-out.
   *
   * @ignore Exclude from docs
   * @param dataItem  Data item
   */


  TreeMap.prototype.zoomToChartDataItem = function (dataItem) {
    var _this = this;

    if (!dataItem) {
      dataItem = this._homeDataItem;
    }

    var zoomOutButton = this.zoomOutButton; // this is needed because if there is only one fist level, it won't be shown

    if (zoomOutButton) {
      if (dataItem != this._homeDataItem) {
        zoomOutButton.show();
      } else {
        zoomOutButton.hide();
      }
    }

    if (dataItem && dataItem.children) {
      this.xAxis.zoomToValues(dataItem.x0, dataItem.x1);
      this.yAxis.zoomToValues(dataItem.y0, dataItem.y1);
      this.currentLevel = dataItem.level;
      this.currentlyZoomed = dataItem;
      this.createTreeSeries(dataItem);
      var rangeChangeAnimation = this.xAxis.rangeChangeAnimation || this.yAxis.rangeChangeAnimation;

      if (rangeChangeAnimation && !rangeChangeAnimation.isDisposed() && !rangeChangeAnimation.isFinished()) {
        this._dataDisposers.push(rangeChangeAnimation);

        rangeChangeAnimation.events.once("animationended", function () {
          _this.toggleBullets();
        });
      } else {
        this.toggleBullets();
      }
    }
  };
  /**
   * Sets defaults that instantiate some objects that rely on parent, so they
   * cannot be set in constructor.
   */


  TreeMap.prototype.applyInternalDefaults = function () {
    _super.prototype.applyInternalDefaults.call(this); // Add a default screen reader title for accessibility
    // This will be overridden in screen reader if there are any `titles` set


    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.hasValue(this.readerTitle)) {
      this.readerTitle = this.language.translate("TreeMap chart");
    } //this.homeText = this.language.translate("Home");

  };
  /**
   * Returns a new/empty DataItem of the type appropriate for this object.
   *
   * @see {@link DataItem}
   * @return Data Item
   */


  TreeMap.prototype.createDataItem = function () {
    return new TreeMapDataItem();
  };

  Object.defineProperty(TreeMap.prototype, "maxLevels", {
    /**
     * @return Maximum drill-down level
     */
    get: function get() {
      return this.getPropertyValue("maxLevels");
    },

    /**
     * Maximum number of levels the chart will display initially.
     *
     * @default 2
     * @param value  Maximum drill-down level
     */
    set: function set(value) {
      this.setPropertyValue("maxLevels", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(TreeMap.prototype, "currentLevel", {
    /**
     * @return Current level
     */
    get: function get() {
      return this.getPropertyValue("currentLevel");
    },

    /**
     * Current drill-down level the chart is at.
     *
     * @param value  Current level
     */
    set: function set(value) {
      this.setPropertyValue("currentLevel", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(TreeMap.prototype, "hideParentColumns", {
    /**
     * @return Hide?
     */
    get: function get() {
      return this.getPropertyValue("hideParentColumns");
    },

    /**
     * If set to `true`, columns of parent nodes will be hidden when user
     * drills-down into deeper levels.
     *
     * @sice 4.7.4
     * @default false
     * @param  value  Hide?
     */
    set: function set(value) {
      this.setPropertyValue("hideParentColumns", value);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(TreeMap.prototype, "sorting", {
    get: function get() {
      return this.getPropertyValue("sorting");
    },

    /**
     * Sorting direction of treemap items.
     *
     * Available options: "none", "ascending", and "descending" (default).
     *
     * @default "descending"
     * @param value [description]
     */
    set: function set(value) {
      this.setPropertyValue("sorting", value, true);
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Creates and returns a new series of the suitable type.
   *
   * @return new series
   */

  TreeMap.prototype.createSeries = function () {
    return new _series_TreeMapSeries__WEBPACK_IMPORTED_MODULE_4__.TreeMapSeries();
  };

  Object.defineProperty(TreeMap.prototype, "homeText", {
    /**
     * @return Home text
     */
    get: function get() {
      return this._homeText;
    },

    /**
     * A text displayed on the "home" button which is used to go back to level 0
     * after drill into sub-items.
     *
     * @param value  Home text
     */
    set: function set(value) {
      this._homeText = value;

      if (this._homeDataItem) {
        this._homeDataItem.name = this._homeText;
      }
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Processes JSON-based config before it is applied to the object.
   *
   * @ignore Exclude from docs
   * @param config  Config
   */

  TreeMap.prototype.processConfig = function (config) {
    if (config) {
      // Instantiate layout algorithm
      if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.hasValue(config["layoutAlgorithm"]) && _core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.isString(config["layoutAlgorithm"])) {
        switch (config["layoutAlgorithm"]) {
          case "squarify":
            config["layoutAlgorithm"] = this.squarify;
            break;

          case "binaryTree":
            config["layoutAlgorithm"] = this.binaryTree;
            break;

          case "slice":
            config["layoutAlgorithm"] = this.slice;
            break;

          case "dice":
            config["layoutAlgorithm"] = this.dice;
            break;

          case "sliceDice":
            config["layoutAlgorithm"] = this.sliceDice;
            break;

          default:
            delete config["layoutAlgorithm"];
            break;
        }
      } // Set type for navigation bar


      if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.hasValue(config.navigationBar) && !_core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.hasValue(config.navigationBar.type)) {
        config.navigationBar.type = "NavigationBar";
      }

      _super.prototype.processConfig.call(this, config);
    }
  };
  /**
   * Measures the size of container and informs its children of how much size
   * they can occupy, by setting their relative `maxWidth` and `maxHeight`
   * properties.
   *
   * @ignore Exclude from docs
   */


  TreeMap.prototype.validateLayout = function () {
    _super.prototype.validateLayout.call(this);

    this.layoutItems(this.currentlyZoomed);
  };
  /**
   * Validates (processes) data items.
   *
   * @ignore Exclude from docs
   */


  TreeMap.prototype.validateDataItems = function () {
    _super.prototype.validateDataItems.call(this);

    this.layoutItems(this._homeDataItem);
    _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_7__.each(this.series.iterator(), function (series) {
      series.validateRawData();
    });
    this.zoomToChartDataItem(this._homeDataItem);
  };
  /**
   * ==========================================================================
   * TREEMAP LAYOUT FUNCTIONS
   * ==========================================================================
   * @hidden
   */

  /**
   * The functions below are from D3.js library (https://d3js.org/)
   *
   * --------------------------------------------------------------------------
   * Copyright 2017 Mike Bostock
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions are met:
   *
   * 1. Redistributions of source code must retain the above copyright notice,
   *    this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice,this list of conditions and the following disclaimer in the
   *    documentation and/or other materials provided with the distribution.
   *
   * 3. Neither the name of the copyright holder nor the names of its
   *    contributors may be used to endorse or promote products derived from
   *    this software without specific prior written permission.
   *
   * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
   * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
   * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
   * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
   * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
   * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
   * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
   * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
   * POSSIBILITY OF SUCH DAMAGE.
   * --------------------------------------------------------------------------
   * @hidden
   */

  /**
   * Treemap layout algorithm: binaryTree.
   *
   * @ignore Exclude from docs
   * @param parent  Data item
   */


  TreeMap.prototype.binaryTree = function (parent) {
    var nodes = parent.children,
        i,
        n = nodes.length,
        sum,
        sums = new Array(n + 1);

    for (sums[0] = sum = i = 0; i < n; ++i) {
      sums[i + 1] = sum += nodes.getIndex(i).value;
    }

    if (n > 0) {
      partition(0, n, parent.value, parent.x0, parent.y0, parent.x1, parent.y1);
    }

    function partition(i, j, value, x0, y0, x1, y1) {
      if (i >= j - 1) {
        var node = nodes.getIndex(i);
        node.x0 = x0;
        node.y0 = y0;
        node.x1 = x1;
        node.y1 = y1;
        return;
      }

      var valueOffset = sums[i],
          valueTarget = value / 2 + valueOffset,
          k = i + 1,
          hi = j - 1;

      while (k < hi) {
        var mid = k + hi >>> 1;

        if (sums[mid] < valueTarget) {
          k = mid + 1;
        } else {
          hi = mid;
        }
      }

      if (valueTarget - sums[k - 1] < sums[k] - valueTarget && i + 1 < k) {
        --k;
      }

      var valueLeft = sums[k] - valueOffset,
          valueRight = value - valueLeft;

      if (value == 0) {
        var node = nodes.getIndex(i);
        node.x0 = x0;
        node.y0 = y0;
        node.x1 = x1;
        node.y1 = y1;
        return;
      }

      if (x1 - x0 > y1 - y0) {
        var xk = (x0 * valueRight + x1 * valueLeft) / value;
        partition(i, k, valueLeft, x0, y0, xk, y1);
        partition(k, j, valueRight, xk, y0, x1, y1);
      } else {
        var yk = (y0 * valueRight + y1 * valueLeft) / value;
        partition(i, k, valueLeft, x0, y0, x1, yk);
        partition(k, j, valueRight, x0, yk, x1, y1);
      }
    }
  };
  /**
   * Treemap layout algorithm: slice.
   *
   * @ignore Exclude from docs
   * @param parent  Data item
   */


  TreeMap.prototype.slice = function (parent) {
    var x0 = parent.x0;
    var x1 = parent.x1;
    var y0 = parent.y0;
    var y1 = parent.y1;
    var nodes = parent.children;
    var node;
    var i = -1;
    var n = nodes.length;
    var k = parent.value && (y1 - y0) / parent.value;

    while (++i < n) {
      node = nodes.getIndex(i);
      node.x0 = x0;
      node.x1 = x1;
      node.y0 = y0;
      y0 += node.value * k;
      node.y1 = y0;
    }
  };
  /**
   * Treemap layout algorithm: dice.
   *
   * @ignore Exclude from docs
   * @param parent  Data item
   */


  TreeMap.prototype.dice = function (parent) {
    var x0 = parent.x0;
    var x1 = parent.x1;
    var y0 = parent.y0;
    var y1 = parent.y1;
    var nodes = parent.children,
        node,
        i = -1,
        n = nodes.length,
        k = parent.value && (x1 - x0) / parent.value;

    while (++i < n) {
      node = nodes.getIndex(i);
      node.y0 = y0;
      node.y1 = y1;
      node.x0 = x0;
      x0 += node.value * k;
      node.x1 = x0;
    }
  };
  /**
   * Treemap layout algorithm: slideDice.
   *
   * @ignore Exclude from docs
   * @param parent  Data item
   */


  TreeMap.prototype.sliceDice = function (parent) {
    if (parent.level & 1) {
      this.slice(parent);
    } else {
      this.dice(parent);
    }
  };
  /**
   * Treemap layout algorithm: squarify.
   *
   * @ignore Exclude from docs
   * @param parent  Data item
   */


  TreeMap.prototype.squarify = function (parent) {
    var ratio = (1 + Math.sqrt(5)) / 2;
    var x0 = parent.x0;
    var x1 = parent.x1;
    var y0 = parent.y0;
    var y1 = parent.y1;
    var nodes = parent.children;
    var nodeValue;
    var i0 = 0;
    var i1 = 0;
    var n = nodes.length;
    var dx;
    var dy;
    var value = parent.value;
    var sumValue;
    var minValue;
    var maxValue;
    var newRatio;
    var minRatio;
    var alpha;
    var beta;

    while (i0 < n) {
      dx = x1 - x0;
      dy = y1 - y0; // Find the next non-empty node.

      do {
        sumValue = nodes.getIndex(i1++).value;
      } while (!sumValue && i1 < n);

      minValue = maxValue = sumValue;
      alpha = Math.max(dy / dx, dx / dy) / (value * ratio);
      beta = sumValue * sumValue * alpha;
      minRatio = Math.max(maxValue / beta, beta / minValue); // Keep adding nodes while the aspect ratio maintains or improves.

      for (; i1 < n; ++i1) {
        sumValue += nodeValue = nodes.getIndex(i1).value;

        if (nodeValue < minValue) {
          minValue = nodeValue;
        }

        if (nodeValue > maxValue) {
          maxValue = nodeValue;
        }

        beta = sumValue * sumValue * alpha;
        newRatio = Math.max(maxValue / beta, beta / minValue);

        if (newRatio > minRatio) {
          sumValue -= nodeValue;
          break;
        }

        minRatio = newRatio;
      } // Position and record the row orientation.


      var row = this.dataItems.template.clone();
      row.value = sumValue;
      row.dice = dx < dy;
      row.children = nodes.slice(i0, i1);
      row.x0 = x0;
      row.y0 = y0;
      row.x1 = x1;
      row.y1 = y1;

      if (row.dice) {
        row.y1 = value ? y0 += dy * sumValue / value : y1;
        this.dice(row);
      } else {
        row.x1 = value ? x0 += dx * sumValue / value : x1;
        this.slice(row);
      }

      value -= sumValue;
      i0 = i1;
    }
  };

  TreeMap.prototype.handleSeriesAdded2 = function () {// void
  };
  /**
   * [handleDataItemValueChange description]
   *
   * @ignore Exclude from docs
   * @todo Description
   */


  TreeMap.prototype.handleDataItemValueChange = function (dataItem, name) {
    if (name == "value") {
      this.invalidateDataItems();
    }
  };

  TreeMap.prototype.handleDataItemWorkingValueChange = function (dataItem, name) {
    if (name == "value") {
      this.invalidateDataItems();
    }
  };

  TreeMap.prototype.getLegendLevel = function (dataItem) {
    if (!dataItem) {
      return;
    }

    if (!dataItem.children) {
      return;
    }

    if (dataItem.children.length > 1) {
      return dataItem;
    } else if (dataItem.children.length == 1) {
      var child = dataItem.children.getIndex(0);

      if (child.children) {
        return this.getLegendLevel(child);
      } else {
        return dataItem;
      }
    } else {
      return dataItem;
    }
  };

  TreeMap.prototype.handleLegendSeriesAdded = function (series) {// void
  };

  Object.defineProperty(TreeMap.prototype, "homeDataItem", {
    /**
     * A data item associated with top node.
     *
     * @since 4.8.2
     */
    get: function get() {
      return this._homeDataItem;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Setups the legend to use the chart's data.
   * @ignore
   */

  TreeMap.prototype.feedLegend = function () {
    var legend = this.legend;

    if (legend) {
      legend.dataFields.name = "name";
      var legendParent = this.getLegendLevel(this._homeDataItem);

      if (legendParent) {
        var legendData_1 = [];
        legendParent.children.each(function (dataItem) {
          //if (!dataItem.hiddenInLegend) {
          legendData_1.push(dataItem); //}
        });
        legend.data = legendData_1;
      }
    }
  };
  /**
   * @ignore
   */


  TreeMap.prototype.disposeData = function () {
    _super.prototype.disposeData.call(this);

    this._homeDataItem = undefined;
    this.series.clear();

    if (this.navigationBar) {
      this.navigationBar.disposeData();
    }

    this.xAxis.disposeData();
    this.yAxis.disposeData();
  };
  /**
   * Since this chart uses hierarchical data, we need to remove childrent
   * dataField from export of non-hierarchical formats such as CSV and XSLX.
   *
   * @return Export
   */


  TreeMap.prototype.getExporting = function () {
    var _this = this;

    var exporting = _super.prototype.getExporting.call(this);

    exporting.adapter.add("formatDataFields", function (info) {
      if (info.format == "csv" || info.format == "xlsx") {
        if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_8__.hasValue(_this.dataFields.children)) {
          delete info.dataFields[_this.dataFields.children];
        }
      }

      return info;
    });
    return exporting;
  };

  return TreeMap;
}(_XYChart__WEBPACK_IMPORTED_MODULE_0__.XYChart);


/**
 * Register class, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses.TreeMap = TreeMap;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/types/XYChart.js":
/*!****************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/types/XYChart.js ***!
  \****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "XYChart": () => (/* binding */ XYChart),
/* harmony export */   "XYChartDataItem": () => (/* binding */ XYChartDataItem)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _SerialChart__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./SerialChart */ "./node_modules/@amcharts/amcharts4/.internal/charts/types/SerialChart.js");
/* harmony import */ var _core_Container__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/Container */ "./node_modules/@amcharts/amcharts4/.internal/core/Container.js");
/* harmony import */ var _core_utils_List__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/utils/List */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/List.js");
/* harmony import */ var _core_utils_Color__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/utils/Color */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Color.js");
/* harmony import */ var _axes_ValueAxis__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../axes/ValueAxis */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/ValueAxis.js");
/* harmony import */ var _axes_DateAxis__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../axes/DateAxis */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/DateAxis.js");
/* harmony import */ var _axes_AxisRendererX__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../axes/AxisRendererX */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisRendererX.js");
/* harmony import */ var _axes_AxisRendererY__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../axes/AxisRendererY */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisRendererY.js");
/* harmony import */ var _axes_CategoryAxis__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../axes/CategoryAxis */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/CategoryAxis.js");
/* harmony import */ var _series_XYSeries__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../series/XYSeries */ "./node_modules/@amcharts/amcharts4/.internal/charts/series/XYSeries.js");
/* harmony import */ var _core_utils_Disposer__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../core/utils/Disposer */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Disposer.js");
/* harmony import */ var _core_elements_ZoomOutButton__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../core/elements/ZoomOutButton */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/ZoomOutButton.js");
/* harmony import */ var _core_utils_Percent__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../core/utils/Percent */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Percent.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _elements_XYChartScrollbar__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../elements/XYChartScrollbar */ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/XYChartScrollbar.js");
/* harmony import */ var _core_utils_Math__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../core/utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
/* harmony import */ var _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../core/utils/Iterator */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Iterator.js");
/* harmony import */ var _core_utils_Type__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../core/utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/* harmony import */ var _core_utils_Utils__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../core/utils/Utils */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Utils.js");
/* harmony import */ var _core_utils_Array__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../core/utils/Array */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Array.js");
/* harmony import */ var _core_utils_Number__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../core/utils/Number */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Number.js");
/* harmony import */ var _core_utils_Responsive__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../core/utils/Responsive */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Responsive.js");
/**
 * XY Chart module.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */























/**
 * ============================================================================
 * DATA ITEM
 * ============================================================================
 * @hidden
 */

/**
 * Defines a [[DataItem]] for [[XYChart]].
 *
 * @see {@link DataItem}
 */

var XYChartDataItem =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_22__.__extends)(XYChartDataItem, _super);
  /**
   * Constructor
   */


  function XYChartDataItem() {
    var _this = _super.call(this) || this;

    _this.className = "XYChartDataItem";

    _this.applyTheme();

    return _this;
  }

  return XYChartDataItem;
}(_SerialChart__WEBPACK_IMPORTED_MODULE_0__.SerialChartDataItem);


/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Creates an XY chart, and any derivative chart, like Serial, Date-based, etc.
 *
 * Basically this is a chart type, that is used to display any chart
 * information in a square plot area.
 *
 * The horizontal and vertical scale is determined by the type of Axis.
 *
 * The plot types are determined by type of Series.
 *
 * ```TypeScript
 * // Includes
 * import * as am4core from "@amcharts/amcharts4/core";
 * import * as am4charts from "@amcharts/amcharts4/charts";
 *
 * // Create chart
 * let chart = am4core.create("chartdiv", am4charts.XYChart);
 *
 * // Add Data
 * chart.data = [{
 * "country": "USA",
 * "visits": 3025
 * }, {
 * 	"country": "China",
 * 	"visits": 1882
 * }, {
 * 	"country": "Japan",
 * 	"visits": 1809
 * }];
 *
 * // Add category axis
 * let categoryAxis = chart.xAxes.push(new am4charts.CategoryAxis());
 * categoryAxis.dataFields.category = "country";
 *
 * // Add value axis
 * let valueAxis = chart.yAxes.push(new am4charts.ValueAxis());
 *
 * // Add series
 * let series = chart.series.push(new am4charts.ColumnSeries());
 * series.name = "Web Traffic";
 * series.dataFields.categoryX = "country";
 * series.dataFields.valueY = "visits";
 * ```
 * ```JavaScript
 * // Create chart
 * var chart = am4core.create("chartdiv", am4charts.XYChart);
 *
 * // The following would work as well:
 * // var chart = am4core.create("chartdiv", "XYChart");
 *
 * // Add Data
 * chart.data = [{
 * "country": "USA",
 * "visits": 3025
 * }, {
 * 	"country": "China",
 * 	"visits": 1882
 * }, {
 * 	"country": "Japan",
 * 	"visits": 1809
 * }];
 *
 * // Add category axis
 * var categoryAxis = chart.xAxes.push(new am4charts.CategoryAxis());
 * categoryAxis.dataFields.category = "country";
 *
 * // Add value axis
 * var valueAxis = chart.yAxes.push(new am4charts.ValueAxis());
 *
 * // Add series
 * var series = chart.series.push(new am4charts.ColumnSeries());
 * series.name = "Web Traffic";
 * series.dataFields.categoryX = "country";
 * series.dataFields.valueY = "visits";
 * ```
 * ```JSON
 * var chart = am4core.createFromConfig({
 *
 * 	// Category axis
 * 	"xAxes": [{
 * 		"type": "CategoryAxis",
 * 		"dataFields": {
 * 			"category": "country"
 * 		}
 * 	}],
 *
 * 	// Value axis
 * 	"yAxes": [{
 * 		"type": "ValueAxis"
 * 	}],
 *
 * 	// Series
 * 	"series": [{
 * 		"type": "ColumnSeries",
 * 		"dataFields": {
 * 			"categoryX": "country",
 * 			"valueY": "visits"
 * 		},
 * 		"name": "Web Traffic"
 * 	}],
 *
 * 	// Cursor
 * 	"cursor": {},
 *
 * 	// Data
 * 	"data": [{
 * 		"country": "USA",
 * 		"visits": 3025
 * 	}, {
 * 		"country": "China",
 * 		"visits": 1882
 * 	}, {
 * 		"country": "Japan",
 * 		"visits": 1809
 * 	}]
 *
 * }, "chartdiv", "XYChart");
 * ```
 *
 *
 * @see {@link IXYChartEvents} for a list of available Events
 * @see {@link IXYChartAdapters} for a list of available Adapters
 * @see {@link https://www.amcharts.com/docs/v4/chart-types/xy-chart/} for documentation
 * @important
 */

var XYChart =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_22__.__extends)(XYChart, _super);
  /**
   * Constructor
   */


  function XYChart() {
    var _this = // Init
    _super.call(this) || this;
    /**
     * Defines the type of horizontal axis rederer.
     */


    _this._axisRendererX = _axes_AxisRendererX__WEBPACK_IMPORTED_MODULE_6__.AxisRendererX;
    /**
     * Defines the type of vertical axis rederer.
     */

    _this._axisRendererY = _axes_AxisRendererY__WEBPACK_IMPORTED_MODULE_7__.AxisRendererY;
    /**
     * @ignore
     */

    _this._seriesPoints = [];
    _this.className = "XYChart"; // Set defaults
    //this.margin(10, 10, 10, 10);

    _this.maskBullets = true;
    _this.arrangeTooltips = true; // Create main chart container

    var chartContainer = _this.chartContainer;
    chartContainer.layout = "vertical";

    _this.padding(15, 15, 15, 15); // Create top axes container


    var topAxesCont = chartContainer.createChild(_core_Container__WEBPACK_IMPORTED_MODULE_1__.Container);
    topAxesCont.shouldClone = false;
    topAxesCont.layout = "vertical";
    topAxesCont.width = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_12__.percent)(100);
    topAxesCont.zIndex = 1;
    _this.topAxesContainer = topAxesCont; // Create vertical axes and plot area container
    // Plot area and vertical axes share the whole width of the chart,
    // so we need to put then into a separate container so that layouting
    // engine takes care of the positioning

    var yAxesAndPlotCont = chartContainer.createChild(_core_Container__WEBPACK_IMPORTED_MODULE_1__.Container);
    yAxesAndPlotCont.shouldClone = false;
    yAxesAndPlotCont.layout = "horizontal";
    yAxesAndPlotCont.width = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_12__.percent)(100);
    yAxesAndPlotCont.height = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_12__.percent)(100);
    yAxesAndPlotCont.zIndex = 0;
    _this.yAxesAndPlotContainer = yAxesAndPlotCont; // Create a container for bottom axes

    var bottomAxesCont = chartContainer.createChild(_core_Container__WEBPACK_IMPORTED_MODULE_1__.Container);
    bottomAxesCont.shouldClone = false;
    bottomAxesCont.width = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_12__.percent)(100);
    bottomAxesCont.layout = "vertical";
    bottomAxesCont.zIndex = 1;
    _this.bottomAxesContainer = bottomAxesCont; // Create a container for left-side axes

    var leftAxesCont = yAxesAndPlotCont.createChild(_core_Container__WEBPACK_IMPORTED_MODULE_1__.Container);
    leftAxesCont.shouldClone = false;
    leftAxesCont.layout = "horizontal";
    leftAxesCont.height = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_12__.percent)(100);
    leftAxesCont.contentAlign = "right";
    leftAxesCont.events.on("transformed", _this.updateXAxesMargins, _this, false);
    leftAxesCont.zIndex = 1;
    _this.leftAxesContainer = leftAxesCont; // Create a container for plot area

    var plotCont = yAxesAndPlotCont.createChild(_core_Container__WEBPACK_IMPORTED_MODULE_1__.Container);
    plotCont.shouldClone = false;
    plotCont.height = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_12__.percent)(100);
    plotCont.width = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_12__.percent)(100); // Create transparend background for plot container so that hover works
    // on all of it

    plotCont.background.fillOpacity = 0;
    _this.plotContainer = plotCont; // must go below plot container

    _this.mouseWheelBehavior = "none";
    _this._cursorContainer = plotCont; // Create a container for right-side axes

    var rightAxesCont = yAxesAndPlotCont.createChild(_core_Container__WEBPACK_IMPORTED_MODULE_1__.Container);
    rightAxesCont.shouldClone = false;
    rightAxesCont.layout = "horizontal";
    rightAxesCont.height = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_12__.percent)(100);
    rightAxesCont.zIndex = 1;
    rightAxesCont.events.on("transformed", _this.updateXAxesMargins, _this, false);
    _this.rightAxesContainer = rightAxesCont;
    _this.seriesContainer.parent = plotCont;
    _this.bulletsContainer.parent = plotCont;
    var zoomOutButton = plotCont.createChild(_core_elements_ZoomOutButton__WEBPACK_IMPORTED_MODULE_11__.ZoomOutButton);
    zoomOutButton.shouldClone = false;
    zoomOutButton.align = "right";
    zoomOutButton.valign = "top";
    zoomOutButton.zIndex = Number.MAX_SAFE_INTEGER;
    zoomOutButton.marginTop = 5;
    zoomOutButton.marginRight = 5;
    zoomOutButton.hide(0);
    _this.zoomOutButton = zoomOutButton; // Create a container for bullets

    var axisBulletsContainer = _this.plotContainer.createChild(_core_Container__WEBPACK_IMPORTED_MODULE_1__.Container);

    axisBulletsContainer.shouldClone = false;
    axisBulletsContainer.width = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_12__.percent)(100);
    axisBulletsContainer.height = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_12__.percent)(100);
    axisBulletsContainer.isMeasured = false;
    axisBulletsContainer.zIndex = 4;
    axisBulletsContainer.layout = "none";
    _this.axisBulletsContainer = axisBulletsContainer;
    _this._bulletMask = _this.plotContainer;

    _this.events.on("beforedatavalidated", function () {
      _this.series.each(function (series) {
        series.dataGrouped = false;
        series._baseInterval = {};
      });
    }, _this, false); // Apply theme


    _this.applyTheme();

    return _this;
  }
  /**
   * Sets defaults that instantiate some objects that rely on parent, so they
   * cannot be set in constructor.
   */


  XYChart.prototype.applyInternalDefaults = function () {
    _super.prototype.applyInternalDefaults.call(this);

    this.zoomOutButton.exportable = false; // Add a default screen reader title for accessibility
    // This will be overridden in screen reader if there are any `titles` set

    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.hasValue(this.readerTitle)) {
      this.readerTitle = this.language.translate("X/Y chart");
    }
  };
  /**
   * Draws the chart.
   *
   * @ignore Exclude from docs
   */


  XYChart.prototype.draw = function () {
    _super.prototype.draw.call(this);

    this.seriesContainer.toFront();
    this.bulletsContainer.toFront();

    if (this.maskBullets) {
      this.bulletsContainer.mask = this._bulletMask;
    }

    this.updateSeriesLegend();
  };
  /**
   * Triggers a redrawing of all chart's series.
   *
   * @ignore Exclude from docs
   */


  XYChart.prototype.updatePlotElements = function () {
    _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_16__.each(this.series.iterator(), function (series) {
      series.invalidate();
    });
  };
  /**
   * Triggers data (re)validation which in turn can cause a redraw of the
   * whole chart or just aprticular series / elements.
   *
   * @ignore Exclude from docs
   */


  XYChart.prototype.validateData = function () {
    // tell axes that data changed
    if (this._parseDataFrom == 0) {
      _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_16__.each(this.xAxes.iterator(), function (axis) {
        axis.dataChangeUpdate();
      });
      _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_16__.each(this.yAxes.iterator(), function (axis) {
        axis.dataChangeUpdate();
      });
      _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_16__.each(this.series.iterator(), function (series) {
        series.dataChangeUpdate();
      });
    }

    _super.prototype.validateData.call(this);
  };
  /**
   * Updates margins for horizontal axes based on settings and available space.
   *
   * @ignore Exclude from docs
   */


  XYChart.prototype.updateXAxesMargins = function () {
    var leftAxesWidth = this.leftAxesContainer.measuredWidth;
    var rightAxesWidth = this.rightAxesContainer.measuredWidth;
    var bottomAxesCont = this.bottomAxesContainer;

    if (bottomAxesCont.paddingLeft != leftAxesWidth || bottomAxesCont.paddingRight != rightAxesWidth) {
      bottomAxesCont.paddingLeft = leftAxesWidth;
      bottomAxesCont.paddingRight = rightAxesWidth;
    }

    var topAxesCont = this.topAxesContainer;

    if (topAxesCont.paddingLeft != leftAxesWidth || topAxesCont.paddingRight != rightAxesWidth) {
      topAxesCont.paddingLeft = leftAxesWidth;
      topAxesCont.paddingRight = rightAxesWidth;
    }
  };
  /**
   * Triggers a re-initialization of this element.
   *
   * Will result in complete redrawing of the element.
   *
   * @ignore Exclude from docs
   */


  XYChart.prototype.reinit = function () {
    _super.prototype.reinit.call(this);

    this.series.each(function (series) {
      series.appeared = false;
    });
  };
  /**
   * Triggers an update on the horizontal axis when one of its properties
   * change.
   *
   * @ignore Exclude from docs
   * @param event An event object
   */


  XYChart.prototype.handleXAxisChange = function (event) {
    this.updateXAxis(event.target);
  };
  /**
   * Triggers an update on the vertical axis when one of its properties
   * change.
   *
   * @ignore Exclude from docs
   * @param event An event object
   */


  XYChart.prototype.handleYAxisChange = function (event) {
    this.updateYAxis(event.target);
  };
  /**
   * Sets up a new horizontal (X) axis when it is added to the chart.
   *
   * @ignore Exclude from docs
   * @param event  Axis insert event
   */


  XYChart.prototype.processXAxis = function (event) {
    var axis = event.newValue;
    axis.chart = this;

    if (!axis.renderer) {
      axis.renderer = new this._axisRendererX();
      axis.renderer.observe(["opposite", "inside", "inversed", "minGridDistance"], this.handleXAxisChange, this, false);
    }

    axis.axisLetter = "X";
    axis.events.on("startendchanged", this.handleXAxisRangeChange, this, false); //axis.events.on("endchanged", this.handleXAxisRangeChange, this, false);
    // Although axis does not use data directly, we set dataProvider here
    // (but not add to chart data users) to hold up rendering before data
    // is parsed (system handles this)

    axis.dataProvider = this;
    this.updateXAxis(axis.renderer);
    this.processAxis(axis);
  };
  /**
   * Sets up a new vertical (Y) axis when it is added to the chart.
   *
   * @ignore Exclude from docs
   * @param event Axis insert event
   */


  XYChart.prototype.processYAxis = function (event) {
    var axis = event.newValue;
    axis.chart = this;

    if (!axis.renderer) {
      axis.renderer = new this._axisRendererY();
      axis.renderer.observe(["opposite", "inside", "inversed", "minGridDistance"], this.handleYAxisChange, this, false);
    }

    axis.axisLetter = "Y";
    axis.events.on("startendchanged", this.handleYAxisRangeChange, this, false); //axis.events.on("endchanged", this.handleYAxisRangeChange, this, false);
    // Although axis does not use data directly, we set dataProvider here
    // (but not add to chart data users) to hold up rendering before data
    // is parsed (system handles this)

    axis.dataProvider = this;
    this.updateYAxis(axis.renderer);
    this.processAxis(axis);
  };
  /**
   * Updates horizontal (X) scrollbar and other horizontal axis whenever axis'
   * value range changes.
   */


  XYChart.prototype.handleXAxisRangeChange = function () {
    var range = this.getCommonAxisRange(this.xAxes);

    if (this.scrollbarX) {
      this.zoomAxes(this.xAxes, range, true);
    }

    this.toggleZoomOutButton();
    this.updateScrollbar(this.scrollbarX, range);
  };
  /**
   * Shows or hides the Zoom Out button depending on whether the chart is fully
   * zoomed out or not.
   */


  XYChart.prototype.toggleZoomOutButton = function () {
    if (this.zoomOutButton) {
      var show_1 = false;
      _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_16__.eachContinue(this.xAxes.iterator(), function (axis) {
        if (axis.toggleZoomOutButton) {
          if (axis.maxZoomCount > 0) {
            var minZoomFactor = axis.maxZoomFactor / axis.maxZoomCount;

            if (_core_utils_Math__WEBPACK_IMPORTED_MODULE_15__.round(axis.end - axis.start, 3) < 1 / minZoomFactor) {
              show_1 = true;
              return false;
            }
          } else {
            if (_core_utils_Math__WEBPACK_IMPORTED_MODULE_15__.round(axis.start, 3) > 0 || _core_utils_Math__WEBPACK_IMPORTED_MODULE_15__.round(axis.end, 3) < 1) {
              show_1 = true;
              return false;
            }
          }
        }

        return true;
      });
      _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_16__.eachContinue(this.yAxes.iterator(), function (axis) {
        if (axis.toggleZoomOutButton) {
          if (axis.maxZoomCount > 0) {
            var minZoomFactor = axis.maxZoomFactor / axis.maxZoomCount;

            if (_core_utils_Math__WEBPACK_IMPORTED_MODULE_15__.round(axis.end - axis.start, 3) < 1 / minZoomFactor) {
              show_1 = true;
              return false;
            }
          } else {
            if (_core_utils_Math__WEBPACK_IMPORTED_MODULE_15__.round(axis.start, 3) > 0 || _core_utils_Math__WEBPACK_IMPORTED_MODULE_15__.round(axis.end, 3) < 1) {
              show_1 = true;
              return false;
            }
          }

          return true;
        }
      });

      if (!this.seriesAppeared) {
        show_1 = false;
      }

      if (show_1) {
        this.zoomOutButton.show();
      } else {
        this.zoomOutButton.hide();
      }
    }
  };
  /**
   * @ignore
   * moved this check to a separate method so that we could override it in TreeMapSeries
   */


  XYChart.prototype.seriesAppeared = function () {
    var appeared = false;
    _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_16__.each(this.series.iterator(), function (series) {
      if (!series.appeared) {
        appeared = false;
        return false;
      }
    });
    return appeared;
  };
  /**
   * Updates vertical (Y) scrollbar and other horizontal axis whenever axis'
   * value range changes.
   */


  XYChart.prototype.handleYAxisRangeChange = function () {
    var range = this.getCommonAxisRange(this.yAxes);

    if (this.scrollbarY) {
      this.zoomAxes(this.yAxes, range, true);
    }

    this.toggleZoomOutButton();
    this.updateScrollbar(this.scrollbarY, range);
  };
  /**
   * Updates a relative scrollbar whenever data range of the axis changes.
   *
   * @param scrollbar  Scrollbar instance
   * @param range      New data (values) range of the axis
   */


  XYChart.prototype.updateScrollbar = function (scrollbar, range) {
    if (scrollbar) {
      scrollbar.skipRangeEvents();
      scrollbar.start = range.start;
      scrollbar.end = range.end;
    }
  };
  /**
   * Returns a common range of values between a list of axes.
   *
   * This is used to synchronize the zoom between multiple axes.
   *
   * @ignore Exclude from docs
   * @param axes  A list of axes
   * @return Common value range
   */


  XYChart.prototype.getCommonAxisRange = function (axes) {
    var start;
    var end;
    axes.each(function (axis) {
      if (!axis.zoomable || axis instanceof _axes_ValueAxis__WEBPACK_IMPORTED_MODULE_4__.ValueAxis && axis.syncWithAxis) {} else {
        var axisStart = axis.start;
        var axisEnd = axis.end;

        if (axis.renderer.inversed) {
          axisStart = 1 - axis.end;
          axisEnd = 1 - axis.start;
        }

        if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.isNumber(start) || axisStart < start) {
          start = axisStart;
        }

        if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.isNumber(end) || axisEnd > end) {
          end = axisEnd;
        }
      }
    });
    return {
      start: start,
      end: end
    };
  };
  /**
   * Triggers (re)rendering of the horizontal (X) axis.
   *
   * @ignore Exclude from docs
   * @param axis  Axis
   */


  XYChart.prototype.updateXAxis = function (renderer) {
    var axis = renderer.axis;

    if (renderer.opposite) {
      axis.parent = this.topAxesContainer;
      axis.toFront();
    } else {
      axis.parent = this.bottomAxesContainer;
      axis.toBack();
    }

    if (axis.renderer) {
      axis.renderer.processRenderer();
    }
  };
  /**
   * Triggers (re)rendering of the vertical (Y) axis.
   *
   * @ignore Exclude from docs
   * @param axis  Axis
   */


  XYChart.prototype.updateYAxis = function (renderer) {
    var axis = renderer.axis;

    if (renderer.opposite) {
      axis.parent = this.rightAxesContainer;
      axis.toBack();
    } else {
      axis.parent = this.leftAxesContainer;
      axis.toFront();
    }

    if (axis.renderer) {
      axis.renderer.processRenderer();
    }
  };
  /**
   * Decorates an Axis for use with this chart, e.g. sets proper renderer
   * and containers for placement.
   *
   * @param axis  Axis
   */


  XYChart.prototype.processAxis = function (axis) {
    var _this = this; // Value axis does not use data directly, only category axis does


    if (axis instanceof _axes_CategoryAxis__WEBPACK_IMPORTED_MODULE_8__.CategoryAxis) {
      this._dataUsers.moveValue(axis);
    }

    var renderer = axis.renderer;
    renderer.gridContainer.parent = this.plotContainer;
    renderer.gridContainer.toBack();
    renderer.breakContainer.parent = this.plotContainer;
    renderer.breakContainer.toFront();
    renderer.breakContainer.zIndex = 10;
    axis.addDisposer(new _core_utils_Disposer__WEBPACK_IMPORTED_MODULE_10__.Disposer(function () {
      _this.dataUsers.removeValue(axis);
    }));
    renderer.bulletsContainer.parent = this.axisBulletsContainer;

    this._disposers.push(axis.events.on("positionchanged", function () {
      var point = _core_utils_Utils__WEBPACK_IMPORTED_MODULE_18__.spritePointToSprite({
        x: 0,
        y: 0
      }, axis, _this.axisBulletsContainer);

      if (axis.renderer instanceof _axes_AxisRendererY__WEBPACK_IMPORTED_MODULE_7__.AxisRendererY) {
        renderer.bulletsContainer.y = point.y;
      }

      if (axis.renderer instanceof _axes_AxisRendererX__WEBPACK_IMPORTED_MODULE_6__.AxisRendererX) {
        renderer.bulletsContainer.x = point.x;
      }
    }, undefined, false));

    this.plotContainer.events.on("maxsizechanged", function () {
      if (_this.inited) {
        axis.invalidateDataItems();

        _this.updateSeriesMasks();
      }
    }, axis, false);
  };
  /**
   * This is done because for some reason IE doesn't change mask if path of a
   * mask changes.
   */


  XYChart.prototype.updateSeriesMasks = function () {
    if (_core_utils_Utils__WEBPACK_IMPORTED_MODULE_18__.isIE()) {
      this.series.each(function (series) {
        var mask = series.mainContainer.mask;
        series.mainContainer.mask = undefined;
        series.mainContainer.mask = mask;
      });
    }
  };

  XYChart.prototype.handleSeriesRemoved = function (event) {
    var series = event.oldValue;

    if (series) {
      if (series.xAxis) {
        series.xAxis.series.removeValue(series);
        series.xAxis.invalidateProcessedData();
      }

      if (series.yAxis) {
        series.yAxis.series.removeValue(series);
        series.yAxis.invalidateProcessedData();
      } // otherwise extremes won't change


      this.series.each(function (series) {
        series.resetExtremes();
      });
    }

    _super.prototype.handleSeriesRemoved.call(this, event);
  };

  Object.defineProperty(XYChart.prototype, "xAxes", {
    /**
     * A list of horizontal (X) axes.
     *
     * @return List of axes
     */
    get: function get() {
      if (!this._xAxes) {
        this._xAxes = new _core_utils_List__WEBPACK_IMPORTED_MODULE_2__.List();

        this._xAxes.events.on("inserted", this.processXAxis, this, false);

        this._xAxes.events.on("removed", this.handleAxisRemoval, this, false);

        this._disposers.push(new _core_utils_List__WEBPACK_IMPORTED_MODULE_2__.ListDisposer(this._xAxes, false));
      }

      return this._xAxes;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * @ignore
   */

  XYChart.prototype.handleAxisRemoval = function (event) {
    var axis = event.oldValue;
    this.dataUsers.removeValue(axis); // need to remove, as it might not be disposed

    if (axis.autoDispose) {
      axis.dispose();
    }
  };

  Object.defineProperty(XYChart.prototype, "yAxes", {
    /**
     * A list of vertical (Y) axes.
     *
     * @return List of axes
     */
    get: function get() {
      if (!this._yAxes) {
        this._yAxes = new _core_utils_List__WEBPACK_IMPORTED_MODULE_2__.List();

        this._yAxes.events.on("inserted", this.processYAxis, this, false);

        this._yAxes.events.on("removed", this.handleAxisRemoval, this, false);

        this._disposers.push(new _core_utils_List__WEBPACK_IMPORTED_MODULE_2__.ListDisposer(this._yAxes, false));
      }

      return this._yAxes;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Decorates a new [[XYSeries]] object with required parameters when it is
   * added to the chart.
   *
   * @ignore Exclude from docs
   * @param event  Event
   */

  XYChart.prototype.handleSeriesAdded = function (event) {
    try {
      _super.prototype.handleSeriesAdded.call(this, event);

      var series = event.newValue;

      if (this.xAxes.length == 0 || this.yAxes.length == 0) {
        _core_Registry__WEBPACK_IMPORTED_MODULE_13__.registry.removeFromInvalidComponents(series);
        series.dataInvalid = false;
      }

      _core_utils_Utils__WEBPACK_IMPORTED_MODULE_18__.used(series.xAxis); // this is enough to get axis, handled in getter

      _core_utils_Utils__WEBPACK_IMPORTED_MODULE_18__.used(series.yAxis); // this is enough to get axis, handled in getter

      series.maskBullets = series.maskBullets;

      if (series.fill == undefined) {
        if (this.patterns) {
          if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.hasValue(series.stroke)) {
            series.stroke = this.colors.next();
          }

          series.fill = this.patterns.next();

          if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.hasValue(series.fillOpacity)) {
            series.fill.backgroundOpacity = series.fillOpacity;
          }

          if (series.stroke instanceof _core_utils_Color__WEBPACK_IMPORTED_MODULE_3__.Color) {
            series.fill.stroke = series.stroke;
            series.fill.fill = series.stroke;
          }
        } else {
          series.fill = this.colors.next();
        }
      }

      if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.hasValue(series.stroke)) {
        series.stroke = series.fill;
      }
    } catch (e) {
      this.raiseCriticalError(e);
    }
  };

  Object.defineProperty(XYChart.prototype, "cursor", {
    /**
     * @return Cursor
     */
    get: function get() {
      return this._cursor;
    },

    /**
     * Chart's [[Cursor]].
     *
     * @param cursor  Cursor
     */
    set: function set(cursor) {
      if (this._cursor != cursor) {
        if (this._cursor) {
          this.removeDispose(this._cursor);
        }

        this._cursor = cursor;

        if (cursor) {
          // TODO this is wrong, fix it
          this._disposers.push(cursor);

          cursor.chart = this;
          cursor.shouldClone = false;
          cursor.parent = this._cursorContainer;
          cursor.events.on("cursorpositionchanged", this.handleCursorPositionChange, this, false);
          cursor.events.on("zoomstarted", this.handleCursorZoomStart, this, false);
          cursor.events.on("zoomended", this.handleCursorZoomEnd, this, false);
          cursor.events.on("panstarted", this.handleCursorPanStart, this, false);
          cursor.events.on("panning", this.handleCursorPanning, this, false);
          cursor.events.on("panended", this.handleCursorPanEnd, this, false);
          cursor.events.on("behaviorcanceled", this.handleCursorCanceled, this, false);
          cursor.events.on("hidden", this.handleHideCursor, this, false);
          cursor.zIndex = Number.MAX_SAFE_INTEGER - 1;

          if (this.tapToActivate) {
            // We need this in order to setup cursor properly
            this.setTapToActivate(this.tapToActivate);
          }
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Performs tasks when the cursor's position changes, e.g. shows proper
   * tooltips on axes and series.
   *
   * @ignore Exclude from docs
   */

  XYChart.prototype.handleCursorPositionChange = function () {
    var cursor = this.cursor;

    if (cursor.visible && !cursor.isHiding) {
      var xPosition_1 = this.cursor.xPosition;
      var yPosition_1 = this.cursor.yPosition;
      this.showSeriesTooltip({
        x: xPosition_1,
        y: yPosition_1
      });
      var exceptAxes_1 = [];
      var snapToSeries = cursor.snapToSeries;

      if (snapToSeries && !cursor.downPoint) {
        if (snapToSeries instanceof _series_XYSeries__WEBPACK_IMPORTED_MODULE_9__.XYSeries) {
          snapToSeries = [snapToSeries];
        }

        var dataItems_1 = [];
        _core_utils_Array__WEBPACK_IMPORTED_MODULE_19__.each(snapToSeries, function (snpSeries) {
          if (!snpSeries.isHidden && !snpSeries.isHiding) {
            var xAxis = snpSeries.xAxis;
            var yAxis = snpSeries.yAxis;

            if (xAxis instanceof _axes_ValueAxis__WEBPACK_IMPORTED_MODULE_4__.ValueAxis && !(xAxis instanceof _axes_DateAxis__WEBPACK_IMPORTED_MODULE_5__.DateAxis) && yAxis instanceof _axes_ValueAxis__WEBPACK_IMPORTED_MODULE_4__.ValueAxis && !(yAxis instanceof _axes_DateAxis__WEBPACK_IMPORTED_MODULE_5__.DateAxis)) {
              snpSeries.dataItems.each(function (dataItem) {
                dataItems_1.push(dataItem);
              });
              _core_utils_Array__WEBPACK_IMPORTED_MODULE_19__.move(exceptAxes_1, snpSeries.yAxis);
              _core_utils_Array__WEBPACK_IMPORTED_MODULE_19__.move(exceptAxes_1, snpSeries.xAxis);
            } else {
              if (snpSeries.baseAxis == snpSeries.xAxis) {
                _core_utils_Array__WEBPACK_IMPORTED_MODULE_19__.move(exceptAxes_1, snpSeries.yAxis);
                dataItems_1.push(xAxis.getSeriesDataItem(snpSeries, xAxis.toAxisPosition(xPosition_1), true));
              }

              if (snpSeries.baseAxis == snpSeries.yAxis) {
                _core_utils_Array__WEBPACK_IMPORTED_MODULE_19__.move(exceptAxes_1, snpSeries.xAxis);
                dataItems_1.push(yAxis.getSeriesDataItem(snpSeries, yAxis.toAxisPosition(yPosition_1), true));
              }
            }
          }
        });
        var closestDataItem_1 = this.getClosest(dataItems_1, xPosition_1, yPosition_1);

        if (closestDataItem_1) {
          this.series.each(function (series) {
            var closestSeries = closestDataItem_1.component;

            if (series != closestSeries) {
              series.hideTooltip();

              if (series.xAxis != closestSeries.xAxis) {
                series.xAxis.hideTooltip();
                exceptAxes_1.push(series.xAxis);
              }

              if (series.yAxis != closestSeries.yAxis) {
                series.yAxis.hideTooltip();
                exceptAxes_1.push(series.yAxis);
              }
            }
          });
          closestDataItem_1.component.showTooltipAtDataItem(closestDataItem_1);
          cursor.handleSnap(closestDataItem_1.component);
        }
      } //}


      this._seriesPoints = [];

      if (this._cursorXPosition != xPosition_1) {
        this.showAxisTooltip(this.xAxes, xPosition_1, exceptAxes_1);
      }

      if (this._cursorYPosition != yPosition_1) {
        this.showAxisTooltip(this.yAxes, yPosition_1, exceptAxes_1);
      }

      if (this.arrangeTooltips) {
        this.sortSeriesTooltips(this._seriesPoints);
      }

      if (this.legend) {
        this.legend.afterDraw();
      }
    }
  };
  /**
   * Finds closest data item to position out of the array of items.
   *
   * @since 4.9.29
   * @param   dataItems  Array of items
   * @param              xPosition X position
   * @param              yPosition Y position
   * @return             Data item
   */


  XYChart.prototype.getClosest = function (dataItems, xPosition, yPosition) {
    var minDistance = Infinity;
    var closestDataItem;
    _core_utils_Array__WEBPACK_IMPORTED_MODULE_19__.eachContinue(dataItems, function (dataItem) {
      if (dataItem) {
        var xAxis = dataItem.component.xAxis;
        var yAxis = dataItem.component.yAxis;
        var xPos = xAxis.positionToCoordinate(xAxis.toGlobalPosition(xAxis.toAxisPosition(xPosition)));
        var yPos = yAxis.positionToCoordinate(yAxis.toGlobalPosition(yAxis.toAxisPosition(yPosition)));
        var xField = dataItem.component.xField;
        var yField = dataItem.component.yField;

        if (xAxis instanceof _axes_ValueAxis__WEBPACK_IMPORTED_MODULE_4__.ValueAxis && !_core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.isNumber(dataItem.getValue(xField))) {
          return true;
        }

        if (yAxis instanceof _axes_ValueAxis__WEBPACK_IMPORTED_MODULE_4__.ValueAxis && !_core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.isNumber(dataItem.getValue(yField))) {
          return true;
        }

        var dxPosition = xAxis.positionToCoordinate(xAxis.toGlobalPosition(xAxis.getPositionX(dataItem, xField, dataItem.locations[xField], "valueX")));
        var dyPosition = yAxis.positionToCoordinate(yAxis.toGlobalPosition(yAxis.getPositionY(dataItem, yField, dataItem.locations[yField], "valueY")));
        var distance = Math.sqrt(Math.pow(xPos - dxPosition, 2) + Math.pow(yPos - dyPosition, 2));

        if (distance < minDistance) {
          minDistance = distance;
          closestDataItem = dataItem;
        }

        return true;
      }
    });
    return closestDataItem;
  };
  /**
   * Hides all cursor-related tooltips when the cursor itself is hidden.
   *
   * @ignore Exclude from docs
   */


  XYChart.prototype.handleHideCursor = function () {
    this.hideObjectTooltip(this.xAxes);
    this.hideObjectTooltip(this.yAxes);
    this.hideObjectTooltip(this.series);
    this._cursorXPosition = undefined;
    this._cursorYPosition = undefined;
    this.updateSeriesLegend();
  };
  /**
   * Updates values for each series' legend item.
   *
   * @ignore Exclude from docs
   */


  XYChart.prototype.updateSeriesLegend = function () {
    _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_16__.each(this.series.iterator(), function (series) {
      series.updateLegendValue();
    });
  };
  /**
   * Hides a tooltip for a list of objects.
   *
   * @ignore Exclude from docs
   * @param sprites  A list of sprites to hide tooltip for
   */


  XYChart.prototype.hideObjectTooltip = function (sprites) {
    _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_16__.each(sprites.iterator(), function (sprite) {
      if (sprite.cursorTooltipEnabled) {
        sprite.hideTooltip(0);
      }
    });
  };
  /**
   * Shows a tooltip for all chart's series, using specific coordinates as a
   * reference point.
   *
   * The tooltip might be shown at different coordinates depending on the
   * actual data point's position, overlapping with other tooltips, etc.
   *
   * @ignore Exclude from docs
   * @param position  Reference point
   */


  XYChart.prototype.showSeriesTooltip = function (position) {
    var _this = this;

    if (!position) {
      this.series.each(function (series) {
        series.hideTooltip();
      });
      return;
    }

    var seriesPoints = [];
    this.series.each(function (series) {
      //if (series.tooltipText || series.tooltipHTML) { // not good, bullets are not hovered then
      if (series.xAxis instanceof _axes_DateAxis__WEBPACK_IMPORTED_MODULE_5__.DateAxis && series.xAxis.snapTooltip || series.yAxis instanceof _axes_DateAxis__WEBPACK_IMPORTED_MODULE_5__.DateAxis && series.yAxis.snapTooltip) {// void
      } else {
        var point = series.showTooltipAtPosition(position.x, position.y);

        if (point) {
          series.tooltip.setBounds(_core_utils_Utils__WEBPACK_IMPORTED_MODULE_18__.spriteRectToSvg({
            x: 0,
            y: 0,
            width: _this.pixelWidth,
            height: _this.pixelHeight
          }, _this));
          seriesPoints.push({
            series: series,
            point: point
          });
        }
      } //}

    });

    if (this.arrangeTooltips) {
      this.sortSeriesTooltips(seriesPoints);
    }
  };
  /**
   * @ignore
   */


  XYChart.prototype.sortSeriesTooltips = function (seriesPoints) {
    if (seriesPoints.length > 0) {
      var cursor_1 = this.cursor;

      if (cursor_1 && _core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.isNumber(cursor_1.maxTooltipDistance)) {
        var cursorPoint_1 = _core_utils_Utils__WEBPACK_IMPORTED_MODULE_18__.spritePointToSvg({
          x: cursor_1.point.x,
          y: cursor_1.point.y
        }, cursor_1);
        var nearestSeries_1;
        var nearestPoint_1;
        var smallestDistance_1 = Infinity;
        _core_utils_Array__WEBPACK_IMPORTED_MODULE_19__.each(seriesPoints, function (seriesPoint) {
          var series = seriesPoint.series;
          var fixedPoint = seriesPoint.point;

          if (fixedPoint) {
            var point = {
              x: fixedPoint.x,
              y: fixedPoint.y
            };
            var distance = Math.abs(_core_utils_Math__WEBPACK_IMPORTED_MODULE_15__.getDistance(point, cursorPoint_1));

            if (distance < smallestDistance_1) {
              nearestPoint_1 = point;
              smallestDistance_1 = distance;
              nearestSeries_1 = series;
            }
          }
        });
        var newSeriesPoints_1 = [];

        if (nearestSeries_1) {
          _core_utils_Array__WEBPACK_IMPORTED_MODULE_19__.each(seriesPoints, function (seriesPoint) {
            if (Math.abs(_core_utils_Math__WEBPACK_IMPORTED_MODULE_15__.getDistance(seriesPoint.point, nearestPoint_1)) <= Math.abs(cursor_1.maxTooltipDistance)) {
              newSeriesPoints_1.push({
                series: seriesPoint.series,
                point: seriesPoint.point
              });
            } else {
              var tooltipDataItem = seriesPoint.series.tooltipDataItem;

              if (tooltipDataItem) {
                _core_utils_Array__WEBPACK_IMPORTED_MODULE_19__.each(tooltipDataItem.sprites, function (sprite) {
                  sprite.isHover = false;
                  sprite.handleOutReal(); // to avoid flicker
                });
              }

              seriesPoint.series.hideTooltip(0);
            }
          });

          if (cursor_1.maxTooltipDistance < 0) {
            if (newSeriesPoints_1.length > 0) {
              _core_utils_Array__WEBPACK_IMPORTED_MODULE_19__.each(newSeriesPoints_1, function (np) {
                if (nearestSeries_1 != np.series) {
                  np.series.hideTooltip(0);
                }
              });
            }

            newSeriesPoints_1 = [{
              series: nearestSeries_1,
              point: nearestPoint_1
            }];
          }
        }

        seriesPoints = newSeriesPoints_1;
      }

      var topLeft_1 = _core_utils_Utils__WEBPACK_IMPORTED_MODULE_18__.spritePointToSvg({
        x: -0.5,
        y: -0.5
      }, this.plotContainer);
      var bottomRight_1 = _core_utils_Utils__WEBPACK_IMPORTED_MODULE_18__.spritePointToSvg({
        x: this.plotContainer.pixelWidth + 0.5,
        y: this.plotContainer.pixelHeight + 0.5
      }, this.plotContainer);
      var sum_1 = 0;
      var filteredSeriesPoints_1 = [];
      _core_utils_Array__WEBPACK_IMPORTED_MODULE_19__.each(seriesPoints, function (seriesPoint) {
        var point = seriesPoint.point;

        if (point && _core_utils_Math__WEBPACK_IMPORTED_MODULE_15__.isInRectangle(point, {
          x: topLeft_1.x,
          y: topLeft_1.y,
          width: bottomRight_1.x - topLeft_1.x,
          height: bottomRight_1.y - topLeft_1.y
        })) {
          filteredSeriesPoints_1.push({
            point: point,
            series: seriesPoint.series
          });
          sum_1 += point.y;
        }
      });
      seriesPoints = filteredSeriesPoints_1;
      var firstSeries = this.series.getIndex(0);
      var inversed = false;

      if (firstSeries && firstSeries.yAxis && firstSeries.yAxis.renderer.inversed) {
        inversed = true;
      }

      if (inversed) {
        seriesPoints.sort(function (a, b) {
          return _core_utils_Number__WEBPACK_IMPORTED_MODULE_20__.order(a.point.y, b.point.y);
        });
      } else {
        seriesPoints.sort(function (a, b) {
          return _core_utils_Number__WEBPACK_IMPORTED_MODULE_20__.order(b.point.y, a.point.y);
        });
        seriesPoints.reverse();
      }

      var averageY = sum_1 / seriesPoints.length;
      var maxY = _core_utils_Utils__WEBPACK_IMPORTED_MODULE_18__.svgPointToDocument({
        x: 0,
        y: 0
      }, this.svgContainer.SVGContainer).y;

      if (seriesPoints.length > 0) {
        var top_1 = topLeft_1.y;
        var bottom = bottomRight_1.y; // TODO is this needed ?

        _core_utils_Utils__WEBPACK_IMPORTED_MODULE_18__.spritePointToDocument({
          x: 0,
          y: top_1
        }, this);
        var dropped = false;

        if (averageY > top_1 + (bottom - top_1) / 2) {
          var nextHeight = bottom;

          for (var i = seriesPoints.length - 1; i >= 0; i--) {
            var series = seriesPoints[i].series;
            var tooltip = series.tooltip;
            var pointY = seriesPoints[i].point.y;
            tooltip.setBounds({
              x: 0,
              y: -maxY,
              width: this.pixelWidth,
              height: nextHeight + maxY
            });

            if (tooltip.invalid) {
              tooltip.validate();
            }

            tooltip.toBack();
            nextHeight = _core_utils_Utils__WEBPACK_IMPORTED_MODULE_18__.spritePointToSvg({
              x: 0,
              y: tooltip.label.pixelY - tooltip.pixelY + pointY - tooltip.pixelMarginTop
            }, tooltip).y;

            if (nextHeight < -maxY) {
              dropped = true;
              break;
            }
          }
        }

        if (averageY <= top_1 + (bottom - top_1) / 2 || dropped) {
          var nextY = top_1;

          for (var i = 0, len = seriesPoints.length; i < len; i++) {
            var series = seriesPoints[i].series;
            var pointY = seriesPoints[i].point.y;
            var tooltip = series.tooltip;
            tooltip.setBounds({
              x: 0,
              y: nextY,
              width: this.pixelWidth,
              height: bottom
            });

            if (tooltip.invalid) {
              tooltip.validate();
            }

            tooltip.toBack();
            nextY = _core_utils_Utils__WEBPACK_IMPORTED_MODULE_18__.spritePointToSvg({
              x: 0,
              y: tooltip.label.pixelY + tooltip.label.measuredHeight - tooltip.pixelY + pointY + tooltip.pixelMarginBottom
            }, tooltip).y;
          }
        }
      }
    }
  };
  /**
   * Shows tooltips for a list of axes at specific position.
   *
   * Position might be X coordinate for horizontal axes, and Y coordinate for
   * vertical axes.
   *
   * @ignore Exclude from docs
   * @param axes      List of axes to show tooltip on
   * @param position  Position (px)
   */


  XYChart.prototype.showAxisTooltip = function (axes, position, except) {
    var _this = this;

    _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_16__.each(axes.iterator(), function (axis) {
      if (!except || except.indexOf(axis) == -1) {
        if (_this.dataItems.length > 0 || axis.dataItems.length > 0) {
          axis.showTooltipAtPosition(position);
        }
      }
    });
  };
  /**
   * Recalculates the value range for the axis taking into account zoom level & inversed.
   *
   * @param axis   Axis
   * @param range  Range
   * @return Modified range
   */


  XYChart.prototype.getUpdatedRange = function (axis, range) {
    if (!axis) {
      return;
    }

    var start;
    var end;
    var inversed = axis.renderer.inversed;

    if (inversed) {
      _core_utils_Math__WEBPACK_IMPORTED_MODULE_15__.invertRange(range);
      start = 1 - axis.end;
      end = 1 - axis.start;
    } else {
      start = axis.start;
      end = axis.end;
    }

    var difference = end - start;
    return {
      start: start + range.start * difference,
      end: start + range.end * difference
    };
  };
  /**
   * Performs zoom and other operations when user finishes zooming using chart
   * cursor, e.g. zooms axes.
   *
   * @param event Cursor's event
   */


  XYChart.prototype.handleCursorZoomEnd = function (event) {
    var cursor = this.cursor;
    var behavior = cursor.behavior;

    if (behavior == "zoomX" || behavior == "zoomXY") {
      var xRange = cursor.xRange;

      if (xRange && this.xAxes.length > 0) {
        xRange = this.getUpdatedRange(this.xAxes.getIndex(0), xRange);
        xRange.priority = "start";
        this.zoomAxes(this.xAxes, xRange);
      }
    }

    if (behavior == "zoomY" || behavior == "zoomXY") {
      var yRange = cursor.yRange;

      if (yRange && this.yAxes.length > 0) {
        yRange = this.getUpdatedRange(this.yAxes.getIndex(0), yRange);
        yRange.priority = "start";
        this.zoomAxes(this.yAxes, yRange);
      }
    }

    this.handleHideCursor();
  };
  /**
   * Performs zoom and other operations when user is panning chart plot using chart cursor.
   *
   * @param event Cursor's event
   */


  XYChart.prototype.handleCursorPanStart = function (event) {
    var xAxis = this.xAxes.getIndex(0);

    if (xAxis) {
      this._panStartXRange = {
        start: xAxis.start,
        end: xAxis.end
      };

      if (xAxis.renderer.inversed) {
        this._panStartXRange = _core_utils_Math__WEBPACK_IMPORTED_MODULE_15__.invertRange(this._panStartXRange);
      }
    }

    var yAxis = this.yAxes.getIndex(0);

    if (yAxis) {
      this._panStartYRange = {
        start: yAxis.start,
        end: yAxis.end
      };

      if (yAxis.renderer.inversed) {
        this._panStartYRange = _core_utils_Math__WEBPACK_IMPORTED_MODULE_15__.invertRange(this._panStartYRange);
      }
    }
  };
  /**
   * Performs zoom and other operations when user ends panning
   *
   * @param event Cursor's event
   */


  XYChart.prototype.handleCursorPanEnd = function (event) {
    var cursor = this.cursor;
    var behavior = cursor.behavior;

    if (this._panEndXRange && (behavior == "panX" || behavior == "panXY")) {
      var panEndRange = this._panEndXRange;
      var panStartRange = this._panStartXRange;
      var delta = 0;

      if (panEndRange.start < 0) {
        delta = panEndRange.start;
      }

      if (panStartRange.end > 1) {
        if (panEndRange.end > panStartRange.end) {
          delta = panEndRange.end - panStartRange.end;
        }
      } else if (panEndRange.end > 1) {
        delta = panEndRange.end - 1;
      }

      this.zoomAxes(this.xAxes, {
        start: panEndRange.start - delta,
        end: panEndRange.end - delta
      }, false, cursor.snapOnPan);
      this._panEndXRange = undefined;
      this._panStartXRange = undefined;
    }

    if (this._panEndYRange && (behavior == "panY" || behavior == "panXY")) {
      var panEndRange = this._panEndYRange;
      var delta = 0;

      if (panEndRange.start < 0) {
        delta = panEndRange.start;
      }

      if (panEndRange.end > 1) {
        delta = panEndRange.end - 1;
      }

      this.zoomAxes(this.yAxes, {
        start: panEndRange.start - delta,
        end: panEndRange.end - delta
      }, false, cursor.snapOnPan);
      this._panEndYRange = undefined;
      this._panStartYRange = undefined;
    }
  };

  XYChart.prototype.handleCursorCanceled = function () {
    this._panEndXRange = undefined;
    this._panStartXRange = undefined;
  };
  /**
   * Performs zoom and other operations when user is panning chart plot using chart cursor.
   *
   * @param event Cursor's event
   */


  XYChart.prototype.handleCursorPanning = function (event) {
    var cursor = this.cursor;
    var behavior = cursor.behavior;
    var maxPanOut = cursor.maxPanOut;

    if (this._panStartXRange && (behavior == "panX" || behavior == "panXY")) {
      var panStartRange = this._panStartXRange;
      var range = cursor.xRange;
      var axisRange = this.getCommonAxisRange(this.xAxes);
      var difference = panStartRange.end - panStartRange.start;
      var delta = range.start * (axisRange.end - axisRange.start);
      var newStart = Math.max(-maxPanOut, delta + panStartRange.start);
      var newEnd = Math.min(delta + panStartRange.end, 1 + maxPanOut);

      if (newStart <= 0) {
        newEnd = newStart + difference;
      }

      if (newEnd >= 1) {
        newStart = newEnd - difference;
      }

      var newRange = {
        start: newStart,
        end: newEnd
      };
      this._panEndXRange = newRange;
      this.zoomAxes(this.xAxes, newRange, false, false, cursor.maxPanOut);
    }

    if (this._panStartYRange && (behavior == "panY" || behavior == "panXY")) {
      var panStartRange = this._panStartYRange;
      var range = cursor.yRange;
      var axisRange = this.getCommonAxisRange(this.yAxes);
      var difference = panStartRange.end - panStartRange.start;
      var delta = range.start * (axisRange.end - axisRange.start);
      var newStart = Math.max(-maxPanOut, delta + panStartRange.start);
      var newEnd = Math.min(delta + panStartRange.end, 1 + maxPanOut);

      if (newStart <= 0) {
        newEnd = newStart + difference;
      }

      if (newEnd >= 1) {
        newStart = newEnd - difference;
      }

      var newRange = {
        start: newStart,
        end: newEnd
      };
      this._panEndYRange = newRange;
      this.zoomAxes(this.yAxes, newRange, false, false, cursor.maxPanOut);
    }

    this.handleHideCursor();
  };
  /**
   * @ignore
   */


  XYChart.prototype.handleYAxisSet = function (series) {};
  /**
   * Performs zoom and other operations when user starts zooming using chart
   * cursor, e.g. zooms axes.
   *
   * @param event Cursor's event
   */


  XYChart.prototype.handleCursorZoomStart = function (event) {// Nothing here
    // This method is here only as a "placeholder" for extending classes to
    // override if necessary
  };

  Object.defineProperty(XYChart.prototype, "scrollbarX", {
    /**
     * @return Scrollbar
     */
    get: function get() {
      return this._scrollbarX;
    },

    /**
     * Horizontal (X) scrollbar.
     *
     * @param scrollbar Scrollbar
     */
    set: function set(scrollbar) {
      var _this = this;

      if (this._scrollbarX) {
        this.removeDispose(this._scrollbarX);
      }

      this._scrollbarX = scrollbar;

      if (scrollbar) {
        this._disposers.push(scrollbar);

        scrollbar.parent = this.topAxesContainer;
        scrollbar.shouldClone = false;
        scrollbar.startGrip.exportable = false;
        scrollbar.endGrip.exportable = false;
        scrollbar.toBack();
        scrollbar.orientation = "horizontal";
        scrollbar.events.on("rangechanged", this.handleXScrollbarChange, this, false);
        this.events.on("datavalidated", function () {
          return scrollbar.updateThumb(false);
        }, this, false); // accessibility related

        scrollbar.adapter.add("positionValue", function (arg) {
          var xAxis = _this.xAxes.getIndex(0);

          if (xAxis) {
            arg.value = xAxis.getPositionLabel(xAxis.renderer.inversed ? 1 - arg.position : arg.position);
          }

          return arg;
        });
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(XYChart.prototype, "scrollbarY", {
    /**
     * @return Scrollbar
     */
    get: function get() {
      return this._scrollbarY;
    },

    /**
     * Vertical (Y) scrollbar.
     *
     * @param scrollbar Scrollbar
     */
    set: function set(scrollbar) {
      var _this = this;

      if (this._scrollbarY) {
        this.removeDispose(this._scrollbarY);
      }

      this._scrollbarY = scrollbar;

      if (scrollbar) {
        this._disposers.push(scrollbar);

        scrollbar.parent = this.rightAxesContainer;
        scrollbar.startGrip.exportable = false;
        scrollbar.shouldClone = false;
        scrollbar.endGrip.exportable = false;
        scrollbar.toFront();
        scrollbar.orientation = "vertical";
        scrollbar.events.on("rangechanged", this.handleYScrollbarChange, this, false);
        this.events.on("datavalidated", function () {
          return scrollbar.updateThumb(false);
        }, this, false); // accessibility related

        scrollbar.adapter.add("positionValue", function (arg) {
          var yAxis = _this.yAxes.getIndex(0);

          if (yAxis) {
            arg.value = yAxis.getPositionLabel(arg.position);
          }

          return arg;
        });
      }
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Zooms axes affected by the horizontal (X) scrollbar when the selection
   * on it changes.
   *
   * @param event Scrollbar range change event
   */

  XYChart.prototype.handleXScrollbarChange = function (event) {
    if (this.inited) {
      var scrollbar = event.target;
      var range = scrollbar.range;

      if (range.start == 0) {
        range.priority = "start";
      }

      if (range.end == 1) {
        range.priority = "end";
      }

      range = this.zoomAxes(this.xAxes, range);
      scrollbar.fixRange(range);
    }
  };
  /**
   * Zooms axes affected by the vertical (Y) scrollbar when the selection
   * on it changes.
   *
   * @param event Scrollbar range change event
   */


  XYChart.prototype.handleYScrollbarChange = function (event) {
    if (this.inited) {
      var scrollbar = event.target;
      var range = scrollbar.range;

      if (range.end == 1) {
        range.priority = "end";
      }

      if (range.start == 0) {
        range.priority = "start";
      }

      range = this.zoomAxes(this.yAxes, range);
      scrollbar.fixRange(range);
    }
  };
  /**
   * Zooms axes that are affected by to specific relative range.
   *
   * @param axes       List of axes to zoom
   * @param range      Range of values to zoom to (0-1)
   * @param instantly  If set to `true` will skip zooming animation
   * @return Recalculated range that is common to all involved axes
   */


  XYChart.prototype.zoomAxes = function (axes, range, instantly, round, declination, stop) {
    var realRange = {
      start: 0,
      end: 1
    };
    this.showSeriesTooltip(); // hides

    var originalRange = range;

    if (!this.dataInvalid) {
      _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_16__.each(axes.iterator(), function (axis) {
        var maxZoomFactor = axis.maxZoomFactor;

        if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.isNumber(axis.minZoomCount)) {
          maxZoomFactor = maxZoomFactor / axis.minZoomCount;
        }

        if (stop && 1 / (range.end - range.start) >= maxZoomFactor) {// void
        } else {
          if (axis.zoomable) {
            if (axis.renderer.inversed) {
              range = _core_utils_Math__WEBPACK_IMPORTED_MODULE_15__.invertRange(originalRange);
            } else {
              range = originalRange;
            }

            axis.hideTooltip(0);

            if (round) {
              //let diff = range.end - range.start;
              if (axis instanceof _axes_CategoryAxis__WEBPACK_IMPORTED_MODULE_8__.CategoryAxis) {
                var cellWidth = axis.getCellEndPosition(0) - axis.getCellStartPosition(0);
                range.start = axis.roundPosition(range.start + cellWidth / 2 - axis.startLocation * cellWidth, axis.startLocation);
                range.end = axis.roundPosition(range.end - cellWidth / 2 + (1 - axis.endLocation) * cellWidth, axis.endLocation);
              } else {
                range.start = axis.roundPosition(range.start + 0.0001, 0, axis.startLocation);
                range.end = axis.roundPosition(range.end + 0.0001, 0, axis.endLocation);
              }
            }

            var axisRange = axis.zoom(range, instantly, instantly, declination);

            if (axis.renderer.inversed) {
              axisRange = _core_utils_Math__WEBPACK_IMPORTED_MODULE_15__.invertRange(axisRange);
            }

            realRange = axisRange;
          }
        }
      });
    }

    return realRange;
  };

  Object.defineProperty(XYChart.prototype, "maskBullets", {
    /**
     * @return Mask bullet container?
     */
    get: function get() {
      return this.getPropertyValue("maskBullets");
    },

    /**
     * Indicates if bullet container is masked.
     *
     * If it is set to `true`, any bullets that do not fit into bullet container
     * will be clipped off. Settting to `false` will allow bullets to "spill out"
     * of the plot area so they are not cut off.
     *
     * @param value Mask bullet container?
     */
    set: function set(value) {
      if (this.setPropertyValue("maskBullets", value, true) && this.bulletsContainer) {
        if (value) {
          this.bulletsContainer.mask = this._bulletMask;
        } else {
          this.bulletsContainer.mask = undefined;
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(XYChart.prototype, "arrangeTooltips", {
    /**
     * @return Arrange tooltips?
     */
    get: function get() {
      return this.getPropertyValue("arrangeTooltips");
    },

    /**
     * Indicates if chart should arrange series tooltips so that they would not
     * overlap.
     *
     * If set to `true` (default), the chart will adjust vertical positions of
     * all simultaneously shown tooltips to avoid overlapping.
     *
     * However, if you have a vertically-arranged chart, it might not make sense,
     * because tooltips would most probably not be aligned horizontally. In this
     * case it would probably be a good idea to set this setting to `false`.
     *
     * @default true
     * @param value Arrange tooltips?
     */
    set: function set(value) {
      this.setPropertyValue("arrangeTooltips", value, true);
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Handles mouse wheel event.
   *
   * @param event  Original event
   */

  XYChart.prototype.handleWheel = function (event) {
    var plotContainer = this.plotContainer;
    var svgPoint = _core_utils_Utils__WEBPACK_IMPORTED_MODULE_18__.documentPointToSvg(event.point, this.htmlContainer, this.svgContainer.cssScale);
    var plotPoint = _core_utils_Utils__WEBPACK_IMPORTED_MODULE_18__.svgPointToSprite(svgPoint, plotContainer);
    var shift = event.shift.y;
    this.handleWheelReal(shift, this.mouseWheelBehavior, plotPoint);
  };
  /**
   * Handles mouse wheel event.
   *
   * @param event  Original event
   */


  XYChart.prototype.handleHorizontalWheel = function (event) {
    var plotContainer = this.plotContainer;
    var svgPoint = _core_utils_Utils__WEBPACK_IMPORTED_MODULE_18__.documentPointToSvg(event.point, this.htmlContainer, this.svgContainer.cssScale);
    var plotPoint = _core_utils_Utils__WEBPACK_IMPORTED_MODULE_18__.svgPointToSprite(svgPoint, plotContainer);
    this.handleWheelReal(event.shift.x, this.horizontalMouseWheelBehavior, plotPoint);
  };
  /**
   * @ignore
   */


  XYChart.prototype.handleWheelReal = function (shift, mouseWheelBehavior, plotPoint) {
    if (shift != 0) {
      var plotContainer = this.plotContainer;
      var rangeX = this.getCommonAxisRange(this.xAxes);
      var rangeY = this.getCommonAxisRange(this.yAxes);
      var shiftStep = 0.1;
      var maxPanOut = 0;

      if (mouseWheelBehavior == "panX" || mouseWheelBehavior == "panXY") {
        var differenceX = rangeX.end - rangeX.start;
        var newStartX = Math.max(-maxPanOut, rangeX.start + shiftStep * shift / 100 * (rangeX.end - rangeX.start));
        var newEndX = Math.min(rangeX.end + shiftStep * shift / 100 * (rangeX.end - rangeX.start), 1 + maxPanOut);

        if (newStartX <= 0) {
          newEndX = newStartX + differenceX;
        }

        if (newEndX >= 1) {
          newStartX = newEndX - differenceX;
        }

        this.zoomAxes(this.xAxes, {
          start: newStartX,
          end: newEndX
        });
      }

      if (mouseWheelBehavior == "panY" || mouseWheelBehavior == "panXY") {
        shift *= -1;
        var differenceY = rangeY.end - rangeY.start;
        var newStartY = Math.max(-maxPanOut, rangeY.start + shiftStep * shift / 100 * (rangeY.end - rangeY.start));
        var newEndY = Math.min(rangeY.end + shiftStep * shift / 100 * (rangeY.end - rangeY.start), 1 + maxPanOut);

        if (newStartY <= 0) {
          newEndY = newStartY + differenceY;
        }

        if (newEndY >= 1) {
          newStartY = newEndY - differenceY;
        }

        this.zoomAxes(this.yAxes, {
          start: newStartY,
          end: newEndY
        });
      }

      if (mouseWheelBehavior == "zoomX" || mouseWheelBehavior == "zoomXY") {
        var locationX = plotPoint.x / plotContainer.maxWidth;
        var location2X = this.xAxes.getIndex(0).toAxisPosition(locationX);
        var newStartX = Math.max(-maxPanOut, rangeX.start - shiftStep * (rangeX.end - rangeX.start) * shift / 100 * locationX);
        newStartX = Math.min(newStartX, location2X);
        var newEndX = Math.min(rangeX.end + shiftStep * (rangeX.end - rangeX.start) * shift / 100 * (1 - locationX), 1 + maxPanOut);
        newEndX = Math.max(newEndX, location2X);
        this.zoomAxes(this.xAxes, {
          start: newStartX,
          end: newEndX
        }, undefined, undefined, undefined, true);
      }

      if (mouseWheelBehavior == "zoomY" || mouseWheelBehavior == "zoomXY") {
        var locationY = plotPoint.y / plotContainer.maxHeight;
        var location2Y = this.yAxes.getIndex(0).toAxisPosition(locationY);
        var newStartY = Math.max(-maxPanOut, rangeY.start - shiftStep * (rangeY.end - rangeY.start) * shift / 100 * (1 - locationY));
        newStartY = Math.min(newStartY, location2Y);
        var newEndY = Math.min(rangeY.end + shiftStep * shift / 100 * locationY * (rangeY.end - rangeY.start), 1 + maxPanOut);
        newEndY = Math.max(newEndY, location2Y);
        this.zoomAxes(this.yAxes, {
          start: newStartY,
          end: newEndY
        }, undefined, undefined, undefined, true);
      }
    }
  };

  Object.defineProperty(XYChart.prototype, "mouseWheelBehavior", {
    /**
     * @return Mouse wheel behavior
     */
    get: function get() {
      return this.getPropertyValue("mouseWheelBehavior");
    },

    /**
     * Specifies action for when mouse wheel is used when over the chart.
     *
     * Options: Options: `"zoomX"`, `"zoomY"`, `"zoomXY"`, `"panX"`, `"panY"`,`"panXY"`, `"none"` (default).
     *
     * You can control sensitivity of wheel zooming via `mouseOptions`.
     *
     * @default "none"
     * @see {@link https://www.amcharts.com/docs/v4/reference/sprite/#mouseOptions_property} More information about `mouseOptions`
     * @param mouse wheel behavior
     */
    set: function set(value) {
      if (this.setPropertyValue("mouseWheelBehavior", value)) {
        if (value != "none") {
          this._mouseWheelDisposer = this.plotContainer.events.on("wheel", this.handleWheel, this, false);

          this._disposers.push(this._mouseWheelDisposer);
        } else {
          if (this._mouseWheelDisposer) {
            this.plotContainer.wheelable = false;
            this.plotContainer.hoverable = false;

            this._mouseWheelDisposer.dispose();
          }
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(XYChart.prototype, "horizontalMouseWheelBehavior", {
    /**
     * @return Horizontal mouse wheel behavior
     */
    get: function get() {
      return this.getPropertyValue("horizontalMouseWheelBehavior");
    },

    /**
     * Specifies action for when horizontal mouse wheel is used when over the chart.
     *
     * Options: Options: `"zoomX"`, `"zoomY"`, `"zoomXY"`, `"panX"`, `"panY"`, `"panXY"`, `"none"` (default).
     *
     * @default "none"
     * @see {@link https://www.amcharts.com/docs/v4/reference/sprite/#mouseOptions_property} More information about `mouseOptions`
     * @param mouse wheel behavior
     */
    set: function set(value) {
      if (this.setPropertyValue("horizontalMouseWheelBehavior", value)) {
        if (value != "none") {
          this._mouseWheelDisposer2 = this.plotContainer.events.on("wheel", this.handleHorizontalWheel, this, false);

          this._disposers.push(this._mouseWheelDisposer2);
        } else {
          if (this._mouseWheelDisposer2) {
            this.plotContainer.wheelable = false;
            this.plotContainer.hoverable = false;

            this._mouseWheelDisposer2.dispose();
          }
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  /**
   * This function is called by the [[DataSource]]'s `dateFields` adapater
   * so that particular chart types can popuplate this setting with their
   * own type-specific data fields so they are parsed properly.
   *
   * @param fields  Array of date fields
   * @return Array of date fields populated with chart's date fields
   */

  XYChart.prototype.dataSourceDateFields = function (fields) {
    var _this = this; // Process parent


    fields = _super.prototype.dataSourceDateFields.call(this, fields); // Check if we have any series with date-fields

    _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_16__.each(this.series.iterator(), function (series) {
      fields = _this.populateDataSourceFields(fields, series.dataFields, ["dateX", "dateY", "openDateX", "openDateY"]);
    });
    return fields;
  };
  /**
   * This function is called by the [[DataSource]]'s `numberFields` adapater
   * so that particular chart types can popuplate this setting with their
   * own type-specific data fields so they are parsed properly.
   *
   * @param value  Array of number fields
   * @return Array of number fields populated with chart's number fields
   */


  XYChart.prototype.dataSourceNumberFields = function (fields) {
    var _this = this;

    fields = _super.prototype.dataSourceDateFields.call(this, fields); // Check if we have any series with date-fields

    _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_16__.each(this.series.iterator(), function (series) {
      fields = _this.populateDataSourceFields(fields, series.dataFields, ["valueX", "valueY", "openValueX", "openValueY"]);
    });
    return fields;
  };
  /**
   * Processes JSON-based config before it is applied to the object.
   *
   * @ignore Exclude from docs
   * @param config  Config
   */


  XYChart.prototype.processConfig = function (config) {
    if (config) {
      // Save axis ranges for later processing
      var xAxes = [];
      var yAxes = []; // Set up axes

      if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.hasValue(config.xAxes) && _core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.isArray(config.xAxes)) {
        for (var i = 0, len = config.xAxes.length; i < len; i++) {
          if (!config.xAxes[i].type) {
            throw Error("[XYChart error] No type set for xAxes[" + i + "].");
          } else if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.hasValue(config.xAxes[i]["axisRanges"])) {
            // Maybe convert string dates?
            for (var x = 0, len_1 = config.xAxes[i]["axisRanges"].length; x < len_1; x++) {
              var range = config.xAxes[i]["axisRanges"][x];

              if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.hasValue(range.date) && _core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.isString(range.date)) {
                range.date = this.dateFormatter.parse(range.date);
              }

              if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.hasValue(range.endDate) && _core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.isString(range.endDate)) {
                range.endDate = this.dateFormatter.parse(range.endDate);
              }
            }

            xAxes.push({
              axisRanges: config.xAxes[i]["axisRanges"],
              index: i
            });
            delete config.xAxes[i]["axisRanges"];
          }
        }
      }

      if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.hasValue(config.yAxes) && _core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.isArray(config.yAxes)) {
        for (var i = 0, len = config.yAxes.length; i < len; i++) {
          if (!config.yAxes[i].type) {
            throw Error("[XYChart error] No type set for yAxes[" + i + "].");
          } else if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.hasValue(config.yAxes[i]["axisRanges"])) {
            // Maybe convert string dates?
            for (var x = 0, len_2 = config.yAxes[i]["axisRanges"].length; x < len_2; x++) {
              var range = config.yAxes[i]["axisRanges"][x];

              if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.hasValue(range.date) && _core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.isString(range.date)) {
                range.date = this.dateFormatter.parse(range.date);
              }

              if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.hasValue(range.endDate) && _core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.isString(range.endDate)) {
                range.endDate = this.dateFormatter.parse(range.endDate);
              }
            }

            yAxes.push({
              axisRanges: config.yAxes[i]["axisRanges"],
              index: i
            });
            delete config.yAxes[i]["axisRanges"];
          }
        }
      } // Set up series


      if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.hasValue(config.series) && _core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.isArray(config.series)) {
        for (var i = 0, len = config.series.length; i < len; i++) {
          config.series[i].type = config.series[i].type || "LineSeries";
        }
      } // Set up cursor


      if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.hasValue(config.cursor) && !_core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.hasValue(config.cursor.type)) {
        config.cursor.type = "XYCursor";
      } // Set up scrollbars


      if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.hasValue(config.scrollbarX) && !_core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.hasValue(config.scrollbarX.type)) {
        config.scrollbarX.type = "Scrollbar";
      }

      if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.hasValue(config.scrollbarY) && !_core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.hasValue(config.scrollbarY.type)) {
        config.scrollbarY.type = "Scrollbar";
      }

      _super.prototype.processConfig.call(this, config); // Finish up with ranges.
      // We need to do this here because series are processed last in JSON
      // config. Therefore their respective objects are not yet are available
      // when axis (and respectively their ranges) are being processed.


      if (yAxes.length) {
        for (var i = 0, len = yAxes.length; i < len; i++) {
          this.yAxes.getIndex(yAxes[i].index).config = {
            axisRanges: yAxes[i].axisRanges
          };
        }
      }

      if (xAxes.length) {
        for (var i = 0, len = xAxes.length; i < len; i++) {
          this.xAxes.getIndex(xAxes[i].index).config = {
            axisRanges: xAxes[i].axisRanges
          };
        }
      }
    }
  };
  /**
   * This function is used to sort element's JSON config properties, so that
   * some properties that absolutely need to be processed last, can be put at
   * the end.
   *
   * @ignore Exclude from docs
   * @param a  Element 1
   * @param b  Element 2
   * @return Sorting number
   */


  XYChart.prototype.configOrder = function (a, b) {
    if (a == b) {
      return 0;
    } // Must come last
    else if (a == "scrollbarX") {
      return 1;
    } else if (b == "scrollbarX") {
      return -1;
    } else if (a == "scrollbarY") {
      return 1;
    } else if (b == "scrollbarY") {
      return -1;
    } else if (a == "cursor") {
      return 1;
    } else if (b == "cursor") {
      return -1;
    } else if (a == "series") {
      return 1;
    } else if (b == "series") {
      return -1;
    } else {
      return _super.prototype.configOrder.call(this, a, b);
    }
  };
  /**
   * Creates a new Series of type suitable for this chart.
   *
   * @return New series
   */


  XYChart.prototype.createSeries = function () {
    return new _series_XYSeries__WEBPACK_IMPORTED_MODULE_9__.XYSeries();
  };

  Object.defineProperty(XYChart.prototype, "zoomOutButton", {
    /**
     * @return Zoom out button
     */
    get: function get() {
      return this._zoomOutButton;
    },

    /**
     * A [[Button]] element that is used for zooming out the chart.
     *
     * This button appears only when chart is zoomed in, and disappears
     * autoamatically when it is zoome dout.
     *
     * @param button  Zoom out button
     */
    set: function set(button) {
      var _this = this;

      this._zoomOutButton = button;

      if (button) {
        button.events.on("hit", function () {
          _this.zoomAxes(_this.xAxes, {
            start: 0,
            end: 1
          });

          _this.zoomAxes(_this.yAxes, {
            start: 0,
            end: 1
          });
        }, undefined, false);
      }
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Copies all parameters from another [[XYChart]].
   *
   * @param source Source XYChart
   */

  XYChart.prototype.copyFrom = function (source) {
    var _this = this;

    source.xAxes.each(function (axis) {
      var a = _this.xAxes.push(axis.clone());

      a.chart = _this;
      a.renderer.chart = _this;
    });
    source.yAxes.each(function (axis) {
      var a = _this.yAxes.push(axis.clone());

      a.renderer.chart = _this;
      a.chart = _this;
    }); //this.xAxes.copyFrom(source.xAxes);
    //this.yAxes.copyFrom(source.yAxes);

    _super.prototype.copyFrom.call(this, source); //this.zoomOutButton.copyFrom(source.zoomOutButton);


    if (source.cursor) {
      this.cursor = source.cursor.clone();
    }

    if (source.scrollbarX) {
      this.scrollbarX = source.scrollbarX.clone();
    }

    if (source.scrollbarY) {
      this.scrollbarY = source.scrollbarY.clone();
    } //@todo copy all container properties

  };
  /**
   * @ignore
   */


  XYChart.prototype.disposeData = function () {
    _super.prototype.disposeData.call(this);

    var scrollbarX = this.scrollbarX;

    if (scrollbarX && scrollbarX instanceof _elements_XYChartScrollbar__WEBPACK_IMPORTED_MODULE_14__.XYChartScrollbar) {
      scrollbarX.scrollbarChart.disposeData();
    }

    var scrollbarY = this.scrollbarY;

    if (scrollbarY && scrollbarY instanceof _elements_XYChartScrollbar__WEBPACK_IMPORTED_MODULE_14__.XYChartScrollbar) {
      scrollbarY.scrollbarChart.disposeData();
    }

    this.xAxes.each(function (axis) {
      if (axis instanceof _axes_CategoryAxis__WEBPACK_IMPORTED_MODULE_8__.CategoryAxis) {
        axis.disposeData();
      }
    });
    this.yAxes.each(function (axis) {
      if (axis instanceof _axes_CategoryAxis__WEBPACK_IMPORTED_MODULE_8__.CategoryAxis) {
        axis.disposeData();
      }
    });
  };
  /**
   * Adds one or several (array) of data items to the existing data.
   *
   * @param rawDataItem One or many raw data item objects
   */


  XYChart.prototype.addData = function (rawDataItem, removeCount) {
    if (this.scrollbarX instanceof _elements_XYChartScrollbar__WEBPACK_IMPORTED_MODULE_14__.XYChartScrollbar) {
      this.addScrollbarData(this.scrollbarX, removeCount);
    }

    if (this.scrollbarY instanceof _elements_XYChartScrollbar__WEBPACK_IMPORTED_MODULE_14__.XYChartScrollbar) {
      this.addScrollbarData(this.scrollbarY, removeCount);
    }

    _super.prototype.addData.call(this, rawDataItem, removeCount);
  };
  /**
   * @ignore
   */


  XYChart.prototype.addScrollbarData = function (scrollbar, removeCount) {
    var chart = scrollbar.scrollbarChart;
    chart._parseDataFrom = chart.data.length;
    chart.invalidateData();
  };
  /**
   * @ignore
   */


  XYChart.prototype.removeScrollbarData = function (scrollbar, removeCount) {
    var chart = scrollbar.scrollbarChart;

    if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_17__.isNumber(removeCount)) {
      while (removeCount > 0) {
        var dataItem = this.dataItems.getIndex(0);

        if (dataItem) {
          chart.dataItems.remove(dataItem);
        }

        chart.dataUsers.each(function (dataUser) {
          var dataItem = dataUser.dataItems.getIndex(0);

          if (dataItem) {
            dataUser.dataItems.remove(dataItem);
          }
        });
        chart._parseDataFrom--;
        removeCount--;
      }

      chart.invalidateData();
    }
  };
  /**
   * Removes elements from the beginning of data
   *
   * @param count number of elements to remove
   */


  XYChart.prototype.removeData = function (count) {
    if (this.scrollbarX instanceof _elements_XYChartScrollbar__WEBPACK_IMPORTED_MODULE_14__.XYChartScrollbar) {
      this.removeScrollbarData(this.scrollbarX, count);
    }

    if (this.scrollbarY instanceof _elements_XYChartScrollbar__WEBPACK_IMPORTED_MODULE_14__.XYChartScrollbar) {
      this.removeScrollbarData(this.scrollbarY, count);
    }

    _super.prototype.removeData.call(this, count);
  };
  /**
   * @param  value  Tap to activate?
   */


  XYChart.prototype.setTapToActivate = function (value) {
    _super.prototype.setTapToActivate.call(this, value);

    if (this.cursor) {
      this.cursor.interactions.isTouchProtected = value;
      this.plotContainer.interactions.isTouchProtected = value;
    }
  };

  XYChart.prototype.handleTapToActivate = function () {
    _super.prototype.handleTapToActivate.call(this);

    if (this.cursor) {
      this.cursor.interactions.isTouchProtected = false;
      this.plotContainer.interactions.isTouchProtected = false;
    }
  };

  XYChart.prototype.handleTapToActivateDeactivation = function () {
    _super.prototype.handleTapToActivateDeactivation.call(this);

    if (this.cursor) {
      this.cursor.interactions.isTouchProtected = true;
      this.plotContainer.interactions.isTouchProtected = true;
    }
  };

  return XYChart;
}(_SerialChart__WEBPACK_IMPORTED_MODULE_0__.SerialChart);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_13__.registry.registeredClasses.XYChart = XYChart;
/**
 * Add default responsive rules
 */

/**
 * Remove horizontal scrollbar on narrow charts.
 */

_core_utils_Responsive__WEBPACK_IMPORTED_MODULE_21__.defaultRules.push({
  relevant: _core_utils_Responsive__WEBPACK_IMPORTED_MODULE_21__.ResponsiveBreakpoints.maybeXS,
  state: function state(target, stateId) {
    if (target instanceof XYChart && target.scrollbarX) {
      var state = target.states.create(stateId);
      var sbstate = target.scrollbarX.states.create(stateId);
      sbstate.properties.disabled = true;
      return state;
    }

    return null;
  }
});
/**
 * Remove vertical scrollbar on short charts.
 */

_core_utils_Responsive__WEBPACK_IMPORTED_MODULE_21__.defaultRules.push({
  relevant: _core_utils_Responsive__WEBPACK_IMPORTED_MODULE_21__.ResponsiveBreakpoints.maybeXS,
  state: function state(target, stateId) {
    if (target instanceof XYChart && target.scrollbarY) {
      var state = target.states.create(stateId);
      var sbstate = target.scrollbarY.states.create(stateId);
      sbstate.properties.disabled = true;
      return state;
    }

    return null;
  }
});

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/charts/types/XYChart3D.js":
/*!******************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/charts/types/XYChart3D.js ***!
  \******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "XYChart3D": () => (/* binding */ XYChart3D),
/* harmony export */   "XYChart3DDataItem": () => (/* binding */ XYChart3DDataItem)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _XYChart__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./XYChart */ "./node_modules/@amcharts/amcharts4/.internal/charts/types/XYChart.js");
/* harmony import */ var _core_Container__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/Container */ "./node_modules/@amcharts/amcharts4/.internal/core/Container.js");
/* harmony import */ var _core_Sprite__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/Sprite */ "./node_modules/@amcharts/amcharts4/.internal/core/Sprite.js");
/* harmony import */ var _axes_AxisRendererX3D__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../axes/AxisRendererX3D */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisRendererX3D.js");
/* harmony import */ var _axes_AxisRendererY3D__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../axes/AxisRendererY3D */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisRendererY3D.js");
/* harmony import */ var _series_ColumnSeries3D__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../series/ColumnSeries3D */ "./node_modules/@amcharts/amcharts4/.internal/charts/series/ColumnSeries3D.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../core/utils/Iterator */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Iterator.js");
/* harmony import */ var _core_utils_Math__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../core/utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
/* harmony import */ var _core_utils_Type__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../core/utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/* harmony import */ var _core_rendering_Path__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../core/rendering/Path */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Path.js");
/* harmony import */ var _core_utils_Utils__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../core/utils/Utils */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Utils.js");
/**
 * Module for building 3D serial charts.
 */

/**
 * ============================================================================
 * Imports
 * ============================================================================
 * @hidden
 */













/**
 * ============================================================================
 * DATA ITEM
 * ============================================================================
 * @hidden
 */

/**
 * Defines a [[DataItem]] for [[XYChart3D]].
 *
 * @see {@link DataItem}
 */

var XYChart3DDataItem =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_12__.__extends)(XYChart3DDataItem, _super);

  function XYChart3DDataItem() {
    var _this = _super.call(this) || this;

    _this.className = "XYChart3DDataItem";

    _this.applyTheme();

    return _this;
  }

  return XYChart3DDataItem;
}(_XYChart__WEBPACK_IMPORTED_MODULE_0__.XYChartDataItem);


/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Creates a 3D XY chart.
 *
 * @see {@link IXYChart3DEvents} for a list of available Events
 * @see {@link IXYChart3DAdapters} for a list of available Adapters
 * @see {@link https://www.amcharts.com/docs/v4/chart-types/xy-chart/} for documentation
 * @important
 */

var XYChart3D =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_12__.__extends)(XYChart3D, _super);
  /**
   * Constructor
   */


  function XYChart3D() {
    var _this = // Init
    _super.call(this) || this;
    /**
     * Type of the axis renderer to use for X axes.
     */


    _this._axisRendererX = _axes_AxisRendererX3D__WEBPACK_IMPORTED_MODULE_3__.AxisRendererX3D;
    /**
     * Type of the axis renderer to use for Y axes.
     */

    _this._axisRendererY = _axes_AxisRendererY3D__WEBPACK_IMPORTED_MODULE_4__.AxisRendererY3D;
    _this.className = "XYChart3D"; // Set defaults

    _this.depth = 30;
    _this.angle = 30; // Creeate container for columns

    var columnsContainer = _this.seriesContainer.createChild(_core_Container__WEBPACK_IMPORTED_MODULE_1__.Container);

    columnsContainer.shouldClone = false;
    columnsContainer.isMeasured = false;
    columnsContainer.layout = "none";
    _this.columnsContainer = columnsContainer;
    _this.columnsContainer.mask = _this.createChild(_core_Sprite__WEBPACK_IMPORTED_MODULE_2__.Sprite); // Apply theme

    _this.applyTheme();

    return _this;
  }
  /**
   * This is done because for some reason IE doesn't change mask if path of a
   * mask changes.
   */


  XYChart3D.prototype.updateSeriesMasks = function () {
    _super.prototype.updateSeriesMasks.call(this);

    if (_core_utils_Utils__WEBPACK_IMPORTED_MODULE_11__.isIE()) {
      var columnsContainer = this.columnsContainer;
      var mask = columnsContainer.mask;
      columnsContainer.mask = undefined;
      columnsContainer.mask = mask;
    }
  };

  Object.defineProperty(XYChart3D.prototype, "depth", {
    /**
     * @return Depth (px)
     */
    get: function get() {
      return this.getPropertyValue("depth");
    },

    /**
     * Depth of the 3D chart / columns in pixels.
     *
     * @param value  Depth (px)
     */
    set: function set(value) {
      this.setPropertyValue("depth", value);
      this.fixLayout();
      this.invalidateDataUsers();
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(XYChart3D.prototype, "angle", {
    /**
     * @return Angle
     */
    get: function get() {
      return this.getPropertyValue("angle");
    },

    /**
     * Angle the chart is viewed at.
     *
     * @todo Description (review)
     * @param value  Angle
     */
    set: function set(value) {
      this.setPropertyValue("angle", value);
      this.fixLayout();
      this.invalidateDataUsers();
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(XYChart3D.prototype, "dx3D", {
    /**
     * A calculated horizontal 3D offset (px).
     *
     * @readonly
     * @return Offset (px)
     */
    get: function get() {
      return _core_utils_Math__WEBPACK_IMPORTED_MODULE_8__.cos(this.angle) * this.depth;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(XYChart3D.prototype, "dy3D", {
    /**
     * A calculated vertical 3D offset (px).
     *
     * @readonly
     * @return Offset (px)
     */
    get: function get() {
      return -_core_utils_Math__WEBPACK_IMPORTED_MODULE_8__.sin(this.angle) * this.depth;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * (Re)validates layout
   *
   * @ignore Exclude from docs
   */

  XYChart3D.prototype.validateLayout = function () {
    _super.prototype.validateLayout.call(this);

    this.fixColumns();
  };
  /**
   * Updates the layout (padding and scrollbar positions) to accommodate for
   * 3D depth and angle.
   */


  XYChart3D.prototype.fixLayout = function () {
    this.chartContainer.paddingTop = -this.dy3D;
    this.chartContainer.paddingRight = this.dx3D;

    if (this.scrollbarX) {
      this.scrollbarX.dy = this.dy3D;
      this.scrollbarX.dx = this.dx3D;
    }

    if (this.scrollbarY) {
      this.scrollbarY.dy = this.dy3D;
      this.scrollbarY.dx = this.dx3D;
    }

    this.fixColumns();

    _super.prototype.fixLayout.call(this);
  };
  /**
   * Updates column positions, offset and dimensions based on chart's angle
   * and depth.
   */


  XYChart3D.prototype.fixColumns = function () {
    var _this = this;

    var count = 1;
    var i = 0;
    _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_7__.each(this.series.iterator(), function (series) {
      if (series instanceof _series_ColumnSeries3D__WEBPACK_IMPORTED_MODULE_5__.ColumnSeries3D) {
        if (!series.clustered && i > 0) {
          count++;
        }

        series.depthIndex = count - 1;
        i++;
      }
    });
    var s = 0;
    _core_utils_Iterator__WEBPACK_IMPORTED_MODULE_7__.each(this.series.iterator(), function (series) {
      if (series instanceof _series_ColumnSeries3D__WEBPACK_IMPORTED_MODULE_5__.ColumnSeries3D) {
        series.depth = _this.depth / count;
        series.angle = _this.angle;

        if (series.columnsContainer == _this.columnsContainer) {
          series.dx = _this.depth / count * _core_utils_Math__WEBPACK_IMPORTED_MODULE_8__.cos(_this.angle) * series.depthIndex;
          series.dy = -_this.depth / count * _core_utils_Math__WEBPACK_IMPORTED_MODULE_8__.sin(_this.angle) * series.depthIndex;
        }

        var inversed_1 = false;

        if (series.baseAxis == series.xAxis && series.xAxis.renderer.inversed || series.baseAxis == series.yAxis && series.yAxis.renderer.inversed) {
          inversed_1 = true;
        }

        var i_1 = 1;
        series.dataItems.each(function (dataItem) {
          var column = dataItem.column;

          if (column) {
            if (inversed_1) {
              column.zIndex = 1000 * (1000 - i_1) + s - series.depthIndex * 100;
            } else {
              column.zIndex = 1000 * i_1 + s - series.depthIndex * 100;
            }
          }

          i_1++;
        });

        if (inversed_1) {
          s--;
        } else {
          s++;
        }
      }
    });
    this.maskColumns();
  };
  /**
   * Processes JSON-based config before it is applied to the object.
   *
   * @ignore Exclude from docs
   * @param config  Config
   */


  XYChart3D.prototype.processConfig = function (config) {
    if (config) {
      // Set up series
      if (_core_utils_Type__WEBPACK_IMPORTED_MODULE_9__.hasValue(config.series) && _core_utils_Type__WEBPACK_IMPORTED_MODULE_9__.isArray(config.series)) {
        for (var i = 0, len = config.series.length; i < len; i++) {
          config.series[i].type = config.series[i].type || "ColumnSeries3D";
        }
      }
    }

    _super.prototype.processConfig.call(this, config);
  };

  XYChart3D.prototype.maskColumns = function () {
    var w = this.plotContainer.pixelWidth;
    var h = this.plotContainer.pixelHeight;
    var dx = this.dx3D;
    var dy = this.dy3D;
    var path = _core_rendering_Path__WEBPACK_IMPORTED_MODULE_10__.moveTo({
      x: 0,
      y: 0
    }) + _core_rendering_Path__WEBPACK_IMPORTED_MODULE_10__.lineTo({
      x: dx,
      y: dy
    }) + _core_rendering_Path__WEBPACK_IMPORTED_MODULE_10__.lineTo({
      x: w + dx,
      y: dy
    }) + _core_rendering_Path__WEBPACK_IMPORTED_MODULE_10__.lineTo({
      x: w + dx,
      y: h + dy
    }) + _core_rendering_Path__WEBPACK_IMPORTED_MODULE_10__.lineTo({
      x: w,
      y: h
    }) + _core_rendering_Path__WEBPACK_IMPORTED_MODULE_10__.lineTo({
      x: w,
      y: h
    }) + _core_rendering_Path__WEBPACK_IMPORTED_MODULE_10__.lineTo({
      x: 0,
      y: h
    }) + _core_rendering_Path__WEBPACK_IMPORTED_MODULE_10__.closePath();
    var columnsContainer = this.columnsContainer;

    if (columnsContainer && columnsContainer.mask) {
      columnsContainer.mask.path = path;
    }
  };

  return XYChart3D;
}(_XYChart__WEBPACK_IMPORTED_MODULE_0__.XYChart);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_6__.registry.registeredClasses.XYChart3D = XYChart3D;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/Base.js":
/*!*****************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/Base.js ***!
  \*****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "BaseObject": () => (/* binding */ BaseObject),
/* harmony export */   "BaseObjectEvents": () => (/* binding */ BaseObjectEvents)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _utils_List__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils/List */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/List.js");
/* harmony import */ var _utils_SortedList__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils/SortedList */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/SortedList.js");
/* harmony import */ var _utils_Dictionary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils/Dictionary */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Dictionary.js");
/* harmony import */ var _utils_Disposer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils/Disposer */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Disposer.js");
/* harmony import */ var _utils_EventDispatcher__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils/EventDispatcher */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/EventDispatcher.js");
/* harmony import */ var _utils_Adapter__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils/Adapter */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Adapter.js");
/* harmony import */ var _utils_Color__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./utils/Color */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Color.js");
/* harmony import */ var _utils_Percent__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./utils/Percent */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Percent.js");
/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _utils_Cache__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./utils/Cache */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Cache.js");
/* harmony import */ var _utils_Array__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./utils/Array */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Array.js");
/* harmony import */ var _utils_Object__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./utils/Object */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Object.js");
/* harmony import */ var _utils_Type__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/**
 * Base functionality
*/













 //import * as $debug from "./utils/Debug";

/**
 * Provides base functionality for all derivative objects, like generating ids,
 * handling cache, etc.
 */

var BaseObject =
/** @class */
function () {
  //protected _classes: { [index: string]: any } = {};

  /**
   * Constructor
   * * Sets class name
   */
  function BaseObject() {
    /**
     * Indicates if this object has already been deleted. Any
     * destruction/disposal code should take this into account when deciding
     * wheter to run potentially costly disposal operations if they already have
     * been run.
     */
    this._disposed = false;
    /**
     * List of IDisposer which will be disposed when the BaseObject is disposed.
     */

    this._disposers = [];
    this.className = "BaseObject"; //this.debug();
  }

  BaseObject.prototype.debug = function () {//$debug.debug(this);
  };

  Object.defineProperty(BaseObject.prototype, "uid", {
    /**
     * Returns object's internal unique ID.
     *
     * @return Unique ID
     */
    get: function get() {
      if (!this._uid) {
        this._uid = _Registry__WEBPACK_IMPORTED_MODULE_8__.registry.getUniqueId();
        _Registry__WEBPACK_IMPORTED_MODULE_8__.registry.map.setKey(this._uid, this);
      }

      return this._uid;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(BaseObject.prototype, "id", {
    /**
     * @return Id
     */
    get: function get() {
      return this._id;
    },

    /**
     * Sets the user-defined id of the element.
     *
     * @param value Id
     */
    set: function set(value) {
      //registry.map.setKey(value, this); // registry.map only stores by uid
      this._id = value;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(BaseObject.prototype, "map", {
    /**
     * Returns a universal collection for mapping ids with objects.
     *
     * @ignore Exclude from docs
     * @return Map collection
     */
    get: function get() {
      if (!this._map) {
        this._map = new _utils_Dictionary__WEBPACK_IMPORTED_MODULE_2__.Dictionary();
      }

      return this._map;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(BaseObject.prototype, "delayedMap", {
    /**
     * Returns mapping for objects referenced by id in JSON config that are not yet
     * available at processing time.
     *
     * @ignore Exclude from docs
     * @return Map collection
     */
    get: function get() {
      if (!this._delayedMap) {
        this._delayedMap = new _utils_Dictionary__WEBPACK_IMPORTED_MODULE_2__.Dictionary();
      }

      return this._delayedMap;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Logs an id and property of the target element that is not yet available
   * for later assignment.
   *
   * @ignore
   * @param  property  Property to set
   * @param  id        ID of the target element
   */

  BaseObject.prototype.addDelayedMap = function (property, id) {
    var map = this.delayedMap;

    if (!map.hasKey(id)) {
      map.setKey(id, []);
    }

    var list = map.getKey(id);
    list.push({
      property: property,
      target: this
    });
  };
  /**
   * Processes delayed JSON config items.
   *
   * @ignore
   */


  BaseObject.prototype.processDelayedMap = function () {
    var _this = this;

    this.delayedMap.each(function (id, list) {
      if (_this.map.hasKey(id)) {
        var target_1 = _this.map.getKey(id);

        _utils_Array__WEBPACK_IMPORTED_MODULE_10__.each(list, function (item) {
          item.target[item.property] = target_1;
        });

        _this.delayedMap.removeKey(id);
      }
    });
  };
  /**
   * Applies properties from all assigned themes.
   *
   * @ignore Exclude from docs
   */


  BaseObject.prototype.applyTheme = function () {
    var _this = this; // TODO is this needed ?


    if (_Registry__WEBPACK_IMPORTED_MODULE_8__.registry) {
      var themes = this.getCurrentThemes(); // TODO is this needed ?

      if (themes) {
        _utils_Array__WEBPACK_IMPORTED_MODULE_10__.each(themes, function (theme, index) {
          theme(_this);
        });
      }
    }
  };

  Object.defineProperty(BaseObject.prototype, "themes", {
    /**
     * @ignore Exclude from docs
     * @return An array of themes
     */
    get: function get() {
      return this._themes;
    },

    /**
     * A list of themes to be used for this element.
     *
     * @ignore Exclude from docs
     * @param value An array of themes
     */
    set: function set(value) {
      this._themes = value;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Returns a list of themes that should be applied to this element. It could
   * either be a list of themes set explicitly on this element, or system-wide.
   *
   * @return List of themes
   */

  BaseObject.prototype.getCurrentThemes = function () {
    return this.themes || _Registry__WEBPACK_IMPORTED_MODULE_8__.registry.themes;
  };
  /**
   * Returns if this object has been already been disposed.
   *
   * @return Is disposed?
   */


  BaseObject.prototype.isDisposed = function () {
    return this._disposed;
  };
  /**
   * Destroys this object and all related data.
   */


  BaseObject.prototype.dispose = function () {
    if (!this._disposed) {
      this._disposed = true;
      var a = this._disposers;
      this._disposers = null;

      while (a.length !== 0) {
        var disposer = a.shift();
        disposer.dispose();
      } // Clear cache


      this.clearCache(); // remove from clones list

      if (this.clonedFrom) {
        this.clonedFrom.clones.removeValue(this);
      }

      var uid = this._uid;

      if (uid != null) {
        _Registry__WEBPACK_IMPORTED_MODULE_8__.registry.map.removeKey(uid);
      }
    }
  };
  /**
   * Adds an IDisposer, which will be disposed when this object is disposed.
   *
   * @param target Object to dispose
   * @ignore Exclude from docs
   */


  BaseObject.prototype.addDisposer = function (target) {
    this._disposers.push(target);
  };
  /**
   * Disposes disposable object and removes it from `_disposers`.
   *
   * @param target Object to dispose
   * @ignore Exclude from docs
   */


  BaseObject.prototype.removeDispose = function (target) {
    //if(target){
    if (!this._disposed) {
      var index = _utils_Array__WEBPACK_IMPORTED_MODULE_10__.indexOf(this._disposers, target);

      if (index > -1) {
        this._disposers.splice(index, 1);
      }
    }

    target.dispose(); //}
  };
  /**
   * Makes a copy of this object and returns the clone. Try to avoid cloning complex objects like chart, create new instances if you need them.
   *
   * @param cloneId  An id to use for clone (if not set a unique id will be generated)
   * @returns Clone
   */


  BaseObject.prototype.clone = function (cloneId) {
    if (!cloneId) {
      cloneId = "clone-" + _Registry__WEBPACK_IMPORTED_MODULE_8__.registry.getUniqueId();
    }

    var newObject = new this.constructor();
    newObject.cloneId = cloneId;
    newObject.copyFrom(this); // add to clones list
    // this.clones.push(newObject); // moved this to copyFrom

    return newObject;
  };

  Object.defineProperty(BaseObject.prototype, "clones", {
    /**
     * Returns a collection of object's clones.
     *
     * @ignore Exclude from docs
     * @return Clones
     */
    get: function get() {
      if (!this._clones) {
        this._clones = new _utils_List__WEBPACK_IMPORTED_MODULE_0__.List();
      }

      return this._clones;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Copies all properties and related data from different element.
   *
   * @param object Source element
   */

  BaseObject.prototype.copyFrom = function (object) {
    object.clones.push(this); // do not moveValue, as it is expensive! even if there will be several items in clones list, it's not that bad.

    this.clonedFrom = object;
  };

  Object.defineProperty(BaseObject.prototype, "className", {
    /**
     * @ignore Exclude from docs
     * @return Class name
     */
    get: function get() {
      return this._className;
    },

    /**
     * Element's class name. (a class that was used to instantiate the element)
     *
     * @ignore Exclude from docs
     * @param value  Class name
     */
    set: function set(value) {
      this._className = value;
      /*if (registry) {
          registry.registeredClasses[value] = typeof this;
      }*/
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Caches value in object's cache.
   *
   * @ignore Exclude from docs
   * @param key    Key
   * @param value  Value
   * @param ttl    TTL in seconds
   */

  BaseObject.prototype.setCache = function (key, value, ttl) {
    _utils_Cache__WEBPACK_IMPORTED_MODULE_9__.cache.set(this.uid, key, value, ttl);
  };
  /**
   * Retrieves cached value.
   *
   * If optional second padarameter is specified, it will return that value
   * if cache is not available or is expired.
   *
   * @ignore Exclude from docs
   * @param key    Key
   * @param value  Value to return if cache is not available
   * @return Value
   */


  BaseObject.prototype.getCache = function (key, value) {
    if (value === void 0) {
      value = undefined;
    }

    return _utils_Cache__WEBPACK_IMPORTED_MODULE_9__.cache.get(this.uid, key, value);
  };
  /**
   * Clears object's local cache.
   *
   * @ignore Exclude from docs
   */


  BaseObject.prototype.clearCache = function () {
    _utils_Cache__WEBPACK_IMPORTED_MODULE_9__.cache.clear(this.uid);
  };
  /**
   * Creates [[Disposer]] for `setTimeout` function call. This ensures that all
   * timeouts created by the object will be cleared when object itself is
   * disposed.
   *
   * @ignore Exclude from docs
   * @param fn     Callback function
   * @param delay  Timeout (ms)
   * @return Disposer for timeout
   */


  BaseObject.prototype.setTimeout = function (fn, delay) {
    var _this = this;

    var id = setTimeout(function () {
      _this.removeDispose(disposer);

      fn();
    }, delay);
    var disposer = new _utils_Disposer__WEBPACK_IMPORTED_MODULE_3__.Disposer(function () {
      clearTimeout(id);
    });

    this._disposers.push(disposer);

    return disposer;
  };
  /**
   * Creates [[Disposer]] for `setInterval` function call. This ensures that all
   * timeouts created by the object will be cleared when object itself is
   * disposed.
   *
   * @ignore Exclude from docs
   * @param fn     Callback function
   * @param delay  Timeout (ms)
   * @return Disposer for timeout
   */


  BaseObject.prototype.setInterval = function (fn, delay) {
    var _this = this;

    var id = setInterval(function () {
      _this.removeDispose(disposer);

      fn();
    }, delay);
    var disposer = new _utils_Disposer__WEBPACK_IMPORTED_MODULE_3__.Disposer(function () {
      clearTimeout(id);
    });

    this._disposers.push(disposer);

    return disposer;
  };

  Object.defineProperty(BaseObject.prototype, "config", {
    /**
     * ==========================================================================
     * JSON-BASED CONFIG PROCESSING
     * ==========================================================================
     * @hidden
     */

    /**
     * Use this property to set JSON-based config. When set, triggers processing
     * routine, which will go through all properties, and try to apply values,
     * create instances, etc.
     *
     * Use this with caution, as it is a time-consuming process. It's used for
     * initialchart setup only, not routine operations.
     *
     * @param json JSON config
     */
    set: function set(config) {
      try {
        this.processConfig(config);
      } catch (e) {
        /*if (this instanceof Sprite) {
            this.raiseCriticalError(e);
        }*/
        this.raiseCriticalError(e);
      }
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Processes the JSON config.
   *
   * @param json  JSON config
   * @ignore Exclude from docs
   */

  BaseObject.prototype.processConfig = function (config) {
    var _this = this;

    if (!config) {
      return;
    } // Get target


    var target = this; // Iterate through all of the items

    _utils_Object__WEBPACK_IMPORTED_MODULE_11__.eachOrdered(config, function (configKey, value) {
      var configValue = value; // Is this a callback?

      if (configKey == "callback" && typeof value == "function") {
        value.call(target);
      } // Check if there's a property in target


      if (_this.hasProperty(configKey)) {
        var item_1; // Do we have instructions to create an object?
        // We create a new object if "type" key is set, but only if the
        // target object is of different type.

        if (_utils_Type__WEBPACK_IMPORTED_MODULE_12__.isObject(configValue) && _utils_Type__WEBPACK_IMPORTED_MODULE_12__.hasValue(configValue["type"]) && (!_utils_Type__WEBPACK_IMPORTED_MODULE_12__.isObject(target[configKey]) || !_utils_Type__WEBPACK_IMPORTED_MODULE_12__.hasValue(target[configKey].className) || configValue["forceCreate"] || target[configKey].className != configValue["type"]) && !_this.asIs(configKey)) {
          item_1 = _this.createClassInstance(configValue["type"]); // Create new instance

          if (item_1) {
            target[configKey] = item_1;
          } else {
            item_1 = target[configKey];
          }
        } else {
          // Get item from the object
          item_1 = target[configKey];
        }
        /**
         * It is...
         * --------------------------------------------------------------------
         */


        if (item_1 instanceof _utils_Adapter__WEBPACK_IMPORTED_MODULE_5__.Adapter) {
          // ... an Adapter, try to add handlers to it
          // ------------------------------------------------------------------
          _this.processAdapters(item_1, configValue);
        } else if (item_1 instanceof _utils_EventDispatcher__WEBPACK_IMPORTED_MODULE_4__.EventDispatcher) {
          // ... an EventDispatcher, try to add handlers to it
          // ------------------------------------------------------------------
          _this.processEvents(item_1, configValue);
        } else if (configKey == "locale" && _utils_Type__WEBPACK_IMPORTED_MODULE_12__.isString(configValue)) {
          // ... a locale specified as string, e.g. "fr_FR"
          // ------------------------------------------------------------------
          if (window["am4lang_" + configValue]) {
            target[configKey] = window["am4lang_" + configValue];
          }
        } else if (configKey == "parent" && _utils_Type__WEBPACK_IMPORTED_MODULE_12__.isString(configValue)) {
          // ... a parent referred via its it
          // ------------------------------------------------------------------
          var parent_1 = _this.map.getKey(configValue);

          if (parent_1) {
            target[configKey] = parent_1;
          } else {
            _this.addDelayedMap("parent", configValue);
          }
        } else if (_this.asIs(configKey)) {
          // ... a special field, just set it to new value
          // ------------------------------------------------------------------
          // (no need to add each indvidual item)
          target[configKey] = configValue;
        } else if (_this.asFunction(configKey) && _utils_Type__WEBPACK_IMPORTED_MODULE_12__.isString(configValue)) {
          // ... a field indicating function name to look for in registry
          // ------------------------------------------------------------------
          if (_utils_Type__WEBPACK_IMPORTED_MODULE_12__.hasValue(_Registry__WEBPACK_IMPORTED_MODULE_8__.registry.registeredClasses[configValue])) {
            target[configKey] = _Registry__WEBPACK_IMPORTED_MODULE_8__.registry.registeredClasses[configValue];
          } else {
            throw Error("Invalid easing function: " + configValue);
          }
        } else if (configValue instanceof BaseObject) {
          // ... a BaseObject object, we just going to use it as it is
          // ------------------------------------------------------------------
          target[configKey] = configValue;
        } else if (item_1 instanceof BaseObject) {
          // ... another child BaseObject
          // ------------------------------------------------------------------
          // Let's just pass in config part in and let itself deal with it
          item_1.config = configValue;
        } else if (item_1 instanceof _utils_List__WEBPACK_IMPORTED_MODULE_0__.ListTemplate || item_1 instanceof _utils_SortedList__WEBPACK_IMPORTED_MODULE_1__.OrderedListTemplate || item_1 instanceof _utils_SortedList__WEBPACK_IMPORTED_MODULE_1__.SortedListTemplate) {
          // ... a list with template
          // ------------------------------------------------------------------
          // Let's see what we can do with it
          if (_utils_Type__WEBPACK_IMPORTED_MODULE_12__.isArray(configValue)) {
            // It's an array.
            // Create a list item for entry, or try to apply properties to an
            // existing entry if possible and it is present.
            if (item_1 instanceof _utils_List__WEBPACK_IMPORTED_MODULE_0__.ListTemplate) {
              _this.processListTemplate(configValue, item_1);
            } else {
              _this.processOrderedTemplate(configValue, item_1);
            }
          } else if (_utils_Type__WEBPACK_IMPORTED_MODULE_12__.isObject(configValue)) {
            // It's a single oject.
            // Treat it as a template.
            if (configValue instanceof BaseObject) {
              // Item is already a BaseObject, no need to process it further
              item_1.template = configValue;
            } else {
              // Now let's find out if the whole object if a template, or we
              // need to get it from `template` key
              var templateValue = void 0;

              if (_utils_Type__WEBPACK_IMPORTED_MODULE_12__.hasValue(configValue.template)) {
                templateValue = configValue.template;
              } else {
                templateValue = configValue;
              }

              if (item_1.template instanceof BaseObject) {
                // Template is a BaseObject so we will just let its config
                // deal with the configuration
                item_1.template.config = templateValue;
              } else {
                _utils_Object__WEBPACK_IMPORTED_MODULE_11__.each(templateValue, function (entryKey, entryValue) {
                  var listItem = item_1.template[entryKey];

                  if (listItem instanceof _utils_Adapter__WEBPACK_IMPORTED_MODULE_5__.Adapter) {
                    _this.processAdapters(listItem, entryValue);
                  } else if (listItem instanceof _utils_EventDispatcher__WEBPACK_IMPORTED_MODULE_4__.EventDispatcher) {
                    _this.processEvents(listItem, entryValue);
                  } else if (listItem instanceof _utils_Dictionary__WEBPACK_IMPORTED_MODULE_2__.DictionaryTemplate) {
                    _this.processDictionaryTemplate(listItem, entryValue);
                  } else if (item_1.template[entryKey] instanceof BaseObject) {
                    // Template is a BaseObject. Let it deal with its own config.
                    item_1.template[entryKey].config = entryValue;
                  } else if (_utils_Type__WEBPACK_IMPORTED_MODULE_12__.isObject(entryValue) && _utils_Type__WEBPACK_IMPORTED_MODULE_12__.hasValue(entryValue["type"])) {
                    listItem = _this.createClassInstance(entryValue["type"]);

                    if (listItem) {
                      if (listItem instanceof BaseObject) {
                        listItem.config = entryValue;
                      }

                      item_1.template[entryKey] = listItem;
                    } else {
                      item_1.template[entryKey] = entryValue;
                    }
                  } else if (listItem instanceof _utils_List__WEBPACK_IMPORTED_MODULE_0__.List) {
                    // It's List, process it
                    _this.processList(entryValue, listItem);
                  } else {
                    // Aything else. Just assing and be done with it.
                    item_1.template[entryKey] = _this.maybeColorOrPercent(entryValue);
                  }
                });
              } // Check maybe there are `values` to insert


              if (_utils_Type__WEBPACK_IMPORTED_MODULE_12__.hasValue(configValue.values)) {
                if (item_1 instanceof _utils_List__WEBPACK_IMPORTED_MODULE_0__.ListTemplate) {
                  _this.processListTemplate(configValue.values, item_1);
                } else {
                  _this.processOrderedTemplate(configValue.values, item_1);
                }
              }
            }
          } else {// Something else?
            // Not sure what to do with it on a list - ignore
          }
        } else if (item_1 instanceof _utils_List__WEBPACK_IMPORTED_MODULE_0__.List) {
          // ... a list
          // ------------------------------------------------------------------
          if (configKey == "children") {
            _this.processList(configValue, item_1, _this);
          } else {
            _this.processList(configValue, item_1);
          }
        } else if (item_1 instanceof _utils_Dictionary__WEBPACK_IMPORTED_MODULE_2__.DictionaryTemplate) {
          // ... a dictionary with template
          // ------------------------------------------------------------------
          _this.processDictionaryTemplate(item_1, configValue);
        } else if (item_1 instanceof _utils_Dictionary__WEBPACK_IMPORTED_MODULE_2__.Dictionary) {
          // ... a dictionary
          // ------------------------------------------------------------------
          _this.processDictionary(item_1, configValue);
        } else if (item_1 instanceof _utils_Color__WEBPACK_IMPORTED_MODULE_6__.Color || item_1 instanceof _utils_Percent__WEBPACK_IMPORTED_MODULE_7__.Percent) {
          // ... it's a Color or Percent
          // ------------------------------------------------------------------
          target[configKey] = _this.maybeColorOrPercent(configValue);
        } else if (_utils_Type__WEBPACK_IMPORTED_MODULE_12__.isObject(item_1) && _utils_Type__WEBPACK_IMPORTED_MODULE_12__.isObject(configValue)) {
          // ... a regular object
          // ------------------------------------------------------------------
          _utils_Object__WEBPACK_IMPORTED_MODULE_11__.copyAllProperties(configValue, item_1);
        } else {
          // ... something else - probably a simple property or object
          // ------------------------------------------------------------------
          // Maybe convert to `Percent` or `Color`?
          configValue = _this.maybeColorOrPercent(configValue); // Assign

          target[configKey] = configValue;
        }
      } else if (!_this.isReserved(configKey)) {
        // Doesn't have property set. But we're going to assume JSON config
        // creator knows what he/she is doing and set it anyway.
        target[configKey] = configValue;
      }
    }, this.configOrder); // Any errors?

    if (this.processingErrors.length) {
      var errors = this.processingErrors.join("\n");
      this._processingErrors = [];
      throw Error(errors);
    }
  };
  /**
   * Tries to detect if value is color or percent and converts to proper object
   * if necessary.
   *
   * Returns the same source value if no color/percent detected
   *
   * @param value  Source value
   * @return Converted value
   */


  BaseObject.prototype.maybeColorOrPercent = function (value) {
    if (_utils_Type__WEBPACK_IMPORTED_MODULE_12__.isString(value)) {
      if (value.match(/^[\-]?[0-9.]+\%$/)) {
        return (0,_utils_Percent__WEBPACK_IMPORTED_MODULE_7__.percent)(_utils_Type__WEBPACK_IMPORTED_MODULE_12__.toNumber(value));
      } else if (value.match(/^\#[0-9abcdef]{3,}$/i)) {
        return (0,_utils_Color__WEBPACK_IMPORTED_MODULE_6__.color)(value);
      }
    }

    return value;
  };

  BaseObject.prototype.processAdapters = function (item, config) {
    var _this = this;

    if (_utils_Type__WEBPACK_IMPORTED_MODULE_12__.isArray(config)) {
      _utils_Array__WEBPACK_IMPORTED_MODULE_10__.each(config, function (entry, index) {
        item.add(entry.key, entry.callback, entry.priority || 0, _this);
      });
    } else if (_utils_Type__WEBPACK_IMPORTED_MODULE_12__.isObject(config)) {
      _utils_Object__WEBPACK_IMPORTED_MODULE_11__.each(config, function (key, entry) {
        if (!item.has(key, entry)) {
          item.add(key, entry);
        }
      });
    }
  };

  BaseObject.prototype.processEvents = function (item, config) {
    var _this = this;

    if (_utils_Type__WEBPACK_IMPORTED_MODULE_12__.isArray(config)) {
      _utils_Array__WEBPACK_IMPORTED_MODULE_10__.each(config, function (entry, index) {
        item.on(entry.type, entry.callback, _this);
      });
    } else if (_utils_Type__WEBPACK_IMPORTED_MODULE_12__.isObject(config)) {
      _utils_Object__WEBPACK_IMPORTED_MODULE_11__.each(config, function (key, entry) {
        if (!item.has(key, entry)) {
          item.on(key, entry);
        }
      });
    }
  };
  /**
   * Processes JSON config for a [[DictionaryTemplate]] item.
   *
   * @todo Description
   * @param item    Item
   * @param config  Config
   */


  BaseObject.prototype.processDictionaryTemplate = function (item, config) {
    // We can only process object
    // Not sure what to do with other types - ignore
    if (_utils_Type__WEBPACK_IMPORTED_MODULE_12__.isObject(config)) {
      // Create an entry for each item, or override properties for
      // existing one.
      _utils_Object__WEBPACK_IMPORTED_MODULE_11__.each(config, function (entryKey, entryValue) {
        var listItem; // Get existing one, or create a new one

        if (entryKey == "template") {
          listItem = item.template;
        } else if (item.hasKey(entryKey)) {
          listItem = item.getKey(entryKey);
        } else {
          listItem = item.create(entryKey);
        } // Set data


        if (listItem instanceof BaseObject) {
          listItem.config = entryValue;
        } else if (_utils_Type__WEBPACK_IMPORTED_MODULE_12__.isObject(listItem) && _utils_Type__WEBPACK_IMPORTED_MODULE_12__.isObject(entryValue)) {
          _utils_Object__WEBPACK_IMPORTED_MODULE_11__.copyAllProperties(entryValue, listItem);
        } else {
          listItem.setKey(entryKey, entryValue);
        }
      });
    }
  };
  /**
   * Processes JSON config for a [[Dictionary]] item.
   *
   * @todo Description
   * @param item    Item
   * @param config  Config
   */


  BaseObject.prototype.processDictionary = function (item, config) {
    // We can only process object
    // Not sure what to do with other types - ignore
    if (_utils_Type__WEBPACK_IMPORTED_MODULE_12__.isObject(config)) {
      // Create an entry for each item, or override properties for
      // existing one.
      // @todo support for non-basic types
      _utils_Object__WEBPACK_IMPORTED_MODULE_11__.each(config, function (entryKey, entryValue) {
        item.setKey(entryKey, entryValue);
      });
    }
  };
  /**
   * Processes [[ListTemplate]].
   *
   * @param configValue  Config value
   * @param item         Item
   */


  BaseObject.prototype.processListTemplate = function (configValue, item) {
    var _this = this;

    _utils_Array__WEBPACK_IMPORTED_MODULE_10__.each(configValue, function (entry, index) {
      var type = _this.getConfigEntryType(entry);

      var listItem;

      if (item.hasIndex(index) && !entry["forceCreate"]) {
        listItem = item.getIndex(index);
      } else if (entry instanceof BaseObject) {
        // Item is already a BaseObject, no need to process it further
        item.push(entry);
        return;
      } else if (type) {
        listItem = item.create(type);
      } else {
        listItem = item.create();
      }

      if (entry === listItem) {// It's already the same item, do nothing
      } else {
        if (_utils_Type__WEBPACK_IMPORTED_MODULE_12__.isObject(entry)) {
          // If the list item is BaseObject, we just need to let it
          // deal if its own config
          if (listItem instanceof BaseObject) {
            listItem.config = entry;
          } else if (_utils_Type__WEBPACK_IMPORTED_MODULE_12__.isObject(listItem) && _utils_Type__WEBPACK_IMPORTED_MODULE_12__.isObject(entry)) {
            _utils_Object__WEBPACK_IMPORTED_MODULE_11__.copyAllProperties(entry, listItem);
          } else {
            item.setIndex(item.indexOf(listItem), entry);
          }
        }
      }
    }); // Truncate the list if it contains less items than the config
    // array

    while (configValue.length > item.length) {
      item.pop();
    }
  };
  /**
   * Processes [[OrdererListTemplate]] or [[SortedListTemplate]].
   *
   * @param configValue  Config value
   * @param item         Item
   */


  BaseObject.prototype.processOrderedTemplate = function (configValue, item) {
    var _this = this;

    _utils_Array__WEBPACK_IMPORTED_MODULE_10__.each(configValue, function (entry, index) {
      var type = _this.getConfigEntryType(entry);

      var listItem;

      if (type) {
        listItem = item.create(type);
      } else {
        listItem = item.create();
      }

      if (_utils_Type__WEBPACK_IMPORTED_MODULE_12__.isObject(entry)) {
        // If the list item is BaseObject, we just need to let it
        // deal if its own config
        if (listItem instanceof BaseObject) {
          listItem.config = entry;
        } else if (_utils_Type__WEBPACK_IMPORTED_MODULE_12__.isObject(listItem) && _utils_Type__WEBPACK_IMPORTED_MODULE_12__.isObject(entry)) {
          _utils_Object__WEBPACK_IMPORTED_MODULE_11__.copyAllProperties(entry, listItem);
        } else {
          item.insert(entry);
        }
      }
    });
  };
  /**
   * Processes [[List]].
   *
   * @param configValue  Config value
   * @param item         Item
   */


  BaseObject.prototype.processList = function (configValue, item, parent) {
    var _this = this; // Convert to array if necessary


    if (!_utils_Type__WEBPACK_IMPORTED_MODULE_12__.isArray(configValue)) {
      configValue = [configValue];
    } // It's an array
    // Create a list item for entry


    var itemCount = item.length;
    var extraCount = 0;
    _utils_Array__WEBPACK_IMPORTED_MODULE_10__.each(configValue, function (entry, index) {
      if (_utils_Type__WEBPACK_IMPORTED_MODULE_12__.isObject(entry)) {
        // An object.
        //
        // Let's see if we can instantiate a class out of it, or we need
        // to push it into list as it is.
        //
        // If there are items already at the specified index in the list,
        // apply properties rather than create a new one.
        var listItem = void 0;

        if (index < itemCount && !entry["forceCreate"]) {
          listItem = item.getIndex(index);
        } else if (entry instanceof BaseObject) {
          // Item is already a BaseObject, no need to process it further
          item.push(entry);
          return;
        } else {
          extraCount++;
          listItem = _this.createEntryInstance(entry);

          if (parent) {
            listItem.parent = parent;
          } else {
            item.push(listItem);
          }
        } // If the list item is BaseObject, we just need to let it
        // deal if its own config


        if (listItem instanceof BaseObject) {
          listItem.config = entry;
        } else if (_utils_Type__WEBPACK_IMPORTED_MODULE_12__.isObject(listItem) && _utils_Type__WEBPACK_IMPORTED_MODULE_12__.isObject(entry)) {
          _utils_Object__WEBPACK_IMPORTED_MODULE_11__.copyAllProperties(entry, listItem);
        }
      } else {
        // Basic value.
        // Just push it into list, or override existing value
        if (item.hasIndex(index)) {
          item.setIndex(index, entry);
        } else {
          item.push(entry);
        }
      }
    }); // Truncate the list if it contains less items than the config
    // array

    while (!parent && configValue.length + extraCount < item.length) {
      item.pop();
    }
  };
  /**
   * This function is used to sort element's JSON config properties, so that
   * some properties that absolutely need to be processed last, can be put at
   * the end.
   *
   * @ignore Exclude from docs
   * @param a  Element 1
   * @param b  Element 2
   * @return Sorting number
   */


  BaseObject.prototype.configOrder = function (a, b) {
    if (a == b) {
      return 0;
    } // Language must come first, so it's all set up when the rest of the
    // elements are being instantiated
    else if (a == "language") {
      return -1;
    } else if (b == "language") {
      return 1;
    } else {
      return 0;
    }
  };
  /**
   * Checks if field should be just assigned as is, without any checking when
   * processing JSON config.
   *
   * Extending functions can override this function to do their own checks.
   *
   * @param field  Field name
   * @return Assign as is?
   */


  BaseObject.prototype.asIs = function (field) {
    return _utils_Array__WEBPACK_IMPORTED_MODULE_10__.indexOf(["locale"], field) != -1;
  };
  /**
   * Checks if field needs to be converted to function, if it is specified
   * as string.
   *
   * @param field  Field name
   * @return Assign as function?
   */


  BaseObject.prototype.asFunction = function (field) {
    return false;
  };
  /**
   * Creates a relevant class instance if such class definition exists.
   *
   * @ignore Exclude from docs
   * @param className  Class name
   * @return Instance
   */


  BaseObject.prototype.createClassInstance = function (className) {
    if (_utils_Type__WEBPACK_IMPORTED_MODULE_12__.hasValue(_Registry__WEBPACK_IMPORTED_MODULE_8__.registry.registeredClasses[className])) {
      return new _Registry__WEBPACK_IMPORTED_MODULE_8__.registry.registeredClasses[className]();
    } else {
      throw Error("Invalid type: \"" + className + "\".");
    }
  };
  /**
   * Creates a class instance for a config entry using it's type. (as set in
   * `type` property)
   *
   * @ignore Exclude from docs
   * @param config  Config part
   * @return Instance
   */


  BaseObject.prototype.createEntryInstance = function (config) {
    var res;

    if (_utils_Type__WEBPACK_IMPORTED_MODULE_12__.hasValue(config["type"])) {
      res = this.createClassInstance(config["type"]);
    }

    if (!res) {
      return config;
    }

    return res;
  };
  /**
   * Determines config object type.
   *
   * @ignore Exclude from docs
   * @param config  Config part
   * @return Type
   */


  BaseObject.prototype.getConfigEntryType = function (config) {
    if (_utils_Type__WEBPACK_IMPORTED_MODULE_12__.hasValue(config["type"])) {
      if (_utils_Type__WEBPACK_IMPORTED_MODULE_12__.hasValue(_Registry__WEBPACK_IMPORTED_MODULE_8__.registry.registeredClasses[config["type"]])) {
        return _Registry__WEBPACK_IMPORTED_MODULE_8__.registry.registeredClasses[config["type"]];
      } else {
        throw Error("Invalid type: \"" + config["type"] + "\".");
      }
    }

    return;
  };
  /**
   * Checks if this element has a property.
   *
   * @ignore Exclude from docs
   * @param prop  Property name
   * @return Has property?
   */


  BaseObject.prototype.hasProperty = function (prop) {
    return prop in this ? true : false;
  };
  /**
   * Checkes whether JSON key is a reserved keyword.
   *
   * @param key  Key
   * @return Reserved
   */


  BaseObject.prototype.isReserved = function (key) {
    return ["type", "forceCreate"].indexOf(key) !== -1;
  };

  Object.defineProperty(BaseObject.prototype, "processingErrors", {
    /**
     * A list of errors that happened during JSON processing.
     *
     * @return Errors
     */
    get: function get() {
      if (!this._processingErrors) {
        this._processingErrors = [];
      }

      return this._processingErrors;
    },
    enumerable: true,
    configurable: true
  });
  return BaseObject;
}();


;
/**
 * A version of [[BaseObject]] with events properties and methods.
 * Classes that use [[EventDispatcher]] should extend this instead of
 * [[BaseObject]] directly.
 */

var BaseObjectEvents =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_13__.__extends)(BaseObjectEvents, _super);
  /**
   * Constructor
   */


  function BaseObjectEvents() {
    var _this = _super.call(this) || this;

    _this.className = "BaseObjectEvents";
    return _this;
  }

  Object.defineProperty(BaseObjectEvents.prototype, "events", {
    /**
     * An [[EventDispatcher]] instance
     */
    get: function get() {
      if (!this._eventDispatcher) {
        this._eventDispatcher = new _utils_EventDispatcher__WEBPACK_IMPORTED_MODULE_4__.EventDispatcher();

        this._disposers.push(this._eventDispatcher);
      }

      return this._eventDispatcher;
    },
    enumerable: true,
    configurable: true
  }); //public set events(value:EventDispatcher<AMEvent<this, this["_events"]>>){
  //	this._eventDispatcher = value;
  //}

  /**
   * Dispatches an event using own event dispatcher. Will automatically
   * populate event data object with event type and target (this element).
   * It also checks if there are any handlers registered for this sepecific
   * event.
   *
   * @param eventType Event type (name)
   * @param data      Data to pass into event handler(s)
   */

  BaseObjectEvents.prototype.dispatch = function (eventType, data) {
    // @todo Implement proper type check
    if (this._eventDispatcher) {
      if (this.events.isEnabled(eventType)) {
        if (data) {
          data.type = eventType;
          data.target = data.target || this;
          this.events.dispatch(eventType, {
            type: eventType,
            target: this
          });
        } else {
          this.events.dispatch(eventType, {
            type: eventType,
            target: this
          });
        }
      }
    }
  };
  /**
   * Works like `dispatch`, except event is triggered immediately, without
   * waiting for the next frame cycle.
   *
   * @param eventType Event type (name)
   * @param data      Data to pass into event handler(s)
   */


  BaseObjectEvents.prototype.dispatchImmediately = function (eventType, data) {
    // @todo Implement proper type check
    if (this._eventDispatcher) {
      if (this.events.isEnabled(eventType)) {
        if (data) {
          data.type = eventType;
          data.target = data.target || this;
          this.events.dispatchImmediately(eventType, data);
        } else {
          this.events.dispatchImmediately(eventType, {
            type: eventType,
            target: this
          });
        }
      }
    }
  };
  /**
   * Copies all parameters from another [[Sprite]].
   *
   * @param source Source object
   */


  BaseObjectEvents.prototype.copyFrom = function (source) {
    _super.prototype.copyFrom.call(this, source);

    if (source._eventDispatcher) {
      this.events.copyFrom(source._eventDispatcher);
    }
  };

  return BaseObjectEvents;
}(BaseObject);



/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/Component.js":
/*!**********************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/Component.js ***!
  \**********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Component": () => (/* binding */ Component)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Container__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Container */ "./node_modules/@amcharts/amcharts4/.internal/core/Container.js");
/* harmony import */ var _utils_List__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils/List */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/List.js");
/* harmony import */ var _utils_SortedList__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils/SortedList */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/SortedList.js");
/* harmony import */ var _utils_Dictionary__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils/Dictionary */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Dictionary.js");
/* harmony import */ var _utils_Disposer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils/Disposer */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Disposer.js");
/* harmony import */ var _data_DataSource__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./data/DataSource */ "./node_modules/@amcharts/amcharts4/.internal/core/data/DataSource.js");
/* harmony import */ var _utils_Responsive__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./utils/Responsive */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Responsive.js");
/* harmony import */ var _System__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./System */ "./node_modules/@amcharts/amcharts4/.internal/core/System.js");
/* harmony import */ var _DataItem__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./DataItem */ "./node_modules/@amcharts/amcharts4/.internal/core/DataItem.js");
/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _utils_Math__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
/* harmony import */ var _utils_Array__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./utils/Array */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Array.js");
/* harmony import */ var _utils_Ease__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./utils/Ease */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Ease.js");
/* harmony import */ var _utils_Utils__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./utils/Utils */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Utils.js");
/* harmony import */ var _utils_Iterator__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./utils/Iterator */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Iterator.js");
/* harmony import */ var _utils_Object__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./utils/Object */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Object.js");
/* harmony import */ var _utils_Type__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */


















/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * A Component represents an independent functional element or control, that
 * can have it's own behavior, children, data, etc.
 *
 * A few examples of a Component: [[Legend]], [[Series]], [[Scrollbar]].
 *
 * @see {@link IComponentEvents} for a list of available events
 * @see {@link IComponentAdapters} for a list of available Adapters
 * @important
 */

var Component =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_17__.__extends)(Component, _super);
  /**
   * Constructor
   */


  function Component() {
    var _this = // Init
    _super.call(this) || this;
    /**
     * Holds data field names.
     *
     * Data fields define connection beween [[DataItem]] and actual properties
     * in raw data.
     */


    _this.dataFields = {};
    /**
     * A list of [[DataSource]] definitions of external data source.
     *
     * @ignore Exclude from docs
     */

    _this._dataSources = {};
    /**
     * This is used when only new data is invalidated (if added using `addData`
     * method).
     *
     * @ignore Exclude from docs
     */

    _this._parseDataFrom = 0;
    /**
     * Holds the disposers for the dataItems and dataUsers
     *
     * @ignore Exclude from docs
     */

    _this._dataDisposers = [];
    /**
     * Currently selected "data set".
     *
     * If it's set to `""`, main data set (unaggregated data) is used.
     */

    _this._currentDataSetId = "";
    /**
     * [_start description]
     *
     * @ignore Exclude from docs
     */

    _this._start = 0;
    /**
     * [_end description]
     *
     * @ignore Exclude from docs
     */

    _this._end = 1;
    /**
     * If set to `true`, changing data range in element will not trigger
     * `daterangechanged` event.
     */

    _this.skipRangeEvent = false;
    /**
     * Whenever selected scope changes (chart is zoomed or panned), for example
     * by interaction from a Scrollbar, or API, a chart needs to reposition
     * its contents.
     *
     * `rangeChangeDuration` influences how this is performed.
     *
     * If set to zero (0), the change will happen instantenously.
     *
     * If set to non-zero value, the chart will gradually animate into new
     * position for the set amount of milliseconds.
     *
     * @default 0
     * @see {@link https://www.amcharts.com/docs/v4/concepts/animations/} for more info about animations
     */

    _this.rangeChangeDuration = 0;
    /**
     * An easing function to use for range change animation.
     *
     * @see {@link Ease}
     * @see {@link https://www.amcharts.com/docs/v4/concepts/animations/} for more info about animations
     */

    _this.rangeChangeEasing = _utils_Ease__WEBPACK_IMPORTED_MODULE_12__.cubicOut;
    /**
     * A duration (ms) of each data parsing step. A Component parses its data in
     * chunks in order to avoid completely freezing the machine when large data
     * sets are used. This setting will control how many milliseconds should pass
     * when parsing data until parser stops for a brief moment to let other
     * processes catch up.
     */

    _this.parsingStepDuration = 50;
    /**
     * [dataInvalid description]
     *
     * @ignore Exclude from docs
     * @todo Description
     */

    _this.dataInvalid = false;
    /**
     *
     * @ignore Exclude from docs
     */

    _this.rawDataInvalid = false;
    /**
     * [dataRangeInvalid description]
     *
     * @ignore Exclude from docs
     * @todo Description
     */

    _this.dataRangeInvalid = false;
    /**
     * [dataItemsInvalid description]
     *
     * @ignore Exclude from docs
     * @todo Description
     */

    _this.dataItemsInvalid = false;
    /**
     * If set to a non-zero number the element will "animate" data values of its
     * children.
     *
     * This will happen on first load and whenever data values change.
     *
     * Enabling interpolation will mean that elements will transit smoothly into
     * new values rather than updating instantly.
     *
     * @default 0
     * @see {@link https://www.amcharts.com/docs/v4/concepts/animations/} for more info about animations
     */

    _this.interpolationDuration = 0;
    /**
     * An easing function to use for interpolating values when transiting from
     * one source value to another.
     *
     * @default cubicOut
     * @see {@link https://www.amcharts.com/docs/v4/concepts/animations/} for more info about animations
     * @see {@link Ease}
     */

    _this.interpolationEasing = _utils_Ease__WEBPACK_IMPORTED_MODULE_12__.cubicOut;
    /**
     * Indicates whether transition between data item's values should start and
     * play out all at once, or with a small delay (as defined by
     * `sequencedInterpolationDelay`) for each subsequent data item.
     *
     * @default true
     * @see {@link https://www.amcharts.com/docs/v4/concepts/animations/} for more info about animations
     */

    _this.sequencedInterpolation = true;
    /**
     * A delay (ms) to wait between animating each subsequent data item's
     * interpolation animation.
     *
     * Relative only if `sequencedInterpolation = true`.
     *
     * @default 0
     * @see {@link https://www.amcharts.com/docs/v4/concepts/animations/} for more info about animations
     */

    _this.sequencedInterpolationDelay = 0;
    /**
     * A progress (0-1) for the data validation process.
     *
     * @ignore Exclude from docs
     */

    _this.dataValidationProgress = 0;
    _this._addAllDataItems = true;
    _this._usesData = true;
    _this.className = "Component";
    _this.minZoomCount = 1;
    _this.maxZoomCount = 0;
    _this._dataItems = new _utils_SortedList__WEBPACK_IMPORTED_MODULE_2__.OrderedListTemplate(_this.createDataItem());

    _this._dataItems.events.on("inserted", _this.handleDataItemAdded, _this, false);

    _this._dataItems.events.on("removed", _this.handleDataItemRemoved, _this, false);

    _this._disposers.push(new _utils_List__WEBPACK_IMPORTED_MODULE_1__.ListDisposer(_this._dataItems));

    _this._disposers.push(_this._dataItems.template);

    _this.invalidateData(); // TODO what about remove ?


    _this.dataUsers.events.on("inserted", _this.handleDataUserAdded, _this, false); // Set up disposers


    _this._disposers.push(new _utils_Disposer__WEBPACK_IMPORTED_MODULE_4__.MultiDisposer(_this._dataDisposers));

    _this._start = 0;
    _this._end = 1;
    _this.maxZoomDeclination = 1; // Apply theme

    _this.applyTheme();

    return _this;
  }
  /**
   * Returns a new/empty DataItem of the type appropriate for this object.
   *
   * @see {@link DataItem}
   * @return Data Item
   */


  Component.prototype.createDataItem = function () {
    return new _DataItem__WEBPACK_IMPORTED_MODULE_8__.DataItem();
  };
  /**
   * [handleDataUserAdded description]
   *
   * @ignore Exclude from docs
   * @todo Description
   * @param event Event object
   */


  Component.prototype.handleDataUserAdded = function (event) {
    var dataUser = event.newValue;
    dataUser.dataProvider = this;
  };
  /**
   * [handleDataItemValueChange description]
   *
   * @ignore Exclude from docs
   * @todo Description
   */


  Component.prototype.handleDataItemValueChange = function (dataItem, name) {
    if (!this.dataItemsInvalid) {
      this.invalidateDataItems();
    }
  };
  /**
   * [handleDataItemWorkingValueChange description]
   *
   * @ignore Exclude from docs
   */


  Component.prototype.handleDataItemWorkingValueChange = function (dataItem, name) {};
  /**
   * [handleDataItemWorkingLocationChange description]
   *
   * @ignore Exclude from docs
   */


  Component.prototype.handleDataItemWorkingLocationChange = function (dataItem, name) {};
  /**
   * [handleDataItemCalculatedValueChange description]
   *
   * @ignore Exclude from docs
   */


  Component.prototype.handleDataItemCalculatedValueChange = function (dataItem, name) {};
  /**
   * [handleDataItemPropertyChange description]
   *
   * @ignore Exclude from docs
   */


  Component.prototype.handleDataItemPropertyChange = function (dataItem, name) {};
  /**
   * Populates a [[DataItem]] width data from data source.
   *
   * Loops through all the fields and if such a field is found in raw data
   * object, a corresponding value on passed in `dataItem` is set.
   *
   * @ignore Exclude from docs
   * @param item
   */


  Component.prototype.processDataItem = function (dataItem, dataContext) {
    var _this = this;

    if (dataItem) {
      if (!dataContext) {
        dataContext = {};
      } // store reference to original data item


      dataItem.dataContext = dataContext;
      var hasSomeValues_1 = false;
      _utils_Object__WEBPACK_IMPORTED_MODULE_15__.each(this.dataFields, function (key, fieldValue) {
        var fieldName = key;
        var value = dataContext[fieldValue]; // Apply adapters to a retrieved value

        if (_this._adapterO) {
          if (_this._adapterO.isEnabled("dataContextValue")) {
            value = _this._adapterO.apply("dataContextValue", {
              field: fieldName,
              value: value,
              dataItem: dataItem
            }).value;
          }
        }

        if (_utils_Type__WEBPACK_IMPORTED_MODULE_16__.hasValue(value)) {
          hasSomeValues_1 = true;

          if (dataItem.hasChildren[fieldName]) {
            var template = _this.createDataItem();

            template.copyFrom(_this.mainDataSet.template);
            var children = new _utils_SortedList__WEBPACK_IMPORTED_MODULE_2__.OrderedListTemplate(template);
            children.events.on("inserted", _this.handleDataItemAdded, _this, false);
            children.events.on("removed", _this.handleDataItemRemoved, _this, false);

            _this._dataDisposers.push(new _utils_List__WEBPACK_IMPORTED_MODULE_1__.ListDisposer(children));

            var count = value.length;

            for (var i = 0; i < count; i++) {
              var rawDataItem = value[i];
              var childDataItem = children.create();
              childDataItem.parent = dataItem;

              _this.processDataItem(childDataItem, rawDataItem);
            }

            var anyDataItem = dataItem;
            anyDataItem[fieldName] = children;
          } else {
            // data is converted to numbers/dates in each dataItem
            dataItem[fieldName] = value;
          }
        }
      });
      _utils_Object__WEBPACK_IMPORTED_MODULE_15__.each(this.propertyFields, function (key, fieldValue) {
        var f = key;
        var value = dataContext[fieldValue];

        if (_utils_Type__WEBPACK_IMPORTED_MODULE_16__.hasValue(value)) {
          hasSomeValues_1 = true;
          dataItem.setProperty(f, value);
        }
      }); // @todo we might need some flag which would tell whether we should create empty data items or not.

      if (!this._addAllDataItems && !hasSomeValues_1) {
        this.mainDataSet.remove(dataItem);
      }
    }
  };
  /**
   *
   * When validating raw data, instead of processing data item, we update it
   *
   * @ignore Exclude from docs
   * @param item
   */


  Component.prototype.updateDataItem = function (dataItem) {
    var _this = this;

    if (dataItem) {
      var dataContext_1 = dataItem.dataContext;
      _utils_Object__WEBPACK_IMPORTED_MODULE_15__.each(this.dataFields, function (key, fieldValue) {
        var fieldName = key;
        var value = dataContext_1[fieldValue]; // Apply adapters to a retrieved value

        if (_this._adapterO) {
          value = _this._adapterO.apply("dataContextValue", {
            field: fieldName,
            value: value,
            dataItem: dataItem
          }).value;
        }

        if (_utils_Type__WEBPACK_IMPORTED_MODULE_16__.hasValue(value)) {
          if (dataItem.hasChildren[fieldName]) {
            var anyDataItem = dataItem;
            var children = anyDataItem[fieldName];
            children.each(function (child) {
              _this.updateDataItem(child);
            });
          } else {
            // data is converted to numbers/dates in each dataItem					
            dataItem[fieldName] = value;
          }
        }
      });
      _utils_Object__WEBPACK_IMPORTED_MODULE_15__.each(this.propertyFields, function (key, fieldValue) {
        var f = key;
        var value = dataContext_1[fieldValue];

        if (_utils_Type__WEBPACK_IMPORTED_MODULE_16__.hasValue(value)) {
          dataItem.setProperty(f, value);
        }
      });
    }
  };
  /**
   * [validateDataElements description]
   *
   * @ignore Exclude from docs
   * @todo Description
   */


  Component.prototype.validateDataElements = function () {
    var count = this.endIndex;

    for (var i = this.startIndex; i < count; i++) {
      var dataItem = this.dataItems.getIndex(i); // TODO is this correct

      if (dataItem) {
        this.validateDataElement(dataItem);
      }
    }
  };
  /**
   * Validates this element and its related elements.
   *
   * @ignore Exclude from docs
   */


  Component.prototype.validate = function () {
    this.validateDataElements();

    _super.prototype.validate.call(this);
  };
  /**
   * [validateDataElement description]
   *
   * @ignore Exclude from docs
   * @param dataItem [description]
   */


  Component.prototype.validateDataElement = function (dataItem) {};
  /**
   * Adds one or several (array) of data items to the existing data.
   *
   * @param rawDataItem One or many raw data item objects
   */


  Component.prototype.addData = function (rawDataItem, removeCount, skipRaw) {
    var _this = this; // need to check if data is invalid, as addData might be called multiple times


    if (!this.dataInvalid && this.inited) {
      this._parseDataFrom = this.data.length; // save length of parsed data
    }

    if (!skipRaw) {
      if (rawDataItem instanceof Array) {
        // can't use concat because new array is returned
        _utils_Array__WEBPACK_IMPORTED_MODULE_11__.each(rawDataItem, function (dataItem) {
          _this.data.push(dataItem);
        });
      } else {
        this.data.push(rawDataItem); // add to raw data array
      }
    }

    if (this.inited) {
      this.removeData(removeCount, skipRaw);
    } else {
      if (_utils_Type__WEBPACK_IMPORTED_MODULE_16__.isNumber(removeCount)) {
        while (removeCount > 0) {
          this.data.shift();
          removeCount--;
        }
      }
    }

    this.invalidateData();
  };
  /**
   * Removes elements from the beginning of data
   *
   * @param count number of elements to remove
   */


  Component.prototype.removeData = function (count, skipRaw) {
    if (_utils_Type__WEBPACK_IMPORTED_MODULE_16__.isNumber(count) && count > 0) {
      while (count > 0) {
        var dataItem = this.mainDataSet.getIndex(0);

        if (dataItem) {
          this.mainDataSet.remove(dataItem);
        }

        this.dataUsers.each(function (dataUser) {
          if (!dataUser.data || dataUser.data.length == 0) {
            var dataItem_1 = dataUser.mainDataSet.getIndex(0);

            if (dataItem_1) {
              dataUser.mainDataSet.remove(dataItem_1);
            }
          }
        });

        if (!skipRaw) {
          this.data.shift();
        }

        if (this._parseDataFrom > 0) {
          this._parseDataFrom--;
        }

        count--;
      } // changed from invalidateData since 4.7.19 to solve #51551


      this.invalidateDataItems();
    }
  };
  /**
   * Triggers a data (re)parsing.
   *
   * @ignore Exclude from docs
   */


  Component.prototype.invalidateData = function () {
    if (this.disabled || this.isTemplate) {
      return;
    } //if(!this.dataInvalid){


    _Registry__WEBPACK_IMPORTED_MODULE_9__.registry.addToInvalidComponents(this);
    _System__WEBPACK_IMPORTED_MODULE_7__.system.requestFrame();
    this.dataInvalid = true;
    _utils_Iterator__WEBPACK_IMPORTED_MODULE_14__.each(this.dataUsers.iterator(), function (x) {
      x.invalidateDataItems();
    }); //}
  };
  /**
   * [invalidateDataUsers description]
   *
   * @ignore Exclude from docs
   * @todo Description
   */


  Component.prototype.invalidateDataUsers = function () {
    _utils_Iterator__WEBPACK_IMPORTED_MODULE_14__.each(this.dataUsers.iterator(), function (x) {
      x.invalidate();
    });
  };
  /**
   * Invalidates data values. When data array is not changed, but values within
   * it changes, we invalidate data so that component would process changes.
   *
   * @ignore Exclude from docs
   */


  Component.prototype.invalidateDataItems = function () {
    if (this.disabled || this.isTemplate) {
      return;
    } //if(!this.dataItemsInvalid){


    _utils_Array__WEBPACK_IMPORTED_MODULE_11__.move(_Registry__WEBPACK_IMPORTED_MODULE_9__.registry.invalidDataItems, this);
    _System__WEBPACK_IMPORTED_MODULE_7__.system.requestFrame();
    this.dataItemsInvalid = true;
    _utils_Iterator__WEBPACK_IMPORTED_MODULE_14__.each(this.dataUsers.iterator(), function (x) {
      x.invalidateDataItems();
    }); //}
  };
  /**
   * Invalidates data range. This is done when data which must be shown
   * changes (chart is zoomed for example).
   *
   * @ignore Exclude from docs
   */


  Component.prototype.invalidateDataRange = function () {
    if (this.disabled || this.isTemplate) {
      return;
    } //if(!this.dataRangeInvalid){


    this.dataRangeInvalid = true;
    _utils_Array__WEBPACK_IMPORTED_MODULE_11__.move(_Registry__WEBPACK_IMPORTED_MODULE_9__.registry.invalidDataRange, this);
    _System__WEBPACK_IMPORTED_MODULE_7__.system.requestFrame(); //}
  };
  /**
   * Processes data range.
   *
   * @todo Description
   * @ignore Exclude from docs
   */


  Component.prototype.validateDataRange = function () {
    _utils_Array__WEBPACK_IMPORTED_MODULE_11__.remove(_Registry__WEBPACK_IMPORTED_MODULE_9__.registry.invalidDataRange, this);
    this.dataRangeInvalid = false;

    if (this.startIndex != this._prevStartIndex || this.endIndex != this._prevEndIndex) {
      this.rangeChangeUpdate();
      this.appendDataItems();
      this.invalidate();
      this.dispatchImmediately("datarangechanged");
    }
  };
  /**
   * [sliceData description]
   *
   * @todo Description
   * @ignore Exclude from docs
   */


  Component.prototype.sliceData = function () {
    this._workingStartIndex = this.startIndex;
    this._workingEndIndex = this.endIndex;
  };
  /**
   * [rangeChangeUpdate description]
   *
   * @todo Description
   * @ignore Exclude from docs
   */


  Component.prototype.rangeChangeUpdate = function () {
    this.sliceData();
    this._prevStartIndex = this.startIndex;
    this._prevEndIndex = this.endIndex;
  };
  /**
   * [appendDataItems description]
   *
   * @todo Description
   * @ignore Exclude from docs
   */


  Component.prototype.appendDataItems = function () {
    // TODO use an iterator instead
    var count = this.endIndex;

    for (var i = this.startIndex; i < count; i++) {
      // data item
      var dataItem = this.dataItems.getIndex(i);

      if (dataItem) {
        dataItem.__disabled = false;
      }
    }

    for (var i = 0; i < this.startIndex; i++) {
      var dataItem = this.dataItems.getIndex(i);

      if (dataItem) {
        dataItem.__disabled = true;
      }
    }

    for (var i = this.endIndex; i < this.dataItems.length; i++) {
      var dataItem = this.dataItems.getIndex(i);

      if (dataItem) {
        dataItem.__disabled = true;
      }
    }
  };
  /**
   * If you want to have a smooth transition from one data values to another, you change your raw data and then you must call this method.
   * then instead of redrawing everything, the chart will check raw data and smoothly transit from previous to new data
   */


  Component.prototype.invalidateRawData = function () {
    if (this.disabled || this.isTemplate) {
      return;
    } //if(!this.rawDataInvalid){


    _utils_Array__WEBPACK_IMPORTED_MODULE_11__.move(_Registry__WEBPACK_IMPORTED_MODULE_9__.registry.invalidRawDatas, this);
    _System__WEBPACK_IMPORTED_MODULE_7__.system.requestFrame();
    this.rawDataInvalid = true;
    _utils_Iterator__WEBPACK_IMPORTED_MODULE_14__.each(this.dataUsers.iterator(), function (x) {
      x.invalidateRawData();
    }); //}
  };
  /**
   * @ignore
   */


  Component.prototype.validateRawData = function () {
    var _this = this;

    _utils_Array__WEBPACK_IMPORTED_MODULE_11__.remove(_Registry__WEBPACK_IMPORTED_MODULE_9__.registry.invalidRawDatas, this);
    _utils_Iterator__WEBPACK_IMPORTED_MODULE_14__.each(this.mainDataSet.iterator(), function (dataItem) {
      if (dataItem) {
        _this.updateDataItem(dataItem);
      }
    });
  };
  /**
   * Destroys this object and all related data.
   */


  Component.prototype.dispose = function () {
    var _this = this;

    this.mainDataSet.template.clones.clear();
    _utils_Object__WEBPACK_IMPORTED_MODULE_15__.each(this._dataSources, function (key, source) {
      _this.removeDispose(source);
    });
    this.disposeData();

    _super.prototype.dispose.call(this);
  };
  /**
   * @ignore
   */


  Component.prototype.disposeData = function () {
    this.mainDataSet.template.clones.clear();
    _utils_Array__WEBPACK_IMPORTED_MODULE_11__.each(this._dataDisposers, function (x) {
      x.dispose();
    }); // and for all components

    _utils_Iterator__WEBPACK_IMPORTED_MODULE_14__.each(this.dataUsers.iterator(), function (dataUser) {
      dataUser.disposeData();
    });
    this._dataDisposers.length = 0;
    this._startIndex = undefined;
    this._endIndex = undefined; // dispose old

    this.mainDataSet.clear();
    this.mainDataSet.template.clones.clear();

    if (this._dataSets) {
      this._dataSets.clear();
    }
  };

  Component.prototype.getDataItem = function (dataContext) {
    return this.mainDataSet.create();
  };
  /**
   * Validates (processes) data.
   *
   * @ignore Exclude from docs
   */


  Component.prototype.validateData = function () {
    this.dispatchImmediately("beforedatavalidated");
    this.dataInvalid = false;
    _Registry__WEBPACK_IMPORTED_MODULE_9__.registry.removeFromInvalidComponents(this);

    if (this.__disabled) {
      return;
    }

    this.dataValidationProgress = 0; // need this to slice new data

    this._prevStartIndex = undefined;
    this._prevEndIndex = undefined; // todo: this needs some overthinking, maybe some extra settings like zoomOotonDataupdate like in v3 or so. some charts like pie chart probably should act like this always

    this._startIndex = undefined;
    this._endIndex = undefined;

    if (this.dataFields.data && this.dataItem) {
      var dataContext = this.dataItem.dataContext;
      this._data = dataContext[this.dataFields.data];
    } // data items array is reset only if all data is validated, if _parseDataFrom is not 0, we append new data only
    // check heatmap demo if uncommented
    // fixed both issues by adding && this.data.length > 0
    // check adding series example if changed


    if (this._parseDataFrom === 0 && this.data.length > 0) {
      this.disposeData();
    }

    if (this.data.length > 0) {
      var preloader = this.preloader; // and for all components

      _utils_Iterator__WEBPACK_IMPORTED_MODULE_14__.each(this.dataUsers.iterator(), function (dataUser) {
        // todo: this needs some overthinking, maybe some extra settings like zoomOUtonDataupdate like in v3 or so. some charts like pie chart probably should act like this always
        dataUser._startIndex = undefined;
        dataUser._endIndex = undefined;
      });
      var counter = 0;
      var startTime = Date.now(); // parse data

      var i = this._parseDataFrom;
      var n = this.data.length;

      var _loop_1 = function _loop_1() {
        var rawDataItem = this_1.data[i];

        if (this_1._usesData) {
          var dataItem = this_1.getDataItem(rawDataItem);
          this_1.processDataItem(dataItem, rawDataItem);
        }

        this_1.dataUsers.each(function (dataUser) {
          if (dataUser.data.length == 0) {
            // checking if data is not set directly
            var dataUserDataItem = dataUser.getDataItem(rawDataItem);
            dataUser.processDataItem(dataUserDataItem, rawDataItem);
          }
        });
        counter++; // show preloader if this takes too many time

        if (counter == 100) {
          // no need to check it on each data item
          counter = 0;
          var elapsed = Date.now() - startTime;

          if (elapsed > this_1.parsingStepDuration) {
            if (i < this_1.data.length - 10) {
              this_1._parseDataFrom = i + 1; // update preloader

              if (preloader) {
                if (i / this_1.data.length > 0.5 && !preloader.visible) {// do not start showing
                } else {
                  preloader.progress = i / this_1.data.length;
                }
              }

              this_1.dataValidationProgress = i / this_1.data.length;
              i = this_1.data.length; // stops cycle

              this_1.invalidateData();
              return {
                value: void 0
              };
            }
          }
        }
      };

      var this_1 = this;

      for (i; i < n; i++) {
        var state_1 = _loop_1();

        if (typeof state_1 === "object") return state_1.value;
      }

      if (preloader) {
        preloader.progress = 1;
      }

      this.dataUsers.each(function (dataUser) {
        if (dataUser.hidden) {
          dataUser.hide(0);
        }
      });
    }

    this.dataValidationProgress = 1;
    this._parseDataFrom = 0; // reset this index, it is set to dataItems.length if addData() method was used.

    this.invalidateDataItems();

    if (!this._internalDefaultsApplied) {
      this.applyInternalDefaults();
    }

    this.dispatch("datavalidated"); // can't zoom chart if dispatched immediately
  };
  /**
   * Validates (processes) data items.
   *
   * @ignore Exclude from docs
   */


  Component.prototype.validateDataItems = function () {
    _utils_Array__WEBPACK_IMPORTED_MODULE_11__.remove(_Registry__WEBPACK_IMPORTED_MODULE_9__.registry.invalidDataItems, this);
    this.dataItemsInvalid = false;
    this.invalidateDataRange();
    this.invalidate();
    this.dispatch("dataitemsvalidated");
  };

  Object.defineProperty(Component.prototype, "data", {
    /**
     * Returns element's source (raw) data.
     *
     * @return Data
     */
    get: function get() {
      if (!this._data) {
        this._data = [];
      }

      if (!this._adapterO) {
        return this._data;
      } else {
        return this._adapterO.apply("data", this._data);
      }
    },

    /**
     * Sets source (raw) data for the element. The "data" is always an `Array`
     * of objects.
     *
     * IMPORTANT: The order of data items in `data` array is important as it
     * might affect chart look and behavior. [More details](https://www.amcharts.com/docs/v4/concepts/data/#Order_of_data_items).
     *
     * @param value Data
     */
    set: function set(value) {
      this.setData(value);
    },
    enumerable: true,
    configurable: true
  });

  Component.prototype.setData = function (value) {
    // array might be the same, but there might be items added
    // todo: check if array changed, toString maybe?
    if (!this.isDisposed()) {
      this._parseDataFrom = 0;
      this.disposeData();
      this._data = value;

      if (value && value.length > 0) {
        this.invalidateData();
      } else {
        this.dispatchImmediately("beforedatavalidated");
        this.dispatch("datavalidated");
      }
    }
  };
  /**
   * Returns (creates if necessary) a [[DataSource]] bound to any specific
   * property.
   *
   * For example if I want to bind `data` to an external JSON file, I'd create
   * a DataSource for it.
   *
   * @param property  Property to bind external data to
   * @return A DataSource for property
   */


  Component.prototype.getDataSource = function (property) {
    var _this = this;

    if (!_utils_Type__WEBPACK_IMPORTED_MODULE_16__.hasValue(this._dataSources[property])) {
      this._dataSources[property] = new _data_DataSource__WEBPACK_IMPORTED_MODULE_5__.DataSource();
      this._dataSources[property].component = this;
      this.setDataSourceEvents(this._dataSources[property], property);

      this._dataSources[property].adapter.add("dateFields", function (val) {
        return _this.dataSourceDateFields(val);
      });

      this._dataSources[property].adapter.add("numberFields", function (val) {
        return _this.dataSourceNumberFields(val);
      });

      this.events.on("inited", function () {
        _this.loadData(property);
      }, this, false);
    }

    return this._dataSources[property];
  };

  Object.defineProperty(Component.prototype, "dataSource", {
    /**
     * @return Data source
     */
    get: function get() {
      if (!this._dataSources["data"]) {
        this.getDataSource("data");
      }

      return this._dataSources["data"];
    },

    /**
     *A [[DataSource]] to be used for loading Component's data.
     *
     * @see {@link https://www.amcharts.com/docs/v4/concepts/loading-external-data/} for more on loading external data
     * @param value  Data source
     */
    set: function set(value) {
      var _this = this;

      if (this._dataSources["data"]) {
        this.removeDispose(this._dataSources["data"]);
      }

      this._dataSources["data"] = value;
      this._dataSources["data"].component = this;
      this.events.on("inited", function () {
        _this.loadData("data");
      }, this, false);
      this.setDataSourceEvents(value, "data");
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Initiates loading of the external data via [[DataSource]].
   *
   * @ignore Exclude from docs
   */

  Component.prototype.loadData = function (property) {
    this._dataSources[property].load();
  };
  /**
   * This function is called by the [[DataSource]]'s `dateFields` adapater
   * so that particular chart types can popuplate this setting with their
   * own type-specific data fields so they are parsed properly.
   *
   * @ignore Exclude from docs
   * @param value  Array of date fields
   * @return Array of date fields populated with chart's date fields
   */


  Component.prototype.dataSourceDateFields = function (value) {
    return value;
  };
  /**
   * This function is called by the [[DataSource]]'s `numberFields` adapater
   * so that particular chart types can popuplate this setting with their
   * own type-specific data fields so they are parsed properly.
   *
   * @ignore Exclude from docs
   * @param value  Array of number fields
   * @return Array of number fields populated with chart's number fields
   */


  Component.prototype.dataSourceNumberFields = function (value) {
    return value;
  };
  /**
   *
   * @ignore Exclude from docs
   * @todo Description
   * @param list        [description]
   * @param dataFields  [description]
   * @param targetList  [description]
   * @return [description]
   */


  Component.prototype.populateDataSourceFields = function (list, dataFields, targetList) {
    _utils_Array__WEBPACK_IMPORTED_MODULE_11__.each(targetList, function (value) {
      if (dataFields[value] && _utils_Array__WEBPACK_IMPORTED_MODULE_11__.indexOf(list, dataFields[value]) === -1) {
        list.push(dataFields[value]);
      }
    });
    return list;
  };
  /**
   * Sets events on a [[DataSource]].
   *
   * @ignore Exclude from docs
   */


  Component.prototype.setDataSourceEvents = function (ds, property) {
    var _this = this;

    ds.events.on("started", function (ev) {
      var preloader = _this.preloader;

      if (preloader) {
        preloader.progress = 0; //preloader.label.text = this.language.translate("Loading");
      }
    }, undefined, false);
    ds.events.on("loadstarted", function (ev) {
      var preloader = _this.preloader;

      if (preloader) {
        preloader.progress = 0.25;
      }
    }, undefined, false);
    ds.events.on("loadended", function (ev) {
      var preloader = _this.preloader;

      if (preloader) {
        preloader.progress = 0.5;
      }
    }, undefined, false);
    ds.events.on("parseended", function (ev) {
      var preloader = _this.preloader;

      if (preloader) {
        preloader.progress = 0.75;
      }
    }, undefined, false);
    ds.events.on("ended", function (ev) {
      var preloader = _this.preloader;

      if (preloader) {
        preloader.progress = 1;
      }
    }, undefined, false);
    ds.events.on("error", function (ev) {
      var preloader = _this.preloader;

      if (preloader) {
        preloader.progress = 1;
      }

      _this.openModal(ev.message);
    }, undefined, false);

    if (property) {
      ds.events.on("done", function (ev) {
        var preloader = _this.preloader;

        if (preloader) {
          preloader.progress = 1;
        }

        if (property == "data" && !_utils_Type__WEBPACK_IMPORTED_MODULE_16__.isArray(ev.data)) {
          ev.data = [ev.data];
        }

        if (ds.incremental && property == "data" && _this.data.length) {
          _this.addData(ev.data, ds.keepCount ? ev.data.length : 0);
        } else if (ds.updateCurrentData && property == "data" && _this.data.length) {
          // cycle through existing data items
          _utils_Array__WEBPACK_IMPORTED_MODULE_11__.each(_this.data, function (item, index) {
            if (_utils_Type__WEBPACK_IMPORTED_MODULE_16__.hasValue(ev.data[index])) {
              _utils_Object__WEBPACK_IMPORTED_MODULE_15__.each(item, function (key, val) {
                if (_utils_Type__WEBPACK_IMPORTED_MODULE_16__.hasValue(ev.data[index][key])) {
                  item[key] = ev.data[index][key];
                }
              });
            }
          });

          _this.invalidateRawData();
        } else {
          _this[property] = ev.data;
        }
      });
    }
  };

  Object.defineProperty(Component.prototype, "responsive", {
    /**
     * @return Responsive rules handler
     */
    get: function get() {
      if (!this._responsive) {
        this._responsive = new _utils_Responsive__WEBPACK_IMPORTED_MODULE_6__.Responsive();
        this._responsive.component = this;
      }

      return this._responsive;
    },

    /**
     * A [[Responsive]] instance to be used when applying conditional
     * property values.
     *
     * NOTE: Responsive features are currently in development and may not work
     * as expected, if at all.
     *
     * @param value  Responsive rules handler
     */
    set: function set(value) {
      this._responsive = value;
      this._responsive.component = this;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Sets current zoom.
   *
   * The range uses relative values from 0 to 1, with 0 marking beginning and 1
   * marking end of the available data range.
   *
   * This method will not have any effect when called on a chart object.
   * Since the chart can have a number of axes and series, each with its own
   * data, the meaning of "range" is very ambiguous.
   *
   * To zoom the chart use `zoom*` methods on its respective axes.
   *
   * @param range          Range
   * @param skipRangeEvent Should rangechanged event not be triggered?
   * @param instantly      Do not animate?
   * @return Actual modidied range (taking `maxZoomFactor` into account)
   */

  Component.prototype.zoom = function (range, skipRangeEvent, instantly, declination) {
    var _this = this;

    if (skipRangeEvent === void 0) {
      skipRangeEvent = false;
    }

    if (instantly === void 0) {
      instantly = false;
    }

    var start = range.start;
    var end = range.end;
    var priority = range.priority;

    if (range.start == range.end) {
      range.start = range.start - 0.5 / this.maxZoomFactor;
      range.end = range.end + 0.5 / this.maxZoomFactor;
    }

    if (priority == "end" && end == 1 && start != 0) {
      if (start < this.start) {
        priority = "start";
      }
    }

    if (priority == "start" && start == 0) {
      if (end > this.end) {
        priority = "end";
      }
    }

    if (!_utils_Type__WEBPACK_IMPORTED_MODULE_16__.isNumber(declination)) {
      declination = this.maxZoomDeclination;
    }

    if (!_utils_Type__WEBPACK_IMPORTED_MODULE_16__.isNumber(start) || !_utils_Type__WEBPACK_IMPORTED_MODULE_16__.isNumber(end)) {
      return {
        start: this.start,
        end: this.end
      };
    }

    if (this._finalStart != start || this._finalEnd != end) {
      var maxZoomFactor = this.maxZoomFactor / this.minZoomCount;
      var minZoomFactor = this.maxZoomFactor / this.maxZoomCount; // most likely we are dragging left scrollbar grip here, so we tend to modify end

      if (priority == "start") {
        if (this.maxZoomCount > 0) {
          // add to the end
          if (1 / (end - start) < minZoomFactor) {
            end = start + 1 / minZoomFactor;
          }
        } // add to the end


        if (1 / (end - start) > maxZoomFactor) {
          end = start + 1 / maxZoomFactor;
        } //unless end is > 0


        if (end > 1 && end - start < 1 / maxZoomFactor) {
          //end = 1;
          start = end - 1 / maxZoomFactor;
        }
      } // most likely we are dragging right, so we modify left
      else {
        if (this.maxZoomCount > 0) {
          // add to the end
          if (1 / (end - start) < minZoomFactor) {
            start = end - 1 / minZoomFactor;
          }
        } // remove from start


        if (1 / (end - start) > maxZoomFactor) {
          if (start <= 0) {
            end = start + 1 / maxZoomFactor;
          } else {
            start = end - 1 / maxZoomFactor;
          }
        }

        if (start < 0 && end - start < 1 / maxZoomFactor) {
          //start = 0;
          end = start + 1 / maxZoomFactor;
        }
      }

      if (start < -declination) {
        start = -declination;
      }

      if (1 / (end - start) > maxZoomFactor) {
        end = start + 1 / maxZoomFactor;
      }

      if (end > 1 + declination) {
        end = 1 + declination;
      }

      if (1 / (end - start) > maxZoomFactor) {
        start = end - 1 / maxZoomFactor;
      }

      this._finalEnd = end;
      this._finalStart = start;
      this.skipRangeEvent = skipRangeEvent;
      this.dispatchImmediately("rangechangestarted");

      if (this.rangeChangeDuration > 0 && !instantly) {
        // todo: maybe move this to Animation
        var rangeChangeAnimation = this.rangeChangeAnimation;

        if (rangeChangeAnimation && rangeChangeAnimation.progress < 1) {
          var options = rangeChangeAnimation.animationOptions;

          if (options.length > 1) {
            if (options[0].to == start && options[1].to == end) {
              return {
                start: start,
                end: end
              };
            } else {
              if (!rangeChangeAnimation.isDisposed()) {
                rangeChangeAnimation.stop();
              }
            }
          }
        }

        if (this.rangeChangeAnimation) {
          this.rangeChangeAnimation.kill();
        }

        rangeChangeAnimation = this.animate([{
          property: "start",
          to: start
        }, {
          property: "end",
          to: end
        }], this.rangeChangeDuration, this.rangeChangeEasing);
        this.rangeChangeAnimation = rangeChangeAnimation;

        if (rangeChangeAnimation && !rangeChangeAnimation.isFinished()) {
          rangeChangeAnimation.events.on("animationended", function () {
            _this.dispatchImmediately("rangechangeended");
          });
        } else {
          this.dispatchImmediately("rangechangeended");
        }
      } else {
        this.start = start;
        this.end = end;
        this.dispatch("rangechangeended");
      }
    }

    return {
      start: start,
      end: end
    };
  };
  /**
   * Zooms to specific data items using their index in data.
   *
   * This method will not have any effect when called on a chart object.
   * Since the chart can have a number of axes and series, each with its own
   * data, the meaning of "index" is very ambiguous.
   *
   * To zoom the chart use `zoom*` methods on its respective axes.
   *
   * @param startIndex     Index of the starting data item
   * @param endIndex       Index of the ending data item
   * @param skipRangeEvent Should rangechanged event not be triggered?
   * @param instantly      Do not animate?
   */


  Component.prototype.zoomToIndexes = function (startIndex, endIndex, skipRangeEvent, instantly) {
    if (!_utils_Type__WEBPACK_IMPORTED_MODULE_16__.isNumber(startIndex) || !_utils_Type__WEBPACK_IMPORTED_MODULE_16__.isNumber(endIndex)) {
      return;
    }

    var start = startIndex / this.dataItems.length;
    var end = endIndex / this.dataItems.length;
    this.zoom({
      start: start,
      end: end
    }, skipRangeEvent, instantly);
  };

  Object.defineProperty(Component.prototype, "zoomFactor", {
    /**
     * A current zoom factor (0-1). 1 meaning fully zoomed out. (showing all of
     * the available data)
     *
     * @return Zoom factor
     */
    get: function get() {
      return _utils_Math__WEBPACK_IMPORTED_MODULE_10__.fitToRange(1 / (this.end - this.start), 1, this.maxZoomFactor);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Component.prototype, "maxZoomFactor", {
    /**
     * @return Maximum zoomFactor
     */
    get: function get() {
      return this.getPropertyValue("maxZoomFactor");
    },

    /**
     * Max available `zoomFactor`.
     *
     * The element will not allow zoom to occur beyond this factor.
     *
     * [[DateAxis]] and [[CategoryAxis]] calculate this atutomatically so that
     * category axis could be zoomed to one category and date axis allows to be
     * zoomed up to one base interval.
     *
     * In case you want to restrict category or date axis to be zoomed to more
     * than one category or more than one base interval, use `minZoomCount`
     * property (set it to `> 1`).
     *
     * Default value of [[ValueAxis]]'s `maxZoomFactor` is `1000`.
     *
     * Feel free to modify it to allow bigger zoom or to restrict zooming.
     *
     * @param value  Maximum zoomFactor
     */
    set: function set(value) {
      if (this.setPropertyValue("maxZoomFactor", value)) {
        if (value == 1) {
          this.maxZoomDeclination = 0;
        }

        this.invalidateDataRange();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Component.prototype, "maxZoomDeclination", {
    /**
     * @ignore
     * @return Maximum zoom declination
     */
    get: function get() {
      return this.getPropertyValue("maxZoomDeclination");
    },

    /**
     * Max zoom declination.
     *
     * @ignore
     * @default 1
     * @param value  Maximum zoom declination
     */
    set: function set(value) {
      if (this.setPropertyValue("maxZoomDeclination", value)) {
        this.invalidateDataRange();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Component.prototype, "startIndex", {
    /**
     * Current starting index.
     *
     * @return Start index
     */
    get: function get() {
      if (!_utils_Type__WEBPACK_IMPORTED_MODULE_16__.isNumber(this._startIndex)) {
        this._startIndex = 0;
      }

      return this._startIndex;
    },

    /**
     * Sets current starting index.
     *
     * @ignore Exclude from docs
     * @param value Start index
     */
    set: function set(value) {
      this._startIndex = _utils_Math__WEBPACK_IMPORTED_MODULE_10__.fitToRange(Math.round(value), 0, this.dataItems.length); //this._workingStartIndex = this._startIndex; // not good, breaks adjusted working start index of line series

      this.start = this.indexToPosition(this._startIndex);
    },
    enumerable: true,
    configurable: true
  });
  /**
   * @ignore
   * @todo:review description
   * returns item's relative position by the index of the item
   * @param index
   */

  Component.prototype.indexToPosition = function (index) {
    return index / this.dataItems.length;
  };

  Object.defineProperty(Component.prototype, "endIndex", {
    /**
     * Current ending index.
     *
     * @return End index
     */
    get: function get() {
      var count = this.dataItems.length;

      if (!_utils_Type__WEBPACK_IMPORTED_MODULE_16__.isNumber(this._endIndex) || this._endIndex > count) {
        this._endIndex = count;
      }

      return this._endIndex;
    },

    /**
     * Sets current ending index.
     *
     * @ignore Exclude from docs
     * @param value End index
     */
    set: function set(value) {
      this._endIndex = _utils_Math__WEBPACK_IMPORTED_MODULE_10__.fitToRange(Math.round(value), 0, this.dataItems.length); //this._workingEndIndex = this._endIndex; // not good, breaks adjusted workingend index of line series

      this.end = this.indexToPosition(this._endIndex);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Component.prototype, "start", {
    /**
     * @return Start (0-1)
     */
    get: function get() {
      if (!this._adapterO) {
        return this._start;
      } else {
        return this._adapterO.apply("start", this._start);
      }
    },

    /**
     * Start of the current data range (zoom).
     *
     * These are relative values from 0 (beginning) to 1 (end).
     *
     * @param value Start (0-1)
     */
    set: function set(value) {
      // value = $math.round(value, 10); not good
      //if (1 / (this.end - value) > this.maxZoomFactor) {
      //	value = this.end - 1 / this.maxZoomFactor;
      //}
      if (this._start != value) {
        this._start = value;
        var startIndex = Math.max(0, Math.floor(this.dataItems.length * value) || 0);
        this._startIndex = Math.min(startIndex, this.dataItems.length);
        this.invalidateDataRange();
        this.invalidate();
        this.dispatchImmediately("startchanged");
        this.dispatch("startendchanged");
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Component.prototype, "end", {
    /**
     * @return End (0-1)
     */
    get: function get() {
      if (!this._adapterO) {
        return this._end;
      } else {
        return this._adapterO.apply("end", this._end);
      }
    },

    /**
     * End of the current data range (zoom).
     *
     * These are relative values from 0 (beginning) to 1 (end).
     *
     * @param value End (0-1)
     */
    set: function set(value) {
      // value = $math.round(value, 10); // not good
      //if (1 / (value - this.start) > this.maxZoomFactor) {
      //	value = 1 / this.maxZoomFactor + this.start;
      //}
      if (this._end != value) {
        this._end = value;
        this._endIndex = Math.min(this.dataItems.length, Math.ceil(this.dataItems.length * value) || 0);
        this.invalidateDataRange();
        this.invalidate();
        this.dispatchImmediately("endchanged");
        this.dispatch("startendchanged");
      }
    },
    enumerable: true,
    configurable: true
  });
  /**
   * [removeFromInvalids description]
   *
   * @ignore Exclude from docs
   * @todo Description
   */

  Component.prototype.removeFromInvalids = function () {
    _super.prototype.removeFromInvalids.call(this);

    _Registry__WEBPACK_IMPORTED_MODULE_9__.registry.removeFromInvalidComponents(this);
    _utils_Array__WEBPACK_IMPORTED_MODULE_11__.remove(_Registry__WEBPACK_IMPORTED_MODULE_9__.registry.invalidDataItems, this);
    _utils_Array__WEBPACK_IMPORTED_MODULE_11__.remove(_Registry__WEBPACK_IMPORTED_MODULE_9__.registry.invalidDataRange, this);
    _utils_Array__WEBPACK_IMPORTED_MODULE_11__.remove(_Registry__WEBPACK_IMPORTED_MODULE_9__.registry.invalidRawDatas, this);
  };

  Object.defineProperty(Component.prototype, "dataItems", {
    /**
     * Returns a list of source [[DataItem]] objects currently used in the chart.
     *
     * @return List of data items
     */
    get: function get() {
      if (this._currentDataSetId != "") {
        var dataItems = this.dataSets.getKey(this._currentDataSetId);

        if (dataItems) {
          return dataItems;
        }
      }

      return this._dataItems;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Component.prototype, "dataSets", {
    /**
     * Holds data items for data sets (usually aggregated data).
     *
     * @ignore
     * @since 4.7.0
     * @return  Data sets
     */
    get: function get() {
      if (!this._dataSets) {
        this._dataSets = new _utils_Dictionary__WEBPACK_IMPORTED_MODULE_3__.Dictionary();
      }

      return this._dataSets;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Makes the chart use particular data set.
   *
   * If `id` is not provided or there is no such data set, main data will be
   * used.
   *
   * @ignore
   * @since 4.7.0
   * @param  id  Data set id
   */

  Component.prototype.setDataSet = function (id) {
    if (this._currentDataSetId != id) {
      var dataSet = this.dataSets.getKey(id);

      if (!dataSet) {
        if (this._currentDataSetId != "") {
          this.dataItems.each(function (dataItem) {
            dataItem.__disabled = true;
          });
          this._currentDataSetId = "";
          this.invalidateDataRange();
          this._prevStartIndex = undefined;
          this.dataItems.each(function (dataItem) {
            dataItem.__disabled = false;
          });
          return true;
        }
      } else {
        this.dataItems.each(function (dataItem) {
          dataItem.__disabled = true;
        });
        this._currentDataSetId = id;
        this.invalidateDataRange();
        this._prevStartIndex = undefined;
        this.dataItems.each(function (dataItem) {
          dataItem.__disabled = false;
        });
        return true;
      }
    }

    return false;
  };

  Object.defineProperty(Component.prototype, "currentDataSetId", {
    /**
     * Returns id of the currently used data set, or `undefined` if main data set
     * is in use.
     *
     * @since 4.7.0
     * @return Current data set id
     */
    get: function get() {
      return this._currentDataSetId;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Component.prototype, "mainDataSet", {
    /**
     * Returns reference to "main" data set (unaggregated data as it was supplied
     * in `data`).
     *
     * @since 4.7.0
     * @return Main data set
     */
    get: function get() {
      return this._dataItems;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Updates the indexes for the dataItems
   *
   * @ignore Exclude from docs
   */

  Component.prototype._updateDataItemIndexes = function (startIndex) {
    var dataItems = this.mainDataSet.values;
    var length = dataItems.length;

    for (var i = startIndex; i < length; ++i) {
      dataItems[i]._index = i;
    }
  };
  /**
   * Processes newly added [[DataItem]] as well as triggers data re-validation.
   *
   * @ignore Exclude from docs
   * @param event [description]
   */


  Component.prototype.handleDataItemAdded = function (event) {
    event.newValue.component = this;

    this._updateDataItemIndexes(event.index);

    if (!this.dataItemsInvalid) {
      this.invalidateDataItems();
    }
  };
  /**
   * removes [[DataItem]] as well as triggers data re-validation.
   *
   * @ignore Exclude from docs
   * @param event [description]
   */


  Component.prototype.handleDataItemRemoved = function (event) {
    //		event.oldValue.component = undefined; // not good, as some items might be not removed from component lists
    this._updateDataItemIndexes(event.index);

    if (!this.dataItemsInvalid) {
      this.invalidateDataItems();
    }
  };
  /**
   * Binds a data element's field to a specific field in raw data.
   * For example, for the very basic column chart you'd want to bind a `value`
   * field to a field in data, such as `price`.
   *
   * Some more advanced Components, like [[CandlestickSeries]] need several
   * data fields bound to data, such as ones for open, high, low and close
   * values.
   *
   * @todo Example
   * @param field  Field name
   * @param value  Field name in data
   */


  Component.prototype.bindDataField = function (field, value) {
    this.dataFields[field] = value;
    this.invalidateDataRange();
  };
  /**
   * Invalidates processed data.
   *
   * @ignore Exclude from docs
   */


  Component.prototype.invalidateProcessedData = function () {
    this.resetProcessedRange();
    this.invalidateDataRange();
  };
  /**
   * [resetProcessedRange description]
   *
   * @ignore Exclude from docs
   * @todo Description
   */


  Component.prototype.resetProcessedRange = function () {
    this._prevEndIndex = null;
    this._prevStartIndex = null;
  };

  Object.defineProperty(Component.prototype, "dataUsers", {
    /**
     * Returns all other [[Component]] objects that are using this element's
     * data.
     *
     * @ignore Exclude from docs
     * @todo Description (review)
     * @return [description]
     */
    get: function get() {
      var _this = this;

      if (!this._dataUsers) {
        this._dataUsers = new _utils_List__WEBPACK_IMPORTED_MODULE_1__.List(); //this._disposers.push(new ListDisposer(this._dataUsers));
        // TODO better way of handling this? e.g. move into another module ?

        this._disposers.push(new _utils_Disposer__WEBPACK_IMPORTED_MODULE_4__.Disposer(function () {
          // TODO clear the list ?
          _utils_Iterator__WEBPACK_IMPORTED_MODULE_14__.each(_this._dataUsers.iterator(), function (x) {
            x.dispose();
          });
        }));
      }

      return this._dataUsers;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Returns a clone of this element.
   *
   * @return Clone
   */

  Component.prototype.clone = function () {
    var component = _super.prototype.clone.call(this);

    component.dataFields = _utils_Utils__WEBPACK_IMPORTED_MODULE_13__.copyProperties(this.dataFields, {});
    return component;
  };
  /**
   * Copies all parameters from another [[Component]].
   *
   * @param source Source Component
   */


  Component.prototype.copyFrom = function (source) {
    _super.prototype.copyFrom.call(this, source);

    this.data = source.data;
    this.sequencedInterpolation = source.sequencedInterpolation;
    this.sequencedInterpolationDelay = source.sequencedInterpolationDelay;
    this.interpolationDuration = source.interpolationDuration;
    this.interpolationEasing = source.interpolationEasing;
  };
  /**
   * Invalidates the whole element, including all its children, causing
   * complete re-parsing of data and redraw.
   *
   * Use sparingly!
   */


  Component.prototype.reinit = function () {
    this._inited = false;
    this.deepInvalidate();
  };
  /**
   * Add an adapter for data.
   *
   * @return Exporting
   */


  Component.prototype.getExporting = function () {
    var _export = _super.prototype.getExporting.call(this);

    if (!_export.adapter.has("data", this._exportData, -1, this)) {
      _export.adapter.add("data", this._exportData, -1, this);

      this.events.on("datavalidated", function (ev) {
        _export.handleDataUpdated();
      });
    }

    return _export;
  };

  Component.prototype._exportData = function (arg) {
    arg.data = this.data;
    return arg;
  };

  Component.prototype.setDisabled = function (value) {
    var changed = _super.prototype.setDisabled.call(this, value);

    if (changed) {
      this.invalidateData();
    }

    return changed;
  };
  /**
   * @ignore
   */


  Component.prototype.setShowOnInit = function (value) {
    if (value != this.getPropertyValue("showOnInit")) {
      if (value && !this.inited && !this.hidden) {
        this._showOnInitDisposer2 = this.events.once("dataitemsvalidated", this.hideInitially, this, false);

        this._disposers.push(this._showOnInitDisposer2);
      } else {
        if (this._showOnInitDisposer2) {
          this.removeDispose(this._showOnInitDisposer2);
        }
      }
    } // important order here


    _super.prototype.setShowOnInit.call(this, value);
  };

  Component.prototype.setBaseId = function (value) {
    if (value != this._baseId) {
      if (this.dataInvalid) {
        this.dataInvalid = false;
        _Registry__WEBPACK_IMPORTED_MODULE_9__.registry.removeFromInvalidComponents(this);
        this._baseId = value;
        this.invalidateData();
      }
    }

    _super.prototype.setBaseId.call(this, value);
  };

  Object.defineProperty(Component.prototype, "minZoomCount", {
    /**
     * @return Min zoom count
     */
    get: function get() {
      return this.getPropertyValue("minZoomCount");
    },

    /**
     * Use this for [[CategoryAxis]] or [[DateAxis]].
     *
     * Allows restricting zoom in beyond certain number of categories or base
     * intervals.
     *
     * @default 1
     * @param value  Min zoom count
     */
    set: function set(value) {
      this.setPropertyValue("minZoomCount", value);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Component.prototype, "maxZoomCount", {
    /**
     * @return Max zoom count
     */
    get: function get() {
      return this.getPropertyValue("maxZoomCount");
    },

    /**
     * Use this for [[CategoryAxis]] or [[DateAxis]].
     *
     * Limits how many categories or base intervals can be shown at the same
     * time.
     *
     * If there are more items in the chart, the chart will auto-zoom.
     *
     * @default 0 (no limit)
     * @since 4.6.2
     * @param value  Max zoom count
     */
    set: function set(value) {
      this.setPropertyValue("maxZoomCount", value);
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Called during the System.update method
   *
   * @ignore Exclude from docs
   */

  Component.prototype._systemCheckIfValidate = function () {
    if (this.dataInvalid || this.dataProvider && this.dataProvider.dataInvalid) {
      return false;
    } else {
      return true;
    }
  };
  /**
   * Adds easing functions to "function" fields.
   *
   * @param field  Field name
   * @return Assign as function?
   */


  Component.prototype.asFunction = function (field) {
    return field == "interpolationEasing" || field == "rangeChangeEasing" || _super.prototype.asIs.call(this, field);
  };

  return Component;
}(_Container__WEBPACK_IMPORTED_MODULE_0__.Container);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_Registry__WEBPACK_IMPORTED_MODULE_9__.registry.registeredClasses.Component = Component;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/Container.js":
/*!**********************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/Container.js ***!
  \**********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Container": () => (/* binding */ Container)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Sprite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Sprite */ "./node_modules/@amcharts/amcharts4/.internal/core/Sprite.js");
/* harmony import */ var _SpriteState__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./SpriteState */ "./node_modules/@amcharts/amcharts4/.internal/core/SpriteState.js");
/* harmony import */ var _utils_List__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils/List */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/List.js");
/* harmony import */ var _utils_Disposer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils/Disposer */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Disposer.js");
/* harmony import */ var _utils_Dictionary__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils/Dictionary */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Dictionary.js");
/* harmony import */ var _interaction_Interaction__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./interaction/Interaction */ "./node_modules/@amcharts/amcharts4/.internal/core/interaction/Interaction.js");
/* harmony import */ var _elements_Rectangle__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./elements/Rectangle */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Rectangle.js");
/* harmony import */ var _utils_Percent__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./utils/Percent */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Percent.js");
/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../core/utils/InterfaceColorSet */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/InterfaceColorSet.js");
/* harmony import */ var _utils_Iterator__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./utils/Iterator */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Iterator.js");
/* harmony import */ var _utils_Array__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./utils/Array */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Array.js");
/* harmony import */ var _utils_Math__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
/* harmony import */ var _utils_Type__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/* harmony import */ var _utils_DOM__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./utils/DOM */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/DOM.js");
/* harmony import */ var _System__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./System */ "./node_modules/@amcharts/amcharts4/.internal/core/System.js");
/* harmony import */ var _Options__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./Options */ "./node_modules/@amcharts/amcharts4/.internal/core/Options.js");
/**
 * Container module
 * @todo Needs description
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */


















;
/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Container can contain multiple sprites and arrange them in various layouts.
 *
 * @see {@link IContainerEvents} for a list of available events
 * @see {@link IContainerAdapters} for a list of available Adapters
 * @important
 */

var Container =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_17__.__extends)(Container, _super);
  /**
   * Constructor
   */


  function Container() {
    var _this = // Init
    _super.call(this) || this;
    /**
     * Container children. (sorted by layout)
     *
     * @ignore Exclude from docs
     */


    _this._childrenByLayout = [];
    /**
     * Container's disposers for its child elements.
     *
     * @ignore Exclude from docs
     */

    _this._childrenDisposers = new _utils_Dictionary__WEBPACK_IMPORTED_MODULE_4__.Dictionary();
    /**
     * Indicates if this container contains any focused elements, including
     * itself.
     */

    _this.hasFocused = false;
    /**
     * An array of references to elements the state should be set, when it is set
     * on this element.
     */

    _this.setStateOnSprites = [];
    /*
     * @ignore
     */

    _this.layoutInvalid = false;
    _this._absoluteWidth = 0;
    _this._absoluteHeight = 0;
    /**
     * An array of child Sprites that should be ready before this object can
     * fire a "ready" event.
     */

    _this._shouldBeReady = [];
    /**
     * Enables touch tap protection.
     */

    _this._tapToActivate = false;
    /**
     * If `tapToActivate` is used, this setting will determine how long the chart
     * will stay in "active" mode.
     *
     * @default 3000
     * @since 4.4.0
     */

    _this.tapTimeout = 3000;
    _this.className = "Container";
    _this._element = _this.paper.addGroup("g");

    _this.group.add(_this.element);

    _this.setPropertyValue("pixelPerfect", false);

    _this.setPropertyValue("layout", "absolute");

    _this.setPropertyValue("fixedWidthGrid", false);

    _this.setPropertyValue("verticalCenter", "none");

    _this.setPropertyValue("horizontalCenter", "none");

    _this._positionPrecision = 4;

    _this._disposers.push(new _utils_Dictionary__WEBPACK_IMPORTED_MODULE_4__.DictionaryDisposer(_this._childrenDisposers));

    _this.children.events.on("inserted", _this.handleChildAdded, _this);

    _this.children.events.on("removed", _this.handleChildRemoved, _this);

    _this.applyTheme();

    return _this;
  }
  /**
   * Handles adding of a new child into `children`. Adding new children might
   * affect the whole layout so it needs to be revalidated.
   *
   * @ignore Exclude from docs
   * @param event Event object
   * @todo Throw an exception on adding a disposed object. Of course it's better NOT TO add disposed objects, so that what we should focus on.
   */


  Container.prototype.handleChildAdded = function (event) {
    this.processChild(event.newValue);
  };
  /**
   * @ignore
   */


  Container.prototype.processChild = function (child) {
    // try solves the problem when somedy adds child directly to children
    try {
      this._childrenDisposers.insertKey(child.uid, new _utils_Disposer__WEBPACK_IMPORTED_MODULE_3__.MultiDisposer([// it's not enough to listen to POSITION_CHANGED only, as some extra redrawals will happen.
      child.events.on("transformed", this.handleChildTransform, this), child.events.on("zIndexChanged", this.sortAndAdd, this)]));
    } catch (err) {// void
    }

    if (this.element) {
      var group = this.element;
      group.add(child.group);
    }

    child.parent = this;
    child.paper = this.paper;
    this.dispatchImmediately("childadded", {
      type: "childadded",
      newValue: child
    });
    this.invalidate();
  };
  /**
   * @ignore
   */


  Container.prototype.sortAndAdd = function () {
    this.sortChildren();
    this.addChildren();
  };
  /**
   * Handles child removal. Changing size of the child may change the
   * whole layout of the Container, hence layout needs to be invalidated.
   *
   * @ignore Exclude from docs
   * @param event Event object
   */


  Container.prototype.handleChildRemoved = function (event) {
    var child = event.oldValue; // TODO figure out why the key sometimes doesn't exist

    this._childrenDisposers.removeKey(child.uid);

    if (this.element) {
      var group = this.element;
      group.removeElement(child.group);
    }

    if (child.isMeasured) {
      this.invalidateLayout();
    }

    this.dispatchImmediately("childremoved", {
      type: "childremoved",
      oldValue: child
    });
  };
  /**
   * Handles child transformation. Changing size of the child may change the
   * whole layout of the Container, hence layout needs to be invalidated.
   *
   * @ignore Exclude from docs
   * @param event Event object
   */


  Container.prototype.handleChildTransform = function (event) {
    var child = event.target;

    if (child.isMeasured) {
      // && this.layout != "none" && this.layout != "absolute") {
      this.invalidateLayout();
    }
  };
  /**
   * Invalidates Container's layout, causing it to be re-evaluated again.
   *
   * @ignore Exclude from docs
   */


  Container.prototype.invalidateLayout = function () {
    if (this.layoutInvalid || this.disabled || this.isTemplate || this.layout == "none" || this.__disabled) {
      return;
    }

    this.layoutInvalid = true;
    _Registry__WEBPACK_IMPORTED_MODULE_8__.registry.addToInvalidLayouts(this);
    _System__WEBPACK_IMPORTED_MODULE_15__.system.requestFrame();
  };
  /**
   * Invalidates element.
   *
   * Object will be redrawn during the next update cycle.
   *
   * Please note that in most cases elements will auto-invalidate when needed. If
   * everything works, DO NOT use this method. Use it only if some changes do
   * not take otherwise.
   */


  Container.prototype.invalidate = function () {
    _super.prototype.invalidate.call(this);

    this.invalidateLayout();
  };
  /**
   * Invalidates the whole element, including layout AND all its child
   * elements.
   *
   * As this will essentially force all elements to redraw, use only if
   * absolutely necessary.
   */


  Container.prototype.deepInvalidate = function () {
    _super.prototype.invalidate.call(this); //this.sortChildren();


    _utils_Array__WEBPACK_IMPORTED_MODULE_11__.each(this._childrenByLayout, function (child) {
      if (child instanceof Container) {
        child.deepInvalidate();
      } else {
        child.invalidate();
      }
    });
    this.invalidateLayout();
  };

  Object.defineProperty(Container.prototype, "children", {
    /**
     * Returns a list of the child [[Sprite]] elements contained in this
     * Container.
     *
     * @return List of child elements (Sprites)
     */
    get: function get() {
      // @todo Review if we can add all children to disposers
      if (!this._children) {
        this._children = new _utils_List__WEBPACK_IMPORTED_MODULE_2__.List(); //this._disposers.push(new ListDisposer(this._children));
      }

      return this._children;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Container.prototype, "minWidth", {
    /**
     * @return Width (px)
     */
    get: function get() {
      return this.getPropertyValue("minWidth");
    },

    /**
     * Minimum width (px) for the Container. A container will not
     * auto-shrink beyond this value, even if child elements are smaller.
     *
     * @param value  Width (px)
     */
    set: function set(value) {
      if (this.setPropertyValue("minWidth", value)) {
        this.invalidateLayout();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Container.prototype, "minHeight", {
    /**
     * @return Height (px)
     */
    get: function get() {
      return this.getPropertyValue("minHeight");
    },

    /**
     * Minimum height (px) for the Container. A container will not
     * auto-shrink beyond this value, even if child elements are smaller.
     *
     * @param value  Height (px)
     */
    set: function set(value) {
      if (this.setPropertyValue("minHeight", value)) {
        this.invalidateLayout();
      }
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Overrides the original `removeElement` so that Container's actual element
   * is not removed. We do not need to remove element of a Container.
   *
   * We do this because remove element each time will fail the `getBBox`.
   *
   * @ignore Exclude from docs
   */

  Container.prototype.removeElement = function () {};
  /**
   * Sorts Container's children: the ones with variable width and height are
   * put at the end of the list (depending on layout type), so that fixed-width
   * ones can be drawn first.
   *
   * @ignore Exclude from docs
   */


  Container.prototype.sortChildren = function () {
    var _this = this;

    this._childrenByLayout = [];

    if (this.layout == "none" || this.layout == "absolute" || !this.layout) {
      //$iter.each(this.children.iterator(), (child) => {
      //	this._childrenByLayout.push(child);
      //});
      this._childrenByLayout = this.children.values;
    } else {
      // Assemble fixed-size and relative lists
      var fixed_1 = [];
      var relative_1 = [];
      _utils_Iterator__WEBPACK_IMPORTED_MODULE_10__.each(this.children.iterator(), function (child) {
        if (_this.layout == "horizontal" || _this.layout == "grid") {
          if (!_utils_Type__WEBPACK_IMPORTED_MODULE_13__.isNumber(child.percentWidth)) {
            fixed_1.push(child);
          } else {
            relative_1.push(child);
          }
        } else if (_this.layout == "vertical") {
          if (!_utils_Type__WEBPACK_IMPORTED_MODULE_13__.isNumber(child.percentHeight)) {
            fixed_1.push(child);
          } else {
            relative_1.push(child);
          }
        } else {
          fixed_1.push(child);
        }
      }); // Concat everything into list

      this._childrenByLayout = fixed_1.concat(relative_1);
    }

    this.calculateRelativeSize();
  };
  /**
   * Calculates relative sizes for all Container's children.
   *
   * @ignore Exclude from docs
   * @todo Make it protected?
   */


  Container.prototype.calculateRelativeSize = function () {
    var _this = this;

    var totalRelativeWidth = 0;
    var totalRelativeHeight = 0;
    _utils_Array__WEBPACK_IMPORTED_MODULE_11__.each(this._childrenByLayout, function (child) {
      // if child is not measured, we do not care about it at all.
      if (child.isMeasured) {
        if (_utils_Type__WEBPACK_IMPORTED_MODULE_13__.isNumber(child.percentWidth)) {
          totalRelativeWidth += child.percentWidth;
        }

        if (_utils_Type__WEBPACK_IMPORTED_MODULE_13__.isNumber(child.percentHeight)) {
          totalRelativeHeight += child.percentHeight;
        }
      }
    });
    _utils_Array__WEBPACK_IMPORTED_MODULE_11__.each(this._childrenByLayout, function (child) {
      if (child.isMeasured) {
        if (_this.layout == "horizontal") {
          if (_utils_Type__WEBPACK_IMPORTED_MODULE_13__.isNumber(child.percentWidth)) {
            child.relativeWidth = child.percentWidth / totalRelativeWidth;
          }

          if (_utils_Type__WEBPACK_IMPORTED_MODULE_13__.isNumber(child.percentHeight)) {
            child.relativeHeight = child.percentHeight / 100;
          }
        }

        if (_this.layout == "vertical") {
          if (_utils_Type__WEBPACK_IMPORTED_MODULE_13__.isNumber(child.percentHeight)) {
            child.relativeHeight = child.percentHeight / totalRelativeHeight;
          }

          if (_utils_Type__WEBPACK_IMPORTED_MODULE_13__.isNumber(child.percentWidth)) {
            child.relativeWidth = child.percentWidth / 100;
          }
        }

        if (_this.layout == "grid") {
          if (_utils_Type__WEBPACK_IMPORTED_MODULE_13__.isNumber(child.percentHeight)) {
            child.relativeHeight = child.percentHeight / 100;
          }

          if (_utils_Type__WEBPACK_IMPORTED_MODULE_13__.isNumber(child.percentWidth)) {
            child.relativeWidth = child.percentWidth / 100;
          }
        }
      }

      if (_this.layout == "absolute" || !child.isMeasured) {
        if (_utils_Type__WEBPACK_IMPORTED_MODULE_13__.isNumber(child.percentWidth)) {
          child.relativeWidth = child.percentWidth / 100;
        }

        if (_utils_Type__WEBPACK_IMPORTED_MODULE_13__.isNumber(child.percentHeight)) {
          child.relativeHeight = child.percentHeight / 100;
        }
      }
    });
  };
  /**
   * Adds all children to Container's SVG element.
   *
   * @ignore Exclude from docs
   */


  Container.prototype.addChildren = function () {
    /*
      Need this check because a child might be assigned to parent even before element is created, for example a theme
      access scrollbar.thumb
    */
    if (this.element) {
      var zindexed = _utils_Array__WEBPACK_IMPORTED_MODULE_11__.copy(this.children.values); // not children by layout!

      var sortArray = zindexed.map(function (data, idx) {
        return {
          idx: idx,
          data: data
        };
      });
      sortArray.sort(function (a, b) {
        var ai = a.data.zIndex || 0;
        var bi = b.data.zIndex || 0;

        if (ai < bi) {
          return -1;
        }

        if (ai > bi) {
          return 1;
        }

        return a.idx - b.idx;
      });
      zindexed = sortArray.map(function (val) {
        return val.data;
      });
      var group_1 = this.element; // check, maybe the order is good already

      var isCorrect = true;

      if (group_1.node && group_1.node.childNodes) {
        for (var i = 0, len = group_1.node.childNodes.length; i < len; i++) {
          if (group_1.node.childNodes[i] != zindexed[i].group.node) {
            isCorrect = false;
            break;
          }
        }
      }

      if (!isCorrect) {
        _utils_Array__WEBPACK_IMPORTED_MODULE_11__.each(zindexed, function (child) {
          if (child.group) {
            group_1.add(child.group);
          }
        });

        if (this._background) {
          this.group.addToBack(this._background.group);
        }

        this.invalidateLayout();
      }
    }
  };
  /**
   * Creates a new element of specific type and assigns as a child to the
   * Container.
   *
   * @param Class type for the new element
   * @return New element
   */


  Container.prototype.createChild = function (classType) {
    var sprite = new classType();
    sprite.parent = this;
    return sprite;
  };
  /**
   * Removes all Container's children without actually destroying them.
   *
   * To destroy children use `disposeChildren()` instead.
   */


  Container.prototype.removeChildren = function () {
    // remove all children
    // TODO use iteration instead
    while (this.children.length > 0) {
      var child = this.children.getIndex(0);
      child.parent = undefined;
      this.children.removeValue(child);
    }
  };
  /**
   * Removes and destroys all Container's children.
   *
   * To remove children from Container without destroying them, use
   * `removeChildren()`.
   */


  Container.prototype.disposeChildren = function () {
    // TODO use iteration instead
    while (this.children.length > 0) {
      var child = this.children.getIndex(0);
      child.dispose();
      this.children.removeValue(child);
    }
  };

  Object.defineProperty(Container.prototype, "background", {
    /**
     * @return Background element
     */
    get: function get() {
      if (!this._background) {
        this._background = this.createBackground();
        this.processBackground();
      }

      return this._background;
    },

    /**
     * An element to use as container background.
     *
     * @param background  Background element
     */
    set: function set(background) {
      if (this._background && this.background != background) {
        this.removeDispose(this._background);
      }

      if (background) {
        this._background = background;

        this._disposers.push(background);

        this.processBackground();
      }
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Handles the situation where parent element is resized.
   *
   * @ignore Exclude from docs
   */

  Container.prototype.handleGlobalScale = function () {
    _super.prototype.handleGlobalScale.call(this);

    this.children.each(function (child) {
      child.handleGlobalScale();
    });
  };
  /**
   * Creates and returns a [[Rectangle]] to use as a background for Container.
   *
   * @ignore Exclude from docs
   * @return Background Rectangle element
   */


  Container.prototype.createBackground = function () {
    return new _elements_Rectangle__WEBPACK_IMPORTED_MODULE_6__.Rectangle();
  };
  /**
   * Decorates background element with required properties.
   *
   * @ignore Exclude from docs
   */


  Container.prototype.processBackground = function () {
    var background = this._background;

    if (background) {
      background.isMeasured = false;
      this._background.fill = new _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_9__.InterfaceColorSet().getFor("background");
      background.parent = this;
      background.isMeasured = false;
      this.children.removeValue(background);

      this._disposers.push(background);

      this.group.addToBack(this._background.group);
    }
  };
  /**
   * Measures the size of container and informs its children of how much size
   * they can occupy, by setting their relative `maxWidth` and `maxHeight`
   * properties.
   *
   * @ignore Exclude from docs
   */


  Container.prototype.validateLayout = function () {
    var _this = this;

    _Registry__WEBPACK_IMPORTED_MODULE_8__.registry.removeFromInvalidLayouts(this);
    this.layoutInvalid = false; // prevents from drawing if topparent is 0x0

    /*
    let topParent = this.topParent;
    if (topParent) {
        if (!topParent.maxWidth || !topParent.maxHeight) {
            this._disposers.push(topParent.events.once("maxsizechanged", this.invalidateLayout, this));
        }
    }*/

    this._availableWidth = this.innerWidth;
    this._availableHeight = this.innerHeight;
    var measuredWidth = 0;
    var measuredHeight = 0;
    var allValid = true;

    if (this.children) {
      this.sortChildren(); // we itterate through list of children, sorted by layout priority. sprites which width non-relative width/height will go first, so we will reduce available width before proceeding to sprites with relative width/height

      _utils_Array__WEBPACK_IMPORTED_MODULE_11__.each(this._childrenByLayout, function (child) {
        var maxWidth;
        var maxHeight;

        if (_utils_Type__WEBPACK_IMPORTED_MODULE_13__.isNumber(child.relativeWidth)) {
          maxWidth = _utils_Math__WEBPACK_IMPORTED_MODULE_12__.round(_this._availableWidth * child.relativeWidth, 2);

          if (_this.layout == "horizontal") {
            // || this.layout == "absolute") {
            maxWidth -= child.pixelMarginRight + child.pixelMarginLeft;
          }
        } else {
          if (_this.layout == "horizontal") {
            if (child.invalid) {
              child.validate();
            }
          }
        }

        if (_utils_Type__WEBPACK_IMPORTED_MODULE_13__.isNumber(child.relativeHeight)) {
          maxHeight = _utils_Math__WEBPACK_IMPORTED_MODULE_12__.round(_this._availableHeight * child.relativeHeight, 2);

          if (_this.layout == "vertical") {
            //  || this.layout == "absolute") {
            maxHeight -= child.pixelMarginTop + child.pixelMarginBottom;
          }
        } else {
          if (_this.layout == "vertical") {
            if (child.invalid) {
              child.validate();
            }
          }
        } // if child is valid


        if (child.invalid == false) {
          if (_utils_Type__WEBPACK_IMPORTED_MODULE_13__.isNumber(child.relativeWidth)) {
            child.maxWidth = maxWidth;
          }

          if (_utils_Type__WEBPACK_IMPORTED_MODULE_13__.isNumber(child.relativeHeight)) {
            child.maxHeight = maxHeight;
          }

          if (child.isMeasured) {
            // reduce available width if this is horizontal layout
            if (_this.layout == "horizontal") {
              if (!_utils_Type__WEBPACK_IMPORTED_MODULE_13__.isNumber(child.percentWidth)) {
                if (child.measuredWidth > 0) {
                  _this._availableWidth -= child.measuredWidth + child.pixelMarginLeft + child.pixelMarginRight;
                }
              }
            } // reduce available height if this is vertical layout


            if (_this.layout == "vertical") {
              if (!_utils_Type__WEBPACK_IMPORTED_MODULE_13__.isNumber(child.percentHeight)) {
                if (child.measuredHeight > 0) {
                  _this._availableHeight -= child.measuredHeight + child.pixelMarginTop + child.pixelMarginBottom;
                }
              }
            }

            var childMeasuredWidth = child.measuredWidth;
            var childMeasuredHeight = child.measuredHeight;

            if (child.align != "none") {
              childMeasuredWidth += child.pixelMarginLeft + child.pixelMarginRight;
            }

            if (child.valign != "none") {
              childMeasuredHeight += child.pixelMarginTop + child.pixelMarginBottom;
            }

            measuredWidth = Math.max(measuredWidth, childMeasuredWidth);
            measuredHeight = Math.max(measuredHeight, childMeasuredHeight);
          }
        } // if child is not valid
        else {
          // tell child what maximum width/ height it can occupy
          if (child.isMeasured) {
            if (_utils_Type__WEBPACK_IMPORTED_MODULE_13__.isNumber(child.relativeWidth)) {
              if (child.maxWidth != maxWidth) {
                // need to check this because of allValid
                child.maxWidth = maxWidth;
                allValid = false;
              }
            }

            if (_utils_Type__WEBPACK_IMPORTED_MODULE_13__.isNumber(child.relativeHeight)) {
              if (child.maxHeight != maxHeight) {
                // need to check this because of allValid
                child.maxHeight = maxHeight;
                allValid = false;
              }
            }
          }
        }
      });
    }

    this._absoluteWidth = measuredWidth;
    this._absoluteHeight = measuredHeight; // arrange after measuring, only if all children are valid already

    if (allValid) {
      this.arrange();
    }
  };
  /**
   * Arranges children according to layout specs and available space / child
   * sizes.
   *
   * @ignore Exclude from docs
   */


  Container.prototype.arrange = function () {
    var _this = this;

    var children = this.children;
    /*
       in this method we not only arrange children but also find out the size of the container
       it might seem it would be easier to get container size using sprite's measure method,
       however it would return only actual size of the bbox. However as each child meight have
       margins set, we need to check each child - we do it here.
         This method doesn't do anything with DOM, so it's not expensive
    */

    var measuredWidth = 0;
    var measuredHeight = 0; //let innerWidth: number = this.innerWidth; //$math.max(this.innerWidth, this._measuredWidth - paddingLeft - paddingRight);
    //let innerHeight: number = this.innerHeight; //$math.max(this.innerHeight, this._measuredHeight - paddingTop - paddingBottom);
    // above is wrong, as if a w/h is not specified, it is 0 and alignment doesn't work at all.

    var innerWidth = _utils_Math__WEBPACK_IMPORTED_MODULE_12__.max(this.innerWidth, this._absoluteWidth);
    var innerHeight = _utils_Math__WEBPACK_IMPORTED_MODULE_12__.max(this.innerHeight, this._absoluteHeight);
    var left; // = 0;

    var right; // = innerWidth;

    var top; // = 0;

    var bottom; // = innerHeight;

    var paddingLeft = this.pixelPaddingLeft;
    var paddingRight = this.pixelPaddingRight;
    var paddingTop = this.pixelPaddingTop;
    var paddingBottom = this.pixelPaddingBottom;
    var nextX = 0;
    var nextY = 0;
    var row = 0;
    var column = 0;
    var columnWidth = [];
    var rowHeight = [];
    var maxCellWidth;
    var minCellWidth;
    var columnCount;
    var maxWidth = this.maxWidth;
    var maxHeight = this.maxHeight;
    var minWidth = this.minWidth;
    var minHeight = this.minHeight;
    var childrenCopy = _utils_Array__WEBPACK_IMPORTED_MODULE_11__.copy(children.values);

    if (this.reverseOrder) {
      childrenCopy.reverse();
    } // GRID PRECALCULATIONS


    if (this.layout == "grid") {
      minCellWidth = maxWidth;
      maxCellWidth = 1;

      for (var i = 0, len = childrenCopy.length; i < len; i++) {
        var child = childrenCopy[i];

        if (child.isMeasured && !child.disabled && !child.__disabled) {
          var childMeasuredWidth = child.measuredWidth;

          if (childMeasuredWidth < minCellWidth) {
            minCellWidth = childMeasuredWidth;
          }

          if (childMeasuredWidth > maxCellWidth) {
            maxCellWidth = childMeasuredWidth;
          }
        }
      }

      minCellWidth = _utils_Math__WEBPACK_IMPORTED_MODULE_12__.fitToRange(minCellWidth, 1, maxWidth);
      maxCellWidth = _utils_Math__WEBPACK_IMPORTED_MODULE_12__.fitToRange(maxCellWidth, 1, maxWidth);

      if (this.fixedWidthGrid) {
        columnCount = maxWidth / maxCellWidth;
      } else {
        columnCount = maxWidth / minCellWidth; // predicted number of columns, yes it is usually much more than real number, but we fix that later
      }

      columnCount = _utils_Math__WEBPACK_IMPORTED_MODULE_12__.max(1, Math.floor(columnCount));
      columnCount = _utils_Math__WEBPACK_IMPORTED_MODULE_12__.min(this.maxColumns, columnCount);
      columnWidth = this.getColumnWidth(childrenCopy, columnCount, maxCellWidth);
    }

    var contentLeft;
    var contentRight;
    var contentTop;
    var contentBottom; // we itterate through array of children
    // TODO use iterator instead

    for (var i = 0, len = childrenCopy.length; i < len; i++) {
      var child = childrenCopy[i];

      if (child.isMeasured && !child.disabled && !child.__disabled) {
        var x = undefined; //child.pixelX; // must reset

        var y = undefined; //child.pixelY; // must reset

        var childMarginLeft = child.pixelMarginLeft;
        var childMarginRight = child.pixelMarginRight;
        var childMarginTop = child.pixelMarginTop;
        var childMarginBottom = child.pixelMarginBottom;
        var childWidth = child.measuredWidth;
        var childHeight = child.measuredHeight;
        var childLeft = void 0;
        var childRight = void 0;
        var childTop = void 0;
        var childBottom = void 0;

        switch (this.layout) {
          case "none":
            break;
          // absolute layout

          case "absolute":
            // horizontal alignment
            switch (child.align) {
              case "left":
                x = childMarginLeft - child.maxLeft;
                break;

              case "center":
                x = (innerWidth - childWidth) / 2 - child.maxLeft;
                break;

              case "right":
                x = innerWidth - childMarginRight - child.maxRight;
                break;

              default:
                if (!(child.x instanceof _utils_Percent__WEBPACK_IMPORTED_MODULE_7__.Percent)) {
                  x = child.pixelX;
                }

                break;
            } // vertical alignment


            switch (child.valign) {
              case "top":
                y = childMarginTop - child.maxTop;
                break;

              case "middle":
                y = (innerHeight - childHeight) / 2 - child.maxTop;
                break;

              case "bottom":
                y = innerHeight - childMarginBottom - child.maxBottom;
                break;

              default:
                if (!(child.y instanceof _utils_Percent__WEBPACK_IMPORTED_MODULE_7__.Percent)) {
                  y = child.pixelY;
                }

                break;
            }

            break;
          // vertical layout

          case "vertical":
            //if ($type.isNumber(child.relativeHeight)) {
            //	childHeight = child.maxHeight;
            //}
            switch (child.align) {
              case "left":
                x = childMarginLeft - child.maxLeft;
                break;

              case "center":
                x = (innerWidth - childWidth) / 2 - child.maxLeft;
                break;

              case "right":
                x = innerWidth - childMarginRight - child.maxRight;
                break;

              default:
                x = child.pixelX;
                break;
            }

            y = nextY + childMarginTop - child.maxTop;
            nextY = y + child.maxBottom + childMarginBottom;
            break;
          // horizontal layout

          case "horizontal":
            //if ($type.isNumber(child.relativeHeight)) {
            //	childHeight = child.maxHeight;
            //}
            switch (child.valign) {
              case "top":
                y = childMarginTop - child.maxTop;
                break;

              case "middle":
                y = (innerHeight - childHeight) / 2 - child.maxTop;
                break;

              case "bottom":
                y = innerHeight - childMarginBottom - child.maxBottom;
                break;

              default:
                y = child.pixelY;
                break;
            }

            x = nextX + childMarginLeft - child.maxLeft;
            nextX = x + child.maxRight + childMarginRight;
            break;

          case "grid":
            x = nextX + childMarginLeft - child.maxLeft;

            switch (child.valign) {
              case "top":
                y = nextY + childMarginTop - child.maxTop;
                break;

              case "middle":
                y = nextY + (innerHeight - childHeight) / 2 - child.maxTop;
                break;

              case "bottom":
                y = nextY + innerHeight - childMarginBottom - child.maxBottom;
                break;

              default:
                y = nextY - child.maxTop;
                break;
            }

            nextX += columnWidth[column];
            rowHeight[row] = _utils_Math__WEBPACK_IMPORTED_MODULE_12__.max(rowHeight[row], childHeight);
            column++;
            var nextColumnWidth = columnWidth[column];

            if (!_utils_Type__WEBPACK_IMPORTED_MODULE_13__.isNumber(nextColumnWidth)) {
              nextColumnWidth = maxCellWidth;
            }

            if (nextX > _utils_Math__WEBPACK_IMPORTED_MODULE_12__.min(this.innerWidth, maxWidth) - nextColumnWidth + 1 && column < columnCount) {
              columnCount = column;
              nextX = 0;
              nextY = 0;
              row = 0;
              column = 0;
              columnWidth = this.getColumnWidth(childrenCopy, columnCount, maxCellWidth);
              rowHeight = [];
              i = -1;
              continue;
            }

            if (column >= columnCount) {
              column = 0;
              nextY += rowHeight[row];
              row++;
              nextX = 0;
            }

            break;
        }

        if (this.layout !== "none") {
          child.moveTo({
            x: x,
            y: y
          }); // must use moveTo, otherwise x/y set in percent won't work

          childLeft = x + child.maxLeft - childMarginLeft;
          childRight = x + child.maxRight + childMarginRight;
          childTop = y + child.maxTop - childMarginTop;
          childBottom = y + child.maxBottom + childMarginBottom;

          if (childRight > right || !_utils_Type__WEBPACK_IMPORTED_MODULE_13__.isNumber(right)) {
            right = childRight;
          }

          if (childLeft < left || !_utils_Type__WEBPACK_IMPORTED_MODULE_13__.isNumber(left)) {
            left = childLeft;
          }

          if (childTop < top || !_utils_Type__WEBPACK_IMPORTED_MODULE_13__.isNumber(top)) {
            top = childTop;
          }

          if (childBottom > bottom || !_utils_Type__WEBPACK_IMPORTED_MODULE_13__.isNumber(bottom)) {
            bottom = childBottom;
          }

          if (childRight > contentRight || !_utils_Type__WEBPACK_IMPORTED_MODULE_13__.isNumber(contentRight)) {
            contentRight = childRight;
          }

          if (childLeft < contentLeft || !_utils_Type__WEBPACK_IMPORTED_MODULE_13__.isNumber(contentLeft)) {
            contentLeft = childLeft;
          }

          if (childTop < contentTop || !_utils_Type__WEBPACK_IMPORTED_MODULE_13__.isNumber(contentTop)) {
            contentTop = childTop;
          }

          if (childBottom > contentBottom || !_utils_Type__WEBPACK_IMPORTED_MODULE_13__.isNumber(contentBottom)) {
            contentBottom = contentBottom;
          }
        }
      } else {
        child.validatePosition();
      }
    }

    if (this.layout == "none") {
      var noneBBox = this.bbox;
      left = noneBBox.x;
      right = noneBBox.x + noneBBox.width;
      top = noneBBox.y;
      bottom = noneBBox.y + noneBBox.height;
    }

    if (!_utils_Type__WEBPACK_IMPORTED_MODULE_13__.isNumber(left)) {
      left = 0;
      contentLeft = 0;
    }

    if (!_utils_Type__WEBPACK_IMPORTED_MODULE_13__.isNumber(right)) {
      right = this._availableWidth;
      contentRight = right;
    }

    if (!_utils_Type__WEBPACK_IMPORTED_MODULE_13__.isNumber(top)) {
      top = 0;
      contentTop = 0;
    }

    if (!_utils_Type__WEBPACK_IMPORTED_MODULE_13__.isNumber(bottom)) {
      bottom = this._availableHeight;
      contentBottom = bottom;
    }

    if (!_utils_Type__WEBPACK_IMPORTED_MODULE_13__.isNumber(contentTop)) {
      contentTop = 0;
    }

    if (!_utils_Type__WEBPACK_IMPORTED_MODULE_13__.isNumber(contentBottom)) {
      contentBottom = contentTop;
    }

    if (!_utils_Type__WEBPACK_IMPORTED_MODULE_13__.isNumber(contentLeft)) {
      contentLeft = 0;
    }

    if (!_utils_Type__WEBPACK_IMPORTED_MODULE_13__.isNumber(contentRight)) {
      contentRight = contentLeft;
    }

    measuredWidth = right - left;
    measuredHeight = bottom - top;

    if (_utils_Type__WEBPACK_IMPORTED_MODULE_13__.isNumber(this.relativeWidth)) {
      measuredWidth = maxWidth - paddingLeft - paddingRight;
      left = 0;
      right = measuredWidth;
    }

    if (_utils_Type__WEBPACK_IMPORTED_MODULE_13__.isNumber(this.relativeHeight)) {
      measuredHeight = maxHeight - paddingTop - paddingBottom;
      top = 0;
      bottom = measuredHeight;
    }

    if (_utils_Type__WEBPACK_IMPORTED_MODULE_13__.isNumber(this._pixelWidth)) {
      left = 0;
      measuredWidth = this._pixelWidth - paddingLeft - paddingRight;
    }

    if (_utils_Type__WEBPACK_IMPORTED_MODULE_13__.isNumber(minWidth) && measuredWidth < minWidth) {
      left = 0;
      measuredWidth = this.minWidth - paddingLeft - paddingRight;
    }

    if (_utils_Type__WEBPACK_IMPORTED_MODULE_13__.isNumber(this._pixelHeight)) {
      top = 0;
      measuredHeight = this._pixelHeight - paddingTop - paddingBottom;
    }

    if (_utils_Type__WEBPACK_IMPORTED_MODULE_13__.isNumber(minHeight) && measuredHeight < minHeight) {
      top = 0;
      measuredHeight = minHeight - paddingTop - paddingBottom;
    }

    var measuredContentWidth = contentRight - contentLeft;
    var measuredContentHeight = contentBottom - contentTop; /// handle content alignment

    if (this.layout != "none" && (this.contentAlign || this.contentValign) && children.length > 0) {
      var dx_1;
      var dy_1;
      var mwa = measuredWidth;
      var mha = measuredHeight;

      if (mwa < measuredContentWidth) {
        mwa = measuredContentWidth;
      }

      if (mha < measuredContentHeight) {
        mha = measuredContentHeight;
      }

      if (this.contentAlign == "center") {
        dx_1 = (mwa - measuredContentWidth) / 2;
      }

      if (this.contentAlign == "right") {
        dx_1 = mwa - measuredContentWidth;
      }

      if (this.contentValign == "middle") {
        dy_1 = (mha - measuredContentHeight) / 2;
      }

      if (this.contentValign == "bottom") {
        dy_1 = mha - measuredContentHeight;
      }

      if (_utils_Type__WEBPACK_IMPORTED_MODULE_13__.isNumber(dx_1)) {
        _utils_Iterator__WEBPACK_IMPORTED_MODULE_10__.each(children.iterator(), function (child) {
          var childLeft = child.maxLeft;
          var ddx = dx_1;

          if (_this.layout == "horizontal") {
            child.x = child.pixelX + ddx;
          } // individual grid elements can not be aligned vertically, that's why it's different from horizontal


          if (_this.layout == "grid") {
            child.x = child.pixelX + ddx;
          }

          if (_this.layout == "vertical") {
            ddx += child.pixelMarginLeft;

            if (child.align == "none") {
              child.x = ddx - childLeft;
            }
          }

          if (_this.layout == "absolute") {
            ddx += child.pixelMarginLeft;

            if (child.align == "none") {
              child.x = ddx - childLeft;
            }
          }
        });
      }

      if (_utils_Type__WEBPACK_IMPORTED_MODULE_13__.isNumber(dy_1)) {
        _utils_Iterator__WEBPACK_IMPORTED_MODULE_10__.each(children.iterator(), function (child) {
          var childTop = child.maxTop;
          var ddy = dy_1;

          if (_this.layout == "horizontal") {
            ddy += child.pixelMarginTop;

            if (child.valign == "none") {
              child.y = ddy - childTop;
            }
          } // individual grid elements can not be aligned vertically, that's why it's different from horizontal


          if (_this.layout == "grid") {
            ddy += child.pixelMarginTop;
            child.y = ddy - childTop;
          }

          if (_this.layout == "vertical") {
            child.y = child.pixelY + ddy;
          }

          if (_this.layout == "absolute") {
            ddy += child.pixelMarginTop;

            if (child.valign == "none") {
              child.y = ddy - childTop;
            }
          }
        });
      }
    }

    var oldBBox = this.bbox; // this will mess up maxw/maxh set by container layout, we need a separate min/maxwidth for users
    // this prevents invalidating layout in such cases as scrolling category axis, when labels go outside bounds and results transformed event
    // todo: need to check if this doesn't cause other problems.
    //if (this.maxWidth > 0) {
    //measuredWidth = $math.min(measuredWidth, this.maxWidth);
    //measuredWidth = $math.max(measuredWidth, this.minWidth);
    //}
    //if (this.maxHeight > 0) {
    //measuredHeight = $math.min(measuredHeight, this.maxHeight);
    //measuredHeight = $math.max(measuredHeight, this.minHeight);
    //}

    measuredWidth = _utils_Math__WEBPACK_IMPORTED_MODULE_12__.max(measuredWidth, minWidth);
    measuredHeight = _utils_Math__WEBPACK_IMPORTED_MODULE_12__.max(measuredHeight, minHeight);
    this.contentWidth = measuredWidth;
    this.contentHeight = measuredHeight; // new

    measuredWidth = _utils_Math__WEBPACK_IMPORTED_MODULE_12__.min(measuredWidth, maxWidth);
    measuredHeight = _utils_Math__WEBPACK_IMPORTED_MODULE_12__.min(measuredHeight, maxHeight);
    this._bbox = {
      x: left,
      y: top,
      width: measuredWidth,
      height: measuredHeight
    };
    var prevLeft = this.maxLeft;
    var prevTop = this.maxTop;
    var prevBotttom = this.maxBottom;
    var prevRight = this.maxRight;
    this.measure();

    if (prevLeft != this.maxLeft || prevRight != this.maxRight || prevTop != this.maxTop || prevBotttom != this.maxBottom) {
      if (this.events.isEnabled("transformed")) {
        var event_1 = {
          type: "transformed",
          target: this
        };

        if (oldBBox) {
          event_1.dummyData = oldBBox.width + " " + measuredWidth + "  " + oldBBox.height + " " + measuredHeight;
        }

        this.events.dispatchImmediately("transformed", event_1);
      }
    }

    this.dispatchImmediately("layoutvalidated");
  };
  /**
   * Positions element according its center settings.
   *
   * @todo Description (review)
   * @ignore Exclude from docs
   */


  Container.prototype.updateCenter = function () {
    _super.prototype.updateCenter.call(this);

    this.updateBackground();
  };
  /**
   * Update the background to fit into specific dimensions.
   *
   * @ignore Exclude from docs
   * @todo Make it protected?
   */


  Container.prototype.updateBackground = function () {
    var background = this._background; // accessing protected, as getter creates instance if it doesn't exist

    if (background) {
      background.x = this.maxLeft;
      background.y = this.maxTop;
      background.width = this.maxRight - this.maxLeft;
      background.height = this.maxBottom - this.maxTop;
    }
  };
  /**
   * Returns widths of all columns in a horizontal Container layout.
   *
   * @ignore Exclude from docs
   * @param columnCount   Number of columns
   * @param maxCellWidth  Maximum width of one grid cell
   * @return An array of column widths
   */


  Container.prototype.getColumnWidth = function (children, columnCount, maxCellWidth) {
    var _this = this;

    var columnWidth = [];
    var column = 0;
    _utils_Array__WEBPACK_IMPORTED_MODULE_11__.each(children, function (child) {
      if (child.isMeasured && !child.disabled && !child.__disabled) {
        if (_this.fixedWidthGrid) {
          columnWidth[column] = maxCellWidth;
        } else {
          columnWidth[column] = _utils_Math__WEBPACK_IMPORTED_MODULE_12__.max(columnWidth[column], child.measuredWidth + child.pixelMarginRight + child.pixelMarginLeft);
        }

        column++;

        if (column == columnCount) {
          column = 0;
        }
      }
    });
    return columnWidth;
  };

  Object.defineProperty(Container.prototype, "layout", {
    /**
     * @return Layout
     */
    get: function get() {
      return this.getPropertyValue("layout");
    },

    /**
     * Container layout.
     *
     * Options: "absolute" (default), "vertical", "horizontal", "grid", "none". "none" is quite the same as "absolute" - the objects will
     * be positioned at their x, y coordinates, the difference is that with "absolute" you can still use align/valign for children and with "none" you can not.
     * Use "none" as much as you can as it's most cpu-saving layout.
     *
     * @default "absolute"
     * @param value Layout
     */
    set: function set(value) {
      if (this.setPropertyValue("layout", value)) {
        this.invalidateLayout();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Container.prototype, "contentValign", {
    /**
     * @return Vertical alignment
     */
    get: function get() {
      return this.getPropertyValue("contentValign");
    },

    /**
     * Vertical alignment of the elements for the vertical Container.
     *
     * This is used when Container is larger than the height of all its children.
     *
     * @param value vertical alignment
     */
    set: function set(value) {
      this.setPropertyValue("contentValign", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Container.prototype, "contentAlign", {
    /**
     * @return Horizontal alignment
     */
    get: function get() {
      return this.getPropertyValue("contentAlign");
    },

    /**
     * Horizontal alignment of the elements for the horizontal Container.
     *
     * This is used when Container is larger than the height of all its children.
     *
     * @param value  Horizontal alignment
     */
    set: function set(value) {
      this.setPropertyValue("contentAlign", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Container.prototype, "fixedWidthGrid", {
    /**
     * @return Should use fixed width grid?
     */
    get: function get() {
      return this.getPropertyValue("fixedWidthGrid");
    },

    /**
     * Controls if the grid of the Container should use fixed width. Fixed width
     * grid will divide available space to all its columns/rows equally, without
     * adapting to actual child sizes or size requirements.
     *
     * @default false
     * @param value  Should use fixed width grid?
     */
    set: function set(value) {
      this.setPropertyValue("fixedWidthGrid", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Container.prototype, "maxColumns", {
    /**
     * @return Should use fixed width grid?
     */
    get: function get() {
      return this.getPropertyValue("maxColumns");
    },

    /**
     * Maximum number of columns (when using `"grid"` layout).
     *
     * @param value  Should use fixed width grid?
     */
    set: function set(value) {
      this.setPropertyValue("maxColumns", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Container.prototype, "reverseOrder", {
    /**
     * @return Reverse children?
     */
    get: function get() {
      return this.getPropertyValue("reverseOrder");
    },

    /**
     * If set to `true`, the children of the container will be drawn in reverse
     * order.
     *
     * @default false
     * @param value  Reverse children?
     */
    set: function set(value) {
      this.setPropertyValue("reverseOrder", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Container.prototype, "setStateOnChildren", {
    /**
     * @return Set state on children
     */
    get: function get() {
      return this.getPropertyValue("setStateOnChildren");
    },

    /**
     * Specifies if, when state is applied on this container, the same state
     * should be applied to container's children as well as `background`.
     *
     * @default false
     * @param value  Set state on children
     */
    set: function set(value) {
      this.setPropertyValue("setStateOnChildren", value, true);
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Checks if point is within bounds of a container.
   *
   * @param point  A coordinate to check
   * @return `true` if it fits within container
   */

  Container.prototype.fitsToBounds = function (point) {
    var x = point.x;
    var y = point.y;
    var deviation = 0.5; // sometimes coordinates are rounded to numbers like .999 so we add deviation here

    if (x >= -deviation && x <= this.pixelWidth + deviation && y >= -deviation && y <= this.pixelHeight + deviation) {
      return true;
    } else {
      return false;
    }
  };
  /**
   * Copies all properties from different Container, including background
   * clone.
   *
   * @param source  Source Container to copy from
   */


  Container.prototype.copyFrom = function (source) {
    var _this = this;

    _super.prototype.copyFrom.call(this, source);

    this.layout = source.layout;
    this.setStateOnChildren = source.setStateOnChildren;

    if (source._background) {
      this.background = source._background.clone();
      this.background.copyFrom(source._background); // won't work without this
    }

    _utils_Iterator__WEBPACK_IMPORTED_MODULE_10__.each(source.children.iterator(), function (child) {
      if (child.shouldClone) {
        var clonedChild = child.clone();
        clonedChild.parent = _this;
      }
    });
  };

  Object.defineProperty(Container.prototype, "preloader", {
    /**
     * @return Preloader instance
     */
    get: function get() {
      var preloader = this._preloader;

      if (preloader) {
        return preloader;
      } else if (this.parent) {
        return this.parent.preloader;
      }
    },

    /**
     * A [[Preloader]] instance to be used when Container is busy.
     *
     * @param preloader  Preloader instance
     */
    set: function set(preloader) {
      if (this._preloader) {
        this.removeDispose(this._preloader);
      }

      this._preloader = preloader;

      if (preloader) {
        preloader.parent = this.tooltipContainer;

        this._disposers.push(preloader);
      }
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Sets [[Paper]] instance to use to draw elements.
   * @ignore
   * @param paper Paper
   * @return true if paper was changed, false, if it's the same
   */

  Container.prototype.setPaper = function (paper) {
    var _this = this;

    var changed = _super.prototype.setPaper.call(this, paper);

    if (changed) {
      if (this._background) {
        this._background.paper = paper;
        this._background.topParent = this.topParent;
      }

      this.children.each(function (child) {
        child.setPaper(paper);
        child.topParent = _this.topParent;
      });
    }

    return changed;
  };
  /**
   * Removes Container from the system-wide list of invalid Containers.
   *
   * @ignore Exclude from docs
   */


  Container.prototype.removeFromInvalids = function () {
    _super.prototype.removeFromInvalids.call(this);

    _Registry__WEBPACK_IMPORTED_MODULE_8__.registry.removeFromInvalidLayouts(this);
  };
  /**
   * Sets a [[DataItem]] to be used as data for the Container.
   *
   * @todo Description
   * @param dataItem DataItem
   */


  Container.prototype.setDataItem = function (dataItem) {
    // this place is potentially dangerous, as if we set datItem for some dummy container, all children dataItems will be overriden
    // the main reason for doing this is that we need a setDataItem code to be called for each sprite, otherwise property fields won't be
    // applied. Also, getting dataItem from parent all the time is more expensive than saving value.
    if (this._dataItem != dataItem) {
      _utils_Iterator__WEBPACK_IMPORTED_MODULE_10__.each(this.children.iterator(), function (child) {
        child.dataItem = dataItem;
      });

      if (this._background) {
        this._background.dataItem = dataItem;
      }
    }

    _super.prototype.setDataItem.call(this, dataItem);
  };
  /**
   * Measures the element.
   *
   * @ignore Exclude from docs
   */


  Container.prototype.measureElement = function () {
    if (this.disabled || this.isTemplate || this.layout == "none" || this.__disabled) {// void
    } else {
      this.validateLayout();
    }
  };

  Object.defineProperty(Container.prototype, "fontFamily", {
    /**
     * @return Font family
     */
    get: function get() {
      return this.getPropertyValue("fontFamily");
    },

    /**
     * Font family to be used for the text.
     *
     * Parts of the text may override this setting using in-line formatting.
     *
     * @param value Font family value
     */
    set: function set(value) {
      if (this.setPropertyValue("fontFamily", value, true)) {
        this.setSVGAttribute({
          "font-family": value
        });
        this.invalidateLabels();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Container.prototype, "fontSize", {
    /**
     * @return Font size
     */
    get: function get() {
      return this.getPropertyValue("fontSize");
    },

    /**
     * Font size to be used for the text. The size can either be numeric, in
     * pixels, or other measurements.
     *
     * Parts of the text may override this setting using in-line formatting.
     *
     * @param value Font size value
     */
    set: function set(value) {
      if (this.setPropertyValue("fontSize", value, true)) {
        this.setSVGAttribute({
          "font-size": value
        });
        this.invalidateLabels();
      }
    },
    enumerable: true,
    configurable: true
  });
  /**
   * When fontSize of fontFamily changes we need to hard-invalidate all Labels of this container to position them properly.
   */

  Container.prototype.invalidateLabels = function () {
    this.children.each(function (child) {
      // can't import Label because of Circular dependencies
      if (child["hardInvalidate"]) {
        child["hardInvalidate"](); // this fixes firefox and viewport issue

        child.events.once("validated", child.handleValidate, child, false);
      } else if (child instanceof Container) {
        child.invalidateLabels();
      }
    });
  };

  Object.defineProperty(Container.prototype, "fontWeight", {
    /**
     * @return Font weight
     */
    get: function get() {
      return this.getPropertyValue("fontWeight");
    },

    /**
     * Font weight to use for text.
     *
     * Parts of the text may override this setting using in-line formatting.
     *
     * @param value Font weight
     */
    set: function set(value) {
      this.setPropertyValue("fontWeight", value);
      this.setSVGAttribute({
        "font-weight": value
      });
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Container.prototype, "textDecoration", {
    /**
     * @return Decoration
     */
    get: function get() {
      return this.getPropertyValue("textDecoration");
    },

    /**
     * A text decoration to use for text.
     *
     * Parts of the text may override this setting using in-line formatting.
     *
     * @param value  Decoration
     */
    set: function set(value) {
      this.setPropertyValue("textDecoration", value);
      this.setSVGAttribute({
        "text-decoration": value
      });
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Disposes (destroys) the element and all its children.
   */

  Container.prototype.dispose = function () {
    if (this._background) {
      this._background.dispose();
    }

    this._shouldBeReady = [];
    this.disposeChildren();

    _super.prototype.dispose.call(this);
  };
  /**
   * Applies a [[SpriteState]] on this element.
   *
   * The first parameter can either be a name of the state or a [[SpriteState]]
   * instance.
   *
   * When run, this method will apply SVG properties defined in a
   * [[SpriteState]], but only those that are relevant to this particular
   * element, that is are listed in its respective `properties` array.
   *
   * @see {@link SpriteState}
   * @param value               A state - name key or instance
   * @param transitionDuration  Duration of the transition between current and new state
   * @param easing              An easing function
   */


  Container.prototype.setState = function (value, transitionDuration, easing) {
    var stateName = value;

    if (value instanceof _SpriteState__WEBPACK_IMPORTED_MODULE_1__.SpriteState) {
      stateName = value.name;
    }

    if (this.setStateOnChildren) {
      _utils_Iterator__WEBPACK_IMPORTED_MODULE_10__.each(this.children.iterator(), function (child) {
        child.setState(stateName, transitionDuration, easing); // not good to set it in child setState

        if (stateName != "active") {
          child.isActive = false;
        }
      });
    }

    if (this._background) {
      this._background.setState(stateName);
    }

    if (this.setStateOnSprites.length) {
      _utils_Array__WEBPACK_IMPORTED_MODULE_11__.each(this.setStateOnSprites, function (item) {
        item.setState(stateName, transitionDuration, easing);
      });
    }

    return _super.prototype.setState.call(this, value, transitionDuration, easing);
  }; // otherwise isActive won't work properly with background


  Container.prototype.setActive = function (value) {
    _super.prototype.setActive.call(this, value);

    if (this._background) {
      this._background.isActive = value;
    }
  };
  /**
   * Dispatches ready event. Dispatches when all children are ready.
   */


  Container.prototype.dispatchReady = function () {
    var _this = this;

    if (!this.isReady() && !this.isDisposed()) {
      var allReady_1 = true;
      _utils_Iterator__WEBPACK_IMPORTED_MODULE_10__.eachContinue(this.children.iterator(), function (sprite) {
        if (!sprite.__disabled && !sprite.disabled && !sprite.isReady()) {
          allReady_1 = false;
          return false;
        } else {
          return true;
        }
      });
      _utils_Array__WEBPACK_IMPORTED_MODULE_11__.eachContinue(this._shouldBeReady, function (sprite) {
        if (!sprite.__disabled && !sprite.disabled && !sprite.isReady()) {
          allReady_1 = false;
          return false;
        } else {
          return true;
        }
      });

      if (allReady_1) {
        _super.prototype.dispatchReady.call(this);
      } else {
        _Registry__WEBPACK_IMPORTED_MODULE_8__.registry.events.once("exitframe", function () {
          _this.dispatchReady();

          _System__WEBPACK_IMPORTED_MODULE_15__.system.requestFrame();
        }, undefined, false);
      }
    }
  };
  /**
   * Called during the System.update method
   *
   * @ignore Exclude from docs
   */


  Container.prototype._systemUpdate = function (skippedSprites) {
    this.children.each(function (child) {
      if (child.invalid) {
        if (!child._systemCheckIfValidate()) {
          skippedSprites.push(child);
        } else if (child.dataItem && child.dataItem.component && child.dataItem.component.dataInvalid) {
          skippedSprites.push(child);
        } else {
          child.validate();
        }
      }
    });

    _super.prototype._systemUpdate.call(this, skippedSprites);
  };
  /**
   * Called during the System.validatePositions method
   *
   * @ignore Exclude from docs
   */


  Container.prototype._systemValidatePositions = function () {
    this.children.each(function (sprite) {
      if (sprite.positionInvalid) {
        sprite.validatePosition();
      }
    });

    _super.prototype._systemValidatePositions.call(this);
  };
  /**
   * Called during the System.validateLayouts method
   *
   * @ignore Exclude from docs
   */


  Container.prototype._systemValidateLayouts = function () {
    if (this.layoutInvalid && !this.isDisposed()) {
      this.validateLayout();
    }
  };

  Object.defineProperty(Container.prototype, "tapToActivate", {
    /**
     * @return Enable touch protection?
     */
    get: function get() {
      return this._tapToActivate;
    },

    /**
     * If set to `true` the chart's regular touch functionality will be suspended
     * so that the whole page it is located in remains scrollable, even when
     * swiping over the chart's body.
     *
     * User will need to tap the chart in order to activate its regular touch
     * functionality.
     *
     * The chart will remain "active" as long as user keeps interacting with the
     * chart. After `tapTimeout` milliseconds the chart will return to its
     * "protected" mode.
     *
     * @default false
     * @since 4.4.0
     * @param  value  Enable touch protection?
     * @see {@link https://www.amcharts.com/docs/v4/concepts/touch/} For more information.
     */
    set: function set(value) {
      if (this._tapToActivate != value) {
        this.setTapToActivate(value);
      }
    },
    enumerable: true,
    configurable: true
  });

  Container.prototype.setTapToActivate = function (value) {
    var _this = this;

    this._tapToActivate = value;
    this.interactions.isTouchProtected = value; // setEventDisposer will also remove listeners if value == false

    if (value) {
      this.interactions.setEventDisposer("container-tapToActivate", value, function () {
        return new _utils_Disposer__WEBPACK_IMPORTED_MODULE_3__.MultiDisposer([_this.events.on("hit", _this.handleTapToActivate, _this, false), _this.events.on("down", _this.initTapTimeout, _this, false), _this.events.on("track", _this.initTapTimeout, _this, false), //this.events.on("drag", this.initTapTimeout, this, false),
        (0,_interaction_Interaction__WEBPACK_IMPORTED_MODULE_5__.getInteraction)().body.events.on("down", function (ev) {
          if (!(0,_interaction_Interaction__WEBPACK_IMPORTED_MODULE_5__.getInteraction)().isLocalElement(ev.pointer, _this.paper.svg, _this.uid)) {
            _this.handleTapToActivateDeactivation();
          }
        }, _this, false)]);
      });
    }

    (0,_interaction_Interaction__WEBPACK_IMPORTED_MODULE_5__.getInteraction)();
  };
  /**
   * @todo Ignore on non-touch events
   */


  Container.prototype.handleTapToActivate = function () {
    this.interactions.isTouchProtected = false;
    this.initTapTimeout();
  };

  Container.prototype.handleTapToActivateDeactivation = function () {
    this.interactions.isTouchProtected = true;
  };

  Container.prototype.initTapTimeout = function () {
    var _this = this;

    if (this._tapToActivateTimeout) {
      this._tapToActivateTimeout.dispose();
    }

    if (this.tapToActivate && !this.interactions.isTouchProtected && this.tapTimeout) {
      this._tapToActivateTimeout = this.setTimeout(function () {
        _this.handleTapToActivateDeactivation();
      }, this.tapTimeout);
    }
  };
  /**
   * Moves the whole chart to other HTML container.
   *
   * `htmlElement` can either be a reference to a DOM element, or an id of
   * such element.
   *
   * @since 4.9.24
   * @param  htmlElement  Target element
   */


  Container.prototype.moveHtmlContainer = function (htmlElement) {
    var newContainer = _utils_DOM__WEBPACK_IMPORTED_MODULE_14__.getElement(htmlElement);

    if (newContainer) {
      this.htmlContainer = newContainer;
      var svgDiv = this.svgContainer;
      svgDiv.htmlElement = newContainer;
      svgDiv.htmlElement.appendChild(svgDiv.SVGContainer);
      svgDiv.initSensor();
      svgDiv.measure();
    } else if (_utils_Type__WEBPACK_IMPORTED_MODULE_13__.isString(htmlElement) && htmlElement != "") {
      _System__WEBPACK_IMPORTED_MODULE_15__.system.log("html container '" + htmlElement + "' not found"); //throw new Error("html container not found");
    }
  };
  /**
   * @ignore
   * @return Has license?
   */


  Container.prototype.hasLicense = function () {
    if (_Options__WEBPACK_IMPORTED_MODULE_16__.options.commercialLicense) {
      return true;
    }

    for (var i = 0; i < _Options__WEBPACK_IMPORTED_MODULE_16__.options.licenses.length; i++) {
      if (_Options__WEBPACK_IMPORTED_MODULE_16__.options.licenses[i].match(/^CH.{5,}/i)) {
        return true;
      }
    }

    return false;
  };

  return Container;
}(_Sprite__WEBPACK_IMPORTED_MODULE_0__.Sprite);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_Registry__WEBPACK_IMPORTED_MODULE_8__.registry.registeredClasses.Container = Container;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/DataItem.js":
/*!*********************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/DataItem.js ***!
  \*********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "DataItem": () => (/* binding */ DataItem)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Base */ "./node_modules/@amcharts/amcharts4/.internal/core/Base.js");
/* harmony import */ var _utils_Adapter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils/Adapter */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Adapter.js");
/* harmony import */ var _utils_Animation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils/Animation */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Animation.js");
/* harmony import */ var _utils_Utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils/Utils */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Utils.js");
/* harmony import */ var _utils_Array__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils/Array */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Array.js");
/* harmony import */ var _utils_Type__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/**
 * Defines functionality for "Data Item"
 *
 * A Data Item can be any object that can hold data. For example [[LineSeries]]
 * holds a number of values, that comprise a line graph. Each of those values
 * (data points) is a {DataItem}.
 *
 * Furthermore the [[LineSeries]] itself can be represented as a entry in the
 * legend. Since legend needs access to Line Series' value, a DataItem is
 * created for the series.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */





 //import * as $object from "./utils/Object";


/**
 * ============================================================================
 * DATA ITEM
 * ============================================================================
 * @hidden
 */

/**
 * DataItem represents single element in data, for example a data point in a
 * Serial Chart Series, e.g. a column.
 *
 * DataItem defines relationship between structured data, required for specific
 * chart type or task, and raw source data.
 *
 * It also implements required calculations, updates related visual elements,
 * etc.
 *
 * @todo Description
 * @important
 */

var DataItem =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_6__.__extends)(DataItem, _super);
  /**
   * Constructor
   * @todo Adding events to disposers produces errors in some cases, which means that chart is using disposed Data Items which is not right
   */


  function DataItem() {
    var _this = _super.call(this) || this;
    /**
     * This Data Item is currently disabled.
     *
     * @ignore Exclude from docs
     */


    _this._disabled = false;
    /**
     * Indicates whether Data Item has any properties set.
     *
     * If it does not have any, the code can use this property to check whether
     * they need to apply costly operation of re-applying properties, whenever
     * Data Item-related element is redrawn, e.g. series.
     */

    _this.hasProperties = false;
    /**
     * An object containing calculated values.
     */

    _this.values = {};
    /**
     * An object container current working values.
     */
    //public readonly workingValues: { [index: string]: { [index: string]: number } } = {};

    /**
     * An object containing categories.
     */

    _this.categories = {};
    /**
     * An object containing dates.
     */

    _this.dates = {};
    /**
     * An object containing locations for the Data Item.
     *
     * A location is a position within date or category, or, in some other cases,
     * where there is no single point but rather some period.
     *
     * @see {@link https://www.amcharts.com/docs/v4/concepts/series/#Data_item_locations} for info how data item locations work
     */

    _this.locations = {};
    /**
     * Current working locations.
     */

    _this.workingLocations = {};
    /**
     * An object containing Data Item specific appearance properties in key-value
     * pairs.
     *
     * Sometimes a single Data Item needs to apply different properties than the
     * rest of the data [[Series]] it is part of. E.g. a single column,
     * represented by a Data Item needs to be filled with a different color than
     * the reset of the [[ColumnSeries]] it belongs to.
     *
     * That's where Data Item's `properties` come into play.
     *
     * Please note that you should set Data Item-specific properties using
     * `setProperty()` method, rather than access `properties` object directly.
     */

    _this.properties = {};
    /**
     * A list of [[Sprite]] elements that are associated with this Data Item.
     *
     * E.g. an [[Axis]] Data Item has several separate elements associated with
     * it, like [[AxisTick]], [[AxisLabel]], and [[Grid]].
     *
     * Data Item keeps track of all of them, so it can toggle all related visual
     * elements when it itself is toggled.
     */

    _this.sprites = [];
    /**
     * Identifies if this object is a "template" and should not be treated as
     * real object that is drawn or actually used in the chart.
     */

    _this.isTemplate = false;
    /**
     * The current index within the dataItems
     *
     * @ignore Exclude from docs
     */

    _this._index = null;
    /**
     * Is Data Item currently visible?
     *
     * @ignore Exclude from docs
     */

    _this._visible = true;
    /**
     * Is Data Item currently hidden?
     *
     * @ignore Exclude from docs
     */

    _this._hidden = false;
    /**
     * Should this Data Item be used when calculating data ranges and scales?
     *
     * @ignore Exclude from docs
     */

    _this._ignoreMinMax = false;
    /**
     * Some of the Data Item's data fields may contain an array of children. This
     * property contains an object indicating which fields hold an array, so that
     * they can be processed properly.
     *
     * @ignore Exclude from docs
     */

    _this.hasChildren = {};
    /**
     * Indicates whether Data Item is currently animiting from visible to hidden
     * state.
     */

    _this.isHiding = false;
    /**
     *
     * @ignore Exclude from docs
     */

    _this._valueAnimations = {};
    /**
     *
     * @ignore Exclude from docs
     */

    _this._locationAnimations = {};
    _this.className = "DataItem";

    _this.applyTheme();

    return _this;
  }

  Object.defineProperty(DataItem.prototype, "adapter", {
    /**
     * Holds Adapter.
     */
    get: function get() {
      if (!this._adapterO) {
        this._adapterO = new _utils_Adapter__WEBPACK_IMPORTED_MODULE_1__.Adapter(this);
      }

      return this._adapterO;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(DataItem.prototype, "index", {
    /**
     * Data Item's position index in Component's data.
     *
     * @return Index
     */
    get: function get() {
      if (this.component) {
        if (this._index != null) {
          return this._index;
        } else {
          return -1;
        }
      } else {
        return -1;
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(DataItem.prototype, "animations", {
    /**
     * A list of [[Animations]] objects currently mutating Data Item's values.
     *
     * @return [description]
     */
    get: function get() {
      if (!this._animations) {
        this._animations = [];

        this._disposers.push(new _utils_Animation__WEBPACK_IMPORTED_MODULE_2__.AnimationDisposer(this._animations));
      }

      return this._animations;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(DataItem.prototype, "visible", {
    /**
     * Returns `true` if this Data Item is currently visible.
     *
     * @return Visible?
     */
    get: function get() {
      if (this._hidden) {
        return false;
      }

      return this._visible;
    },

    /**
     * Sets visibility of the Data Item.
     *
     * @param value Visible?
     */
    set: function set(value) {
      if (value) {
        this.hidden = false;
      }

      if (this._visible != value) {
        this.setVisibility(value);
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(DataItem.prototype, "hidden", {
    /**
     * Returns `true` if this Data Item is currently hidden.
     *
     * @return Hidden?
     */
    get: function get() {
      return this._hidden;
    },

    /**
     * Sets hidden flag for data item. Mostly used to initially hide data item.
     *
     * @param value Hidden?
     */
    set: function set(value) {
      if (this._hidden != value) {
        this._hidden = value;

        if (value) {
          this.setVisibility(false);
        } else {
          this.setVisibility(true, true);
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(DataItem.prototype, "__disabled", {
    /**
     * Is this Data Item currently disabled?
     *
     * @ignore Exclude from docs
     * @param {boolean}
     */
    get: function get() {
      return this._disabled;
    },

    /**
     * Disables all Sprites associated with this Data Item.
     *
     * @ignore Exclude from docs
     * @param {boolean}
     */
    set: function set(value) {
      //	if (this._disabled != value) { // not good
      this._disabled = value;
      _utils_Array__WEBPACK_IMPORTED_MODULE_4__.each(this.sprites, function (sprite) {
        sprite.__disabled = value;
      }); //	}
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Sets visibility of the Data Item.
   *
   * @param value Data Item
   */

  DataItem.prototype.setVisibility = function (value, noChangeValues) {
    _utils_Array__WEBPACK_IMPORTED_MODULE_4__.each(this.sprites, function (sprite) {
      if (value) {
        sprite.visible = sprite.defaultState.properties.visible;
      } else {
        if (sprite.hiddenState) {
          sprite.visible = sprite.hiddenState.properties.visible;
        } else {
          sprite.visible = false;
        }
      }
    });
    this._visible = value;

    if (this._eventDispatcher && !this.__disabled) {
      if (this.events.isEnabled("visibilitychanged")) {
        var event_1 = {
          type: "visibilitychanged",
          target: this,
          visible: value
        };
        this.events.dispatchImmediately("visibilitychanged", event_1);
      }
    }
  };
  /**
   * Shows the Data Item and related visual elements.
   *
   * @param duration  Animation duration (ms)
   * @param delay     Delay animation (ms)
   * @param fields    A list of fields to set values of
   */


  DataItem.prototype.show = function (duration, delay, fields) {
    var _this = this;

    if (!this.hidden) {
      this.setVisibility(true, true);
      this.isHiding = false;

      if (this._hideDisposer) {
        this.removeDispose(this._hideDisposer);
      }

      var animation_1;

      if (fields) {
        _utils_Array__WEBPACK_IMPORTED_MODULE_4__.each(fields, function (field) {
          animation_1 = _this.setWorkingValue(field, _this.values[field].value, duration, delay);
        });
      }

      _utils_Array__WEBPACK_IMPORTED_MODULE_4__.each(this.sprites, function (sprite) {
        var animation = sprite.show(duration);

        if (animation != null && !animation.isFinished()) {
          _this._disposers.push(animation);

          if (delay != null && delay > 0) {
            animation.delay(delay);
          }
        }
      });
      return animation_1;
    }
  };
  /**
   * Destroys this object and all related data.
   */


  DataItem.prototype.dispose = function () {
    _super.prototype.dispose.call(this);

    _utils_Array__WEBPACK_IMPORTED_MODULE_4__.each(this.sprites, function (sprite) {
      sprite.dispose();
    });
    this.sprites = [];
  };
  /**
   * Hides the Data Item and related visual elements.
   *
   * @param duration  Animation duration (ms)
   * @param delay     Delay animation (ms)
   * @param toValue   A value to set to `fields` when hiding
   * @param fields    A list of data fields to set value to `toValue`
   */


  DataItem.prototype.hide = function (duration, delay, toValue, fields) {
    var _this = this;

    this.isHiding = true;
    _utils_Array__WEBPACK_IMPORTED_MODULE_4__.each(this.sprites, function (sprite) {
      var animation = sprite.hide(duration);

      if (animation != null && !animation.isFinished()) {
        _this._disposers.push(animation);

        if (delay != null && delay > 0) {
          animation.delay(delay);
        }
      }
    });

    if (_utils_Type__WEBPACK_IMPORTED_MODULE_5__.isNumber(toValue) && fields) {
      var animation_2;
      _utils_Array__WEBPACK_IMPORTED_MODULE_4__.each(fields, function (field) {
        var anim = _this.setWorkingValue(field, toValue, duration, delay);

        if (anim) {
          animation_2 = anim;
        }
      });

      if (animation_2 && !animation_2.isFinished()) {
        this._hideDisposer = animation_2.events.on("animationended", function () {
          _this.setVisibility(false, true);

          _this.isHiding = false;
        });

        this._disposers.push(this._hideDisposer);

        return animation_2;
      } else {
        this.isHiding = false;
        this.setVisibility(false, true);
      }
    } else {
      this.isHiding = false;
      this.setVisibility(false);
    }
  };
  /**
   * Returns a duration (ms) the Data Item should take to animate from one
   * value to another.
   *
   * If the duration is not specified via parameter, this method will try to
   * request a default duration from the related `Component`.
   *
   * @param duration  Default duration (ms)
   * @return Duration (ms)
   */


  DataItem.prototype.getDuration = function (duration) {
    if (!_utils_Type__WEBPACK_IMPORTED_MODULE_5__.isNumber(duration)) {
      var component = this.component;

      if (component) {
        duration = component.interpolationDuration;
      }
    }

    if (duration != null) {
      if (!this._adapterO) {
        return duration;
      } else {
        return this._adapterO.apply("duration", duration);
      }
    }
  };
  /**
   * Returns a numeric value for specific data field.
   *
   * If `calculated` is not set, it will return a raw value, as it is in
   * source data.
   *
   * If `calculated` is set, it will return a pre-calculated specific value.
   *
   * @param name        Data field name
   * @param calculated  A calculated value name
   * @return Value
   */


  DataItem.prototype.getValue = function (name, calculated) {
    if (name && this.component) {
      if (!calculated) {
        calculated = this.component.dataFields[name + "Show"];

        if (!calculated) {
          calculated = "value";
        }
      }

      var value = this.values[name][calculated];

      if (this._adapterO && this._adapterO.isEnabled("value")) {
        return this._adapterO.apply("value", {
          value: value,
          field: name
        }).value;
      } else {
        return value;
      }
    }
  };
  /**
   * Returns a current working value for a specific data field.
   *
   * The actual value may differ from the one returned by `getValue()`. The
   * latter returns static values from the data source.
   *
   * `getWorkingValue()` returns current value, which is usually different if
   * Data Item is animating from one state to another.
   *
   * @param name        Data field name
   * @return Value
   */


  DataItem.prototype.getWorkingValue = function (name) {
    if (name && this.component) {
      var realName = this.component.dataFields[name + "Show"];

      if (!realName) {
        realName = "workingValue";
      }

      if (this._adapterO) {
        return this._adapterO.apply("workingValue", {
          workingValue: this.values[name][realName],
          field: name
        }).workingValue;
      } else {
        return this.values[name][realName];
      }
    }
  };
  /**
   * @ignore
   * @return Value
   */


  DataItem.prototype.getActualWorkingValue = function (name) {
    return this.values[name].workingValue;
  };
  /**
   * Sets a numeric value for specific data field.
   *
   * @param name        Data field name
   * @param value       Value
   * @param calculated  Calculated data field name
   * @param duration    Duration (ms) to animate to new value to
   * @param delay       Delay animation (ms)
   */


  DataItem.prototype.setValue = function (name, value, duration, delay) {
    var currentValue = this.values[name].value;
    var newDuration = this.getDuration(duration);
    value = _utils_Type__WEBPACK_IMPORTED_MODULE_5__.toNumber(value);

    if (currentValue !== value) {
      this.values[name].value = value;

      if (this._eventDispatcher && !this.__disabled) {
        if (this.events.isEnabled("valuechanged")) {
          var event_2 = {
            type: "valuechanged",
            target: this,
            property: name
          };
          this.events.dispatchImmediately("valuechanged", event_2);
        }
      }

      if (this.component) {
        this.component.handleDataItemValueChange(this, name);
      }
    }

    this.setWorkingValue(name, value, newDuration, delay);
  };

  DataItem.prototype.setCalculatedValue = function (name, value, calculated) {
    var currentValue = this.values[name][calculated];

    if (currentValue !== value && _utils_Type__WEBPACK_IMPORTED_MODULE_5__.isNumber(value)) {
      this.values[name][calculated] = value;

      if (this._eventDispatcher && !this.__disabled) {
        if (this.events.isEnabled("calculatedvaluechanged")) {
          var event_3 = {
            type: "calculatedvaluechanged",
            target: this,
            property: name
          };
          this.events.dispatchImmediately("calculatedvaluechanged", event_3);
        }
      }

      if (this.component) {
        this.component.handleDataItemCalculatedValueChange(this, name);
      }
    }
  };
  /**
   * Set current working numeric value for a specific data field.
   *
   * @param name        Data field name
   * @param value       Value
   * @param calculated  Calculated data field name
   * @param duration    Duration (ms) to animate to new value to
   * @param delay       Delay animation (ms)
   * @return An [[Animation]] object used for transition to new values
   */


  DataItem.prototype.setWorkingValue = function (name, value, duration, delay) {
    if (_utils_Type__WEBPACK_IMPORTED_MODULE_5__.isNumber(this.values[name].value)) {
      var newDuration = this.getDuration(duration);
      var workingValue = this.values[name].workingValue;

      if (newDuration != null && newDuration > 0 && _utils_Type__WEBPACK_IMPORTED_MODULE_5__.isNumber(workingValue) && this.component) {
        // sometimes NaN is passed, so only change this to != null if all cases of NaN are handled, otherwise animation won't stop
        if (workingValue != value) {
          var animation = this.animate({
            childObject: this.values[name],
            property: "workingValue",
            from: workingValue,
            to: value,
            dummyData: name
          }, newDuration, this.component.interpolationEasing);

          if (delay != null) {
            animation.delay(delay);
          }

          animation.events.on("animationstarted", this.handleInterpolationProgress, this);
          animation.events.on("animationprogress", this.handleInterpolationProgress, this);
          animation.events.on("animationended", this.handleInterpolationProgress, this);
          this._valueAnimations[name] = animation;
          return animation;
        } else {
          var valueAnimation = this._valueAnimations[name];

          if (valueAnimation) {
            valueAnimation.stop();
          }

          this.values[name].workingValue = value;
        }
      } else {
        var valueAnimation = this._valueAnimations[name];

        if (valueAnimation) {
          valueAnimation.stop();
        }

        this.values[name].workingValue = value;

        if (this._eventDispatcher && !this.__disabled) {
          if (this.events.isEnabled("workingvaluechanged")) {
            var event_4 = {
              type: "workingvaluechanged",
              target: this,
              property: name
            };
            this.events.dispatchImmediately("workingvaluechanged", event_4);
          }
        }

        if (this.component) {
          this.component.handleDataItemWorkingValueChange(this, name);
        }
      }
    }
  };
  /**
   * Sets a relative location for a data field.
   *
   * A location is always relative on a 0 to 1 scale, with 0 being beginning,
   * 0.5 middle and 1 end.
   *
   * @todo Rewiew description
   * @param name      Data field name
   * @param value     Location (0-1)
   * @param duration  Duration (ms) to animate to new value to
   * @param delay     Delay animation (ms)
   */


  DataItem.prototype.setLocation = function (name, value, duration, delay) {
    var currentLocation = this.locations[name];

    if (currentLocation !== value) {
      this.locations[name] = value;

      if (this._eventDispatcher && !this.__disabled) {
        if (this.events.isEnabled("locationchanged")) {
          var event_5 = {
            type: "locationchanged",
            target: this,
            property: name
          };
          this.events.dispatchImmediately("locationchanged", event_5);
        }
      }

      if (this.component) {
        this.component.handleDataItemValueChange(this, name); // correct
      }

      this.setWorkingLocation(name, value, duration, delay);
    }
  };
  /**
   * Sets a current working location for a data field.
   *
   * @todo Rewiew description
   * @param name      Data field name
   * @param value     Location (0-1)
   * @param duration  Duration (ms) to animate to new value to
   * @param delay     Delay animation (ms)
   */


  DataItem.prototype.setWorkingLocation = function (name, value, duration, delay) {
    var newDuration = this.getDuration(duration);
    var workingLocation = this.workingLocations[name];

    if (newDuration != null && newDuration > 0 && _utils_Type__WEBPACK_IMPORTED_MODULE_5__.isNumber(workingLocation) && this.component) {
      // sometimes NaN is passed, so only change this to != null if all cases of NaN are handled, otherwise animation won't stop
      if (workingLocation != value) {
        var animation = this.animate({
          childObject: this.workingLocations,
          property: name,
          from: workingLocation,
          to: value,
          dummyData: name
        }, newDuration, this.component.interpolationEasing);

        if (delay != null) {
          animation.delay(delay);
        }

        animation.events.on("animationstarted", this.handleInterpolationProgress, this);
        animation.events.on("animationprogress", this.handleInterpolationProgress, this);
        animation.events.on("animationended", this.handleInterpolationProgress, this);
        this._locationAnimations[name] = animation;
        return animation;
      } else {
        var locationAnimation = this._locationAnimations[name];

        if (locationAnimation) {
          locationAnimation.stop();
        }

        this.workingLocations[name] = value;
      }
    } else {
      var locationAnimation = this._locationAnimations[name];

      if (locationAnimation) {
        locationAnimation.stop();
      }

      this.workingLocations[name] = value;

      if (this._eventDispatcher && !this.__disabled) {
        if (this.events.isEnabled("workinglocationchanged")) {
          var event_6 = {
            type: "workinglocationchanged",
            target: this,
            property: name
          };
          this.events.dispatchImmediately("workinglocationchanged", event_6);
        }
      }

      if (this.component) {
        this.component.handleDataItemWorkingLocationChange(this, name);
      }
    }
  };
  /**
   * Sets Date value to a data field.
   *
   * @param name      Data field name
   * @param date      Date object
   * @param duration  Duration (ms) to animate to new value to
   */


  DataItem.prototype.setDate = function (name, date, duration) {
    if (!_utils_Type__WEBPACK_IMPORTED_MODULE_5__.isDate(date) && this.component) {
      date = this.component.dateFormatter.parse(date);
    }

    var currentDate = this.dates[name];

    if (currentDate !== date) {
      this.dates[name] = date;
      this.setValue(name, date.getTime(), duration);
    }
  };
  /**
   * Returns a Date value of the data field.
   *
   * @param name  Data field name
   * @return Date object
   */


  DataItem.prototype.getDate = function (name) {
    if (this._adapterO) {
      return this._adapterO.apply("date", {
        date: this.dates[name],
        field: name
      }).date;
    } else {
      return this.dates[name];
    }
  };
  /**
   * Sets a Data Item-specific visual properties to apply to related elements.
   *
   * @param name   Property name
   * @param value  Property value
   */


  DataItem.prototype.setProperty = function (name, value) {
    if (this.properties[name] !== value) {
      this.hasProperties = true;
      this.properties[name] = value;

      if (this._eventDispatcher && !this.__disabled) {
        if (this.events.isEnabled("propertychanged")) {
          var event_7 = {
            type: "propertychanged",
            target: this,
            property: name,
            value: value
          };
          this.events.dispatchImmediately("propertychanged", event_7);
        }
      }

      if (this.component) {
        this.component.handleDataItemPropertyChange(this, name);
      }
    }
  };
  /**
   * Sets a related category for this Data Item.
   *
   * @todo Review description
   * @param name   Data field name
   * @param value  Category
   */


  DataItem.prototype.setCategory = function (name, value) {
    if (!_utils_Type__WEBPACK_IMPORTED_MODULE_5__.isString(value)) {
      value = _utils_Type__WEBPACK_IMPORTED_MODULE_5__.castString(value);
    }

    if (this.categories[name] !== value) {
      this.categories[name] = value;
    }
  };
  /**
   * Clones the Data Item, including all related data.
   *
   * @return New Data Item clone
   */
  //public clone(cloneId?: string): this {
  //	let dataItem: this = super.clone(cloneId);
  //	dataItem.copyFrom(this);
  //	return dataItem;
  //}

  /**
   * Copies all properties and related data from different data item.
   *
   * @param object Source data item
   */


  DataItem.prototype.copyFrom = function (source) {
    _super.prototype.copyFrom.call(this, source);

    if (source.dataContext) {
      this.dataContext = _utils_Utils__WEBPACK_IMPORTED_MODULE_3__.copy(source.dataContext, {});
    }

    _utils_Utils__WEBPACK_IMPORTED_MODULE_3__.copyProperties(source.locations, this.locations);
    /*
    $utils.copyProperties(source.properties, this.properties);
    $utils.copyProperties(source.categories, this.categories);
    $utils.copyProperties(source.values, this.values);
    $utils.copyProperties(source.dates, this.dates);
      $object.each(source.values, (name, value) => {
        this.values[name] = $object.copy(value);
    });*/

    if (source._adapterO) {
      this.adapter.copyFrom(source._adapterO);
    } //this.events.copyFrom(source.events); // because copied in Base


    this.component = source.component;
  };

  Object.defineProperty(DataItem.prototype, "opacity", {
    /**
     * Sets opacity for all Data Item's related elements (Sprites).
     *
     * @param value Opacity (0-1)
     */
    set: function set(value) {
      _utils_Array__WEBPACK_IMPORTED_MODULE_4__.each(this.sprites, function (sprite) {
        sprite.opacity = value;
      });
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(DataItem.prototype, "ignoreMinMax", {
    /**
     * Exclude from min/max calculations?
     * @return Exclude from min/max calculations?
     */
    get: function get() {
      return this._ignoreMinMax;
    },

    /**
     * Sets whether this data point should not be included in the scale and
     * minimum/maximum calculations.
     *
     * E.g. some we may want to exclude a particular data point from influencing
     * [[ValueAxis]] scale.
     *
     * @param value  Exclude from min/max calculations?
     */
    set: function set(value) {
      this._ignoreMinMax = value;

      if (this._eventDispatcher && !this.__disabled) {
        if (this.events.isEnabled("propertychanged")) {
          var event_8 = {
            type: "propertychanged",
            target: this,
            property: "ignoreMinMax",
            value: value
          };
          this.events.dispatchImmediately("propertychanged", event_8);
        }
      }

      if (this.component) {
        this.component.handleDataItemPropertyChange(this, "ignoreMinMax");
      }
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Creates and starts an [[Animation]] to interpolate (morph) Data Item's
   * properties and/or values.
   *
   * @see {@link Animation}
   * @param animationOptions  Animation options
   * @param duration          Animation duration (ms)
   * @param easing            Easing function
   * @return Animation
   */

  DataItem.prototype.animate = function (animationOptions, duration, easing) {
    return new _utils_Animation__WEBPACK_IMPORTED_MODULE_2__.Animation(this, animationOptions, duration, easing).start();
  };
  /**
   * Handles intermediate steps when Data Item is interpolating (morphing) from
   * one value to another.
   *
   * @ignore Exclude from docs
   * @param event Event object
   */


  DataItem.prototype.handleInterpolationProgress = function (event) {
    var animation = event.target; // it's always only one options, no need cycle

    var animationOptions = animation.animationOptions[0];

    if (animationOptions) {
      if (this._eventDispatcher && !this.__disabled) {
        if (this.events.isEnabled("workingvaluechanged")) {
          var event_9 = {
            type: "workingvaluechanged",
            target: this,
            property: animationOptions.dummyData
          };
          this.events.dispatchImmediately("workingvaluechanged", event_9);
        }
      }

      if (this.component) {
        this.component.handleDataItemWorkingValueChange(this, animationOptions.dummyData);
      }
    }
  };
  /**
   * Checks whether Data Item has values set for all of the data fields,
   * supplied via argument.
   *
   * @ignore Exclude from docs
   * @param fields  Field list to check
   * @return Has values for all fields?
   */


  DataItem.prototype.hasValue = function (fields) {
    // todo: what about categories?
    for (var i = 0, len = fields.length; i < len; i++) {
      var values = this.values[fields[i]];

      if (!values || !_utils_Type__WEBPACK_IMPORTED_MODULE_5__.hasValue(values.value)) {
        return false;
      }
    }

    return true;
  };

  Object.defineProperty(DataItem.prototype, "depth", {
    /**
     * Depth of the Data Item.
     *
     * In nested data structures, like TreeMap, this indicates the level this
     * data point is at, in relation to the parent Data Item.
     *
     * @return Depth
     */
    get: function get() {
      if (!this.parent) {
        return 0;
      } else {
        return this.parent.depth + 1;
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(DataItem.prototype, "dataContext", {
    /**
     * Sets to a reference to an original object from Component's data.
     *
     * @return [description]
     */
    get: function get() {
      return this._dataContext;
    },

    /**
     * A reference to an original object in Component's data, that this Data Item
     * is derived from.
     *
     * @param value Original data object
     */
    set: function set(value) {
      this._dataContext = value;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * adds a sprite to dataItem.sprites array
   * @ignore
   */

  DataItem.prototype.addSprite = function (sprite) {
    if (sprite.dataItem && sprite.dataItem != this) {
      _utils_Array__WEBPACK_IMPORTED_MODULE_4__.remove(sprite.dataItem.sprites, sprite);
    }

    if (!this.visible) {
      sprite.hide(0);
    }

    if (this.isHiding) {
      sprite.hide();
    }

    this.sprites.push(sprite);
    sprite.dataItem = this;
  };

  return DataItem;
}(_Base__WEBPACK_IMPORTED_MODULE_0__.BaseObjectEvents);



/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/Options.js":
/*!********************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/Options.js ***!
  \********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "options": () => (/* binding */ options)
/* harmony export */ });
/**
 * Global options.
 */
var options = {
  verbose: true,
  commercialLicense: false,
  classNamePrefix: "amcharts-",
  autoSetClassName: false,
  minPolylineStep: 0.5,
  onlyShowOnViewport: false,
  queue: false,
  autoDispose: false,
  licenses: [],
  suppressErrors: false,
  suppressWarnings: false,
  animationsEnabled: true,
  nonce: "",
  deferredDelay: 100,
  disableHoverOnTransform: "never",
  pixelPerfectPrecision: 0
};

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js":
/*!*********************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/Registry.js ***!
  \*********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Registry": () => (/* binding */ Registry),
/* harmony export */   "is": () => (/* binding */ is),
/* harmony export */   "registry": () => (/* binding */ registry)
/* harmony export */ });
/* harmony import */ var _utils_EventDispatcher__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils/EventDispatcher */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/EventDispatcher.js");
/* harmony import */ var _utils_Dictionary__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils/Dictionary */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Dictionary.js");
/* harmony import */ var _utils_Cache__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils/Cache */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Cache.js");
/* harmony import */ var _utils_Type__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/* harmony import */ var _utils_String__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils/String */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/String.js");
/* harmony import */ var _utils_Array__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils/Array */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Array.js");






/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Registry is used to store miscellaneous system-wide information, like ids,
 * maps, themes, and registered classes.
 *
 * @ignore Exclude from docs
 */

var Registry =
/** @class */
function () {
  function Registry() {
    var _this = this;
    /**
     * Event dispacther.
     */


    this.events = new _utils_EventDispatcher__WEBPACK_IMPORTED_MODULE_0__.EventDispatcher();
    /**
     * All currently applied themes. All new chart instances created will
     * automatically inherit and retain System's themes.
     */

    this.themes = [];
    /**
     * List of all loaded available themes.
     *
     * Whenever a theme loads, it registers itself in System's `loadedThemes`
     * collection.
     */

    this.loadedThemes = {};
    /**
     * An indeternal counter used to generate unique IDs.
     *
     * @ignore Exclude from docs
     */

    this._uidCount = 0;
    /**
     * Keeps register of class references so that they can be instnatiated using
     * string key.
     *
     * @ignore Exclude from docs
     */

    this.registeredClasses = {};
    /**
     * Holds all generated placeholders.
     */

    this._placeholders = {};
    /**
     * A list of invalid(ated) [[Sprite]] objects that need to be re-validated
     * during next cycle.
     *
     * @ignore Exclude from docs
     */

    this.invalidSprites = {};
    /**
     * Components are added to this list when their data provider changes to
     * a new one or data is added/removed from their data provider.
     *
     * @ignore Exclude from docs
     */

    this.invalidDatas = {};
    /**
     * Components are added to this list when values of their raw data change.
     * Used when we want a smooth animation from one set of values to another.
     *
     * @ignore Exclude from docs
     */

    this.invalidRawDatas = [];
    /**
     * Components are added to this list when values of their data changes
     * (but not data provider itself).
     *
     * @ignore Exclude from docs
     */

    this.invalidDataItems = [];
    /**
     * Components are added to this list when their data range (selection) is
     * changed, e.g. zoomed.
     *
     * @ignore Exclude from docs
     */

    this.invalidDataRange = [];
    /**
     * A list of [[Sprite]] objects that have invalid(ated) positions, that need
     * to be recalculated.
     *
     * @ignore Exclude from docs
     */

    this.invalidPositions = {};
    /**
     * A list of [[Container]] objects with invalid(ated) layouts.
     *
     * @ignore Exclude from docs
     */

    this.invalidLayouts = {};
    /**
     * An array holding all active (non-disposed) top level elemens.
     *
     * When, for example, a new chart is created, its instance will be added to
     * this array, and will be removed when the chart is disposed.
     */

    this.baseSprites = [];
    /**
     * An UID-based map of base sprites (top-level charts).
     */

    this.baseSpritesByUid = {};
    /**
     * Queued charts (waiting for their turn) to initialize.
     *
     * @see {@link https://www.amcharts.com/docs/v4/concepts/performance/#Daisy_chaining_multiple_charts} for more information
     */

    this.queue = [];
    /**
     * An array of deferred charts that haven't been created yet.
     *
     * @see {@link https://www.amcharts.com/docs/v4/concepts/performance/#Deferred_daisy_chained_instantiation} for more information
     * @since 4.10.0
     */

    this.deferred = [];
    this.uid = this.getUniqueId();
    this.invalidSprites.noBase = [];
    this.invalidDatas.noBase = [];
    this.invalidLayouts.noBase = [];
    this.invalidPositions.noBase = []; // This is needed for Angular Universal SSR

    if (typeof addEventListener !== "undefined") {
      // This is needed to prevent charts from being cut off when printing
      addEventListener("beforeprint", function () {
        _utils_Array__WEBPACK_IMPORTED_MODULE_5__.each(_this.baseSprites, function (sprite) {
          var svg = sprite.paper.svg;
          svg.setAttribute("viewBox", "0 0 " + svg.clientWidth + " " + svg.clientHeight);
        });
      });
      addEventListener("afterprint", function () {
        _utils_Array__WEBPACK_IMPORTED_MODULE_5__.each(_this.baseSprites, function (sprite) {
          var svg = sprite.paper.svg;
          svg.removeAttribute("viewBox");
        });
      });
    }
  }
  /**
   * Generates a unique chart system-wide ID.
   *
   * @return Generated ID
   */


  Registry.prototype.getUniqueId = function () {
    var uid = this._uidCount;
    this._uidCount += 1;
    return "id-" + uid;
  };

  Object.defineProperty(Registry.prototype, "map", {
    /**
     * Returns a universal collection for mapping ids with objects.
     *
     * @ignore Exclude from docs
     * @return Map collection
     */
    get: function get() {
      if (!this._map) {
        this._map = new _utils_Dictionary__WEBPACK_IMPORTED_MODULE_1__.Dictionary();
      }

      return this._map;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Caches value in object's cache.
   *
   * @ignore Exclude from docs
   * @param key    Key
   * @param value  Value
   * @param ttl    TTL in seconds
   */

  Registry.prototype.setCache = function (key, value, ttl) {
    _utils_Cache__WEBPACK_IMPORTED_MODULE_2__.cache.set(this.uid, key, value, ttl);
  };
  /**
   * Retrieves cached value.
   *
   * @ignore Exclude from docs
   * @param key    Key
   * @param value  Value to return if cache is not available
   * @return Value
   */


  Registry.prototype.getCache = function (key, value) {
    if (value === void 0) {
      value = undefined;
    }

    return _utils_Cache__WEBPACK_IMPORTED_MODULE_2__.cache.get(this.uid, key, value);
  };
  /**
   * Dispatches an event using own event dispatcher. Will automatically
   * populate event data object with event type and target (this element).
   * It also checks if there are any handlers registered for this sepecific
   * event.
   *
   * @param eventType Event type (name)
   * @param data      Data to pass into event handler(s)
   */


  Registry.prototype.dispatch = function (eventType, data) {
    // @todo Implement proper type check
    if (this.events.isEnabled(eventType)) {
      if (data) {
        data.type = eventType;
        data.target = data.target || this;
        this.events.dispatch(eventType, {
          type: eventType,
          target: this
        });
      } else {
        this.events.dispatch(eventType, {
          type: eventType,
          target: this
        });
      }
    }
  };
  /**
   * Works like `dispatch`, except event is triggered immediately, without
   * waiting for the next frame cycle.
   *
   * @param eventType Event type (name)
   * @param data      Data to pass into event handler(s)
   */


  Registry.prototype.dispatchImmediately = function (eventType, data) {
    // @todo Implement proper type check
    if (this.events.isEnabled(eventType)) {
      if (data) {
        data.type = eventType;
        data.target = data.target || this;
        this.events.dispatchImmediately(eventType, data);
      } else {
        this.events.dispatchImmediately(eventType, {
          type: eventType,
          target: this
        });
      }
    }
  };
  /**
   * Returns a unique placeholder suitable for the key.
   *
   * @param key  Key
   * @return Random string to be used as placeholder
   */


  Registry.prototype.getPlaceholder = function (key) {
    if (_utils_Type__WEBPACK_IMPORTED_MODULE_3__.hasValue(this._placeholders[key])) {
      return this._placeholders[key];
    }

    this._placeholders[key] = "__amcharts_" + key + "_" + _utils_String__WEBPACK_IMPORTED_MODULE_4__.random(8) + "__";
    return this._placeholders[key];
  };
  /**
   * @ignore
   */


  Registry.prototype.addToInvalidComponents = function (component) {
    if (component.baseId) {
      _utils_Array__WEBPACK_IMPORTED_MODULE_5__.move(this.invalidDatas[component.baseId], component);
    } else {
      _utils_Array__WEBPACK_IMPORTED_MODULE_5__.move(this.invalidDatas["noBase"], component);
    }
  };
  /**
   * @ignore
   */


  Registry.prototype.removeFromInvalidComponents = function (component) {
    if (component.baseId) {
      _utils_Array__WEBPACK_IMPORTED_MODULE_5__.remove(this.invalidDatas[component.baseId], component);
    }

    _utils_Array__WEBPACK_IMPORTED_MODULE_5__.remove(this.invalidDatas["noBase"], component);
  };
  /**
   * @ignore
   */


  Registry.prototype.addToInvalidSprites = function (sprite) {
    if (sprite.baseId) {
      _utils_Array__WEBPACK_IMPORTED_MODULE_5__.add(this.invalidSprites[sprite.baseId], sprite);
    } else {
      _utils_Array__WEBPACK_IMPORTED_MODULE_5__.add(this.invalidSprites["noBase"], sprite);
    }
  };
  /**
   * @ignore
   */


  Registry.prototype.removeFromInvalidSprites = function (sprite) {
    if (sprite.baseId) {
      _utils_Array__WEBPACK_IMPORTED_MODULE_5__.remove(this.invalidSprites[sprite.baseId], sprite);
    }

    _utils_Array__WEBPACK_IMPORTED_MODULE_5__.remove(this.invalidSprites["noBase"], sprite);
  };
  /**
   * @ignore
   */


  Registry.prototype.addToInvalidPositions = function (sprite) {
    if (sprite.baseId) {
      _utils_Array__WEBPACK_IMPORTED_MODULE_5__.add(this.invalidPositions[sprite.baseId], sprite);
    } else {
      _utils_Array__WEBPACK_IMPORTED_MODULE_5__.add(this.invalidPositions["noBase"], sprite);
    }
  };
  /**
   * @ignore
   */


  Registry.prototype.removeFromInvalidPositions = function (sprite) {
    if (sprite.baseId) {
      _utils_Array__WEBPACK_IMPORTED_MODULE_5__.remove(this.invalidPositions[sprite.baseId], sprite);
    }

    _utils_Array__WEBPACK_IMPORTED_MODULE_5__.remove(this.invalidPositions["noBase"], sprite);
  };
  /**
   * @ignore
   */


  Registry.prototype.addToInvalidLayouts = function (sprite) {
    if (sprite.baseId) {
      _utils_Array__WEBPACK_IMPORTED_MODULE_5__.add(this.invalidLayouts[sprite.baseId], sprite);
    } else {
      _utils_Array__WEBPACK_IMPORTED_MODULE_5__.add(this.invalidLayouts["noBase"], sprite);
    }
  };
  /**
   * @ignore
   */


  Registry.prototype.removeFromInvalidLayouts = function (sprite) {
    if (sprite.baseId) {
      _utils_Array__WEBPACK_IMPORTED_MODULE_5__.remove(this.invalidLayouts[sprite.baseId], sprite);
    }

    _utils_Array__WEBPACK_IMPORTED_MODULE_5__.remove(this.invalidLayouts["noBase"], sprite);
  };

  return Registry;
}();


/**
 * A singleton global instance of [[Registry]].
 *
 * @ignore Exclude from docs
 */

var registry = new Registry();
/**
 * Returns `true` if object is an instance of the class. It's the same as `instanceof` except it doesn't need to import the class.
 *
 * @param object Object
 * @param name Class name
 * @return Is instance of class
 */

function is(object, name) {
  var x = registry.registeredClasses[name];
  return x != null && object instanceof x;
}

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/Sprite.js":
/*!*******************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/Sprite.js ***!
  \*******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Sprite": () => (/* binding */ Sprite),
/* harmony export */   "SpriteEventDispatcher": () => (/* reexport safe */ _SpriteEvents__WEBPACK_IMPORTED_MODULE_1__.SpriteEventDispatcher),
/* harmony export */   "visualProperties": () => (/* binding */ visualProperties)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _SpriteState__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./SpriteState */ "./node_modules/@amcharts/amcharts4/.internal/core/SpriteState.js");
/* harmony import */ var _SpriteEvents__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./SpriteEvents */ "./node_modules/@amcharts/amcharts4/.internal/core/SpriteEvents.js");
/* harmony import */ var _Base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Base */ "./node_modules/@amcharts/amcharts4/.internal/core/Base.js");
/* harmony import */ var _utils_Adapter__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils/Adapter */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Adapter.js");
/* harmony import */ var _utils_Dictionary__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils/Dictionary */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Dictionary.js");
/* harmony import */ var _utils_List__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils/List */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/List.js");
/* harmony import */ var _utils_Disposer__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./utils/Disposer */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Disposer.js");
/* harmony import */ var _utils_Animation__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./utils/Animation */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Animation.js");
/* harmony import */ var _rendering_Paper__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./rendering/Paper */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Paper.js");
/* harmony import */ var _Container__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Container */ "./node_modules/@amcharts/amcharts4/.internal/core/Container.js");
/* harmony import */ var _rendering_fills_Pattern__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./rendering/fills/Pattern */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/Pattern.js");
/* harmony import */ var _rendering_fills_LinearGradient__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./rendering/fills/LinearGradient */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/LinearGradient.js");
/* harmony import */ var _rendering_fills_RadialGradient__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./rendering/fills/RadialGradient */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/RadialGradient.js");
/* harmony import */ var _utils_Color__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./utils/Color */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Color.js");
/* harmony import */ var _interaction_Interaction__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./interaction/Interaction */ "./node_modules/@amcharts/amcharts4/.internal/core/interaction/Interaction.js");
/* harmony import */ var _interaction_Mouse__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./interaction/Mouse */ "./node_modules/@amcharts/amcharts4/.internal/core/interaction/Mouse.js");
/* harmony import */ var _Options__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./Options */ "./node_modules/@amcharts/amcharts4/.internal/core/Options.js");
/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _formatters_NumberFormatter__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./formatters/NumberFormatter */ "./node_modules/@amcharts/amcharts4/.internal/core/formatters/NumberFormatter.js");
/* harmony import */ var _formatters_DateFormatter__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./formatters/DateFormatter */ "./node_modules/@amcharts/amcharts4/.internal/core/formatters/DateFormatter.js");
/* harmony import */ var _formatters_DurationFormatter__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./formatters/DurationFormatter */ "./node_modules/@amcharts/amcharts4/.internal/core/formatters/DurationFormatter.js");
/* harmony import */ var _formatters_TextFormatter__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./formatters/TextFormatter */ "./node_modules/@amcharts/amcharts4/.internal/core/formatters/TextFormatter.js");
/* harmony import */ var _utils_Language__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./utils/Language */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Language.js");
/* harmony import */ var _export_Export__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./export/Export */ "./node_modules/@amcharts/amcharts4/.internal/core/export/Export.js");
/* harmony import */ var _utils_Utils__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./utils/Utils */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Utils.js");
/* harmony import */ var _utils_Math__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
/* harmony import */ var _utils_Strings__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./utils/Strings */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Strings.js");
/* harmony import */ var _utils_Array__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./utils/Array */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Array.js");
/* harmony import */ var _utils_Object__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./utils/Object */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Object.js");
/* harmony import */ var _utils_Type__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/* harmony import */ var _utils_Iterator__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./utils/Iterator */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Iterator.js");
/* harmony import */ var _System__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./System */ "./node_modules/@amcharts/amcharts4/.internal/core/System.js");
/* harmony import */ var _utils_Percent__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./utils/Percent */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Percent.js");
/**
 * This is the main class that encapsulates every object on the chart.
 *
 * If it's an element that is to be displayed on the screen at some point, its
 * class must extend [[Sprite]] class.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */



































/**
 * Defines list ofvisual properties
 */

var visualProperties = ["fill", "fillOpacity", "stroke", "strokeOpacity", "strokeWidth", "strokeDasharray", "strokeDashoffset", "strokeLinecap", "strokeLinejoin"]; // do not add opacity here, as it is used for showing/hiding

;
/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Sprite represents any displayable element.
 *
 * This is the main class that encapsulates every object on the chart.
 *
 * If it's an element that is to be displayed on the screen at some point, its
 * class must extend [[Sprite]] class.
 *
 * [[Sprite]] class represents the a hierarchical structure. Every object that
 * extends [[Sprite]] can have children, that would inherit their properties,
 * such as language, formatters, etc.
 *
 * @see {@link SpriteState}
 * @see {@link ISpriteEvents} for a list of available events
 * @see {@link ISpriteAdapters} for a list of available Adapters
 *
 * @todo Review child elements that need to go into `_disposers`
 * @important
 */

var Sprite =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_33__.__extends)(Sprite, _super);
  /**
   * Constructor:
   * * Creates initial node
   * * Sets default properties
   * * Creates required default states
   * * Inits accessibility
   */


  function Sprite() {
    var _this = // Init
    _super.call(this) || this;
    /**
     * Holds values for Sprite's properties.
     */


    _this.properties = {};
    /**
     * @ignore
     */

    _this._eventDispatcher = new _SpriteEvents__WEBPACK_IMPORTED_MODULE_1__.SpriteEventDispatcher(_this);
    /**
     * @ignore Exclude from docs
     * @todo Description
     */

    _this._bindings = {};
    /**
     * Holds indicator if this Sprite is a "template" to be used for creating
     * other Sprites from and should not be treated as full-fledged element.
     *
     * @ignore Exclude from docs
     */

    _this._isTemplate = false;
    _this._isPath = false;
    /**
     * Holds indicator whether this sprite was already initialized.
     *
     * @ignore Exclude from docs
     */

    _this._inited = false;
    /**
     * Holds indicator whether this sprite was already initialized and ready.
     *
     * @ignore Exclude from docs
     */

    _this._ready = false;
    /**
     * If `sprite.hide()` is called and we have "hidden" state and
     * `transitionDuration > 0`, we set `isHiding` flag to `true` in order to
     * avoid restarting animations in case `hide()` method is called multiple
     * times.
     */

    _this.isHiding = false;
    /**
     * If `sprite.hide()` is called, we set isHidden to true when sprite is hidden.
     * This was added becaus hidden state might have visibility set to true and so
     * there would not be possible to find out if a sprite is technically hidden or not.
     */

    _this._isHidden = false;
    /**
     * This property indicates if Sprite is currently being revealed from hidden
     * state. This is used to prevent multiple calls to `sprite.show()` to
     * restart reveal animation. (if enabled)
     */

    _this.isShowing = false;
    /**
     * Indicates if this element is a standalone instance. A "standalone
     * instance" means this is a autonomous object which maintains its own
     * set of controls like Preloader, Export, etc.
     *
     * @ignore Exclude from docs
     */

    _this.isStandaloneInstance = false;
    /**
     * Indicates if togglable Sprite is currently active (toggled on).
     *
     * @ignore Exclude from docs
     */

    _this._isActive = false;
    /**
     * A Sprite element to use as a mask for this Sprite.
     *
     * @ignore Exclude from docs
     */

    _this._mask = new _utils_Disposer__WEBPACK_IMPORTED_MODULE_6__.MutableValueDisposer();
    /**
     * @ignore Exclude from docs
     * @todo Description
     */

    _this._positionPrecision = 3;
    /**
     * An instance of [[Language]].
     *
     * @ignore Exclude from docs
     */

    _this._language = new _utils_Disposer__WEBPACK_IMPORTED_MODULE_6__.MutableValueDisposer();
    /**
     * Holds [[Export]] object.
     *
     * @ignore Exclude from docs
     */

    _this._exporting = new _utils_Disposer__WEBPACK_IMPORTED_MODULE_6__.MutableValueDisposer();
    /**
     * Should this Sprite be included when exporting?
     */

    _this._exportable = true;
    /**
     * Defines bounding box (square) for this element.
     *
     * @ignore Exclude from docs
     */

    _this._bbox = {
      x: 0,
      y: 0,
      width: 0,
      height: 0
    };
    /**
     * Indicates if this element is invalid and should be re-validated (redrawn).
     *
     * @ignore Exclude from docs
     */

    _this.invalid = false;
    /**
     * Indicates if this elements position is invalid and should be repositioned
     *
     * @ignore Exclude from docs
     */

    _this.positionInvalid = false;
    /**
     * A collection of key/value pairs that can be used to bind specific Sprite
     * properties to [[DataItem]].
     *
     * For example: `fill` property can be bound to `myCustomColor` field in
     * DataItem. The Sprite will automatically get the value for `fill` from its
     * DataItem.
     *
     * Can be set for each [[SpriteState]] individually to override default
     * bindings.
     *
     * @see {@link SpriteState}
     */

    _this.propertyFields = {};
    /**
     * Specifies if property changes on this object should be propagated to the
     * objects cloned from this object.
     *
     * This setting affects property changes *after* cloning, since at the moment
     * of cloning all of properties from source object are copied to the clone
     * anyway.
     *
     * @default false
     */

    _this.applyOnClones = false; // unrotated unscaled

    _this._measuredWidthSelf = 0;
    _this._measuredHeightSelf = 0; // read only, sprite extreme coordinates

    /**
     * @ignore
     */

    _this.maxLeft = 0;
    /**
     * @ignore
     */

    _this.maxRight = 0;
    /**
     * @ignore
     */

    _this.maxTop = 0;
    /**
     * @ignore
     */

    _this.maxBottom = 0; // not rotated and not scaled

    /**
     * @ignore
     */

    _this.maxLeftSelf = 0;
    /**
     * @ignore
     */

    _this.maxRightSelf = 0;
    /**
     * @ignore
     */

    _this.maxTopSelf = 0;
    /**
     * @ignore
     */

    _this.maxBottomSelf = 0;
    _this._isDragged = false;
    _this._isResized = false;
    /**
     * @deprecated Moved to [[SpriteProperties]]
     */

    _this._disabled = false;
    _this._internalDisabled = false;
    _this._updateDisabled = false;
    _this._internalDefaultsApplied = false;
    /**
     * Time in milliseconds after which rollout event happens when user rolls-out of the sprite. This helps to avoid flickering in some cases.
     */

    _this.rollOutDelay = 0;
    /**
     * This flag is set to `true` for the initial sprite you create and place
     * to the div so that we could clear all additional
     * sprites/containers when this sprite is disposed.
     *
     * @ignore
     */

    _this.isBaseSprite = false;
    /**
     * Indicates whether this sprite should be cloned when cloning its parent
     * container. We set this to `false` in those cases when a sprite is created
     * by the class, so that when cloning a duplicate sprite would not appear.
     */

    _this.shouldClone = true;
    /**
     * A read-only flag which indicates if a sprite has completed its initial
     * animation (if `showOnInit = true`).
     *
     * In case `showOnInit = false`, `appeared` is set to `true` on init.
     *
     * @readonly
     */

    _this.appeared = false;
    /**
     * [ex description]
     *
     * @todo Description
     * @ignore
     */

    _this.ex = 0;
    /**
     * [ey description]
     *
     * @todo Description
     * @ignore
     */

    _this.ey = 0;
    /**
     * Indicates if the sprite can be moved around when resizing it with two fingers (will only work if draggable = false)
     * @ignore
     */

    _this.dragWhileResize = false;
    /**
     *  @ignore
     */

    _this.measureFailed = false;
    /**
     * If this flag is set to true, calling show() will not reveal the sprite.
     *
     * @ignore
     */

    _this.preventShow = false;
    /**
     * When cloning a sprite, if the template has it's own tooltip assigned, this tooltip is also cloned by default.
     * This is not good for cpu and sometimes you might only need one single tooltip for all clones. Set this to false in order not to clone tooltip.
     */

    _this.cloneTooltip = true;
    _this.className = "Sprite";

    _this._disposers.push(_this._eventDispatcher); // Generate a unique ID


    _utils_Utils__WEBPACK_IMPORTED_MODULE_24__.used(_this.uid); // Create SVG group to hold everything in

    _this.group = _this.paper.addGroup("g"); // Set defaults
    // it is better to set defauls like this in order to save invaliation calls and events

    _this.setPropertyValue("scale", 1);

    _this.setPropertyValue("rotation", 0);

    _this.setPropertyValue("align", "none");

    _this.setPropertyValue("valign", "none");

    _this.setPropertyValue("pixelPerfect", false);

    _this.setPropertyValue("visible", true);

    _this.setPropertyValue("tooltipPosition", "fixed");

    _this.setPropertyValue("verticalCenter", "none");

    _this.setPropertyValue("horizontalCenter", "none");

    _this.setPropertyValue("tooltipX", (0,_utils_Percent__WEBPACK_IMPORTED_MODULE_32__.percent)(50));

    _this.setPropertyValue("tooltipX", (0,_utils_Percent__WEBPACK_IMPORTED_MODULE_32__.percent)(50));

    _this.setPropertyValue("marginTop", 0);

    _this.setPropertyValue("marginBottom", 0);

    _this.setPropertyValue("marginLeft", 0);

    _this.setPropertyValue("marginRight", 0);

    _this.setPropertyValue("dx", 0);

    _this.setPropertyValue("dy", 0);

    _this.setPropertyValue("paddingTop", 0);

    _this.setPropertyValue("paddingBottom", 0);

    _this.setPropertyValue("paddingRight", 0);

    _this.setPropertyValue("paddingLeft", 0);

    _this.setPropertyValue("togglable", false);

    _this.setPropertyValue("hidden", false);

    _this.setPropertyValue("urlTarget", "_self");

    _this.setPropertyValue("alwaysShowTooltip", false);

    _this.setPropertyValue("showTooltipOn", "hover");

    _this._prevMeasuredWidth = 0;
    _this._prevMeasuredHeight = 0;
    _this._measuredWidth = 0;
    _this._measuredHeight = 0;
    _this._isMeasured = true; // Invalidate the Sprite so that renderer knows it needs to be drawn

    _this.invalidate(); //this.states.create("default").properties.opacity = 1;
    // Apply the theme


    _this.applyTheme(); //this._disposers.push(this._clickable);
    // Decorate adapter with events so that we can apply its settings whenever
    // it is modified
    // @todo Think what to do here. We can't just apply the adapter value to
    // property since not all of those are for properties. Commented out for
    // now.

    /*this.adapter.events.on("inserted", (ev: any) => {
        (<any>this)[ev.newValue.key] = (<any>this)[ev.newValue.key];
    });
    this.adapter.events.on("removed", (ev: any) => {
        (<any>this)[ev.newValue.key] = (<any>this)[ev.newValue.key];
    });*/
    // Add disposable dependencies to `_disposers` so they are automatically
    // disposed of when this object is disposed


    _this._disposers.push(_this.events);

    _this._disposers.push(_this.group);

    _this._disposers.push(_this._mask);

    _this._disposers.push(_this._language);

    _this._disposers.push(_this._exporting); //this._disposers.push(this._parent);
    //this._disposers.push(this._modal);


    _this._disposers.push(new _utils_Disposer__WEBPACK_IMPORTED_MODULE_6__.Disposer(function () {
      _utils_Object__WEBPACK_IMPORTED_MODULE_28__.each(_this._bindings, function (key, value) {
        value.dispose();
      });
    }));

    _this.setPropertyValue("interactionsEnabled", true);

    return _this;
  }

  Object.defineProperty(Sprite.prototype, "events", {
    /**
     * Event dispatcher.
     *
     * @see {@link https://www.amcharts.com/docs/v4/concepts/event-listeners/} for more info about Events
     */
    get: function get() {
      return this._eventDispatcher;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "adapter", {
    /**
     * Holds Adapter.
     *
     * @see {@link https://www.amcharts.com/docs/v4/concepts/adapters/} for more info about Adapters
     */
    get: function get() {
      if (!this._adapterO) {
        this._adapterO = new _utils_Adapter__WEBPACK_IMPORTED_MODULE_3__.Adapter(this);
      }

      return this._adapterO;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * ==========================================================================
   * ELEMENT VALIDATION, INIT, AND DRAWING STUFF
   * ==========================================================================
   * @hidden
   */

  /**
   * Applies properties from all assigned themes.
   *
   * We do this here so that we can apply class names as well.
   *
   * @ignore Exclude from docs
   */

  Sprite.prototype.applyTheme = function () {
    _super.prototype.applyTheme.call(this);

    if (_Options__WEBPACK_IMPORTED_MODULE_16__.options.autoSetClassName) {
      this.setClassName();
    }
  };
  /**
   * Returns theme(s) used by this object either set explicitly on this
   * element, inherited from parent, or inherited from [[System]].
   *
   * @return An array of theme references
   */


  Sprite.prototype.getCurrentThemes = function () {
    var themes = this._themes;

    if (themes) {
      return themes;
    } else {
      var parent_1 = this._parent;

      if (parent_1) {
        return parent_1.getCurrentThemes();
      } else {
        return _Registry__WEBPACK_IMPORTED_MODULE_17__.registry.themes;
      }
    }
  };
  /**
   * Called just before element's validation, this function allows setting
   * defaults.
   *
   * @ignore Exclude from docs
   */


  Sprite.prototype.applyInternalDefaults = function () {
    // Nothing here, but extending classes might override this function
    // so that they can set their defaults
    this._internalDefaultsApplied = true;
  };
  /**
   * Invalidates element.
   *
   * Object will be redrawn during the next update cycle.
   *
   * Please note that in most cases elements will auto-invalidate when needed. If
   * everything works, DO NOT use this method. Use it only if some changes do
   * not take otherwise.
   */


  Sprite.prototype.invalidate = function () {
    if (this.disabled || this._isTemplate || this.__disabled) {
      return;
    } // We no longer reset this on each invalidate, so that they are applied
    // only once, and do not overwrite user-defined settings
    //this._internalDefaultsApplied = false;


    if (!this.invalid) {
      this.invalid = true;
      _Registry__WEBPACK_IMPORTED_MODULE_17__.registry.addToInvalidSprites(this);
      _System__WEBPACK_IMPORTED_MODULE_31__.system.requestFrame();
    }
  };
  /**
   * Validates element:
   * * Triggers events
   * * Redraws the element
   *
   * @ignore Exclude from docs
   */


  Sprite.prototype.validate = function () {
    this.dispatchImmediately("beforevalidated"); // prevents from drawing if topparent is 0x0

    /*
    let topParent = this.topParent;
      if (topParent) {
        if (!topParent.maxWidth || !topParent.maxHeight) {
            this._disposers.push(topParent.events.once("maxsizechanged", this.invalidate, this));
        }
    }*/
    // Set internal defaults

    if (!this._internalDefaultsApplied) {
      this.applyInternalDefaults();
    }

    this.beforeDraw();
    this.draw();
    this.invalid = false;
    _Registry__WEBPACK_IMPORTED_MODULE_17__.registry.removeFromInvalidSprites(this);
    this.afterDraw();
  };
  /**
   * Invalidates element's position.
   *
   * @ignore Exclude from docs
   */


  Sprite.prototype.invalidatePosition = function () {
    if (this.disabled || this._isTemplate) {
      return;
    }

    if (!this.positionInvalid) {
      this.positionInvalid = true;
      _Registry__WEBPACK_IMPORTED_MODULE_17__.registry.addToInvalidPositions(this);
      _System__WEBPACK_IMPORTED_MODULE_31__.system.requestFrame();
    }
  };
  /**
   * Transforms the element.
   *
   * @todo Description (review)
   * @ignore Exclude from docs
   */


  Sprite.prototype.validatePosition = function () {
    var pixelX = this.pixelX;
    var pixelY = this.pixelY;
    var dx = this.dx;
    var dy = this.dy;
    var x = pixelX + dx;
    var y = pixelY + dy;

    if (this._updateDisabled) {
      if (this._internalDisabled) {
        this.group.attr({
          "display": "none"
        });
      } else {
        if (!this.disabled) {
          this.removeSVGAttribute("display");
        }
      }

      this._updateDisabled = false;
    }

    var sizeChanged = this.measure(); //if (!this.invalid) {

    var prevGroupTransform = this.group.transformString;
    this.group.moveTo({
      x: x,
      y: y
    });
    this.group.rotation = this.rotation;

    if (this.nonScaling) {
      this.group.scale = this.scale / this.globalScale;
    } else {
      this.group.scale = this.scale;
    }

    if (prevGroupTransform != this.group.transformString || sizeChanged) {
      // not yet sure, this is to avoid many transforms=>container layout invalidation on initial buid
      if (prevGroupTransform == null) {
        this.dispatch("transformed");
      } else {
        this.dispatchImmediately("transformed");
      } // TODO clear existing positionchanged dispatches ?


      this.dispatch("positionchanged");

      if (this.showTooltipOn == "hit" || this.showTooltipOn == "always") {
        this.updateTooltipPosition();
      }
    } //}
    // it might happen that x and y changed again, so we only remove if they didn't


    if (pixelX + dx == x && pixelY + dy == y) {
      _Registry__WEBPACK_IMPORTED_MODULE_17__.registry.removeFromInvalidPositions(this);
      this.positionInvalid = false;
    }

    var maskRectangle = this._maskRectangle; // todo: verify this

    if (maskRectangle) {
      this._clipElement.moveTo({
        x: maskRectangle.x - pixelX,
        y: maskRectangle.y - pixelY
      });
    }
  };
  /**
   * A placeholder method that is called **before** element begins to be drawn.
   *
   * @ignore Exclude from docs
   */


  Sprite.prototype.beforeDraw = function () {};
  /**
   * A placeholder method that draws the element.
   *
   * @ignore Exclude from docs
   */


  Sprite.prototype.draw = function () {};
  /**
   * A placeholder method that is called **after** element finishes drawing
   * itself.
   *
   * @ignore Exclude from docs
   */


  Sprite.prototype.afterDraw = function () {
    var e_1, _a;

    if (this.isMeasured || this.horizontalCenter !== "none" || this.verticalCenter !== "none") {
      this.measureElement();
    } //this.applyMask();


    if (!this._inited) {
      if (this._adapterO) {
        try {
          // used to be applySVGAttrbutes here, this is more efficient
          for (var _b = (0,tslib__WEBPACK_IMPORTED_MODULE_33__.__values)(this._adapterO.keys()), _c = _b.next(); !_c.done; _c = _b.next()) {
            var key = _c.value;

            switch (key) {
              case "mask":
              case "fill":
              case "opacity":
              case "fillOpacity":
              case "stroke":
              case "strokeOpacity":
              case "strokeWidth":
              case "shapeRendering":
              case "strokeDasharray":
              case "strokeDashoffset":
              case "strokeLinecap":
              case "strokeLinejoin":
              case "textDecoration":
              case "fontSize":
              case "fontFamily":
              case "fontWeight":
                //case "focusable":
                //case "tabindex":
                //case "role":
                this[key] = this[key];
                break;
            }
          }
        } catch (e_1_1) {
          e_1 = {
            error: e_1_1
          };
        } finally {
          try {
            if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
          } finally {
            if (e_1) throw e_1.error;
          }
        }
      }

      this.applyFilters();
      this.visible = this.visible;
      this.interactionsEnabled = this.getPropertyValue("interactionsEnabled"); // can't use .interactionsEnabled as it get's parent's

      this._inited = true;

      if (!this.showOnInit) {
        this.appeared = true;
      }

      if (this.hidden) {
        this.hide(0);
      }

      this.applyMask();
      this.dispatch("validated");
      this.dispatch("inited");
      this.dispatchReady();
    } else {
      this.dispatch("validated");
    }

    if (this.showTooltipOn == "always") {
      if (this.visible && !this.disabled && !this.__disabled) {
        this.showTooltip();
      } else {
        this.hideTooltip(0);
      }
    }
  };
  /**
   * Dispatches `"ready"` event. Sprite dispatches it right after `"inited"` event.
   *
   * @ignore
   */


  Sprite.prototype.dispatchReady = function () {
    if (!this.isReady()) {
      this._ready = true;
      this.dispatch("ready");
    }
  };
  /**
   * Triggers a re-initialization of this element.
   *
   * Will result in complete redrawing of the element.
   *
   * @ignore Exclude from docs
   */


  Sprite.prototype.reinit = function () {
    this._inited = false;
    this.setState(this.defaultState);
    this.invalidate();
  };
  /**
   * Handles the situation where parent element is resized.
   *
   * @ignore Exclude from docs
   */


  Sprite.prototype.handleGlobalScale = function () {
    this.dispatch("globalscalechanged");

    if (this.nonScalingStroke) {
      this.strokeWidth = this.strokeWidth;
    }

    if (this.nonScaling) {
      this.validatePosition();
    }

    this.updateFilterScale();
  };
  /**
   * Updates filter properties which might depend on scale
   *
   * @ignore Exclude from docs
   */


  Sprite.prototype.updateFilterScale = function () {
    var _this = this;

    _utils_Iterator__WEBPACK_IMPORTED_MODULE_30__.each(this.filters.iterator(), function (filter) {
      filter.scale = _this.globalScale;
    });
  };
  /**
   * Removes itself from system's invalid lists.
   *
   * @ignore Exclude from docs
   */


  Sprite.prototype.removeFromInvalids = function () {
    _Registry__WEBPACK_IMPORTED_MODULE_17__.registry.removeFromInvalidSprites(this);
    _Registry__WEBPACK_IMPORTED_MODULE_17__.registry.removeFromInvalidPositions(this);
  };
  /**
   * Copies all parameters from another [[Sprite]].
   *
   * @param source Source Sprite
   */


  Sprite.prototype.copyFrom = function (source) {
    var _this = this;

    _super.prototype.copyFrom.call(this, source);

    this.isMeasured = source.isMeasured;
    this.states.copyFrom(source.states);

    if (source.filters.length > 0) {
      source.filters.each(function (filter) {
        _this.filters.push(filter.clone());
      });
    }

    if (source._adapterO) {
      this.adapter.copyFrom(source._adapterO);
    } //helps to avoid calling getter which creates instance


    if (source["_interaction"]) {
      this.interactions.copyFrom(source.interactions);
    }

    if (source["_plugins"]) {
      this.plugins.copyFrom(source.plugins);
    }

    this.configField = source.configField;
    this.applyOnClones = source.applyOnClones; // this.numberFormatter = source.numberFormatter; // todo: this creates loose number formatter and copies it to all clones. somehow we need to know if source had numberFormatter explicitly created and not just because a getter was called.
    //this.mask = source.mask; need to think about this, generally this causes a lot of problems

    this.disabled = source.disabled;
    this.virtualParent = source.virtualParent;
    this.exportable = source.exportable; //@todo: create tooltip if it's on source but not on this?
    //const tooltip = this._tooltip;
    //if (tooltip) {
    //	tooltip.copyFrom(source.tooltip);
    //}

    if (source._tooltip) {
      if (this._tooltip) {
        this._tooltip.copyFrom(source.tooltip);
      } else {
        if (source.cloneTooltip) {
          this.tooltip = source.tooltip.clone();
        } else {
          this._tooltip = source.tooltip;
        }
      }
    } //if ((<any>source)["_tooltip"] && !this._tooltip) {
    //	this._tooltip = (<any>source)["_tooltip"];
    //}


    this._showSystemTooltip = source.showSystemTooltip;
    _utils_Utils__WEBPACK_IMPORTED_MODULE_24__.copyProperties(source.propertyFields, this.propertyFields);
    _utils_Utils__WEBPACK_IMPORTED_MODULE_24__.copyProperties(source.properties, this);

    if (source.fillModifier) {
      this.fillModifier = source.fillModifier.clone();
    }

    if (source.strokeModifier) {
      this.strokeModifier = source.strokeModifier.clone();
    }

    if (source.focusFilter) {
      this.focusFilter = source.focusFilter.clone();
    }
  };
  /**
   * Destroys this object and all related data.
   */


  Sprite.prototype.dispose = function () {
    if (!this.isDisposed()) {
      if (this.showTooltipOn == "always" && this.tooltip) {
        this.tooltip.hide();
      }

      this.dispatchImmediately("beforedisposed");

      if (this.isBaseSprite) {
        if (this.htmlContainer) {
          while (this.htmlContainer.childNodes.length > 0) {
            this.htmlContainer.removeChild(this.htmlContainer.firstChild);
          }
        }

        this.isBaseSprite = false;
      }

      _super.prototype.dispose.call(this); // Clear adapters


      if (this._adapterO) {
        this._adapterO.clear();
      }

      if (this.applyOnClones) {
        if (this._clones) {
          for (var i = this._clones.length - 1; i >= 0; i--) {
            var clone = this._clones.getIndex(i);

            clone.dispose();
          }
        }
      }

      if (this._svgContainer) {
        this._svgContainer.dispose();
      }

      if (this._interactionDisposer) {
        this._interactionDisposer.dispose();

        this._interactionDisposer = undefined;
      }

      if (this._urlDisposer) {
        this._urlDisposer.dispose();
      }

      this.removeFromInvalids();

      if (this.element) {
        this.element.dispose();
      }

      if (this.group) {
        this.group.dispose();
      }

      if (this._numberFormatter) {
        this._numberFormatter.dispose();
      }

      if (this._focusFilter) {
        this._focusFilter.dispose();
      }

      var stroke = this.stroke;

      if (stroke && !(stroke instanceof _utils_Color__WEBPACK_IMPORTED_MODULE_13__.Color) && stroke.dispose) {
        if (this.clonedFrom && this.clonedFrom.stroke == stroke) {// do nothing
        } else {
          stroke.dispose();
        }
      } // TODO a bit hacky


      var fill = this.fill;

      if (fill && !(fill instanceof _utils_Color__WEBPACK_IMPORTED_MODULE_13__.Color) && fill.dispose) {
        if (this.clonedFrom && this.clonedFrom.fill == fill) {// do nothing
        } else {
          fill.dispose();
        }
      } // remove from map


      if (_utils_Type__WEBPACK_IMPORTED_MODULE_29__.hasValue(this.id)) {
        this.map.removeKey(this.id);
      }

      this.parent = undefined;

      if (this._filters) {
        while (this._filters.length > 0) {
          var filter = this._filters.getIndex(0);

          filter.dispose();

          this._filters.removeValue(filter);
        }
      }

      this._alwaysShowDisposers = undefined;
    }
  };

  Object.defineProperty(Sprite.prototype, "isTemplate", {
    /**
     * @ignore Exclude from docs
     * @return Is template?
     */
    get: function get() {
      return this._isTemplate;
    },

    /**
     * Indicates if this element is a "template".
     *
     * Template Sprites act only as a holders for config for other "real"
     * elements to be cloned from.
     *
     * Templates are treated differently, as they are not validated, redrawn, or
     * otherwise are processed.
     *
     * @ignore Exclude from docs
     * @param value Is template?
     */
    set: function set(value) {
      value = _utils_Type__WEBPACK_IMPORTED_MODULE_29__.toBoolean(value);

      if (this._isTemplate != value) {
        this._isTemplate = value;

        if (this instanceof _Container__WEBPACK_IMPORTED_MODULE_9__.Container) {
          _utils_Iterator__WEBPACK_IMPORTED_MODULE_30__.each(this.children.iterator(), function (child) {
            child.isTemplate = value;
          });
        }

        if (value) {
          this.parent = this._parent;
          this.removeFromInvalids();
        } else {
          this.invalidate();
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "showSystemTooltip", {
    /**
     * @return Show system tooltip?
     */
    get: function get() {
      if (!_utils_Type__WEBPACK_IMPORTED_MODULE_29__.hasValue(this._showSystemTooltip)) {
        if (this.virtualParent) {
          return this.virtualParent.showSystemTooltip;
        } else if (this._parent) {
          return this._parent.showSystemTooltip;
        } else {
          return false;
        }
      }

      return this._showSystemTooltip;
    },

    /**
     * Indicates whether the element should attempt to construct itself in a way
     * so that system tooltip is shown if its `readerTitle` is set.
     *
     * @param value Show system tooltip?
     */
    set: function set(value) {
      value = _utils_Type__WEBPACK_IMPORTED_MODULE_29__.toBoolean(value);

      if (this._showSystemTooltip != value) {
        this._showSystemTooltip = value;
        this.applyAccessibility();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "topParent", {
    /**
     * ==========================================================================
     * HIERARCHY AND STRUCTURE RELATED STUFF
     * ==========================================================================
     * @hidden
     */

    /**
     * Sprites's top-level [[Container]].
     *
     * Please note that in most cases it won't be the chart element.
     *
     * To access base chart element, use `baseSprite` instead.
     *
     * @return Top-level ascendant
     */
    get: function get() {
      if (this._topParent) {
        return this._topParent;
      } else {
        if (this._parent) {
          return this._parent.topParent;
        }
      }
    },

    /**
     * @ignore
     * @param value {Container} top parent of a sprite
     */
    set: function set(value) {
      this._topParent = value;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "parent", {
    /**
     * @return Parent container
     */
    get: function get() {
      return this._parent;
    },

    /**
     * Elements' parent [[Container]].
     *
     * @param parent  Parent container
     */
    set: function set(parent) {
      if (this._isTemplate) {
        return;
      } // TODO is this needed ?


      _utils_Utils__WEBPACK_IMPORTED_MODULE_24__.used(this.paper);
      var oldParent = this._parent;

      if (oldParent != parent) {
        if (oldParent) {
          oldParent.children.removeValue(this);
        }

        this._parent = parent;

        if (parent) {
          this.topParent = parent.topParent;

          if (parent.isTemplate) {
            this.isTemplate = true;
          }

          this.baseId = parent.baseId;
          parent.children.push(this); // insert handler at Container invalidates +  invalidatesLayout + adds to group

          if (this._tooltip && !this._tooltipContainer) {
            this._tooltip.parent = parent.tooltipContainer;
          }

          if (!this._dataItem) {
            this.dataItem = parent.dataItem;
          }

          this.handleAlwaysShowTooltip();

          if (this.dataItem) {
            // No need to apply accessibility if there's no data item
            // The whole reason of applying it here is to populate data
            // placesholders, and if tehre's no data item, it won't work anyway
            this.applyAccessibility();
          }

          this.dispatchImmediately("parentset");
        } else {
          this.topParent = undefined;
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  /**
   * @ignore
   */

  Sprite.prototype.handleAlwaysShow = function () {
    this.showTooltip();
  };
  /**
   * @ignore
   */


  Sprite.prototype.handleAlwaysShowTooltip = function () {
    var sprite = this;
    var oldDisposers = this._alwaysShowDisposers;

    if (oldDisposers) {
      _utils_Array__WEBPACK_IMPORTED_MODULE_27__.each(oldDisposers, function (oldDisposer) {
        oldDisposer.dispose();
      });
    }

    this._alwaysShowDisposers = [];

    if (this.showTooltipOn == "always") {
      while (sprite != undefined) {
        var disposer = sprite.events.on("visibilitychanged", this.handleAlwaysShow, this, false);
        this.addDisposer(disposer);

        this._alwaysShowDisposers.push(disposer);

        sprite = sprite.parent;
      }
    }
  };

  Object.defineProperty(Sprite.prototype, "virtualParent", {
    /**
     * @return Virtual parent
     */
    get: function get() {
      return this._virtualParent;
    },

    /**
     * Element's "virtual" parent.
     *
     * This is required in ordere to maintain proper inheritance (like
     * formatters).
     *
     * Sometimes an element is a "logical" parent, even though it's not a direct
     * ascendant.
     *
     * Example: a bullet is not a child of the axis, but it would make sense
     * for it to inherit series' formatters.
     *
     * @ignore Exclude from docs
     * @param value  Virtual parent
     */
    set: function set(value) {
      this._virtualParent = value;

      if (this.dataItem) {
        // No need to apply accessibility if there's no data item
        // The whole reason of applying it here is to populate data
        // placesholders, and if tehre's no data item, it won't work anyway
        this.applyAccessibility();
      }
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Moves `<defs>` to correct place in DOM.
   *
   * Some elements are initially created in "ghost" container. When moving
   * those into proper place in DOM, their respective `<defs>` need to be moved
   * as well.
   *
   * @ignore Exclude from docs
   */

  Sprite.prototype.appendDefs = function () {
    if (this.filterElement) {
      this.paper.appendDef(this.filterElement);
    }

    var fill = this.fill;

    if (fill && fill.element) {
      this.paper.appendDef(fill.element);
    }

    var stroke = this.stroke;

    if (stroke && stroke.element) {
      this.paper.appendDef(stroke.element);
    }

    if (this.fillModifier && this.fill instanceof _utils_Color__WEBPACK_IMPORTED_MODULE_13__.Color) {
      var fill_1 = this.fillModifier.modify(this.fill);

      if (fill_1 && fill_1.element) {
        this.paper.appendDef(fill_1.element);
      }
    }

    if (this.strokeModifier && this.stroke instanceof _utils_Color__WEBPACK_IMPORTED_MODULE_13__.Color) {
      var stroke_1 = this.strokeModifier.modify(this.stroke);

      if (stroke_1 && stroke_1.element) {
        this.paper.appendDef(stroke_1.element);
      }
    }

    if (this._clipPath) {
      this.paper.appendDef(this._clipPath);
    }

    if (this._exportable === false) {
      this.exportable = false;
    }
  };

  Object.defineProperty(Sprite.prototype, "map", {
    /**
     * Returns a [[Dictionary]] which maps object ids with their respective
     * objects.
     *
     * Can be used to retrieve any object by id, e.g.:
     *
     * ```TypeScript
     * console.log(mySprite.map.getKey("myid"));
     * ```
     * ```JavaScript
     * console.log(mySprite.map.getKey("myid"));
     * ```
     *
     * @return Map collection
     */
    get: function get() {
      var top = this.topParent;

      if (top) {
        return top.map;
      } else if (!this._map) {
        this._map = new _utils_Dictionary__WEBPACK_IMPORTED_MODULE_4__.Dictionary();
      }

      return this._map;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "delayedMap", {
    /**
     * @ignore
     * @return Map collection
     */
    get: function get() {
      var top = this.topParent;

      if (top) {
        return top.delayedMap;
      } else if (!this._delayedMap) {
        this._delayedMap = new _utils_Dictionary__WEBPACK_IMPORTED_MODULE_4__.Dictionary();
      }

      return this._delayedMap;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "id", {
    /**
     * @return ID
     */
    get: function get() {
      return this._id;
    },

    /**
     * Element's user-defined ID.
     *
     * Will throw an Error if there already is an object with the same ID.
     *
     * Please note that above check will be performed withing the scope of the
     * current chart instance. It will not do checks across other chart instances
     * or in globally in DOM.
     *
     * Make sure the IDs are unique.
     *
     * @param value ID
     */
    set: function set(value) {
      if (this._id != value) {
        this._id = value;

        if (this.map.hasKey(value)) {
          throw Error("Duplicate id (" + value + ") used on multiple objects.");
        } else {
          this.map.setKey(value, this);
        }

        if (_Options__WEBPACK_IMPORTED_MODULE_16__.options.autoSetClassName) {
          this.setClassName();
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "dom", {
    /**
     * ==========================================================================
     * ELEMENT AND DOM TREE MANIPULATION AND MEASURING
     * ==========================================================================
     * @hidden
     */

    /**
     * Returns DOM element reference associated with this element.
     *
     * @readonly
     * @return DOM element
     */
    get: function get() {
      return this.group.node;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "paper", {
    /**
     * @ignore Exclude from docs
     * @return Paper
     */
    get: function get() {
      if (this._paper) {
        return this._paper;
      } else {
        var parent_2 = this._parent;

        if (parent_2) {
          return parent_2.paper;
        }
      }

      return (0,_rendering_Paper__WEBPACK_IMPORTED_MODULE_8__.getGhostPaper)();
    },

    /**
     * A [[Paper]] instance to place elements on.
     *
     * If there's no Paper set for this element, it goes up the ascendant tree
     * until it finds one.
     *
     * This method is used by important `addChild()` method, so it's essential
     * to have a [[Paper]] instance.
     *
     * If this element has a separate `htmlContainer` set, it will have a
     * [[Paper]] instance itself.
     *
     * @ignore Exclude from docs
     * @param paper  Paper
     */
    set: function set(paper) {
      this.setPaper(paper);
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Sets [[Paper]] instance to use to draw elements.
   * @ignore
   * @param paper Paper
   * @return true if paper was changed, false, if it's the same
   */

  Sprite.prototype.setPaper = function (paper) {
    var oldPaper = this._paper;

    if (oldPaper != paper) {
      this._paper = paper;
      this.appendDefs();
      return true;
    }

    return false;
  };

  Object.defineProperty(Sprite.prototype, "htmlContainer", {
    /**
     * @return HTML element
     */
    get: function get() {
      if (this._htmlContainer) {
        return this._htmlContainer;
      } else {
        var parent_3 = this._parent;

        if (parent_3) {
          return parent_3.htmlContainer;
        }
      }
    },

    /**
     * An HTML element to be used when placing wrapper element (`<div>`)
     * for the whole chart.
     *
     * This is the same for **all** elements within the same chart.
     *
     * @param htmlContainer HTML element
     */
    set: function set(htmlContainer) {
      this._htmlContainer = htmlContainer;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "titleElement", {
    /**
     * Creates (if not yet created) and returns element's `<title>` element.
     *
     * @ignore Exclude from docs
     * @return Title element
     */
    get: function get() {
      if (!this._titleElement) {
        this._titleElement = this.paper.add("title");
        this.group.add(this._titleElement);
      }

      return this._titleElement;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "descriptionElement", {
    /**
     * Creates (if not yet created) and returns element's `<desc>` element.
     *
     * @ignore Exclude from docs
     * @return Desc element
     */
    get: function get() {
      if (!this._descriptionElement) {
        this._descriptionElement = this.paper.add("desc");
        this.group.add(this._descriptionElement);
      }

      return this._descriptionElement;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "filters", {
    /**
     * Returns list of SVG filters (effects) applied to element. If the filter
     * list is not yet initilized, creates and returns an empty one.
     * Note, not all filters combine well with one another. We recommend using one filter per sprite.
     *
     * @return List of filters
     */
    get: function get() {
      if (!this._filters) {
        this._filters = new _utils_List__WEBPACK_IMPORTED_MODULE_5__.List(); // TODO only add certain events ?

        this._disposers.push(this._filters.events.onAll(this.applyFilters, this));

        this._disposers.push(new _utils_List__WEBPACK_IMPORTED_MODULE_5__.ListDisposer(this._filters));
      }

      return this._filters;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Sets required SVG attributes. Must be called every time an element is
   * redrawn so that attributes are (re)applied.
   *
   * @ignore Exclude from docs
   */

  Sprite.prototype.setSVGAttributes = function () {
    this.fill = this.fill;
    this.opacity = this.opacity;
    this.fillOpacity = this.fillOpacity;
    this.stroke = this.stroke;
    this.strokeOpacity = this.strokeOpacity;
    this.shapeRendering = this.shapeRendering;
    this.strokeDasharray = this.strokeDasharray;
    this.strokeDashoffset = this.strokeDashoffset;
    this.strokeLinecap = this.strokeLinecap;
    this.strokeLinejoin = this.strokeLinejoin;
    this.focusable = this.focusable;
    this.tabindex = this.tabindex;
    this.role = this.role;
  };
  /**
   * Sets an attribute directly on an SVG element.
   *
   * @ignore Exclude from docs
   * @param attribute Attribute object
   */


  Sprite.prototype.setSVGAttribute = function (attribute) {
    this.group.attr(attribute);
  };
  /**
   * Removes an attribute directly from SVG element.
   *
   * @param attribute Attribute key to remove
   */


  Sprite.prototype.removeSVGAttribute = function (attribute) {
    this.group.removeAttr(attribute);
  };
  /**
   * Sets `class` attribute of the elements SVG node.
   *
   * Uses `am4core.options.classNamePrefix`.
   *
   * @ignore Exclude from docs
   */


  Sprite.prototype.setClassName = function () {
    var className = this.className;
    var classNamePrefix = _Options__WEBPACK_IMPORTED_MODULE_16__.options.classNamePrefix;

    if (this.element) {
      this.element.addClass(classNamePrefix + className);
    }

    this.group.addClass(classNamePrefix + className + "-group");

    if (_utils_Type__WEBPACK_IMPORTED_MODULE_29__.hasValue(this.id)) {
      this.group.addClass(classNamePrefix + this.id);
    }

    if (this.userClassName) {
      this.group.addClass(this.userClassName);
    }
  };
  /**
   * Adds an `id` attribute the the element and returns the id.
   *
   * @ignore Exclude from docs
   * @return Element's ID
   */


  Sprite.prototype.uidAttr = function () {
    this.setSVGAttribute({
      "id": this.uid
    });
    return this.uid;
  };
  /**
   * [updateClipPath description]
   *
   * @todo Description
   */


  Sprite.prototype.updateClipPath = function () {
    var element = this._clipElement;

    if (element) {
      element.moveTo({
        x: this.mask.pixelX,
        y: this.mask.pixelY
      });
    }
  };
  /**
   * @ignore
   */


  Sprite.prototype.createClipPath = function () {
    if (!this._clipPath) {
      this._clipPath = this.paper.addGroup("clipPath");
      this.paper.appendDef(this._clipPath);

      this._disposers.push(this._clipPath);

      var id = _Registry__WEBPACK_IMPORTED_MODULE_17__.registry.getUniqueId();

      this._clipPath.attr({
        "id": id
      });

      this.group.attr({
        "clip-path": "url(\"" + _utils_Utils__WEBPACK_IMPORTED_MODULE_24__.getBaseURI() + id + "\")"
      });
    }
  };
  /**
   * Applies the mask Sprite.
   *
   * @ignore Exclude from docs
   */


  Sprite.prototype.applyMask = function () {
    var mask = this.mask;

    if (this._clipPath && mask) {
      // Container
      if (mask instanceof _Container__WEBPACK_IMPORTED_MODULE_9__.Container) {
        this._clipElement.attr({
          "width": _utils_Math__WEBPACK_IMPORTED_MODULE_25__.max(0, mask.pixelWidth),
          "height": _utils_Math__WEBPACK_IMPORTED_MODULE_25__.max(0, mask.pixelHeight)
        });

        var point = _utils_Utils__WEBPACK_IMPORTED_MODULE_24__.spritePointToSprite({
          x: mask.pixelX,
          y: mask.pixelY
        }, mask.parent, this);
        this._clipPath.x = point.x;
        this._clipPath.y = point.y;
      } // Sprite
      else {
        if (mask.element && mask.element != this._clipElement) {
          this._clipElement = mask.element;

          this._clipPath.add(this._clipElement);
        }

        this._clipPath.scale = mask.scale;
        this._clipPath.x = mask.pixelX;
        this._clipPath.y = mask.pixelY;
        this._clipPath.rotation = mask.rotation;
      }
    }
  };
  /**
   * Applies filters to the element.
   *
   * @ignore Exclude from docs
   */


  Sprite.prototype.applyFilters = function () {
    var _this = this; // we create a separate filter for each sprite as otherwise it would be impossible to animate filter.
    // svg doesn't support multiple filters applied to one element, so we put all the primitives to one filterElement of a sprite.


    if (this._filters && this._filters.length > 0) {
      var width_1 = 100;
      var height_1 = 100;

      if (!this.filterElement) {
        this.filterElement = this.paper.addGroup("filter");

        this._disposers.push(this.filterElement);
      } else {
        this.filterElement.removeChildNodes();
      }

      this.paper.appendDef(this.filterElement);
      var id = "filter-" + this.uid;
      this.filterElement.attr({
        "id": id
      });
      _utils_Iterator__WEBPACK_IMPORTED_MODULE_30__.each(this.filters.iterator(), function (filter) {
        filter.sprite = _this;
        filter.paper = _this.paper;

        _this.filterElement.attr({
          filterUnits: filter.filterUnits
        });

        filter.appendPrimitives(_this.filterElement);

        if (filter.width > width_1) {
          width_1 = filter.width;
        }

        if (filter.height > height_1) {
          height_1 = filter.height;
        }

        filter.scale = _this.globalScale;
      });
      var w = width_1 + "%";
      var h = height_1 + "%";
      /* temporarily removed as it is breaking tooltips on Safari @todo come back to this
      if (this._measuredHeight <= 1) {
          h = height + "";
      }
        if (this._measuredWidth <= 1) {
          h = width + "";
      }*/

      this.filterElement.attr({
        "width": w,
        "height": h,
        "x": -(width_1 - 100) / 2 + "%",
        "y": -(height_1 - 100) / 2 + "%"
      });
      this.group.attr({
        "filter": "url(\"" + _utils_Utils__WEBPACK_IMPORTED_MODULE_24__.getBaseURI() + id + "\")"
      });
    } else if (this.filterElement) {
      this.group.removeAttr("filter");
      this.filterElement.removeChildNodes();
    }
  };
  /**
   * [removeClipPath description]
   *
   * @ignore Exclude from docs
   * @todo Description
   */


  Sprite.prototype.removeClipPath = function () {
    if (this._clipPath) {
      //this._clipPath.dispose();
      this.removeDispose(this._clipPath);
      this._clipPath = undefined;
    }
  };
  /**
   * [setElement description]
   *
   * @ignore
   * @todo Description
   * @param element [description]
   */


  Sprite.prototype.setElement = function (element) {
    this.element = element;
    this.setSVGAttributes();
    this.applyAccessibility();
  };

  Object.defineProperty(Sprite.prototype, "element", {
    /**
     * @return Element
     */
    get: function get() {
      return this._element;
    },

    /**
     * The main element for this Sprite, usually an SVG `<g>`.
     *
     * All other sub-elements are created in it.
     *
     * @param element  Element
     */
    set: function set(element) {
      // Destroy previous element if there was one before
      this.removeElement(); // Set new element

      this._element = element; // Add element to group
      // Since we are adding Element to group, which is already in the
      // `.disposers` it will be removed automatically when Sprite is disposed
      // of

      this.group.add(element);

      if (element.node instanceof SVGPathElement) {
        this._isPath = true;
      } // This is needed if someone is setting element not in draw method but
      // from outside


      if (!this.invalid) {
        this.validate();
      }

      if (_Options__WEBPACK_IMPORTED_MODULE_16__.options.autoSetClassName) {
        this.setClassName();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "svgContainer", {
    /**
     * HTML container (`<div>`) which is used to place chart's `<svg>` element
     * in.
     *
     * @return Container for chart elements
     */
    get: function get() {
      if (this._svgContainer) {
        return this._svgContainer;
      } else if (this._parent) {
        return this._parent.svgContainer;
      }
    },

    /**
     * Sets HTML container to add SVG and other chart elements to.
     *
     * @param svgContainer Container for chart elements
     */
    set: function set(svgContainer) {
      this._svgContainer = svgContainer;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Measures main element.
   *
   * Saves measurements into private `_bbox` property.
   *
   * @ignore Exclude from docs
   */

  Sprite.prototype.measureElement = function () {
    if (this.element) {
      if (this.definedBBox) {
        this._bbox = this.definedBBox;
      } else {
        var svgBBox = this.element.getBBox();
        this._bbox = {
          x: svgBBox.x,
          y: svgBBox.y,
          width: svgBBox.width,
          height: svgBBox.height
        };
      }
    }
  };
  /**
   * Positions element according its center settings.
   *
   * @todo Description (review)
   * @ignore Exclude from docs
   */


  Sprite.prototype.updateCenter = function () {
    if (this.element) {
      var prevElementTransform = this.element.transformString;
      var bbox = this.bbox;
      var ex = 0;
      var ey = 0;
      var elementX = bbox.x;
      var elementY = bbox.y;
      var elementWidth = bbox.width;
      var elementHeigth = bbox.height;
      var pixelPaddingLeft = this.pixelPaddingLeft;
      var pixelPaddingRight = this.pixelPaddingRight;
      var pixelPaddingTop = this.pixelPaddingTop;
      var pixelPaddingBottom = this.pixelPaddingBottom; // add padding to the measured size

      var measuredWidth = _utils_Math__WEBPACK_IMPORTED_MODULE_25__.max(elementWidth + pixelPaddingLeft + pixelPaddingRight, this.pixelWidth);
      var measuredHeight = _utils_Math__WEBPACK_IMPORTED_MODULE_25__.max(elementHeigth + pixelPaddingTop + pixelPaddingBottom, this.pixelHeight); // extremes

      var left = bbox.x;
      var right = bbox.x + measuredWidth;
      var top_1 = bbox.y;
      var bottom = bbox.y + measuredHeight;
      var horizontalCenter = this.horizontalCenter;
      var verticalCenter = this.verticalCenter;

      switch (horizontalCenter) {
        case "none":
          ex = elementX + pixelPaddingLeft;
          break;

        case "left":
          ex = pixelPaddingLeft;
          break;

        case "middle":
          ex = pixelPaddingLeft - (elementWidth + pixelPaddingRight + pixelPaddingLeft) / 2;
          break;

        case "right":
          ex = -pixelPaddingRight - elementWidth;
          break;
      }

      switch (verticalCenter) {
        case "none":
          ey = elementY + pixelPaddingTop;
          break;

        case "top":
          ey = pixelPaddingTop;
          break;

        case "middle":
          ey = pixelPaddingTop - (elementHeigth + pixelPaddingBottom + pixelPaddingTop) / 2;
          break;

        case "bottom":
          ey = -pixelPaddingBottom - elementHeigth;
          break;
      }

      this._measuredHeight = measuredHeight;
      this._measuredWidth = measuredWidth;
      var x = _utils_Math__WEBPACK_IMPORTED_MODULE_25__.round(ex - elementX, this._positionPrecision, true);
      var y = _utils_Math__WEBPACK_IMPORTED_MODULE_25__.round(ey - elementY, this._positionPrecision, true);
      this.ex = x - pixelPaddingLeft;
      this.ey = y - pixelPaddingTop;
      this.maxLeft = left + x - pixelPaddingLeft;
      this.maxRight = right + x - pixelPaddingLeft;
      this.maxTop = top_1 + y - pixelPaddingTop;
      this.maxBottom = bottom + y - pixelPaddingTop;

      if (this.pixelPerfect && _Options__WEBPACK_IMPORTED_MODULE_16__.options.pixelPerfectPrecision == 0) {
        x -= 0.5;
        y -= 0.5;
      }

      this.element.moveTo({
        x: x,
        y: y
      });

      if (prevElementTransform != this.element.transformString) {
        this.dispatchImmediately("transformed");
      }
    }
  };
  /**
   * Measures the whole element.
   *
   * Returns `true` if the size has changed from the last measurement.
   *
   * @ignore Exclude from docs
   * @return Did the size changed from the last measurement?
   */


  Sprite.prototype.measure = function () {
    this.updateCenter();
    var measuredWidth = this._measuredWidth;
    var measuredHeight = this._measuredHeight; // extremes

    var left = this.maxLeft;
    var right = this.maxRight;
    var top = this.maxTop;
    var bottom = this.maxBottom; // non-parent wise size

    this._measuredWidthSelf = measuredWidth;
    this._measuredHeightSelf = measuredHeight;
    var positionPrecision = this._positionPrecision;
    this.maxLeftSelf = this.maxLeft;
    this.maxRightSelf = this.maxRight;
    this.maxTopSelf = this.maxTop;
    this.maxBottomSelf = this.maxBottom; // if a sprite is rotated or scaled, calculate measured size after transformations

    if (this.rotation !== 0 || this.scale !== 1 || this.nonScaling) {
      // not good to handleGlobalScale here.
      if (this.nonScalingStroke) {
        this.strokeWidth = this.strokeWidth;
      }

      var svg = this.paper.svg;
      var matrix = svg.createSVGMatrix();
      var rotation = this.rotation;
      var scale = this.scale;

      if (this.nonScaling) {
        scale = this.scale / this.globalScale;
      }

      matrix.a = _utils_Math__WEBPACK_IMPORTED_MODULE_25__.cos(rotation) * scale;
      matrix.c = -_utils_Math__WEBPACK_IMPORTED_MODULE_25__.sin(rotation) * scale;
      matrix.e = 0;
      matrix.b = _utils_Math__WEBPACK_IMPORTED_MODULE_25__.sin(rotation) * scale;
      matrix.d = _utils_Math__WEBPACK_IMPORTED_MODULE_25__.cos(rotation) * scale;
      matrix.f = 0;
      var p1 = svg.createSVGPoint();
      p1.x = left;
      p1.y = top;
      var p2 = svg.createSVGPoint();
      p2.x = right;
      p2.y = top;
      var p3 = svg.createSVGPoint();
      p3.x = right;
      p3.y = bottom;
      var p4 = svg.createSVGPoint();
      p4.x = left;
      p4.y = bottom;
      var pt1 = p1.matrixTransform(matrix);
      var pt2 = p2.matrixTransform(matrix);
      var pt3 = p3.matrixTransform(matrix);
      var pt4 = p4.matrixTransform(matrix);
      left = Math.min(pt1.x, pt2.x, pt3.x, pt4.x);
      right = Math.max(pt1.x, pt2.x, pt3.x, pt4.x);
      top = Math.min(pt1.y, pt2.y, pt3.y, pt4.y);
      bottom = Math.max(pt1.y, pt2.y, pt3.y, pt4.y);
      measuredWidth = right - left;
      measuredHeight = bottom - top;
      this.maxLeft = _utils_Math__WEBPACK_IMPORTED_MODULE_25__.round(left, positionPrecision, true);
      this.maxRight = _utils_Math__WEBPACK_IMPORTED_MODULE_25__.round(right, positionPrecision, true);
      this.maxTop = _utils_Math__WEBPACK_IMPORTED_MODULE_25__.round(top, positionPrecision, true);
      this.maxBottom = _utils_Math__WEBPACK_IMPORTED_MODULE_25__.round(bottom, positionPrecision, true);
    }

    this._measuredWidth = _utils_Math__WEBPACK_IMPORTED_MODULE_25__.round(measuredWidth, positionPrecision, true);
    this._measuredHeight = _utils_Math__WEBPACK_IMPORTED_MODULE_25__.round(measuredHeight, positionPrecision, true); // dispatch event

    if (this._measuredWidth != this._prevMeasuredWidth || this._measuredHeight != this._prevMeasuredHeight) {
      this._prevMeasuredHeight = this._measuredHeight;
      this._prevMeasuredWidth = this._measuredWidth; // TODO clear existing sizechanged dispatches ?

      this.dispatch("sizechanged");

      if ((this.isHover || this.showTooltipOn == "hit" || this.showTooltipOn == "always") && this.tooltip && this.tooltip.visible && (_utils_Type__WEBPACK_IMPORTED_MODULE_29__.hasValue(this.tooltipText) || _utils_Type__WEBPACK_IMPORTED_MODULE_29__.hasValue(this.tooltipHTML))) {
        this.updateTooltipPosition();
      }

      return true;
    }

    return false;
  };
  /**
   * Insert this element before sibling element.
   *
   * @param sprite  Target element
   * @return This element
   */


  Sprite.prototype.insertBefore = function (sprite) {
    var parent = this._parent;

    if (parent) {
      var index = parent.children.indexOf(sprite);

      if (index !== -1) {
        parent.children.moveValue(this, index);
        parent.sortChildren();
      }
    }

    return this;
  };
  /**
   * Insert this element after sibling element.
   *
   * @param sprite  Target element
   * @return This element
   */


  Sprite.prototype.insertAfter = function (sprite) {
    var parent = this._parent;

    if (parent) {
      var index = parent.children.indexOf(sprite);

      if (index !== -1) {
        parent.children.moveValue(this, index + 1);
        parent.sortChildren();
      }
    }

    return this;
  };
  /**
   * Removes the main SVG element.
   *
   * This does not destroy the whole Sprite element. To do that use
   * `dispose()` instead.
   *
   * @ignore Exclude from docs
   */


  Sprite.prototype.removeElement = function () {
    // remove visual element
    if (this._element) {
      this.removeDispose(this._element);
      this._element = undefined;
    }
  };
  /**
   * Returns relative (percent) value of the X coordindate within this element.
   *
   * A relative value is a hundredth of a percent. So 100% would result in a 1
   * as relative value.
   *
   * @param value  Absolute or relative X coordinate
   * @return Relative value
   */


  Sprite.prototype.getRelativeX = function (value) {
    if (value instanceof _utils_Percent__WEBPACK_IMPORTED_MODULE_32__.Percent) {
      return value.value;
    } else if (this._parent) {
      return value / this._parent.innerWidth;
    }

    return 0;
  };
  /**
   * Returns relative (percent) value of the Y coordindate within this element.
   *
   * A relative value is a hundredth of a percent. So 100% would result in a 1
   * as relative value.
   *
   * @param value  Absolute or relative Y coordinate
   * @return Relative value
   */


  Sprite.prototype.getRelativeY = function (value) {
    if (value instanceof _utils_Percent__WEBPACK_IMPORTED_MODULE_32__.Percent) {
      return value.value;
    } else if (this._parent) {
      return value / this._parent.innerHeight;
    }

    return 0;
  };
  /**
   * Returns an X coordinate in pixel within the element.
   *
   * If number is passed in as parameter, the same number will be returned
   * back.
   *
   * If [[Percent]] is passed in, it will be recalculated to pixels.
   *
   * @param value  Absolute or relative X coordinate
   * @return X coordinate in pixels
   */


  Sprite.prototype.getPixelX = function (value) {
    // we don't use $utils.valueToRelative as this would mean that we should access parent.innerWidth
    // all the time and this would result chain of the same actions and will slow down the system a lot
    var pixel = 0;

    if (_utils_Type__WEBPACK_IMPORTED_MODULE_29__.isNumber(value)) {
      pixel = value;
    } else if (value instanceof _utils_Percent__WEBPACK_IMPORTED_MODULE_32__.Percent) {
      var relative = value.value;

      if (this._parent) {
        pixel = _utils_Math__WEBPACK_IMPORTED_MODULE_25__.round(this._parent.innerWidth * relative, this._positionPrecision, true);
      }
    }

    return pixel;
  };
  /**
   * Returns an Y coordinate in pixel within the element.
   *
   * If number is passed in as parameter, the same number will be returned
   * back.
   *
   * If [[Percent]] is passed in, it will be recalculated to pixels.
   *
   * @param value  Absolute or relative Y coordinate
   * @return Y coordinate in pixels
   */


  Sprite.prototype.getPixelY = function (value) {
    // we don't use $utils.valueToRelative as this would mean that we should access parent.innerWidth
    // all the time and this would result chain of the same actions and will slow down the system a lot
    var pixel = 0;

    if (_utils_Type__WEBPACK_IMPORTED_MODULE_29__.isNumber(value)) {
      pixel = value;
    } else if (value instanceof _utils_Percent__WEBPACK_IMPORTED_MODULE_32__.Percent) {
      var relative = value.value;

      if (this._parent) {
        pixel = _utils_Math__WEBPACK_IMPORTED_MODULE_25__.round(this._parent.innerHeight * relative, this._positionPrecision, true);
      }
    }

    return pixel;
  };
  /**
   * Moves the element to a specified coordinates.
   *
   * Using this method is preferred method of moving element, as it saves some
   * CPU processing power over setting `x` and `y` properties separately.
   *
   * The method respects element's center settings. The element will be
   * positioned so that `point` coordinates come in whatever "center" of the
   * element is, as set in `horizontalCenter` and `verticalCenter`.
   *
   * Besides moving the element, you can also at the same time scale and
   * rotate the element.
   *
   * @param point     New coordinates
   * @param rotation  New rotation
   * @param scale     New Scale
   */


  Sprite.prototype.moveTo = function (point, rotation, scale, isDragged) {
    if (this.isDragged && !isDragged) {
      return;
    }

    if (point) {
      if (_utils_Type__WEBPACK_IMPORTED_MODULE_29__.isNumber(point.x)) {
        this.setPropertyValue("x", _utils_Math__WEBPACK_IMPORTED_MODULE_25__.round(point.x, this._positionPrecision, true));
      }

      if (_utils_Type__WEBPACK_IMPORTED_MODULE_29__.isNumber(point.y)) {
        this.setPropertyValue("y", _utils_Math__WEBPACK_IMPORTED_MODULE_25__.round(point.y, this._positionPrecision, true));
      }
    }

    if (_utils_Type__WEBPACK_IMPORTED_MODULE_29__.isNumber(rotation)) {
      this.rotation = rotation;
    }

    if (_utils_Type__WEBPACK_IMPORTED_MODULE_29__.isNumber(scale)) {
      this.scale = scale;
    } // must leave this


    this.invalidatePosition();
  };

  Object.defineProperty(Sprite.prototype, "mask", {
    /**
     * Returns [[Sprite]] element currently used as mask for this element.
     *
     * @ignore Exclude from docs
     * @return A [[Sprite]] to use as mask
     */
    get: function get() {
      if (!this._adapterO) {
        return this._mask.get();
      } else {
        return this._adapterO.apply("mask", this._mask.get());
      }
    },

    /**
     * Sets another [[Sprite]] element as this elements mask.
     *
     * @ignore Exclude from docs
     * @param mask A [[Sprite]] to use as mask
     */
    set: function set(mask) {
      var _this = this;

      if (this._mask.get() !== mask) {
        // this is good
        if (mask) {
          this.createClipPath();

          if (!(mask instanceof _Container__WEBPACK_IMPORTED_MODULE_9__.Container)) {
            mask.isMeasured = false;

            if (mask.element) {
              this._clipElement = mask.element;
            }
          } else {
            this._clipElement = this.paper.add("rect");
          }

          if (this._clipElement) {
            this._clipPath.add(this._clipElement);
          }

          this._mask.set(mask, new _utils_Disposer__WEBPACK_IMPORTED_MODULE_6__.MultiDisposer([//mask.addEventListener(SpriteEvent.TRANSFORMED, this.applyMask, false, this);
          mask.events.on("maxsizechanged", function () {
            if (_this.inited) {
              _this.applyMask();
            }
          }, undefined, false), mask.events.on("validated", this.applyMask, this, false), mask.events.on("positionchanged", this.applyMask, this, false)]));

          this.applyMask();
        } else {
          this._mask.reset();

          this.group.removeAttr("clip-path");
          this.removeClipPath();
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "maskRectangle", {
    /**
     * @ignore Exclude from docs
     * @return Mask Rectangle
     */
    get: function get() {
      return this._maskRectangle;
    },
    // you can set IRectangle as a mask instead o a sprite. Note, the changes of the object won't be monitored

    /**
     * Instead of creating a [[Sprite]] for mask, you can just use a
     * [[Rectangle]] by setting this accessor.
     *
     * Please note that the element will not monitor any changes to the mask
     * rectangle.
     *
     * @ignore Exclude from docs
     * @param rect Mask Rectangle
     */
    set: function set(rect) {
      if (rect) {
        this.createClipPath();

        if (!this._clipElement) {
          this._clipElement = this.paper.add("rect");

          this._clipPath.add(this._clipElement);
        }

        this._clipElement.attr({
          "width": rect.width,
          "height": rect.height
        });
      } else {
        this.removeClipPath();
        this._clipElement = undefined;
      }

      this._maskRectangle = rect;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "isMeasured", {
    /**
     * @ignore Exclude from docs
     * @return Was element already measured?
     */
    get: function get() {
      return this._isMeasured;
    },

    /**
     * Indicates if this element was already measured.
     *
     * @ignore Exclude from docs
     * @param value Was element already measured?
     */
    set: function set(value) {
      value = _utils_Type__WEBPACK_IMPORTED_MODULE_29__.toBoolean(value);

      if (!value) {
        this._measuredWidth = 0;
        this._measuredHeight = 0; //this._pixelHeight = 0;
        //this._pixelWidth = 0;
      }

      if (this._isMeasured != value) {
        this._isMeasured = value;
        this.invalidatePosition();
      }
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Checks if the this element has any of its parts overlapping with another
   * element.
   *
   * @todo Description (review)
   * @param sprite  Second element to test again
   * @return Overlapping?
   */

  Sprite.prototype.hitTest = function (sprite) {
    // validate, otherwise we will not know measuredWidth and measuredHeight
    if (this.invalid) {
      this.validate();
    }

    if (sprite.invalid) {
      sprite.validate();
    }

    var ax1 = this.pixelX + this.maxLeft;
    var ay1 = this.pixelY + this.maxTop;
    var ax2 = ax1 + this.maxRight;
    var ay2 = ay1 + this.maxBottom;
    var bx1 = sprite.pixelX + sprite.maxLeft;
    var by1 = sprite.pixelY + sprite.maxTop;
    var bx2 = bx1 + sprite.maxRight;
    var by2 = by1 + sprite.maxBottom;
    return !(bx1 > ax2 || bx2 < ax1 || by1 > ay2 || by2 < ay1);
  };

  Object.defineProperty(Sprite.prototype, "inited", {
    /**
     * ==========================================================================
     * STATE-RELATED
     * ==========================================================================
     * @hidden
     */

    /**
     * Returns `true` if Sprite has already finished initializing.
     *
     * @return Initialized?
     */
    get: function get() {
      return this._inited;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Returns `true` if Sprite has already finished initializing and is ready.
   *
   * If this object is a [[Container]] it will wait for all of its children
   * are ready before becoming ready itself and firing a `"ready"` event.
   *
   * @return is ready?
   */

  Sprite.prototype.isReady = function () {
    return this._ready;
  };

  Object.defineProperty(Sprite.prototype, "states", {
    /**
     * Returns a collection of element's available [[SpriteState]] entries.
     *
     * @see {@link SpriteState}
     * @return States
     */
    get: function get() {
      if (!this._states) {
        var state = new _SpriteState__WEBPACK_IMPORTED_MODULE_0__.SpriteState(); // works

        this._states = new _utils_Dictionary__WEBPACK_IMPORTED_MODULE_4__.DictionaryTemplate(state); // TODO what about removeKey ?

        this._disposers.push(this._states.events.on("insertKey", this.processState, this, false));

        this._disposers.push(this._states.events.on("setKey", this.processState, this, false));

        this._disposers.push(new _utils_Dictionary__WEBPACK_IMPORTED_MODULE_4__.DictionaryDisposer(this._states));

        this._disposers.push(state);
      }

      return this._states;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "hiddenState", {
    /**
     * Returns a [[SpriteState]] object for "hidden" state.
     *
     * This is a shortcut to `this.states.getKey("hidden")`.
     *
     * @return Hidden state
     */
    get: function get() {
      if (!this.states.getKey("hidden")) {
        var hiddenState = this.states.create("hidden");
        hiddenState.properties.opacity = 0;
        hiddenState.properties.visible = false;
      }

      return this.states.getKey("hidden");
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "defaultState", {
    /**
     * Returns a [[SpriteState]] object for "default" state.
     *
     * This is a shortcut to `this.states.getKey("default")`.
     *
     * @return Hidden state
     */
    get: function get() {
      if (!this.states.getKey("default")) {
        var defaultState = this.states.create("default");
        defaultState.properties.opacity = 1;
      }

      return this.states.getKey("default");
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Checks if some key states are defined and updates Sprite properties
   * accordingly.
   *
   * For example if there's a state "down" defined for Sprite, we automatically
   * make it "clickable".
   *
   * @ignore Exclude from docs
   * @param event An event which caused state list update
   */

  Sprite.prototype.processState = function (event) {
    var state = event.newValue;
    state.sprite = this;
    state.name = event.key;

    if (this.states.hasKey("hover") || this.showTooltipOn == "hover" && (_utils_Type__WEBPACK_IMPORTED_MODULE_29__.hasValue(this.tooltipHTML) || _utils_Type__WEBPACK_IMPORTED_MODULE_29__.hasValue(this.tooltipText))) {
      this.hoverable = true;
    }

    if (this.states.hasKey("down") || this.showTooltipOn == "hover" && (_utils_Type__WEBPACK_IMPORTED_MODULE_29__.hasValue(this.tooltipHTML) || _utils_Type__WEBPACK_IMPORTED_MODULE_29__.hasValue(this.tooltipText))) {
      this.clickable = true;
    }

    if (this.states.hasKey("focus")) {
      this.focusable = true;
    } // Propagate the new state to clones


    if (this.applyOnClones) {
      var clones = this.clones.values;
      var length_1 = clones.length;

      for (var i = 0; i < length_1; ++i) {
        var clone = clones[i];

        if (!clone.isDisposed()) {
          clone.states.setKey(state.name, state);
        }
      }
    }
  };

  Object.defineProperty(Sprite.prototype, "animations", {
    /**
     * Returns a list elements's animations currently being played.
     *
     * If the list has not been initialized it is created.
     *
     * @return List of animations
     */
    get: function get() {
      if (!this._animations) {
        this._animations = [];

        this._disposers.push(new _utils_Animation__WEBPACK_IMPORTED_MODULE_7__.AnimationDisposer(this._animations));
      }

      return this._animations;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Converts element's local coordinates to the coordinates within the main
   * chart container.
   *
   * @param point  Local point
   * @return Global point
   */

  Sprite.prototype.getSvgPoint = function (point) {
    try {
      // Calculate SVG point
      var bbox = this.htmlContainer.getBoundingClientRect();
      return {
        "x": point.x - bbox.left,
        "y": point.y - bbox.top
      };
    } catch (e) {
      return point;
    }
  };
  /**
   * Creates and starts an [[Animation]] with given `animationOptions`.
   *
   * @see {@link Animation} for additional information about available options
   * @param animationOptions  Animation options
   * @param duration          Duration in milliseconds
   * @param easing            Easing function
   * @return Animation instance
   */


  Sprite.prototype.animate = function (animationOptions, duration, easing) {
    return new _utils_Animation__WEBPACK_IMPORTED_MODULE_7__.Animation(this, animationOptions, duration, easing).start();
  };
  /**
   * Applies a [[SpriteState]] on this element.
   *
   * The first parameter can either be a name state or a [[SpriteState]]
   * instance.
   *
   * When run, this method will apply SVG properties defined in a
   * [[SpriteState]], but only those that are relevant to this particular
   * element, i.e. are in the `properties` array.
   *
   * @see {@link SpriteState}
   * @param value               A state - name key or instance
   * @param transitionDuration  Duration of the transition between current and new state
   * @param easing              An easing function
   */


  Sprite.prototype.setState = function (value, transitionDuration, easing) {
    var state;

    if (value instanceof _SpriteState__WEBPACK_IMPORTED_MODULE_0__.SpriteState) {
      this.states.setKey(value.name, value);
      state = value;
    } else {
      state = this.states.getKey(value);

      if (!state) {
        return;
      }
    } // stop previous transition
    // not good - foe expample, we are animating to some "active" state and in them middle "hover" state happens. then "active" stat won't be applied
    //if (this._transition) {
    //this._transition.stop();
    //}


    if (state.name == "hover") {
      if (this.isHidden) {
        return;
      }

      this.isHover = true;
    }

    if (state.name == "hidden") {
      this.isHiding = true;
    } else {
      if (!this.visible) {
        this.setVisibility(state.properties.visible || this.defaultState.properties.visible);
      }
    }

    if (state.name == "active") {
      this.isActive = true;
    } // we do not set isActive = false here if it's not active, but container does that if setStateOnChildren = true


    if (!_utils_Type__WEBPACK_IMPORTED_MODULE_29__.isNumber(transitionDuration)) {
      transitionDuration = state.transitionDuration;
    }

    if (!_utils_Type__WEBPACK_IMPORTED_MODULE_29__.hasValue(easing)) {
      easing = state.transitionEasing;
    }

    return this.transitTo(state, transitionDuration, easing);
  };
  /**
   * Applies proper state based on the condition of the element. A condition is
   * deducted in this order:
   * * "hover" if Sprite has currently any pointers over it
   * * "down" if Sprite has any pointers (touch or mouse) currently pressed over it
   * * "focus" if Sprite has currently got focus (accessibility)
   * * "hidden" if Sprite is currently hidden
   *
   * Returns an [[Animation]] object, which is handling gradual transition from
   * current values of properties, to the new target state(s).
   *
   * @param duration  Duration for the animation (ms)
   * @return [[Animation]] object which is handling the transition
   */


  Sprite.prototype.applyCurrentState = function (duration) {
    //if (!this.isHidden) { // this was done for hover state not to take effect if "hidden" is actually visible, need to think about it.
    var animation = this.setState(this.defaultState, duration);

    if (this.isHover) {
      animation = this.setState("hover", duration);
    }

    if (this.isDown && this.interactions.downPointers.length) {
      animation = this.setState("down", duration);
    }

    this.isFocused = this.isFocused;

    if (this.isActive) {
      animation = this.setState("active", duration);

      if (this.isHover && this.states.hasKey("hoverActive")) {
        animation = this.setState("hoverActive", duration);
      }
    }

    return animation; //}
  };
  /**
   * Starts an [[Animation]] of the properties to specific values as they are
   * set in `state`.
   *
   * @ignore Exclude from docs
   * @param state     Target State
   * @param duration  Duration in milliseconds
   * @param easing    Easing function
   * @return Transition Animation
   */


  Sprite.prototype.transitTo = function (state, duration, easing) {
    var _this = this; // Init


    var options = [],
        propValues = state.allValues,
        transition; // todo: do this for numeric/color properties only?
    // @todo use state.getPropertyValue instead

    _utils_Object__WEBPACK_IMPORTED_MODULE_28__.each(propValues, function (propertyName, finalValue) {
      var currentValue = _this[propertyName]; // save current value to default state. this solves a big problem where values must be set both on sprite and default state

      if (finalValue != currentValue && _this.defaultState.properties[propertyName] == undefined) {
        _this.defaultState.properties[propertyName] = currentValue;
      } //if (finalValue != currentValue && $type.hasValue(finalValue)) {


      if (finalValue != "__unset") {
        var option = {
          from: currentValue,
          to: finalValue,
          property: propertyName
        };
        options.push(option);
      }
    });

    if (options.length > 0) {
      transition = this.animate(options, duration, easing);

      if (transition && !transition.isFinished()) {
        // TODO should this use events.once ?
        // TODO push onto _disposers array ?
        this._disposers.push(transition.events.on("animationended", function () {
          _this.dispatchImmediately("transitionended");
        }));
      } else {
        this.dispatchImmediately("transitionended");
      }
    } // apply filters if set


    if (state.filters.length > 0) {
      var newFilters_1 = []; // check for the same filters

      _utils_Iterator__WEBPACK_IMPORTED_MODULE_30__.each(state.filters.iterator(), function (stateFilter) {
        var newFilter = stateFilter.clone();
        newFilters_1.push(newFilter);
        var animationOptions = [];
        _utils_Iterator__WEBPACK_IMPORTED_MODULE_30__.each(_this.filters.iterator(), function (currentFilter) {
          // if we have the same filters
          if (currentFilter.className == newFilter.className) {
            if (!_utils_Iterator__WEBPACK_IMPORTED_MODULE_30__.contains(_this.defaultState.filters.iterator(), function (x) {
              return x.className === newFilter.className;
            })) {
              _this.defaultState.filters.push(currentFilter);
            }

            _utils_Object__WEBPACK_IMPORTED_MODULE_28__.each(newFilter.properties, function (propertyName, newValue) {
              var currentValue = currentFilter.properties[propertyName]; // if values are not the same, push to animation options array

              if (currentValue != newValue) {
                animationOptions.push({
                  property: propertyName,
                  from: currentValue,
                  to: newValue
                });
              }
            });
          }
        }); // animate to new value

        newFilter.animate(animationOptions, duration, easing);
      });
      this.filters.clear();
      this.filters.pushAll(newFilters_1);
    }

    return transition;
  };
  /**
   * Returns `true` if Sprite is currently transiting from one state/value to
   * another.
   *
   * @return Is in transition?
   */


  Sprite.prototype.isInTransition = function () {
    return this.animations.length > 0;
  };

  Object.defineProperty(Sprite.prototype, "isHover", {
    /**
     * @return Is hovered?
     */
    get: function get() {
      if (this.isInteractive()) {
        return this.interactions.isHover;
      }

      return false;
    },

    /**
     * Indicates if this element has a mouse pointer currently hovering
     * over it, or if it has any touch pointers pressed on it.
     *
     * You can force element to be "hovered" manually, by setting this property
     * to `true`.
     *
     * @param value Is hovered?
     */
    set: function set(value) {
      value = _utils_Type__WEBPACK_IMPORTED_MODULE_29__.toBoolean(value);

      if (value !== this.isHover) {
        if (this.isInteractive()) {
          this.interactions.isHover = value;

          if (value) {
            this.handleOver();
          } else {
            this.interactions.isRealHover = false;
            this.handleOut();
          }
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "isDragged", {
    /**
     * Returns indicator if this element is being dragged at the moment.
     *
     * @return Is dragged?
     */
    get: function get() {
      return this._isDragged;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "isResized", {
    /**
     * Returns indicator if this element is being resized at the moment.
     *
     * @return Is resized?
     */
    get: function get() {
      return this._isResized;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "isDown", {
    /**
     * @return Is down?
     */
    get: function get() {
      if (this.isInteractive()) {
        return this.interactions.isDown;
      }

      return false;
    },

    /**
     * Indicates if this element has any pointers (mouse or touch) pressing down
     * on it.
     *
     * @param value Is down?
     */
    set: function set(value) {
      value = _utils_Type__WEBPACK_IMPORTED_MODULE_29__.toBoolean(value);

      if (this.isInteractive() && this.isDown != value) {
        this.interactions.isDown = value;

        if (value) {
          this.handleDown();
        } else {
          this.handleUp();
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "isFocused", {
    /**
     * @return Is focused?
     */
    get: function get() {
      if (this.isInteractive()) {
        return this.interactions.isFocused;
      }

      return false;
    },

    /**
     * Indicates if this element is focused (possibly by tab navigation).
     *
     * @param value Is focused?
     */
    set: function set(value) {
      value = _utils_Type__WEBPACK_IMPORTED_MODULE_29__.toBoolean(value);

      if (this.focusable && this.isFocused != value) {
        if (this.isInteractive()) {
          this.interactions.isFocused = value;

          if (value === true) {
            this.handleFocus();
          } else {
            this.handleBlur();
          }
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "isActive", {
    /**
     * @return Is active?
     */
    get: function get() {
      return this._isActive;
    },

    /**
     * Indicates if this element is currently active (toggled on) or not
     * (toggled off).
     *
     * @param value Is active?
     */
    set: function set(value) {
      this.setActive(value);
    },
    enumerable: true,
    configurable: true
  });

  Sprite.prototype.setActive = function (value) {
    value = _utils_Type__WEBPACK_IMPORTED_MODULE_29__.toBoolean(value);

    if (this._isActive !== value) {
      this._isActive = value;

      if (value && this.states.hasKey("active")) {
        this.setState("active");

        if (this.isHover && this.states.hasKey("hoverActive")) {
          this.setState("hoverActive");
        }
      } else {
        this.applyCurrentState();
      }

      this.dispatchImmediately("toggled");
    }
  };

  Object.defineProperty(Sprite.prototype, "disabled", {
    /**
     * @return Disabled?
     */
    get: function get() {
      //if(this._internalDisabled){
      //	return true;
      //}
      var current = this.getPropertyValue("disabled");

      if (_utils_Type__WEBPACK_IMPORTED_MODULE_29__.hasValue(current)) {
        return current;
      } else {
        if (this.virtualParent) {
          return this.virtualParent.disabled;
        }

        if (this._parent) {
          return this._parent.disabled;
        }
      }

      return false;
    },

    /**
     * Controls if element is disabled.
     *
     * A disabled element is hidden, and is removed from any processing, layout
     * calculations, and generally treated as if it does not exist.
     *
     * The element itself is not destroyed, though. Setting this back to `false`,
     * will "resurrect" the element.
     *
     * @param value  Disabled?
     */
    set: function set(value) {
      this.setDisabled(value);
    },
    enumerable: true,
    configurable: true
  });

  Sprite.prototype.setDisabled = function (value) {
    value = _utils_Type__WEBPACK_IMPORTED_MODULE_29__.toBoolean(value);
    var current = this.getPropertyValue("disabled");

    if (current != value) {
      this.setPropertyValue("disabled", value, true);

      if (value) {
        this.parent = this._parent;
        this.removeFromInvalids();
        this.group.attr({
          "display": "none"
        });
        this.dispatch("disabled");
      } else {
        if (this._parent) {
          var group = this._parent.element;

          if (!group.hasChild(this.group)) {
            group.add(this.group);
          }
        }

        if (this instanceof _Container__WEBPACK_IMPORTED_MODULE_9__.Container) {
          this.deepInvalidate();

          if (this._background) {
            this._background.invalidate();
          }
        } else {
          this.invalidate();
        }

        if (!this.__disabled) {
          this.removeSVGAttribute("display");
        }

        this.dispatch("enabled");
      }

      this.dispatch("transformed");
      _System__WEBPACK_IMPORTED_MODULE_31__.system.requestFrame();
      return true;
    }

    return false;
  };

  Object.defineProperty(Sprite.prototype, "__disabled", {
    /**
     * @ignore
     * @return Disabled?
     */
    get: function get() {
      return this._internalDisabled;
    },

    /**
     * Internal disable method.
     *
     * Do not use it for disabling elements. Use `disabled` accessor instead.
     *
     * @ignore Exclude from docs
     * @param value Disabled?
     */
    set: function set(value) {
      if (this._internalDisabled != value) {
        this._internalDisabled = value;
        this._updateDisabled = true;
        this.invalidatePosition(); // better use this instead of invalidate()

        if (!value) {
          this.invalidate();
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "numberFormatter", {
    /**
     * @return A [[NumberFormatter]] instance to be used
     */
    get: function get() {
      if (this._numberFormatter) {
        return this._numberFormatter;
      } else if (this.virtualParent) {
        return this.virtualParent.numberFormatter;
      } else if (this._parent) {
        return this._parent.numberFormatter;
      }

      this._numberFormatter = new _formatters_NumberFormatter__WEBPACK_IMPORTED_MODULE_18__.NumberFormatter();
      this._numberFormatter.language = this.language;
      return this.numberFormatter;
    },

    /**
     * ==========================================================================
     * FORMATTERS AND OTHER EXTERNAL HELPERS
     * ==========================================================================
     * @hidden
     */

    /**
     * A [[NumberFormatter]] instance.
     *
     * This is used to format numbers.
     *
     * ```TypeScript
     * chart.numberFormatter.numberFormat = "#,###.#####";
     * ```
     * ```JavaScript
     * chart.numberFormatter.numberFormat = "#,###.#####";
     * ```
     * ```JSON
     * {
     *   // ...
     *   "numberFormatter": {
     *     "numberFormat": "#,###.#####"
     *   }
     * }
     * ```
     *
     * You can set a separate instance of formatter for each
     * individual element. However that would be unnecessary overhead as
     * all elements would automatically inherit formatter from their parents,
     * all the way up to the chart itself.
     *
     *
     * @see {@link NumberFormatter} for more info on formatting numbers
     * @param value  An instance of NumberFormatter
     */
    set: function set(value) {
      this._numberFormatter = value;
      this._numberFormatter.language = this.language;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "dateFormatter", {
    /**
     * @return An instance of DateFormatter
     */
    get: function get() {
      if (this._dateFormatter) {
        return this._dateFormatter;
      } else if (this.virtualParent) {
        return this.virtualParent.dateFormatter;
      } else if (this._parent) {
        return this._parent.dateFormatter;
      }

      this._dateFormatter = new _formatters_DateFormatter__WEBPACK_IMPORTED_MODULE_19__.DateFormatter();
      this._dateFormatter.language = this.language;
      return this.dateFormatter;
    },

    /**
     * A [[DateFormatter]] instance.
     *
     * This is used to format dates, e.g. on a date axes, balloons, etc.
     *
     * ```TypeScript
     * chart.dateFormatter.dateFormat = "yyyy-MM-dd";
     * ```
     * ```JavaScript
     * chart.dateFormatter.dateFormat = "yyyy-MM-dd";
     * ```
     * ```JSON
     * {
     *   // ...
     *   "dateFormatter": {
     *     "dateFormat": "yyyy-MM-dd"
     *   }
     * }
     * ```
     *
     * You can set a separate instance of formatter for each
     * individual element. However that would be unnecessary overhead as
     * all elements would automatically inherit formatter from their parents,
     * all the way up to the chart itself.
     *
     * @see {@link DateFormatter} for more info on dates formatting
     * @param value  An instance of DateFormatter
     */
    set: function set(value) {
      this._dateFormatter = value;
      this._dateFormatter.language = this.language;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "durationFormatter", {
    /**
     * @return An instance of DurationFormatter
     */
    get: function get() {
      if (this._durationFormatter) {
        return this._durationFormatter;
      } else if (this.virtualParent) {
        return this.virtualParent.durationFormatter;
      } else if (this._parent) {
        return this._parent.durationFormatter;
      }

      this._durationFormatter = new _formatters_DurationFormatter__WEBPACK_IMPORTED_MODULE_20__.DurationFormatter();
      this._durationFormatter.language = this.language;
      return this.durationFormatter;
    },

    /**
     * A [[DurationFormatter]] instance.
     *
     * This is used to format numbers as durations, e.g. on a value axes.
     *
     * You can set a separate instance of formatter for each
     * individual element. However that would be unnecessary overhead as
     * all elements would automatically inherit formatter from their parents,
     * all the way up to the chart itself.
     *
     * @see {@link DurationFormatter} for more info on durations
     * @param value  An instance of DurationFormatter
     */
    set: function set(value) {
      this._durationFormatter = value;
      this._durationFormatter.language = this.language;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "language", {
    /**
     * @return An instance of Language
     */
    get: function get() {
      var language = this._language.get();

      if (language) {
        return language;
      } else if (this.virtualParent) {
        return this.virtualParent.language;
      } else if (this._parent) {
        return this._parent.language;
      }

      language = new _utils_Language__WEBPACK_IMPORTED_MODULE_22__.Language();
      this.language = language;
      return language;
    },

    /**
     * A [[Language]] instance to use for translations.
     *
     * Normally it is enough to set language for the top-most element - chart.
     *
     * All other element child elements will automatically re-use that language
     * object.
     *
     * @param value  An instance of Language
     */
    set: function set(value) {
      var _this = this;

      if (this._language.get() !== value) {
        this._language.set(value, value.events.on("localechanged", function (ev) {
          if (_this._numberFormatter) {
            _this._numberFormatter.language = _this.language;
          }

          if (_this._dateFormatter) {
            _this._dateFormatter.language = _this.language;
          }

          if (_this._durationFormatter) {
            _this._durationFormatter.language = _this.language;
          }

          if (_this._exporting.get()) {
            var exporting = _this._exporting.get();

            exporting.numberFormatter.language = _this.language;
            exporting.dateFormatter.language = _this.language;
            exporting.durationFormatter.language = _this.language;
            exporting.language = _this.language;
          }

          if (_this instanceof _Container__WEBPACK_IMPORTED_MODULE_9__.Container) {
            _this.deepInvalidate();
          }
        }));
      }
    },
    enumerable: true,
    configurable: true
  });
  /**
   * ==========================================================================
   * DATA-RELATED STUFF
   * ==========================================================================
   * @hidden
   */

  /**
   * Parses the string for meta tags `{tag}` and replaces them with a real
   * value. Supports straight up tags referring to the field in data, i.e.
   * `{value}` or tags with additional formatting info. E.g.:
   *
   * ```Text
   * {myfield.formatDate("yyyy-MM-dd")}
   * {myfield.formatDate()}
   * {myfield.formatNumber("#,####.00")}
   * {myfield.formatNumber()}
   * {myField.formatDuration("mm:ss")}
   * ```
   *
   * Etc.
   *
   * This method Will automatically detect and use proper formatter for the
   * value.
   *
   * The source value will be looked up in various places: (in order)
   * * Sprite's own `dataItem`
   * * Sprite's properties
   * * Parent's `dataItem`
   * * Parent's properties
   *
   * @ignore Exclude from docs
   * @param string            A string to format
   * @param dataItem          DataItem
   * @return Formatted string
   */

  Sprite.prototype.populateString = function (string, dataItem) {
    if (_utils_Type__WEBPACK_IMPORTED_MODULE_29__.hasValue(string)) {
      string = _utils_Type__WEBPACK_IMPORTED_MODULE_29__.castString(string);
      string = (0,_formatters_TextFormatter__WEBPACK_IMPORTED_MODULE_21__.getTextFormatter)().escape(string);
      var tags = string.match(/\{([^}]+)\}/g);
      var i = void 0;

      if (tags) {
        for (i = 0; i < tags.length; i++) {
          var tag = tags[i].replace(/\{([^}]+)\}/, "$1");
          var value = this.getTagValue(tag, "", dataItem);

          if (!_utils_Type__WEBPACK_IMPORTED_MODULE_29__.hasValue(value)) {
            value = "";
          }

          string = string.split(tags[i]).join(value);
        }
      }

      string = (0,_formatters_TextFormatter__WEBPACK_IMPORTED_MODULE_21__.getTextFormatter)().unescape(string);
    } else {
      string = "";
    }

    if (!this._adapterO) {
      return string;
    } else {
      return this._adapterO.apply("populateString", string);
    }
  };
  /**
   * Gets the value from data item and formats it according to specified format.
   *
   * If `format` is specified, it will use its contents to choose formatter for
   * the value. Otherwise it will select formatter accordingly to actual value
   * type.
   *
   * @ignore Exclude from docs
   * @todo Ability to force certain formatter on known numeric and date values
   * @see {@link NumberFormatter}
   * @see {@link DateFormatter}
   * @see {@link DurationFormatter}
   * @param tagName           Tag name to replace
   * @param format            Format to use
   * @param dataItem          DataItem
   * @return Formatted value
   */


  Sprite.prototype.getTagValue = function (tagName, format, dataItem) {
    var value;

    if (!_utils_Type__WEBPACK_IMPORTED_MODULE_29__.hasValue(dataItem)) {
      dataItem = this.dataItem;
    } // Parse parts


    var parts = [];
    var reg = /([^.]+)\(([^)]*)\)|([^.]+)/g;
    ;
    var matches;

    while (true) {
      matches = reg.exec(tagName);

      if (matches === null) {
        break;
      }

      if (matches[3]) {
        // Simple property
        parts.push({
          prop: matches[3]
        });
      } else {
        // Method
        // Parse parameters
        var params = [];

        if (_utils_Utils__WEBPACK_IMPORTED_MODULE_24__.trim(matches[2]) != "") {
          var reg2 = /'([^']*)'|"([^"]*)"|([0-9\-]+)/g;
          var matches2 = void 0;

          while (true) {
            matches2 = reg2.exec(matches[2]);

            if (matches2 === null) {
              break;
            }

            params.push(matches2[1] || matches2[2] || matches2[3]);
          }
        }

        parts.push({
          method: matches[1],
          params: params
        });
      }
    } // Check if we can retrieve the value from data item


    if (dataItem) {
      // Check values
      value = this.getTagValueFromObject(parts, dataItem.values); // Check properties

      if (!_utils_Type__WEBPACK_IMPORTED_MODULE_29__.hasValue(value) || _utils_Type__WEBPACK_IMPORTED_MODULE_29__.isObject(value)) {
        // isObject helps to solve problem with date axis, as for example dateX will get dateX from values object and won't get to the dateX date.
        value = this.getTagValueFromObject(parts, dataItem);
      } // Check data context


      var dataContext = dataItem.dataContext;

      if (!_utils_Type__WEBPACK_IMPORTED_MODULE_29__.hasValue(value) && dataContext) {
        value = this.getTagValueFromObject(parts, dataItem.dataContext); // Maybe it's a literal dot-separated name of the key in dataContext?

        if (!_utils_Type__WEBPACK_IMPORTED_MODULE_29__.hasValue(value)) {
          value = this.getTagValueFromObject([{
            prop: tagName
          }], dataContext);
        } // scond data context level sometimes exist (tree map)


        if (!_utils_Type__WEBPACK_IMPORTED_MODULE_29__.hasValue(value) && dataContext.dataContext) {
          value = this.getTagValueFromObject(parts, dataContext.dataContext);
        }
      } // Check component's data item


      if (!_utils_Type__WEBPACK_IMPORTED_MODULE_29__.hasValue(value) && dataItem.component && dataItem.component.dataItem !== dataItem) {
        value = dataItem.component.getTagValue(tagName, format);
      }
    } // Check sprite's properties


    if (!_utils_Type__WEBPACK_IMPORTED_MODULE_29__.hasValue(value)) {
      value = this.getTagValueFromObject(parts, this.populateStringFrom || this);
    } // Finally, check the parent


    if (!_utils_Type__WEBPACK_IMPORTED_MODULE_29__.hasValue(value) && this._parent) {
      value = this._parent.getTagValue(tagName, format);
    }

    return value;
  };
  /**
   * Tries to retrieve values from properties of any object, then applies
   * proper formatting to it.
   *
   * @ignore Exclude from docs
   * @todo Description (improve)
   * @param parts   Properties ant methods to access
   * @param object  Source object
   * @param format  A specific format to apply
   * @return Formatted value
   */


  Sprite.prototype.getTagValueFromObject = function (parts, object, format) {
    var current = object;
    var formatApplied = false;

    for (var i = 0, len = parts.length; i < len; i++) {
      var part = parts[i];

      if (part.prop) {
        // Regular property
        current = current[part.prop];

        if (!_utils_Type__WEBPACK_IMPORTED_MODULE_29__.hasValue(current)) {
          // Not set, return undefined
          return;
        }
      } else {
        // Method
        switch (part.method) {
          case "formatNumber":
            var numberValue = _utils_Utils__WEBPACK_IMPORTED_MODULE_24__.anyToNumber(current);

            if (_utils_Type__WEBPACK_IMPORTED_MODULE_29__.hasValue(numberValue)) {
              current = this.numberFormatter.format(numberValue, format || part.params[0] || undefined);
              formatApplied = true;
            }

            break;

          case "formatDate":
            var dateValue = void 0;

            if (_utils_Type__WEBPACK_IMPORTED_MODULE_29__.isString(current)) {
              dateValue = this.dateFormatter.parse(current);
            } else {
              dateValue = _utils_Utils__WEBPACK_IMPORTED_MODULE_24__.anyToDate(current);
            }

            if (!_utils_Type__WEBPACK_IMPORTED_MODULE_29__.isDate(dateValue) || _utils_Type__WEBPACK_IMPORTED_MODULE_29__.isNaN(dateValue.getTime())) {
              // Was not able to get date out of value, quitting and letting
              // calling method try another value
              return;
            }

            if (_utils_Type__WEBPACK_IMPORTED_MODULE_29__.hasValue(dateValue)) {
              current = this.dateFormatter.format(dateValue, format || part.params[0] || undefined);
              formatApplied = true;
            }

            break;

          case "formatDuration":
            var durationValue = _utils_Utils__WEBPACK_IMPORTED_MODULE_24__.anyToNumber(current);

            if (_utils_Type__WEBPACK_IMPORTED_MODULE_29__.hasValue(durationValue)) {
              current = this.durationFormatter.format(durationValue, format || part.params[0] || undefined, part.params[1] || undefined);
              formatApplied = true;
            }

            break;

          case "urlEncode":
          case "encodeURIComponent":
            current = encodeURIComponent(current);
            break;

          default:
            if (current[part.method]) {
              current[part.method].apply(this, part.params);
            }

            break;
        }
      }
    } // Apply default format if it wasn't applied explicitly


    if (!formatApplied) {
      var formatParts = [{
        method: "",
        params: format
      }];

      if (!_utils_Type__WEBPACK_IMPORTED_MODULE_29__.hasValue(format)) {
        // Format is not set
        // Determine from the type of the value
        if (_utils_Type__WEBPACK_IMPORTED_MODULE_29__.isNumber(current)) {
          formatParts[0].method = "formatNumber";
          formatParts[0].params = "";
        } else if (_utils_Type__WEBPACK_IMPORTED_MODULE_29__.isDate(current)) {
          formatParts[0].method = "formatDate";
          formatParts[0].params = "";
        }
      } else {
        // Format set
        // Try to determine formatter based on the format
        var formatterType = _utils_Utils__WEBPACK_IMPORTED_MODULE_24__.getFormat(format); // format

        if (formatterType === _utils_Strings__WEBPACK_IMPORTED_MODULE_26__.NUMBER) {
          formatParts[0].method = "formatNumber";
        } else if (formatterType === _utils_Strings__WEBPACK_IMPORTED_MODULE_26__.DATE) {
          formatParts[0].method = "formatDate";
        } else if (formatterType === _utils_Strings__WEBPACK_IMPORTED_MODULE_26__.DURATION) {
          formatParts[0].method = "formatDuration";
        }
      } // Apply format


      if (formatParts[0].method) {
        current = this.getTagValueFromObject(formatParts, current);
      }
    }

    return current;
  };

  Object.defineProperty(Sprite.prototype, "dataItem", {
    /**
     * @return [[DataItem]]
     */
    get: function get() {
      if (!this._dataItem) {
        if (this.virtualParent) {
          return this.virtualParent.dataItem;
        }

        if (this._parent) {
          return this._parent.dataItem;
        }
      }

      return this._dataItem;
    },

    /**
     * A [[DataItem]] to use as element's data source.
     *
     * @todo Review type
     * @param dataItem  DataItem
     */
    set: function set(dataItem) {
      //an not use this["_dataItem"] here, as we return parent data item if this sprite doesn't have one.
      // @todo:think about it
      this.setDataItem(dataItem);
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Sets currently used [[DataItem]].
   *
   * If the element has also `configField` set, it will also look for any
   * config in DataItem's data context to apply to this element.
   *
   * @param dataItem DataItem
   */

  Sprite.prototype.setDataItem = function (dataItem) {
    var _this = this;

    if (this._dataItem != dataItem) {
      this._dataItem = dataItem;

      if (dataItem) {
        if (this.configField) {
          var dataContext_1 = dataItem.dataContext;

          if (dataContext_1) {
            this.config = dataContext_1[this.configField];

            if (!this.config && dataContext_1.dataContext) {
              this.config = dataContext_1.dataContext[this.configField];
            }
          }
        }

        var dataContext_2 = dataItem.dataContext;

        if (dataContext_2) {
          var dataContext2_1 = dataContext_2.dataContext;
          _utils_Object__WEBPACK_IMPORTED_MODULE_28__.each(this.propertyFields, function (propertyName, fieldValue) {
            if (_utils_Type__WEBPACK_IMPORTED_MODULE_29__.hasValue(dataContext_2[fieldValue])) {
              var anyThis = _this;
              anyThis[propertyName] = dataContext_2[fieldValue];
            } else {
              if (dataContext2_1) {
                var value = dataContext2_1[fieldValue];

                if (_utils_Type__WEBPACK_IMPORTED_MODULE_29__.hasValue(value)) {
                  var anyThis = _this;
                  anyThis[propertyName] = value;
                }
              }
            }
          });
        }
      }

      this.invalidate();
    }
  };
  /**
   * ==========================================================================
   * PROPERTY UTILITIES
   * ==========================================================================
   * @hidden
   */

  /**
   * Returns element's property value.
   *
   * Will check if there are any bindings with [[DataItem]].
   *
   * Will also apply any adapters bound to `propertyName`.
   *
   * @param propertyName  Property name
   * @return Property value
   */


  Sprite.prototype.getPropertyValue = function (propertyName) {
    var propValue = this.properties[propertyName]; // Apply adapter

    if (!this._isTemplate) {
      if (this._adapterO) {
        propValue = this._adapterO.apply(propertyName, propValue);
      }

      propValue = _utils_Adapter__WEBPACK_IMPORTED_MODULE_3__.globalAdapter.applyAll(this, propertyName, propValue);
    }

    return propValue;
  };

  Sprite.prototype.setColorProperty = function (property, value, invalidate) {
    var currentValue = this.properties[property];

    if (value instanceof _utils_Color__WEBPACK_IMPORTED_MODULE_13__.Color && currentValue instanceof _utils_Color__WEBPACK_IMPORTED_MODULE_13__.Color && value.toString() == currentValue.toString()) {
      return false;
    } else {
      return this.setPropertyValue(property, value, invalidate);
    }
  };

  Sprite.prototype.setPercentProperty = function (property, value, invalidate, transform, precision, floor) {
    value = _utils_Type__WEBPACK_IMPORTED_MODULE_29__.toNumberOrPercent(value);

    if (_utils_Type__WEBPACK_IMPORTED_MODULE_29__.isNumber(value)) {
      if (_utils_Type__WEBPACK_IMPORTED_MODULE_29__.isNumber(precision)) {
        value = _utils_Math__WEBPACK_IMPORTED_MODULE_25__.round(value, precision, floor);
      }

      return this.setPropertyValue(property, value, invalidate, transform);
    } else {
      var currentValue = this.properties[property];

      if (value instanceof _utils_Percent__WEBPACK_IMPORTED_MODULE_32__.Percent && currentValue instanceof _utils_Percent__WEBPACK_IMPORTED_MODULE_32__.Percent && value.value == currentValue.value) {
        return false;
      } else {
        return this.setPropertyValue(property, value, invalidate, transform);
      }
    }
  };
  /**
   * Sets elements's property value. Will also propagate the same property value
   * on all element's clones.
   *
   * @param property    Property
   * @param value       Value
   * @param invalidate  Should the sprite be invalidated, cause it's re-rendering
   * @param transform   Re-apply positioning of the element
   * @return Did the value change? It will return `true` if the new value and the old value of the property are not the same
   * @todo Review propagation to clones. Right now we simply check if clone is disposed before setting the same property on it. It's better to remove from clone list altogether.
   */


  Sprite.prototype.setPropertyValue = function (property, value, invalidate, transform) {
    if (this.properties[property] !== value && !this.isDisposed()) {
      this.properties[property] = value;

      if (this.events.isEnabled("propertychanged")) {
        var event_1 = {
          type: "propertychanged",
          target: this,
          property: property
        };
        this.events.dispatchImmediately("propertychanged", event_1);
      }

      if (invalidate) {
        this.invalidate();
      }

      if (transform) {
        this.invalidatePosition();
      }

      if (this.applyOnClones) {
        var clones = this.clones.values;
        var length_2 = clones.length;

        for (var i = 0; i < length_2; ++i) {
          var clone = clones[i];

          if (!clone.isDisposed()) {
            //(<Sprite>clone).setPropertyValue(<any>property, value, invalidate, transform);
            clone[property] = value;
          }
        }
      }

      return true;
    }

    return false;
  };

  Sprite.prototype.bind = function (property, source, bindToProperty, modifier) {
    var _this = this;

    if (bindToProperty === void 0) {
      bindToProperty = property;
    }

    if (_utils_Type__WEBPACK_IMPORTED_MODULE_29__.hasValue(this._bindings[property])) {
      this._bindings[property].dispose();
    } // set current value


    this[property] = source[bindToProperty]; //source.addEventListener(AMEvent.PROPERTY_CHANGED, this.handleBindings, false, this);

    this._bindings[property] = source.events.on("propertychanged", function (event) {
      if (event.property === bindToProperty) {
        var value = source[bindToProperty];

        if (modifier) {
          value = modifier(value);
        } // TODO clonesById


        _this[property] = value;
      }
    });
  };
  /**
   * Sets up and obeserver function to monitor changes in particular property
   * or properties.
   *
   * @ignore Exclude from docs
   * @param property  Element's property name
   * @param listener  Handler function
   * @param context   Context for handler function
   * @returns Event Disposer
   */


  Sprite.prototype.observe = function (property, listener, context, shouldClone) {
    var _this = this;

    return new _utils_Disposer__WEBPACK_IMPORTED_MODULE_6__.MultiDisposer(_utils_Array__WEBPACK_IMPORTED_MODULE_27__.map(_utils_Array__WEBPACK_IMPORTED_MODULE_27__.toArray(property), function (prop) {
      return _this.events.on("propertychanged", function (e) {
        if (e.property === prop) {
          listener.call(context, e);
        }
      }, context, shouldClone);
    }));
  };
  /**
   * ==========================================================================
   * ACCESSIBILITY-RELATED PROPERTIES
   * ==========================================================================
   * @hidden
   */

  /**
   * Applies accessibility to the SVG element.
   *
   * Adds `<title>` and `<description>` elements as well as `aria-labelledby`
   * and `role` properties.
   *
   * @ignore Exclude from docs
   */


  Sprite.prototype.applyAccessibility = function () {
    // Check if we need to add label and description
    var title = this.readerTitle,
        description = this.readerDescription,
        role = this.role,
        hidden = this.readerHidden,
        checked = this.readerChecked,
        controls = this.readerControls,
        live = this.readerLive,
        orientation = this.readerOrientation,
        valueNow = this.readerValueNow,
        valueText = this.readerValueText; // Init label/describe ids

    var labelledByIds = [];
    var describedByIds = [];
    var labelledBy = this.readerLabelledBy;

    if (labelledBy) {
      labelledByIds.push(labelledBy);
    }

    var describedBy = this.readerDescribedBy;

    if (describedBy) {
      describedByIds.push(describedBy);
    } // Add arial-label attribute if present
    // If not readerTitle and labelledBy is set we will use <title> element
    // instead of aria-label
    // TODO: should we check agains this.showSystemTooltip?


    if (title) {
      if (labelledByIds.length || this.showSystemTooltip) {
        var titleElement = this.titleElement;
        var titleId = this.uid + "-title";

        if (titleElement.node.textContent != title) {
          titleElement.node.textContent = title;
          titleElement.attr({
            id: titleId
          });
        }

        labelledByIds.push(titleId);
      } else {
        if (this._titleElement) {
          this.group.removeElement(this._titleElement);
          this._titleElement = undefined;
        }

        this.setSVGAttribute({
          "aria-label": title
        });
      }
    } else {
      this.removeSVGAttribute("aria-label");

      if (this._titleElement) {
        this.group.removeElement(this._titleElement);
        this._titleElement = undefined;
      }
    } // Add description


    if (description) {
      var descriptionElement = this.descriptionElement;
      var descriptionId = this.uid + "-description";

      if (descriptionElement.node.textContent != description) {
        descriptionElement.node.textContent = description;
        descriptionElement.attr({
          id: descriptionId
        });
      }

      describedByIds.push(descriptionId);
    } else if (this._descriptionElement) {
      this.group.removeElement(this._descriptionElement);
      this._descriptionElement = undefined;
    } // Add label and described properties


    if (labelledByIds.length) {
      this.setSVGAttribute({
        "aria-labelledby": labelledByIds.join(" ")
      });
    } else {
      this.removeSVGAttribute("aria-labelledby");
    }

    if (describedByIds.length) {
      this.setSVGAttribute({
        "aria-describedby": describedByIds.join(" ")
      });
    } else {
      this.removeSVGAttribute("aria-describedby");
    } // Apply role


    if (role) {
      this.setSVGAttribute({
        "role": role
      });
    } else {
      this.removeSVGAttribute("role");
    } // Apply aria-hidden


    if (hidden) {
      this.setSVGAttribute({
        "aria-hidden": "true"
      });
    } else {
      this.removeSVGAttribute("aria-hidden");
    } // Apply aria-checked


    if (checked) {
      this.setSVGAttribute({
        "aria-checked": "true"
      });
    } else if (checked === false) {
      this.setSVGAttribute({
        "aria-checked": "false"
      });
    } else {
      this.removeSVGAttribute("aria-checked");
    } // Apply aria-controls


    if (controls) {
      this.setSVGAttribute({
        "aria-controls": controls
      });
    } else {
      this.removeSVGAttribute("aria-controls");
    } // Apply aria-live


    if (live) {
      this.setSVGAttribute({
        "aria-live": live
      });
    } else {
      this.removeSVGAttribute("aria-live");
    } // Apply aria-orientation


    if (orientation) {
      this.setSVGAttribute({
        "aria-orientation": orientation
      });
    } else {
      this.removeSVGAttribute("aria-orientation");
    } // Apply aria-valuenow


    if (valueNow) {
      this.setSVGAttribute({
        "aria-valuenow": valueNow
      });
    } else {
      this.removeSVGAttribute("aria-valuenow");
    } // Apply aria-valuetext


    if (valueText) {
      this.setSVGAttribute({
        "aria-valuetext": valueText
      });
    } else {
      this.removeSVGAttribute("aria-valuetext");
    }
  };

  Object.defineProperty(Sprite.prototype, "readerTitle", {
    /**
     * @return Title
     */
    get: function get() {
      var title = this.getPropertyValue("readerTitle");

      if (_utils_Type__WEBPACK_IMPORTED_MODULE_29__.hasValue(title) && this.dataItem) {
        return this.populateString(title);
      }

      return title;
    },

    /**
     * Screen reader title of the element.
     *
     * @param value Title
     */
    set: function set(value) {
      value = _utils_Type__WEBPACK_IMPORTED_MODULE_29__.toText(value);

      if (this.setPropertyValue("readerTitle", value)) {
        this.applyAccessibility();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "readerDescription", {
    /**
     * @return Description
     */
    get: function get() {
      var description = this.getPropertyValue("readerDescription");

      if (_utils_Type__WEBPACK_IMPORTED_MODULE_29__.hasValue(description) && this.dataItem) {
        return this.populateString(description);
      }

      return this.getPropertyValue("readerDescription");
    },

    /**
     * Screen reader description of the element.
     *
     * @param value Description
     */
    set: function set(value) {
      value = _utils_Type__WEBPACK_IMPORTED_MODULE_29__.toText(value);

      if (this.setPropertyValue("readerDescription", value)) {
        this.applyAccessibility();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "role", {
    /**
     * @return Role
     */
    get: function get() {
      return this.getPropertyValue("role");
    },

    /**
     * A WAI-ARIA role for the element.
     *
     * @see {@link https://www.w3.org/TR/wai-aria-1.1/#role_definitions} for more information on WAI-ARIA roles
     * @param value  Role
     */
    set: function set(value) {
      value = _utils_Type__WEBPACK_IMPORTED_MODULE_29__.toText(value);

      if (this.setPropertyValue("role", value)) {
        this.applyAccessibility();

        if (value == "slider") {
          this.setSVGAttribute({
            "aria-valuemin": "0"
          });
          this.setSVGAttribute({
            "aria-valuemax": "100"
          });
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "readerHidden", {
    /**
     * @return Hidden?
     */
    get: function get() {
      return this.getPropertyValue("readerHidden");
    },

    /**
     * Controls if element should be hidden from screen readers.
     *
     * @see {@link https://www.w3.org/TR/wai-aria-1.1/#aria-hidden} for more information
     * @param value  Hidden?
     */
    set: function set(value) {
      value = _utils_Type__WEBPACK_IMPORTED_MODULE_29__.toBoolean(value);

      if (this.setPropertyValue("readerHidden", value)) {
        this.applyAccessibility();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "readerChecked", {
    /**
     * @ignore Exclude from docs
     * @return Checked?
     */
    get: function get() {
      return this.getPropertyValue("readerChecked");
    },

    /**
     * Controls if element is currently marked as "checked".
     *
     * @ignore Exclude from docs
     * @see {@link https://www.w3.org/TR/wai-aria-1.1/#aria-checked} for more information
     * @param value Checked?
     */
    set: function set(value) {
      value = _utils_Type__WEBPACK_IMPORTED_MODULE_29__.toBoolean(value);

      if (this.setPropertyValue("readerChecked", value)) {
        this.applyAccessibility();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "readerControls", {
    /**
     * @ignore Exclude from docs
     * @return Setting value
     */
    get: function get() {
      return this.getPropertyValue("readerControls");
    },

    /**
     * A `uid` of an element this element controls.
     *
     * @ignore Exclude from docs
     * @see {@link https://www.w3.org/TR/wai-aria-1.1/#aria-controls} for more information
     * @param value Setting value
     */
    set: function set(value) {
      value = _utils_Type__WEBPACK_IMPORTED_MODULE_29__.toText(value);

      if (this.setPropertyValue("readerControls", value)) {
        this.applyAccessibility();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "readerLive", {
    /**
     * @ignore Exclude from docs
     * @return Setting value
     */
    get: function get() {
      return this.getPropertyValue("readerLive");
    },

    /**
     * Controls accessibility setting "aria-live" for the element.
     *
     * @ignore Exclude from docs
     * @see {@link https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Live_Regions} for more information
     * @param value Setting value
     */
    set: function set(value) {
      value = _utils_Type__WEBPACK_IMPORTED_MODULE_29__.toText(value);

      if (this.setPropertyValue("readerLive", value)) {
        this.applyAccessibility();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "readerLabelledBy", {
    /**
     * @ignore Exclude from docs
     * @return Target element
     */
    get: function get() {
      return this.getPropertyValue("readerLabelledBy");
    },

    /**
     * A `uid` of an element that describes this element.
     *
     * @ignore Exclude from docs
     * @see {@link https://www.w3.org/TR/wai-aria-1.1/#aria-labelledby} for more information
     * @param value Target element
     */
    set: function set(value) {
      value = _utils_Type__WEBPACK_IMPORTED_MODULE_29__.toText(value);

      if (this.setPropertyValue("readerLabelledBy", value)) {
        this.applyAccessibility();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "readerDescribedBy", {
    /**
     * @ignore Exclude from docs
     * @return Target element
     */
    get: function get() {
      return this.getPropertyValue("readerDescribedBy");
    },

    /**
     * A `uid` of an element that describes this element.
     *
     * @ignore Exclude from docs
     * @see {@link https://www.w3.org/TR/wai-aria-1.1/#aria-describedby} for more information
     * @param value Target element
     */
    set: function set(value) {
      value = _utils_Type__WEBPACK_IMPORTED_MODULE_29__.toText(value);

      if (this.setPropertyValue("readerDescribedBy", value)) {
        this.applyAccessibility();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "readerOrientation", {
    /**
     * @return Orientation
     */
    get: function get() {
      return this.getPropertyValue("readerOrientation");
    },

    /**
     * Orientation of the element.
     *
     * @since 4.7.16
     * @param value Orientation
     */
    set: function set(value) {
      value = _utils_Type__WEBPACK_IMPORTED_MODULE_29__.toText(value);

      if (this.setPropertyValue("readerOrientation", value)) {
        this.applyAccessibility();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "readerValueNow", {
    /**
     * @return Current value
     */
    get: function get() {
      return this.getPropertyValue("readerValueNow");
    },

    /**
     * Current value of the element.
     *
     * @since 4.7.16
     * @param value Current value
     */
    set: function set(value) {
      value = _utils_Type__WEBPACK_IMPORTED_MODULE_29__.toText(value);

      if (this.setPropertyValue("readerValueNow", value)) {
        this.applyAccessibility();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "readerValueText", {
    /**
     * @return Current value (text)
     */
    get: function get() {
      return this.getPropertyValue("readerValueText");
    },

    /**
     * Text representation of the current value of the element.
     *
     * @since 4.7.16
     * @param value Current value (text)
     */
    set: function set(value) {
      value = _utils_Type__WEBPACK_IMPORTED_MODULE_29__.toText(value);

      if (this.setPropertyValue("readerValueText", value)) {
        this.applyAccessibility();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "keyboardOptions", {
    /**
     * ==========================================================================
     * USER INTERACTIONS
     * ==========================================================================
     * @hidden
     */

    /**
     * Returns elements keyboard options.
     *
     * @return Keyboard options
     */
    get: function get() {
      if (!this.interactions.keyboardOptions) {
        if (this.virtualParent) {
          return this.virtualParent.keyboardOptions;
        }

        if (this._parent) {
          return this._parent.keyboardOptions;
        }
      }

      return this.interactions.keyboardOptions;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "mouseOptions", {
    /**
     * Mouse options.
     *
     * Enables controlling options related to the mouse, for example sensitivity
     * of its mouse wheel.
     *
     * E.g. the below will reduce chart's wheel-zoom speed to half its default
     * speed:
     *
     * ```TypeScript
     * chart.plotContainer.mouseOptions.sensitivity = 0.5;
     * ```
     * ```JavaScript
     * chart.plotContainer.mouseOptions.sensitivity = 0.5;
     * ```
     * ```JSON
     * {
     *   // ...
     *   "plotContainer": {
     *     "mouseOptions": {
     *       "sensitivity": 0.5
     *     }
     *   }
     * }
     * ```
     *
     * @return Mouse options
     */
    get: function get() {
      if (!this.interactions.mouseOptions) {
        if (this.virtualParent) {
          return this.virtualParent.mouseOptions;
        }

        if (this._parent) {
          return this._parent.mouseOptions;
        }
      }

      return this.interactions.mouseOptions;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "interactions", {
    /**
     * Returns (creates if necessary) an [[InteractionObject]] associated with
     * this element.
     *
     * [[InteractionObject]] is used to attach all kinds of user-interactions to
     * the element, e.g. click/touch, dragging, hovering, and similar events.
     *
     * @return Interaction object
     */
    get: function get() {
      if (!this._interaction) {
        var interaction = (0,_interaction_Interaction__WEBPACK_IMPORTED_MODULE_14__.getInteraction)().getInteraction(this.dom);
        this._interaction = interaction;
        this._interaction.clickable = this.clickable;
        this._interaction.hoverable = this.hoverable;
        this._interaction.trackable = this.trackable;
        this._interaction.draggable = this.draggable;
        this._interaction.swipeable = this.swipeable;
        this._interaction.resizable = this.resizable;
        this._interaction.wheelable = this.wheelable;
        this._interaction.contextMenuDisabled = this.contextMenuDisabled;
        this._interaction.inert = this.inert;
        this._interaction.sprite = this;

        this._disposers.push(this._interaction);
      }

      return this._interaction;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Returns true if interactions object was created. Mostly used just to avoid creating interactions object if not needed.
   * @return Is Sprite interactive?
   */

  Sprite.prototype.isInteractive = function () {
    if (this._interaction) {
      return true;
    } else {
      return false;
    }
  };

  Object.defineProperty(Sprite.prototype, "focusable", {
    /**
     * @return Can element be focused?
     */
    get: function get() {
      return this.getPropertyValue("focusable");
    },

    /**
     * ==========================================================================
     * ELEMENT FOCUS-RELATED STUFF
     * ==========================================================================
     * @hidden
     */

    /**
     * Controls if the element can gain focus.
     *
     * Focusable element will be selectable via TAB key.
     *
     * Please note, clicking it with a mouse or touching will not add focus to
     * it.
     *
     * Focused element will show a system-specific highlight, which might ruin
     * the overal look. This is why we don't focus element on click/touch.
     *
     * A default setting varies for different elements. By default all elements
     * are not focusable, except certain items like buttons, legend items, etc.
     *
     * @default undefined (auto)
     * @param value  Can element be focused?
     */
    set: function set(value) {
      var _this = this;

      value = _utils_Type__WEBPACK_IMPORTED_MODULE_29__.toBoolean(value);

      if (this.setPropertyValue("focusable", value)) {
        if (!value && !this.isInteractive()) {} else {
          this.interactions.focusable = value;

          if (value) {
            this.setSVGAttribute({
              "focusable": value
            });

            if (!_utils_Type__WEBPACK_IMPORTED_MODULE_29__.hasValue(this._tabindex)) {
              this.tabindex = 0;
            }
          } else {
            this.removeSVGAttribute("focusable");
            this.tabindex = undefined;
          } // Set focus events that would apply "focus" state
          // setEventDisposer will also remove listeners if value == false


          this.interactions.setEventDisposer("sprite-focusable", value, function () {
            return new _utils_Disposer__WEBPACK_IMPORTED_MODULE_6__.MultiDisposer([_this.events.on("blur", _this.handleBlur, _this, false), _this.events.on("focus", _this.handleFocus, _this, false)]);
          });
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Applies filters (if set) when element gains focus.
   *
   * @ignore Exclude from docs
   * @param ev Original event
   */

  Sprite.prototype.handleFocus = function (ev) {
    if (this.focusable) {
      if (this.topParent) {
        this.topParent.hasFocused = true;
        this.topParent.focusedElement = this;
      }

      if (this.focusFilter) {
        // Any `filters` manipulation will trigger `applyFilters()` so we don't
        // need to call it here
        this.filters.push(this.focusFilter);
      }

      if (this.hoverOnFocus) {
        // Trigger a hover event as well
        this.isHover = true;
        this.handleOver();
      }
    }
  };
  /**
   * Removes focus filter (if set) when elementloses focus.
   *
   * @ignore Exclude from docs
   * @param ev Original event
   */


  Sprite.prototype.handleBlur = function (ev) {
    if (this.focusable) {
      if (this.topParent) {
        this.topParent.hasFocused = false;
        this.topParent.focusedElement = undefined;
      }

      if (this.focusFilter) {
        // Any `filters` manipulation will trigger `applyFilters()` so we don't
        // need to call it here
        this.filters.removeValue(this.focusFilter);
      }

      if (this.hoverOnFocus) {
        // Trigger a out event as well
        this.isHover = false;
        this.handleOut();
      }
    }
  };

  Object.defineProperty(Sprite.prototype, "focusFilter", {
    /**
     * A reference to a [[Filter]] to apply to element when it gains focus.
     *
     * Normally, browsers will draw a default ugly square around focused element,
     * which totally makes sense because its purpose is to help identify active
     * element for visually impaired people.
     *
     * However, if you would rather apply a filter, so you can modify how focused
     * element looks like, use `focusFilter`.
     *
     * Simply set it to an anstance of [[FocusFilter]], or any other filter
     * object.
     *
     * ```TypeScript
     * chart.focusFilter = new am4core.FocusFilter();
     * ```
     * ```JavaScript
     * chart.focusFilter = new am4core.FocusFilter();
     * ```
     * ```JSON
     * {
     *   // ...
     *   "focusFilter": {
     *     "type": "FocusFilter"
     *   },
     *   // ...
     * }
     * ```
     *
     * @see {@link Filter}
     * @see {@link https://www.amcharts.com/docs/v4/concepts/accessibility/} more about accessibility
     * @see {@link https://www.amcharts.com/docs/v4/tutorials/changing-appearance-of-focused-items/} cusomizing focus appearance
     * @ignore Exclude from docs
     * @return Focused element filter
     */
    get: function get() {
      /*if (!this._focusFilter) {
          this._focusFilter = new FocusFilter();
          this._disposers.push(this._focusFilter);
      }*/
      //return this._focusFilter;
      var focusFilter = this._focusFilter;

      if (focusFilter) {
        return focusFilter;
      }

      if (this.virtualParent) {
        return this.virtualParent.focusFilter;
      } else if (this._parent) {
        return this._parent.focusFilter;
      } //this._focusFilter = new FocusFilter();
      //this._disposers.push(this._focusFilter);

    },

    /**
     * @see {@link Filter}
     * @ignore Exclude from docs
     * @todo This is still experimental, don't use it
     */
    set: function set(value) {
      this._focusFilter = value;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "hoverOnFocus", {
    /**
     * @return Trigger hover on focus?
     */
    get: function get() {
      return this.getPropertyValue("hoverOnFocus");
    },

    /**
     * If set to `true`, this element will also trigger `"over"` event with all
     * the related consequences, like "hover" state being applied and tooltip
     * being shown.
     *
     * Useful as an accessibility feature to display rollover tooltips on items
     * selected via keyboard.
     *
     * @param value  Trigger hover on focus?
     * @default false
     */
    set: function set(value) {
      if (value !== this.hoverOnFocus) {
        this.setPropertyValue("hoverOnFocus", value);
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "tabindex", {
    /**
     * @return TAB index
     */
    get: function get() {
      var index = this._tabindex;

      if (index != null) {
        return index;
      } else if (this.virtualParent) {
        return this.virtualParent.tabindex;
      } else if (this._parent) {
        return this._parent.tabindex;
      }
    },

    /**
     * Sets or returns TAB index.
     *
     * Tab index maintains the order in which focusable elements gain focus when
     * TAB key is pressed.
     *
     * Please note, tab index is not local to the chart. It affects the whole
     * of the page, including non-SVG elements. Maintain extreme causion when
     * setting tab indexes, as it affects the user experience for the whole
     * web page.
     *
     * @param value TAB index
     */
    set: function set(value) {
      value = _utils_Type__WEBPACK_IMPORTED_MODULE_29__.toNumber(value);

      if (this.setPropertyValue("tabindex", value) && _utils_Type__WEBPACK_IMPORTED_MODULE_29__.isNumber(value)) {
        this.interactions.tabindex = value;
        this.setSVGAttribute({
          "tabindex": value
        });
        this._tabindex = value;
        this.focusable = true;
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "inertiaOptions", {
    /**
     * ==========================================================================
     * DRAGGING AND RELATED STUFF
     * ==========================================================================
     * @hidden
     */

    /**
     * Returns element's options to be used for inertia. This setting is
     * inheritable, meaning that if not set directly, it will search in all its
     * ascendants until very top.
     *
     * Inertia is used only if element's `inert` is set to `true`.
     *
     * "Inert" element, when dragged and released, will carry the momentum of the
     * movement, and will continue moving in the same drag direction, gradually
     * reducing in speed until finally stops.
     *
     * Check [[IInertiaOptions]] for how you tweak inertia animations.
     *
     * @return Inertia options
     */
    get: function get() {
      if (!this.interactions.inertiaOptions) {
        if (this._parent) {
          return this._parent.inertiaOptions;
        }
      }

      return this.interactions.inertiaOptions;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "draggable", {
    /**
     * @return `true` if element can be dragged
     */
    get: function get() {
      return this.getPropertyValue("draggable");
    },

    /**
     * Controls if the element is draggable.
     *
     * @param value  `true` if element can be dragged
     */
    set: function set(value) {
      var _this = this;

      value = _utils_Type__WEBPACK_IMPORTED_MODULE_29__.toBoolean(value);

      if (this.setPropertyValue("draggable", value)) {
        if (!value && !this.isInteractive()) {} else {
          this.applyCursorStyle();
          this.interactions.draggable = value; //interaction.processDraggable(this);
          // Add events
          // @todo Maybe attach to InteractionObject's multidisposer so that
          // sprites events get disposed together with them?
          // this.interactions.disposers.getItem("movable")
          // setEventDisposer will also remove listeners if value == false

          this.interactions.setEventDisposer("sprite-draggable", value, function () {
            return new _utils_Disposer__WEBPACK_IMPORTED_MODULE_6__.MultiDisposer([_this.events.on("down", _this.handleDown, _this, false), _this.events.on("dragstart", _this.handleDragStart, _this, false), _this.events.on("drag", _this.handleDragMove, _this, false), _this.events.on("dragstop", _this.handleDragStop, _this, false)]);
          });
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Executes when dragged element is being started to drag.
   *
   * @ignore Exclude from docs
   */

  Sprite.prototype.handleDragStart = function (ev) {
    if (!this.interactions.isTouchProtected || !ev.touch) {
      this.interactions.originalPosition = {
        x: this.pixelX,
        y: this.pixelY
      };
      this._isDragged = true;
      this.hideTooltip(0);
    }
  };
  /**
   * Tell this element to start being dragged. This is useful if you want to
   * drag items by interactions performed not directly on the target element.
   *
   * Parameter `pointer` is highly recommended. By passing in the Pointer you
   * will ensure that movement is tracked for the pointer that you want. If not
   * supplied, the system will try to determine the most logical pointer.
   *
   * However this may fail if you have more than one pointer active, which
   * might happen if you have several objects being dragged on a touch device.
   *
   * @ignore Exclude from docs
   * @param pointer Pointer to use for movement
   */


  Sprite.prototype.dragStart = function (pointer) {
    //this.dragStop(pointer);
    //this.draggable = true;
    this._isDragged = true;
    (0,_interaction_Interaction__WEBPACK_IMPORTED_MODULE_14__.getInteraction)().dragStart(this.interactions, pointer);
  };
  /**
   * Executes when dragged element is being dropped.
   *
   * @ignore Exclude from docs
   */


  Sprite.prototype.handleDragStop = function (ev) {
    if (!this.interactions.isTouchProtected || !ev.touch) {
      this._isDragged = false;
      this.showTooltip();
      this.interactions.originalPosition = undefined;
    }
  };
  /**
   * Stops manually initiated dragging of the element.
   *
   * @ignore Exclude from docs
   * @param pointer Pointer to use as a reference
   */


  Sprite.prototype.dragStop = function (pointer, cancelled) {
    //this.draggable = false;
    this._isDragged = false;
    (0,_interaction_Interaction__WEBPACK_IMPORTED_MODULE_14__.getInteraction)().dragStop(this.interactions, pointer, cancelled); //this.handleDragStop();
  };
  /**
   * Executes when {Sprite} is being dragged.
   *
   * @ignore Exclude from docs
   * @param ev Event object
   * @todo Implement parent position offset calculation
   */


  Sprite.prototype.handleDragMove = function (ev) {
    if (!this.interactions.isTouchProtected || !ev.touch) {
      var point = this.interactions.originalPosition;

      if (point && this._isDragged) {
        var globalScale = this._parent.globalScale * this.svgContainer.cssScale;
        this.moveTo({
          x: point.x + ev.shift.x / globalScale,
          y: point.y + ev.shift.y / globalScale
        }, undefined, undefined, true);
      }

      this.dispatchImmediately("dragged", ev);
    }
  };

  Object.defineProperty(Sprite.prototype, "inert", {
    /**
     * @return `true` if element should use inertia when animated
     */
    get: function get() {
      return this.getPropertyValue("inert");
    },

    /**
     * Controls if the element should use inertia when interacted with.
     *
     * "Inert" element, when dragged and released, will carry the momentum of the
     * movement, and will continue moving in the same drag direction, gradually
     * reducing in speed until finally stops.
     *
     * @default false
     * @param value `true` if element should use inertia when animated
     */
    set: function set(value) {
      value = _utils_Type__WEBPACK_IMPORTED_MODULE_29__.toBoolean(value);

      if (this.setPropertyValue("inert", value)) {
        if (!value && !this.isInteractive()) {// void
        } else {
          this.interactions.inert = value;
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "hoverOptions", {
    /**
     * ==========================================================================
     * HOVERING
     * ==========================================================================
     * @hidden
     */

    /**
     * Returns Sprite's hover options.
     *
     * @see {@link IHoverOptions} for available options.
     * @return Options
     */
    get: function get() {
      if (!this.interactions.hoverOptions) {
        if (this.virtualParent) {
          return this.virtualParent.hoverOptions;
        }

        if (this._parent) {
          return this._parent.hoverOptions;
        }
      }

      return this.interactions.hoverOptions;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "hoverable", {
    /**
     * @return `true` if element is hoverable
     */
    get: function get() {
      return this.getPropertyValue("hoverable");
    },

    /**
     * Controls if the element is hoverable (hover events are registered).
     *
     * Use `over` and `out` events, to watch for those respective actions.
     *
     * @default false
     * @param value `true` if element can be hovered
     */
    set: function set(value) {
      var _this = this;

      value = _utils_Type__WEBPACK_IMPORTED_MODULE_29__.toBoolean(value);

      if (this.setPropertyValue("hoverable", value)) {
        if (!value && !this.isInteractive()) {// void
        } else {
          this.applyCursorStyle();
          this.interactions.hoverable = value; // setEventDisposer will also remove listeners if value == false

          this.interactions.setEventDisposer("sprite-hoverable", value, function () {
            return new _utils_Disposer__WEBPACK_IMPORTED_MODULE_6__.MultiDisposer([_this.events.on("over", _this.handleOver, _this, false), _this.events.on("out", _this.handleOut, _this, false)]);
          });
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Handles tasks when element becomes hovered:
   * * Shows [[Tooltip]] if applicable
   * * Applies "hover" state
   *
   * @ignore Exclude from docs
   * @param ev Event object
   */

  Sprite.prototype.handleOver = function (ev) {
    if (this._outTimeout) {
      this._outTimeout.dispose();
    }

    if (this.isHover) {
      if (this.states.hasKey("hover")) {
        //this.setState("hover");
        // This will check `isHover` and will set "hover" state
        if (!this.isHidden) {
          this.applyCurrentState();
        }
      }

      var point = void 0;

      if (ev && ev.pointer) {
        point = _utils_Utils__WEBPACK_IMPORTED_MODULE_24__.documentPointToSvg(ev.pointer.point, this.svgContainer.SVGContainer, this.svgContainer.cssScale);
      }

      if (this.showTooltipOn == "hover") {
        this.showTooltip(point);
      }
    } else {
      if (this.showTooltipOn == "hover") {
        this.hideTooltip();
      }

      if (!this.isHidden && this.states.hasKey("hover")) {
        this.applyCurrentState();
      }
    }
  };
  /**
   * Handles tasks when element loses hover:
   *
   * * Hides [[Tooltip]]
   * * Applies default state
   *
   * @ignore Exclude from docs
   * @param ev [description]
   */


  Sprite.prototype.handleOut = function (ev) {
    var _this = this;

    if (this.tooltip && this.tooltip.targetSprite == this && this.tooltip.keepTargetHover) {
      this._outTimeout = this.setTimeout(function () {
        if (!_this.tooltip.isHover) {
          if (_this.tooltip.targetSprite == _this) {
            _this.hideTooltip();
          }

          _this._outTimeout = _this.setTimeout(_this.handleOutReal.bind(_this), _this.rollOutDelay);
        }
      }, 10);
      return;
    }

    if (this.showTooltipOn == "hover") {
      this.hideTooltip();
    }

    this._outTimeout = this.setTimeout(this.handleOutReal.bind(this), this.rollOutDelay);
  };
  /**
   * [handleOutReal description]
   *
   * @ignore
   * @todo description
   */


  Sprite.prototype.handleOutReal = function () {
    if (!this.isHidden && !this.isHiding && this.states.hasKey("hover")) {
      this.applyCurrentState();
    }
  };

  Object.defineProperty(Sprite.prototype, "hitOptions", {
    /**
     * ==========================================================================
     * CLICKING/TAPPING AND TOGGLING STUFF
     * ==========================================================================
     * @hidden
     */

    /**
     * Returns Sprite's click (hit) options.
     *
     * Click (hit) options control things like double-click, timeouts, etc.
     *
     * @see {@link IHitOptions} for available options.
     * @return Options
     */
    get: function get() {
      if (!this.interactions.hitOptions) {
        if (this.virtualParent) {
          return this.virtualParent.hitOptions;
        }

        if (this._parent) {
          return this._parent.hitOptions;
        }
      }

      return this.interactions.hitOptions;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Prepares element's after `down` event.
   *
   * @ignore Exclude from docs
   * @param ev Event
   */

  Sprite.prototype.handleDown = function (ev) {
    if (this.interactions.downPointers.length === 1) {
      this.interactions.originalPosition = {
        x: this.pixelX,
        y: this.pixelY
      };
      this.interactions.originalAngle = this.rotation;
      this.interactions.originalScale = this.scale;

      if (this.states.hasKey("down")) {
        this.setState("down");
      }
    }
  };
  /**
   * Prepares element's after `up` event.
   *
   * @ignore Exclude from docs
   * @param ev Event
   */


  Sprite.prototype.handleUp = function (ev) {
    var _this = this;
    /*if (!this.isDown) {
        this.interactions.originalPosition = null;
        this.interactions.originalAngle = null;
        this.interactions.originalScale = null;
    }*/


    this._isResized = false;

    if (this.states.hasKey("down")) {
      this.applyCurrentState();
    }

    if (this.showTooltipOn == "hit") {
      this.updateTooltipPosition(ev.pointer ? ev.pointer.point : undefined);

      this._disposers.push(_Registry__WEBPACK_IMPORTED_MODULE_17__.registry.events.once("exitframe", function () {
        _this.showTooltip();
      }));

      this._disposers.push((0,_interaction_Interaction__WEBPACK_IMPORTED_MODULE_14__.getInteraction)().body.events.once("down", function (ev) {
        _this.hideTooltip();
      }));
    }
  };

  Object.defineProperty(Sprite.prototype, "clickable", {
    /**
     * @return {boolean}
     */
    get: function get() {
      return this.getPropertyValue("clickable");
    },

    /**
     * Indicates if the element is clickable.
     *
     * Some type of the elements, like buttons are clickable by default.
     *
     * Most of the elements are not clickable by default.
     *
     * Use `hit`, `doublehit`, `up`, `down`, `toggled` events to watch for
     * respective click/touch actions.
     *
     * @param value `true` if element can be clicked
     */
    set: function set(value) {
      var _this = this;

      value = _utils_Type__WEBPACK_IMPORTED_MODULE_29__.toBoolean(value);

      if (this.setPropertyValue("clickable", value)) {
        if (!value && !this.isInteractive()) {// void
        } else {
          this.applyCursorStyle();
          this.interactions.clickable = value; // setEventDisposer will also remove listeners if value == false

          this.interactions.setEventDisposer("sprite-clickable", value, function () {
            return new _utils_Disposer__WEBPACK_IMPORTED_MODULE_6__.MultiDisposer([_this.events.on("down", _this.handleDown, _this, false), _this.events.on("up", _this.handleUp, _this, false)]);
          });
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "togglable", {
    /**
     * @return Is togglable?
     */
    get: function get() {
      return this.getPropertyValue("togglable");
    },

    /**
     * Indicates if element can be toggled on and off by subsequent clicks/taps.
     *
     * Togglable element will alternate its `isActive` property between `true`
     * and `false` with each click.
     *
     * @param value Is togglable?
     */
    set: function set(value) {
      var _this = this;

      value = _utils_Type__WEBPACK_IMPORTED_MODULE_29__.toBoolean(value);

      if (this.setPropertyValue("togglable", value)) {
        if (!value && !this.isInteractive()) {// void
        } else {
          // setEventDisposer will also remove listeners if value == false
          this.interactions.setEventDisposer("sprite-togglable", value, function () {
            return _this.events.on("hit", _this.handleToggle, _this, false);
          });
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Handles toggling of the element.
   *
   * @ignore Exclude from docs
   * @param ev Event
   */

  Sprite.prototype.handleToggle = function (ev) {
    this.isActive = !this.isActive;
  };

  Object.defineProperty(Sprite.prototype, "contextMenuDisabled", {
    /**
     * @return Context menu disabled?
     */
    get: function get() {
      return this.getPropertyValue("contextMenuDisabled");
    },

    /**
     * Should element prevent context menu to be displayed, e.g. when
     * right-clicked?
     *
     * @default false
     * @param value Context menu disabled?
     */
    set: function set(value) {
      value = _utils_Type__WEBPACK_IMPORTED_MODULE_29__.toBoolean(value);

      if (this.setPropertyValue("contextMenuDisabled", value)) {
        this.interactions.contextMenuDisabled = value;
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "url", {
    /**
     * @return URL
     */
    get: function get() {
      return this.getPropertyValue("url");
    },

    /**
     * Click-through URL for this element.
     *
     * If set, clicking/tapping this element will open the new URL in a target
     * window/tab as set by `urlTarget`.
     *
     * Please note that URL will be parsed by data placeholders in curly
     * brackets, to be populated from data. E.g.:
     *
     * ```TypeScript
     * series.columns.template.url = "https://www.google.com/search?q={category.urlEncode()}";
     * ```
     * ```JavaScript
     * series.columns.template.url = "https://www.google.com/search?q={category.urlEncode()}";
     * ```
     * ```JSON
     * {
     *   // ...
     *   "series": [{
     *     // ...
     *     "columns": {
     *       "url": "https://www.google.com/search?q={category.urlEncode()}"
     *     }
     *   }]
     * }
     * ```
     *
     * @param value URL
     */
    set: function set(value) {
      if (this.setPropertyValue("url", value)) {
        if (this._urlDisposer) {
          this._urlDisposer.dispose();
        } // If URL is not empty, set up events


        if (_utils_Utils__WEBPACK_IMPORTED_MODULE_24__.isNotEmpty(value)) {
          this._urlDisposer = this.events.on("hit", this.urlHandler, this, false); // Set other required parameters

          this.clickable = true;
          this.cursorOverStyle = _interaction_Mouse__WEBPACK_IMPORTED_MODULE_15__.MouseCursorStyle.pointer;
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "baseId", {
    /**
     * [baseId description]
     *
     * @ignore
     * @return [description]
     */
    get: function get() {
      if (!this._baseId && this._parent) {
        this.baseId = this._parent.baseId;
      }

      return this._baseId;
    },

    /**
     * [baseId description]
     *
     * @ignore
     * @param  value  [description]
     */
    set: function set(value) {
      this.setBaseId(value);
    },
    enumerable: true,
    configurable: true
  });

  Sprite.prototype.setBaseId = function (value) {
    if (value != this._baseId) {
      if (this.invalid) {
        this.invalid = false;
        _Registry__WEBPACK_IMPORTED_MODULE_17__.registry.removeFromInvalidSprites(this);
        this.invalidate();
      }

      this._baseId = value;
    }
  };

  Object.defineProperty(Sprite.prototype, "baseSprite", {
    /**
     * Returns the mail chart object that this element belongs to.
     *
     * In most cases it will mean the chart object.
     *
     * Can be used to retrieve chart object in various events and adapters.
     *
     * ```TypeScript
     * chart.seriesContainer.events.on("hit", function(ev) {
     *   console.log(ev.target.baseSprite);
     * });
     * ```
     * ```JavaScript
     * chart.seriesContainer.events.on("hit", function(ev) {
     *   console.log(ev.target.baseSprite);
     * });
     * ```
     * ```JSON
     * {
     *   // ...
     *   "seriesContainer": {
     *     "events": {
     *       "hit": function(ev) {
     *         console.log(ev.target.baseSprite);
     *       }
     *     }
     *   }
     * }
     * ```
     *
     * @readonly
     * @return  Base chart object
     */
    get: function get() {
      if (this.isBaseSprite) {
        return this;
      } else if (this._parent) {
        return this._parent.baseSprite;
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "urlTarget", {
    /**
     * @return URL target
     */
    get: function get() {
      return this.getPropertyValue("urlTarget");
    },

    /**
     * Target to use for URL clicks:
     *
     * * _blank
     * * _self (default)
     * * _parent
     * * _top
     * * Name of the window/frame
     *
     * Ignored if `url` is not set.
     *
     * @param value URL target
     */
    set: function set(value) {
      this.setPropertyValue("urlTarget", value);
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Handles URL transition on element click.
   *
   * @ignore Exclude from docs
   * @param ev An event object
   */

  Sprite.prototype.urlHandler = function (ev) {
    // Is URL set?
    if (_utils_Utils__WEBPACK_IMPORTED_MODULE_24__.isNotEmpty(this.url)) {
      // Proceed to the URL
      var url = this.populateString(this.url);

      if (this.urlTarget === "_self") {
        window.location.href = url;
      } else {
        window.open(url, this.urlTarget);
      }
    }
  };

  Object.defineProperty(Sprite.prototype, "swipeOptions", {
    /**
     * ==========================================================================
     * SWIPING GESTURE TRACKING
     * ==========================================================================
     * @hidden
     */

    /**
     * Returns element's swipe gesture options.
     *
     * @return Swipe gesture options
     */
    get: function get() {
      if (!this.interactions.swipeOptions) {
        if (this.virtualParent) {
          return this.virtualParent.swipeOptions;
        }

        if (this._parent) {
          return this._parent.swipeOptions;
        }
      }

      return this.interactions.swipeOptions;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "swipeable", {
    /**
     * @return Element swipable?
     */
    get: function get() {
      return this.getPropertyValue("swipeable");
    },

    /**
     * Controls if element is swipeable.
     *
     * Swipable element will invoke `swipe`, `swipeleft` and `swiperight` events,
     * when quick horizontal drag action is performed with either mouse or touch.
     *
     * Please note that combining swipe and drag is possible, however will incur
     * a slight but noticeable delay in drag start.
     *
     * @param value  Element swipable?
     */
    set: function set(value) {
      value = _utils_Type__WEBPACK_IMPORTED_MODULE_29__.toBoolean(value);

      if (this.setPropertyValue("swipeable", value)) {
        this.applyCursorStyle();

        if (!value && !this.isInteractive()) {// void
        } else {
          this.interactions.swipeable = value;
        } //interaction.processSwipeable(this);

      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "trackable", {
    /**
     * @return Track cursor movement over element?
     */
    get: function get() {
      return this.getPropertyValue("trackable");
    },

    /**
     * ==========================================================================
     * POINTER TRACKING
     * ==========================================================================
     * @hidden
     */

    /**
     * Indicates if the element is trackable (mouse position over it is reported to
     * event listeners).
     *
     * Will invoke `track` events whenever pointer (cursor) changes position
     * while over element.
     *
     * Please note, touch devices will also invoke `track` events when touch
     * point is moved while holding down on a trackable element.
     *
     * @param value Track cursor movement over element?
     */
    set: function set(value) {
      value = _utils_Type__WEBPACK_IMPORTED_MODULE_29__.toBoolean(value);

      if (this.setPropertyValue("trackable", value)) {
        if (!value && !this.isInteractive()) {// void
        } else {
          this.applyCursorStyle();
          this.interactions.trackable = value;
        } //interaction.processTrackable(this);

      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "wheelable", {
    /**
     * @return Mouse wheel events enabled?
     */
    get: function get() {
      return this.getPropertyValue("wheelable");
    },

    /**
     * ==========================================================================
     * MOUSE-WHEEL RELATED
     * ==========================================================================
     * @hidden
     */

    /**
     * Indicates if the element can be interacted with mouse wheel.
     *
     * Will invoke `wheel`, `wheelup`, `wheeldown`, `wheelleft`, and `wheelright`
     * events when using mouse wheel over the element.
     *
     * @param value Mouse wheel events enabled?
     */
    set: function set(value) {
      if (this.setPropertyValue("wheelable", value)) {
        if (!value && !this.isInteractive()) {// void
        } else {
          this.applyCursorStyle();
          this.interactions.wheelable = value;
        } //interaction.processWheelable(this);

      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "resizable", {
    /**
     * @return Element resizable?
     */
    get: function get() {
      return this.getPropertyValue("resizable");
    },

    /**
     * ==========================================================================
     * RESIZE
     * ==========================================================================
     * @hidden
     */

    /**
     * Indicates if this element is resizable.
     *
     * Enabling resize will turn on various interactions on the element. Their
     * actual functionality will depend on other properties.
     *
     * If the element also `draggable`, resize will only happen with two points
     * of contact on a touch device.
     *
     * If the element is not draggable, resize can be performed with just one
     * point of contact, touch or mouse.
     *
     * Will invoke `resize` event every time the size of the element changes.
     *
     * @param value  Element resizable?
     */
    set: function set(value) {
      var _this = this;

      value = _utils_Type__WEBPACK_IMPORTED_MODULE_29__.toBoolean(value);

      if (this.setPropertyValue("resizable", value)) {
        if (!value && !this.isInteractive()) {// void
        } else {
          this.applyCursorStyle();
          this.interactions.resizable = value; // setEventDisposer will also remove listeners if value == false

          this.interactions.setEventDisposer("sprite-resizable", value, function () {
            return new _utils_Disposer__WEBPACK_IMPORTED_MODULE_6__.MultiDisposer([_this.events.on("down", _this.handleDown, _this, false), _this.events.on("resize", _this.handleResize, _this, false)]);
          });
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Handles resize intermediate step.
   *
   * By default this method resizes actual element. Each element, can override
   * this method to implement their own resize logic.
   *
   * @ignore Exclude from docs
   * @param ev Event object
   */

  Sprite.prototype.handleResize = function (ev) {
    if (!this.interactions.isTouchProtected || !ev.touch) {
      this._isResized = true;
      this.scale = this.interactions.originalScale * ev.scale;
      this.validatePosition();
      /*center: (io.draggable
      ? $math.getMidPoint(point1, point2)
      : {
          "x": io.originalPosition.x,
          "y": io.originalPosition.y
      })*/
      //this.moveTo(this.originalPosition.x + ev.shift.x, this.originalPosition.y + ev.shift.y);

      if (this.draggable || this.dragWhileResize) {
        this._isDragged = false;
        var svgPoint1 = _utils_Utils__WEBPACK_IMPORTED_MODULE_24__.documentPointToSvg(ev.point1, this.htmlContainer, this.svgContainer.cssScale);
        var svgPoint2 = _utils_Utils__WEBPACK_IMPORTED_MODULE_24__.documentPointToSvg(ev.point2, this.htmlContainer, this.svgContainer.cssScale);
        var svgMidPoint = _utils_Math__WEBPACK_IMPORTED_MODULE_25__.getMidPoint(svgPoint1, svgPoint2);
        var parentPoint1 = _utils_Utils__WEBPACK_IMPORTED_MODULE_24__.documentPointToSprite(ev.startPoint1, this._parent);
        var parentPoint2 = _utils_Utils__WEBPACK_IMPORTED_MODULE_24__.documentPointToSprite(ev.startPoint2, this._parent);
        var originalPosition = this.interactions.originalPosition;
        var originalScale = this.interactions.originalScale;

        if (originalPosition) {
          var spritePoint1 = {
            x: (parentPoint1.x - originalPosition.x) / originalScale,
            y: (parentPoint1.y - originalPosition.y) / originalScale
          };
          var spritePoint2 = {
            x: (parentPoint2.x - originalPosition.x) / originalScale,
            y: (parentPoint2.y - originalPosition.y) / originalScale
          };
          var spriteMidPoint = _utils_Math__WEBPACK_IMPORTED_MODULE_25__.getMidPoint(spritePoint1, spritePoint2);
          var parentPoint = _utils_Utils__WEBPACK_IMPORTED_MODULE_24__.svgPointToSprite(svgMidPoint, this._parent);
          this.moveTo({
            x: parentPoint.x - spriteMidPoint.x * this.scale,
            y: parentPoint.y - spriteMidPoint.y * this.scale
          }, undefined, undefined, true);
        }
      }
    }
  };

  Object.defineProperty(Sprite.prototype, "cursorOptions", {
    /**
     * ==========================================================================
     * MOUSE-RELATED
     * ==========================================================================
     * @hidden
     */

    /**
     * Returns element's cursor options.
     *
     * Cursor options usually define cursor style for various states of the
     * hovered element.
     *
     * Elements inherit `cursorOptions` from their parents if they don't have
     * them set explicitly.
     *
     * @see {@link ICursorOptions} for a list of available options
     * @return Cursor options
     */
    get: function get() {
      if (!this.interactions.cursorOptions) {
        if (this.virtualParent) {
          return this.virtualParent.cursorOptions;
        }

        if (this._parent) {
          return this._parent.cursorOptions;
        }
      }

      return this.interactions.cursorOptions;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "cursorOverStyle", {
    /**
     * A shortcut to setting mouse cursor on hover.
     *
     * Example:
     *
     * ```TypeScript
     * series.slices.template.cursorOverStyle = am4core.MouseCursorStyle.pointer;
     * ```
     * ```JavaScript
     * series.slices.template.cursorOverStyle = am4core.MouseCursorStyle.pointer;
     * ```
     * ```JSON
     * {
     *   // ...
     *   "series": {
     *     // ...
     *     "slices": {
     *       "cursorOverStyle": "pointer"
     *     }
     *   }
     * }
     * ```
     *
     * @param style An array of styles to apply onhover
     */
    set: function set(style) {
      if (!this.cursorOptions.overStyle) {
        this.interactions.cursorOptions = {
          defaultStyle: this.cursorOptions.defaultStyle
        };
      }

      this.cursorOptions.overStyle = style;
      (0,_interaction_Interaction__WEBPACK_IMPORTED_MODULE_14__.getInteraction)().applyCursorOverStyle(this.interactions);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "cursorDownStyle", {
    /**
     * A shortcut to setting mouse cursor when button is pressed down.
     *
     * Example:
     *
     * ```TypeScript
     * series.slices.template.cursorDownStyle = am4core.MouseCursorStyle.grabbing;
     * ```
     * ```JavaScript
     * series.slices.template.cursorDownStyle = am4core.MouseCursorStyle.grabbing;
     * ```
     * ```JSON
     * {
     *   // ...
     *   "series": {
     *     // ...
     *     "slices": {
     *       "cursorDownStyle": "grabbing"
     *     }
     *   }
     * }
     * ```
     *
     * @param style An array of styles to apply onhover
     */
    set: function set(style) {
      this.cursorOptions.downStyle = style;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Applies default cursor styles for interactable elements.
   *
   * @ignore Exclude from docs
   * @todo Determine if this is necessary. Maybe let's not apply any cursor styles by default
   */

  Sprite.prototype.applyCursorStyle = function () {// Draggable styles

    /*if (this.draggable) {
          if (!$type.hasValue(this.cursorOptions.overStyle)) {
            this.cursorOptions.overStyle = MouseCursorStyle.grab;
        }
          if (!$type.hasValue(this.cursorOptions.downStyle)) {
            this.cursorOptions.downStyle = MouseCursorStyle.grabbing;
        }
    }*/
  };

  Object.defineProperty(Sprite.prototype, "interactionsEnabled", {
    /**
     * @return Is interaction enabled for this element?
     */
    get: function get() {
      var value = this.getPropertyValue("interactionsEnabled");

      if (value === false) {
        return false;
      }

      if (this.virtualParent) {
        return this.virtualParent.interactionsEnabled;
      }

      if (this._parent) {
        return this._parent.interactionsEnabled;
      }

      return true;
    },

    /**
     * Setting this to `false` will effectively disable all interactivity on the
     * element.
     *
     * @param value  Is interaction enabled for this element?
     */
    set: function set(value) {
      value = _utils_Type__WEBPACK_IMPORTED_MODULE_29__.toBoolean(value);

      if (this.setPropertyValue("interactionsEnabled", value)) {
        var pointerEvents = null; // must be null, not "null"!

        if (!value) {
          pointerEvents = "none";
        } else {
          // this is for IE
          this.group.node.style.pointerEvents = "";
        }

        this.group.node.style.pointerEvents = pointerEvents;
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "exporting", {
    /**
     * @return Export instance
     */
    get: function get() {
      return this.getExporting();
    },

    /**
     * ==========================================================================
     * EXPORT-RELATED STUFF
     * ==========================================================================
     * @hidden
     */

    /**
     * An [[Export]] instance.
     *
     * Used to access API of the chart export functionality.
     *
     * If `exporting` is not set, the element inherits [[Export]] instance from
     * its parents.
     *
     * Upon request, if no parent has such instance, a new one is created, using
     * default settings, what in most cases is just enough.
     *
     * @see {@link https://www.amcharts.com/docs/v4/concepts/exporting/} for more info about exporting
     * @param exp  Export
     */
    set: function set(exp) {
      this._exporting.set(exp, exp);
    },
    enumerable: true,
    configurable: true
  });
  /**
   * This is here as a method so that inheriting classes could override it.
   *
   * @return Export instance
   */

  Sprite.prototype.getExporting = function () {
    var _export = this._exporting.get();

    if (_export) {
      return _export;
    } else {
      if (this.isStandaloneInstance || !this._parent) {
        _export = new _export_Export__WEBPACK_IMPORTED_MODULE_23__.Export(this.svgContainer.SVGContainer);
        _export.sprite = this;
        _export.language = this.language;
        _export.numberFormatter = this.numberFormatter;
        _export.dateFormatter = this.dateFormatter;
        _export.durationFormatter = this.durationFormatter;

        this._exporting.set(_export, _export);
      } else {
        return this._parent.exporting;
      }
    }

    return _export;
  };

  Object.defineProperty(Sprite.prototype, "exportable", {
    /**
     * @return Export?
     */
    get: function get() {
      return this._exportable;
      /*const svgContainer = this.svgContainer;
      return !svgContainer || $array.indexOf(svgContainer.nonExportableSprites, this) == -1;*/
    },

    /**
     * If set to `false` this element will be omitted when exporting the chart
     * to an image.
     *
     * @default true
     * @param value  Export?
     */
    set: function set(value) {
      var svgContainer = this.svgContainer;
      this._exportable = value;

      if (svgContainer) {
        if (value) {
          _utils_Array__WEBPACK_IMPORTED_MODULE_27__.remove(svgContainer.nonExportableSprites, this);
        } else if (_utils_Array__WEBPACK_IMPORTED_MODULE_27__.indexOf(svgContainer.nonExportableSprites, this) == -1) {
          svgContainer.nonExportableSprites.push(this);
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  /**
   * ==========================================================================
   * MODAL/POPUP RELATED STUFF
   * ==========================================================================
   * @hidden
   */

  /**
   * Private method to be used for "classPrefix" adapter for modals/popups.
   *
   * @param value  Prefix
   */

  Sprite.prototype.modalPrefix = function (value) {
    value = _Options__WEBPACK_IMPORTED_MODULE_16__.options.classNamePrefix + value;
    return value;
  };

  Object.defineProperty(Sprite.prototype, "modal", {
    /**
     * Returns a [[Modal]] instance, associated with this chart.
     * (elements top parent)
     *
     * Accessing modal does not make it appear. To make a modal appear, use
     * `showModal()` method.
     *
     * @see {@link Modal} for more information about using Modal windows
     * @return Modal instance
     */
    get: function get() {
      var svgContainer = this.svgContainer;

      if (svgContainer) {
        var modal = svgContainer.modal;

        if (!modal.adapter.has("classPrefix", this.modalPrefix)) {
          modal.adapter.add("classPrefix", this.modalPrefix);
        }

        return modal;
      }
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Opens a modal window with specific content (`text` parameter) and,
   * optionally, `title`.
   *
   * The `text` parameter can contain HTML content.
   *
   * @see {@link Modal} for more information about using Modal windows
   * @param text   Modal contents
   * @param title  Title for the modal window
   */

  Sprite.prototype.openModal = function (text, title) {
    var svgContainer = this.svgContainer;

    if (svgContainer) {
      return svgContainer.openModal(text, title);
    }
  };
  /**
   * Hides modal window if there is one currently open.
   */


  Sprite.prototype.closeModal = function () {
    var svgContainer = this.svgContainer;

    if (svgContainer) {
      svgContainer.closeModal();
    }
  };

  Object.defineProperty(Sprite.prototype, "popups", {
    /**
     * A list of popups for this chart.
     *
     * @return Popups
     */
    get: function get() {
      var svgContainer = this.svgContainer;

      if (svgContainer) {
        var popups = svgContainer.popups;
        popups.template.sprite = this;

        if (!popups.template.adapter.has("classPrefix", this.modalPrefix)) {
          popups.template.adapter.add("classPrefix", this.modalPrefix);
        }

        return popups;
      }
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Creates, opens, and returns a new [[Popup]] window.
   *
   * `text` can be any valid HTML.
   *
   * `title` is currently not supported.
   *
   * @param text   Popup contents
   * @param title  Popup title
   * @return Popup instance
   */

  Sprite.prototype.openPopup = function (text, title) {
    var svgContainer = this.svgContainer;

    if (svgContainer) {
      return svgContainer.openPopup(text, title);
    }
  };
  /**
   * Closes all currently open popup windows
   */


  Sprite.prototype.closeAllPopups = function () {
    var svgContainer = this.svgContainer;

    if (svgContainer) {
      svgContainer.closeAllPopups();
    }
  };

  Object.defineProperty(Sprite.prototype, "x", {
    /**
     * @return X coordinate
     */
    get: function get() {
      return this.getPropertyValue("x");
    },

    /**
     * ==========================================================================
     * POSITIONAL PROPERTIES AND RELATED STUFF
     * ==========================================================================
     * @hidden
     */

    /**
     * Element's absolute or relative X coordinate.
     *
     * If setting both X and Y, please consider using `moveTo()` method instead,
     * as it will be faster to set both coordinates at once.
     *
     * @param value X coordinate
     */
    set: function set(value) {
      if (!this.isDragged) {
        this.setPercentProperty("x", value, false, true, this._positionPrecision, true);
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "pixelX", {
    /**
     * Returns element's current absolute X coordinate in pixels.
     *
     * @readonly
     * @return X coordinate (px)
     */
    get: function get() {
      var value = _utils_Math__WEBPACK_IMPORTED_MODULE_25__.fitToRange(this.getPixelX(this.x), this.minX, this.maxX);

      if (!this._adapterO) {
        return value;
      } else {
        return this._adapterO.apply("pixelX", value);
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "relativeX", {
    /**
     * Returns element's current relative X coordinate in [[Percent]].
     *
     * @return X coordinate ([[Percent]])
     */
    get: function get() {
      if (!this._adapterO) {
        return this.getRelativeX(this.x);
      } else {
        return this._adapterO.apply("relativeX", this.getRelativeX(this.x));
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "minX", {
    /**
     * @ignore Exclude from docs
     * @return Min X (px)
     */
    get: function get() {
      return this.getPropertyValue("minX");
    },

    /**
     * The smallest allowable absolute X coordinate for this element.
     *
     * This is used to contain element movement within certain boundaries.
     *
     * @ignore Exclude from docs
     * @param value Min X (px)
     */
    set: function set(value) {
      if (_utils_Type__WEBPACK_IMPORTED_MODULE_29__.isNumber(value)) {
        value = _utils_Math__WEBPACK_IMPORTED_MODULE_25__.round(value, this._positionPrecision, true);
        this.setPropertyValue("minX", value, false, true);
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "maxX", {
    /**
     * @ignore Exclude from docs
     * @return Max X (px)
     */
    get: function get() {
      return this.getPropertyValue("maxX");
    },

    /**
     * The biggest allowable absolute X coordinate for this element.
     *
     * This is used to contain element movement within certain boundaries.
     *
     * @ignore Exclude from docs
     * @param value Max X (px)
     */
    set: function set(value) {
      if (_utils_Type__WEBPACK_IMPORTED_MODULE_29__.isNumber(value)) {
        value = _utils_Math__WEBPACK_IMPORTED_MODULE_25__.round(value, this._positionPrecision, true);
        this.setPropertyValue("maxX", value, false, true);
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "y", {
    /**
     * @return Y coordinate
     */
    get: function get() {
      return this.getPropertyValue("y");
    },

    /**
     * Element's absolute or relative Y coordinate.
     *
     * If setting both X and Y, please consider using `moveTo()` method instead,
     * as it will be faster to set both coordinates at once.
     *
     * @param value  Y coordinate
     */
    set: function set(value) {
      if (!this.isDragged) {
        this.setPercentProperty("y", value, false, true, this._positionPrecision, true);
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "pixelY", {
    /**
     * Returns element's current absolute Y coordinate in pixels.
     *
     * @readonly
     * @return Y coordinate (px)
     */
    get: function get() {
      var value = _utils_Math__WEBPACK_IMPORTED_MODULE_25__.fitToRange(this.getPixelY(this.y), this.minY, this.maxY);

      if (!this._adapterO) {
        return value;
      } else {
        return this._adapterO.apply("pixelY", value);
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "relativeY", {
    /**
     * Returns element's current relative Y coordinate in [[Percent]].
     *
     * @readonly
     * @return Y coordinate ([[Percent]])
     */
    get: function get() {
      if (!this._adapterO) {
        return this.getRelativeX(this.y);
      } else {
        return this._adapterO.apply("relativeY", this.getRelativeX(this.y));
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "minY", {
    /**
     * @ignore Exclude from docs
     * @return Min Y (px)
     */
    get: function get() {
      return this.getPropertyValue("minY");
    },

    /**
     * The smallest allowable absolute Y coordinate for this element.
     *
     * This is used to contain element movement within certain boundaries.
     *
     * @ignore Exclude from docs
     * @param value Min Y (px)
     */
    set: function set(value) {
      if (_utils_Type__WEBPACK_IMPORTED_MODULE_29__.isNumber(value)) {
        value = _utils_Math__WEBPACK_IMPORTED_MODULE_25__.round(value, this._positionPrecision, true);
        this.setPropertyValue("minY", value, false, true);
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "maxY", {
    /**
     * @ignore Exclude from docs
     * @return Max Y (px)
     */
    get: function get() {
      return this.getPropertyValue("maxY");
    },

    /**
     * The biggest allowable absolute Y coordinate for this element.
     *
     * This is used to contain element movement within certain boundaries.
     *
     * @ignore Exclude from docs
     * @param value  Max Y (px)
     */
    set: function set(value) {
      if (_utils_Type__WEBPACK_IMPORTED_MODULE_29__.isNumber(value)) {
        value = _utils_Math__WEBPACK_IMPORTED_MODULE_25__.round(value, this._positionPrecision, true);
        this.setPropertyValue("maxY", value, false, true);
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "dx", {
    /**
     * @return Horizontal offset (px)
     */
    get: function get() {
      return this.getPropertyValue("dx");
    },

    /**
     * A horizontal offset for the element in pixels.
     *
     * Can be negative value for offset to the left.
     *
     * @param value  Horizontal offset (px)
     */
    set: function set(value) {
      if (_utils_Type__WEBPACK_IMPORTED_MODULE_29__.isNumber(value)) {
        value = _utils_Math__WEBPACK_IMPORTED_MODULE_25__.round(value, this._positionPrecision, true);
        this.setPropertyValue("dx", value, false, true);
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "dy", {
    /**
     * @return Vertical offset (px)
     */
    get: function get() {
      return this.getPropertyValue("dy");
    },

    /**
     * A vertical offset for the element in pixels.
     *
     * Can be negative value for offset upwards.
     *
     * @param value  Vertical offset (px)
     */
    set: function set(value) {
      if (_utils_Type__WEBPACK_IMPORTED_MODULE_29__.isNumber(value)) {
        value = _utils_Math__WEBPACK_IMPORTED_MODULE_25__.round(value, this._positionPrecision, true);
        this.setPropertyValue("dy", value, false, true);
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "rotation", {
    /**
     * @return Rotation (0-360)
     */
    get: function get() {
      return this.getPropertyValue("rotation");
    },

    /**
     * Rotation of the element in degrees. (0-360)
     *
     * Note: For convenience purposes, negative values (for counter-clockwise
     * rotation) and values exceeding 360 can also be used.
     *
     * @param value  Rotation (0-360)
     */
    set: function set(value) {
      value = _utils_Type__WEBPACK_IMPORTED_MODULE_29__.toNumber(value);

      if (!_utils_Type__WEBPACK_IMPORTED_MODULE_29__.isNumber(value)) {
        value = 0;
      }

      this.setPropertyValue("rotation", value, false, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "align", {
    /**
     * @return Horizontal align
     */
    get: function get() {
      return this.getPropertyValue("align");
    },

    /**
     * Controls horizontal alignment of the element.
     *
     * This is used by parent [[Container]] when layouting its children.
     *
     * @param value  Horizontal align
     */
    set: function set(value) {
      value = _utils_Type__WEBPACK_IMPORTED_MODULE_29__.toText(value);

      if (this.setPropertyValue("align", value)) {
        if (this._parent) {
          this._parent.invalidateLayout();
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "valign", {
    /**
     * @return Vertical align
     */
    get: function get() {
      return this.getPropertyValue("valign");
    },

    /**
     * Controls vertical alignment of the element.
     *
     * This is used by parent [[Container]] when layouting its children.
     *
     * @param value  Vertical align
     */
    set: function set(value) {
      value = _utils_Type__WEBPACK_IMPORTED_MODULE_29__.toText(value);

      if (this.setPropertyValue("valign", value)) {
        if (this._parent) {
          this._parent.invalidateLayout();
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "horizontalCenter", {
    /**
     * @return Horizontal center
     */
    get: function get() {
      return this.getPropertyValue("horizontalCenter");
    },

    /**
     * Controls which part of the element to treat as a horizontal center.
     *
     * The setting will be used when positioning, resizing and rotating the
     * element.
     *
     * @param value  Horizontal center
     */
    set: function set(value) {
      value = _utils_Type__WEBPACK_IMPORTED_MODULE_29__.toText(value);

      if (this.setPropertyValue("horizontalCenter", value)) {
        this.updateCenter();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "verticalCenter", {
    /**
     * @return Vertical center
     */
    get: function get() {
      return this.getPropertyValue("verticalCenter");
    },

    /**
     * Controls which part of the element to treat as a vertical center.
     *
     * The setting will be used when positioning, resizing and rotating the
     * element.
     *
     * @param value  Vertical center
     */
    set: function set(value) {
      value = _utils_Type__WEBPACK_IMPORTED_MODULE_29__.toText(value);

      if (this.setPropertyValue("verticalCenter", value)) {
        this.updateCenter();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "maxWidth", {
    /**
     * @return Maximum width (px)
     */
    get: function get() {
      var maxWidth = this.getPropertyValue("maxWidth");

      if (!_utils_Type__WEBPACK_IMPORTED_MODULE_29__.isNumber(maxWidth)) {
        if (this._parent) {
          var parentWidth = this._parent.maxWidth;

          if (this._parent.layout != "absolute" && this.align != "none" && this.align != undefined) {
            parentWidth = parentWidth - this.pixelMarginLeft - this.pixelMarginRight;
          }

          return parentWidth;
        }
      }

      return maxWidth;
    },

    /**
     * ==========================================================================
     * DIMENSIONAL PROPERTIES AND RELATED STUFF
     * ==========================================================================
     * @hidden
     */

    /**
     * Maximum allowed width for the element in pixels.
     *
     * @param value  Maximum width (px)
     */
    set: function set(value) {
      this.setMaxWidth(value);
    },
    enumerable: true,
    configurable: true
  });

  Sprite.prototype.setMaxWidth = function (value) {
    var prevWidth = this.maxWidth;
    var prevHeight = this.maxHeight;

    if (this.setPropertyValue("maxWidth", value)) {
      if (_utils_Type__WEBPACK_IMPORTED_MODULE_29__.isNumber(this.relativeWidth)) {
        this.invalidate();
      }

      var event_2 = {
        type: "maxsizechanged",
        target: this,
        previousWidth: prevWidth,
        previousHeight: prevHeight
      };
      this.dispatchImmediately("maxsizechanged", event_2);
    }
  };

  Object.defineProperty(Sprite.prototype, "maxHeight", {
    /**
     * @return Maximum height (px)
     */
    get: function get() {
      var maxHeight = this.getPropertyValue("maxHeight");

      if (!_utils_Type__WEBPACK_IMPORTED_MODULE_29__.isNumber(maxHeight)) {
        if (this._parent) {
          var parentHeight = this._parent.maxHeight;

          if (this._parent.layout != "absolute" && this.valign != "none" && this.valign != undefined) {
            parentHeight = parentHeight - this.pixelMarginTop - this.pixelMarginBottom;
          }

          return parentHeight;
        }
      }

      return maxHeight;
    },

    /**
     * Maximum allowed height for the element in pixels.
     *
     * @param value  Maximum height (px)
     */
    set: function set(value) {
      this.setMaxHeight(value);
    },
    enumerable: true,
    configurable: true
  });

  Sprite.prototype.setMaxHeight = function (value) {
    var prevWidth = this.maxWidth;
    var prevHeight = this.maxHeight;

    if (this.setPropertyValue("maxHeight", value)) {
      if (_utils_Type__WEBPACK_IMPORTED_MODULE_29__.isNumber(this.relativeHeight)) {
        this.invalidate();
      }

      var event_3 = {
        type: "maxsizechanged",
        target: this,
        previousWidth: prevWidth,
        previousHeight: prevHeight
      };
      this.dispatchImmediately("maxsizechanged", event_3);
    }
  };

  Object.defineProperty(Sprite.prototype, "minWidth", {
    /**
     * @return Minimum width (px)
     */
    get: function get() {
      return this.getPropertyValue("minWidth");
    },

    /**
     * Minimum width of the element in pixels.
     *
     * Set to `undefined` to remove the limit.
     *
     * @param value  Minimum width (px)
     */
    set: function set(value) {
      this.setPropertyValue("minWidth", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "minHeight", {
    /**
     * @return Minimum height (px)
     */
    get: function get() {
      return this.getPropertyValue("minHeight");
    },

    /**
     * Minimum height for the element in pixels.
     *
     * Set to `undefined` to remove the limit.
     *
     * @param value  Minimum height (px)
     */
    set: function set(value) {
      this.setPropertyValue("minHeight", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "width", {
    /**
     * @return Width (absolute or relative)
     */
    get: function get() {
      return this.getPropertyValue("width");
    },

    /**
     * Element's absolute or relative width.
     *
     * The width can either be absolute, set in numeric pixels, or relative, set
     * in [[Percent]].
     *
     * Relative width will be calculated using closest measured ancestor
     * [[Container]].
     *
     * NOTE: `width` is an accessor, which allows setting width in pixels or
     * percent. It is a sort of a "shortcut" for the users. Actual renderer does
     * not ever use it. It uses either `pixelWidth` or `percentWidth`, so if
     * you need to add an adapter for width add it for either of the two
     * properties - whichever suits your requirements.
     *
     * @param value  Width (numeric in pixels or relative)
     */
    set: function set(value) {
      var changed = this.setPercentProperty("width", value, true, false, this._positionPrecision, true);

      if (changed) {
        this.percentWidth = undefined;
        this.relativeWidth = undefined;

        if (value instanceof _utils_Percent__WEBPACK_IMPORTED_MODULE_32__.Percent) {
          this.percentWidth = value.percent;

          if (_utils_Type__WEBPACK_IMPORTED_MODULE_29__.isNumber(this._pixelWidth)) {
            this.maxWidth = undefined;
          }

          this._pixelWidth = undefined;
        } else {
          this._pixelWidth = Number(value); //this._measuredWidth = this._pixelWidth;

          this.maxWidth = this._pixelWidth;
        }

        this.invalidatePosition();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "height", {
    /**
     * @return height (absolute or relative)
     */
    get: function get() {
      return this.getPropertyValue("height");
    },

    /**
     * Element's absolute or relative height.
     *
     * The height can either be absolute, set in numeric pixels, or relative, set
     * in [[Percent]].
     *
     * Relative height will be calculated using closest measured ancestor
     * [[Container]].
     *
     * NOTE: `height` is an accessor, which allows setting height in pixels or
     * percent. It is a sort of a "shortcut" for the users. Actual renderer does
     * not ever use it. It uses either `pixelHeight` or `percentHeight`, so if
     * you need to add an adapter for height add it for either of the two
     * properties - whichever suits your requirements.
     *
     * @param value  Height (numeric in pixels or relative)
     */
    set: function set(value) {
      var changed = this.setPercentProperty("height", value, true, false, this._positionPrecision, true);

      if (changed) {
        this.percentHeight = undefined;
        this._relativeHeight = undefined;

        if (value instanceof _utils_Percent__WEBPACK_IMPORTED_MODULE_32__.Percent) {
          this.percentHeight = value.percent;

          if (_utils_Type__WEBPACK_IMPORTED_MODULE_29__.isNumber(this._pixelHeight)) {
            this.maxHeight = undefined;
          }

          this._pixelHeight = undefined;
        } else {
          this._pixelHeight = Number(value); //this._measuredHeight = this._pixelHeight;

          this.maxHeight = this._pixelHeight; // yes, we reset maxWidth
        }

        this.invalidatePosition();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "pixelWidth", {
    /**
     * Returns element's width in pixels, if width was set. For actual width use measuredWidth property.
     *
     * @readonly
     * @return Width (px)
     */
    get: function get() {
      var width;

      if (_utils_Type__WEBPACK_IMPORTED_MODULE_29__.isNumber(this.percentWidth)) {
        width = this.maxWidth;
      } else if (_utils_Type__WEBPACK_IMPORTED_MODULE_29__.isNumber(this._pixelWidth)) {
        width = this._pixelWidth;
      } else {
        width = 0;
      }

      var minWidth = this.minWidth;

      if (minWidth != null && width < minWidth) {
        width = minWidth;
      }

      var value = _utils_Math__WEBPACK_IMPORTED_MODULE_25__.round(width, this._positionPrecision, true);

      if (!this._adapterO) {
        return value;
      } else {
        return this._adapterO.apply("pixelWidth", value);
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "pixelHeight", {
    /**
     * Returns element's height in pixels. For actual height use measuredHeight property.
     *
     * @readonly
     * @return Height (px)
     */
    get: function get() {
      var height;

      if (_utils_Type__WEBPACK_IMPORTED_MODULE_29__.isNumber(this.percentHeight)) {
        height = this.maxHeight;
      } else if (_utils_Type__WEBPACK_IMPORTED_MODULE_29__.isNumber(this._pixelHeight)) {
        height = this._pixelHeight;
      } else {
        height = 0; //this._measuredHeightSelf;
      }

      var minHeight = this.minHeight;

      if (minHeight != null && height < minHeight) {
        height = minHeight;
      }

      var value = _utils_Math__WEBPACK_IMPORTED_MODULE_25__.round(height, this._positionPrecision, true);

      if (!this._adapterO) {
        return value;
      } else {
        return this._adapterO.apply("pixelHeight", value);
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "relativeWidth", {
    /**
     * @return Relative width
     * @ignore
     */
    get: function get() {
      var relativeWidth = this._relativeWidth;

      if (_utils_Type__WEBPACK_IMPORTED_MODULE_29__.isNumber(relativeWidth)) {
        if (!this._adapterO) {
          return relativeWidth;
        } else {
          return this._adapterO.apply("relativeWidth", relativeWidth);
        }
      }
    },

    /**
     * Element's relative width in [[Percent]].
     * @ignore
     *
     * @param value  Relative width
     */
    set: function set(value) {
      if (this._relativeWidth != value) {
        this._relativeWidth = value; //			this.invalidate();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "relativeHeight", {
    /**
     * @return Relative height
     * @ignore
     */
    get: function get() {
      var relativeHeight = this._relativeHeight;

      if (_utils_Type__WEBPACK_IMPORTED_MODULE_29__.isNumber(relativeHeight)) {
        if (!this._adapterO) {
          return relativeHeight;
        } else {
          return this._adapterO.apply("relativeHeight", relativeHeight);
        }
      }
    },

    /**
     * Element's relative height in [[Percent]].
     *
     * @param value  Relative height
     * @ignore
     */
    set: function set(value) {
      if (this._relativeHeight != value) {
        this._relativeHeight = value; //			this.invalidate();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "measuredWidth", {
    /**
     * Returns element's measured width in pixels.
     *
     * A measured width is actual width of contents plus `paddingRight` and* `paddingLeft`, relative to sprite parent, meaning that
     * rotation and scale is taken into account.
     *
     * @readonly
     * @return Width (px)
     */
    get: function get() {
      if (this.disabled || this.__disabled) {
        return 0;
      }

      if (!this._adapterO) {
        return this._measuredWidth;
      } else {
        return this._adapterO.apply("measuredWidth", this._measuredWidth);
      } // it's not good to fit to min/max range as then rotations and scale won't be taken into account
      //return this.adapter.apply("measuredWidth", $math.fitToRange(this._measuredWidth, this.minWidth, this.maxWidth));

    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "measuredHeight", {
    /**
     * Returns elements's measured height in pixels.
     *
     * A measured height is actual height of contents plus `paddingTop` and `paddingBottom`, relative to sprite parent, meaning that
     * rotation and scale taken into account.
     *
     * @readonly
     * @return Height (px)
     */
    get: function get() {
      if (this.disabled || this.__disabled) {
        return 0;
      } // it's not good to fit to min/max range as then rotations and scale won't be taken into account
      //return this.adapter.apply("measuredHeight", $math.fitToRange(this._measuredHeight, this.minHeight, this.maxHeight));


      if (!this._adapterO) {
        return this._measuredHeight;
      } else {
        return this._adapterO.apply("measuredHeight", this._measuredHeight);
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "outerWidth", {
    /**
     * Returns element's measured width plus its left and right margins in
     * pixels.
     *
     * @readonly
     * @return Outer width (px)
     */
    get: function get() {
      var value = this.pixelWidth + this.pixelMarginRight + this.pixelMarginLeft;

      if (!this._adapterO) {
        return value;
      } else {
        return this._adapterO.apply("outerWidth", value);
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "outerHeight", {
    /**
     * Returns element's measured height plus its top and bottom margins in
     * pixels.
     *
     * @readonly
     * @return Outer height (px)
     */
    get: function get() {
      var value = this.pixelHeight + this.pixelMarginTop + this.pixelMarginBottom;

      if (!this._adapterO) {
        return value;
      } else {
        return this._adapterO.apply("outerHeight", value);
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "innerWidth", {
    /**
     * Returns element's measured inner width in pixels.
     *
     * Inner width is actual available space for content, e.g. element's width
     * minus horizontal padding.
     *
     * @readonly
     * @return Inner width (px)
     */
    get: function get() {
      var value = Math.max(0, this.pixelWidth - this.pixelPaddingRight - this.pixelPaddingLeft);

      if (!this._adapterO) {
        return value;
      } else {
        return this._adapterO.apply("innerWidth", value);
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "innerHeight", {
    /**
     * Returns element's measured inner height in pixels.
     *
     * Inner height is actual available space for content, e.g. element's height
     * minus vertical padding.
     *
     * @readonly
     * @return Inner height (px)
     */
    get: function get() {
      var value = Math.max(0, this.pixelHeight - this.pixelPaddingTop - this.pixelPaddingBottom);

      if (!this._adapterO) {
        return value;
      } else {
        return this._adapterO.apply("innerHeight", value);
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "globalScale", {
    /**
     * Returns element's current "global" scale.
     *
     * Scale values accumulate over hierarchy of elements.
     *
     * E.g. if a [[Container]] has `scale = 2` and it's child has a `scale = 2`,
     * the child's `globalScale` will be 4. (a multitude of `2 x 2`)
     *
     * @readonly
     * @return Global scale
     */
    get: function get() {
      var scale = this.scale;

      if (this._parent) {
        scale = scale * this._parent.globalScale;
      }

      if (!this._adapterO) {
        return scale;
      } else {
        return this._adapterO.apply("globalScale", scale);
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "scale", {
    /**
     * @return Scale (0-1)
     */
    get: function get() {
      return this.getPropertyValue("scale");
    },

    /**
     * Scale of the element.
     *
     * The scale is set from 0 (element reduced to nothing) to 1 (default size).
     * * 2 will mean element is increased twice.
     * * 0.5 - reduced by 50%.
     *
     * Etc.
     *
     * @param value  Scale (0-1)
     */
    set: function set(value) {
      value = _utils_Type__WEBPACK_IMPORTED_MODULE_29__.toNumber(value);

      if (value < 0) {
        value = 0;
      }

      if (value != this.getPropertyValue("scale")) {
        this.setPropertyValue("scale", value, false, true);
        this.handleGlobalScale();
      }
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Sets all four margins for the element at once.
   *
   * Margins are set in pixels.
   *
   * @param top     Top margin
   * @param right   Right margin
   * @param bottom  Bottom margin
   * @param left    Left margin
   * @return Current element
   */

  Sprite.prototype.margin = function (top, right, bottom, left) {
    this.marginTop = top;
    this.marginRight = right;
    this.marginBottom = bottom;
    this.marginLeft = left;
    return this;
  };

  Object.defineProperty(Sprite.prototype, "marginLeft", {
    /**
     * @return Margin value
     */
    get: function get() {
      return this.getPropertyValue("marginLeft");
    },

    /**
     * Left margin - absolute (px) or relative ([[Percent]]).
     *
     * @param value  Margin value
     */
    set: function set(value) {
      this.setPercentProperty("marginLeft", value, true, true, this._positionPrecision, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "marginRight", {
    /**
     * @return Margin value
     */
    get: function get() {
      return this.getPropertyValue("marginRight");
    },

    /**
     * Right margin - absolute (px) or relative ([[Percent]]).
     *
     * @param value  Margin value
     */
    set: function set(value) {
      this.setPercentProperty("marginRight", value, true, true, this._positionPrecision, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "marginTop", {
    /**
     * @return Margin value
     */
    get: function get() {
      return this.getPropertyValue("marginTop");
    },

    /**
     * Top margin - absolute (px) or relative ([[Percent]]).
     *
     * @param value  Margin value
     */
    set: function set(value) {
      this.setPercentProperty("marginTop", value, true, true, this._positionPrecision, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "marginBottom", {
    /**
     * @return Margin value
     */
    get: function get() {
      return this.getPropertyValue("marginBottom");
    },

    /**
     * Bottom margin - absolute (px) or relative ([[Percent]]).
     *
     * @param value  Margin value
     */
    set: function set(value) {
      this.setPercentProperty("marginBottom", value, true, true, this._positionPrecision, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "pixelMarginRight", {
    /**
     * Returns current right margin in pixels.
     *
     * @readonly
     * @return Right margin (px)
     */
    get: function get() {
      var value = this.getPixelX(this.marginRight);

      if (!this._adapterO) {
        return value;
      } else {
        return this._adapterO.apply("pixelMarginRight", value);
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "relativeMarginRight", {
    /**
     * Returns current relative right margin.
     *
     * @readonly
     * @return Relative right margin
     */
    get: function get() {
      // @todo Maybe use [[Percent]]?
      var value = this.getRelativeX(this.marginRight);

      if (!this._adapterO) {
        return value;
      } else {
        return this._adapterO.apply("relativeMarginRight", value);
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "pixelMarginLeft", {
    /**
     * Returns current left margin in pixels.
     *
     * @readonly
     * @return Left margin (px)
     */
    get: function get() {
      var value = this.getPixelX(this.marginLeft);

      if (!this._adapterO) {
        return value;
      } else {
        return this._adapterO.apply("pixelMarginLeft", value);
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "relativeMarginLeft", {
    /**
     * Returns current relative left margin.
     *
     * @readonly
     * @return Relative left margin
     */
    get: function get() {
      //@todo Maybe use [[Percent]]?
      var value = this.getRelativeX(this.marginLeft);

      if (!this._adapterO) {
        return value;
      } else {
        return this._adapterO.apply("relativeMarginLeft", value);
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "pixelMarginTop", {
    /**
     * Returns current top margin in pixels.
     *
     * @readonly
     * @return Top margin (px)
     */
    get: function get() {
      var value = this.getPixelY(this.marginTop);

      if (!this._adapterO) {
        return value;
      } else {
        return this._adapterO.apply("pixelMarginTop", value);
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "relativeMarginTop", {
    /**
     * Returns current relative top margin.
     *
     * @readonly
     * @return Relative top margin
     */
    get: function get() {
      // @todo Maybe use [[Percent]]?
      var value = this.getRelativeY(this.marginTop);

      if (!this._adapterO) {
        return value;
      } else {
        return this._adapterO.apply("relativeMarginTop", value);
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "pixelMarginBottom", {
    /**
     * Returns current bottom margin in pixels.
     *
     * @readonly
     * @return Bottom margin (px)
     */
    get: function get() {
      var value = this.getPixelY(this.marginBottom);

      if (!this._adapterO) {
        return value;
      } else {
        return this._adapterO.apply("pixelMarginBottom", value);
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "relativeMarginBottom", {
    /**
     * Returns current relative bottom margin.
     *
     * @readonly
     * @return Relative bottom margin
     */
    get: function get() {
      // @todo Maybe use [[Percent]]?
      var value = this.getRelativeY(this.marginBottom);

      if (!this._adapterO) {
        return value;
      } else {
        return this._adapterO.apply("relativeMarginBottom", value);
      }
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Sets padding for the element in pixels.
   *
   * @param top     Top padding (px)
   * @param right   Right padding (px)
   * @param bottom  Bottom padding (px)
   * @param left    Left padding (px)
   * @return Element
   */

  Sprite.prototype.padding = function (top, right, bottom, left) {
    this.paddingTop = top;
    this.paddingRight = right;
    this.paddingBottom = bottom;
    this.paddingLeft = left;
    return this;
  };

  Object.defineProperty(Sprite.prototype, "paddingLeft", {
    /**
     * @return Padding value
     */
    get: function get() {
      return this.getPropertyValue("paddingLeft");
    },

    /**
     * Left padding - absolute (px) or relative ([[Percent]]).
     *
     * @param value  Padding value
     */
    set: function set(value) {
      this.setPercentProperty("paddingLeft", value, true, true, this._positionPrecision, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "paddingRight", {
    /**
     * @return Padding value
     */
    get: function get() {
      return this.getPropertyValue("paddingRight");
    },

    /**
     * Right padding - absolute (px) or relative ([[Percent]]).
     *
     * @param value  Padding value
     */
    set: function set(value) {
      this.setPercentProperty("paddingRight", value, true, true, this._positionPrecision, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "paddingTop", {
    /**
     * @return Padding value
     */
    get: function get() {
      return this.getPropertyValue("paddingTop");
    },

    /**
     * Top padding - absolute (px) or relative ([[Percent]]).
     *
     * @param value  Padding value
     */
    set: function set(value) {
      this.setPercentProperty("paddingTop", value, true, true, this._positionPrecision, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "paddingBottom", {
    /**
     * @return Padding value
     */
    get: function get() {
      return this.getPropertyValue("paddingBottom");
    },

    /**
     * Bottom padding - absolute (px) or relative ([[Percent]]).
     *
     * @param value  Padding value
     */
    set: function set(value) {
      this.setPercentProperty("paddingBottom", value, true, true, this._positionPrecision, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "pixelPaddingRight", {
    /**
     * Returns current right padding in pixels.
     *
     * @readonly
     * @return Right padding (px)
     */
    get: function get() {
      return this.getPixelX(this.paddingRight);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "relativePaddingRight", {
    /**
     * Returns current relative right padding.
     *
     * @readonly
     * @return Relative right padding
     */
    get: function get() {
      // @todo Maybe use [[Percent]]?
      return this.getRelativeX(this.paddingRight);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "pixelPaddingLeft", {
    /**
     * Returns current left padding in pixels.
     *
     * @readonly
     * @return Left padding (px)
     */
    get: function get() {
      return this.getPixelX(this.paddingLeft);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "relativePaddingLeft", {
    /**
     * Returns current relative left padding.
     *
     * @readonly
     * @return Relative left padding
     */
    get: function get() {
      // @todo Maybe use [[Percent]]?
      return this.getRelativeX(this.paddingLeft);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "pixelPaddingTop", {
    /**
     * Returns current top padding in pixels.
     *
     * @readonly
     * @return Top padding (px)
     */
    get: function get() {
      return this.getPixelY(this.paddingTop);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "relativePaddingTop", {
    /**
     * Returns current relative top padding.
     *
     * @readonly
     * @return Relative top padding
     */
    get: function get() {
      // @todo Maybe use [[Percent]]?
      return this.getRelativeY(this.paddingTop);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "pixelPaddingBottom", {
    /**
     * Returns current bottom padding in pixels.
     *
     * @readonly
     * @return Bottom padding (px)
     */
    get: function get() {
      return this.getPixelY(this.paddingBottom);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "relativePaddingBottom", {
    /**
     * Returns current relative bottom padding.
     *
     * @readonly
     * @return Relative bottom padding
     */
    get: function get() {
      // @todo Maybe use [[Percent]]?
      return this.getRelativeY(this.paddingBottom);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "path", {
    /**
     * @return Path of a Sprite element
     */
    get: function get() {
      return this.getPropertyValue("path");
    },

    /**
     * ==========================================================================
     * APPEARANCE-RELATED PROPERTIES AND RELATED STUFF
     * ==========================================================================
     * @hidden
     */

    /**
     * Path of Sprite element
     */
    set: function set(value) {
      this.setPath(value);
    },
    enumerable: true,
    configurable: true
  });
  /**
   * @ignore
   */

  Sprite.prototype.setPath = function (value) {
    if (this.setPropertyValue("path", value)) {
      if (this._adapterO) {
        value = this._adapterO.apply("path", value);
      }

      if (!this._isPath) {
        if (!this.element || this.element.node && !(this.element.node instanceof SVGPathElement)) {
          this.element = this.paper.add("path");
        }

        this._isPath = true;
      }

      if (_utils_Type__WEBPACK_IMPORTED_MODULE_29__.hasValue(value)) {
        this.element.attr({
          "d": value
        });
      } else {
        this.element.removeAttr("d");
      }

      this.invalidatePosition(); // otherwise is 0x0

      if (!this.inited) {
        this.events.once("inited", this.validatePosition, this, false);
      }

      return true;
    }

    return false;
  };

  Object.defineProperty(Sprite.prototype, "fillModifier", {
    /**
     * @return Fill color modifier
     */
    get: function get() {
      return this.getPropertyValue("fillModifier");
    },

    /**
     * [[ColorModifier]] that can be used to modify color and pattern of the
     * element's fill, e.g. create gradients.
     *
     * @param value  Fill color modifiier
     */
    set: function set(value) {
      if (this.setPropertyValue("fillModifier", value)) {
        this.setFill(this.fill);
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "strokeModifier", {
    /**
     * @return Stroke color modifier
     */
    get: function get() {
      return this.getPropertyValue("strokeModifier");
    },

    /**
     * [[ColorModifier]] that can be used to modify color and pattern of the
     * element's stroke (outline), e.g. create gradients.
     *
     * @param value  Stroke color modifier
     */
    set: function set(value) {
      this.setPropertyValue("strokeModifier", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "fillOpacity", {
    /**
     * @return Opacity (0-9)
     */
    get: function get() {
      return this.getPropertyValue("fillOpacity");
    },

    /**
     * Element's fill opacity.
     *
     * Opacity ranges from 0 (fully transparent) to 1 (fully opaque).
     *
     * @param value  Opacity (0-1)
     */
    set: function set(value) {
      value = _utils_Math__WEBPACK_IMPORTED_MODULE_25__.toNumberRange(value, 0, 1);

      if (this.setPropertyValue("fillOpacity", value)) {
        this.setSVGAttribute({
          "fill-opacity": value
        });
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "fill", {
    /**
     * @return Fill
     */
    get: function get() {
      return this.getPropertyValue("fill");
    },

    /**
     * Element's fill color or pattern.
     *
     * @param value  Fill
     */
    set: function set(value) {
      this.setFill(value);
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Sets actual `fill` property on the SVG element, including applicable color
   * modifiers.
   *
   * @ignore Exclude from docs
   * @param value  Fill
   */

  Sprite.prototype.setFill = function (value) {
    if (!_utils_Type__WEBPACK_IMPORTED_MODULE_29__.isObject(value) || "r" in value) {
      value = (0,_utils_Color__WEBPACK_IMPORTED_MODULE_13__.toColor)(value);
    }

    if (this.setColorProperty("fill", value) || this.fillModifier) {
      // this can not go into next if, as value is turned to Gradient
      if (value instanceof _utils_Color__WEBPACK_IMPORTED_MODULE_13__.Color) {
        if (this.fillModifier) {
          value = this.fillModifier.modify(value);
        }
      }

      this.realFill = value; // todo: review this place when some Color type will be added

      if (value instanceof _utils_Color__WEBPACK_IMPORTED_MODULE_13__.Color) {
        this.setSVGAttribute({
          "fill": value.toString()
        });
      } else if (!_utils_Type__WEBPACK_IMPORTED_MODULE_29__.hasValue(value)) {
        this.removeSVGAttribute("fill");
      } else if (value instanceof _rendering_fills_Pattern__WEBPACK_IMPORTED_MODULE_10__.Pattern || value instanceof _rendering_fills_LinearGradient__WEBPACK_IMPORTED_MODULE_11__.LinearGradient || value instanceof _rendering_fills_RadialGradient__WEBPACK_IMPORTED_MODULE_12__.RadialGradient) {
        var fill = value;
        fill.paper = this.paper;
        this.setSVGAttribute({
          "fill": "url(\"" + _utils_Utils__WEBPACK_IMPORTED_MODULE_24__.getBaseURI() + fill.id + "\")"
        });
      }
    }
  };

  Object.defineProperty(Sprite.prototype, "opacity", {
    /**
     * @return Opacity (0-1)
     */
    get: function get() {
      return this.getPropertyValue("opacity");
    },

    /**
     * Element's opacity.
     *
     * Opacity setting can range from 0 (fully transparent) to 1 (fully opaque).
     *
     * ATTENTION: It is highly not recommended to use `opacity` directly on the
     * element. The charts use `opacity` to hide/show elements, so your setting
     * might be lost if element is hidden and then later shown.
     *
     * Instead use methods `hide()` and `show()` to completely toggle off and on
     * the element.
     *
     * Or, use properties `fillOpacity` and `strokeOpacity`, if you need to make
     * the element semi-transparent.
     *
     * @param value Opacity (0-1)
     */
    set: function set(value) {
      value = _utils_Math__WEBPACK_IMPORTED_MODULE_25__.toNumberRange(value, 0, 1);

      if (this.setPropertyValue("opacity", value)) {
        this.setSVGAttribute({
          "opacity": value
        });
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "stroke", {
    /**
     * @return Stroke setting
     */
    get: function get() {
      return this.getPropertyValue("stroke");
    },

    /**
     * Element's stroke (outline) color or pattern.
     *
     * @param value  Stroke setting
     */
    set: function set(value) {
      this.setStroke(value);
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Sets actual `stroke` property on the SVG element, including applicable
   * color modifiers.
   *
   * @ignore Exclude from docs
   * @param value Stroke setting
   */

  Sprite.prototype.setStroke = function (value) {
    if (!_utils_Type__WEBPACK_IMPORTED_MODULE_29__.isObject(value) || "r" in value) {
      value = (0,_utils_Color__WEBPACK_IMPORTED_MODULE_13__.toColor)(value);
    }

    if (this.setColorProperty("stroke", value) || this.strokeModifier) {
      // this can not go into next if, as value is turned to Gradient
      if (value instanceof _utils_Color__WEBPACK_IMPORTED_MODULE_13__.Color) {
        if (this.strokeModifier) {
          value = this.strokeModifier.modify(value);
        }
      }

      this.realStroke = value;

      if (value instanceof _utils_Color__WEBPACK_IMPORTED_MODULE_13__.Color) {
        if (value.hex == "none") {
          this.removeSVGAttribute("stroke");
        } else {
          this.setSVGAttribute({
            "stroke": value.toString()
          });
        }
      } else if (!_utils_Type__WEBPACK_IMPORTED_MODULE_29__.hasValue(value)) {
        this.removeSVGAttribute("stroke");
      } else if (value instanceof _rendering_fills_Pattern__WEBPACK_IMPORTED_MODULE_10__.Pattern || value instanceof _rendering_fills_LinearGradient__WEBPACK_IMPORTED_MODULE_11__.LinearGradient || value instanceof _rendering_fills_RadialGradient__WEBPACK_IMPORTED_MODULE_12__.RadialGradient) {
        var stroke = value;
        stroke.paper = this.paper;
        this.setSVGAttribute({
          "stroke": "url(\"" + _utils_Utils__WEBPACK_IMPORTED_MODULE_24__.getBaseURI() + stroke.id + "\")"
        });
      }
    }
  };

  Object.defineProperty(Sprite.prototype, "strokeOpacity", {
    /**
     * @return Opacity (0-1)
     */
    get: function get() {
      return this.getPropertyValue("strokeOpacity");
    },

    /**
     * Stroke (outline) opacity.
     *
     * The values may range from 0 (fully transparent) to 1 (fully opaque).
     *
     * @param value  Opacity (0-1)
     */
    set: function set(value) {
      value = _utils_Math__WEBPACK_IMPORTED_MODULE_25__.toNumberRange(value, 0, 1);

      if (this.setPropertyValue("strokeOpacity", value)) {
        this.setSVGAttribute({
          "stroke-opacity": value
        });
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "nonScalingStroke", {
    /**
     * @return Do not scale stroke (outline)
     */
    get: function get() {
      return this.getPropertyValue("nonScalingStroke");
    },

    /**
     * Controls if the element's stroke (outline) should remain keep constant
     * thicnkess and do not scale when the whole element is resized.
     *
     * @param value  Do not scale stroke (outline)
     */
    set: function set(value) {
      value = _utils_Type__WEBPACK_IMPORTED_MODULE_29__.toBoolean(value);

      if (this.setPropertyValue("nonScalingStroke", value)) {
        this.strokeWidth = this.strokeWidth;
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "nonScaling", {
    /**
     * @return Is element scaleable?
     */
    get: function get() {
      return this.getPropertyValue("nonScaling");
    },

    /**
     * Controls if element should keep constant size and not scale even if there is
     * space available, or it does not fit.
     *
     * @param value  Is element scaleable?
     */
    set: function set(value) {
      // @todo Description (review)
      value = _utils_Type__WEBPACK_IMPORTED_MODULE_29__.toBoolean(value);
      this.setPropertyValue("nonScaling", value, false, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "strokeWidth", {
    /**
     * @return Thickness (px)
     */
    get: function get() {
      return this.getPropertyValue("strokeWidth");
    },

    /**
     * Stroke (outline) thickness in pixels.
     *
     * @param value  Thickness (px)
     */
    set: function set(value) {
      value = _utils_Type__WEBPACK_IMPORTED_MODULE_29__.toNumber(value);
      this.setPropertyValue("strokeWidth", value, true);

      if (this.nonScalingStroke) {
        if (!_utils_Type__WEBPACK_IMPORTED_MODULE_29__.isNumber(value)) {
          value = 1;
        }

        value = value / this.globalScale;
      }

      this.setSVGAttribute({
        "stroke-width": value
      });
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "strokeDasharray", {
    /**
     * @return `stroke-dasharray`
     */
    get: function get() {
      return this.getPropertyValue("strokeDasharray");
    },

    /**
     * A `stroke-dasharray` for the stroke (outline).
     *
     * "Dasharray" allows setting rules to make lines dashed, dotted, etc.
     *
     * @see {@link https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-dasharray} for more info on `stroke-dasharray`
     * @param value  `stroke-dasharray`
     */
    set: function set(value) {
      value = _utils_Type__WEBPACK_IMPORTED_MODULE_29__.toText(value);

      if (this.setPropertyValue("strokeDasharray", value)) {
        this.setSVGAttribute({
          "stroke-dasharray": value
        });
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "strokeDashoffset", {
    /**
     * @return `stroke-dashoffset`
     */
    get: function get() {
      return this.getPropertyValue("strokeDashoffset");
    },

    /**
     * A `stroke-dashoffset` for the stroke (outline).
     *
     * "Dashoffset" allows setting the start position of the dashes if
     * `strokeDasharray` is used.
     *
     * @see {@link https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-dashoffset} for more info on `stroke-dashoffset`
     * @param value  `stroke-dashoffset`
     */
    set: function set(value) {
      value = _utils_Type__WEBPACK_IMPORTED_MODULE_29__.toNumber(value);

      if (this.setPropertyValue("strokeDashoffset", value)) {
        this.setSVGAttribute({
          "stroke-dashoffset": value
        });
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "strokeLinecap", {
    /**
     * @return `stroke-linecap`
     */
    get: function get() {
      return this.getPropertyValue("strokeLinecap");
    },

    /**
     * A `stroke-linecap` to indicate how line ends are drawn.
     *
     * @see {@link https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Fills_and_Strokes#Stroke} for more info on `stroke-linecap`
     * @param value  `stroke-linecap`
     */
    set: function set(value) {
      if (this.setPropertyValue("strokeLinecap", value)) {
        this.setSVGAttribute({
          "stroke-linecap": value
        });
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "strokeLinejoin", {
    /**
     * @return `stroke-linejoin`
     */
    get: function get() {
      return this.getPropertyValue("strokeLinejoin");
    },

    /**
     * A `stroke-linejoin` to indicate how line ends are drawn.
     *
     * @see {@link https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Fills_and_Strokes#Stroke} for more info on `stroke-linejoin`
     * @param value  `stroke-linejoin`
     */
    set: function set(value) {
      if (this.setPropertyValue("strokeLinejoin", value)) {
        this.setSVGAttribute({
          "stroke-linejoin": value
        });
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "shapeRendering", {
    /**
     * @return 'shape-rendering' value
     */
    get: function get() {
      return this.getPropertyValue("shapeRendering");
    },

    /**
     * An SVG-specific `shape-rendering` value.
     *
     * `shape-rendering` controls how vector graphics are drawn and rendered.
     *
     * @see {@link https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/shape-rendering} for more information about `shape-rendering`
     * @default "auto"
     * @param value  'shape-rendering' value
     */
    set: function set(value) {
      value = _utils_Type__WEBPACK_IMPORTED_MODULE_29__.toText(value);

      if (this.setPropertyValue("shapeRendering", value)) {
        this.setSVGAttribute({
          "shape-rendering": value
        });
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "pixelPerfect", {
    /**
     * @return Use pixel perfect?
     */
    get: function get() {
      return this.getPropertyValue("pixelPerfect");
    },

    /**
     * Controls if SVG vectors should be drawn with "pixel" precision, producing
     * perfectly crisp lines on retina displays.
     *
     * Setting this to `true` might improve visual quality, but may have a
     * negative effect on performance.
     *
     * Different elements use different default setting for `pixelPerfect`.
     *
     * We recommend leaving this at their default settings, unless there's a
     * specific need.
     *
     * @param value  Use pixel perfect?
     */
    set: function set(value) {
      value = _utils_Type__WEBPACK_IMPORTED_MODULE_29__.toBoolean(value);

      if (value) {
        this._positionPrecision = _Options__WEBPACK_IMPORTED_MODULE_16__.options.pixelPerfectPrecision;
      } else {
        this._positionPrecision = 3;
      }

      this.setPropertyValue("pixelPerfect", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "rtl", {
    /**
     * @return RTL?
     */
    get: function get() {
      if (_utils_Type__WEBPACK_IMPORTED_MODULE_29__.hasValue(this._rtl)) {
        return this._rtl;
      } else if (this._topParent) {
        return this._topParent.rtl;
      } //this.rtl = false;


      return false;
    },

    /**
     * An RTL (right-to-left) setting.
     *
     * RTL may affect alignment, text, and other visual properties.
     *
     * If you set this on a top-level chart object, it will be used for all
     * child elements, e.g. labels, unless they have their own `rtl` setting
     * set directly on them.
     *
     * @param value  `true` for to use RTL
     */
    set: function set(value) {
      value = _utils_Type__WEBPACK_IMPORTED_MODULE_29__.toBoolean(value);

      if (this.isBaseSprite) {
        this.topParent.rtl = value;
      }

      this._rtl = value;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * ==========================================================================
   * VISIBILITY AND ORDER PROPERTIES AND RELATED STUFF
   * ==========================================================================
   * @hidden
   */

  /**
   * Reveals hidden element.
   *
   * Has no effect if element is already visible.
   *
   * If `duration` is not specified, it will use default.
   *
   * @param duration  Fade in duration (ms)
   * @return Animation object if such object was created
   */

  Sprite.prototype.show = function (duration) {
    return this.showReal(duration);
  };
  /**
   * Performs actual operations to reveal this element.
   *
   * @ignore Exclude from docs
   * @param duration Fade in duration (ms)
   * @return Fade in duration (ms)
   */


  Sprite.prototype.showReal = function (duration) {
    var _this = this;

    if (this.preventShow) {
      return;
    }

    var transition;
    var properties = this.defaultState.properties;

    if (!this.disabled && (this.isHidden || !this.visible || this.isHiding || properties.opacity != null && this.opacity < properties.opacity && !this.isShowing) && !this.isDisposed()) {
      // helps to avoid flicker, as show might change opacity or visibility but item might be at invalid state/position
      if (this.invalid) {
        this.validate();
      }

      if (this.positionInvalid) {
        this.validatePosition();
      }

      if (!_utils_Type__WEBPACK_IMPORTED_MODULE_29__.isNumber(duration)) {
        duration = this.defaultState.transitionDuration;
      }

      if (this._hideAnimation) {
        this._hideAnimation.kill();

        this._hideAnimation = undefined;
      } // Cancel hide handler just in case it was there


      if (this._showHideDisposer) {
        this.removeDispose(this._showHideDisposer);
      }

      this._isHidden = false;
      this.isHiding = false;
      this.isShowing = true; // Apply current state

      transition = this.applyCurrentState(duration);

      if (transition && !transition.isFinished()) {
        this._showHideDisposer = transition.events.on("animationended", function () {
          _this.isShowing = false;
        });

        this._disposers.push(this._showHideDisposer);
      } else {
        this.isShowing = false;
      } // Make it visible


      var visible = this.defaultState.properties.visible;

      if (!_utils_Type__WEBPACK_IMPORTED_MODULE_29__.hasValue(visible)) {
        visible = true;
      }

      this.visible = visible; // Unhide from screen readers

      this.readerHidden = false; // Dispatch "show" event

      this.dispatchImmediately("shown");
    }

    return transition;
  };
  /**
   * Initiates hiding of Sprite.
   * When called it will fade out the the Sprite to transparency, then make it
   * invisible.
   * @param duration Duration in millisecons
   */

  /**
   * Hides the element, by applying `hidden` state.
   *
   * Has no effect if element is already hidden.
   *
   * If `duration` is not specified, it will use default.
   *
   * While element is fading out, its `isHiding` property will resolve to
   * `true`.
   *
   * When element is hidden, its `visible` property will resolve to `false`.
   *
   * @param duration  Fade out duration (ms)
   * @return hide Animation object if such object was created
   */


  Sprite.prototype.hide = function (duration) {
    return this.hideReal(duration);
  };
  /**
   * Hides actual SVG elements and handles hiding animations.
   *
   * @param duration  Fade out duration (ms)
   * @return Fade out duration (ms)
   * @ignore
   */


  Sprite.prototype.hideReal = function (duration) {
    var _this = this;

    var transition;

    if (!this.isHiding && this.visible && !this.isDisposed()) {
      // added to solve 51375
      if (this.tooltip && this.tooltip.currentSprite == this) {
        this.hideTooltip(0);
      }

      if (this._hideAnimation) {
        this._hideAnimation.kill();

        this._hideAnimation = undefined;
      }

      this.isShowing = false; // Cancel hide handler just in case it was there

      if (this._showHideDisposer) {
        this.removeDispose(this._showHideDisposer);
      } // Get state


      var hiddenState_1 = this.hiddenState; // Transition to "hidden" state, provided Sprite has one set

      if (hiddenState_1) {
        // Yes, we have a "hidden" state
        // `setState` will return an `Animation` object which we can set
        // events on
        transition = this.setState(hiddenState_1, duration, undefined);

        if (transition && !transition.isFinished()) {
          this._hideAnimation = transition;
          this._showHideDisposer = transition.events.on("animationended", function () {
            _this.isHiding = false;
            _this._isHidden = true;

            if (hiddenState_1.properties.visible == false) {
              _this.visible = false;
            }
          }, this);

          this._disposers.push(this._showHideDisposer); // Thrown everything into `_disposers` just in case Sprite gets
          // destroyed in the meantime


          this._disposers.push(transition);
        } else {
          this.isHiding = false;
          this._isHidden = true;
        }
      } else {
        // No hidden state, let's just set `visible` and call it a day
        this.visible = false;
        this.isHiding = false;
        this._isHidden = true;
      } // Hide from screen readers


      this.readerHidden = true; // Dispach "hidden" event

      this.dispatchImmediately("hidden");
      this.invalidate(); // hide it at once to avoid flickers // validate() causes SO
    }

    if (!_utils_Type__WEBPACK_IMPORTED_MODULE_29__.isNumber(duration)) {
      duration = this.hiddenState.transitionDuration;
    }

    return transition;
  };

  Object.defineProperty(Sprite.prototype, "visible", {
    /**
     * @return Visible?
     */
    get: function get() {
      return this.getVisibility();
    },

    /**
     * Indicates if element is current visible (`true`) or hidden (`false`).
     *
     * @param value Visible?
     */
    set: function set(value) {
      value = _utils_Type__WEBPACK_IMPORTED_MODULE_29__.toBoolean(value);
      this.setVisibility(value);
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Returns visibility value
   * @ignore
   */

  Sprite.prototype.getVisibility = function () {
    var value = this.getPropertyValue("visible");

    if (!_utils_Type__WEBPACK_IMPORTED_MODULE_29__.hasValue(value)) {
      value = true;
    }

    return value;
  };
  /**
   * Sets `visibility` property:
   *
   * * `true` - visible
   * * `false` - hidden
   *
   * @param value  true - visible, false - hidden
   * @return Current visibility
   */


  Sprite.prototype.setVisibility = function (value) {
    if (this.setPropertyValue("visible", value)) {
      if (value) {
        this.group.removeAttr("visibility");
      } else {
        this.group.attr({
          "visibility": "hidden"
        });
      } //this.invalidatePosition();


      if (this.events.isEnabled("visibilitychanged")) {
        var event_4 = {
          type: "visibilitychanged",
          target: this,
          visible: value
        };
        this.events.dispatchImmediately("visibilitychanged", event_4);
      }
    }
  };

  Object.defineProperty(Sprite.prototype, "zIndex", {
    /**
     * @return zIndex
     */
    get: function get() {
      return this.getPropertyValue("zIndex");
    },

    /**
     * A "zIndex" of the element.
     *
     * "zIndex" determines the order of how elements are placed over each other.
     *
     * Higher "zIndex" will mean the element will be draw on top of elements
     * with lower "zIndexes".
     *
     * @param value  zIndex
     */
    set: function set(value) {
      value = _utils_Type__WEBPACK_IMPORTED_MODULE_29__.toNumber(value);

      if (this.setPropertyValue("zIndex", value)) {
        this.dispatch("zIndexChanged");
      }
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Moves the element to the very top in element order, so that it appears
   * in front of other elements.
   */

  Sprite.prototype.toFront = function () {
    var parent = this._parent;

    if (parent && parent.children.indexOf(this) != parent.children.length - 1) {
      parent.children.moveValue(this, parent.children.length - 1);
      this.dispatch("zIndexChanged");
    }
  };
  /**
   * Moves the element to the very bottom in the element order, so that it
   * appears behind other elements.
   */


  Sprite.prototype.toBack = function () {
    var parent = this._parent;

    if (parent && parent.children.indexOf(this) != 0) {
      parent.children.moveValue(this, 0);
      this.dispatch("zIndexChanged");
    }
  };

  Object.defineProperty(Sprite.prototype, "userClassName", {
    /**
     * @return Class name
     */
    get: function get() {
      return this.getPropertyValue("userClassName");
    },

    /**
     * A custom class name to set on the element.
     *
     * If set, the value will be added to element's `class` attribute.
     *
     * @since 4.9.11
     * @param  value  Class name
     */
    set: function set(value) {
      if (this.setPropertyValue("userClassName", value)) {
        if (!value && this.userClassName) {
          this.group.removeClass(this.userClassName);
        }

        this.setClassName();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "tooltip", {
    /**
     * @return Tooltip
     */
    get: function get() {
      if (this._tooltip) {
        return this._tooltip;
      } else if (this.virtualParent) {
        return this.virtualParent.tooltip;
      } else if (this._parent) {
        return this._parent.tooltip;
      }
    },

    /**
     * ==========================================================================
     * TOOLTIP-RELATED PROPERTIES STUFF
     * ==========================================================================
     * @hidden
     */

    /**
     * A [[Tooltip]] object to be used when displayed rollover information for
     * the element.
     *
     * @param tooltip  Tooltip
     */
    set: function set(tooltip) {
      if (this._tooltip) {
        //this._tooltip.dispose();
        this.removeDispose(this._tooltip);
      }

      this._tooltip = tooltip;

      if (tooltip) {
        tooltip.parent = this.tooltipContainer;
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "tooltipDataItem", {
    /**
     * @return Tooltip data item
     */
    get: function get() {
      var tooltipDataItem = this._tooltipDataItem;

      if (tooltipDataItem) {
        return tooltipDataItem;
      } else {
        return this.dataItem;
      }
    },

    /**
     * A [[DataItem]] to use when populating content for the element's
     * [[Tooltip]].
     *
     * @see {@link Tooltip}
     * @see {@link DataItem}
     * @param value  Tooltip data item
     */
    set: function set(value) {
      // important: do not dispose tooltip dataItem, as it is some actual data item from data!
      this._tooltipDataItem = value;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "tooltipColorSource", {
    /**
     * @return Tooltip color source
     */
    get: function get() {
      return this._tooltipColorSource;
    },

    /**
     * A [[Sprite]] or sprite template to use when getting colors for tooltip. If a template is set,
     * tooltip will look for a clone in tooltipDataItem.sprites. If no clone is found, then template colors will be used.
     *
     * @see {@link Tooltip}
     * @see {@link Sprite}
     * @param sprite Sprite
     */
    set: function set(sprite) {
      this._tooltipColorSource = sprite;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Shows the element's [[Tooltip]].
   *
   * A tooltip will be populated using text templates in either `tooltipHTML` or
   * `tooltipText` as well as data in `tooltipDataItem`.
   *
   * @see {@link Tooltip}
   * @param optional point (sprite-related) to which tooltip must point.
   * @return returns true if the tooltip was shown and false if it wasn't (no text was found)
   */

  Sprite.prototype.showTooltip = function (point) {
    if (this.showTooltipOn == "always" && !this._tooltip && this.tooltip) {
      this._tooltip = this.tooltip.clone();
    }

    if (!point && this.tooltipPosition == "pointer" && this.isHover) {
      point = _utils_Utils__WEBPACK_IMPORTED_MODULE_24__.documentPointToSvg((0,_interaction_Interaction__WEBPACK_IMPORTED_MODULE_14__.getInteraction)().lastPointer.point, this.svgContainer.SVGContainer, this.svgContainer.cssScale);
    } // do not show if hidden


    var sprite = this;

    while (sprite != undefined) {
      if (!sprite.visible || sprite.disabled || sprite.__disabled) {
        if (this._tooltip && this._tooltip.visible) {
          this._tooltip.hide(0);
        }

        return;
      }

      sprite = sprite.parent;
    }

    if (_utils_Type__WEBPACK_IMPORTED_MODULE_29__.hasValue(this.tooltipText) || _utils_Type__WEBPACK_IMPORTED_MODULE_29__.hasValue(this.tooltipHTML)) {
      var tooltip = this.tooltip;
      var tooltipDataItem = this.tooltipDataItem;

      if (tooltip) {
        tooltip.targetSprite = this;
        var colorSource_1 = this;
        var tooltipColorSource_1 = this.tooltipColorSource;

        if ((tooltip.getStrokeFromObject || tooltip.getFillFromObject) && tooltipColorSource_1) {
          if (tooltipColorSource_1.isTemplate) {
            if (tooltipDataItem) {
              _utils_Array__WEBPACK_IMPORTED_MODULE_27__.eachContinue(tooltipDataItem.sprites, function (sprite) {
                if (sprite.clonedFrom == tooltipColorSource_1) {
                  colorSource_1 = sprite;
                  return false;
                }

                return true;
              });
            }
          } else {
            colorSource_1 = tooltipColorSource_1;
          }
        }

        if (tooltip.getStrokeFromObject) {
          var stroke = this.stroke;
          var source = colorSource_1;

          while (source.parent != undefined) {
            stroke = source.stroke;

            if (stroke == undefined) {
              source = source.parent;
            }

            if (stroke != undefined) {
              break;
            }
          }

          if (stroke instanceof _utils_Color__WEBPACK_IMPORTED_MODULE_13__.Color) {
            tooltip.background.animate({
              property: "stroke",
              to: stroke
            }, tooltip.animationDuration);
          } else {
            tooltip.background.stroke = stroke;
          }
        } // Set data item


        tooltip.dataItem = tooltipDataItem;
        tooltip.label.populateStringFrom = this;

        if (tooltip.getFillFromObject) {
          var fill = this.fill;
          var source = colorSource_1;

          while (source.parent != undefined) {
            fill = source.fill;

            if (fill == undefined || fill instanceof _utils_Color__WEBPACK_IMPORTED_MODULE_13__.Color && fill.rgb == undefined) {
              source = source.parent;
            } else if (fill != undefined) {
              break;
            }
          }

          if (fill == undefined) {
            fill = (0,_utils_Color__WEBPACK_IMPORTED_MODULE_13__.color)("#000000");
          }

          if (fill instanceof _utils_Color__WEBPACK_IMPORTED_MODULE_13__.Color) {
            if (!tooltip.visible) {
              tooltip.background.fill = fill;
            } else {
              tooltip.background.animate({
                property: "fill",
                to: fill
              }, tooltip.animationDuration);
            }
          } else {
            tooltip.background.fill = fill;
          }

          if (tooltip.autoTextColor && fill instanceof _utils_Color__WEBPACK_IMPORTED_MODULE_13__.Color) {
            tooltip.label.fill = fill.alternative;
          }
        } // Apply tooltip text


        var text = "";

        if (this.tooltipHTML) {
          tooltip.html = this.tooltipHTML;
          text = this.tooltipHTML;
        }

        if (this.tooltipText) {
          tooltip.text = this.tooltipText;
          text = this.tooltipText;
        }

        if (this.updateTooltipPosition(point)) {
          // Set accessibility option
          tooltip.readerDescribedBy = this.uidAttr(); // make label to render to be able to check currentText

          if (tooltip.label.invalid) {
            tooltip.label.validate();
          }

          if (text != undefined && text != "" && tooltip.label.currentText != "") {
            //@todo: think of how to solve this better
            if (tooltip && !tooltip.parent) {
              tooltip.parent = this.tooltipContainer;
            } // Reveal tooltip
            // showing it in 1 ms helps to avoid strange flickering in IE


            var duration = tooltip.defaultState.transitionDuration;

            if (duration <= 0) {
              duration = 1;
            }

            tooltip.show(duration);
            tooltip.currentSprite = this;
            return true;
          } else {
            this.hideTooltip(0);
          }
        } else {
          this.hideTooltip(0);
        }
      }
    }

    return false;
  };
  /**
   * @ignore
   */


  Sprite.prototype.updateTooltipPosition = function (point) {
    var _this = this;

    if (this.tooltipPosition == "pointer") {
      if (this._interactionDisposer) {
        this._interactionDisposer.dispose();
      }

      this._interactionDisposer = (0,_interaction_Interaction__WEBPACK_IMPORTED_MODULE_14__.getInteraction)().body.events.on("track", function (ev) {
        return _this.pointTooltipTo(_utils_Utils__WEBPACK_IMPORTED_MODULE_24__.documentPointToSvg(ev.point, _this.svgContainer.SVGContainer, _this.svgContainer.cssScale), true);
      });

      if (point) {
        return this.pointTooltipTo(point, true);
      }
    } else {
      // Point to the X/Y of this Sprite
      var globalPoint = _utils_Utils__WEBPACK_IMPORTED_MODULE_24__.spritePointToSvg({
        "x": this.getTooltipX(),
        "y": this.getTooltipY()
      }, this);
      return this.pointTooltipTo(globalPoint);
    }
  };
  /**
   * Sets the point the [[Tooltip]] should point to.
   *
   * @param point      Coordinates to point to
   * @param instantly  Move instantly without animation
   */


  Sprite.prototype.pointTooltipTo = function (point, instantly) {
    var tooltip = this.tooltip;

    if (tooltip && this.topParent) {
      if (tooltip.showInViewport) {
        tooltip.pointTo(point, instantly);
        return true;
      }

      if (_utils_Math__WEBPACK_IMPORTED_MODULE_25__.isInRectangle(point, {
        x: 0,
        y: 0,
        width: this.topParent.maxWidth,
        height: this.topParent.maxHeight
      })) {
        tooltip.pointTo(point, instantly);
        return true;
      }
    }

    return false;
  };
  /**
   * Hides element's [[Tooltip]].
   *
   * @see {@link Tooltip}
   */


  Sprite.prototype.hideTooltip = function (duration) {
    if (this.showTooltipOn == "always") {
      return;
    }

    var tooltip = this.tooltip;

    if (tooltip) {
      if (tooltip.targetSprite == this) {
        tooltip.targetSprite = undefined;
      }

      tooltip.hide(duration);

      if (this._interactionDisposer) {
        this._interactionDisposer.dispose();

        this._interactionDisposer = undefined;
      }
    }
  };

  Object.defineProperty(Sprite.prototype, "tooltipHTML", {
    /**
     * @return Tooltip HTML content template
     */
    get: function get() {
      return this.getPropertyValue("tooltipHTML");
    },

    /**
     * An HTML template to be used to populate [[Tooltip]] contents.
     *
     * If element has `tooltipDataItem` or `dataItem` set, this will be parsed
     * for any data values to be replaced with the values from respective data
     * items.
     *
     * @param value Tooltip HTML content template
     */
    set: function set(value) {
      value = _utils_Type__WEBPACK_IMPORTED_MODULE_29__.toText(value);
      this.hoverable = true;

      if (this.setPropertyValue("tooltipHTML", value)) {
        if (this.tooltip) {
          if (this.tooltip.visible) {
            this.showTooltip();
          }
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "tooltipText", {
    /**
     * @return Tooltip content template
     */
    get: function get() {
      return this.getPropertyValue("tooltipText");
    },

    /**
     * A text template to be used to populate Tooltip's contents.
     *
     * If element has `tooltipDataItem` or `dataItem` set, this will be parsed
     * for any data values to be replaced with the values from respective data
     * items.
     *
     * This template will also be parsed for any special formatting tags.
     *
     * @param value Tooltip content template
     * @see {@link TextFormatter}
     */
    set: function set(value) {
      value = _utils_Type__WEBPACK_IMPORTED_MODULE_29__.toText(value);

      if (value) {
        this.hoverable = true;
      }

      if (this.setPropertyValue("tooltipText", value)) {
        if (this.tooltip) {
          if (this.tooltip.visible) {
            this.showTooltip();
          }
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "tooltipContainer", {
    /**
     * @ignore Exclude from docs
     * @return Container
     */
    get: function get() {
      if (this._tooltipContainer) {
        return this._tooltipContainer;
      } else if (this._parent) {
        return this._parent.tooltipContainer;
      }
    },

    /**
     * A container reference that should be used to place element's
     * [[Tooltip]] in.
     *
     * Will use parent's container if does not have one set.
     *
     * @ignore Exclude from docs
     * @param value Container
     * @todo Dispose of the old _tooltipContainer ?
     */
    set: function set(value) {
      this._tooltipContainer = value;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "tooltipX", {
    /**
     * @return Tooltip X (px)
     */
    get: function get() {
      return this.getTooltipX();
    },

    /**
     * X coordinate the [[Tooltip]] should be shown at.
     *
     * @param value  Tooltip X (px)
     */
    set: function set(value) {
      if (this.setPercentProperty("tooltipX", value) && this.tooltip) {
        this.tooltip.invalidate();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "alwaysShowTooltip", {
    /**
     * @return Always show tooltip?
     */
    get: function get() {
      return this.getPropertyValue("showTooltipOn") == "always";
    },

    /**
     * DEPRECATION NOTICE: This setting is deprecated in favor of a more flexible
     * setting: `showTooltipOn`. Please use `showTooltipOn = "always"` instead.
     *
     * Indicates if this element should display a tooltip permanently.
     *
     * Useful, if you want to show permanent tooltips on some items.
     *
     * @default false
     * @since 4.5.4
     * @deprecated Use `showTooltipOn = "always"` instead
     * @param  value  Always show tooltip?
     */
    set: function set(value) {
      value = _utils_Type__WEBPACK_IMPORTED_MODULE_29__.toBoolean(value);

      if (value) {
        this.showTooltipOn = "always";
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "showTooltipOn", {
    /**
     * @return When to show tooltip
     */
    get: function get() {
      return this.getPropertyValue("showTooltipOn");
    },

    /**
     * Indicates when tooltip needs to be shown on this element:
     *
     * * `"hover"` (default) - Tooltip will be shown when element is hovered on.
     * * `"hit"` - Tooltip will be shown when element is clicked/tapped. Tooltip will be hidden when clicked/tapped anywhere else.
     * * `"always"` - Tooltip will be shown on the element permanently.
     *
     * For example, if you would like to show tooltips on all of the columns of
     * a [[ColumnSeries]]:
     *
     * ```TypeScript
     * series.columns.template.showTooltipOn = "always";
     * ```
     * ```JavaScript
     * series.columns.template.showTooltipOn = "always";
     * ```
     * ```JSON
     * {
     *   // ...
     *   "series": [{
     *     // ...
     *     "columns": {
     *       "showTooltipOn": "always"
     *     }
     *   }]
     * }
     * ```
     *
     * It can even be set to display on a selected columns via `propertyFields`:
     *
     * ```TypeScript
     * series.columns.template.propertyFields.showTooltipOn = "tooltip";
     * ```
     * ```JavaScript
     * series.columns.template.propertyFields.showTooltipOn = "tooltip";
     * ```
     * ```JSON
     * {
     *   // ...
     *   "series": [{
     *     // ...
     *     "columns": {
     *       "propertyFields": {
     *         "showTooltipOn": "tooltip"
     *       }
     *     }
     *   }]
     * }
     * ```
     *
     * @default "hover"
     * @since 4.7.9
     * @param  value  When to show tooltip
     */
    set: function set(value) {
      if (this.setPropertyValue("showTooltipOn", value)) {
        if (value == "hit") {
          this.clickable = true;
        }

        if (this.tooltip) {
          if (value == "always") {
            this.showTooltip();
          } else {
            this.handleAlwaysShowTooltip();
          }
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "tooltipPosition", {
    /**
     * Position
     */
    get: function get() {
      return this.getPropertyValue("tooltipPosition");
    },

    /**
     * Specifies if [[Tooltip]] should follow the mouse or touch pointer or stay
     * at the fixed position.
     *
     * @param value  Position
     */
    set: function set(value) {
      this.setPropertyValue("tooltipPosition", value);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "tooltipY", {
    /**
     * @return Tooltip Y (px)
     */
    get: function get() {
      return this.getTooltipY();
    },

    /**
     * Y coordinate the [[Tooltip]] should be shown at.
     *
     * @param value  Tooltip Y (px)
     */
    set: function set(value) {
      if (this.setPercentProperty("tooltipY", value) && this.tooltip) {
        this.tooltip.invalidate();
      }
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Returns Tooltip X coordinate if it's set, or middle of the element.
   *
   * @ignore Exclude from docs
   * @return X (px)
   */

  Sprite.prototype.getTooltipX = function () {
    var x = this.getPropertyValue("tooltipX");

    if (!_utils_Type__WEBPACK_IMPORTED_MODULE_29__.hasValue(x)) {
      x = (0,_utils_Percent__WEBPACK_IMPORTED_MODULE_32__.percent)(50);
    }

    var value;

    if (_utils_Type__WEBPACK_IMPORTED_MODULE_29__.isNumber(x)) {
      value = x;
    }

    if (x instanceof _utils_Percent__WEBPACK_IMPORTED_MODULE_32__.Percent) {
      value = this.maxLeftSelf + this._measuredWidthSelf * x.value - this.pixelPaddingLeft - this.ex; // overflow is know only for measured items, so this is not always good
    }

    if (!_utils_Type__WEBPACK_IMPORTED_MODULE_29__.isNumber(value)) {
      value = 0;
    }

    return value;
  };
  /**
   * Returns Tooltip Y coordinate if it's set, or middle of the element.
   *
   * @ignore Exclude from docs
   * @return Y (px)
   */


  Sprite.prototype.getTooltipY = function () {
    var y = this.getPropertyValue("tooltipY");

    if (!_utils_Type__WEBPACK_IMPORTED_MODULE_29__.hasValue(y)) {
      y = (0,_utils_Percent__WEBPACK_IMPORTED_MODULE_32__.percent)(50);
    }

    var value;

    if (_utils_Type__WEBPACK_IMPORTED_MODULE_29__.isNumber(y)) {
      value = y;
    }

    if (y instanceof _utils_Percent__WEBPACK_IMPORTED_MODULE_32__.Percent) {
      value = this.maxTopSelf + this._measuredHeightSelf * y.value - this.pixelPaddingTop - this.ey; // overflow is know only for measured items, so this is not always good
    }

    if (!_utils_Type__WEBPACK_IMPORTED_MODULE_29__.isNumber(value)) {
      value = 0;
    }

    return value;
  };
  /**
   * Displays a modal or console message with error, and halts any further
   * processing of this item.
   *
   * @ignore Exclude from docs
   * @param e Error
   * @todo Implement from applying further actions to this item
   */


  Sprite.prototype.raiseCriticalError = function (e, closable) {
    if (this.svgContainer) {
      if (!this._adapterO) {
        this.modal.content = e.message;
      } else {
        this.modal.content = this._adapterO.apply("criticalError", e).message;
      }

      if (!closable) {
        this.disabled = true;
      } else {
        this.modal.closable = true;
      }

      if (!_Options__WEBPACK_IMPORTED_MODULE_16__.options.suppressErrors) {
        this.modal.open();
      }
    }

    if (_Options__WEBPACK_IMPORTED_MODULE_16__.options.verbose) {
      console.log(e);
    }
  };
  /**
  * Processes JSON-based config before it is applied to the object.
  *
  * @ignore Exclude from docs
  * @param config  Config
  */


  Sprite.prototype.processConfig = function (config) {
    if (config) {
      // Tooltip color source
      if (_utils_Type__WEBPACK_IMPORTED_MODULE_29__.hasValue(config.tooltipColorSource) && _utils_Type__WEBPACK_IMPORTED_MODULE_29__.isString(config.tooltipColorSource) && this.map.hasKey(config.tooltipColorSource)) {
        config.tooltipColorSource = this.map.getKey(config.tooltipColorSource);
      } // Cursor styles


      if (_utils_Type__WEBPACK_IMPORTED_MODULE_29__.hasValue(config.cursorOverStyle) && _utils_Type__WEBPACK_IMPORTED_MODULE_29__.isString(config.cursorOverStyle)) {
        config.cursorOverStyle = this.getCursorStyle(config.cursorOverStyle);
      }

      if (_utils_Type__WEBPACK_IMPORTED_MODULE_29__.hasValue(config.cursorDowntyle) && _utils_Type__WEBPACK_IMPORTED_MODULE_29__.isString(config.cursorDowntyle)) {
        config.cursorDowntyle = this.getCursorStyle(config.cursorDowntyle);
      }

      if (_utils_Type__WEBPACK_IMPORTED_MODULE_29__.hasValue(config.cursorOptions)) {
        if (_utils_Type__WEBPACK_IMPORTED_MODULE_29__.hasValue(config.cursorOptions.overStyle) && _utils_Type__WEBPACK_IMPORTED_MODULE_29__.isString(config.cursorOptions.overStyle)) {
          config.cursorOptions.overStyle = this.getCursorStyle(config.cursorOptions.overStyle);
        }

        if (_utils_Type__WEBPACK_IMPORTED_MODULE_29__.hasValue(config.cursorOptions.downStyle) && _utils_Type__WEBPACK_IMPORTED_MODULE_29__.isString(config.cursorOptions.downStyle)) {
          config.cursorOptions.downStyle = this.getCursorStyle(config.cursorOptions.downStyle);
        }
      }
    }

    _super.prototype.processConfig.call(this, config);

    this.processDelayedMap();
  };
  /**
   * Converts string name of the cursor into actual [[MouseCursorStyle]].
   *
   * @param style  Cursor type
   * @return Cursor definition
   */


  Sprite.prototype.getCursorStyle = function (style) {
    switch (style) {
      case "grab":
        return _interaction_Mouse__WEBPACK_IMPORTED_MODULE_15__.MouseCursorStyle.grab;

      case "grabbing":
        return _interaction_Mouse__WEBPACK_IMPORTED_MODULE_15__.MouseCursorStyle.grabbing;

      case "pointer":
        return _interaction_Mouse__WEBPACK_IMPORTED_MODULE_15__.MouseCursorStyle.pointer;

      case "horizontalResize":
        return _interaction_Mouse__WEBPACK_IMPORTED_MODULE_15__.MouseCursorStyle.horizontalResize;

      case "verticalResize":
        return _interaction_Mouse__WEBPACK_IMPORTED_MODULE_15__.MouseCursorStyle.verticalResize;

      default:
        return _interaction_Mouse__WEBPACK_IMPORTED_MODULE_15__.MouseCursorStyle["default"];
    }
  };
  /**
   * This function is used to sort element's JSON config properties, so that
   * some properties that absolutely need to be processed last, can be put at
   * the end.
   *
   * @ignore Exclude from docs
   * @param a  Element 1
   * @param b  Element 2
   * @return Sorting number
   */


  Sprite.prototype.configOrder = function (a, b) {
    if (a == b) {
      return 0;
    } // Must come last
    else if (a == "tooltipColorSource") {
      return 1;
    } else if (b == "tooltipColorSource") {
      return -1;
    } else {
      return _super.prototype.configOrder.call(this, a, b);
    }
  };

  Object.defineProperty(Sprite.prototype, "isHidden", {
    /**
     * If `sprite.hide()` is called, we set isHidden to true when sprite is hidden.
     * This was added becaus hidden state might have visibility set to true and so
     * there would not be possible to find out if a sprite is technically hidden or not.
     */
    get: function get() {
      if (this._isHidden) {
        return this._isHidden;
      } else if (this._parent) {
        return this._parent.isHidden;
      }

      return false;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "showOnInit", {
    /**
     * @return Show on init?
     */
    get: function get() {
      return this.getPropertyValue("showOnInit");
    },

    /**
     * If this is set to `true`, Sprite, when inited will be instantly hidden
     * ("hidden" state applied) and then shown ("default" state applied).
     *
     * If your "default" state's `transitionDuration > 0` this will result in
     * initial animation from "hidden" state to "default" state.
     *
     * If you need a Sprite which has `showOnInit = true` not to be shown
     * initially, set `sprite.hidden = true`. Setting `sprite.visible = false`
     * will not prevent the animation and the sprite will be shown.
     *
     * @param value show on init?
     */
    set: function set(value) {
      value = _utils_Type__WEBPACK_IMPORTED_MODULE_29__.toBoolean(value);
      this.setShowOnInit(value);
    },
    enumerable: true,
    configurable: true
  });
  /**
   * @ignore
   */

  Sprite.prototype.setShowOnInit = function (value) {
    if (this.setPropertyValue("showOnInit", value)) {
      if (!this.isTemplate) {
        if (value && !this.inited && !this.hidden) {
          this._showOnInitDisposer = new _utils_Disposer__WEBPACK_IMPORTED_MODULE_6__.MultiDisposer([_Registry__WEBPACK_IMPORTED_MODULE_17__.registry.events.once("enterframe", this.hideInitially, this), this.events.once("beforevalidated", this.hideInitially, this, false), this.events.on("inited", this.appear, this, false)]);

          this._disposers.push(this._showOnInitDisposer);
        } else {
          if (this._showOnInitDisposer) {
            this._showOnInitDisposer.dispose();
          }
        }
      }
    }
  };
  /**
   * @ignore
   */


  Sprite.prototype.hideInitially = function () {
    if (!this.isDisposed()) {
      this.appeared = false; //if (!this.hidden && !this._isHidden) { // not good for series, as on enterframe it doesn't have data items yet.

      if (!this.inited) {
        this.hide(0);
      }
    }
  };
  /**
   * Hides the chart instantly and then shows it. If defaultState.transitionDuration > 0, this will result an animation in which properties of hidden state will animate to properties of visible state.
   */


  Sprite.prototype.appear = function () {
    var _this = this;

    this.appeared = false;

    if (!this.hidden && !this.isHidden) {
      this.hide(0);
    }

    if (!this.hidden) {
      var animation = this.show();

      if (animation && !animation.isFinished()) {
        this.addDisposer(animation.events.on("animationended", function () {
          _this.appeared = true;

          _this.dispatch("appeared");
        }));
      } else {
        this.appeared = true;
        this.dispatch("appeared");
      }
    } else {
      this.appeared = true;
      this.dispatch("appeared");
    }
  };

  Object.defineProperty(Sprite.prototype, "hidden", {
    /**
     * @return Is initially hidden?
     */
    get: function get() {
      return this.getPropertyValue("hidden");
    },

    /**
     * If a sprite has `showOnInit = true`, it will animate from "hidden" to
     * "default" state when initialized. To prevent this but keep
     * `showOnInit = true`, you can set `sprite.hidden = true`.
     *
     * @param value initially hidden?
     */
    set: function set(value) {
      value = _utils_Type__WEBPACK_IMPORTED_MODULE_29__.toBoolean(value);
      this.setPropertyValue("hidden", value);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "bbox", {
    /**
     * Returns bounding box (square) for this element.
     *
     * @ignore Exclude from docs
     */
    get: function get() {
      if (this.definedBBox) {
        return this.definedBBox;
      }

      return this._bbox;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Sprite.prototype, "plugins", {
    /**
     * A list of plugins (objects that implement [[IPlugin]] interface) attached
     * to this object.
     *
     * @since 4.2.2
     * @return List of plugins
     */
    get: function get() {
      var _this = this;

      if (!this._plugins) {
        this._plugins = new _utils_List__WEBPACK_IMPORTED_MODULE_5__.List();

        this._disposers.push(this._plugins.events.on("inserted", function (ev) {
          ev.newValue.target = _this;
          ev.newValue.init();
        }));

        this._disposers.push(new _utils_List__WEBPACK_IMPORTED_MODULE_5__.ListDisposer(this._plugins));
      }

      return this._plugins;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Called during the System.update method
   *
   * @ignore Exclude from docs
   */

  Sprite.prototype._systemUpdate = function (skippedSprites) {
    this.validate();
  };
  /**
   * Called during the System.update method
   *
   * @ignore Exclude from docs
   */


  Sprite.prototype._systemCheckIfValidate = function () {
    return true;
  };
  /**
   * Called during the System.validatePositions method
   *
   * @ignore Exclude from docs
   */


  Sprite.prototype._systemValidatePositions = function () {
    this.validatePosition();
  };
  /**
   * Called during the System.validateLayouts method
   *
   * @ignore Exclude from docs
   */


  Sprite.prototype._systemValidateLayouts = function () {};

  return Sprite;
}(_Base__WEBPACK_IMPORTED_MODULE_2__.BaseObjectEvents);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_Registry__WEBPACK_IMPORTED_MODULE_17__.registry.registeredClasses.Sprite = Sprite;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/SpriteEvents.js":
/*!*************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/SpriteEvents.js ***!
  \*************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "SpriteEventDispatcher": () => (/* binding */ SpriteEventDispatcher)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _utils_Dictionary__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils/Dictionary */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Dictionary.js");
/* harmony import */ var _utils_EventDispatcher__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils/EventDispatcher */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/EventDispatcher.js");
/* harmony import */ var _utils_Disposer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils/Disposer */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Disposer.js");
/* harmony import */ var _utils_Utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils/Utils */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Utils.js");
/* harmony import */ var _utils_Object__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils/Object */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Object.js");






/**
 * An [[EventDispatcher]] for [[Sprite]].
 *
 * @important
 */

var SpriteEventDispatcher =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__extends)(SpriteEventDispatcher, _super);

  function SpriteEventDispatcher() {
    var _this = _super !== null && _super.apply(this, arguments) || this;
    /**
     * [_interactionEvents description]
     *
     * @todo Description
     */


    _this._interactionEvents = new _utils_Dictionary__WEBPACK_IMPORTED_MODULE_0__.Dictionary();
    return _this;
  }
  /**
   * [_dispatchSpriteEvent description]
   *
   * @todo Description
   */


  SpriteEventDispatcher.prototype._dispatchSpriteEvent = function (ev) {
    if (this.target.disabled || this.target.isTemplate) {
      return;
    } // TODO remove this <any> later


    if (this.target.events.isEnabled(ev.type)) {
      var imev = _utils_Object__WEBPACK_IMPORTED_MODULE_4__.merge(ev, {
        target: this.target
      });
      this.target.events.dispatchImmediately(imev.type, imev);
    }
  };
  /**
   * [_dispatchSpritePointEvent description]
   *
   * @todo Description
   */


  SpriteEventDispatcher.prototype._dispatchSpritePointEvent = function (ev) {
    if (this.target.disabled || this.target.isTemplate) {
      return;
    } // TODO remove this <any> later


    if (this.target.events.isEnabled(ev.type)) {
      var imev = _utils_Object__WEBPACK_IMPORTED_MODULE_4__.merge(ev, {
        target: this.target,
        spritePoint: ev.point ? _utils_Utils__WEBPACK_IMPORTED_MODULE_3__.documentPointToSprite(ev.point, this.target) : undefined,
        svgPoint: this.target.getSvgPoint(ev.point)
      });
      this.target.events.dispatchImmediately(imev.type, imev);
    }
  };
  /**
   * [_addInteractionObjectEvent description]
   *
   * @todo Description
   */


  SpriteEventDispatcher.prototype._addInteractionObjectEvent = function (type, callback, context, shouldClone) {
    var _this = this;

    var key = shouldClone + "-" + type;

    var counter = this._interactionEvents.insertKeyIfEmpty(key, function () {
      var disposer = _this.target.interactions.events.on(type, callback, context, shouldClone);

      return new _utils_Disposer__WEBPACK_IMPORTED_MODULE_2__.CounterDisposer(function () {
        _this._interactionEvents.removeKey(key);

        disposer.dispose();
      });
    });

    return counter.increment();
  };
  /**
   * [_on description]
   *
   * @todo Description
   */


  SpriteEventDispatcher.prototype._on = function (once, type, callback, context, shouldClone, dispatch) {
    var info = _super.prototype._on.call(this, once, type, callback, context, shouldClone, dispatch);

    var disposers = [info.disposer];
    /**
     * Catching Sprite-related events, converting them to [[SpriteEvent]] and
     * triggering them on sprite
     */

    switch (type) {
      case "hit":
      case "track":
      case "doublehit":
      case "wheel":
      case "wheelup":
      case "wheeldown":
      case "wheelleft":
      case "wheelright":
        disposers.push(this._addInteractionObjectEvent(type, this._dispatchSpritePointEvent, this, shouldClone));
        break;

      case "rightclick":
      case "down": //case "hold":

      case "up":
      case "drag":
      case "dragged":
      case "dragstart":
      case "dragstop":
      case "over":
      case "out":
      case "swipe":
      case "swipeleft":
      case "swiperight":
      case "resize": //case "rotate":

      case "focus":
      case "blur":
      case "toggled":
        disposers.push(this._addInteractionObjectEvent(type, this._dispatchSpriteEvent, this, shouldClone));
        break;
    }
    /**
     * Set functional properties based on events. For example if we add a
     * "drag" event handler, we want to make the Sprite draggable, even if we
     * don't explicitly set "draggable"
     */


    switch (type) {
      case "hit":
      case "doublehit":
      case "rightclick":
      case "down":
      case "up":
        this.target.clickable = true;
        break;

      case "toggled":
        this.target.togglable = true;
        break;

      case "drag":
      case "dragstart":
      case "dragstop":
        this.target.draggable = true;
        break;

      case "track":
        this.target.trackable = true;
        break;

      case "resize":
        this.target.resizable = true;
        break;

      case "swipe":
      case "swipeleft":
      case "swiperight":
        this.target.swipeable = true;
        break;

      case "wheel":
      case "wheelup":
      case "wheeldown":
      case "wheelleft":
      case "wheelright":
        this.target.wheelable = true;
        break;

      case "over":
        this.target.hoverable = true;

      case "out":
        this.target.hoverable = true;
        break;

      case "focus":
      case "blur":
        this.target.focusable = true;
        break;
    }

    info.disposer = new _utils_Disposer__WEBPACK_IMPORTED_MODULE_2__.MultiDisposer(disposers);
    return info;
  };

  return SpriteEventDispatcher;
}(_utils_EventDispatcher__WEBPACK_IMPORTED_MODULE_1__.TargetedEventDispatcher);



/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/SpriteState.js":
/*!************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/SpriteState.js ***!
  \************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "SpriteState": () => (/* binding */ SpriteState)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Base */ "./node_modules/@amcharts/amcharts4/.internal/core/Base.js");
/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _utils_Adapter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils/Adapter */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Adapter.js");
/* harmony import */ var _utils_List__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils/List */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/List.js");
/* harmony import */ var _utils_Color__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils/Color */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Color.js");
/* harmony import */ var _utils_Percent__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils/Percent */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Percent.js");
/* harmony import */ var _utils_Utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./utils/Utils */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Utils.js");
/* harmony import */ var _utils_Ease__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./utils/Ease */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Ease.js");
/* harmony import */ var _utils_Object__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./utils/Object */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Object.js");
/* harmony import */ var _utils_Type__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/**
 * Module contains functionality related to [[Sprite]] states.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */











/**
 * Defines a state for [[Sprite]].
 *
 * A "state" is a special object that has all the same properties as the
 * [[Sprite]] of the same type, and which can be used to quickly apply a set
 * of property values. (set state)
 *
 * When [[Sprite]] (or any object that extends Sprite) is created it creates a
 * "default" state. You can modify the "default" state so that when the Sprite
 * returns to default state certain properties are added.
 *
 * Default state can be accessed using Sprite's `defaultState` getter.
 *
 * ```TypeScript
 * sprite.defaultState.properties.fillOpacity = 0.5;
 * ```
 * ```JavaScript
 * sprite.defaultState.properties.fillOpacity = 0.5;
 * ```
 * ```JSON
 * {
 *   // ...
 *   "defaultState": {
 *     "properties": {
 *       "fillOpacity": 0.5
 *     }
 *   }
 * }
 * ```
 *
 * If Sprite is "hoverable", it automatically adds a "hover" state, which is
 * applied when it has a cursor over it.
 *
 * ```TypeScript
 * let hoverstate = sprite.states.create("hover");
 * hoverstate.properties.fillOpacity = 1;
 * ```
 * ```JavaScript
 * var hoverstate = sprite.states.create("hover");
 * hoverstate.properties.fillOpacity = 1;
 * ```
 * ```JSON
 * {
 *   // ...
 *   "states": {
 *     "hover": {
 *       "properties": {
 *         "fillOpacity": 0.5
 *       }
 *     }
 *   }
 * }
 * ```
 *
 * The above will automatically apply "hover" state when the Sprite is hovered,
 * thus will set its `fillOpacity` property to 1, and will reset it to 0.5 when
 * it's no longer hovered.
 *
 * Every object that inherits from [[Sprite]] can and will add their own
 * properties to the available list.
 *
 * User can create their own states, and apply them as needed:
 *
 * ```TypeScript
 * let myCustomState = sprite.states.create("mystate");
 * myCustomState.properties.fillOpacity = 0.5;
 * myCustomState.properties.strokeOpacity = 0.8;
 * sprite.setState("mystate");
 * ```
 * ```JavaScript
 * var myCustomState = sprite.states.create("mystate");
 * myCustomState.properties.fillOpacity = 0.5;
 * myCustomState.properties.strokeOpacity = 0.8;
 * sprite.setState("mystate");
 * ```
 *
 * @see {@link https://www.amcharts.com/docs/v4/concepts/states/}
 * @important
 */

var SpriteState =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_10__.__extends)(SpriteState, _super);
  /**
   * Constructor
   */


  function SpriteState() {
    var _this = // Init
    _super.call(this) || this;
    /**
     * Duration of the transition to this state. 0 means instantenous transition.
     * Any number means the [[Sprite]] will transit smoothly to this state,
     * animating all animatable properties.
     *
     * @default 0
     * @see {@link https://www.amcharts.com/docs/v4/concepts/animations/} for more info about animations
     */


    _this.transitionDuration = 0;
    /**
     * Easing function to use when transitioning to this state.
     *
     * @default cubicOut
     * @see {@link Ease}
     * @see {@link https://www.amcharts.com/docs/v4/concepts/animations/} for more info about animations
     */

    _this.transitionEasing = _utils_Ease__WEBPACK_IMPORTED_MODULE_7__.cubicOut;
    /**
     * Collection of properties and their values that should be applied to [[Sprite]]
     * when switching to this State.
     *
     * The property values set on a [[SpriteState]] will override the ones set
     * directly on a [[Sprite]].
     */

    _this.properties = {};
    /**
     * A collection of key/value pairs that can be used to bind specific Sprite
     * properties to [[DataItem]].
     *
     * For example: `fill` property can be bound to `myCustomColor` field in
     * DataItem. The Sprite will automatically get the value for `fill` from its
     * DataItem.
     *
     * SpriteState-specific binding will override binding set directly on
     * [[Sprite]]. I.e. you can make Sprite use different fill color on hover by
     * adding a `fill` binding to a different DataItem key for Sprite's "hover"
     * state object.
     *
     * @see {@link Sprite}
     */

    _this.propertyFields = {}; //public propertyFields: Dictionary<keyof this["_properties"], string> = new Dictionary<keyof this["_properties"], string>();;

    /**
     * A list of [[Filter]] elements to be applied to the relative [[Sprite]]
     * when switching to this State.
     *
     * @param {List}
     */

    _this.filters = new _utils_List__WEBPACK_IMPORTED_MODULE_3__.List();
    /**
     * Identifies if this object is a "template" and should not be treated as
     * real object that is drawn or actually used in the chart.
     */

    _this.isTemplate = false;
    _this.className = "SpriteState"; // Make filter list disposable

    _this._disposers.push(new _utils_List__WEBPACK_IMPORTED_MODULE_3__.ListDisposer(_this.filters)); // Apply theme


    _this.applyTheme();

    return _this;
  }

  Object.defineProperty(SpriteState.prototype, "adapter", {
    /**
     * Holds Adapter.
     */
    get: function get() {
      var _this = this;

      if (!this._adapterO) {
        this._adapterO = new _utils_Adapter__WEBPACK_IMPORTED_MODULE_2__.Adapter(this); // Decorate adapter with events so that we can apply its settings whenever
        // it is modified

        this._adapterO.events.on("inserted", function (ev) {
          _this[ev.newValue.key] = _this[ev.newValue.key];
        }, undefined, false);

        this._adapterO.events.on("removed", function (ev) {
          _this[ev.newValue.key] = _this[ev.newValue.key];
        }, undefined, false);
      }

      return this._adapterO;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Returns [[Sprite]] element's property value.
   *
   * Will check if there are any bindings with [[DataItem]] and if there are
   * any method callbacks set up for the specific property.
   *
   * @param propertyName  Property name
   * @return Property value
   */

  SpriteState.prototype.getPropertyValue = function (propertyName) {
    var propValue = this.properties[propertyName];
    var sprite = this.sprite;

    if (sprite) {
      var fieldName = this.propertyFields[propertyName];

      if (_utils_Type__WEBPACK_IMPORTED_MODULE_9__.hasValue(fieldName)) {
        if (sprite.dataItem) {
          propValue = sprite.dataItem.dataContext[fieldName];
        }

        if (propValue == undefined) {
          propValue = "__unset";
        }
      } // Apply adapters
      // If the value itself is undefined, we're going to pass in Sprite's
      // value to adapters
      // @todo get rid of <any>


      if (!_utils_Type__WEBPACK_IMPORTED_MODULE_9__.hasValue(propValue)) {
        var spriteValue = sprite.getPropertyValue(propertyName);

        if (this._adapterO) {
          propValue = this._adapterO.apply(propertyName, spriteValue);
        } else {
          propValue = spriteValue;
        }

        if (propValue == spriteValue) {
          propValue = undefined;
        }
      } else {
        if (this._adapterO) {
          propValue = this._adapterO.apply(propertyName, propValue);
        }
      }
      /*let method = this.propertyMethods.getKey(propertyName);
      if (method) {
          propValue = method(sprite, propertyName);
      }*/

    }

    return propValue;
  };
  /**
   * Copies all property and style values from another [[SpriteState]] object.
   *
   * @param source  Source [[SpriteState]]
   */


  SpriteState.prototype.copyFrom = function (source) {
    if (source && source != this) {
      this.transitionDuration = source.transitionDuration;
      this.transitionEasing = source.transitionEasing;
      _utils_Utils__WEBPACK_IMPORTED_MODULE_6__.copyProperties(source.properties, this.properties);
      _utils_Utils__WEBPACK_IMPORTED_MODULE_6__.copyProperties(source.propertyFields, this.propertyFields);
      this.filters.copyFrom(source.filters);

      if (source._adapterO) {
        this.adapter.copyFrom(source._adapterO);
      }
    }
  };

  Object.defineProperty(SpriteState.prototype, "allValues", {
    /**
     * Returns all values that should be applied by the SpriteState.
     *
     * It takes adapters into account.
     *
     * @ignore Exclude from docs
     * @return Properties
     * @todo Add adapter values
     * @todo proper type this["_properties"]
     */
    get: function get() {
      var _this = this; // Init return value


      var res = {}; // Apply adapters to all values

      _utils_Object__WEBPACK_IMPORTED_MODULE_8__.each(this.properties, function (prop, value) {
        res[prop] = _this.getPropertyValue(prop);
      }); // Cycle through all adapters and add values for missing properties

      if (this._adapterO) {
        var keys = this._adapterO.keys();

        _utils_Object__WEBPACK_IMPORTED_MODULE_8__.each(keys, function (_x, prop) {
          var value = _this.getPropertyValue(prop);

          res[prop] = value;
        });
      } // Cycle through all property fileds and add values for missing properties


      var propertyFields = this.propertyFields;
      _utils_Object__WEBPACK_IMPORTED_MODULE_8__.each(propertyFields, function (prop) {
        var value = _this.getPropertyValue(prop);

        res[prop] = value;
      });
      return res;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Resets the State to initial state - no values or Filters applied.
   */

  SpriteState.prototype.reset = function () {
    this.properties = {};
    this.filters.clear();
  };
  /**
   * Processes JSON-based config before it is applied to the object.
   *
   * @ignore Exclude from docs
   * @param config  Config
   */


  SpriteState.prototype.processConfig = function (config) {
    if (_utils_Type__WEBPACK_IMPORTED_MODULE_9__.hasValue(config) && _utils_Type__WEBPACK_IMPORTED_MODULE_9__.hasValue(config["properties"])) {
      _utils_Object__WEBPACK_IMPORTED_MODULE_8__.each(config["properties"], function (key, value) {
        if (_utils_Type__WEBPACK_IMPORTED_MODULE_9__.isString(value)) {
          if (value.match(/^[0-9.\-]+\%$/)) {
            config["properties"][key] = (0,_utils_Percent__WEBPACK_IMPORTED_MODULE_5__.percent)(_utils_Type__WEBPACK_IMPORTED_MODULE_9__.toNumber(value));
          } else if (value.match(/^\#[0-9abcdef]{3,}$/i)) {
            config["properties"][key] = (0,_utils_Color__WEBPACK_IMPORTED_MODULE_4__.toColor)(value);
          }
        }
      });
    }

    _super.prototype.processConfig.call(this, config);
  };
  /**
   * Adds easing functions to "function" fields.
   *
   * @param field  Field name
   * @return Assign as function?
   */


  SpriteState.prototype.asFunction = function (field) {
    return field == "transitionEasing" || _super.prototype.asIs.call(this, field);
  };

  return SpriteState;
}(_Base__WEBPACK_IMPORTED_MODULE_0__.BaseObject);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses.SpriteState = SpriteState;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/System.js":
/*!*******************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/System.js ***!
  \*******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "System": () => (/* binding */ System),
/* harmony export */   "system": () => (/* binding */ system)
/* harmony export */ });
/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _Container__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Container */ "./node_modules/@amcharts/amcharts4/.internal/core/Container.js");
/* harmony import */ var _utils_AsyncPending__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils/AsyncPending */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/AsyncPending.js");
/* harmony import */ var _utils_Array__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils/Array */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Array.js");
/* harmony import */ var _utils_Object__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils/Object */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Object.js");
/* harmony import */ var _utils_Log__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils/Log */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Log.js");
/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */







/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * The main class that handles system-wide tasks, like caching, heartbeats, etc.
 * @important
 */

var System =
/** @class */
function () {
  /**
   * Performs initialization of the System object.
   *
   * Called when the first [[Sprite]] object is created.
   *
   * @ignore Exclude from docs
   */
  function System() {
    /**
     * A flag indicating if the system is on pause.
     */
    this._isPaused = false;
    /**
     * Holds the list of currently playing animations.
     *
     * @ignore Exclude from docs
     */

    this.animations = [];
    /**
     * Unique ID of the object.
     */

    this.uid = _Registry__WEBPACK_IMPORTED_MODULE_0__.registry.getUniqueId();
    /**
     * @todo Description
     * @todo Needed?
     * @ignore Exclude from docs
     */

    this.dummyCounter = 0;
    this._frameRequested = false;
    this.updateStepDuration = 45;
    this.time = Date.now();
  }
  /**
   * Reports time elapsed since timer was reset.
   *
   * @ignore Exclude from docs
   * @todo Needed?
   * @param msg    Message to report in console
   * @param reset  Reset time counter
   */


  System.prototype.reportTime = function (msg, reset) {
    if (this.dummyCounter < 6) {//console.log(Date.now() - this.time, msg, this.dummyCounter2);
    }

    if (reset) {
      this.time = Date.now();
    }
  };
  /**
   * Performs "heartbeat" operations `frameRate` number of times per second.
   *
   * When the chart element is invalidated, it is not immediately redrawn.
   *
   * Instead it waits for the next `update()` cycle to be re-validated.
   *
   * @ignore Exclude from docs
   * @todo Maybe should be private?
   */


  System.prototype.update = function () {
    var _this = this;

    if (this._isPaused) {
      return;
    }

    this._frameRequested = false;
    var time = Date.now();
    _Registry__WEBPACK_IMPORTED_MODULE_0__.registry.dispatchImmediately("enterframe"); //this.validateLayouts();
    //this.validatePositions();

    /*
            for (let key in registry.invalidLayouts) {
                this.validateLayouts(key);
            }
            for (let key in registry.invalidPositions) {
                this.validatePositions(key);
            }
    */

    var skippedComponents = []; // data objects first - do all calculations
    // only data is parsed in chunks, thats why we do for loop instead of a while like with other invalid items.
    // important to go backwards, as items are removed!
    // TODO use iterator instead

    for (var key in _Registry__WEBPACK_IMPORTED_MODULE_0__.registry.invalidDatas) {
      if (_utils_Object__WEBPACK_IMPORTED_MODULE_4__.hasKey(_Registry__WEBPACK_IMPORTED_MODULE_0__.registry.invalidDatas, key)) {
        var invalidData = _Registry__WEBPACK_IMPORTED_MODULE_0__.registry.invalidDatas[key];

        while (invalidData.length > 0) {
          var component = invalidData[0];
          var dataProvider = component.dataProvider;

          if (!component.isDisposed()) {
            if (dataProvider && dataProvider.dataInvalid) {
              try {
                dataProvider.validateData();

                if (dataProvider.dataValidationProgress < 1) {
                  break;
                }
              } catch (e) {
                _utils_Array__WEBPACK_IMPORTED_MODULE_3__.remove(invalidData, dataProvider);
                dataProvider.raiseCriticalError(e);
              }
            } else {
              try {
                component.validateData();

                if (component.dataValidationProgress < 1) {
                  break;
                }
              } catch (e) {
                _utils_Array__WEBPACK_IMPORTED_MODULE_3__.remove(invalidData, component);
                component.raiseCriticalError(e);
              }
            }
          } else {
            _utils_Array__WEBPACK_IMPORTED_MODULE_3__.remove(invalidData, component);
          }
        }

        if (Date.now() - time > this.updateStepDuration) {
          break;
        }
      }
    }

    while (_Registry__WEBPACK_IMPORTED_MODULE_0__.registry.invalidRawDatas.length > 0) {
      var component = _Registry__WEBPACK_IMPORTED_MODULE_0__.registry.invalidRawDatas[0];

      if (!component.isDisposed()) {
        try {
          component.validateRawData();
        } catch (e) {
          _utils_Array__WEBPACK_IMPORTED_MODULE_3__.remove(_Registry__WEBPACK_IMPORTED_MODULE_0__.registry.invalidRawDatas, component);
          component.raiseCriticalError(e);
        }
      } else {
        _utils_Array__WEBPACK_IMPORTED_MODULE_3__.remove(_Registry__WEBPACK_IMPORTED_MODULE_0__.registry.invalidRawDatas, component);
      }
    } // TODO use iterator instead


    while (_Registry__WEBPACK_IMPORTED_MODULE_0__.registry.invalidDataItems.length > 0) {
      var component = _Registry__WEBPACK_IMPORTED_MODULE_0__.registry.invalidDataItems[0];
      var dataProvider = component.dataProvider; // this is needed to avoid partial value validation when data is parsed in chunks

      if (component.isDisposed() || component.dataInvalid || dataProvider && dataProvider.dataInvalid) {// void
      } else {
        try {
          component.validateDataItems();
        } catch (e) {
          _utils_Array__WEBPACK_IMPORTED_MODULE_3__.remove(_Registry__WEBPACK_IMPORTED_MODULE_0__.registry.invalidDataItems, component);
          component.raiseCriticalError(e);
        }
      } // this might seem too much, as validateValues removes from invalidDataItems aswell, but just to be sure (in case validateData is overriden and no super is called)


      _utils_Array__WEBPACK_IMPORTED_MODULE_3__.remove(_Registry__WEBPACK_IMPORTED_MODULE_0__.registry.invalidDataItems, component);
    } // TODO use iterator instead


    while (_Registry__WEBPACK_IMPORTED_MODULE_0__.registry.invalidDataRange.length > 0) {
      var component = _Registry__WEBPACK_IMPORTED_MODULE_0__.registry.invalidDataRange[0];
      var dataProvider = component.dataProvider;

      if (component.isDisposed() || component.dataInvalid || dataProvider && dataProvider.dataInvalid) {// void
      } else {
        try {
          component.validateDataRange();

          if (!component.skipRangeEvent) {
            component.dispatchImmediately("datarangechanged");
          }

          component.skipRangeEvent = false;
        } catch (e) {
          _utils_Array__WEBPACK_IMPORTED_MODULE_3__.remove(_Registry__WEBPACK_IMPORTED_MODULE_0__.registry.invalidDataRange, component);
          component.raiseCriticalError(e);
        }
      } // this might seem too much, as validateDataRange removes from invalidDataRange aswell, but just to be sure (in case validateData is overriden and no super is called)


      _utils_Array__WEBPACK_IMPORTED_MODULE_3__.remove(_Registry__WEBPACK_IMPORTED_MODULE_0__.registry.invalidDataRange, component);
    }

    var skippedSprites = []; // display objects later
    // TODO use iterator instead

    _utils_Object__WEBPACK_IMPORTED_MODULE_4__.each(_Registry__WEBPACK_IMPORTED_MODULE_0__.registry.invalidLayouts, function (key) {
      _this.validateLayouts(key);
    });
    _utils_Object__WEBPACK_IMPORTED_MODULE_4__.each(_Registry__WEBPACK_IMPORTED_MODULE_0__.registry.invalidPositions, function (key) {
      _this.validatePositions(key);
    });
    var hasSkipped = false;
    time = Date.now();
    _utils_Object__WEBPACK_IMPORTED_MODULE_4__.each(_Registry__WEBPACK_IMPORTED_MODULE_0__.registry.invalidSprites, function (key, invalidSprites) {
      var count = 0;

      while (invalidSprites.length > 0) {
        _this.validateLayouts(key);

        _this.validatePositions(key);

        count++;

        if (count == 5) {
          if (Date.now() - time > _this.updateStepDuration) {
            break;
          }

          count = 0;
        }

        var sprite = invalidSprites[invalidSprites.length - 1]; // we need to check this, as validateLayout might validate sprite

        if (sprite && !sprite.isDisposed()) {
          if (!sprite._systemCheckIfValidate()) {
            // void
            skippedSprites.push(sprite);
          } else {
            if (!_this.checkIfValidate2(sprite)) {
              // void
              skippedSprites.push(sprite);
            } else {
              try {
                sprite._systemUpdate(skippedSprites);
              } catch (e) {
                sprite.invalid = false;
                _utils_Array__WEBPACK_IMPORTED_MODULE_3__.remove(invalidSprites, sprite);
                sprite.raiseCriticalError(e);
              }
            }
          } // this might seem too much, but it's ok


          sprite.invalid = false;
        }

        _utils_Array__WEBPACK_IMPORTED_MODULE_3__.remove(invalidSprites, sprite);
      }

      _Registry__WEBPACK_IMPORTED_MODULE_0__.registry.invalidSprites[key] = _Registry__WEBPACK_IMPORTED_MODULE_0__.registry.invalidSprites[key].concat(skippedSprites);
    });
    _utils_Object__WEBPACK_IMPORTED_MODULE_4__.each(_Registry__WEBPACK_IMPORTED_MODULE_0__.registry.invalidSprites, function (key, value) {
      if (value.length > 0) {
        hasSkipped = true;
      }
    });
    _utils_Object__WEBPACK_IMPORTED_MODULE_4__.each(_Registry__WEBPACK_IMPORTED_MODULE_0__.registry.invalidDatas, function (key, value) {
      if (value.length > 0) {
        hasSkipped = true;
      }
    }); // TODO make this more efficient
    // TODO don't copy the array

    _utils_Array__WEBPACK_IMPORTED_MODULE_3__.each(_utils_Array__WEBPACK_IMPORTED_MODULE_3__.copy(this.animations), function (x) {
      x.update();
    }); //if(!hasSkipped){

    _utils_Object__WEBPACK_IMPORTED_MODULE_4__.each(_Registry__WEBPACK_IMPORTED_MODULE_0__.registry.invalidLayouts, function (key) {
      _this.validateLayouts(key);
    });
    _utils_Object__WEBPACK_IMPORTED_MODULE_4__.each(_Registry__WEBPACK_IMPORTED_MODULE_0__.registry.invalidPositions, function (key) {
      _this.validatePositions(key);
    }); //}

    (0,_utils_AsyncPending__WEBPACK_IMPORTED_MODULE_2__.triggerIdle)();
    _utils_Object__WEBPACK_IMPORTED_MODULE_4__.each(_Registry__WEBPACK_IMPORTED_MODULE_0__.registry.invalidLayouts, function (key) {
      _this.validateLayouts(key);
    });
    _utils_Object__WEBPACK_IMPORTED_MODULE_4__.each(_Registry__WEBPACK_IMPORTED_MODULE_0__.registry.invalidPositions, function (key) {
      _this.validatePositions(key);
    });
    _Registry__WEBPACK_IMPORTED_MODULE_0__.registry.dispatchImmediately("exitframe");

    if (hasSkipped || this.animations.length > 0 || skippedComponents.length > 0) {
      this.requestFrame();
    }

    if (this.updateStepDuration < 200) {
      var all0_1 = true;
      _utils_Object__WEBPACK_IMPORTED_MODULE_4__.each(_Registry__WEBPACK_IMPORTED_MODULE_0__.registry.invalidDatas, function (key, value) {
        if (value.length > 0) {
          all0_1 = false;
        }
      });
      _utils_Object__WEBPACK_IMPORTED_MODULE_4__.each(_Registry__WEBPACK_IMPORTED_MODULE_0__.registry.invalidSprites, function (key, value) {
        if (value.length > 0) {
          all0_1 = false;
        }
      });

      if (all0_1) {
        this.updateStepDuration = 200;
      }
    }
  };

  System.prototype.checkIfValidate2 = function (sprite) {
    if (sprite.dataItem && sprite.dataItem.component && sprite.dataItem.component.dataInvalid && !sprite.dataItem.component.isTemplate) {
      return false;
    } else {
      return true;
    }
  };
  /**
   * Requests new animation frame
   */


  System.prototype.requestFrame = function () {
    var _this = this;

    if (!this._frameRequested) {
      (0,_utils_AsyncPending__WEBPACK_IMPORTED_MODULE_2__.raf)(function () {
        _this.update();
      });
      this._frameRequested = true;
    }
  };
  /**
   * Call this method if you update data or config of a chart that is in
   * hidden container, after revealing the container, so that labels and
   * possibly other elements can correctly arrange themselves.
   *
   * @since 4.7.10
   * @param  container  Target container
   */


  System.prototype.softInvalidate = function (container) {
    var _this = this;

    container.children.each(function (child) {
      if (child instanceof _Container__WEBPACK_IMPORTED_MODULE_1__.Container) {
        _this.softInvalidate(child);
      }

      if (child.measureFailed) {
        if ((0,_Registry__WEBPACK_IMPORTED_MODULE_0__.is)(child, "Label")) {
          child.hardInvalidate();
        } else {
          child.invalidate();
        }

        child.measureFailed = false;
      }
    });
  };
  /**
   * Triggers position re-validation on all [[Sprite]] elements that have
   * invalid(ated) positions.
   *
   * @ignore Exclude from docs
   * @todo Maybe should be private?
   */


  System.prototype.validatePositions = function (id) {
    // invalid positions
    // TODO use iterator instead
    var invalidPositions = _Registry__WEBPACK_IMPORTED_MODULE_0__.registry.invalidPositions[id];

    while (invalidPositions.length > 0) {
      var sprite = invalidPositions[invalidPositions.length - 1];

      if (!sprite.isDisposed()) {
        try {
          sprite._systemValidatePositions();
        } catch (e) {
          sprite.positionInvalid = false;
          _utils_Array__WEBPACK_IMPORTED_MODULE_3__.remove(invalidPositions, sprite);
          sprite.raiseCriticalError(e);
        }
      } else {
        _utils_Array__WEBPACK_IMPORTED_MODULE_3__.remove(invalidPositions, sprite);
      }
    }
  };
  /**
   * Triggers position re-validation on all [[Container]] elements that have
   * invalid(ated) layouts.
   *
   * @ignore Exclude from docs
   * @todo Maybe should be private?
   */


  System.prototype.validateLayouts = function (id) {
    // invalid positions
    // TODO use iterator instead
    var invalidLayouts = _Registry__WEBPACK_IMPORTED_MODULE_0__.registry.invalidLayouts[id];

    while (invalidLayouts.length > 0) {
      var container = invalidLayouts[invalidLayouts.length - 1];

      if (!container.isDisposed()) {
        try {
          container.children.each(function (sprite) {
            sprite._systemValidateLayouts();
          });
          container.validateLayout();
        } catch (e) {
          container.layoutInvalid = false;
          _utils_Array__WEBPACK_IMPORTED_MODULE_3__.remove(invalidLayouts, container);
          container.raiseCriticalError(e);
        }
      } else {
        _utils_Array__WEBPACK_IMPORTED_MODULE_3__.remove(invalidLayouts, container);
      }
    }
  };
  /**
   * Outputs string to console if `verbose` is `true`.
   *
   * @param value Message to output to console
   */


  System.prototype.log = function (value) {
    _utils_Log__WEBPACK_IMPORTED_MODULE_5__.log(value);
  };

  Object.defineProperty(System.prototype, "isPaused", {
    /**
     * @return Is system on pause?
     */
    get: function get() {
      return this._isPaused;
    },

    /**
     * Pauses all the processes of all the amCharts objects on the page
     *
     * @return is paused?
     */
    set: function set(value) {
      this._isPaused = value;

      if (!value) {
        this._frameRequested = false;
        this.requestFrame();
      }
    },
    enumerable: true,
    configurable: true
  });
  /**
   * amCharts Version.
   *
   * This follows npm's semver specification.
   *
   * @see {@link https://docs.npmjs.com/misc/semver}
   */

  System.VERSION = "4.10.28";
  return System;
}();


/**
 * A singleton global instance of [[System]].
 *
 * All code should use this, rather than instantiating their
 * own System objects.
 */

var system = new System();

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/data/CSVParser.js":
/*!***************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/data/CSVParser.js ***!
  \***************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "CSVParser": () => (/* binding */ CSVParser)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _DataParser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./DataParser */ "./node_modules/@amcharts/amcharts4/.internal/core/data/DataParser.js");
/* harmony import */ var _utils_Type__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/* harmony import */ var _utils_Array__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/Array */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Array.js");
/**
 * CSV parser.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */




/**
 * Define possible separators.
 */

var separators = [",", ";", "\t"];
/**
 * A parser for CSV format.
 *
 * @important
 */

var CSVParser =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__extends)(CSVParser, _super);

  function CSVParser() {
    var _this = _super !== null && _super.apply(this, arguments) || this;
    /**
     * Content-type suitable for CSV format.
     */


    _this.contentType = "text/csv";
    /**
     * Parser options.
     *
     * @see {@link ICSVOptions} for description of each option
     */

    _this.options = {
      delimiter: "",
      reverse: false,
      skipRows: 0,
      skipEmpty: true,
      useColumnNames: false
    };
    return _this;
  }
  /**
   * Tests if the format is CSV.
   *
   * @param data  Source data
   * @return Is it CSV?
   */


  CSVParser.isCSV = function (data) {
    return CSVParser.getDelimiterFromData(data) ? true : false;
  };
  /**
   * Tries to determine a column separator.
   *
   * @param data  Source data
   * @return Separator
   */


  CSVParser.getDelimiterFromData = function (data) {
    // We're going to take first few lines of the CSV with different
    // possible separators and check if it results in same number of columns.
    // If it does, we're going to assume it's a CSV
    var lines = data.split("\n");
    var len = lines.length;
    var separator;
    _utils_Array__WEBPACK_IMPORTED_MODULE_2__.each(separators, function (sep) {
      var columns = 0,
          lineColums = 0; // TODO replace with iterators

      for (var i = 0; i < len; ++i) {
        // Get number of columns in a line
        columns = lines[i].split(sep).length;

        if (columns > 1) {
          // More than one column - possible candidate
          if (lineColums === 0) {
            // First line
            lineColums = columns;
          } else if (columns != lineColums) {
            // Incorrect number of columns, give up on this separator
            lineColums = 0;
            break;
          }
        } else {
          // Not this separator
          // Not point in continuing
          lineColums = 0;
          break;
        }
      } // Check if we have a winner


      if (lineColums) {
        separator = sep;
      }
    });
    return separator;
  };
  /**
   * Parses and returns data.
   *
   * @param data  Unparsed data
   * @return Parsed data
   */


  CSVParser.prototype.parse = function (csv) {
    // Check if we have delimiter set
    if (!this.options.delimiter) {
      this.options.delimiter = CSVParser.getDelimiterFromData(csv);
    } // Get CSV data as array


    var data = this.CSVToArray(csv, this.options.delimiter); // Do we need to cast some fields to numbers?

    var empty = _utils_Type__WEBPACK_IMPORTED_MODULE_1__.hasValue(this.options.emptyAs);
    var numbers = this.parsableNumbers;
    var dates = this.parsableDates; // Init resuling array

    var res = [],
        cols = [],
        col,
        i; // Skip rows

    for (i = 0; i < this.options.skipRows; i++) {
      data.shift();
    } // First row holds column names?


    if (this.options.useColumnNames) {
      cols = data.shift(); // Normalize column names

      for (var x = 0; x < cols.length; x++) {
        // trim
        col = _utils_Type__WEBPACK_IMPORTED_MODULE_1__.hasValue(cols[x]) ? cols[x].replace(/^\s+|\s+$/gm, "") : ""; // Check for empty

        if ("" === col) {
          col = "col" + x;
        }

        cols[x] = col;
      }
    } // Iterate through the result set


    var row;

    while (true) {
      row = this.options.reverse ? data.pop() : data.shift();

      if (!row) {
        break;
      }

      if (this.options.skipEmpty && row.length === 1 && row[0] === "") {
        continue;
      }

      var dataPoint = {};

      for (i = 0; i < row.length; i++) {
        col = undefined === cols[i] ? "col" + i : cols[i];
        dataPoint[col] = row[i] === "" ? this.options.emptyAs : row[i]; // Convert

        if (empty) {
          dataPoint[col] = this.maybeToEmpty(dataPoint[col]);
        }

        if (numbers) {
          dataPoint[col] = this.maybeToNumber(col, dataPoint[col]);
        }

        if (dates) {
          dataPoint[col] = this.maybeToDate(col, dataPoint[col]);
        }
      }

      res.push(dataPoint);
    }

    return res;
  };
  /**
   * Converts CSV into array.
   *
   * The functionality of this function is taken from here:
   * http://www.bennadel.com/blog/1504-ask-ben-parsing-csv-strings-with-javascript-exec-regular-expression-command.htm
   *
   * @param data       Source data
   * @param delimiter  Column delimiter
   * @return Parsed array
   */


  CSVParser.prototype.CSVToArray = function (data, delimiter) {
    // Check to see if the delimiter is defined. If not,
    // then default to comma.
    delimiter = delimiter || ','; // Create a regular expression to parse the CSV values.

    var objPattern = new RegExp( // Delimiters.
    "(\\" + delimiter + "|\\r?\\n|\\r|^)" + // Quoted fields.
    "(?:\"([^\"]*(?:\"\"[^\"]*)*)\"|" + // Standard fields.
    "([^\"\\" + delimiter + "\\r\\n]*))", "gi"); // Create an array to hold our data. Give the array
    // a default empty first row.

    var arrData = [[]]; // Create an array to hold our individual pattern
    // matching groups.

    var arrMatches = null; // Keep looping over the regular expression matches
    // until we can no longer find a match.

    while (true) {
      arrMatches = objPattern.exec(data);

      if (!arrMatches) {
        break;
      } // Get the delimiter that was found.


      var strMatchedDelimiter = arrMatches[1]; // Check to see if the given delimiter has a length
      // (is not the start of string) and if it matches
      // field delimiter. If id does not, then we know
      // that this delimiter is a row delimiter.

      if (strMatchedDelimiter.length && strMatchedDelimiter !== delimiter) {
        // Since we have reached a new row of data,
        // add an empty row to our data array.
        arrData.push([]);
      } // Now that we have our delimiter out of the way,
      // let's check to see which kind of value we
      // captured (quoted or unquoted).


      var strMatchedValue = void 0;

      if (arrMatches[2]) {
        // We found a quoted value. When we capture
        // this value, unescape any double quotes.
        strMatchedValue = arrMatches[2].replace(new RegExp("\"\"", "g"), "\"");
      } else {
        // We found a non-quoted value.
        strMatchedValue = arrMatches[3];
      } // Now that we have our value string, let's add
      // it to the data array.


      arrData[arrData.length - 1].push(strMatchedValue);
    } // Return the parsed data.


    return arrData;
  };

  return CSVParser;
}(_DataParser__WEBPACK_IMPORTED_MODULE_0__.DataParser);



/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/data/DataLoader.js":
/*!****************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/data/DataLoader.js ***!
  \****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "DataLoader": () => (/* binding */ DataLoader),
/* harmony export */   "dataLoader": () => (/* binding */ dataLoader)
/* harmony export */ });
/* harmony import */ var _CSVParser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./CSVParser */ "./node_modules/@amcharts/amcharts4/.internal/core/data/CSVParser.js");
/* harmony import */ var _JSONParser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./JSONParser */ "./node_modules/@amcharts/amcharts4/.internal/core/data/JSONParser.js");
/* harmony import */ var _utils_Adapter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/Adapter */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Adapter.js");
/* harmony import */ var _utils_Net__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/Net */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Net.js");
/* harmony import */ var _utils_Array__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/Array */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Array.js");
/**
 * Data Loader is responsible for loading and parsing external data
 */





;
/**
 * Data Loader is responsible for loading and parsing external data.
 *
 * There is just one instance of DataLoader per system. Unless you have a
 * speicific reason, do not instantiate additional instances.
 *
 * The global instance of Data Loader is accessible via:
 *
 * ```TypeScript
 * am4core.dataLoader;
 * ```
 * ```JavaScript
 * am4core.dataLoader;
 * ```
 *
 * A loading of specific data source is done via [[DataSource]].
 *
     Please refer to [[DataSource]] for information how to use it.
 *
 * @see {@link IDataLoaderAdapters} for a list of available Adapters
 */

var DataLoader =
/** @class */
function () {
  function DataLoader() {
    /**
     * Adapter.
     */
    this.adapter = new _utils_Adapter__WEBPACK_IMPORTED_MODULE_2__.Adapter(this);
  }
  /**
   * Loads a supplied [[DataSource]] or an array of data sources, then calls
   * their respective `parse` methods.
   *
   * @param source  A single data source or an array of multiple of data sources
   */


  DataLoader.prototype.load = function (source) {
    var sources = Array.isArray(source) ? source : [source]; // Add each Source to the list to be loaded simultaneously

    var promises = _utils_Array__WEBPACK_IMPORTED_MODULE_4__.map(sources, function (x) {
      // Dispatch events
      x.dispatchImmediately("started");
      x.dispatchImmediately("loadstarted");
      return _utils_Net__WEBPACK_IMPORTED_MODULE_3__.load(x.url, x, x.requestOptions);
    }); // Run all promises in parallel

    Promise.all(promises).then(function (res) {
      // Process each loaded source
      _utils_Array__WEBPACK_IMPORTED_MODULE_4__.each(res, function (result) {
        // Get Source
        var source = result.target; // Dispatch events

        source.dispatchImmediately("loadended");

        if (result.error) {
          if (source.events.isEnabled("error")) {
            source.events.dispatchImmediately("error", {
              type: "error",
              code: result.xhr.status,
              message: source.language.translate("Unable to load file: %1", null, source.url),
              target: source
            });
          }
        } else {
          // Initiate parsing of the loaded data
          source.processData(result.response, result.type);
        }

        source.dispatchImmediately("ended");
      });
    }).catch(function (res) {
      if (res.target) {
        res.target.dispatchImmediately("loadended");

        if (res.target.events.isEnabled("error")) {
          res.target.events.dispatchImmediately("error", {
            type: "error",
            code: res.xhr.status,
            message: res.target.language.translate("Unable to load file: %1", null, res.target.url),
            target: res.target
          });
        }

        res.target.dispatchImmediately("ended");
      }
    });
  };
  /**
   * Instantiates a [[DataParser]] object based on the data type.
   * Built-in parser types are as follows:
   *
   * * "csv" or "text/csv"
   * * "json" or "application/json"
   *
   * @param contentType  A format type
   * @return A parser object
   */


  DataLoader.prototype.getParserByType = function (contentType) {
    // Let some plugin decide
    var parser = this.adapter.apply("getParserByType", {
      parser: null,
      type: contentType
    }).parser;

    if (parser) {
      return parser;
    }

    if (contentType == "csv" || contentType == "text/csv" || contentType == "application/vnd.ms-excel") {
      return new _CSVParser__WEBPACK_IMPORTED_MODULE_0__.CSVParser();
    }

    if (contentType == "json" || contentType == "application/json") {
      return new _JSONParser__WEBPACK_IMPORTED_MODULE_1__.JSONParser();
    }

    return;
  };
  /**
   * Tries to determine a parser out of content type and/or actual data.
   *
   * @param data         Data
   * @param contentType  Content-type
   * @return Parser instance
   */


  DataLoader.prototype.getParserByData = function (data, contentType) {
    // Let some plugin decide
    var parser = this.adapter.apply("getParserByData", {
      parser: null,
      data: data,
      type: contentType
    }).parser; // Check if we have parser from outside code

    if (!parser) {
      // No, let's try to figure it out
      parser = this.getParserByType(contentType);

      if (parser) {
        // We're able to figure out parser by content-type
        return parser;
      } else if (_JSONParser__WEBPACK_IMPORTED_MODULE_1__.JSONParser.isJSON(data)) {
        return this.getParserByType("json");
      } else if (_CSVParser__WEBPACK_IMPORTED_MODULE_0__.CSVParser.isCSV(data)) {
        return this.getParserByType("csv");
      }
    }

    return parser;
  };

  return DataLoader;
}();


/**
 * Create instance of Data Loader
 */

var dataLoader = new DataLoader();

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/data/DataParser.js":
/*!****************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/data/DataParser.js ***!
  \****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "DataParser": () => (/* binding */ DataParser)
/* harmony export */ });
/* harmony import */ var _formatters_DateFormatter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../formatters/DateFormatter */ "./node_modules/@amcharts/amcharts4/.internal/core/formatters/DateFormatter.js");
/* harmony import */ var _utils_Utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/Utils */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Utils.js");
/* harmony import */ var _utils_Type__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/**
 * Data parser module.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */



/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Base class for the data parsers.
 */

var DataParser =
/** @class */
function () {
  function DataParser() {}
  /**
   * A "placeholder" function for real parsers to override.
   *
   * @ignore Exclude from docs
   * @param data  Source data
   * @return Parsed data (empty)
   */


  DataParser.prototype.parse = function (data) {
    return [];
  };

  ;
  Object.defineProperty(DataParser.prototype, "parsableNumbers", {
    /**
     * Checks if there are any numeric fields that need to be converted to
     * numbers.
     *
     * @return Numeric fields?
     */
    get: function get() {
      return this.options.numberFields && this.options.numberFields.length > 0;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Converts a value to 'number' if it is in `numberFields`.
   *
   * @param field  Field name
   * @param value  Value
   * @return Parsed or original value
   */

  DataParser.prototype.maybeToNumber = function (field, value) {
    if (this.options.numberFields.indexOf(field) !== -1) {
      return _utils_Utils__WEBPACK_IMPORTED_MODULE_1__.anyToNumber(value);
    }

    return value;
  };

  Object.defineProperty(DataParser.prototype, "parsableDates", {
    /**
     * Checks if there are any date fields that need to be converted to `Date`
     * objects.
     *
     * @return Date fields?
     */
    get: function get() {
      return this.options.dateFields && this.options.dateFields.length > 0;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Converts a value to `Date` if it is in `dateFields`.
   *
   * @param field  Field name
   * @param value  Value
   * @return Parsed or original value
   */

  DataParser.prototype.maybeToDate = function (field, value) {
    if (this.options.dateFields.indexOf(field) !== -1) {
      return this.options.dateFormatter.parse(value, this.dateFormat);
    }

    return value;
  };
  /**
   * Replaces empty value with something else.
   *
   * @param value  Source value
   * @return Source value or replacement
   */


  DataParser.prototype.maybeToEmpty = function (value) {
    if ((!_utils_Type__WEBPACK_IMPORTED_MODULE_2__.hasValue(value) || value == "") && _utils_Type__WEBPACK_IMPORTED_MODULE_2__.hasValue(this.options.emptyAs)) {
      return this.options.emptyAs;
    }

    return value;
  };

  Object.defineProperty(DataParser.prototype, "dateFormatter", {
    /**
     * [[DateFormatter]] object for date parsing.
     *
     * If there was not [[DateFormatter]] supplied in parser options, a new one
     * is created.
     *
     * @return Date formatter
     * @see {@link DateFormatter}
     */
    get: function get() {
      if (!this.options.dateFormatter) {
        this.options.dateFormatter = new _formatters_DateFormatter__WEBPACK_IMPORTED_MODULE_0__.DateFormatter();

        if (this.options.dateFormat) {
          this.options.dateFormat = this.options.dateFormat;
        }
      }

      return this.options.dateFormatter;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(DataParser.prototype, "dateFormat", {
    /**
     * A date format to use when parsing dates.
     *
     * @return Date format
     * @see {@link DateFormatter}
     */
    get: function get() {
      return this.options.dateFormat || this.dateFormatter.inputDateFormat;
    },
    enumerable: true,
    configurable: true
  });
  return DataParser;
}();



/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/data/DataSource.js":
/*!****************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/data/DataSource.js ***!
  \****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "DataSource": () => (/* binding */ DataSource)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _DataLoader__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./DataLoader */ "./node_modules/@amcharts/amcharts4/.internal/core/data/DataLoader.js");
/* harmony import */ var _JSONParser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./JSONParser */ "./node_modules/@amcharts/amcharts4/.internal/core/data/JSONParser.js");
/* harmony import */ var _CSVParser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./CSVParser */ "./node_modules/@amcharts/amcharts4/.internal/core/data/CSVParser.js");
/* harmony import */ var _Base__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Base */ "./node_modules/@amcharts/amcharts4/.internal/core/Base.js");
/* harmony import */ var _utils_Adapter__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/Adapter */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Adapter.js");
/* harmony import */ var _utils_Language__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/Language */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Language.js");
/* harmony import */ var _formatters_DateFormatter__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../formatters/DateFormatter */ "./node_modules/@amcharts/amcharts4/.internal/core/formatters/DateFormatter.js");
/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _utils_Type__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/* harmony import */ var _utils_Object__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/Object */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Object.js");

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */











;
;
/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Represents a single data source - external file with all of its settings,
 * such as format, data parsing, etc.
 *
 * ```TypeScript
 * chart.dataSource.url = "http://www.myweb.com/data.json";
 * chart.dataSource.parser = am4core.JSONParser;
 * ```
 * ```JavaScript
 * chart.dataSource.url = "http://www.myweb.com/data.json";
 * chart.dataSource.parser = am4core.JSONParser;
 * ```
 * ```JSON
 * {
 *   // ...
 *   "dataSource": {
 *     "url": "http://www.myweb.com/data.json",
 *     "parser": "JSONParser"
 *   },
 *   // ...
 * }
 * ```
 *
 * @see {@link IDataSourceEvents} for a list of available events
 * @see {@link IDataSourceAdapters} for a list of available Adapters
 */

var DataSource =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_10__.__extends)(DataSource, _super);
  /**
   * Constructor
   */


  function DataSource(url, parser) {
    var _this = // Init
    _super.call(this) || this;
    /**
     * Adapter.
     */


    _this.adapter = new _utils_Adapter__WEBPACK_IMPORTED_MODULE_4__.Adapter(_this);
    /**
     * Custom options for HTTP(S) request.
     */

    _this._requestOptions = {};
    /**
     * If set to `true`, any subsequent data loads will be considered incremental
     * (containing only new data points that are supposed to be added to existing
     * data).
     *
     * NOTE: this setting works only with element's `data` property. It won't
     * work with any other externally-loadable data property.
     *
     * @default false
     */

    _this._incremental = false;
    /**
     * A collection of key/value pairs to attach to a data source URL when making
     * an incremental request.
     */

    _this._incrementalParams = {};
    /**
     * This setting is used only when `incremental = true`. If set to `true`,
     * it will try to retain the same number of data items across each load.
     *
     * E.g. if incremental load yeilded 5 new records, then 5 items from the
     * beginning of data will be removed so that we end up with the same number
     * of data items.
     *
     * @default false
     */

    _this._keepCount = false;
    /**
     * If set to `true`, each subsequent load will be treated as an update to
     * currently loaded data, meaning that it will try to update values on
     * existing data items, not overwrite the whole data.
     *
     * This will work faster than complete update, and also will animate the
     * values to their new positions.
     *
     * Data sources across loads must contain the same number of data items.
     *
     * Loader will not truncate the data set if loaded data has fewer data items,
     * and if it is longer, the excess data items will be ignored.
     *
     * @default false
     * @since 4.5.5
     */

    _this._updateCurrentData = false;
    /**
     * Will show loading indicator when loading files.
     */

    _this.showPreloader = true;
    _this.className = "DataSource"; // Set defaults

    if (url) {
      _this.url = url;
    } // Set parser


    if (parser) {
      if (typeof parser == "string") {
        _this.parser = _DataLoader__WEBPACK_IMPORTED_MODULE_0__.dataLoader.getParserByType(parser);
      } else {
        _this.parser = parser;
      }
    }

    return _this;
  }
  /**
   * Processes the loaded data.
   *
   * @ignore Exclude from docs
   * @param data         Raw (unparsed) data
   * @param contentType  Content type of the loaded data (optional)
   */


  DataSource.prototype.processData = function (data, contentType) {
    // Parsing started
    this.dispatchImmediately("parsestarted"); // Check if parser is set

    if (!this.parser) {
      // Try to resolve from data
      this.parser = _DataLoader__WEBPACK_IMPORTED_MODULE_0__.dataLoader.getParserByData(data, contentType);

      if (!this.parser) {
        // We have a problem - nobody knows what to do with the data
        // Raise error
        if (this.events.isEnabled("parseerror")) {
          var event_1 = {
            type: "parseerror",
            message: this.language.translate("No parser available for file: %1", null, this.url),
            target: this
          };
          this.events.dispatchImmediately("parseerror", event_1);
        }

        this.dispatchImmediately("parseended");
        return;
      }
    } // Apply options adapters


    this.parser.options = this.adapter.apply("parserOptions", this.parser.options);
    this.parser.options.dateFields = this.adapter.apply("dateFields", this.parser.options.dateFields || []);
    this.parser.options.numberFields = this.adapter.apply("numberFields", this.parser.options.numberFields || []); // Check if we need to pass in date formatter

    if (this.parser.options.dateFields && !this.parser.options.dateFormatter) {
      this.parser.options.dateFormatter = this.dateFormatter;
    } // Parse


    this.data = this.adapter.apply("parsedData", this.parser.parse(this.adapter.apply("unparsedData", data))); // Check for parsing errors

    if (!_utils_Type__WEBPACK_IMPORTED_MODULE_8__.hasValue(this.data) && this.events.isEnabled("parseerror")) {
      var event_2 = {
        type: "parseerror",
        message: this.language.translate("Error parsing file: %1", null, this.url),
        target: this
      };
      this.events.dispatchImmediately("parseerror", event_2);
    } // Wrap up


    this.dispatchImmediately("parseended");

    if (_utils_Type__WEBPACK_IMPORTED_MODULE_8__.hasValue(this.data)) {
      this.dispatchImmediately("done", {
        "data": this.data
      });
    } // The component is responsible for updating its own data vtriggered via
    // events.
    // Update last data load


    this.lastLoad = new Date();
  };

  Object.defineProperty(DataSource.prototype, "url", {
    /**
     * @return URL
     */
    get: function get() {
      // Get URL
      var url = this.disableCache ? this.timestampUrl(this._url) : this._url; // Add incremental params

      if (this.incremental && this.component.data.length) {
        url = this.addUrlParams(url, this.incrementalParams);
      }

      return this.adapter.apply("url", url);
    },

    /**
     * URL of the data source.
     *
     * @param value  URL
     */
    set: function set(value) {
      this._url = value;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(DataSource.prototype, "requestOptions", {
    /**
     * @return Options
     */
    get: function get() {
      return this.adapter.apply("requestOptions", this._requestOptions);
    },

    /**
     * Custom options for HTTP(S) request.
     *
     * At this moment the only option supported is: `requestHeaders`, which holds
     * an array of objects for custom request headers, e.g.:
     *
     * ```TypeScript
     * chart.dataSource.requestOptions.requestHeaders = [{
     *   "key": "x-access-token",
     *   "value": "123456789"
     * }];
     * ``````JavaScript
     * chart.dataSource.requestOptions.requestHeaders = [{
     *   "key": "x-access-token",
     *   "value": "123456789"
     * }];
     * ```
     * ```JSON
     * {
     *   // ...
     *   "dataSource": {
     *     // ...
     *     "requestOptions": {
     *       "requestHeaders": [{
     *         "key": "x-access-token",
     *         "value": "123456789"
     *       }]
     *     }
     *   }
     * }
     * ```
     *
     * NOTE: setting this options on an-already loaded DataSource will not
     * trigger a reload.
     *
     * @param value  Options
     */
    set: function set(value) {
      this._requestOptions = value;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(DataSource.prototype, "parser", {
    /**
     * @return Data parser
     */
    get: function get() {
      if (!this._parser) {
        this._parser = new _JSONParser__WEBPACK_IMPORTED_MODULE_1__.JSONParser();
      }

      return this.adapter.apply("parser", this._parser);
    },

    /**
     * A parser to be used to parse data.
     *
     * ```TypeScript
     * chart.dataSource.url = "http://www.myweb.com/data.json";
     * chart.dataSource.parser = am4core.JSONParser;
     * ```
     * ```JavaScript
     * chart.dataSource.url = "http://www.myweb.com/data.json";
     * chart.dataSource.parser = am4core.JSONParser;
     * ```
     * ```JSON
     * {
     *   // ...
     *   "dataSource": {
     *     "url": "http://www.myweb.com/data.json",
     *     "parser": {
     *       "type": "JSONParser"
     *     }
     *   },
     *   // ...
     * }
     * ```
     *
     * @default JSONParser
     * @param value  Data parser
     */
    set: function set(value) {
      this._parser = value;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(DataSource.prototype, "reloadFrequency", {
    /**
     * @return Reload frequency (ms)
     */
    get: function get() {
      return this.adapter.apply("reloadTimeout", this._reloadFrequency);
    },

    /**
     * Data source reload frequency.
     *
     * If set, it will reload the same URL every X milliseconds.
     *
     * @param value Reload frequency (ms)
     */
    set: function set(value) {
      var _this = this;

      if (this._reloadFrequency != value) {
        this._reloadFrequency = value; // Should we schedule a reload?

        if (value) {
          if (!_utils_Type__WEBPACK_IMPORTED_MODULE_8__.hasValue(this._reloadDisposer)) {
            this._reloadDisposer = this.events.on("ended", function (ev) {
              _this._reloadTimeout = setTimeout(function () {
                _this.load();
              }, _this.reloadFrequency);
            });
          }
        } else if (_utils_Type__WEBPACK_IMPORTED_MODULE_8__.hasValue(this._reloadDisposer)) {
          this._reloadDisposer.dispose();

          this._reloadDisposer = undefined;
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(DataSource.prototype, "incremental", {
    /**
     * @return Incremental load?
     */
    get: function get() {
      return this.adapter.apply("incremental", this._incremental);
    },

    /**
     * Should subsequent reloads be treated as incremental?
     *
     * Incremental loads will assume that they contain only new data items
     * since the last load.
     *
     * If `incremental = false` the loader will replace all of the target's
     * data with each load.
     *
     * This setting does not have any effect trhe first time data is loaded.
     *
     * NOTE: this setting works only with element's `data` property. It won't
     * work with any other externally-loadable data property.
     *
     * @default false
     * @param Incremental load?
     */
    set: function set(value) {
      this._incremental = value;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(DataSource.prototype, "incrementalParams", {
    /**
     * @return Incremental request parameters
     */
    get: function get() {
      return this.adapter.apply("incrementalParams", this._incrementalParams);
    },

    /**
     * An object consisting of key/value pairs to apply to an URL when data
     * source is making an incremental request.
     *
     * @param value  Incremental request parameters
     */
    set: function set(value) {
      this._incrementalParams = value;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(DataSource.prototype, "keepCount", {
    /**
     * @return keepCount load?
     */
    get: function get() {
      return this.adapter.apply("keepCount", this._keepCount);
    },

    /**
     * This setting is used only when `incremental = true`. If set to `true`,
     * it will try to retain the same number of data items across each load.
     *
     * E.g. if incremental load yeilded 5 new records, then 5 items from the
     * beginning of data will be removed so that we end up with the same number
     * of data items.
     *
     * @default false
     * @param Keep record count?
     */
    set: function set(value) {
      this._keepCount = value;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(DataSource.prototype, "updateCurrentData", {
    /**
     * @return Update current data?
     */
    get: function get() {
      return this.adapter.apply("updateCurrentData", this._updateCurrentData);
    },

    /**
     * If set to `true`, each subsequent load will be treated as an update to
     * currently loaded data, meaning that it will try to update values on
     * existing data items, not overwrite the whole data.
     *
     * This will work faster than complete update, and also will animate the
     * values to their new positions.
     *
     * Data sources across loads must contain the same number of data items.
     *
     * Loader will not truncate the data set if loaded data has fewer data items,
     * and if it is longer, the excess data items will be ignored.
     *
     * NOTE: this setting is ignored if `incremental = true`.
     *
     * @default false
     * @since 2.5.5
     * @param Update current data?
     */
    set: function set(value) {
      this._updateCurrentData = value;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(DataSource.prototype, "language", {
    /**
     * @return A [[Language]] instance to be used
     */
    get: function get() {
      if (this._language) {
        return this._language;
      } else if (this.component) {
        this._language = this.component.language;
        return this._language;
      }

      this.language = new _utils_Language__WEBPACK_IMPORTED_MODULE_5__.Language();
      return this.language;
    },

    /**
     * Language instance to use.
     *
     * Will inherit and use chart's language, if not set.
     *
     * @param value An instance of Language
     */
    set: function set(value) {
      this._language = value;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(DataSource.prototype, "dateFormatter", {
    /**
     * @return A [[DateFormatter]] instance to be used
     */
    get: function get() {
      if (this._dateFormatter) {
        return this._dateFormatter;
      } else if (this.component) {
        this._dateFormatter = this.component.dateFormatter;
        return this._dateFormatter;
      }

      this.dateFormatter = new _formatters_DateFormatter__WEBPACK_IMPORTED_MODULE_6__.DateFormatter();
      return this.dateFormatter;
    },

    /**
     * A [[DateFormatter]] to use when parsing dates from string formats.
     *
     * Will inherit and use chart's DateFormatter if not ser.
     *
     * @param value An instance of [[DateFormatter]]
     */
    set: function set(value) {
      this._dateFormatter = value;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Adds current timestamp to the URL.
   *
   * @param url  Source URL
   * @return Timestamped URL
   */

  DataSource.prototype.timestampUrl = function (url) {
    var tstamp = new Date().getTime().toString();
    var params = {};
    params[tstamp] = "";
    return this.addUrlParams(url, params);
  };
  /**
   * Disposes of this object.
   */


  DataSource.prototype.dispose = function () {
    _super.prototype.dispose.call(this);

    if (this._reloadTimeout) {
      clearTimeout(this._reloadTimeout);
    }

    if (_utils_Type__WEBPACK_IMPORTED_MODULE_8__.hasValue(this._reloadDisposer)) {
      this._reloadDisposer.dispose();

      this._reloadDisposer = undefined;
    }
  };
  /**
   * Initiate the load.
   *
   * All loading in JavaScript is asynchronous. This function will trigger the
   * load and will exit immediately.
   *
   * Use DataSource's events to watch for loaded data and errors.
   */


  DataSource.prototype.load = function () {
    if (this.url) {
      if (this._reloadTimeout) {
        clearTimeout(this._reloadTimeout);
      }

      _DataLoader__WEBPACK_IMPORTED_MODULE_0__.dataLoader.load(this);
    }
  };
  /**
   * Adds parameters to `url` as query strings. Will take care of proper
   * separators.
   *
   * @param url     Source URL
   * @param params  Parameters
   * @return New URL
   */


  DataSource.prototype.addUrlParams = function (url, params) {
    var join = url.match(/\?/) ? "&" : "?";
    var add = [];
    _utils_Object__WEBPACK_IMPORTED_MODULE_9__.each(params, function (key, value) {
      if (value != "") {
        add.push(key + "=" + encodeURIComponent(value));
      } else {
        add.push(key);
      }
    });

    if (add.length) {
      return url + join + add.join("&");
    }

    return url;
  };
  /**
   * Processes JSON-based config before it is applied to the object.
   *
   * @ignore Exclude from docs
   * @param config  Config
   */


  DataSource.prototype.processConfig = function (config) {
    _Registry__WEBPACK_IMPORTED_MODULE_7__.registry.registeredClasses.json = _JSONParser__WEBPACK_IMPORTED_MODULE_1__.JSONParser;
    _Registry__WEBPACK_IMPORTED_MODULE_7__.registry.registeredClasses.JSONParser = _JSONParser__WEBPACK_IMPORTED_MODULE_1__.JSONParser;
    _Registry__WEBPACK_IMPORTED_MODULE_7__.registry.registeredClasses.csv = _CSVParser__WEBPACK_IMPORTED_MODULE_2__.CSVParser;
    _Registry__WEBPACK_IMPORTED_MODULE_7__.registry.registeredClasses.CSVParser = _CSVParser__WEBPACK_IMPORTED_MODULE_2__.CSVParser;

    _super.prototype.processConfig.call(this, config);
  };

  return DataSource;
}(_Base__WEBPACK_IMPORTED_MODULE_3__.BaseObjectEvents);



/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/data/JSONParser.js":
/*!****************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/data/JSONParser.js ***!
  \****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "JSONParser": () => (/* binding */ JSONParser)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _DataParser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./DataParser */ "./node_modules/@amcharts/amcharts4/.internal/core/data/DataParser.js");
/* harmony import */ var _utils_Object__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/Object */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Object.js");
/* harmony import */ var _utils_Type__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/**
 * JSON parser.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */




/**
 * A parser for JSON.
 *
 * @important
 */

var JSONParser =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__extends)(JSONParser, _super);

  function JSONParser() {
    var _this = _super !== null && _super.apply(this, arguments) || this;
    /**
     * Content-type suitable for JSON format.
     */


    _this.contentType = "application/json";
    /**
     * Parser options.
     *
     * @see {@link IJSONOptions} for description of each option
     */

    _this.options = {};
    return _this;
  }
  /**
   * Tests if the data is valid JSON.
   *
   * @param data  Source data
   * @return Is it JSON?
   */


  JSONParser.isJSON = function (data) {
    try {
      // Try parsing JSON
      JSON.parse(data); // If we got to this point it means it's a valid JSON

      return true;
    } catch (e) {
      return false;
    }
  };
  /**
   * Parses and returns data.
   *
   * @param data  Unparsed data
   * @return Parsed data
   */


  JSONParser.prototype.parse = function (data) {
    var _this = this; // Init return


    var res; // Try parsing

    try {
      if (_utils_Type__WEBPACK_IMPORTED_MODULE_2__.hasValue(JSON)) {
        res = JSON.parse(data);
      }
    } catch (e) {
      return undefined;
    } // Do we need to cast some fields to numbers or dates?


    var empty = _utils_Type__WEBPACK_IMPORTED_MODULE_2__.hasValue(this.options.emptyAs);
    var numbers = this.parsableNumbers;
    var dates = this.parsableDates;

    if (Array.isArray(res) && (numbers || dates || empty)) {
      var _loop_1 = function _loop_1(i, len) {
        var row = res[i];
        _utils_Object__WEBPACK_IMPORTED_MODULE_1__.each(row, function (key, value) {
          if (empty) {
            row[key] = _this.maybeToEmpty(row[key]);
          }

          if (numbers) {
            row[key] = _this.maybeToNumber(key, row[key]);
          }

          if (dates) {
            row[key] = _this.maybeToDate(key, row[key]);
          }
        });
      }; // Iterate through the data and check if it needs to be converted


      for (var i = 0, len = res.length; i < len; i++) {
        _loop_1(i, len);
      }
    } // Convert to array
    //return Array.isArray(res) ? res : [res];


    return res;
  };

  return JSONParser;
}(_DataParser__WEBPACK_IMPORTED_MODULE_0__.DataParser);



/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/defs/SVGDefaults.js":
/*!*****************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/defs/SVGDefaults.js ***!
  \*****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "SVGDefaults": () => (/* binding */ SVGDefaults)
/* harmony export */ });
/* harmony import */ var _utils_Color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/Color */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Color.js");
/**
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */

/**
 * Defines a class that holds default properties for new SVG elements
 */

var SVGDefaults =
/** @class */
function () {
  function SVGDefaults() {}

  SVGDefaults.opacity = 1;
  SVGDefaults.strokeOpacity = 1;
  SVGDefaults.strokeWidth = 1;
  SVGDefaults.fillOpacity = 1;
  SVGDefaults.fill = (0,_utils_Color__WEBPACK_IMPORTED_MODULE_0__.color)("#000000");
  SVGDefaults.stroke = (0,_utils_Color__WEBPACK_IMPORTED_MODULE_0__.color)("#000000");
  SVGDefaults.focusable = undefined;
  SVGDefaults.tabindex = 0;
  return SVGDefaults;
}();



/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/elements/3d/Cone.js":
/*!*****************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/elements/3d/Cone.js ***!
  \*****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Cone": () => (/* binding */ Cone)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Container__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Container */ "./node_modules/@amcharts/amcharts4/.internal/core/Container.js");
/* harmony import */ var _Sprite__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Sprite */ "./node_modules/@amcharts/amcharts4/.internal/core/Sprite.js");
/* harmony import */ var _elements_Ellipse__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../elements/Ellipse */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Ellipse.js");
/* harmony import */ var _rendering_fills_LinearGradientModifier__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../rendering/fills/LinearGradientModifier */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/LinearGradientModifier.js");
/* harmony import */ var _utils_Percent__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/Percent */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Percent.js");
/* harmony import */ var _utils_Object__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils/Object */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Object.js");
/* harmony import */ var _rendering_Path__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../rendering/Path */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Path.js");
/**
 * Cone module.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */








/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Builds a round cone/cylinder.
 *
 * @see {@link IConeEvents} for a list of available events
 * @see {@link IConeAdapters} for a list of available Adapters
 */

var Cone =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_7__.__extends)(Cone, _super);
  /**
   * Constructor
   */


  function Cone() {
    var _this = _super.call(this) || this;

    _this.className = "Cone";
    _this.angle = 30;
    _this.radius = (0,_utils_Percent__WEBPACK_IMPORTED_MODULE_4__.percent)(100);
    _this.topRadius = (0,_utils_Percent__WEBPACK_IMPORTED_MODULE_4__.percent)(100);
    _this.top = _this.createChild(_elements_Ellipse__WEBPACK_IMPORTED_MODULE_2__.Ellipse);
    _this.top.shouldClone = false;
    _this.bottom = _this.createChild(_elements_Ellipse__WEBPACK_IMPORTED_MODULE_2__.Ellipse);
    _this.bottom.shouldClone = false;
    _this.body = _this.createChild(_Sprite__WEBPACK_IMPORTED_MODULE_1__.Sprite);
    _this.body.shouldClone = false;

    _this.body.setElement(_this.paper.add("path"));

    _this.layout = "none";
    _this.bodyFillModifier = new _rendering_fills_LinearGradientModifier__WEBPACK_IMPORTED_MODULE_3__.LinearGradientModifier();
    _this.bodyFillModifier.lightnesses = [0, -0.25, 0];
    _this.body.fillModifier = _this.bodyFillModifier;

    _this.applyTheme();

    return _this;
  }
  /**
   * Draws the element.
   *
   * @ignore Exclude from docs
   */


  Cone.prototype.draw = function () {
    _super.prototype.draw.call(this);

    _utils_Object__WEBPACK_IMPORTED_MODULE_5__.copyProperties(this, this.top, _Sprite__WEBPACK_IMPORTED_MODULE_1__.visualProperties);
    _utils_Object__WEBPACK_IMPORTED_MODULE_5__.copyProperties(this, this.bottom, _Sprite__WEBPACK_IMPORTED_MODULE_1__.visualProperties);
    _utils_Object__WEBPACK_IMPORTED_MODULE_5__.copyProperties(this, this.body, _Sprite__WEBPACK_IMPORTED_MODULE_1__.visualProperties);
    var w = this.innerWidth;
    var h = this.innerHeight;
    var bottom = this.bottom;
    var top = this.top;
    var angle = this.angle;
    var radiusBase;
    var dx;
    var dy;

    if (this.orientation == "horizontal") {
      radiusBase = h / 2;
      bottom.y = h / 2;
      top.y = h / 2;
      top.x = w;
      dx = (90 - angle) / 90;
      dy = 0;
      this.bodyFillModifier.gradient.rotation = 90;
    } else {
      dx = 0;
      dy = (90 - angle) / 90;
      radiusBase = w / 2;
      bottom.y = h;
      bottom.x = w / 2;
      top.x = w / 2;
      this.bodyFillModifier.gradient.rotation = 0;
    }

    var radius = this.radius.value * radiusBase;
    var topRadius = this.topRadius.value * radiusBase;
    bottom.radius = radius - radius * dx;
    bottom.radiusY = radius - radius * dy;
    top.radius = topRadius - topRadius * dx;
    top.radiusY = topRadius - topRadius * dy;
    var path;

    if (this.orientation == "horizontal") {
      path = _rendering_Path__WEBPACK_IMPORTED_MODULE_6__.moveTo({
        x: 0,
        y: h / 2 - bottom.radiusY
      }) + _rendering_Path__WEBPACK_IMPORTED_MODULE_6__.arcTo(-90, -180, bottom.radius, bottom.radiusY) + _rendering_Path__WEBPACK_IMPORTED_MODULE_6__.lineTo({
        x: w,
        y: h / 2 + top.radiusY
      }) + _rendering_Path__WEBPACK_IMPORTED_MODULE_6__.arcTo(90, 180, top.radius, top.radiusY) + _rendering_Path__WEBPACK_IMPORTED_MODULE_6__.closePath();
    } else {
      path = _rendering_Path__WEBPACK_IMPORTED_MODULE_6__.moveTo({
        x: w / 2 - top.radius,
        y: 0
      }) + _rendering_Path__WEBPACK_IMPORTED_MODULE_6__.arcTo(180, -180, top.radius, top.radiusY) + _rendering_Path__WEBPACK_IMPORTED_MODULE_6__.lineTo({
        x: w / 2 + bottom.radius,
        y: h
      }) + _rendering_Path__WEBPACK_IMPORTED_MODULE_6__.arcTo(0, 180, bottom.radius, bottom.radiusY) + _rendering_Path__WEBPACK_IMPORTED_MODULE_6__.closePath();
    }

    this.body.path = path;
  };

  Object.defineProperty(Cone.prototype, "angle", {
    /**
     * @return Angle
     */
    get: function get() {
      return this.getPropertyValue("angle");
    },

    /**
     * Angle of the point of view to the 3D element. (0-360)
     *
     * @default 30
     * @param value  Angle
     */
    set: function set(value) {
      this.setPropertyValue("angle", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Cone.prototype, "radius", {
    /**
     * @return Bottom radius
     */
    get: function get() {
      return this.getPropertyValue("radius");
    },

    /**
     * A relative radius of the cone's bottom (base).
     *
     * It is relevant to the inner width or height of the element.
     *
     * @default Percent(100)
     * @param value  Bottom radius
     */
    set: function set(value) {
      this.setPropertyValue("radius", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Cone.prototype, "topRadius", {
    /**
     * @return Top radius
     */
    get: function get() {
      return this.getPropertyValue("topRadius");
    },

    /**
     * A relative radius of the cone's top (tip).
     *
     * It is relevant to the inner width or height of the element.
     *
     * @default Percent(0)
     * @param value  Top radius
     */
    set: function set(value) {
      this.setPropertyValue("topRadius", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Cone.prototype, "orientation", {
    /**
     * Orientation
     */
    get: function get() {
      return this.getPropertyValue("orientation");
    },

    /**
     * Orientation of the cone
     *
     * @default "vertical"
     * @param value  Orientation
     */
    set: function set(value) {
      this.setPropertyValue("orientation", value, true);
    },
    enumerable: true,
    configurable: true
  });
  return Cone;
}(_Container__WEBPACK_IMPORTED_MODULE_0__.Container);



/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/elements/3d/Rectangle3D.js":
/*!************************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/elements/3d/Rectangle3D.js ***!
  \************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Rectangle3D": () => (/* binding */ Rectangle3D)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Container__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Container */ "./node_modules/@amcharts/amcharts4/.internal/core/Container.js");
/* harmony import */ var _Sprite__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Sprite */ "./node_modules/@amcharts/amcharts4/.internal/core/Sprite.js");
/* harmony import */ var _utils_Math__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
/* harmony import */ var _rendering_Path__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../rendering/Path */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Path.js");
/* harmony import */ var _utils_Color__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/Color */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Color.js");
/* harmony import */ var _rendering_fills_RadialGradient__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../rendering/fills/RadialGradient */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/RadialGradient.js");
/* harmony import */ var _rendering_fills_LinearGradient__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../rendering/fills/LinearGradient */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/LinearGradient.js");
/* harmony import */ var _rendering_filters_LightenFilter__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../rendering/filters/LightenFilter */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/filters/LightenFilter.js");
/* harmony import */ var _utils_Type__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/**
 * Creates a 3D rectangle.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */










/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Builds a 3D rectangle
 * @see {@link IRectangle3DEvents} for a list of available events
 * @see {@link IRectangle3DAdapters} for a list of available Adapters
 */

var Rectangle3D =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_9__.__extends)(Rectangle3D, _super);
  /**
   * Constructor
   */


  function Rectangle3D() {
    var _this = _super.call(this) || this;

    _this.angle = 30;
    _this.depth = 30;
    _this.className = "Rectangle3D";
    _this.layout = "none";

    var sideBack = _this.createChild(_Sprite__WEBPACK_IMPORTED_MODULE_1__.Sprite);

    sideBack.shouldClone = false;
    sideBack.setElement(_this.paper.add("path"));
    sideBack.isMeasured = false;
    _this.sideBack = sideBack;

    _this._disposers.push(_this.sideBack);

    var sideBottom = _this.createChild(_Sprite__WEBPACK_IMPORTED_MODULE_1__.Sprite);

    sideBottom.shouldClone = false;
    sideBottom.setElement(_this.paper.add("path"));
    sideBottom.isMeasured = false;
    _this.sideBottom = sideBottom;

    _this._disposers.push(_this.sideBottom);

    var sideLeft = _this.createChild(_Sprite__WEBPACK_IMPORTED_MODULE_1__.Sprite);

    sideLeft.shouldClone = false;
    sideLeft.setElement(_this.paper.add("path"));
    sideLeft.isMeasured = false;
    _this.sideLeft = sideLeft;

    _this._disposers.push(_this.sideLeft);

    var sideRight = _this.createChild(_Sprite__WEBPACK_IMPORTED_MODULE_1__.Sprite);

    sideRight.shouldClone = false;
    sideRight.setElement(_this.paper.add("path"));
    sideRight.isMeasured = false;
    _this.sideRight = sideRight;

    _this._disposers.push(_this.sideRight);

    var sideTop = _this.createChild(_Sprite__WEBPACK_IMPORTED_MODULE_1__.Sprite);

    sideTop.shouldClone = false;
    sideTop.setElement(_this.paper.add("path"));
    sideTop.isMeasured = false;
    _this.sideTop = sideTop;

    _this._disposers.push(_this.sideTop);

    var sideFront = _this.createChild(_Sprite__WEBPACK_IMPORTED_MODULE_1__.Sprite);

    sideFront.shouldClone = false;
    sideFront.setElement(_this.paper.add("path"));
    sideFront.isMeasured = false;
    _this.sideFront = sideFront;

    _this._disposers.push(_this.sideFront);

    _this.applyTheme();

    return _this;
  }
  /**
   * Draws the element.
   *
   * @ignore Exclude from docs
   */


  Rectangle3D.prototype.draw = function () {
    _super.prototype.draw.call(this);

    var w = this.innerWidth;
    var h = this.innerHeight;
    var depth = this.depth;
    var angle = this.angle;
    var sin = _utils_Math__WEBPACK_IMPORTED_MODULE_2__.sin(angle);
    var cos = _utils_Math__WEBPACK_IMPORTED_MODULE_2__.cos(angle);
    var a = {
      x: 0,
      y: 0
    };
    var b = {
      x: w,
      y: 0
    };
    var c = {
      x: w,
      y: h
    };
    var d = {
      x: 0,
      y: h
    };
    var ah = {
      x: depth * cos,
      y: -depth * sin
    };
    var bh = {
      x: depth * cos + w,
      y: -depth * sin
    };
    var ch = {
      x: depth * cos + w,
      y: -depth * sin + h
    };
    var dh = {
      x: depth * cos,
      y: -depth * sin + h
    };
    this.sideFront.path = _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.moveTo(a) + _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.lineTo(b) + _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.lineTo(c) + _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.lineTo(d) + _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.closePath();
    this.sideBack.path = _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.moveTo(ah) + _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.lineTo(bh) + _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.lineTo(ch) + _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.lineTo(dh) + _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.closePath();
    this.sideLeft.path = _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.moveTo(a) + _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.lineTo(ah) + _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.lineTo(dh) + _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.lineTo(d) + _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.closePath();
    this.sideRight.path = _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.moveTo(b) + _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.lineTo(bh) + _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.lineTo(ch) + _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.lineTo(c) + _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.closePath();
    this.sideBottom.path = _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.moveTo(d) + _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.lineTo(dh) + _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.lineTo(ch) + _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.lineTo(c) + _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.closePath();
    this.sideTop.path = _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.moveTo(a) + _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.lineTo(ah) + _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.lineTo(bh) + _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.lineTo(b) + _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.closePath();
  };

  Object.defineProperty(Rectangle3D.prototype, "depth", {
    /**
     * @return Depth (px)
     */
    get: function get() {
      return this.getPropertyValue("depth");
    },

    /**
     * Depth (Z dimension) of the 3D rectangle in pixels.
     *
     * @default 30
     * @param value  Depth (px)
     */
    set: function set(value) {
      this.setPropertyValue("depth", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Rectangle3D.prototype, "angle", {
    /**
     * @return Angle
     */
    get: function get() {
      return this.getPropertyValue("angle");
    },

    /**
     * Angle of the point of view to the 3D element. (0-360)
     *
     * @default 30
     * @param value  Angle
     */
    set: function set(value) {
      this.setPropertyValue("angle", value, true);
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Sets actual `fill` property on the SVG element, including applicable color
   * modifiers.
   *
   * @ignore Exclude from docs
   * @param value  Fill
   */

  Rectangle3D.prototype.setFill = function (value) {
    _super.prototype.setFill.call(this, value);

    if (!_utils_Type__WEBPACK_IMPORTED_MODULE_8__.isObject(value) || "r" in value) {
      value = (0,_utils_Color__WEBPACK_IMPORTED_MODULE_4__.toColor)(value);
    }

    var colorStr;

    if (value instanceof _utils_Color__WEBPACK_IMPORTED_MODULE_4__.Color) {
      colorStr = value.hex;
    } else if (value instanceof _rendering_fills_LinearGradient__WEBPACK_IMPORTED_MODULE_6__.LinearGradient || value instanceof _rendering_fills_RadialGradient__WEBPACK_IMPORTED_MODULE_5__.RadialGradient) {
      colorStr = value.stops.getIndex(0).color.hex;
    } else {
      var filter = new _rendering_filters_LightenFilter__WEBPACK_IMPORTED_MODULE_7__.LightenFilter();
      filter.lightness = -0.2;
      this.sideBack.filters.push(filter);
      var filter2 = filter.clone();
      filter2.lightness = -0.4;
      this.sideLeft.filters.push(filter2);
      var filter3 = filter.clone();
      filter3.lightness = -0.2;
      this.sideRight.filters.push(filter3);
      var filter4 = filter.clone();
      filter4.lightness = -0.1;
      this.sideTop.filters.push(filter4);
      var filter5 = filter.clone();
      filter5.lightness = -0.5;
      this.sideBottom.filters.push(filter5);
    }

    if (colorStr) {
      this.sideBack.fill = (0,_utils_Color__WEBPACK_IMPORTED_MODULE_4__.color)(colorStr).lighten(-0.2);
      this.sideLeft.fill = (0,_utils_Color__WEBPACK_IMPORTED_MODULE_4__.color)(colorStr).lighten(-0.4);
      this.sideRight.fill = (0,_utils_Color__WEBPACK_IMPORTED_MODULE_4__.color)(colorStr).lighten(-0.2);
      this.sideTop.fill = (0,_utils_Color__WEBPACK_IMPORTED_MODULE_4__.color)(colorStr).lighten(-0.1);
      this.sideBottom.fill = (0,_utils_Color__WEBPACK_IMPORTED_MODULE_4__.color)(colorStr).lighten(-0.5);
    }
  };
  /**
   * Copies all properties and related data from a different instance of Rectangle3D.
   *
   * @param source Source Rectangle3D
   */


  Rectangle3D.prototype.copyFrom = function (source) {
    _super.prototype.copyFrom.call(this, source);

    this.sideBack.copyFrom(source.sideBack);
    this.sideLeft.copyFrom(source.sideLeft);
    this.sideRight.copyFrom(source.sideRight);
    this.sideTop.copyFrom(source.sideTop);
    this.sideBottom.copyFrom(source.sideBottom);
  };

  return Rectangle3D;
}(_Container__WEBPACK_IMPORTED_MODULE_0__.Container);



/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/elements/3d/Slice3D.js":
/*!********************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/elements/3d/Slice3D.js ***!
  \********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Slice3D": () => (/* binding */ Slice3D)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Slice__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Slice */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Slice.js");
/* harmony import */ var _Sprite__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Sprite */ "./node_modules/@amcharts/amcharts4/.internal/core/Sprite.js");
/* harmony import */ var _utils_Math__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
/* harmony import */ var _rendering_Path__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../rendering/Path */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Path.js");
/* harmony import */ var _utils_Type__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/* harmony import */ var _utils_Color__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils/Color */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Color.js");
/* harmony import */ var _rendering_fills_RadialGradient__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../rendering/fills/RadialGradient */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/RadialGradient.js");
/* harmony import */ var _rendering_fills_LinearGradient__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../rendering/fills/LinearGradient */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/LinearGradient.js");
/* harmony import */ var _rendering_filters_LightenFilter__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../rendering/filters/LightenFilter */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/filters/LightenFilter.js");
/**
 * 3D slice module
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */










/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Used to draw a 3D slice of a Pie chart.
 *
 * @see {@link ISlice3DEvents} for a list of available events
 * @see {@link ISlice3DAdapters} for a list of available Adapters
 */

var Slice3D =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_9__.__extends)(Slice3D, _super);
  /**
   * Constructor
   */


  function Slice3D() {
    var _this = // Init
    _super.call(this) || this;

    _this.className = "Slice3D";
    _this.layout = "none"; // Create edge container

    var edge = _this.createChild(_Sprite__WEBPACK_IMPORTED_MODULE_1__.Sprite);

    _this.edge = edge;
    edge.shouldClone = false;
    edge.isMeasured = false;
    edge.toBack(); // Set defaults

    _this.angle = 30;
    _this.depth = 20; // Create side A element

    var sideA = _this.createChild(_Sprite__WEBPACK_IMPORTED_MODULE_1__.Sprite);

    _this.sideA = sideA;
    sideA.shouldClone = false;
    sideA.isMeasured = false; //sideA.setElement(this.paper.add("path"));
    //sideA.strokeOpacity = 0;
    // Crate side B element

    var sideB = _this.createChild(_Sprite__WEBPACK_IMPORTED_MODULE_1__.Sprite);

    _this.sideB = sideB;
    sideB.shouldClone = false;
    sideB.isMeasured = false; //sideB.setElement(this.paper.add("path"));
    //sideB.strokeOpacity = 0;
    // Apply theme

    _this.applyTheme();

    return _this;
  }
  /**
   * Sets actual `fill` property on the SVG element, including applicable color
   * modifiers.
   *
   * @ignore Exclude from docs
   * @param value  Fill
   */


  Slice3D.prototype.setFill = function (value) {
    _super.prototype.setFill.call(this, value);

    var colorStr;

    if (value instanceof _utils_Color__WEBPACK_IMPORTED_MODULE_5__.Color) {
      colorStr = value.hex;
    } else if (value instanceof _rendering_fills_LinearGradient__WEBPACK_IMPORTED_MODULE_7__.LinearGradient || value instanceof _rendering_fills_RadialGradient__WEBPACK_IMPORTED_MODULE_6__.RadialGradient) {
      colorStr = value.stops.getIndex(0).color.hex;
    } else {
      var filter = new _rendering_filters_LightenFilter__WEBPACK_IMPORTED_MODULE_8__.LightenFilter();
      filter.lightness = -0.25;
      this.edge.filters.push(filter);
      this.sideA.filters.push(filter.clone());
      this.sideB.filters.push(filter.clone());
    }

    if (colorStr) {
      var edgeFill = (0,_utils_Color__WEBPACK_IMPORTED_MODULE_5__.color)(colorStr).lighten(-0.25);
      this.edge.fill = edgeFill;
      this.sideA.fill = edgeFill;
      this.sideB.fill = edgeFill;
      this.edge.stroke = edgeFill;
      this.sideA.stroke = edgeFill;
      this.sideB.stroke = edgeFill;
    }
  };
  /**
   * Draws the element.
   *
   * @ignore Exclude from docs
   */


  Slice3D.prototype.draw = function () {
    this.cornerRadius = 0;
    this.innerCornerRadius = 0;

    _super.prototype.draw.call(this);

    if (this.arc !== 0 && this.radius > 0 && this.depth > 0) {
      this.sideB.show(0);
      this.sideA.show(0);
      this.edge.show(0);
      var startAngle = this.startAngle;
      var arc = this.arc;
      var innerRadius = this.pixelInnerRadius || 0;
      var radiusY = this.radiusY || 0; //let cornerRadius = this.cornerRadius || 0;
      //let innerCornerRadius = this.innerCornerRadius;

      var radius = this.radius; // this is code duplicate with $path.arc. @todo to think how to avoid it

      var endAngle = startAngle + arc; //let crSin = $math.sin($math.min(arc, 45) / 2);
      //innerCornerRadius = innerCornerRadius || cornerRadius;

      var innerRadiusY = radiusY / radius * innerRadius; //let cornerRadiusY = (radiusY / radius) * cornerRadius;
      //let innerCornerRadiusY = (radiusY / radius) * innerCornerRadius;
      //cornerRadius = $math.fitToRange(cornerRadius, 0, (radius - innerRadius) / 2);
      //cornerRadiusY = $math.fitToRange(cornerRadiusY, 0, (radiusY - innerRadiusY) / 2);
      //innerCornerRadius = $math.fitToRange(innerCornerRadius, 0, (radius - innerRadius) / 2);
      //innerCornerRadiusY = $math.fitToRange(innerCornerRadiusY, 0, (radiusY - innerRadiusY) / 2);
      //cornerRadius = $math.fitToRange(cornerRadius, 0, radius * crSin);
      //cornerRadiusY = $math.fitToRange(cornerRadiusY, 0, radiusY * crSin);
      //innerCornerRadius = $math.fitToRange(innerCornerRadius, 0, innerRadius * crSin);
      //innerCornerRadiusY = $math.fitToRange(innerCornerRadiusY, 0, innerRadiusY * crSin);
      //let crAngle: number = Math.asin(cornerRadius / radius / 2) * $math.DEGREES * 2;
      //let crAngleY: number = Math.asin(cornerRadiusY / radiusY / 2) * $math.DEGREES * 2;
      //if (innerRadius < innerCornerRadius) {
      //	innerRadius = innerCornerRadius;
      //}
      //if (innerRadiusY < innerCornerRadiusY) {
      //	innerRadiusY = innerCornerRadiusY;
      //}
      //let crInnerAngle: number = Math.asin(innerCornerRadius / innerRadius / 2) * $math.DEGREES * 2;
      //let crInnerAngleY: number = Math.asin(innerCornerRadiusY / innerRadiusY / 2) * $math.DEGREES * 2;
      //if (!$type.isNumber(crInnerAngle)) {
      //	crInnerAngle = 0;
      //}
      //if (!$type.isNumber(crInnerAngleY)) {
      //	crInnerAngleY = 0;
      //}
      //let middleAngle = startAngle + arc / 2;
      //let mPoint = { x: $math.round($math.cos(middleAngle) * innerRadius, 4), y: $math.round($math.sin(middleAngle) * innerRadiusY, 4) };

      var a0 = {
        x: _utils_Math__WEBPACK_IMPORTED_MODULE_2__.cos(startAngle) * innerRadius,
        y: _utils_Math__WEBPACK_IMPORTED_MODULE_2__.sin(startAngle) * innerRadiusY
      };
      var b0 = {
        x: _utils_Math__WEBPACK_IMPORTED_MODULE_2__.cos(startAngle) * radius,
        y: _utils_Math__WEBPACK_IMPORTED_MODULE_2__.sin(startAngle) * radiusY
      };
      var c0 = {
        x: _utils_Math__WEBPACK_IMPORTED_MODULE_2__.cos(endAngle) * radius,
        y: _utils_Math__WEBPACK_IMPORTED_MODULE_2__.sin(endAngle) * radiusY
      };
      var d0 = {
        x: _utils_Math__WEBPACK_IMPORTED_MODULE_2__.cos(endAngle) * innerRadius,
        y: _utils_Math__WEBPACK_IMPORTED_MODULE_2__.sin(endAngle) * innerRadiusY
      }; // end of duplicate

      var h = this.depth;
      var ah = {
        x: a0.x,
        y: a0.y - h
      };
      var bh = {
        x: b0.x,
        y: b0.y - h
      };
      var ch = {
        x: c0.x,
        y: c0.y - h
      };
      var dh = {
        x: d0.x,
        y: d0.y - h
      };
      var edgePath = "";
      var count = Math.ceil(arc / 5);
      var step = arc / count;
      var mangle = startAngle;
      var prevPoint = bh;

      for (var i = 0; i < count; i++) {
        mangle += step;

        if (mangle > 0 && mangle < 180) {
          edgePath += _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.moveTo(prevPoint);
          var pp = {
            x: _utils_Math__WEBPACK_IMPORTED_MODULE_2__.cos(mangle) * radius,
            y: _utils_Math__WEBPACK_IMPORTED_MODULE_2__.sin(mangle) * radiusY - h
          };
          edgePath += _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.lineTo({
            x: prevPoint.x,
            y: prevPoint.y + h
          });
          edgePath += _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.arcToPoint({
            x: pp.x,
            y: pp.y + h
          }, radius, radiusY, true);
          edgePath += _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.lineTo(pp);
          edgePath += _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.arcToPoint(prevPoint, radius, radiusY);
          edgePath += "z";
          prevPoint = pp;
        } else {
          edgePath += _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.moveTo(prevPoint);
          var pp = {
            x: _utils_Math__WEBPACK_IMPORTED_MODULE_2__.cos(mangle) * radius,
            y: _utils_Math__WEBPACK_IMPORTED_MODULE_2__.sin(mangle) * radiusY - h
          };
          edgePath += _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.arcToPoint(pp, radius, radiusY, true);
          edgePath += _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.lineTo({
            x: pp.x,
            y: pp.y + h
          });
          edgePath += _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.arcToPoint({
            x: prevPoint.x,
            y: prevPoint.y + h
          }, radius, radiusY);
          edgePath += _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.lineTo(prevPoint);
          edgePath += "z";
          prevPoint = pp;
        }
      }

      prevPoint = ah;
      mangle = startAngle;

      for (var i = 0; i < count; i++) {
        mangle += step;

        if (mangle > 0 && mangle < 180) {
          edgePath += _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.moveTo(prevPoint);
          var pp = {
            x: _utils_Math__WEBPACK_IMPORTED_MODULE_2__.cos(mangle) * innerRadius,
            y: _utils_Math__WEBPACK_IMPORTED_MODULE_2__.sin(mangle) * innerRadiusY - h
          };
          edgePath += _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.lineTo({
            x: prevPoint.x,
            y: prevPoint.y + h
          });
          edgePath += _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.arcToPoint({
            x: pp.x,
            y: pp.y + h
          }, innerRadius, innerRadiusY, true);
          edgePath += _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.lineTo(pp);
          edgePath += _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.arcToPoint(prevPoint, innerRadius, innerRadiusY);
          edgePath += "z";
          prevPoint = pp;
        } else {
          edgePath += _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.moveTo(prevPoint);
          var pp = {
            x: _utils_Math__WEBPACK_IMPORTED_MODULE_2__.cos(mangle) * innerRadius,
            y: _utils_Math__WEBPACK_IMPORTED_MODULE_2__.sin(mangle) * innerRadiusY - h
          };
          edgePath += _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.arcToPoint(pp, innerRadius, innerRadiusY, true);
          edgePath += _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.lineTo({
            x: pp.x,
            y: pp.y + h
          });
          edgePath += _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.arcToPoint({
            x: prevPoint.x,
            y: prevPoint.y + h
          }, innerRadius, innerRadiusY);
          edgePath += _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.lineTo(prevPoint);
          edgePath += "z";
          prevPoint = pp;
        }
      }

      this.edge.path = edgePath;
      /*
                  a0 = { x: $math.cos(startAngle) * (innerRadius + innerCornerRadius), y: $math.sin(startAngle) * (innerRadiusY + innerCornerRadiusY) };
                  b0 = { x: $math.cos(startAngle) * (radius - cornerRadius), y: $math.sin(startAngle) * (radiusY - cornerRadiusY) };
                  c0 = { x: $math.cos(endAngle) * (radius - cornerRadius), y: $math.sin(endAngle) * (radiusY - cornerRadiusY) };
                  d0 = { x: $math.cos(endAngle) * (innerRadius + innerCornerRadius), y: $math.sin(endAngle) * (innerRadiusY + innerCornerRadiusY) };
                  // end of duplicate
      
                  ah = { x: a0.x, y: a0.y - h };
                  bh = { x: b0.x, y: b0.y - h };
                  ch = { x: c0.x, y: c0.y - h };
                  dh = { x: d0.x, y: d0.y - h };
      */

      this.sideA.path = _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.moveTo(a0) + _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.lineTo(b0) + _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.lineTo(bh) + _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.lineTo(ah) + _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.closePath();
      this.sideB.path = _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.moveTo(c0) + _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.lineTo(d0) + _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.lineTo(dh) + _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.lineTo(ch) + _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.closePath();

      if (this.startAngle < 90) {
        this.sideA.toBack();
      } else {
        this.sideA.toFront();
      }

      if (this.startAngle + this.arc > 90) {
        this.sideB.toBack();
      } else {
        this.sideB.toFront();
      }

      this.slice.dy = -h;
    } else {
      this.sideA.hide(0);
      this.sideB.hide(0);
      this.edge.hide(0);
    }
  };

  Object.defineProperty(Slice3D.prototype, "depth", {
    /**
     * @return Depth (px)
     */
    get: function get() {
      return this.getPropertyValue("depth");
    },

    /**
     * Depth (height) of the 3D slice in pixels.
     *
     * @default 20
     * @param depth  Depth (px)
     */
    set: function set(depth) {
      this.setPropertyValue("depth", depth, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Slice3D.prototype, "angle", {
    /**
     * @return Angle
     */
    get: function get() {
      var angle = this.getPropertyValue("angle");

      if (!_utils_Type__WEBPACK_IMPORTED_MODULE_4__.isNumber(angle)) {
        angle = 0;
      }

      return angle;
    },

    /**
     * Angle of the point of view to the 3D element. (0-360)
     *
     * @default 30
     * @param value  Angle
     */
    set: function set(value) {
      this.setPropertyValue("angle", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Slice3D.prototype, "radiusY", {
    /**
     * @return Vertical radius (0-1)
     */
    get: function get() {
      var radiusY = this.getPropertyValue("radiusY");

      if (!_utils_Type__WEBPACK_IMPORTED_MODULE_4__.isNumber(radiusY)) {
        radiusY = this.radius - this.radius * this.angle / 90;
      }

      return radiusY;
    },

    /**
     * Vertical radius for creating skewed slices.
     *
     * This is relevant to `radius`, e.g. 0.5 will set vertical radius to half
     * the `radius`.
     *
     * @param value Vertical radius (0-1)
     */
    set: function set(value) {
      this.setPropertyValue("radiusY", value, true);
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Copies all properties and related data from a different instance of Axis.
   *
   * @param source Source Axis
   */

  Slice3D.prototype.copyFrom = function (source) {
    _super.prototype.copyFrom.call(this, source);

    this.edge.copyFrom(source.edge);
    this.sideA.copyFrom(source.sideA);
    this.sideB.copyFrom(source.sideB);
  };

  return Slice3D;
}(_Slice__WEBPACK_IMPORTED_MODULE_0__.Slice);



/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/elements/AmChartsLogo.js":
/*!**********************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/elements/AmChartsLogo.js ***!
  \**********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "AmChartsLogo": () => (/* binding */ AmChartsLogo)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Container__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Container */ "./node_modules/@amcharts/amcharts4/.internal/core/Container.js");
/* harmony import */ var _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/utils/InterfaceColorSet */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/InterfaceColorSet.js");
/* harmony import */ var _Polyspline__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Polyspline */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Polyspline.js");
/* harmony import */ var _utils_Color__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/Color */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Color.js");
/* harmony import */ var _rendering_fills_LinearGradient__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../rendering/fills/LinearGradient */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/LinearGradient.js");
/* harmony import */ var _rendering_filters_DesaturateFilter__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../rendering/filters/DesaturateFilter */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/filters/DesaturateFilter.js");
/**
 * AmChartsLogo module.
 *
 * AmChartsLogo shows amCharts logo for non-commercial users of a library.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */







/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * A class used to draw and display progress indicator.
 *
 * @see {@link IAmChartsLogoEvents} for a list of available events
 * @see {@link IAmChartsLogoAdapters} for a list of available Adapters
 * @ignore Exclude from docs
 */

var AmChartsLogo =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_6__.__extends)(AmChartsLogo, _super);
  /**
   * Constructor
   */


  function AmChartsLogo() {
    var _this = // Init
    _super.call(this) || this;

    _this.className = "AmChartsLogo";
    _this.valign = "bottom";
    var d = 0.3;
    _this.opacity = 0.3;
    _this.defaultState.properties.opacity = 0.4;
    _this.url = "https://www.amcharts.com/";
    _this.urlTarget = "_blank";
    _this.showSystemTooltip = true;
    _this.readerTitle = "Chart created using amCharts library";
    _this.width = 220 * d;
    _this.height = 70 * d;
    _this.background.opacity = 0;
    var aColor = (0,_utils_Color__WEBPACK_IMPORTED_MODULE_3__.color)("#474758");

    if (new _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_1__.InterfaceColorSet().getFor("background").alternative.hex == "#ffffff") {
      aColor = (0,_utils_Color__WEBPACK_IMPORTED_MODULE_3__.color)("#ffffff");
    }

    var aGradient = new _rendering_fills_LinearGradient__WEBPACK_IMPORTED_MODULE_4__.LinearGradient();
    aGradient.addColor(aColor);
    aGradient.addColor(aColor, 1, 0.75);
    aGradient.addColor((0,_utils_Color__WEBPACK_IMPORTED_MODULE_3__.color)("#3cabff"), 1, 0.755);
    aGradient.rotation = -10;
    var aStroke = aGradient;

    var m = _this.createChild(_Polyspline__WEBPACK_IMPORTED_MODULE_2__.Polyspline);

    m.shouldClone = false;
    m.isMeasured = false;
    m.segments = [[{
      x: 50 * d,
      y: 50 * d
    }, {
      x: 90 * d,
      y: 50 * d
    }, {
      x: 120 * d,
      y: 20 * d
    }, {
      x: 135 * d,
      y: 35 * d
    }, {
      x: 150 * d,
      y: 20 * d
    }, {
      x: 180 * d,
      y: 50 * d
    }, {
      x: 200 * d,
      y: 50 * d
    }]];
    m.strokeWidth = 6 * d;
    m.tensionX = 0.8;
    m.tensionY = 1;
    m.stroke = (0,_utils_Color__WEBPACK_IMPORTED_MODULE_3__.color)("#3cabff");

    var a = _this.createChild(_Polyspline__WEBPACK_IMPORTED_MODULE_2__.Polyspline);

    a.shouldClone = false;
    a.isMeasured = false;
    a.segments = [[{
      x: 20 * d,
      y: 50 * d
    }, {
      x: 50 * d,
      y: 50 * d
    }, {
      x: 90 * d,
      y: 12 * d
    }, {
      x: 133 * d,
      y: 50 * d
    }, {
      x: 170 * d,
      y: 50 * d
    }, {
      x: 200 * d,
      y: 50 * d
    }]];
    a.strokeWidth = 6 * d;
    a.tensionX = 0.75;
    a.tensionY = 1;
    a.stroke = aStroke;

    _this._disposers.push(a);

    var desaturateFilter = new _rendering_filters_DesaturateFilter__WEBPACK_IMPORTED_MODULE_5__.DesaturateFilter();

    _this.filters.push(desaturateFilter);

    var desaturateFilterHover = new _rendering_filters_DesaturateFilter__WEBPACK_IMPORTED_MODULE_5__.DesaturateFilter();
    desaturateFilterHover.saturation = 1;

    var hoverState = _this.states.create("hover");

    hoverState.properties.opacity = 1;
    hoverState.filters.push(desaturateFilterHover); // Apply theme

    _this.applyTheme();

    return _this;
  }

  return AmChartsLogo;
}(_Container__WEBPACK_IMPORTED_MODULE_0__.Container);



/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Button.js":
/*!****************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/elements/Button.js ***!
  \****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Button": () => (/* binding */ Button)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Container__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Container */ "./node_modules/@amcharts/amcharts4/.internal/core/Container.js");
/* harmony import */ var _Label__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Label */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Label.js");
/* harmony import */ var _elements_RoundedRectangle__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../elements/RoundedRectangle */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/RoundedRectangle.js");
/* harmony import */ var _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/utils/InterfaceColorSet */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/InterfaceColorSet.js");
/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/**
 * Functionality for drawing simple buttons.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */






/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Button class is capable of drawing a simple rectangular button with
 * optionally rounded corners and an icon in it.
 *
 * @see {@link IButtonEvents} for a list of available events
 * @see {@link IButtonAdapters} for a list of available Adapters
 */

var Button =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__extends)(Button, _super);
  /**
   * Constructor
   */


  function Button() {
    var _this = // Init
    _super.call(this) || this;

    _this.className = "Button";
    _this.tooltipY = 0; // Set defaults

    _this.iconPosition = "left";
    _this.layout = "horizontal";
    _this.contentAlign = "center";
    _this.contentValign = "middle";

    _this.padding(8, 16, 8, 16);

    _this.setStateOnChildren = true;
    var interfaceColors = new _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_3__.InterfaceColorSet(); // Create background

    var background = _this.background;
    background.fill = interfaceColors.getFor("secondaryButton");
    background.stroke = interfaceColors.getFor("secondaryButtonStroke");
    background.fillOpacity = 1;
    background.strokeOpacity = 1;
    background.cornerRadius(3, 3, 3, 3); // Create the label element

    _this.label = new _Label__WEBPACK_IMPORTED_MODULE_1__.Label();
    _this.label.fill = interfaceColors.getFor("secondaryButtonText");
    ;
    _this.label.shouldClone = false; // Create default states

    var hoverState = background.states.create("hover");
    hoverState.properties.fillOpacity = 1;
    hoverState.properties.fill = interfaceColors.getFor("secondaryButtonHover");
    var downState = background.states.create("down");
    downState.transitionDuration = 100;
    downState.properties.fill = interfaceColors.getFor("secondaryButtonDown");
    downState.properties.fillOpacity = 1; // Set up accessibility
    // A button should be always focusable

    _this.role = "button";
    _this.focusable = true; // Apply theme

    _this.applyTheme();

    return _this;
  }

  Object.defineProperty(Button.prototype, "icon", {
    /**
     * @return Icon Sprite
     */
    get: function get() {
      return this._icon;
    },

    /**
     * A [[Sprite]] to be used as an icon on button.
     *
     * @param icon Icon Sprite
     */
    set: function set(icon) {
      var currentIcon = this._icon;

      if (currentIcon) {
        //this._icon.dispose();
        //this.removeDispose(currentIcon);
        currentIcon.parent = undefined;
      }

      if (icon) {
        this._icon = icon;
        icon.parent = this;
        icon.interactionsEnabled = false;
        icon.shouldClone = false;
        this.iconPosition = this.iconPosition;

        this._disposers.push(icon);
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Button.prototype, "iconPosition", {
    /**
     * @return Icon position
     */
    get: function get() {
      return this.getPropertyValue("iconPosition");
    },

    /**
     * Icon position: "left" or "right".
     *
     * @default "left"
     * @param position  Icon position
     */
    set: function set(position) {
      this.setPropertyValue("iconPosition", position);

      if (this.icon) {
        if (position == "left") {
          this.icon.toBack();
        } else {
          this.icon.toFront();
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Button.prototype, "label", {
    /**
     * @return Label element
     */
    get: function get() {
      return this._label;
    },

    /**
     * [[Label]] element to be used for text.
     *
     * @param label element
     */
    set: function set(label) {
      if (this._label) {
        //this._label.dispose();
        this.removeDispose(this._label);
      }

      this._label = label;

      if (label) {
        label.parent = this;
        label.interactionsEnabled = false;

        this._disposers.push(this._label);
      }
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Creates a background element for the button.
   *
   * @ignore Exclude from docs
   * @return Background element
   */

  Button.prototype.createBackground = function () {
    return new _elements_RoundedRectangle__WEBPACK_IMPORTED_MODULE_2__.RoundedRectangle();
  };
  /**
   * Copies properties and other attributes.
   *
   * @param source  Source
   */


  Button.prototype.copyFrom = function (source) {
    _super.prototype.copyFrom.call(this, source);

    if (source.label) {
      this.label.copyFrom(source.label);
    }

    if (source.icon) {
      this.icon = source.icon.clone();
    }
  };

  return Button;
}(_Container__WEBPACK_IMPORTED_MODULE_0__.Container);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_Registry__WEBPACK_IMPORTED_MODULE_4__.registry.registeredClasses.Button = Button;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Circle.js":
/*!****************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/elements/Circle.js ***!
  \****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Circle": () => (/* binding */ Circle)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Sprite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Sprite */ "./node_modules/@amcharts/amcharts4/.internal/core/Sprite.js");
/* harmony import */ var _utils_Percent__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/Percent */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Percent.js");
/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _utils_Utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/Utils */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Utils.js");
/* harmony import */ var _utils_Math__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
/**
 * Functionality for drawing circles.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */






/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Used to create a circle
 * @see {@link ICircleEvents} for a list of available events
 * @see {@link ICircleAdapters} for a list of available Adapters
 */

var Circle =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__extends)(Circle, _super);
  /**
   * Constructor
   */


  function Circle() {
    var _this = _super.call(this) || this;

    _this.className = "Circle";
    _this.element = _this.paper.add("circle");

    _this.setPercentProperty("radius", (0,_utils_Percent__WEBPACK_IMPORTED_MODULE_1__.percent)(100));

    _this.setPropertyValue("horizontalCenter", "middle");

    _this.setPropertyValue("verticalCenter", "middle");

    _this.applyTheme();

    return _this;
  }
  /**
   * Draws the circle.
   */


  Circle.prototype.draw = function () {
    _super.prototype.draw.call(this);

    this.element.attr({
      "r": this.pixelRadius
    });
  };

  Object.defineProperty(Circle.prototype, "radius", {
    /**
     * @return Radius
     */
    get: function get() {
      return this.getPropertyValue("radius");
    },

    /**
     * Radius of the circle.
     *
     * Can be either absolute (pixels) or relative ([Percent]).
     *
     * @param value  Radius
     */
    set: function set(value) {
      this.setPercentProperty("radius", value, true, false, 10, false);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Circle.prototype, "pixelRadius", {
    /**
     * Radius of the circle in pixels.
     *
     * This is a read-only property. To set radius in pixels, use `radius`
     * property.
     *
     * @readonly
     * @return Radius (px)
     */
    get: function get() {
      return _utils_Utils__WEBPACK_IMPORTED_MODULE_3__.relativeToValue(this.radius, _utils_Math__WEBPACK_IMPORTED_MODULE_4__.min(this.innerWidth / 2, this.innerHeight / 2));
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Updates bounding box.
   *
   * @ignore Exclude from docs
   */

  Circle.prototype.measureElement = function () {
    var pixelRadius = this.pixelRadius;
    this._bbox = {
      x: -pixelRadius,
      y: -pixelRadius,
      width: pixelRadius * 2,
      height: pixelRadius * 2
    };
  };

  return Circle;
}(_Sprite__WEBPACK_IMPORTED_MODULE_0__.Sprite);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_Registry__WEBPACK_IMPORTED_MODULE_2__.registry.registeredClasses.Circle = Circle;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/elements/CloseButton.js":
/*!*********************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/elements/CloseButton.js ***!
  \*********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "CloseButton": () => (/* binding */ CloseButton)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Button__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Button */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Button.js");
/* harmony import */ var _Sprite__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Sprite */ "./node_modules/@amcharts/amcharts4/.internal/core/Sprite.js");
/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/utils/InterfaceColorSet */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/InterfaceColorSet.js");
/* harmony import */ var _rendering_Path__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../rendering/Path */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Path.js");
/* harmony import */ var _core_utils_Type__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../core/utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/* harmony import */ var _core_interaction_Mouse__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../core/interaction/Mouse */ "./node_modules/@amcharts/amcharts4/.internal/core/interaction/Mouse.js");
/**
 * Zoom out button functionality.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */








/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Creates a zoom out button.
 *
 * @see {@link ICloseButtonEvents} for a list of available events
 * @see {@link ICloseButtonAdapters} for a list of available Adapters
 */

var CloseButton =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_7__.__extends)(CloseButton, _super);
  /**
   * Constructor
   */


  function CloseButton() {
    var _this = // Init
    _super.call(this) || this;

    _this.className = "CloseButton";

    _this.padding(8, 8, 8, 8);

    _this.showSystemTooltip = true;
    _this.width = 30;
    _this.height = 30;
    var interfaceColors = new _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_3__.InterfaceColorSet();
    _this.cursorOverStyle = _core_interaction_Mouse__WEBPACK_IMPORTED_MODULE_6__.MouseCursorStyle.pointer;
    var background = _this.background;
    background.cornerRadius(20, 20, 20, 20);
    var bgc = interfaceColors.getFor("background");
    background.fill = bgc;
    background.stroke = interfaceColors.getFor("primaryButton");
    background.strokeOpacity = 1;
    background.strokeWidth = 1;
    var downColor = interfaceColors.getFor("primaryButtonActive");
    var bhs = background.states.getKey("hover");
    bhs.properties.strokeWidth = 3;
    bhs.properties.fill = bgc;
    var bds = background.states.getKey("down");
    bds.properties.stroke = downColor;
    bds.properties.fill = bgc; // Create an icon

    var icon = new _Sprite__WEBPACK_IMPORTED_MODULE_1__.Sprite();
    icon.element = _this.paper.add("path");
    icon.stroke = background.stroke;
    _this.icon = icon; // Apply theme

    _this.applyTheme();

    return _this;
  }

  CloseButton.prototype.validate = function () {
    _super.prototype.validate.call(this);

    var w = this.pixelWidth / 3;
    var h = this.pixelHeight / 3;
    var path = _rendering_Path__WEBPACK_IMPORTED_MODULE_4__.moveTo({
      x: -w / 2,
      y: -h / 2
    });
    path += _rendering_Path__WEBPACK_IMPORTED_MODULE_4__.lineTo({
      x: w / 2,
      y: h / 2
    });
    path += _rendering_Path__WEBPACK_IMPORTED_MODULE_4__.moveTo({
      x: w / 2,
      y: -h / 2
    });
    path += _rendering_Path__WEBPACK_IMPORTED_MODULE_4__.lineTo({
      x: -w / 2,
      y: h / 2
    });
    this.icon.path = path;
    this.invalidateLayout();
  };
  /**
   * Sets defaults that instantiate some objects that rely on parent, so they
   * cannot be set in constructor.
   */


  CloseButton.prototype.applyInternalDefaults = function () {
    _super.prototype.applyInternalDefaults.call(this);

    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_5__.hasValue(this.readerTitle)) {
      this.readerTitle = this.language.translate("Close");
    }
  };

  return CloseButton;
}(_Button__WEBPACK_IMPORTED_MODULE_0__.Button);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_Registry__WEBPACK_IMPORTED_MODULE_2__.registry.registeredClasses.CloseButton = CloseButton;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Ellipse.js":
/*!*****************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/elements/Ellipse.js ***!
  \*****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Ellipse": () => (/* binding */ Ellipse)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Circle__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Circle */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Circle.js");
/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/**
 * Ellipse module.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */



/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Draws an ellipse
 * @see {@link IEllipseEvents} for a list of available events
 * @see {@link IEllipseAdapters} for a list of available Adapters
 */

var Ellipse =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(Ellipse, _super);
  /**
   * Constructor
   */


  function Ellipse() {
    var _this = _super.call(this) || this;

    _this.className = "Ellipse";
    _this.element = _this.paper.add("ellipse");

    _this.applyTheme();

    return _this;
  }
  /**
   * Draws the ellipsis.
   */


  Ellipse.prototype.draw = function () {
    _super.prototype.draw.call(this);

    this.element.attr({
      "rx": this.radius
    });
    this.element.attr({
      "ry": this.radiusY
    });
  };

  Object.defineProperty(Ellipse.prototype, "radiusY", {
    /**
     * @return Vertical radius
     */
    get: function get() {
      return this.innerHeight / 2;
    },

    /**
     * Vertical radius.
     *
     * It's a relative size to the `radius`.
     *
     * E.g. 0.8 will mean the height of the ellipsis will be 80% of it's
     * horizontal radius.
     *
     * @param value  Vertical radius
     */
    set: function set(value) {
      this.height = value * 2;
      this.invalidate();
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Ellipse.prototype, "radius", {
    /**
     * @return Horizontal radius
     */
    get: function get() {
      return this.innerWidth / 2;
    },

    /**
     * Horizontal radius.
     *
     * @param value  Horizontal radius
     */
    set: function set(value) {
      this.width = value * 2;
      this.invalidate();
    },
    enumerable: true,
    configurable: true
  });
  return Ellipse;
}(_Circle__WEBPACK_IMPORTED_MODULE_0__.Circle);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses.Ellipse = Ellipse;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Grip.js":
/*!**************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/elements/Grip.js ***!
  \**************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Grip": () => (/* binding */ Grip)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Button__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Button */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Button.js");
/* harmony import */ var _Sprite__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Sprite */ "./node_modules/@amcharts/amcharts4/.internal/core/Sprite.js");
/* harmony import */ var _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/utils/InterfaceColorSet */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/InterfaceColorSet.js");
/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _utils_Percent__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/Percent */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Percent.js");
/* harmony import */ var _rendering_Path__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../rendering/Path */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Path.js");
/**
 * Grip module.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */







/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Creates a grip element that can be used for scrolling or other things.
 *
 * @see {@link IGripEvents} for a list of available events
 * @see {@link IGripAdapters} for a list of available Adapters
 * @since 4.4.0
 */

var Grip =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_6__.__extends)(Grip, _super);
  /**
   * Constructor
   */


  function Grip() {
    var _this = // Init
    _super.call(this) || this;

    _this.className = "Grip";
    var cs = new _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_2__.InterfaceColorSet(); // Set defaults

    _this.layout = "absolute";

    _this.padding(10, 10, 10, 10);

    _this.margin(3, 3, 3, 3);

    _this.background.fillOpacity = 0.3;

    _this.background.cornerRadius(10, 10, 10, 10); // Create an icon


    var icon = new _Sprite__WEBPACK_IMPORTED_MODULE_1__.Sprite();
    icon.element = _this.paper.add("path");
    var path = _rendering_Path__WEBPACK_IMPORTED_MODULE_5__.moveTo({
      x: -6,
      y: 0
    });
    path += _rendering_Path__WEBPACK_IMPORTED_MODULE_5__.lineTo({
      x: 6,
      y: 0
    });
    path += _rendering_Path__WEBPACK_IMPORTED_MODULE_5__.moveTo({
      x: -8,
      y: -6
    });
    path += _rendering_Path__WEBPACK_IMPORTED_MODULE_5__.lineTo({
      x: 0,
      y: -12
    });
    path += _rendering_Path__WEBPACK_IMPORTED_MODULE_5__.lineTo({
      x: 8,
      y: -6
    });
    path += _rendering_Path__WEBPACK_IMPORTED_MODULE_5__.moveTo({
      x: -8,
      y: 6
    });
    path += _rendering_Path__WEBPACK_IMPORTED_MODULE_5__.lineTo({
      x: 0,
      y: 12
    });
    path += _rendering_Path__WEBPACK_IMPORTED_MODULE_5__.lineTo({
      x: 8,
      y: 6
    });
    icon.path = path;
    icon.strokeWidth = 2;
    icon.fillOpacity = 0;
    icon.pixelPerfect = true;
    icon.padding(0, 4, 0, 4);
    icon.stroke = cs.getFor("text");
    icon.strokeOpacity = 0.7;
    icon.align = "center";
    icon.valign = "middle";
    _this.icon = icon;

    _this.label.dispose();

    _this.label = undefined; // Set default position

    _this.position = "right"; // Set up autohide

    _this.autoHideDelay = 3000;

    _this.events.on("shown", function (ev) {
      if (_this._autoHideTimeout) {
        _this._autoHideTimeout.dispose();
      }

      if (_this.autoHideDelay) {
        _this._autoHideTimeout = _this.setTimeout(function () {
          _this.hide();
        }, _this.autoHideDelay);
      }
    });

    _this.events.on("down", function (ev) {
      if (_this._autoHideTimeout) {
        _this._autoHideTimeout.dispose();
      }
    });

    _this.events.on("out", function (ev) {
      if (_this.autoHideDelay) {
        _this._autoHideTimeout = _this.setTimeout(function () {
          _this.hide();
        }, _this.autoHideDelay);
      }
    }); // Apply theme


    _this.applyTheme();

    return _this;
  }

  Object.defineProperty(Grip.prototype, "position", {
    /**
     * @return Position
     */
    get: function get() {
      return this.getPropertyValue("position");
    },

    /**
     * Sets position of the grip.
     *
     * Available options: "left", "right" (default), "top", "bottom".
     *
     * @param  value  Position
     */
    set: function set(value) {
      if (this.setPropertyValue("position", value)) {
        switch (value) {
          case "left":
            this.align = "left";
            this.valign = "middle";
            this.horizontalCenter = "left";
            this.verticalCenter = "middle";
            this.icon.rotation = 0;
            this.width = undefined;
            this.height = (0,_utils_Percent__WEBPACK_IMPORTED_MODULE_4__.percent)(30);
            break;

          case "right":
            this.align = "right";
            this.valign = "middle";
            this.horizontalCenter = "right";
            this.verticalCenter = "middle";
            this.icon.rotation = 0;
            this.width = undefined;
            this.height = (0,_utils_Percent__WEBPACK_IMPORTED_MODULE_4__.percent)(30);
            break;

          case "top":
            this.align = "center";
            this.valign = "top";
            this.horizontalCenter = "middle";
            this.verticalCenter = "top";
            this.icon.rotation = 90;
            this.width = (0,_utils_Percent__WEBPACK_IMPORTED_MODULE_4__.percent)(30);
            this.height = undefined;
            break;

          case "bottom":
            this.align = "center";
            this.valign = "bottom";
            this.horizontalCenter = "middle";
            this.verticalCenter = "bottom";
            this.icon.rotation = 90;
            this.width = (0,_utils_Percent__WEBPACK_IMPORTED_MODULE_4__.percent)(30);
            this.height = undefined;
            break;

          default:
            this.align = "center";
            this.valign = "middle";
            this.horizontalCenter = "middle";
            this.verticalCenter = "middle";
            this.icon.rotation = 90;
            this.width = (0,_utils_Percent__WEBPACK_IMPORTED_MODULE_4__.percent)(30);
            this.height = undefined;
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Grip.prototype, "autoHideDelay", {
    /**
     * @return Delay
     */
    get: function get() {
      return this.getPropertyValue("autoHideDelay");
    },

    /**
     * Number of milliseconds to show grip until it is hidden automatically.
     *
     * @default 3000
     * @param  value  Delay
     */
    set: function set(value) {
      this.setPropertyValue("autoHideDelay", value);
    },
    enumerable: true,
    configurable: true
  });
  return Grip;
}(_Button__WEBPACK_IMPORTED_MODULE_0__.Button);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_Registry__WEBPACK_IMPORTED_MODULE_3__.registry.registeredClasses.Grip = Grip;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Image.js":
/*!***************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/elements/Image.js ***!
  \***************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Image": () => (/* binding */ Image)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Sprite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Sprite */ "./node_modules/@amcharts/amcharts4/.internal/core/Sprite.js");
/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _utils_DOM__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/DOM */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/DOM.js");
/* harmony import */ var _utils_Type__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/**
 * Functionality for adding images in SVG tree.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */





/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Used to add `<image>` elements to SVG.
 *
 * @see {@link IImageEvents} for a list of available events
 * @see {@link IImageAdapters} for a list of available Adapters
 */

var Image =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_4__.__extends)(Image, _super);
  /**
   * Constructor
   */


  function Image() {
    var _this = _super.call(this) || this;

    _this.className = "Image";
    _this.element = _this.paper.add("image");

    _this.applyTheme();

    _this.width = 50;
    _this.height = 50;
    return _this;
  }
  /**
   * Draws an `<image>` element.
   *
   * @ignore Exclude from docs
   */


  Image.prototype.draw = function () {
    _super.prototype.draw.call(this);

    if (this.href) {
      var width = this.innerWidth;
      var height = this.innerHeight;

      if (_utils_Type__WEBPACK_IMPORTED_MODULE_3__.isNumber(this.widthRatio)) {
        width = height * this.widthRatio;
        this.width = width;
      }

      if (_utils_Type__WEBPACK_IMPORTED_MODULE_3__.isNumber(this.heightRatio)) {
        height = width * this.heightRatio;
        this.height = height;
      }

      this.element.attr({
        "width": width,
        "height": height
      });
      this.element.attrNS(_utils_DOM__WEBPACK_IMPORTED_MODULE_2__.XLINK, "xlink:href", this.href);
    }
  };

  Object.defineProperty(Image.prototype, "href", {
    /**
     * @return Image URI
     */
    get: function get() {
      return this.getPropertyValue("href");
    },

    /**
     * An image URI.
     *
     * @param value  Image URI
     */
    set: function set(value) {
      this.setPropertyValue("href", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Image.prototype, "widthRatio", {
    /**
     * @return Ratio
     */
    get: function get() {
      return this.getPropertyValue("widthRatio");
    },

    /**
     * Sets image `width` relatively to its `height`.
     *
     * If image's `height = 100` and `widthRatio = 0.5` the actual width will be
     * `50`.
     *
     * @param value  Ratio
     */
    set: function set(value) {
      this.setPropertyValue("widthRatio", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Image.prototype, "heightRatio", {
    /**
     * @return Ratio
     */
    get: function get() {
      return this.getPropertyValue("heightRatio");
    },

    /**
     * Sets image `height` relatively to its `width`.
     *
     * If image's `width = 100` and `heightRatio = 0.5` the actual height will be
     * `50`.
     *
     * @param value  Ratio
     */
    set: function set(value) {
      this.setPropertyValue("heightRatio", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Image.prototype, "bbox", {
    /**
     * Returns bounding box (square) for this element.
     *
     * @ignore Exclude from docs
     */
    get: function get() {
      return {
        x: 0,
        y: 0,
        width: this.pixelWidth,
        height: this.pixelHeight
      };
    },
    enumerable: true,
    configurable: true
  });
  return Image;
}(_Sprite__WEBPACK_IMPORTED_MODULE_0__.Sprite);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses.Image = Image;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Label.js":
/*!***************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/elements/Label.js ***!
  \***************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Label": () => (/* binding */ Label)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Container__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Container */ "./node_modules/@amcharts/amcharts4/.internal/core/Container.js");
/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _formatters_TextFormatter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../formatters/TextFormatter */ "./node_modules/@amcharts/amcharts4/.internal/core/formatters/TextFormatter.js");
/* harmony import */ var _utils_Disposer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/Disposer */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Disposer.js");
/* harmony import */ var _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../core/utils/InterfaceColorSet */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/InterfaceColorSet.js");
/* harmony import */ var _utils_Math__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
/* harmony import */ var _utils_Utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/Utils */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Utils.js");
/* harmony import */ var _utils_Type__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/* harmony import */ var _utils_DOM__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/DOM */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/DOM.js");
/* harmony import */ var _utils_Responsive__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/Responsive */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Responsive.js");
/* harmony import */ var _Options__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../Options */ "./node_modules/@amcharts/amcharts4/.internal/core/Options.js");
/**
 * Text class deals with all text placed on chart.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */












;
/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Text is used to display highly configurable, data-enabled textual elements.
 *
 * ## Data Binding
 *
 * A Text element can dynamically parse and populate its contents with values
 * from a [[DataItem]].
 *
 * To activate such binding, set element's `dataItem` property.
 *
 * When activated, text contents will be parsed for special tags, e.g.:
 *
 * ```TypeScript
 * label.dataItem = myDataItem;
 * label.text = "The title is: {title}";
 * ```
 * ```JavaScript
 * label.dataItem = myDataItem;
 * label.text = "The title is: {title}";
 * ```
 *
 * The above will automatically replace "{title}" in the string with the
 * actual data value from `myDataItem`.
 *
 * Note, that most often dataItem is set by the Component.
 *
 *
 * @see {@link ILabelEvents} for a list of available events
 * @see {@link ILabelAdapters} for a list of available Adapters
 * @see {@link https://www.amcharts.com/docs/v4/concepts/formatters/formatting-strings/} for info on string formatting and data binding
 * @todo Vertical align
 * @important
 */

var Label =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_11__.__extends)(Label, _super);
  /**
   * Constructor
   */


  function Label() {
    var _this = // Execute super's constructor
    _super.call(this) || this;
    /**
     * Indicates if the whole text does not fit into max dimenstions set for it.
     */


    _this.isOversized = false; // Set this class name

    _this.className = "Label";
    _this.fill = new _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_4__.InterfaceColorSet().getFor("text"); // not good to set this, as then these will appear on each label and values set on container won't be applied.
    //this.textDecoration = "none";
    //this.fontWeight = "normal";
    // Set defaults

    _this.wrap = false;
    _this.truncate = false;
    _this.fullWords = true;
    _this.ellipsis = "…";
    _this.textAlign = "start";
    _this.textValign = "top";
    _this.layout = "absolute";
    _this.baseLineRatio = -0.27; //this.pixelPerfect = true;

    _this._positionPrecision = 1; // Add events to watch for maxWidth/maxHeight changes so that we can
    // invalidate this

    _this.events.on("maxsizechanged", function () {
      if (_this.inited) {
        _this.handleMaxSize();
      }
    }, _this, false); // this solves strange bug when text just added to svg is 0x0


    _this.events.once("validated", _this.handleValidate, _this, false); // Aply theme


    _this.applyTheme();

    return _this;
  }
  /**
   * A placeholder method that is called **after** element finishes drawing
   * itself.
   *
   * @ignore Exclude from docs
   */


  Label.prototype.afterDraw = function () {
    // since we removed validatePosition from sprite, we still need it here to handle rotated text
    _super.prototype.afterDraw.call(this);

    this.validatePosition();
  };
  /**
   * Sets [[Paper]] instance to use to draw elements.
   * @ignore
   * @param paper Paper
   * @return true if paper was changed, false, if it's the same
   */


  Label.prototype.setPaper = function (paper) {
    var changed = _super.prototype.setPaper.call(this, paper);

    if (changed) {
      this.hardInvalidate();
    }

    return changed;
  };
  /**
   * @ignore
   */


  Label.prototype.handleValidate = function () {
    if ((this.currentText || this.text) && (this.bbox.width == 0 || this.bbox.height == 0)) {
      _Registry__WEBPACK_IMPORTED_MODULE_1__.registry.events.once("exitframe", this.hardInvalidate, this);
    }
  };
  /**
   * @ignore
   */


  Label.prototype.handleMaxSize = function () {
    if (this.bbox.width > this.availableWidth || this.bbox.width < this.availableWidth && (this.isOversized || this.truncate) || this.bbox.height > this.availableHeight || this.bbox.height < this.availableHeight && this.isOversized) {
      this.invalidate();
    } else {//this.alignSVGText();
    }
  };
  /**
   * [arrange description]
   *
   * @ignore Exclude from docs
   * @todo Description
   */


  Label.prototype.arrange = function () {};
  /**
   * Updates current text according to data item and supported features.
   * Returns `true` if current text has changed.
   *
   * @return Text changed?
   */


  Label.prototype.updateCurrentText = function () {
    // Determine output format
    var output, text;

    if (_utils_Utils__WEBPACK_IMPORTED_MODULE_6__.isNotEmpty(this.html) && this.paper.supportsForeignObject()) {
      // We favor HTML text if it's set and browser supports `foreignObject`
      output = "html";
      text = this.html;
    } else {
      output = "svg";
      text = this.text;
    } // Need to toString source?


    if (_utils_Type__WEBPACK_IMPORTED_MODULE_7__.isObject(text)) {
      text = text.toString();
    } // Need to format text all the time


    if (_utils_Type__WEBPACK_IMPORTED_MODULE_7__.hasValue(text) && text !== "") {
      text = this.populateString(text, this.dataItem);
    }

    if (output == "html") {
      if (this._adapterO) {
        text = this._adapterO.apply("htmlOutput", text);
      }
    } else {
      if (this._adapterO) {
        text = this._adapterO.apply("textOutput", text);
      }
    } // Update the text


    var changed = text != this.currentText || output != this._currentFormat;
    this.currentText = text;
    this._currentFormat = output;
    return changed;
  };
  /**
   * Hard invalidate means the text will be redrawn even if it hasn't changed.
   * This is used when we change `fontSize`, `fontFamily`, or for some other
   * reasons.
   */


  Label.prototype.hardInvalidate = function () {
    this._prevStatus = "";
    this.invalidate();
  };
  /**
   * Gets line bbox, uses caching to save cpu
   * @ignore
   */


  Label.prototype.getLineBBox = function (lineInfo) {
    //let cacheKey = lineInfo.text + lineInfo.style;
    //let lineBBox = this.getCache(cacheKey);
    //if (!lineBBox) {
    //lineBBox = lineInfo.element.getBBox();
    //if (lineBBox.width != 0 && lineBBox.height != 0) {
    //	this.setCache(cacheKey, lineBBox, 5000);
    //}
    //}
    var element = lineInfo && lineInfo.element;
    var node = element && element.node; // Check for the parent Node to avoid FF from throwing errors

    if (node && node.parentNode) {
      lineInfo.bbox = element.getBBox();
    }
  };
  /**
   * Draws the textual label.
   *
   * @ignore Exclude from docs
   */


  Label.prototype.draw = function () {
    // Draw super
    _super.prototype.draw.call(this);

    var oldW = this.bbox.width;
    var oldH = this.bbox.height;
    var topParent = this.topParent;

    if (topParent) {
      if (!topParent.maxWidth || !topParent.maxHeight) {
        topParent.events.once("maxsizechanged", this.hardInvalidate, this, false);
        return;
      }
    } // Calculate max width and height


    var maxWidth = _utils_Math__WEBPACK_IMPORTED_MODULE_5__.max(this.availableWidth - this.pixelPaddingLeft - this.pixelPaddingRight, 0);
    var maxHeight = _utils_Math__WEBPACK_IMPORTED_MODULE_5__.max(this.availableHeight - this.pixelPaddingTop - this.pixelPaddingBottom, 0); // save

    var status = maxHeight + "," + maxWidth + this.wrap + this.truncate + this.fullWords + this.rtl + this.ellipsis; // Update text

    if (!this.updateCurrentText() && this.inited && this._prevStatus == status) {
      return;
    }

    this._measuredWidth = 0;
    this._measuredHeight = 0; // Reset

    this.isOversized = false; // Determine output format

    var output = this._currentFormat;
    var text = this.currentText; // Empty string

    if (!_utils_Type__WEBPACK_IMPORTED_MODULE_7__.hasValue(text) || text == "") {
      this.element.attr({
        display: "none"
      });
      return;
    } // Chop up text into lines
    // We're still processing SVG and HTML in the same way for now


    var lines = text.split("\n"); // Do we need to go through the trouble of measuring lines
    //let measure: boolean = true;// (lines.length > 1) || this.wrap;

    this._prevStatus = status;
    this.textAlign = this.textAlign; // need this to measure

    var display = this.group.getAttr("display");

    if (display == "none") {
      this.group.removeAttr("display");
    }

    if (this.textPathElement) {
      this.textPathElement.removeChildren();
    } // SVG or HTML?


    if (output === "svg") {
      /**
       * SVG
       */
      this.element.removeAttr("display"); // Clear the element

      var group = this.element; //group.removeChildren();

      this.resetBBox(); // Init state variables

      var currentHeight = 0;
      var currentFormat = ""; // Process each line

      for (var i = 0; i < lines.length; i++) {
        // Get line
        var line = lines[i]; // Check if line is empty

        if (line == "") {
          // It is, let's just update currentHeight and go to the next one
          // If it's the first line, we'll have to use arbirary line height,
          // since there's nothing to measure. For subsequent lines we can take
          // previous line's height
          var tempElement = this.getSVGLineElement("", 0);
          tempElement.add(this.getSvgElement(".", (0,_formatters_TextFormatter__WEBPACK_IMPORTED_MODULE_2__.getTextFormatter)().translateStyleShortcuts(currentFormat)));
          group.add(tempElement);
          var offset = Math.ceil(tempElement.getBBox().height);

          if (offset > 0) {
            currentHeight += offset;
          }

          group.removeElement(tempElement); // Clear cache if necessary

          var lineInfo_1 = this.getLineInfo(i);

          if (lineInfo_1) {
            lineInfo_1.text = "";
            lineInfo_1.element.textContent = "";
          }

          continue;
        } // Chunk up the line and process each chunk


        var chunks = (0,_formatters_TextFormatter__WEBPACK_IMPORTED_MODULE_2__.getTextFormatter)().chunk(line, null, this.ignoreFormatting);
        var currentLineHeight = 0;
        var firstChunk = true;
        var skipTextChunks = false; // Create line element or grab it from cache

        var lineInfo = this.getLineInfo(i);

        if (lineInfo) {
          // Empty line
          lineInfo.text = "";
          lineInfo.element.textContent = "";
        } else {
          // Init new line info
          lineInfo = {
            "text": "",
            "element": this.getSVGLineElement("", 0),
            "complex": false
          }; // Create the line element
          //lineInfo.element = this.getSVGLineElement("", 0);
          //lineElement = this.getSVGLineElement("", 0);

          group.add(lineInfo.element);
        }

        lineInfo.element.removeAttr("display");
        lineInfo.element.removeChildren(); // memory leak without this

        if (this.textPathElement) {
          lineInfo.element.add(this.textPathElement);
        }
        /*// @todo not needed anymore
        if (this.rtl) {
            chunks.reverse();
        }*/
        // Process each chunk


        for (var x = 0; x < chunks.length; x++) {
          // If there's more than one chunk, means the line is "complex"
          if (x) {
            lineInfo.complex = true;
          } // Get chunk


          var chunk = chunks[x]; // Is this chunk format or text?

          if (chunk.type === "format") {
            // Log current format, so that we can apply it to multiple lines if
            // necessary
            currentFormat = chunk.text;
          } else {
            // It's text block
            // Need to skip?
            // We do this when truncating. We can't just simply go ahead and
            // abandon chunk processing as they might have formatting
            // instructions in them that are relevant for subsequent lines
            if (skipTextChunks) {
              continue;
            } // Add chunk to the current element
            //lineInfo.element.content += $utils.trim(getTextFormatter().format(currentFormat + chunk.text, output));


            lineInfo.text = chunk.text;
            lineInfo.style = (0,_formatters_TextFormatter__WEBPACK_IMPORTED_MODULE_2__.getTextFormatter)().translateStyleShortcuts(currentFormat);

            if (this.textPathElement) {
              this.getSvgElement(lineInfo.text, lineInfo.style, this.textPathElement);
            } else {
              this.getSvgElement(lineInfo.text, lineInfo.style, lineInfo.element);
            }

            this.getLineBBox(lineInfo);
            lineInfo.bbox.width = Math.ceil(lineInfo.bbox.width); // Updated current line height

            if (currentLineHeight < lineInfo.bbox.height) {
              currentLineHeight = lineInfo.bbox.height;
            } // Wrapping?


            if ((this.wrap || this.truncate) && lineInfo.bbox.width > maxWidth) {
              // Set oversized
              this.isOversized = true; // Take temporary measurements

              var lineText = lineInfo.element.textContent;
              var avgCharWidth = lineInfo.bbox.width / lineText.length; // * .9;
              // Calculate average number of symbols / width

              var excessChars = _utils_Math__WEBPACK_IMPORTED_MODULE_5__.min(Math.ceil((lineInfo.bbox.width - maxWidth) / avgCharWidth), lineText.length); // Are we truncating or auto-wrapping text?

              if (this.truncate) {
                /**
                 * Processing line truncation
                 * With the addition of each text chunk we measure if current
                 * line does not exceed maxWidth. If it does, we will stop
                 * addition of further chunks as well as try to truncate
                 * current or any number of previous chunks with an added
                 * ellipsis
                 */
                // Indicator whether we need to add ellipsis to the current
                // element, even if it fits. This is needed to indicate
                // whether we have already removed some subsequent chunks in
                // which case we need to add ellipsis.
                var addEllipsis = false; // Process each child in the temporary line, until the whole
                // line fits, preferably with an ellipsis
                // TODO use iterator instead

                var node_1 = lineInfo.element.node;

                if (node_1 && node_1.childNodes) {
                  for (var e = lineInfo.element.node.childNodes.length - 1; e >= 0; e--) {
                    // Get current element
                    var node_2 = lineInfo.element.node.childNodes[e]; // Add ellipsis only if previous chunk was removed in full
                    // and this chunk already fits
                    //if (addEllipsis && (bbox.width <= maxWidth)) {

                    if (addEllipsis && lineInfo.bbox.width <= maxWidth) {
                      // Add ellipsis
                      node_2.textContent += " " + this.ellipsis; // Measure again (we need to make sure ellipsis fits)

                      lineInfo.bbox = lineInfo.element.getBBox();
                      lineInfo.bbox.width = Math.floor(lineInfo.bbox.width); // If it fits, we're done here
                      // If it doesn't we continue rolling

                      if (lineInfo.bbox.width <= maxWidth) {
                        break;
                      }
                    }

                    addEllipsis = false; // Get element text

                    var elementText = node_2.textContent; // Calculate average number of symbols / width

                    lineText = lineInfo.element.textContent;
                    excessChars = _utils_Math__WEBPACK_IMPORTED_MODULE_5__.min(Math.ceil((lineInfo.bbox.width - maxWidth) / avgCharWidth), lineText.length); // Do this until we fit

                    while (lineInfo.bbox.width > maxWidth && excessChars <= lineText.length && excessChars > 0) {
                      // Calculate max available chars
                      var maxChars = _utils_Math__WEBPACK_IMPORTED_MODULE_5__.max(lineText.length - excessChars - this.ellipsis.length, 1); // Is there anything left?

                      if (maxChars <= 1) {
                        // Nope, let's jump to the previous item
                        // Set excess characters to zero so that this loop does
                        // not repeat when it over
                        excessChars = 0; // Add ellipsis to previous item
                        // Subsequent iterations will check if the ellipsis fits

                        if (e > 0) {
                          // Indicating to add ellipsis to previous item
                          addEllipsis = true; // Removing this node

                          lineInfo.element.node.removeChild(node_2);
                        }
                      } // Truncate the text


                      elementText = _utils_Utils__WEBPACK_IMPORTED_MODULE_6__.truncateWithEllipsis(elementText, maxChars, this.ellipsis, this.fullWords, this.rtl);

                      if (elementText.length > maxChars && this.fullWords) {
                        // Still too long?
                        // Let's try truncating breaking words anyway
                        elementText = _utils_Utils__WEBPACK_IMPORTED_MODULE_6__.truncateWithEllipsis(elementText, maxChars, this.ellipsis, false, this.rtl);
                      } // Set truncated text


                      node_2.textContent = elementText; // Measure again

                      lineInfo.bbox = lineInfo.element.getBBox();
                      lineInfo.bbox.width = Math.floor(lineInfo.bbox.width); // Increase excess characters count, just in case it still
                      // doesn't fit and we have to go at it again

                      excessChars = Math.ceil(excessChars * 1.1);
                    } // Do not process further chunks


                    skipTextChunks = true;
                  }
                }
              } else {
                /**
                 * Processign auto-wrap
                 * In this case we're going to be adding text chunks until
                 * they don't fit into current line. Once that happens we will
                 * inject the rest of the chunks to the next line
                 */
                // Get last node added and measure it
                var node_3 = lineInfo.element.node;

                if (node_3) {
                  var lastNode = lineInfo.element.node.lastChild; // Init split lines

                  var splitLines = void 0;

                  while (lineInfo.bbox.width > maxWidth && excessChars <= lineText.length && excessChars > 0) {
                    // Calculate max available chars
                    var maxChars = _utils_Math__WEBPACK_IMPORTED_MODULE_5__.max(chunk.text.length - excessChars, 1); // Don't split the words mid-word if it's not the first chunk
                    // in the line

                    if (firstChunk) {
                      // Split mid-word if necessary
                      splitLines = _utils_Utils__WEBPACK_IMPORTED_MODULE_6__.splitTextByCharCount(chunk.text, maxChars, true, this.rtl);
                    } else {
                      // Don't split mid-word
                      splitLines = _utils_Utils__WEBPACK_IMPORTED_MODULE_6__.splitTextByCharCount(chunk.text, maxChars, true, this.rtl, false); // Check if the first word is too long

                      if (splitLines[0].length > maxChars || maxChars === 1) {
                        // Yes - move the whole chunk to the next line
                        // Remove the element we just added
                        lineInfo.element.node.removeChild(lastNode); // Break out of the while on next cycle

                        excessChars = 0;
                      }
                    } // Use the first line to update last item


                    if (excessChars > 0) {
                      var lineText_1 = splitLines.shift();

                      if (firstChunk) {
                        lineText_1 = _utils_Utils__WEBPACK_IMPORTED_MODULE_6__.trim(lineText_1);
                      }

                      lastNode.textContent = (0,_formatters_TextFormatter__WEBPACK_IMPORTED_MODULE_2__.getTextFormatter)().cleanUp(lineText_1);
                    } // Measure again, just in case


                    lineInfo.bbox = lineInfo.element.getBBox();
                    lineInfo.bbox.width = Math.floor(lineInfo.bbox.width); // Increase excess characters count, just in case it still
                    // doesn't fit and we have to go at it again
                    //excessChars = Math.ceil(excessChars * 1.05);

                    excessChars++;
                  } // Construct the rest of the line


                  if (splitLines.length > 0) {
                    var restOfLine = ""; // Add leftovers from splitting the current chunk

                    if (_utils_Type__WEBPACK_IMPORTED_MODULE_7__.hasValue(splitLines)) {
                      if (this.rtl) {
                        restOfLine += splitLines.join("") + currentFormat;
                      } else {
                        restOfLine += currentFormat + splitLines.join("").replace(/([\[\]]{1})/g, "$1$1");
                      }
                    } // Add the rest of the chunks


                    for (var c = x + 1; c < chunks.length; c++) {
                      if (chunks[c].type == "value") {
                        // We're escaping single square brackets that were
                        // cleaned up by chunk() back to double square brackets
                        // so that they are not being treated as format on
                        // next pass.
                        restOfLine += chunks[c].text.replace(/([\[\]]{1})/g, "$1$1");
                      } else {
                        restOfLine += chunks[c].text;
                      }
                    } // Inject the rest of the lines as chunks for subsequent


                    lines.splice(i + 1, 0, restOfLine);
                  } // Skip processing the rest of the chunks


                  skipTextChunks = true;
                }
              }
            } // Let's update the text's bbox with the line's one


            if (this.bbox.width < lineInfo.bbox.width) {
              this.bbox.width = lineInfo.bbox.width;
            } // commented to avoid bug (seen on sankey link) where text is incorrectly aligned
            //if (this.bbox.x > lineInfo.bbox.x) {
            //this.bbox.x = lineInfo.bbox.x;
            //}


            this.bbox.height = currentHeight + currentLineHeight; // Position current line

            if (!this.textPathElement) {
              lineInfo.element.attr({
                "x": "0",
                "y": currentHeight + currentLineHeight,
                "dy": _utils_Math__WEBPACK_IMPORTED_MODULE_5__.round(this.baseLineRatio * currentLineHeight, 3).toString()
              });
            } else {
              lineInfo.element.attr({
                "dy": -this.paddingBottom.toString()
              });
            }

            firstChunk = false;
          }
        } // Trim the last item


        var node = lineInfo.element.node;

        if (node) {
          var lastNode = node.lastChild;

          if (lastNode) {
            lastNode.textContent = this.rtl ? _utils_Utils__WEBPACK_IMPORTED_MODULE_6__.ltrim(lastNode.textContent) : _utils_Utils__WEBPACK_IMPORTED_MODULE_6__.rtrim(lastNode.textContent);
          }
        } // Increment collective height


        currentHeight += currentLineHeight; // Save line cache

        this.addLineInfo(lineInfo, i);
      } // Check if maybe we need to hide the whole label if it doesn't fit


      this.maybeHideOversized();
      this.measureFailed = false;

      if (this.bbox.width == 0 || this.bbox.height == 0) {
        this.measureFailed = true;
      } // Updated measured dims


      this._measuredWidth = _utils_Math__WEBPACK_IMPORTED_MODULE_5__.round(_utils_Math__WEBPACK_IMPORTED_MODULE_5__.max(this.bbox.width, this.pixelWidth - this.pixelPaddingLeft - this.pixelPaddingRight));
      this._measuredHeight = _utils_Math__WEBPACK_IMPORTED_MODULE_5__.round(_utils_Math__WEBPACK_IMPORTED_MODULE_5__.max(this.bbox.height, this.pixelHeight - this.pixelPaddingTop - this.pixelPaddingBottom)); // Align the lines

      this.alignSVGText();
      this.bbox.width = this._measuredWidth;
      this.bbox.height = this._measuredHeight;

      if (oldH != this._measuredHeight || oldW != this._measuredWidth) {
        this.dispatch("transformed");
      }

      this.hideUnused(lines.length);
    } else {
      /**
       * HTML
       */
      this.element.removeAttr("display");
      this.resetBBox(); // Clear the element

      var group = this.element;
      group.removeChildren();
      this.setCache("lineInfo", [], 0); // Create a ForeignObject to use as HTML container

      var fo = this.paper.foreignObject();
      group.add(fo); // Set widths on foreignObject so that autosizing measurements work
      // This will bet reset to actual content width/height

      if (this.maxWidth) {
        fo.attr({
          width: this.maxWidth - this.pixelPaddingLeft - this.pixelPaddingRight
        });
      }

      if (this.maxHeight) {
        fo.attr({
          height: this.maxHeight - this.pixelPaddingTop - this.pixelPaddingBottom
        });
      } // Create line element
      //let lineElement: HTMLElement = this.getHTMLLineElement(getTextFormatter().format(this.html, output));


      var lineElement = this.getHTMLLineElement(text);
      fo.node.appendChild(lineElement); // Temporarily set to inline-block so we can measure real width and height

      lineElement.style.display = "inline-block";
      var clientWidth = lineElement.clientWidth;
      var clientHeight = lineElement.clientHeight;
      lineElement.style.display = "block";
      this._bbox = {
        x: 0,
        y: 0,
        width: clientWidth,
        height: clientHeight
      }; // Set exact dimensions of foreignObject so it is sized exactly as
      // the content within (add one pixel to width so it does not wrap)

      fo.attr({
        width: clientWidth + 1,
        height: clientHeight
      }); // Check if maybe we need to hide the whole label if it doesn't fit

      this.maybeHideOversized(); // Set measurements and update bbox

      this._measuredWidth = _utils_Math__WEBPACK_IMPORTED_MODULE_5__.max(this.bbox.width, this.pixelWidth - this.pixelPaddingLeft - this.pixelPaddingRight);
      this._measuredHeight = _utils_Math__WEBPACK_IMPORTED_MODULE_5__.max(this.bbox.height, this.pixelHeight - this.pixelPaddingTop - this.pixelPaddingBottom);
      this.bbox.width = this._measuredWidth;
      this.bbox.height = this._measuredHeight; // Don't let labels bleed out of the alotted area

      if (this.truncate) {
        lineElement.style.overflow = "hidden";
      }

      if (clientWidth > maxWidth || clientHeight > maxHeight) {
        this.isOversized = true;
      }
    } // Set applicable styles


    this.setStyles();
    this.updateCenter();
    this.updateBackground();

    if (display == "none") {
      this.group.attr({
        display: "none"
      });
    }

    if (this.pathElement) {
      this.paper.appendDef(this.pathElement);
    }
  };
  /**
   * Hides element if it does not fit into available space
   */


  Label.prototype.maybeHideOversized = function () {
    if (this.hideOversized) {
      if (this.availableWidth < this.bbox.width || this.availableHeight < this.bbox.height) {
        this.element.attr({
          display: "none"
        });
        this.isOversized = true;
      } else {
        this.element.removeAttr("display");
        this.isOversized = false;
      }
    }
  };
  /**
   * Aligns the lines horizontally and vertically, based on properties.
   *
   * @ignore Exclude from docs
   */


  Label.prototype.alignSVGText = function () {
    // Get Group
    var group = this.element;
    var children = group.node.children || group.node.childNodes; // Is there anything to align?

    if (!children || children && children.length == 0) {
      return;
    }

    var width = this._measuredWidth;
    var height = this._measuredHeight; // TODO maybe these aren't needed ?

    _utils_Utils__WEBPACK_IMPORTED_MODULE_6__.used(this.pixelPaddingLeft);
    _utils_Utils__WEBPACK_IMPORTED_MODULE_6__.used(this.pixelPaddingRight);
    _utils_Utils__WEBPACK_IMPORTED_MODULE_6__.used(this.pixelPaddingTop);
    _utils_Utils__WEBPACK_IMPORTED_MODULE_6__.used(this.pixelPaddingBottom);

    if (this.rtl) {
      group.attr({
        "direction": "rtl"
      });
    } else {
      group.removeAttr("direction");
    } // Process each line
    //$iter.each(group.children.backwards().iterator(), (element) => {


    for (var i = children.length - 1; i >= 0; i--) {
      // Align horizontally
      // Since we are using `text-anchor` for horizontal alignment, all we need
      // to do here is move the `x` position
      var node = children[i];
      node.setAttribute("text-anchor", this.textAlign);

      if (this.textPathElement) {
        node.removeAttribute("x");
        node.removeAttribute("y");
      } else {
        switch (this.textAlign) {
          case "middle":
            node.setAttribute("x", (width / 2).toString() + "px");
            break;

          case "end":
            if (this.rtl) {} else {
              node.setAttribute("x", width.toString());
            }

            break;

          default:
            if (this.rtl) {
              node.setAttribute("x", width.toString());
            } else {
              node.removeAttribute("text-anchor");
            }

            break;
        }

        var y = _utils_Type__WEBPACK_IMPORTED_MODULE_7__.toNumber(node.getAttribute("y"));

        switch (this.textValign) {
          case "middle":
            node.setAttribute("y", ((y || 0) + (height - this.bbox.height) / 2).toString());
            break;

          case "bottom":
            node.setAttribute("y", ((y || 0) + height - this.bbox.height).toString());
            break;

          default:
            node.setAttribute("y", (y || 0).toString());
            break;
        }
      }
    }
  };
  /**
   * Produces an SVG line element with formatted text.
   *
   * @ignore Exclude from docs
   * @param text    Text to wrap into line
   * @param y       Current line vertical position
   * @return A DOM element
   * @todo Implement HTML support
   */


  Label.prototype.getSVGLineElement = function (text, y) {
    // Create a <text> node and set text
    var element = this.paper.addGroup("text");
    element.textContent = text; // Set parameters

    element.attr({
      "x": "0" //"alignment-baseline": "hanging",
      //"baseline-shift": "-20%",
      //"text-anchor": "center"

    }); // Set `y` position

    if (_utils_Type__WEBPACK_IMPORTED_MODULE_7__.hasValue(y)) {
      element.attr({
        "y": y.toString()
      });
    } // Don't let labels blled out of the alotted area


    if (this.truncate || this.wrap) {
      element.attr({
        "overflow": "hidden"
      });
    } // Add RTL?
    // This has now been moved to this.alignSVGText()
    // if (this.rtl) {
    // 	element.attr({
    // 		"direction": "rtl",
    // 		//"unicode-bidi": "bidi-override"
    // 	});
    // }


    return element;
  };

  Object.defineProperty(Label.prototype, "rtl", {
    /**
     * @return RTL?
     */
    get: function get() {
      if (_utils_Type__WEBPACK_IMPORTED_MODULE_7__.hasValue(this._rtl)) {
        return this._rtl;
      } else if (this._topParent) {
        return this._topParent.rtl;
      }

      return false;
    },

    /**
     * An RTL (right-to-left) setting.
     *
     * RTL may affect alignment, text, and other visual properties.
     *
     * If you set this on a top-level chart object, it will be used for all
     * child elements, e.g. labels, unless they have their own `rtl` setting
     * set directly on them.
     *
     * @param value  `true` for to use RTL
     */
    set: function set(value) {
      value = _utils_Type__WEBPACK_IMPORTED_MODULE_7__.toBoolean(value);
      this._rtl = value;

      if (this.element) {
        this.alignSVGText();
      }
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Resets cached BBox.
   *
   * @ignore Exclude from docs
   */

  Label.prototype.resetBBox = function () {
    this._bbox = {
      x: 0,
      y: 0,
      width: 0,
      height: 0
    };
  };
  /**
   * Creates and returns an HTML line element (`<div>`).
   *
   * @ignore Exclude from docs
   * @param text  Text to add
   * @return `<div>` element reference
   */


  Label.prototype.getHTMLLineElement = function (text) {
    // Create the <div> element
    var div = document.createElement("div");
    div.innerHTML = text; // Set text alignment

    switch (this.textAlign) {
      case "middle":
        div.style.textAlign = "center";
        break;

      case "end":
        div.style.textAlign = "right";
        break;
    } // Disable or enable wrapping


    if (this.wrap) {
      div.style.wordWrap = "break-word";
    } else {
      div.style.whiteSpace = "nowrap";
    } // Don't let labels bleed out of the alotted area
    // Moved to `draw()` because setting "hidden" kills all measuring

    /*if (this.truncate) {
        div.style.overflow = "hidden";
    }*/
    // Set RTL-related styles


    if (this.rtl) {
      div.style.direction = "rtl"; //div.style.unicodeBidi = "bidi-override";
    } // Translate some of the SVG styles into CSS


    if (_utils_Type__WEBPACK_IMPORTED_MODULE_7__.hasValue(this.fill)) {
      div.style.color = this.fill.toString();
    }

    return div;
  };
  /**
   * Applies specific styles to text to make it not selectable, unless it is
   * explicitly set as `selectable`.
   *
   * @ignore Exclude from docs
   * @todo Set styles via AMElement
   */


  Label.prototype.setStyles = function () {
    var group = this.element;

    if (!this.selectable || this.draggable || this.resizable || this.swipeable) {
      group.addStyle({
        "webkitUserSelect": "none",
        "msUserSelect": "none"
      });
    } else if (this.selectable) {
      group.removeStyle("webkitUserSelect");
      group.removeStyle("msUserSelect");
    }
  };
  /**
   * Hides unused lines
   */


  Label.prototype.hideUnused = function (index) {
    this.initLineCache();
    var lines = this.getCache("lineInfo");

    if (lines.length >= index) {
      for (var i = index; i < lines.length; i++) {
        var line = lines[i];

        if (line && line.element) {
          line.element.attr({
            "display": "none"
          });
        }
      }
    }
  };

  Object.defineProperty(Label.prototype, "text", {
    /**
     * @return SVG text
     */
    get: function get() {
      return this.getPropertyValue("text");
    },

    /**
     * An SVG text.
     *
     * Please note that setting `html` will override this setting if browser
     * supports `foreignObject` in SGV, such as most modern browsers excluding
     * IEs.
     *
     * @param value  SVG Text
     */
    set: function set(value) {
      //this.setPropertyValue("html", undefined);
      this.setPropertyValue("text", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Label.prototype, "path", {
    /**
     * @return Path
     */
    get: function get() {
      return this.getPropertyValue("path");
    },

    /**
     * An SVG path string to position text along. If set, the text will follow
     * the curvature of the path.
     *
     * Location along the path can be set using `locationOnPath`.
     *
     * IMPORTANT: Only SVG text can be put on path. If you are using HTML text
     * this setting will be ignored.
     *
     * @since 4.1.2
     * @param  value  Path
     */
    set: function set(value) {
      if (this.setPropertyValue("path", value, true)) {
        if (this.pathElement) {
          this.pathElement.dispose();
        }

        if (this.textPathElement) {
          this.textPathElement.dispose();
        }

        this.pathElement = this.paper.add("path");
        this.pathElement.attr({
          "d": value
        });
        this.pathElement.attr({
          "id": "text-path-" + this.uid
        });

        this._disposers.push(this.pathElement);

        this.textPathElement = this.paper.addGroup("textPath");
        this.textPathElement.attrNS(_utils_DOM__WEBPACK_IMPORTED_MODULE_8__.XLINK, "xlink:href", "#text-path-" + this.uid); // TODO remove after https://bugzilla.mozilla.org/show_bug.cgi?id=455986 is fixed

        this.textPathElement.attr({
          "path": value
        });

        this._disposers.push(this.textPathElement);

        this.hardInvalidate();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Label.prototype, "locationOnPath", {
    /**
     * @return Relatvie location on path
     */
    get: function get() {
      return this.getPropertyValue("locationOnPath");
    },

    /**
     * Relative label location on `path`. Value range is from 0 (beginning)
     * to 1 (end).
     *
     * Works only if you set `path` setting to an SVG path.
     *
     * @since 4.1.2
     * @default 0
     * @param  value  Relatvie location on path
     */
    set: function set(value) {
      this.setPropertyValue("locationOnPath", value);

      if (this.textPathElement) {
        this.textPathElement.attr({
          "startOffset": value * 100 + "%"
        });
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Label.prototype, "baseLineRatio", {
    /**
     * @return Base line ratio
     */
    get: function get() {
      return this.getPropertyValue("baseLineRatio");
    },

    /**
     * A ratio to calculate text baseline. Ralative distance from the bottom of
     * the label.
     *
     * @since 4.4.2
     * @default -0.27
     * @param  value  Base line ratio
     */
    set: function set(value) {
      this.setPropertyValue("baseLineRatio", value);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Label.prototype, "wrap", {
    /**
     * @return Auto-wrap enabled or not
     */
    get: function get() {
      return this.getPropertyValue("wrap");
    },

    /**
     * Enables or disables autowrapping of text.
     *
     * @param value  Auto-wrapping enabled
     */
    set: function set(value) {
      this.resetBBox();
      this.setPropertyValue("wrap", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Label.prototype, "truncate", {
    /**
     * @return Truncate text?
     */
    get: function get() {
      return this.getPropertyValue("truncate");
    },

    /**
     * Indicates if text lines need to be truncated if they do not fit, using
     * configurable `ellipsis` string.
     *
     * `truncate` overrides `wrap` if both are set to `true`.
     *
     * NOTE: For HTML text, this setting **won't** trigger a parser and actual
     * line truncation with ellipsis. It will just hide everything that goes
     * outside the label.
     *
     * @param value  trincate text?
     */
    set: function set(value) {
      this.resetBBox();
      this.setPropertyValue("truncate", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Label.prototype, "fullWords", {
    /**
     * @return Truncate on full words?
     */
    get: function get() {
      return this.getPropertyValue("fullWords");
    },

    /**
     * If `truncate` is enabled, should Label try to break only on full words
     * (`true`), or whenever needed, including middle of the word. (`false`)
     *
     * @default true
     * @param value  Truncate on full words?
     */
    set: function set(value) {
      this.setPropertyValue("fullWords", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Label.prototype, "ellipsis", {
    /**
     * @return Ellipsis string
     */
    get: function get() {
      return this.getPropertyValue("ellipsis");
    },

    /**
     * Ellipsis character to use if `truncate` is enabled.
     *
     * @param value Ellipsis string
     * @default "..."
     */
    set: function set(value) {
      this.setPropertyValue("ellipsis", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Label.prototype, "selectable", {
    /**
     * @return Text selectable?
     */
    get: function get() {
      return this.getPropertyValue("selectable");
    },

    /**
     * Forces the text to be selectable. This setting will be ignored if the
     * object has some kind of interaction attached to it, such as it is
     * `draggable`, `swipeable`, `resizable`.
     *
     * @param value  Text selectable?
     * @default false
     */
    set: function set(value) {
      this.setPropertyValue("selectable", value, true);
      this.setStyles();
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Label.prototype, "textAlign", {
    /**
     * @return Alignment
     */
    get: function get() {
      return this.getPropertyValue("textAlign");
    },

    /**
     * Horizontal text alignment.
     *
     * Available choices:
     * * "start"
     * * "middle"
     * * "end"
     *
     * @param value  Alignment
     */
    set: function set(value) {
      this.setPropertyValue("textAlign", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Label.prototype, "textValign", {
    /**
     * @ignore Exclude from docs (not used)
     * @return Alignment
     * @deprecated
     */
    get: function get() {
      return this.getPropertyValue("textValign");
    },

    /**
     * Vertical text alignment.
     *
     * @ignore Exclude from docs (not used)
     * @param value  Alignment
     * @deprecated
     */
    set: function set(value) {
      this.setPropertyValue("textValign", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Label.prototype, "html", {
    /**
     * @return HTML content
     */
    get: function get() {
      return this.getPropertyValue("html");
    },

    /**
     * Raw HTML to be used as text.
     *
     * NOTE: HTML text is subject to browser support. It relies on browsers
     * supporting SVG `foreignObject` nodes. Some browsers (read IEs) do not
     * support it. On those browsers, the text will fall back to basic SVG text,
     * striping out all HTML markup and styling that goes with it.
     *
     * For more information about `foreignObject` and its browser compatibility
     * refer to [this page](https://developer.mozilla.org/en/docs/Web/SVG/Element/foreignObject#Browser_compatibility).
     *
     * @param value HTML text
     */
    set: function set(value) {
      this.setPropertyValue("html", value, true);

      if (!_utils_Type__WEBPACK_IMPORTED_MODULE_7__.hasValue(value)) {
        var group = this.element;
        group.removeChildrenByTag("foreignObject");
      }
    },
    enumerable: true,
    configurable: true
  });

  Label.prototype.setFill = function (value) {
    _super.prototype.setFill.call(this, value);

    if (this.html) {
      var group = this.element;
      var divs = group.node.getElementsByTagName("div");

      for (var i = 0; i < divs.length; i++) {
        var div = divs[i];

        if (_utils_Type__WEBPACK_IMPORTED_MODULE_7__.hasValue(this.fill)) {
          div.style.color = this.fill.toString();
        }
      }
    }
  };

  Object.defineProperty(Label.prototype, "hideOversized", {
    /**
     * @return Hide if text does not fit?
     */
    get: function get() {
      return this.getPropertyValue("hideOversized");
    },

    /**
     * Indicates whether the whole text should be hidden if it does not fit into
     * its allotted space.
     *
     * @param value  Hide if text does not fit?
     */
    set: function set(value) {
      this.setPropertyValue("hideOversized", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Label.prototype, "ignoreFormatting", {
    /**
     * @return Ignore formatting?
     */
    get: function get() {
      return this.getPropertyValue("ignoreFormatting");
    },

    /**
     * If set to `true` square-bracket formatting blocks will be treated as
     * regular text.
     *
     * @default false
     * @param value  Ignore formatting?
     */
    set: function set(value) {
      this.setPropertyValue("ignoreFormatting", value, true);
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Override `mesaureElement` so it does not get measure again, because
   * internal `_bbox` is being updated by measuring routines in Text itself.
   */

  Label.prototype.measureElement = function () {};
  /**
   * Returns information about a line element.
   *
   * @ignore Exclude from docs
   * @param index  Line index
   * @return Line info object
   */


  Label.prototype.getLineInfo = function (index) {
    this.initLineCache();
    var lines = this.getCache("lineInfo");
    return lines.length > index ? lines[index] : undefined;
  };
  /**
   * Adds a line to line info cache.
   *
   * @ignore Exclude from docs
   * @param line     Line info object
   * @param index    Insert at specified index
   */


  Label.prototype.addLineInfo = function (line, index) {
    this.initLineCache();
    this.getCache("lineInfo")[index] = line;
  };
  /**
   * Checks if line cache is initialized and initializes it.
   */


  Label.prototype.initLineCache = function () {
    if (!_utils_Type__WEBPACK_IMPORTED_MODULE_7__.hasValue(this.getCache("lineInfo"))) {
      this.setCache("lineInfo", [], 0);
    }
  };
  /**
   * Sets a [[DataItem]] to use for populating dynamic sections of the text.
   *
   * Check the description for [[Text]] class, for data binding.
   *
   * @param dataItem Data item
   */


  Label.prototype.setDataItem = function (dataItem) {
    if (this._sourceDataItemEvents) {
      this._sourceDataItemEvents.dispose();
    }

    if (dataItem) {
      this._sourceDataItemEvents = new _utils_Disposer__WEBPACK_IMPORTED_MODULE_3__.MultiDisposer([dataItem.events.on("valuechanged", this.invalidate, this, false), dataItem.events.on("workingvaluechanged", this.invalidate, this, false), dataItem.events.on("calculatedvaluechanged", this.invalidate, this, false), dataItem.events.on("propertychanged", this.invalidate, this, false)]);
    }

    _super.prototype.setDataItem.call(this, dataItem);
  };

  Object.defineProperty(Label.prototype, "availableWidth", {
    /**
     * Returns available horizontal space.
     *
     * @ignore Exclude from docs
     * @return Available width (px)
     */
    get: function get() {
      return _utils_Type__WEBPACK_IMPORTED_MODULE_7__.hasValue(this.maxWidth) ? this.maxWidth : this.pixelWidth;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Label.prototype, "availableHeight", {
    /**
     * Returns available vertical space.
     *
     * @return Available height (px)
     */
    get: function get() {
      return _utils_Type__WEBPACK_IMPORTED_MODULE_7__.hasValue(this.maxHeight) ? this.maxHeight : this.pixelHeight;
    },
    enumerable: true,
    configurable: true
  }); // temp, replacing textFormatter method

  Label.prototype.getSvgElement = function (text, style, parent) {
    var element = this.paper.add("tspan");
    element.textContent = text;

    if (style) {
      if (_Options__WEBPACK_IMPORTED_MODULE_10__.options.nonce && parent) {
        //element.node.setAttribute("nonce", "test123");
        var classid = "amcharts_element_style_" + btoa(style).replace(/[^\w]*/g, "");
        element.node.setAttribute("class", classid);
        var defs = document.createElementNS(_utils_DOM__WEBPACK_IMPORTED_MODULE_8__.SVGNS, "defs");
        parent.node.appendChild(defs);
        var e = document.createElement("style");
        e.type = "text/css";
        e.innerHTML = "." + classid + " { " + style + "}";
        e.setAttribute("nonce", _Options__WEBPACK_IMPORTED_MODULE_10__.options.nonce);
        defs.appendChild(e);
      } else {
        element.node.setAttribute("style", style);
      }
    }

    if (parent) {
      parent.add(element);
    }

    return element;
  };
  /**
   * Invalidates the whole element, including layout AND all its child
   * elements.
   */


  Label.prototype.deepInvalidate = function () {
    _super.prototype.deepInvalidate.call(this);

    this.hardInvalidate();
  };

  Object.defineProperty(Label.prototype, "readerTitle", {
    /**
     * @return Title
     */
    get: function get() {
      var title = this.getPropertyValue("readerTitle");

      if (!title) {
        title = this.populateString(_utils_Utils__WEBPACK_IMPORTED_MODULE_6__.plainText(_utils_Utils__WEBPACK_IMPORTED_MODULE_6__.isNotEmpty(this.html) ? this.html : this.text));
      } else if (this.dataItem) {
        title = this.populateString(title);
      }

      return title;
    },

    /**
     * Screen reader title of the element.
     *
     * @param value Title
     */
    set: function set(value) {
      value = _utils_Type__WEBPACK_IMPORTED_MODULE_7__.toText(value);

      if (this.setPropertyValue("readerTitle", value)) {
        this.applyAccessibility();
      }
    },
    enumerable: true,
    configurable: true
  });
  return Label;
}(_Container__WEBPACK_IMPORTED_MODULE_0__.Container);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses.Label = Label;
/**
 * Add default responsive rules
 */

/**
 * Hide labels added directly to chart, like titles if chart is short.
 */

_utils_Responsive__WEBPACK_IMPORTED_MODULE_9__.defaultRules.push({
  relevant: _utils_Responsive__WEBPACK_IMPORTED_MODULE_9__.ResponsiveBreakpoints.heightXS,
  state: function state(target, stateId) {
    if (target instanceof Label && target.parent && target.parent.isBaseSprite) {
      var state = target.states.create(stateId);
      state.properties.disabled = true;
      return state;
    }

    return null;
  }
});

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Line.js":
/*!**************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/elements/Line.js ***!
  \**************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Line": () => (/* binding */ Line)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Sprite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Sprite */ "./node_modules/@amcharts/amcharts4/.internal/core/Sprite.js");
/* harmony import */ var _utils_Color__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/Color */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Color.js");
/* harmony import */ var _rendering_fills_LinearGradient__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../rendering/fills/LinearGradient */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/LinearGradient.js");
/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _utils_Type__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/* harmony import */ var _utils_Math__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
/**
 * Line drawing functionality.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */







/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Draws a line.
 *
 * @see {@link ILineEvents} for a list of available events
 * @see {@link ILineAdapters} for a list of available Adapters
 */

var Line =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_6__.__extends)(Line, _super);
  /**
   * Constructor
   */


  function Line() {
    var _this = _super.call(this) || this;

    _this.className = "Line";
    _this.element = _this.paper.add("line");
    _this.fill = (0,_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)(); //"none";

    _this.x1 = 0;
    _this.y1 = 0;

    _this.applyTheme();

    return _this;
  }
  /**
   * Draws the line.
   *
   * @ignore Exclude from docs
   */


  Line.prototype.draw = function () {
    _super.prototype.draw.call(this);

    if (this.x1 == this.x2 || this.y1 == this.y2) {
      this.pixelPerfect = true;
    } else {
      this.pixelPerfect = false;
    }

    this.x1 = this.x1;
    this.x2 = this.x2;
    this.y1 = this.y1;
    this.y2 = this.y2;
  };

  Object.defineProperty(Line.prototype, "x1", {
    /**
     * @return X
     */
    get: function get() {
      return this.getPropertyValue("x1");
    },

    /**
     * X coordinate of first end.
     *
     * @param value X
     */
    set: function set(value) {
      if (!_utils_Type__WEBPACK_IMPORTED_MODULE_4__.isNumber(value)) {
        value = 0;
      }

      var delta = 0;

      if (this.pixelPerfect && this.stroke instanceof _rendering_fills_LinearGradient__WEBPACK_IMPORTED_MODULE_2__.LinearGradient) {
        delta = 0.00001;
      }

      this.setPropertyValue("x1", value, true);
      this.element.attr({
        "x1": value + delta
      });
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Line.prototype, "x2", {
    /**
     * @return X
     */
    get: function get() {
      var value = this.getPropertyValue("x2");

      if (!_utils_Type__WEBPACK_IMPORTED_MODULE_4__.isNumber(value)) {
        value = this.pixelWidth;
      }

      return value;
    },

    /**
     * X coordinate of second end.
     *
     * @param value X
     */
    set: function set(value) {
      if (!_utils_Type__WEBPACK_IMPORTED_MODULE_4__.isNumber(value)) {
        value = 0;
      }

      this.setPropertyValue("x2", value, true);
      this.element.attr({
        "x2": value
      });
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Line.prototype, "y1", {
    /**
     * @return Y
     */
    get: function get() {
      return this.getPropertyValue("y1");
    },

    /**
     * Y coordinate of first end.
     *
     * @param value Y
     */
    set: function set(value) {
      if (!_utils_Type__WEBPACK_IMPORTED_MODULE_4__.isNumber(value)) {
        value = 0;
      }

      var delta = 0;

      if (this.pixelPerfect && this.stroke instanceof _rendering_fills_LinearGradient__WEBPACK_IMPORTED_MODULE_2__.LinearGradient) {
        delta = 0.00001;
      }

      this.setPropertyValue("y1", value, true);
      this.element.attr({
        "y1": value + delta
      });
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Line.prototype, "y2", {
    /**
     * @return Y
     */
    get: function get() {
      var value = this.getPropertyValue("y2");

      if (!_utils_Type__WEBPACK_IMPORTED_MODULE_4__.isNumber(value)) {
        value = this.pixelHeight;
      }

      return value;
    },

    /**
     * Y coordinate of second end.
     *
     * @param value Y
     */
    set: function set(value) {
      if (!_utils_Type__WEBPACK_IMPORTED_MODULE_4__.isNumber(value)) {
        value = 0;
      }

      this.setPropertyValue("y2", value, true);
      this.element.attr({
        "y2": value
      });
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Converts relative position along the line (0-1) into pixel coordinates.
   *
   * @param position  Position (0-1)
   * @return Coordinates
   */

  Line.prototype.positionToPoint = function (position) {
    var point1 = {
      x: this.x1,
      y: this.y1
    };
    var point2 = {
      x: this.x2,
      y: this.y2
    };
    var point = _utils_Math__WEBPACK_IMPORTED_MODULE_5__.getMidPoint(point1, point2, position);
    var angle = _utils_Math__WEBPACK_IMPORTED_MODULE_5__.getAngle(point1, point2);
    return {
      x: point.x,
      y: point.y,
      angle: angle
    };
  };

  return Line;
}(_Sprite__WEBPACK_IMPORTED_MODULE_0__.Sprite);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_Registry__WEBPACK_IMPORTED_MODULE_3__.registry.registeredClasses.Line = Line;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Modal.js":
/*!***************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/elements/Modal.js ***!
  \***************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Modal": () => (/* binding */ Modal)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Popup__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Popup */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Popup.js");
/* harmony import */ var _utils_Adapter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/Adapter */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Adapter.js");
/**
 * Modal class is used to display information over chart area.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */



/**
 * Shows an HTML modal which covers window or a chart area.
 *
 * @see {@link https://www.amcharts.com/docs/v4/concepts/popups-and-modals/} For examples and docs on Popups and Modals.
 */

var Modal =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(Modal, _super);
  /**
   * Constructor
   */


  function Modal() {
    var _this = _super.call(this) || this;
    /**
     * Adapter.
     */


    _this.adapter = new _utils_Adapter__WEBPACK_IMPORTED_MODULE_1__.Adapter(_this);
    _this.className = "Modal";
    _this.showCurtain = true;
    _this.draggable = false;
    return _this;
  }

  return Modal;
}(_Popup__WEBPACK_IMPORTED_MODULE_0__.Popup);



/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/elements/PlayButton.js":
/*!********************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/elements/PlayButton.js ***!
  \********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "PlayButton": () => (/* binding */ PlayButton)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Button__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Button */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Button.js");
/* harmony import */ var _RoundedRectangle__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./RoundedRectangle */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/RoundedRectangle.js");
/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/utils/InterfaceColorSet */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/InterfaceColorSet.js");
/* harmony import */ var _Triangle__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Triangle */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Triangle.js");
/* harmony import */ var _core_utils_Type__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../core/utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/**
 * Play button functionality.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */







/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Creates a zoom out button.
 *
 * @see {@link IPlayButtonEvents} for a list of available events
 * @see {@link IPlayButtonAdapters} for a list of available Adapters
 */

var PlayButton =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_6__.__extends)(PlayButton, _super);
  /**
   * Constructor
   */


  function PlayButton() {
    var _this = // Init
    _super.call(this) || this;

    _this.className = "PlayButton";

    _this.padding(12, 12, 12, 12);

    _this.showSystemTooltip = true;
    var interfaceColors = new _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_3__.InterfaceColorSet();
    var background = _this.background;
    background.cornerRadius(25, 25, 25, 25);
    background.fill = interfaceColors.getFor("primaryButton");
    background.stroke = interfaceColors.getFor("primaryButtonStroke");
    background.strokeOpacity = 0;
    background.states.getKey("hover").properties.fill = interfaceColors.getFor("primaryButtonHover");
    background.states.getKey("down").properties.fill = interfaceColors.getFor("primaryButtonActive"); // Create a play icon

    var playIcon = new _Triangle__WEBPACK_IMPORTED_MODULE_4__.Triangle();
    playIcon.direction = "right";
    playIcon.width = 9;
    playIcon.height = 11;
    playIcon.marginLeft = 1;
    playIcon.marginRight = 1;
    playIcon.horizontalCenter = "middle";
    playIcon.verticalCenter = "middle";
    playIcon.stroke = interfaceColors.getFor("primaryButtonText");
    playIcon.fill = playIcon.stroke;
    _this.icon = playIcon; // Create a play icon

    var stopIcon = new _RoundedRectangle__WEBPACK_IMPORTED_MODULE_1__.RoundedRectangle();
    stopIcon.width = 11;
    stopIcon.height = 11;
    stopIcon.horizontalCenter = "middle";
    stopIcon.verticalCenter = "middle";
    stopIcon.cornerRadius(0, 0, 0, 0);
    stopIcon.stroke = interfaceColors.getFor("primaryButtonText");
    stopIcon.fill = playIcon.stroke;
    _this.togglable = true;

    var activeState = _this.states.create("active");

    activeState.transitionDuration = 0;
    activeState.properties.icon = stopIcon;
    _this.defaultState.transitionDuration = 0; // Apply theme

    _this.applyTheme();

    return _this;
  }
  /**
   * Sets defaults that instantiate some objects that rely on parent, so they
   * cannot be set in constructor.
   */


  PlayButton.prototype.applyInternalDefaults = function () {
    _super.prototype.applyInternalDefaults.call(this);

    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_5__.hasValue(this.readerTitle)) {
      this.readerTitle = this.language.translate("Play");
    }
  };

  return PlayButton;
}(_Button__WEBPACK_IMPORTED_MODULE_0__.Button);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_Registry__WEBPACK_IMPORTED_MODULE_2__.registry.registeredClasses.PlayButton = PlayButton;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/elements/PointedRectangle.js":
/*!**************************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/elements/PointedRectangle.js ***!
  \**************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "PointedRectangle": () => (/* binding */ PointedRectangle)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _PointedShape__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./PointedShape */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/PointedShape.js");
/* harmony import */ var _utils_Math__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
/**
 * Pointed rectangle module.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */



/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Draws a rectangle with a pointer.
 *
 * @see {@link IPointedRectangleEvents} for a list of available events
 * @see {@link IPointedRectangleAdapters} for a list of available Adapters
 */

var PointedRectangle =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(PointedRectangle, _super);
  /**
   * Constructor
   */


  function PointedRectangle() {
    var _this = _super.call(this) || this;

    _this.className = "PointedRectangle";
    _this.element = _this.paper.add("path");
    _this.cornerRadius = 6;

    _this.applyTheme();

    return _this;
  }
  /**
   * Draws the element.
   *
   * @ignore Exclude from docs
   */


  PointedRectangle.prototype.draw = function () {
    _super.prototype.draw.call(this);

    var cr = this.cornerRadius;
    var w = this.innerWidth;
    var h = this.innerHeight;

    if (w > 0 && h > 0) {
      var x = this.pointerX;
      var y = this.pointerY;
      var bwh = this.pointerBaseWidth / 2;
      var maxcr = _utils_Math__WEBPACK_IMPORTED_MODULE_1__.min(w / 2, h / 2);
      var crtl = _utils_Math__WEBPACK_IMPORTED_MODULE_1__.fitToRange(cr, 0, maxcr);
      var crtr = _utils_Math__WEBPACK_IMPORTED_MODULE_1__.fitToRange(cr, 0, maxcr);
      var crbr = _utils_Math__WEBPACK_IMPORTED_MODULE_1__.fitToRange(cr, 0, maxcr);
      var crbl = _utils_Math__WEBPACK_IMPORTED_MODULE_1__.fitToRange(cr, 0, maxcr); // corner coordinates
      // top left

      var xtl = 0;
      var ytl = 0; // top right

      var xtr = w;
      var ytr = 0; // bottom right

      var xbr = w;
      var ybr = h; // bottom left

      var xbl = 0;
      var ybl = h;
      var lineT = void 0;
      var lineR = void 0;
      var lineB = void 0;
      var lineL = void 0; // find stem base side: http://$math.stackexchange.com/questions/274712/calculate-on-which-side-of-straign-line-is-dot-located
      // d=(x−x1)(y2−y1)−(y−y1)(x2−x1)

      var d1 = (x - xtl) * (ybr - ytl) - (y - ytl) * (xbr - xtl);
      var d2 = (x - xbl) * (ytr - ybl) - (y - ybl) * (xtr - xbl); // top

      if (d1 > 0 && d2 > 0) {
        var stemX = _utils_Math__WEBPACK_IMPORTED_MODULE_1__.fitToRange(x, crtl + bwh, w - bwh - crtr);
        y = _utils_Math__WEBPACK_IMPORTED_MODULE_1__.fitToRange(y, -Infinity, 0);
        lineT = "M" + crtl + ",0 L" + (stemX - bwh) + ",0 L" + x + "," + y + " L" + (stemX + bwh) + ",0 L" + (w - crtr) + ",0";
      } else {
        lineT = "M" + crtl + ",0 L" + (w - crtr) + ",0";
      } // bottom


      if (d1 < 0 && d2 < 0) {
        var stemX = _utils_Math__WEBPACK_IMPORTED_MODULE_1__.fitToRange(x, crbl + bwh, w - bwh - crbr);
        y = _utils_Math__WEBPACK_IMPORTED_MODULE_1__.fitToRange(y, h, Infinity);
        lineB = " L" + (w - crbr) + "," + h + " L" + (stemX + bwh) + "," + h + " L" + x + "," + y + " L" + (stemX - bwh) + "," + h + " L" + crbl + "," + h;
      } else {
        lineB = " L" + crbl + "," + h;
      } // left


      if (d1 < 0 && d2 > 0) {
        var stemY = _utils_Math__WEBPACK_IMPORTED_MODULE_1__.fitToRange(y, crtl + bwh, h - crbl - bwh);
        x = _utils_Math__WEBPACK_IMPORTED_MODULE_1__.fitToRange(x, -Infinity, 0);
        lineL = " L0," + (h - crbl) + " L0," + (stemY + bwh) + " L" + x + "," + y + " L0," + (stemY - bwh) + " L0," + crtl;
      } else {
        lineL = " L0," + crtl;
      } // right


      if (d1 > 0 && d2 < 0) {
        var stemY = _utils_Math__WEBPACK_IMPORTED_MODULE_1__.fitToRange(y, crtr + bwh, h - bwh - crbr);
        x = _utils_Math__WEBPACK_IMPORTED_MODULE_1__.fitToRange(x, w, Infinity);
        lineR = " L" + w + "," + crtr + " L" + w + "," + (stemY - bwh) + " L" + x + "," + y + " L" + w + "," + (stemY + bwh) + " L" + w + "," + (h - crbr);
      } else {
        lineR = " L" + w + "," + (h - crbr);
      }

      var arcTR = " a" + crtr + "," + crtr + " 0 0 1 " + crtr + "," + crtr;
      var arcBR = " a" + crbr + "," + crbr + " 0 0 1 -" + crbr + "," + crbr;
      var arcBL = " a" + crbl + "," + crbl + " 0 0 1 -" + crbl + ",-" + crbl;
      var arcTL = " a" + crtl + "," + crtl + " 0 0 1 " + crtl + ",-" + crtl;
      this.path = lineT + arcTR + lineR + arcBR + lineB + arcBL + lineL + arcTL;
    }
  };

  Object.defineProperty(PointedRectangle.prototype, "cornerRadius", {
    /**
     * @return Corner radius (px)
     */
    get: function get() {
      return this.getPropertyValue("cornerRadius");
    },

    /**
     * Radius of rectangle's border in pixels.
     *
     * @default 0
     * @param value  Corner radius (px)
     */
    set: function set(value) {
      this.setPropertyValue("cornerRadius", value, true);
    },
    enumerable: true,
    configurable: true
  });
  return PointedRectangle;
}(_PointedShape__WEBPACK_IMPORTED_MODULE_0__.PointedShape);



/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/elements/PointedShape.js":
/*!**********************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/elements/PointedShape.js ***!
  \**********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "PointedShape": () => (/* binding */ PointedShape)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Sprite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Sprite */ "./node_modules/@amcharts/amcharts4/.internal/core/Sprite.js");
/* harmony import */ var _utils_Type__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/**
 * Pointed shape module.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */



/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Draws a shape with a pointer.
 *
 * @see {@link IPointedShapeEvents} for a list of available events
 * @see {@link IPointedShapeAdapters} for a list of available Adapters
 */

var PointedShape =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(PointedShape, _super);
  /**
   * Constructor
   */


  function PointedShape() {
    var _this = _super.call(this) || this;

    _this.className = "PointedShape";
    _this.pointerBaseWidth = 15;
    _this.pointerLength = 10;
    _this.pointerY = 0;
    _this.pointerX = 0;

    _this.applyTheme();

    return _this;
  }
  /**
   * Draws the element.
   *
   * @ignore Exclude from docs
   */


  PointedShape.prototype.draw = function () {
    _super.prototype.draw.call(this);

    if (!_utils_Type__WEBPACK_IMPORTED_MODULE_1__.isNumber(this.pointerX)) {
      this.pointerX = this.pixelWidth / 2;
    }

    if (!_utils_Type__WEBPACK_IMPORTED_MODULE_1__.isNumber(this.pointerY)) {
      this.pointerY = this.pixelHeight + 10;
    }
  };

  Object.defineProperty(PointedShape.prototype, "pointerBaseWidth", {
    /**
     * @return Width (px)
     */
    get: function get() {
      return this.getPropertyValue("pointerBaseWidth");
    },

    /**
     * A width of the pinter's (stem's) thick end (base) in pixels.
     *
     * @default 15
     * @param value  Width (px)
     */
    set: function set(value) {
      this.setPropertyValue("pointerBaseWidth", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(PointedShape.prototype, "pointerLength", {
    /**
     * @return Length (px)
     */
    get: function get() {
      return this.getPropertyValue("pointerLength");
    },

    /**
     * A length of the pinter (stem) in pixels.
     *
     * @default 10
     * @param value  Length (px)
     */
    set: function set(value) {
      this.setPropertyValue("pointerLength", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(PointedShape.prototype, "pointerX", {
    /**
     * @return X
     */
    get: function get() {
      return this.getPropertyValue("pointerX");
    },

    /**
     * X coordinate the shape is pointing to.
     *
     * @param value  X
     */
    set: function set(value) {
      this.setPropertyValue("pointerX", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(PointedShape.prototype, "pointerY", {
    /**
     * @return Y
     */
    get: function get() {
      return this.getPropertyValue("pointerY");
    },

    /**
     * Y coordinate the shape is pointing to.
     *
     * @param value  Y
     */
    set: function set(value) {
      this.setPropertyValue("pointerY", value, true);
    },
    enumerable: true,
    configurable: true
  });
  return PointedShape;
}(_Sprite__WEBPACK_IMPORTED_MODULE_0__.Sprite);



/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Polyarc.js":
/*!*****************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/elements/Polyarc.js ***!
  \*****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Polyarc": () => (/* binding */ Polyarc)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Polyline__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Polyline */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Polyline.js");
/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
/* harmony import */ var _core_rendering_Path__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/rendering/Path */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Path.js");
/**
 * Module for a multi-part arched line.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */





/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Draws a multi-part arched line.
 *
 * @see {@link IPolyarcEvents} for a list of available events
 * @see {@link IPolyarcAdapters} for a list of available Adapters
 */

var Polyarc =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_4__.__extends)(Polyarc, _super);
  /**
   * Constructor
   */


  function Polyarc() {
    var _this = _super.call(this) || this;

    _this.className = "Polyarc";
    _this.controlPointDistance = 0.5;
    _this.controlPointPosition = 0.5;

    _this.applyTheme();

    return _this;
  }
  /**
   * Creats and adds an SVG path for the arc.
   *
   * @ignore Exclude from docs
   */


  Polyarc.prototype.makePath = function () {
    this._distance = 0;
    var segments = this.segments;

    if (segments && segments.length > 0) {
      var path = "";
      this._realSegments = [];

      for (var i = 0, len = segments.length; i < len; i++) {
        var points = segments[i];
        var realPoints = [];

        this._realSegments.push(realPoints);

        if (points.length > 0) {
          path += _core_rendering_Path__WEBPACK_IMPORTED_MODULE_3__.moveTo(points[0]);

          for (var p = 1; p < points.length; p++) {
            var pointA = points[p - 1];
            var pointB = points[p];
            var distanceAB = _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.getDistance(pointB, pointA);
            var cpDistance = distanceAB * this.controlPointDistance;
            var controlPointPosition = this.controlPointPosition;
            var angle = -_core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.getAngle(pointA, pointB);
            var cpx = pointA.x + (pointB.x - pointA.x) * controlPointPosition * 0.5 - cpDistance * _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.sin(angle);
            var cpy = pointA.y + (pointB.y - pointA.y) * controlPointPosition * 0.5 - cpDistance * _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.cos(angle);
            var controlPoint1 = {
              x: cpx,
              y: cpy
            };
            var cpx2 = pointA.x + (pointB.x - pointA.x) * controlPointPosition * 1.5 - cpDistance * _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.sin(angle);
            var cpy2 = pointA.y + (pointB.y - pointA.y) * controlPointPosition * 1.5 - cpDistance * _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.cos(angle);
            var controlPoint2 = {
              x: cpx2,
              y: cpy2
            };
            path += _core_rendering_Path__WEBPACK_IMPORTED_MODULE_3__.cubicCurveTo(pointB, controlPoint1, controlPoint2); // we add a lot of points in order to get the position/angle later

            var stepCount = Math.ceil(distanceAB);
            var prevPoint = pointA;

            if (stepCount > 0) {
              for (var i_1 = 0; i_1 <= stepCount; i_1++) {
                var point = _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.getPointOnCubicCurve(pointA, pointB, controlPoint1, controlPoint2, i_1 / stepCount);
                realPoints.push(point);
                this._distance += _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.getDistance(prevPoint, point);
                prevPoint = point;
              }
            } else {
              realPoints.push(pointA);
            }
          }
        }
      }

      this.path = path;
    }
  };

  Object.defineProperty(Polyarc.prototype, "controlPointPosition", {
    /**
     * @return Position (0-1)
     */
    get: function get() {
      return this.getPropertyValue("controlPointPosition");
    },

    /**
     * Relative position along the line the control point is. (0-1)
     *
     * @default 0.5
     * @param value  Position (0-1)
     */
    set: function set(value) {
      this.setPropertyValue("controlPointPosition", value);
      this.makePath();
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Polyarc.prototype, "controlPointDistance", {
    /**
     * @return Distance (0-1)
     */
    get: function get() {
      return this.getPropertyValue("controlPointDistance");
    },

    /**
     * Relative distance of the control point. (0-1)
     *
     * Default is half the length of the line. (0.5)
     *
     * @default 0.5
     * @param value  Distance (0-1)
     */
    set: function set(value) {
      this.setPropertyValue("controlPointDistance", value);
      this.makePath();
    },
    enumerable: true,
    configurable: true
  });
  return Polyarc;
}(_Polyline__WEBPACK_IMPORTED_MODULE_0__.Polyline);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses.Polyarc = Polyarc;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Polygon.js":
/*!*****************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/elements/Polygon.js ***!
  \*****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Polygon": () => (/* binding */ Polygon)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Sprite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Sprite */ "./node_modules/@amcharts/amcharts4/.internal/core/Sprite.js");
/* harmony import */ var _utils_Morpher__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/Morpher */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Morpher.js");
/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _rendering_Path__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../rendering/Path */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Path.js");
/* harmony import */ var _utils_Type__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/**
 * Polygon module.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */






/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Draws a polygon.
 *
 * @see {@link IPolygonEvents} for a list of available events
 * @see {@link IPolygonAdapters} for a list of available Adapters
 */

var Polygon =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__extends)(Polygon, _super);
  /**
   * Constructor
   */


  function Polygon() {
    var _this = _super.call(this) || this;

    _this.className = "Polygon";
    _this.element = _this.paper.add("path");
    _this.shapeRendering = "auto";
    _this._currentPoints = [];

    _this.applyTheme();

    return _this;
  }

  Object.defineProperty(Polygon.prototype, "points", {
    /**
     * @return Polygon points
     */
    get: function get() {
      var points = this.getPropertyValue("points");
      var path = this.path;

      if (path && (!points || points.length == 0)) {
        var valueStr = path.slice(1, path.length - 1);
        var segments = valueStr.split("ZM");

        for (var s = 0; s < segments.length; s++) {
          var segment = segments[s];

          if (segment.length > 0) {
            var areaHole = segment.split("M");
            var areaArr = areaHole[0];
            var holeArr = areaHole[1];

            if (areaArr && areaArr.length > 0) {
              var pointsArr = areaArr.split("L");

              if (pointsArr.length > 0) {
                var area = [];
                var areaAndHole = [area];
                points.push(areaAndHole);

                for (var p = 0; p < pointsArr.length; p++) {
                  var coords = pointsArr[p].split(",");
                  area.push({
                    x: +coords[0],
                    y: +coords[1]
                  });
                }

                if (holeArr && holeArr.length > 0) {
                  var pointsArr_1 = holeArr.split("L");

                  if (pointsArr_1.length > 0) {
                    var hole = [];
                    areaAndHole.push(hole);

                    for (var p = pointsArr_1.length - 1; p >= 0; p--) {
                      var coords = pointsArr_1[p].split(",");
                      hole.push({
                        x: +coords[0],
                        y: +coords[1]
                      });
                    }
                  }
                }
              }
            }
          }
        }

        this.setPropertyValue("points", points);
        this._currentPoints = points;
      }

      return points;
    },

    /**
     * An array of X/Y coordinates for each elbow of the polygon.
     *
     * @todo Example
     * @param points  Polygon points
     */
    set: function set(points) {
      this.setPropertyValue("points", points, true);
      this._currentPoints = points;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Polygon.prototype, "currentPoints", {
    /**
     * @return Polygon points
     */
    get: function get() {
      if ((!this._currentPoints || this._currentPoints.length == 0) && this.path) {
        this._currentPoints = this.points;
      }

      return this._currentPoints;
    },

    /**
     * Current points. Used when morphing the element, so that original `points`
     * are not overwritten.
     *
     * @param points  Polygon points
     */
    set: function set(points) {
      if (this._currentPoints != points) {
        this._currentPoints = points;
        this.draw();
      }
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Draws the element.
   *
   * @ignore Exclude from docs
   */

  Polygon.prototype.draw = function () {
    var path = "";
    var points = this._currentPoints;
    var left;
    var right;
    var top;
    var bottom;

    if (points.length > 0) {
      // separate areas
      for (var i = 0, len = points.length; i < len; i++) {
        // surface
        var surface = points[i][0];
        var hole = points[i][1];

        if (surface && surface.length > 0) {
          var point = surface[0];
          path += _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.moveTo(point);

          for (var s = 0; s < surface.length; s++) {
            point = surface[s];
            path += _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.lineTo(point);

            if (!_utils_Type__WEBPACK_IMPORTED_MODULE_4__.isNumber(right) || right < point.x) {
              right = point.x;
            }

            if (!_utils_Type__WEBPACK_IMPORTED_MODULE_4__.isNumber(left) || left > point.x) {
              left = point.x;
            }

            if (!_utils_Type__WEBPACK_IMPORTED_MODULE_4__.isNumber(top) || top > point.y) {
              top = point.y;
            }

            if (!_utils_Type__WEBPACK_IMPORTED_MODULE_4__.isNumber(bottom) || bottom < point.y) {
              bottom = point.y;
            }
          }
        } // hole


        if (hole && hole.length > 0) {
          var point = hole[0];
          path += _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.moveTo(point);

          for (var h = 0, hlen = hole.length; h < hlen; h++) {
            point = hole[h];
            path += _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.lineTo(point);
          }
        }
      }

      if (path) {
        path += _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.closePath();
      }

      this.bbox.x = left;
      this.bbox.y = top;
      this.bbox.width = right - left;
      this.bbox.height = bottom - top;

      _super.prototype.setPath.call(this, path);
    }
  };
  /**
   * @ignore
   */


  Polygon.prototype.setPath = function (value) {
    if (_super.prototype.setPath.call(this, value)) {
      this.points = [];
      this._bbox = this.group.getBBox();
      return true;
    }

    return false;
  };
  /**
   * Measures element
   */


  Polygon.prototype.measureElement = function () {// Overriding to avoid extra measurement.
  };

  Object.defineProperty(Polygon.prototype, "centerPoint", {
    /**
     * A calculated center point for the shape.
     *
     * @readonly
     * @return Center
     */
    get: function get() {
      return {
        x: this.bbox.x + this.bbox.width / 2,
        y: this.bbox.y + this.bbox.height / 2
      };
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Polygon.prototype, "morpher", {
    /**
     * A [[Morpher]] instance that is used to morph polygon into some other
     * shape.
     *
     * @readonly
     * @return Morpher instance
     */
    get: function get() {
      if (!this._morpher) {
        this._morpher = new _utils_Morpher__WEBPACK_IMPORTED_MODULE_1__.Morpher(this);

        this._disposers.push(this._morpher);
      }

      return this._morpher;
    },
    enumerable: true,
    configurable: true
  });
  return Polygon;
}(_Sprite__WEBPACK_IMPORTED_MODULE_0__.Sprite);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_Registry__WEBPACK_IMPORTED_MODULE_2__.registry.registeredClasses.Polygon = Polygon;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Polyline.js":
/*!******************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/elements/Polyline.js ***!
  \******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Polyline": () => (/* binding */ Polyline)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Sprite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Sprite */ "./node_modules/@amcharts/amcharts4/.internal/core/Sprite.js");
/* harmony import */ var _utils_Color__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/Color */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Color.js");
/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _rendering_Path__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../rendering/Path */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Path.js");
/* harmony import */ var _utils_Math__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
/**
 * Polyline module
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */






/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Draws a polyline.
 *
 * @see {@link IPolylineEvents} for a list of available events
 * @see {@link IPolylineAdapters} for a list of available Adapters
 */

var Polyline =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__extends)(Polyline, _super);
  /**
   * Constructor
   */


  function Polyline() {
    var _this = _super.call(this) || this;
    /**
     * [_distance description]
     *
     * @todo Description
     */


    _this._distance = 0;
    _this.className = "Polyline";
    _this.element = _this.paper.add("path");
    _this.shapeRendering = "auto";
    _this.fill = (0,_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)();
    _this.strokeOpacity = 1;

    _this.applyTheme();

    return _this;
  }
  /**
   * Creats and adds an SVG path for the arc.
   *
   * @ignore Exclude from docs
   */


  Polyline.prototype.makePath = function () {
    this._distance = 0;
    var segments = this.segments;

    if (segments && segments.length > 0) {
      var path = "";

      for (var i = 0, len = segments.length; i < len; i++) {
        var points = segments[i];

        if (points.length > 0) {
          path += _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.moveTo(points[0]);

          for (var p = 1; p < points.length; p++) {
            var point = points[p];
            path += _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.lineTo(point);
            this._distance += _utils_Math__WEBPACK_IMPORTED_MODULE_4__.getDistance(points[p - 1], point);
          }
        }
      }

      this.path = path;
    }

    this._realSegments = segments;
  };

  Object.defineProperty(Polyline.prototype, "segments", {
    /**
     * @return Segments
     */
    get: function get() {
      return this.getPropertyValue("segments");
    },

    /**
     * A list of segment coordinates for the multi-part line.
     *
     * @todo Example
     * @param segments  Segments
     */
    set: function set(segments) {
      this.setPropertyValue("segments", segments);
      this.makePath();
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Polyline.prototype, "distance", {
    /**
     * [distance description]
     *
     * @todo Description
     * @return [description]
     */
    get: function get() {
      return this._distance;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Converts relative position along the line (0-1) into pixel coordinates.
   *
   * @param position  Position (0-1)
   * @return Coordinates
   */

  Polyline.prototype.positionToPoint = function (position) {
    var deltaAngle = 0;

    if (position < 0) {
      position = Math.abs(position);
      deltaAngle = 180;
    }

    var segments = this._realSegments;

    if (segments) {
      var totalDistance = this.distance;
      var currentDistance = 0;
      var distanceAB = void 0;
      var positionA = 0;
      var positionB = 0;
      var pointA = void 0;
      var pointB = void 0;

      for (var s = 0; s < segments.length; s++) {
        var points = segments[s];

        if (points.length > 1) {
          for (var p = 1; p < points.length; p++) {
            pointA = points[p - 1];
            pointB = points[p];
            positionA = currentDistance / totalDistance;
            distanceAB = _utils_Math__WEBPACK_IMPORTED_MODULE_4__.getDistance(pointA, pointB);
            currentDistance += distanceAB;
            positionB = currentDistance / totalDistance;

            if (positionA <= position && positionB > position) {
              s = segments.length;
              break;
            }
          }
        } else if (points.length == 1) {
          pointA = points[0];
          pointB = points[0];
          positionA = 0;
          positionB = 1;
        }
      }

      if (pointA && pointB) {
        var positionAB = (position - positionA) / (positionB - positionA);
        var midPoint = _utils_Math__WEBPACK_IMPORTED_MODULE_4__.getMidPoint(pointA, pointB, positionAB);
        return {
          x: midPoint.x,
          y: midPoint.y,
          angle: deltaAngle + _utils_Math__WEBPACK_IMPORTED_MODULE_4__.getAngle(pointA, pointB)
        };
      }
    }

    return {
      x: 0,
      y: 0,
      angle: 0
    };
  };

  Object.defineProperty(Polyline.prototype, "realSegments", {
    /**
     * @ignore
     */
    get: function get() {
      return this._realSegments;
    },
    enumerable: true,
    configurable: true
  });
  return Polyline;
}(_Sprite__WEBPACK_IMPORTED_MODULE_0__.Sprite);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_Registry__WEBPACK_IMPORTED_MODULE_2__.registry.registeredClasses.Polyline = Polyline;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Polyspline.js":
/*!********************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/elements/Polyspline.js ***!
  \********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Polyspline": () => (/* binding */ Polyspline)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Polyline__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Polyline */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Polyline.js");
/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
/* harmony import */ var _core_utils_Type__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/* harmony import */ var _core_rendering_Path__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../core/rendering/Path */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Path.js");
/**
 * Polyspline (smoothed line) module.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */






/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Draws a polysline. (smoothed multi-sigment line)
 *
 * @see {@link IPolysplineEvents} for a list of available events
 * @see {@link IPolysplineAdapters} for a list of available Adapters
 */

var Polyspline =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__extends)(Polyspline, _super);
  /**
   * Constructor
   */


  function Polyspline() {
    var _this = _super.call(this) || this;

    _this.className = "Polyspline";
    _this.tensionX = 0.5;
    _this.tensionY = 0.5;

    _this.applyTheme();

    return _this;
  }
  /**
   * Creats and adds an SVG path for the arc.
   *
   * @ignore Exclude from docs
   */


  Polyspline.prototype.makePath = function () {
    this._distance = 0;
    var segments = this.segments;
    var tensionX = this.tensionX;
    var tensionY = this.tensionY;
    this.allPoints = [];

    if (segments && segments.length > 0) {
      var path = "";
      this._realSegments = [];

      for (var i = 0, len = segments.length; i < len; i++) {
        var points = segments[i];
        var realPoints = [];

        this._realSegments.push(realPoints);

        if (points.length > 0) {
          var first = points[0];
          var last = points[points.length - 1];
          var closed_1 = false;

          if (_core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.round(first.x, 3) == _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.round(last.x) && _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.round(first.y) == _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.round(last.y)) {
            closed_1 = true;
          }

          path += _core_rendering_Path__WEBPACK_IMPORTED_MODULE_4__.moveTo(points[0]);

          for (var p = 0; p < points.length - 1; p++) {
            var p0 = points[p - 1];
            var p1 = points[p];
            var p2 = points[p + 1];
            var p3 = points[p + 2];

            if (p === 0) {
              p0 = points[p];
            } else if (p == points.length - 2) {
              p3 = points[p + 1];
            }

            if (!p3) {
              p3 = p2;
            }

            if (p === 0) {
              if (closed_1) {
                p0 = points[points.length - 2];
              } else {
                p0 = points[i];
              }
            } else if (p == points.length - 2) {
              if (closed_1) {
                p3 = points[1];
              } else {
                p3 = points[p + 1];
              }
            }

            var controlPointA = _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.getCubicControlPointA(p0, p1, p2, p3, tensionX, tensionY);
            var controlPointB = _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.getCubicControlPointB(p0, p1, p2, p3, tensionX, tensionY);
            path += _core_rendering_Path__WEBPACK_IMPORTED_MODULE_4__.cubicCurveTo(p2, controlPointA, controlPointB); // now split to small segments so that we could have positionToPoint later

            var stepCount = Math.ceil(_core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.getCubicCurveDistance(p1, p2, controlPointA, controlPointB, 20)) * 1.2;
            var prevPoint = p1;

            if (stepCount > 0) {
              // not good for curved charts
              //this.allPoints[0] = { x: points[0].x, y: points[0].y, angle: $math.getAngle(points[0], points[1]) };
              //realPoints.push(this.allPoints[0]);
              for (var s = 0; s <= stepCount; s++) {
                var point = _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.getPointOnCubicCurve(p1, p2, controlPointA, controlPointB, s / stepCount);

                if (point.x == prevPoint.x && point.y == prevPoint.y) {
                  continue;
                }

                realPoints.push(point);
                var angle = _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.round(_core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.getAngle(prevPoint, point), 5); //this.allPoints.push({ x: point.x, y: point.y, angle: angle });

                this._distance += _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.getDistance(prevPoint, point);
                this.allPoints[Math.floor(this._distance)] = {
                  x: point.x,
                  y: point.y,
                  angle: angle
                };
                prevPoint = point;
              }
            } else {
              realPoints.push(p0);
            }
          }
        }

        var allPoints = this.allPoints;

        if (allPoints.length > 1) {
          for (var i_1 = 0; i_1 < allPoints.length; i_1++) {
            if (!allPoints[i_1]) {
              if (i_1 > 1) {
                allPoints[i_1] = allPoints[i_1 - 1];
              } else {
                for (var k = 1; k < allPoints.length; k++) {
                  if (allPoints[k]) {
                    allPoints[i_1] = allPoints[k];
                    break;
                  }
                }
              }
            }
          }
        }
      }

      this.path = path;
    }
  };
  /**
   * Returns an index of the point that is closest to specified coordinates.
   *
   * @param   point  Reference point
   * @return         Index
   */


  Polyspline.prototype.getClosestPointIndex = function (point) {
    var points = this.allPoints;
    var index;
    var closest = Infinity;

    if (points.length > 1) {
      for (var p = 1; p < points.length; p++) {
        var distance = _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.getDistance(point, points[p]);

        if (distance < closest) {
          index = p;
          closest = distance;
        }
      }
    }

    return index;
  };

  Object.defineProperty(Polyspline.prototype, "tensionX", {
    /**
     * @return Tension
     */
    get: function get() {
      return this.getPropertyValue("tensionX");
    },

    /**
     * Horizontal tension for the spline.
     *
     * Used by the line smoothing algorithm.
     *
     * @default 0.5
     * @param value  Tension
     */
    set: function set(value) {
      this.setPropertyValue("tensionX", value);
      this.makePath();
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Polyspline.prototype, "tensionY", {
    /**
     * @return Tension
     */
    get: function get() {
      return this.getPropertyValue("tensionY");
    },

    /**
     * Vertical tension for the spline.
     *
     * Used by the line smoothing algorithm.
     *
     * @default 0.5
     * @param value  Tensions
     */
    set: function set(value) {
      this.setPropertyValue("tensionY", value, true);
      this.makePath();
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Converts relative position along the line (0-1) into pixel coordinates.
   *
   * @param position  Position (0-1)
   * @return Coordinates
   */

  Polyspline.prototype.positionToPoint = function (position, extend) {
    var deltaAngle = 0;
    var allPoints = this.allPoints;
    var len = allPoints.length;

    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_3__.isNumber(position)) {
      position = 0;
    }

    if (len > 1) {
      if (extend && len > 3) {
        if (position < 0) {
          if (position < -0.01) {
            position = -0.01;
          }

          var f0 = allPoints[0];
          var f1 = allPoints[1];
          var x = f0.x - (f0.x - f1.x) * len * position;
          var y = f0.y - (f0.y - f1.y) * len * position;
          return {
            x: x,
            y: y,
            angle: _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.getAngle(f0, f1)
          };
        } else if (position > 1) {
          if (position > 1.01) {
            position = 1.01;
          }

          var f0 = allPoints[allPoints.length - 2];
          var f1 = allPoints[allPoints.length - 3];
          var x = f0.x + (f0.x - f1.x) * len * (position - 1);
          var y = f0.y + (f0.y - f1.y) * len * (position - 1);
          return {
            x: x,
            y: y,
            angle: _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.getAngle(f0, {
              x: x,
              y: y
            })
          };
        } else if (position == 1) {
          var point_1 = allPoints[allPoints.length - 1];
          return {
            x: point_1.x,
            y: point_1.y,
            angle: point_1.angle
          };
        }
      } else {
        if (position < 0) {
          position = Math.abs(position);
          deltaAngle = 180;
        }

        if (position >= 1) {
          position = 0.9999999999999;
        }
      }

      var point = allPoints[Math.floor(position * len)];
      return {
        x: point.x,
        y: point.y,
        angle: point.angle + deltaAngle
      };
    } else if (len == 1) {
      var point = allPoints[0];
      return {
        x: point.x,
        y: point.y,
        angle: point.angle
      };
    } else {
      return {
        x: 0,
        y: 0,
        angle: 0
      };
    }
  };

  return Polyspline;
}(_Polyline__WEBPACK_IMPORTED_MODULE_0__.Polyline);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses.Polyspline = Polyspline;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Popup.js":
/*!***************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/elements/Popup.js ***!
  \***************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Popup": () => (/* binding */ Popup)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _PopupCSS__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./PopupCSS */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/PopupCSS.js");
/* harmony import */ var _utils_Adapter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/Adapter */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Adapter.js");
/* harmony import */ var _Base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Base */ "./node_modules/@amcharts/amcharts4/.internal/core/Base.js");
/* harmony import */ var _interaction_Interaction__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../interaction/Interaction */ "./node_modules/@amcharts/amcharts4/.internal/core/interaction/Interaction.js");
/* harmony import */ var _utils_Keyboard__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/Keyboard */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Keyboard.js");
/* harmony import */ var _utils_Disposer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/Disposer */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Disposer.js");
/* harmony import */ var _utils_DOM__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/DOM */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/DOM.js");
/* harmony import */ var _utils_Type__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/* harmony import */ var _utils_Object__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/Object */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Object.js");
/**
 * Popup class is used to display information over chart area.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */










/**
 * Shows an HTML popup which covers window or a chart area.
 *
 * @see {@link https://www.amcharts.com/docs/v4/concepts/popups-and-modals/} For examples and docs on Popups and Modals.
 * @todo Positioning over whole window
 */

var Popup =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_9__.__extends)(Popup, _super);
  /**
   * Constructor
   */


  function Popup() {
    var _this = _super.call(this) || this;
    /**
     * Adapter.
     */


    _this.adapter = new _utils_Adapter__WEBPACK_IMPORTED_MODULE_1__.Adapter(_this);
    /**
     * Holds references to various HTML elements, Popup consists of.
     */

    _this._elements = {};
    /**
     * Holdes Interaction objects for various Popup's elements.
     */

    _this._IOs = {};
    /**
     * Contents of popup window.
     */

    _this._content = "";
    /**
     * Title of the popup window.
     */

    _this._title = "";
    /**
     * Prefix to apply to class names for popup elements.
     */

    _this._classPrefix = "ampopup";
    /**
     * If set to `true` [[Popup]] will use default styles.
     */

    _this._defaultStyles = true;
    /**
     * If set to `true` [[Popup]] will dim out all chart content behind it by
     * showing a semi-transparent fill. (curtain)
     */

    _this._showCurtain = false;
    /**
     * Indicates whether popup can be dragged.
     */

    _this._draggable = true;
    /**
     * Horizontal position of the content window.
     */

    _this._align = "center";
    /**
     * Resize popup as images are being loaded.
     */

    _this._dynamicResize = true;
    /**
     * Vertical position of the content window.
     */

    _this._verticalAlign = "middle";
    /**
     * Shift in position of the element. (used for dragging)
     */

    _this._shift = {
      x: 0,
      y: 0
    };
    /**
     * Temporary shift in position of the element. (used for dragging)
     */

    _this._tempShift = {
      x: 0,
      y: 0
    };
    /**
     * A title for screen readers. It is very highly recommended to set that title
     * so that people using screen reader tools can get an immediate summary of
     * the information in the popup.
     */

    _this._readerTitle = "";
    /**
     * Is popup closable?
     */

    _this._closable = true;
    /**
     * Was CSS already loaded?
     */

    _this._cssLoaded = false;
    /**
     * If set to other than "none" will try to re-adjust the position of the
     * popop to fit within chart container or browser window.
     *
     * @ignore Feature not yet implemented
     * @todo Implement
     */

    _this._fitTo = "window";
    /**
     * Identifies if this object is a "template" and should not be treated as
     * real object that is drawn or actually used in the chart.
     *
     * @ignore Exclude from docs
     */

    _this.isTemplate = false;
    /**
     * Indicates if the element was already sized and should not be measured for
     * size again, saving some precious resources.
     */

    _this._sized = false;
    _this.className = "Popup";
    return _this;
  }
  /**
   * Shows popup window.
   */


  Popup.prototype.open = function () {
    if (this.container) {
      if (this._elements.wrapper) {
        this.container.appendChild(this._elements.wrapper);
      }

      if (this._elements.curtain) {
        this.container.appendChild(this._elements.curtain);
        this.showCurtain = this.showCurtain;
      }

      this.positionElement();
      this.dispatchImmediately("opened");
    }
  };
  /**
   * Hides popup window.
   */


  Popup.prototype.close = function () {
    if (this._elements.wrapper) {
      if (this._elements.wrapper.parentElement) {
        this._elements.wrapper.parentElement.removeChild(this._elements.wrapper);
      }
    }

    if (this._elements.curtain) {
      if (this._elements.curtain.parentElement) {
        this._elements.curtain.parentElement.removeChild(this._elements.curtain);
      }
    }

    this.dispatchImmediately("closed");
    this.releasePointers();
  };
  /**
   * Destroy (dispose) popup.
   */


  Popup.prototype.dispose = function () {
    this.close();

    _super.prototype.dispose.call(this);
  };
  /**
   * Positions content element in the center of popup based on its actual size.
   *
   * @ignore Exclude from docs
   */


  Popup.prototype.positionElement = function (forceResize) {
    var _this = this;

    if (forceResize === void 0) {
      forceResize = true;
    }

    if (!this._elements.wrapper) {
      return;
    }

    setTimeout(function () {
      if (!_this._elements.wrapper) {
        return;
      }

      if (forceResize || !_this._sized) {
        _this._elements.wrapper.style.opacity = "0.01";
        _this._elements.wrapper.style.left = "0";
        _this._elements.wrapper.style.top = "0";
        _this._elements.wrapper.style.margin = "0 0 0 0";
        _this._elements.wrapper.style.width = "";
        _this._elements.wrapper.style.height = "";

        var bbox = _this._elements.wrapper.getBoundingClientRect();

        _this._elements.wrapper.style.width = bbox.width + "px";
        _this._elements.wrapper.style.height = bbox.height + "px";
        _this._sized = true;
      } // Check for any images that are not yet loaded


      if (_this.dynamicResize) {
        var images = _this._elements.wrapper.getElementsByTagName("img");

        for (var i = 0; i < images.length; i++) {
          var image = images[i];

          if (!image.complete) {
            // Resize popup once again when image is loaded
            image.addEventListener("load", function () {
              _this.positionElement(true);
            }); // Do this for one image only as it will be checked again next time
            // anyway

            break;
          }
        }
      }

      setTimeout(function () {
        if (!_this._elements.wrapper) {
          return;
        }

        var bbox;

        if ((forceResize || !_this._sized) && _this._bbox) {
          bbox = _this._bbox;
        } else {
          bbox = _this._elements.wrapper.getBoundingClientRect();
          _this._elements.wrapper.style.opacity = "";
        } // Set horizontal positioning


        switch (_this.align) {
          case "left":
            _this._elements.wrapper.style.left = "0";
            _this._elements.wrapper.style.right = "auto";
            _this._elements.wrapper.style.marginLeft = _this.toStyle(_this._shift.x + _this._tempShift.x);
            break;

          case "center":
            _this._elements.wrapper.style.left = "50%";
            _this._elements.wrapper.style.right = "auto";
            _this._elements.wrapper.style.marginLeft = _this.toStyle(Math.round(-bbox.width / 2) + (_this._shift.x + _this._tempShift.x));
            break;

          case "right":
            _this._elements.wrapper.style.left = "auto";
            _this._elements.wrapper.style.right = "0";
            _this._elements.wrapper.style.marginLeft = _this.toStyle(_this._shift.x + _this._tempShift.x);
            break;

          default:
            _this._elements.wrapper.style.left = _this.toStyle(_this.left) || "auto";
            _this._elements.wrapper.style.right = _this.toStyle(_this.right) || "auto";
            _this._elements.wrapper.style.marginLeft = _this.toStyle(_this._shift.x + _this._tempShift.x);
            break;
        } // Set vertical positioning


        switch (_this.verticalAlign) {
          case "top":
            _this._elements.wrapper.style.top = "0";
            _this._elements.wrapper.style.bottom = "auto";
            _this._elements.wrapper.style.marginTop = _this.toStyle(_this._shift.y + _this._tempShift.y);
            break;

          case "middle":
            _this._elements.wrapper.style.top = "50%";
            _this._elements.wrapper.style.bottom = "auto";
            _this._elements.wrapper.style.marginTop = _this.toStyle(Math.round(-bbox.height / 2) + (_this._shift.y + _this._tempShift.y));
            break;

          case "bottom":
            _this._elements.wrapper.style.top = "auto";
            _this._elements.wrapper.style.bottom = "0";
            _this._elements.wrapper.style.marginTop = _this.toStyle(_this._shift.y + _this._tempShift.y);
            break;

          default:
            _this._elements.wrapper.style.top = _this.toStyle(_this.top) || "auto";
            _this._elements.wrapper.style.bottom = _this.toStyle(_this.bottom) || "auto";
            _this._elements.wrapper.style.marginTop = _this.toStyle(_this._shift.y + _this._tempShift.y);
            break;
        }
      }, 1);
    }, 1);
  };

  Popup.prototype.setupDragging = function () {
    var _this = this;

    if (this.draggable) {
      if (!this._IOs.header.events.has("drag")) {
        this._IOs.header.events.on("drag", function (ev) {
          _this._tempShift.x = ev.shift.x;
          _this._tempShift.y = ev.shift.y;

          _this.positionElement(false);
        });
      }

      if (!this._IOs.header.events.has("dragstop")) {
        this._IOs.header.events.on("dragstop", function (ev) {
          _this._shift.x += _this._tempShift.x;
          _this._shift.y += _this._tempShift.y;
          _this._tempShift.x = 0;
          _this._tempShift.y = 0;

          _this.positionElement(false);
        });
      }
    } else {
      if (this._IOs.header) {
        (0,_interaction_Interaction__WEBPACK_IMPORTED_MODULE_3__.getInteraction)().unprepElement(this._IOs.header);

        if (this._IOs.header.events.has("drag")) {
          this._IOs.header.events.off("drag");
        }

        if (this._IOs.header.events.has("dragstop")) {
          this._IOs.header.events.off("dragstop");
        }
      }
    }
  };

  Popup.prototype.toStyle = function (value) {
    if (!_utils_Type__WEBPACK_IMPORTED_MODULE_7__.hasValue(value)) {
      return null;
    } else if (_utils_Type__WEBPACK_IMPORTED_MODULE_7__.isNumber(value)) {
      return "" + value + "px";
    } else {
      return value.toString();
    }
  };

  Object.defineProperty(Popup.prototype, "classPrefix", {
    /**
     * A prefix that is applied to class names of various popup elements.
     *
     * @return Class name prefix
     */
    get: function get() {
      return this.adapter.apply("classPrefix", this._classPrefix);
    },

    /**
     * @param value Class name prefix
     */
    set: function set(value) {
      this._classPrefix = value;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Popup.prototype, "classPrefixRaw", {
    /**
     * Returns raw prefix (without adapters applied).
     *
     * @ignore Exclude from docs
     * @return Class name prefix
     */
    get: function get() {
      return this._classPrefix;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Popup.prototype, "content", {
    /**
     * @return Popup content
     */
    get: function get() {
      return this.adapter.apply("content", this._content);
    },

    /**
     * Popup content.
     *
     * Popup content can be any valid HTML, including CSS.
     *
     * @param value Popup content
     */
    set: function set(value) {
      if (this._content != value) {
        this._content = value;

        if (!this._elements.content) {
          this.createContentElement();
        }

        this._elements.content.innerHTML = value;
        this.positionElement();
      }
    },
    enumerable: true,
    configurable: true
  });

  Popup.prototype.getClassNames = function () {
    return this.adapter.apply("classNames", {
      wrapperClass: this.classPrefix + "",
      headerClass: this.classPrefix + "-header",
      titleClass: this.classPrefix + "-title",
      contentClass: this.classPrefix + "-content",
      insideClass: this.classPrefix + "-inside",
      curtainClass: this.classPrefix + "-curtain",
      closeClass: this.classPrefix + "-close"
    });
  };
  /**
   * Creates content element.
   */


  Popup.prototype.createContentElement = function () {
    // Check if it's created already
    if (this._elements.wrapper) {
      return;
    } // Get class names for popup elements


    var classNames = this.getClassNames(); // Create content element

    var wrapper = document.createElement("div");
    wrapper.className = classNames.contentClass;
    wrapper.style.opacity = "0.01"; // Create close button

    var close = document.createElement("a");
    close.className = classNames.closeClass; // header title

    var header = document.createElement("div");
    header.className = classNames.headerClass; // Content title

    var title = document.createElement("div");
    title.innerHTML = this.title;
    title.className = classNames.titleClass;

    if (!this.title) {
      title.style.display = "none";
    } // Content div


    var content = document.createElement("div");
    content.className = classNames.insideClass;
    content.innerHTML = this.content; // Set up events for content

    this._IOs.wrapper = (0,_interaction_Interaction__WEBPACK_IMPORTED_MODULE_3__.getInteraction)().getInteraction(wrapper);
    this._IOs.header = (0,_interaction_Interaction__WEBPACK_IMPORTED_MODULE_3__.getInteraction)().getInteraction(header);

    this._disposers.push(this._IOs.wrapper); // Set hover/out events


    this._IOs.wrapper.events.on("over", this.disablePointers, this);

    this._IOs.wrapper.events.on("out", this.releasePointers, this); // Create an InteractionObject for close


    this._IOs.close = (0,_interaction_Interaction__WEBPACK_IMPORTED_MODULE_3__.getInteraction)().getInteraction(close);

    this._disposers.push(this._IOs.close); // Hide close for now


    close.style.visibility = "hidden"; // Add accessible stuff

    wrapper.setAttribute("role", "dialog"); // Add to wrapper

    header.appendChild(close);
    header.appendChild(title);
    wrapper.appendChild(header);
    wrapper.appendChild(content);
    this.container.appendChild(wrapper); // Save for later access

    this._elements.wrapper = wrapper;
    this._elements.header = header;
    this._elements.content = content;
    this._elements.title = title;
    this._elements.close = close; // Load CSS

    if (this.defaultStyles) {
      this.loadDefaultCSS();
    } // Create curtain as well


    this.createCurtainElement(); // Apply events

    this.applyEvents();
    this.applyReaderSettings(); // Draggable?

    this.setupDragging();
  };

  Object.defineProperty(Popup.prototype, "title", {
    /**
     * @return Popup title
     */
    get: function get() {
      return this.adapter.apply("title", this._title);
    },

    /**
     * Popup title.
     *
     * Popup title can be any valid HTML, including CSS.
     *
     * @param value  Popup title
     */
    set: function set(value) {
      if (this._title != value) {
        this._title = value;

        if (!this._elements.content) {
          this.createContentElement();
        }

        this._elements.title.innerHTML = value;
        this.positionElement();
        this.applyReaderSettings();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Popup.prototype, "readerTitle", {
    /**
     * @return Popup content
     */
    get: function get() {
      return this.adapter.apply("readerTitle", this._readerTitle != "" ? this._readerTitle : this.title);
    },

    /**
     * A title for screen readers. It is very highly recommended to set that title
     * so that people using screen reader tools can get an immediate summary of
     * the information in the popup.
     *
     * @param value  Reader title
     */
    set: function set(value) {
      if (this._readerTitle != value) {
        this._readerTitle = value;
        this.applyReaderSettings();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Popup.prototype, "closable", {
    /**
     * @return Closable?
     */
    get: function get() {
      return this.adapter.apply("closable", this._closable);
    },

    /**
     * Is popup closable?
     *
     * If it is, it can be closed in a number of ways, e.g. by hitting ESC key,
     * clicking curtain, or clicking the close button.
     *
     * If it is not closable, the only way to close it is via `close()` call.
     *
     * @param value Closable?
     */
    set: function set(value) {
      if (value !== this._closable) {
        this._closable = value;
        this.applyEvents();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Popup.prototype, "fitTo", {
    /**
     * @ignore
     * @todo Implement
     * @return Fit option
     */
    get: function get() {
      return this.adapter.apply("fitTo", this._fitTo);
    },

    /**
     * If set to other than "none" will try to re-adjust the position of the
     * popop to fit within chart container or browser window.
     *
     * @ignore
     * @todo Implement
     * @default "window"
     * @param value  Fit option
     */
    set: function set(value) {
      if (value != this._fitTo) {
        this._fitTo = value;
        this.positionElement();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Popup.prototype, "defaultStyles", {
    /**
     * @return Use default CSS?
     */
    get: function get() {
      return this.adapter.apply("defaultStyles", this._defaultStyles);
    },

    /**
     * Should popup use default CSS?
     *
     * If default CSS is disabled, an external CSS should handle the look of the
     * popup, since it will look quite out of place otherwise.
     *
     * @default true
     * @param Use default CSS?
     */
    set: function set(value) {
      if (this._defaultStyles != value) {
        this._defaultStyles = value;
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Popup.prototype, "showCurtain", {
    /**
     * @return Show curtain?
     */
    get: function get() {
      return this.adapter.apply("showCurtain", this._showCurtain);
    },

    /**
     * Should popup use dim out all content behind it?
     *
     * @default false
     * @param Show curtain?
     */
    set: function set(value) {
      if (this._showCurtain != value) {
        this._showCurtain = value;

        if (this._elements.curtain) {
          this._elements.curtain.style.display = value ? "block" : "none";
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Creates curtain element.
   */

  Popup.prototype.createCurtainElement = function () {
    // Get class names for popup elements
    var classNames = this.getClassNames(); // Create the curtain

    var curtain = document.createElement("div");
    curtain.className = classNames.curtainClass; // Append curtain to wrapper

    this.container.appendChild(curtain); // Create an InteractionObject for curtain because we might need to
    // set interactions on it

    this._IOs.curtain = (0,_interaction_Interaction__WEBPACK_IMPORTED_MODULE_3__.getInteraction)().getInteraction(curtain); // Add Curtain IO to disposers

    this._disposers.push(this._IOs.curtain); // Set events to disable underlying interactivity


    this._IOs.curtain.events.on("over", this.disablePointers, this);

    this._IOs.curtain.events.on("out", this.releasePointers, this); // Hide it?


    curtain.style.display = this.showCurtain ? "block" : "none"; // Save for later

    this._elements.curtain = curtain;
  };

  Object.defineProperty(Popup.prototype, "draggable", {
    /**
     * @return Show curtain?
     */
    get: function get() {
      return this.adapter.apply("draggable", this._draggable);
    },

    /**
     * Can the popup be dragged with a pointer?
     *
     * @default false
     * @param Show curtain?
     */
    set: function set(value) {
      if (this._draggable != value) {
        this._draggable = value;
        this.setupDragging();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Popup.prototype, "dynamicResize", {
    /**
     * @return Resize dynamically?
     */
    get: function get() {
      return this.adapter.apply("dynamicResize", this._dynamicResize);
    },

    /**
     * Resize popup as images are being loaded.
     *
     * @default true
     * @since 4.9.17
     * @param Resize dynamically?
     */
    set: function set(value) {
      if (this._dynamicResize != value) {
        this._dynamicResize = value;
        this.positionElement(true);
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Popup.prototype, "align", {
    /**
     * @return Horizontal position
     */
    get: function get() {
      return this.adapter.apply("align", this._align);
    },

    /**
     * Horizontal positioning of the content window.
     *
     * Available options: "left", "center" (default), "right", and "none".
     *
     * @default "center"
     * @param Horizontal position
     */
    set: function set(value) {
      if (this._align != value) {
        this._align = value;
        this.positionElement();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Popup.prototype, "verticalAlign", {
    /**
     * @return Vertical position
     */
    get: function get() {
      return this.adapter.apply("verticalAlign", this._verticalAlign);
    },

    /**
     * Vertical positioning of the content window.
     *
     * Available options: "top", "middle" (default), "bottom", and "none".
     *
     * @default "middle"
     * @param Vertical position
     */
    set: function set(value) {
      if (this._verticalAlign != value) {
        this._verticalAlign = value;
        this.positionElement();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Popup.prototype, "left", {
    /**
     * @return Left
     */
    get: function get() {
      return this.adapter.apply("left", this._left);
    },

    /**
     * "left" coordinate of a non-aligned (`align = "none"`) popup.
     *
     * Can be either absolute pixel value, or relative (`Percent`).
     *
     * Setting this property will automatically set `align` to "none".
     *
     * NOTE: The position is relative to the chart container.
     *
     * @param Left
     */
    set: function set(value) {
      if (this.left != value) {
        this._left = value;
        this._align = "none";
        this.positionElement();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Popup.prototype, "right", {
    /**
     * @return Right
     */
    get: function get() {
      return this.adapter.apply("right", this._right);
    },

    /**
     * "right" coordinate of a non-aligned (`align = "none"`) popup.
     *
     * Can be either absolute pixel value, or relative (`Percent`).
     *
     * Setting this property will automatically set `align` to "none".
     *
     * NOTE: The position is relative to the chart container.
     *
     * @param Right
     */
    set: function set(value) {
      if (this.right != value) {
        this._right = value;
        this._align = "none";
        this.positionElement();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Popup.prototype, "top", {
    /**
     * @return Top
     */
    get: function get() {
      return this.adapter.apply("top", this._top);
    },

    /**
     * "top" coordinate of a non-aligned (`verticalAlign = "none"`) popup.
     *
     * Can be either absolute pixel value, or relative (`Percent`).
     *
     * Setting this property will automatically set `verticalAlign` to "none".
     *
     * NOTE: The position is relative to the chart container.
     *
     * @param Top
     */
    set: function set(value) {
      if (this.top != value) {
        this._top = value;
        this._verticalAlign = "none";
        this.positionElement();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Popup.prototype, "bottom", {
    /**
     * @return Bottom
     */
    get: function get() {
      return this.adapter.apply("bottom", this._bottom);
    },

    /**
     * "bottom" coordinate of a non-aligned (`verticalAlign = "none"`) popup.
     *
     * Can be either absolute pixel value, or relative (`Percent`).
     *
     * Setting this property will automatically set `verticalAlign` to "none".
     *
     * NOTE: The position is relative to the chart container.
     *
     * @param Bottom
     */
    set: function set(value) {
      if (this.bottom != value) {
        this._bottom = value;
        this._verticalAlign = "none";
        this.positionElement();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Popup.prototype, "elements", {
    /**
     * Returns an object with references to various elements of the Popup.
     *
     * * `wrapper`
     * * `title`
     * * `content`
     * * `close`
     * * `curtain`
     */
    get: function get() {
      return this._elements;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Loads popup CSS.
   *
   * @ignore Exclude from docs
   */

  Popup.prototype.loadDefaultCSS = function () {
    if (!this._cssLoaded) {
      this._disposers.push((0,_PopupCSS__WEBPACK_IMPORTED_MODULE_0__["default"])((0,_utils_DOM__WEBPACK_IMPORTED_MODULE_6__.getShadowRoot)(this.container), this.classPrefix));

      _utils_Object__WEBPACK_IMPORTED_MODULE_8__.each(this._elements, function (key, el) {
        el.style.display = "";
      });
      this._cssLoaded = true;
    }
  };
  /**
   * If popup is closable, this method adds various events to popup elements.
   */


  Popup.prototype.applyEvents = function () {
    var _this = this;

    if (this._IOs.close) {
      if (this.closable) {
        this._IOs.close.element.style.visibility = "visible";
        var disposers = [(0,_interaction_Interaction__WEBPACK_IMPORTED_MODULE_3__.getInteraction)().body.events.on("keyup", function (ev) {
          if (_utils_Keyboard__WEBPACK_IMPORTED_MODULE_4__.keyboard.isKey(ev.event, "esc") && _this.closable) {
            _this.close();
          }
        }), this._IOs.close.events.on("hit", function (ev) {
          _this.close();
        })];
        disposers.push(this._IOs.curtain.events.on("hit", function (ev) {
          if (_this.showCurtain && _this.closable) {
            _this.close();
          }
        }));

        this._disposers.push(new _utils_Disposer__WEBPACK_IMPORTED_MODULE_5__.MultiDisposer(disposers));
      } else {
        this._IOs.close.element.style.visibility = "hidden";
      }
    }
  };
  /**
   * Disables interactivity on parent chart.
   */


  Popup.prototype.disablePointers = function () {
    if (this.sprite) {
      this._spriteInteractionsEnabled = this.sprite.interactionsEnabled;
      this.sprite.interactionsEnabled = false;
    }
  };
  /**
   * Releases temporarily disabled pointers on parent chart.
   */


  Popup.prototype.releasePointers = function () {
    if (_utils_Type__WEBPACK_IMPORTED_MODULE_7__.hasValue(this._spriteInteractionsEnabled)) {
      this.sprite.interactionsEnabled = this._spriteInteractionsEnabled;
      this._spriteInteractionsEnabled = undefined;
    }
  };
  /**
   * Sets screen reader related settings.
   */


  Popup.prototype.applyReaderSettings = function () {
    this.elements.wrapper.setAttribute("aria-label", this.readerTitle);
  };
  /**
   * Copies all properties and related data from different element.
   *
   * @param object Source element
   */


  Popup.prototype.copyFrom = function (source) {
    _super.prototype.copyFrom.call(this, source);

    this.container = source.container;
    this.sprite = source.sprite;
    this.classPrefix = source.classPrefixRaw;
    this.content = source.content;
    this.title = source.title;
    this.readerTitle = source.readerTitle;
    this.defaultStyles = source.defaultStyles;
    this.showCurtain = source.showCurtain;
    this.align = source.align;
    this.verticalAlign = source.verticalAlign;
    this.left = source.left;
    this.right = source.right;
    this.top = source.top;
    this.bottom = source.bottom;
    this.adapter.copyFrom(source.adapter);
  };

  return Popup;
}(_Base__WEBPACK_IMPORTED_MODULE_2__.BaseObjectEvents);



/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/elements/PopupCSS.js":
/*!******************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/elements/PopupCSS.js ***!
  \******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* export default binding */ __WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _utils_DOM__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/DOM */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/DOM.js");
/* harmony import */ var _utils_Dictionary__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/Dictionary */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Dictionary.js");
/* harmony import */ var _utils_Disposer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/Disposer */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Disposer.js");
/* harmony import */ var _utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/InterfaceColorSet */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/InterfaceColorSet.js");




var rules = new _utils_Dictionary__WEBPACK_IMPORTED_MODULE_1__.Dictionary();
/**
 * Default CSS for Popup.
 *
 * @ignore Exclude from docs
 * @param prefix  Prefix for CSS classes
 * @return Disposer for the CSS definition
 */

/* harmony default export */ function __WEBPACK_DEFAULT_EXPORT__(element, prefix) {
  if (!prefix) {
    prefix = "ampopup";
  }

  var cs = new _utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_3__.InterfaceColorSet();
  var fg = cs.getFor("text");
  var bg = cs.getFor("background");
  bg.alpha = 0.8;
  var abg = cs.getFor("alternativeBackground");
  abg.alpha = 0.05;
  var counter = rules.insertKeyIfEmpty(prefix, function () {
    var disposer = new _utils_Disposer__WEBPACK_IMPORTED_MODULE_2__.MultiDisposer([new _utils_DOM__WEBPACK_IMPORTED_MODULE_0__.StyleRule(element, "." + prefix, {
      //"width": "100%",
      //"height": "100%",
      "overflow": "visible",
      "position": "absolute",
      "top": "0",
      "left": "0",
      "z-index": "2000"
    }), new _utils_DOM__WEBPACK_IMPORTED_MODULE_0__.StyleRule(element, "." + prefix + "-curtain", {
      "width": "100%",
      "height": "100%",
      "position": "absolute",
      "top": "0",
      "left": "0",
      "z-index": "2001",
      "background-color": bg.hex,
      "opacity": "0.5"
    }), new _utils_DOM__WEBPACK_IMPORTED_MODULE_0__.StyleRule(element, "." + prefix + "-header", {
      "display": "block",
      "width": "100%",
      "min-height": "1.8em",
      "background": abg.rgba
    }), new _utils_DOM__WEBPACK_IMPORTED_MODULE_0__.StyleRule(element, "." + prefix + "-title", {
      "font-weight": "bold",
      "font-size": "110%",
      "padding": "0.5em 1.2em 0.5em 1em"
    }), new _utils_DOM__WEBPACK_IMPORTED_MODULE_0__.StyleRule(element, "." + prefix + "-content", {
      /*"width": "100%",
      "height": "100%",*/
      // "padding": "2em 1em 1em 1em",
      "background": bg.hex,
      "background-color": bg.rgba,
      "color": fg.hex,
      "display": "inline-block",
      "position": "absolute",
      "top": "0",
      "left": "0",
      "max-width": "90%",
      "max-height": "90%",
      "overflow": "auto",
      "z-index": "2002"
    }), new _utils_DOM__WEBPACK_IMPORTED_MODULE_0__.StyleRule(element, "." + prefix + "-inside", {
      "padding": "1em"
    }), new _utils_DOM__WEBPACK_IMPORTED_MODULE_0__.StyleRule(element, "." + prefix + "-close", {
      "display": "block",
      "position": "absolute",
      "top": "0.3em",
      "right": "0.3em",
      "background-color": "rgb(100, 100, 100)",
      "background": "rgba(100, 100, 100, 0.1) url(data:image/svg+xml;charset=utf-8;base64,PHN2ZyBoZWlnaHQ9IjUxMiIgdmVyc2lvbj0iMSIgdmlld0JveD0iMCAwIDUxMiA1MTIiIHdpZHRoPSI1MTIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTQ0NS4yIDEwOS4ybC00Mi40LTQyLjRMMjU2IDIxMy42IDEwOS4yIDY2LjhsLTQyLjQgNDIuNEwyMTMuNiAyNTYgNjYuOCA0MDIuOGw0Mi40IDQyLjRMMjU2IDI5OC40bDE0Ni44IDE0Ni44IDQyLjQtNDIuNEwyOTguNCAyNTYiLz48L3N2Zz4=) no-repeat center",
      "background-size": "80%",
      "width": "1.2em",
      "height": "1.2em",
      "cursor": "pointer"
    })]);
    return new _utils_Disposer__WEBPACK_IMPORTED_MODULE_2__.CounterDisposer(function () {
      rules.removeKey(prefix);
      disposer.dispose();
    });
  });
  return counter.increment();
}

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Preloader.js":
/*!*******************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/elements/Preloader.js ***!
  \*******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Preloader": () => (/* binding */ Preloader)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Container__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Container */ "./node_modules/@amcharts/amcharts4/.internal/core/Container.js");
/* harmony import */ var _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/utils/InterfaceColorSet */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/InterfaceColorSet.js");
/* harmony import */ var _Slice__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Slice */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Slice.js");
/* harmony import */ var _Label__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Label */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Label.js");
/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_utils_Percent__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../core/utils/Percent */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Percent.js");
/**
 * Preloader module.
 *
 * Preloader is a progress indicator.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */







/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * A class used to draw and display progress indicator.
 *
 * @see {@link IPreloaderEvents} for a list of available events
 * @see {@link IPreloaderAdapters} for a list of available Adapters
 */

var Preloader =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_6__.__extends)(Preloader, _super);
  /**
   * Constructor
   */


  function Preloader() {
    var _this = // Init
    _super.call(this) || this;

    _this.className = "Preloader"; // Set dimensions

    _this.width = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_5__.percent)(100);
    _this.height = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_5__.percent)(100);
    var interfaceColors = new _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_1__.InterfaceColorSet(); // Create main container

    var sliceContainer = _this.createChild(_Container__WEBPACK_IMPORTED_MODULE_0__.Container);

    sliceContainer.shouldClone = false; // Add background (100%) slice

    var backgroundSlice = sliceContainer.createChild(_Slice__WEBPACK_IMPORTED_MODULE_2__.Slice);
    backgroundSlice.shouldClone = false;
    backgroundSlice.radius = 53;
    backgroundSlice.arc = 360;
    backgroundSlice.fill = interfaceColors.getFor("fill");
    backgroundSlice.fillOpacity = 0.8;
    backgroundSlice.innerRadius = 42;
    backgroundSlice.isMeasured = false;
    _this.backgroundSlice = backgroundSlice; // Add progress slice

    var progressSlice = sliceContainer.createChild(_Slice__WEBPACK_IMPORTED_MODULE_2__.Slice);
    progressSlice.shouldClone = false;
    progressSlice.radius = 50;
    progressSlice.innerRadius = 45;
    progressSlice.fill = interfaceColors.getFor("alternativeBackground");
    progressSlice.fillOpacity = 0.2;
    progressSlice.isMeasured = false;
    _this.progressSlice = progressSlice; // Add text label element

    var label = sliceContainer.createChild(_Label__WEBPACK_IMPORTED_MODULE_3__.Label);
    label.shouldClone = false;
    label.horizontalCenter = "middle";
    label.verticalCenter = "middle";
    label.isMeasured = false;
    label.fill = interfaceColors.getFor("text");
    label.align = "center";
    label.valign = "middle";
    label.textAlign = "middle";
    label.fillOpacity = 0.4;
    _this.label = label; // Set defaults

    _this.background.opacity = 1;
    _this.background.fill = interfaceColors.getFor("background");
    _this.contentAlign = "center";
    _this.contentValign = "middle";
    _this.delay = 300; // Create hidden state

    var hiddenState = _this.states.create("hidden");

    hiddenState.properties.opacity = 0; // Hide by default

    _this.visible = false;

    _this.hide(0);

    _this.__disabled = true; // Make it disposable
    // @todo Maybe it's enough to just dispose `sliceContainer`?

    _this._disposers.push(_this.backgroundSlice);

    _this._disposers.push(_this.progressSlice);

    _this._disposers.push(_this.label);

    _this._disposers.push(sliceContainer);

    return _this;
  }

  Object.defineProperty(Preloader.prototype, "progress", {
    /**
     * @return Progress (0-1)
     */
    get: function get() {
      return this.getPropertyValue("progress");
    },

    /**
     * Current preload progress. (0-1)
     *
     * * 0 - 0%
     * * 0.5 - 50%
     * * 1 - 100%
     *
     * Setting this to a value less than 1, will automatically reveal the
     * preloader, while setting it to 1 (100%) will hide it.
     *
     * @param value Progress (0-1)
     */
    set: function set(value) {
      var _this = this;

      this.__disabled = false;
      this.validateLayout(); // show not in center without this

      this.setPropertyValue("progress", value);
      /*if (!this.visible && value == 1) {
          return;
      }*/

      this.progressSlice.arc = 360 * value;

      if (this.label) {
        this.label.text = Math.round(value * 100) + "%";
      }

      if (value >= 1) {
        // Cancel the timeout
        if (this._started) {
          this._started = undefined;
        } // TODO remove closure ?


        _Registry__WEBPACK_IMPORTED_MODULE_4__.registry.events.once("enterframe", function () {
          var animation = _this.hide();

          if (animation && !animation.isFinished()) {
            animation.events.once("animationended", function () {
              _this.__disabled = true;
            });
          } else {
            _this.__disabled = true;
          }
        });
        this.interactionsEnabled = false;
        this.setPropertyValue("progress", 0);
      } else if (value > 0) {
        if (this.delay) {
          if (!this._started) {
            this._started = new Date().getTime();
          } else if (this._started + this.delay <= new Date().getTime()) {
            this.__disabled = false;
            this.show();
            this.interactionsEnabled = true;
          }
        } else {
          this.__disabled = false;
          this.show();
          this.interactionsEnabled = true;
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Preloader.prototype, "delay", {
    /**
     * @return Delay (ms)
     */
    get: function get() {
      return this.getPropertyValue("delay");
    },

    /**
     * Delay display of preloader by X milliseconds.
     *
     * When loading starts (`progress` is set to <1) and finishes (`progress` is
     * set to 1) before `delay` ms, the loader is never shown.
     *
     * This is used to avoid brief flashing of the preload for very quick loads.
     *
     * @default 1000
     * @param value  Delay (ms)
     */
    set: function set(value) {
      this.setPropertyValue("delay", value);
    },
    enumerable: true,
    configurable: true
  });
  return Preloader;
}(_Container__WEBPACK_IMPORTED_MODULE_0__.Container);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_Registry__WEBPACK_IMPORTED_MODULE_4__.registry.registeredClasses.Preloader = Preloader;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/elements/QuadraticCurve.js":
/*!************************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/elements/QuadraticCurve.js ***!
  \************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "QuadraticCurve": () => (/* binding */ QuadraticCurve)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Line__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Line */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Line.js");
/* harmony import */ var _utils_Color__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/Color */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Color.js");
/* harmony import */ var _rendering_Path__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../rendering/Path */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Path.js");
/* harmony import */ var _utils_Math__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
/* harmony import */ var _utils_Type__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/**
 * Functionality for drawing quadratic curves.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */






/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Draws a waved line.
 *
 * @see {@link IQuadraticCurveEvents} for a list of available events
 * @see {@link IQuadraticCurveAdapters} for a list of available Adapters
 */

var QuadraticCurve =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__extends)(QuadraticCurve, _super);
  /**
   * Constructor
   */


  function QuadraticCurve() {
    var _this = _super.call(this) || this;

    _this.className = "QuadraticCurve";
    _this.element = _this.paper.add("path");
    _this.pixelPerfect = false;
    _this.fill = (0,_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)();

    _this.applyTheme();

    return _this;
  }
  /**
   * Draws the waved line.
   *
   * @ignore Exclude from docs
   */


  QuadraticCurve.prototype.draw = function () {
    //super.draw();
    if (_utils_Type__WEBPACK_IMPORTED_MODULE_4__.isNumber(this.x1 + this.x2 + this.y1 + this.y2 + this.cpx + this.cpy)) {
      var p1 = {
        x: this.x1,
        y: this.y1
      };
      var p2 = {
        x: this.x2,
        y: this.y2
      };
      var cp = {
        x: this.cpx,
        y: this.cpy
      };
      var d = _rendering_Path__WEBPACK_IMPORTED_MODULE_2__.moveTo(p1) + _rendering_Path__WEBPACK_IMPORTED_MODULE_2__.quadraticCurveTo(p2, cp);
      this.path = d;
    }
  };

  Object.defineProperty(QuadraticCurve.prototype, "cpx", {
    /**
     * @return X
     */
    get: function get() {
      return this.getPropertyValue("cpx");
    },

    /**
     * X coordinate of control point.
     *
     * @param value X
     */
    set: function set(value) {
      this.setPropertyValue("cpx", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(QuadraticCurve.prototype, "cpy", {
    /**
     * @return Y
     */
    get: function get() {
      return this.getPropertyValue("cpy");
    },

    /**
     * Y coordinate of control point.
     *
     * @param value Y
     */
    set: function set(value) {
      this.setPropertyValue("cpy", value, true);
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Converts relative position along the line (0-1) into pixel coordinates.
   *
   * @param position  Position (0-1)
   * @return Coordinates
   */

  QuadraticCurve.prototype.positionToPoint = function (position) {
    var p1 = {
      x: this.x1,
      y: this.y1
    };
    var cp = {
      x: this.cpx,
      y: this.cpy
    };
    var p2 = {
      x: this.x2,
      y: this.y2
    };
    var point1 = _utils_Math__WEBPACK_IMPORTED_MODULE_3__.getPointOnQuadraticCurve(p1, p2, cp, position);
    var point2 = _utils_Math__WEBPACK_IMPORTED_MODULE_3__.getPointOnQuadraticCurve(p1, p2, cp, position + 0.001);
    return {
      x: point1.x,
      y: point1.y,
      angle: _utils_Math__WEBPACK_IMPORTED_MODULE_3__.getAngle(point1, point2)
    };
  };

  return QuadraticCurve;
}(_Line__WEBPACK_IMPORTED_MODULE_0__.Line);



/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Rectangle.js":
/*!*******************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/elements/Rectangle.js ***!
  \*******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Rectangle": () => (/* binding */ Rectangle)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Sprite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Sprite */ "./node_modules/@amcharts/amcharts4/.internal/core/Sprite.js");
/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _utils_Math__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
/**
 * Functionality for drawing rectangles.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */




/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Used to draw a rectangle.
 *
 * @see {@link IRectangleEvents} for a list of available events
 * @see {@link IRectangleAdapters} for a list of available Adapters
 */

var Rectangle =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__extends)(Rectangle, _super);
  /**
   * Constructor
   * * Creates a `<rect>` element
   * * Creates default state
   */


  function Rectangle() {
    var _this = _super.call(this) || this;

    _this.className = "Rectangle";
    _this.element = _this.paper.add("rect"); //this.pixelPerfect = false;

    _this.applyTheme();

    return _this;
  }
  /**
   * Draws the element.
   *
   * @ignore Exclude from docs
   */


  Rectangle.prototype.draw = function () {
    _super.prototype.draw.call(this);

    var precision = this._positionPrecision;

    if (this.pixelPerfect) {
      precision = 0;
    }

    var w = _utils_Math__WEBPACK_IMPORTED_MODULE_2__.round(this.innerWidth, precision);
    var h = _utils_Math__WEBPACK_IMPORTED_MODULE_2__.round(this.innerHeight, precision);
    this.element.attr({
      "width": w,
      "height": h
    });
  };
  /**
   * Measures the element.
   *
   * @ignore Exclude from docs
   */


  Rectangle.prototype.measureElement = function () {};

  Object.defineProperty(Rectangle.prototype, "bbox", {
    /**
     * Returns bounding box (square) for this element.
     *
     * @ignore Exclude from docs
     */
    get: function get() {
      if (this.definedBBox) {
        return this.definedBBox;
      }

      if (this.isMeasured) {
        return {
          x: 0,
          y: 0,
          width: this.innerWidth,
          height: this.innerHeight
        };
      } else {
        return {
          x: 0,
          y: 0,
          width: 0,
          height: 0
        };
      }
    },
    enumerable: true,
    configurable: true
  });
  return Rectangle;
}(_Sprite__WEBPACK_IMPORTED_MODULE_0__.Sprite);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses.Rectangle = Rectangle;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/elements/ResizeButton.js":
/*!**********************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/elements/ResizeButton.js ***!
  \**********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "ResizeButton": () => (/* binding */ ResizeButton)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Button__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Button */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Button.js");
/* harmony import */ var _Sprite__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Sprite */ "./node_modules/@amcharts/amcharts4/.internal/core/Sprite.js");
/* harmony import */ var _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/utils/InterfaceColorSet */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/InterfaceColorSet.js");
/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _rendering_Path__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../rendering/Path */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Path.js");
/**
 * Resize button module.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */






/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Creates a draggable resize/grip button.
 *
 * @see {@link IResizeButtonEvents} for a list of available events
 * @see {@link IResizeButtonAdapters} for a list of available Adapters
 */

var ResizeButton =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__extends)(ResizeButton, _super);
  /**
   * Constructor
   */


  function ResizeButton() {
    var _this = // Init
    _super.call(this) || this;

    _this.className = "ResizeButton"; // Set defaults

    _this.orientation = "horizontal";
    _this.layout = "absolute";
    _this.horizontalCenter = "middle";
    _this.verticalCenter = "middle";
    _this.draggable = true;

    _this.padding(8, 8, 8, 8);

    _this.background.cornerRadius(20, 20, 20, 20); // Create an icon


    var icon = new _Sprite__WEBPACK_IMPORTED_MODULE_1__.Sprite();
    icon.element = _this.paper.add("path");
    var path = _rendering_Path__WEBPACK_IMPORTED_MODULE_4__.moveTo({
      x: -2,
      y: -6
    });
    path += _rendering_Path__WEBPACK_IMPORTED_MODULE_4__.lineTo({
      x: -2,
      y: 6
    });
    path += _rendering_Path__WEBPACK_IMPORTED_MODULE_4__.moveTo({
      x: 2,
      y: -6
    });
    path += _rendering_Path__WEBPACK_IMPORTED_MODULE_4__.lineTo({
      x: 2,
      y: 6
    });
    icon.path = path;
    icon.pixelPerfect = true;
    icon.padding(0, 4, 0, 4);
    icon.stroke = new _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_2__.InterfaceColorSet().getFor("alternativeText");
    icon.strokeOpacity = 0.7; //icon.align = "center";
    //icon.valign = "middle";

    _this.icon = icon;

    _this.label.dispose();

    _this.label = undefined; // Apply theme

    _this.applyTheme();

    return _this;
  }

  Object.defineProperty(ResizeButton.prototype, "orientation", {
    /**
     * Use for setting of direction (orientation) of the resize button.
     *
     * Available options: "horizontal", "vertical".
     *
     * @param value Orientation
     */
    set: function set(value) {
      var icon = this.icon;

      if (icon) {
        if (value == "horizontal") {
          icon.rotation = 0;
        } else {
          icon.rotation = -90;
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  return ResizeButton;
}(_Button__WEBPACK_IMPORTED_MODULE_0__.Button);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_Registry__WEBPACK_IMPORTED_MODULE_3__.registry.registeredClasses.ResizeButton = ResizeButton;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/elements/RoundedRectangle.js":
/*!**************************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/elements/RoundedRectangle.js ***!
  \**************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "RoundedRectangle": () => (/* binding */ RoundedRectangle)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Sprite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Sprite */ "./node_modules/@amcharts/amcharts4/.internal/core/Sprite.js");
/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _utils_Math__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
/* harmony import */ var _utils_Type__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/* harmony import */ var _utils_Utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/Utils */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Utils.js");
/**
 * Rounded rectangle module.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */






/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Draws a rectangle with rounded corners.
 *
 * @see {@link IRoundedRectangleEvents} for a list of available events
 * @see {@link IRoundedRectangleAdapters} for a list of available Adapters
 */

var RoundedRectangle =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__extends)(RoundedRectangle, _super);
  /**
   * Constructor
   */


  function RoundedRectangle() {
    var _this = _super.call(this) || this;

    _this.className = "RoundedRectangle";
    _this.element = _this.paper.add("path");

    _this.cornerRadius(3, 3, 3, 3);

    _this.applyTheme();

    return _this;
  }
  /**
   * Draws the element.
   *
   * @ignore Exclude from docs
   */


  RoundedRectangle.prototype.draw = function () {
    _super.prototype.draw.call(this);

    var w = this.innerWidth;
    var h = this.innerHeight;

    if (_utils_Type__WEBPACK_IMPORTED_MODULE_3__.isNumber(w) && _utils_Type__WEBPACK_IMPORTED_MODULE_3__.isNumber(h)) {
      var minSide = _utils_Math__WEBPACK_IMPORTED_MODULE_2__.min(w, h) / 2;
      var cornerRadiusTopLeft = _utils_Utils__WEBPACK_IMPORTED_MODULE_4__.relativeToValue(this.cornerRadiusTopLeft, minSide);
      var cornerRadiusTopRight = _utils_Utils__WEBPACK_IMPORTED_MODULE_4__.relativeToValue(this.cornerRadiusTopRight, minSide);
      var cornerRadiusBottomRight = _utils_Utils__WEBPACK_IMPORTED_MODULE_4__.relativeToValue(this.cornerRadiusBottomRight, minSide);
      var cornerRadiusBottomLeft = _utils_Utils__WEBPACK_IMPORTED_MODULE_4__.relativeToValue(this.cornerRadiusBottomLeft, minSide);
      var maxcr = _utils_Math__WEBPACK_IMPORTED_MODULE_2__.min(Math.abs(w / 2), Math.abs(h / 2));
      var crtl = _utils_Math__WEBPACK_IMPORTED_MODULE_2__.fitToRange(cornerRadiusTopLeft, 0, maxcr);
      var crtr = _utils_Math__WEBPACK_IMPORTED_MODULE_2__.fitToRange(cornerRadiusTopRight, 0, maxcr);
      var crbr = _utils_Math__WEBPACK_IMPORTED_MODULE_2__.fitToRange(cornerRadiusBottomRight, 0, maxcr);
      var crbl = _utils_Math__WEBPACK_IMPORTED_MODULE_2__.fitToRange(cornerRadiusBottomLeft, 0, maxcr);
      var lineT = "M" + crtl + ",0 L" + (w - crtr) + ",0";
      var lineB = " L" + crbl + "," + h;
      var lineL = " L0," + crtl;
      var lineR = " L" + w + "," + (h - crbr);
      var arcTR = " a" + crtr + "," + crtr + " 0 0 1 " + crtr + "," + crtr;
      var arcBR = " a" + crbr + "," + crbr + " 0 0 1 -" + crbr + "," + crbr;
      var arcBL = " a" + crbl + "," + crbl + " 0 0 1 -" + crbl + ",-" + crbl;
      var arcTL = " a" + crtl + "," + crtl + " 0 0 1 " + crtl + ",-" + crtl;
      var path = lineT + arcTR + lineR + arcBR + lineB + arcBL + lineL + arcTL + " Z";
      this.path = path;
    }
  };
  /**
   * Sets radius for all four corners at ones.
   *
   * All numbers are in pixels.
   *
   * @param tl  Top-left corner
   * @param tr  Top-right corner
   * @param bl  Bottom-left corner
   * @param br  Bottom-right corner
   */


  RoundedRectangle.prototype.cornerRadius = function (tl, tr, bl, br) {
    this.cornerRadiusTopLeft = tl;
    this.cornerRadiusTopRight = tr;
    this.cornerRadiusBottomLeft = bl;
    this.cornerRadiusBottomRight = br;
  };

  Object.defineProperty(RoundedRectangle.prototype, "cornerRadiusTopLeft", {
    /**
     * @return Radius (px or Percent)
     */
    get: function get() {
      return this.getPropertyValue("cornerRadiusTopLeft");
    },

    /**
     * Radius of the top-left corner in pixels.
     *
     * @default 3
     * @param value  Radius (px or Percent)
     */
    set: function set(value) {
      this.setPercentProperty("cornerRadiusTopLeft", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(RoundedRectangle.prototype, "cornerRadiusTopRight", {
    /**
     * @return Radius (px or Percent)
     */
    get: function get() {
      return this.getPropertyValue("cornerRadiusTopRight");
    },

    /**
     * Radius of the top-right corner in pixels.
     *
     * @default 3
     * @param value  Radius (px or Percent)
     */
    set: function set(value) {
      this.setPercentProperty("cornerRadiusTopRight", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(RoundedRectangle.prototype, "cornerRadiusBottomRight", {
    /**
     * @return Radius (px or Percent)
     */
    get: function get() {
      return this.getPropertyValue("cornerRadiusBottomRight");
    },

    /**
     * Radius of the bottom-right corner in pixels.
     *
     * @default 3
     * @param value  Radius (px or Percent)
     */
    set: function set(value) {
      this.setPercentProperty("cornerRadiusBottomRight", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(RoundedRectangle.prototype, "cornerRadiusBottomLeft", {
    /**
     * @return Radius (px or Percent)
     */
    get: function get() {
      return this.getPropertyValue("cornerRadiusBottomLeft");
    },

    /**
     * Radius of the bottom-left corner in pixels.
     *
     * @default 3
     * @param value  Radius (px or Percent)
     */
    set: function set(value) {
      this.setPercentProperty("cornerRadiusBottomLeft", value, true);
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Measures the element.
   *
   * @ignore Exclude from docs
   */

  RoundedRectangle.prototype.measureElement = function () {};

  Object.defineProperty(RoundedRectangle.prototype, "bbox", {
    /**
     * Returns bounding box (square) for this element.
     *
     * @ignore Exclude from docs
     */
    get: function get() {
      if (this.definedBBox) {
        return this.definedBBox;
      }

      if (this.isMeasured) {
        return {
          x: 0,
          y: 0,
          width: this.innerWidth,
          height: this.innerHeight
        };
      } else {
        return {
          x: 0,
          y: 0,
          width: 0,
          height: 0
        };
      }
    },
    enumerable: true,
    configurable: true
  });
  return RoundedRectangle;
}(_Sprite__WEBPACK_IMPORTED_MODULE_0__.Sprite);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses.RoundedRectangle = RoundedRectangle;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Scrollbar.js":
/*!*******************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/elements/Scrollbar.js ***!
  \*******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Scrollbar": () => (/* binding */ Scrollbar)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Container__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Container */ "./node_modules/@amcharts/amcharts4/.internal/core/Container.js");
/* harmony import */ var _elements_ResizeButton__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../elements/ResizeButton */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/ResizeButton.js");
/* harmony import */ var _elements_Button__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../elements/Button */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Button.js");
/* harmony import */ var _interaction_Interaction__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../interaction/Interaction */ "./node_modules/@amcharts/amcharts4/.internal/core/interaction/Interaction.js");
/* harmony import */ var _interaction_Mouse__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../interaction/Mouse */ "./node_modules/@amcharts/amcharts4/.internal/core/interaction/Mouse.js");
/* harmony import */ var _elements_RoundedRectangle__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../elements/RoundedRectangle */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/RoundedRectangle.js");
/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _utils_Keyboard__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/Keyboard */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Keyboard.js");
/* harmony import */ var _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../core/utils/InterfaceColorSet */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/InterfaceColorSet.js");
/* harmony import */ var _utils_Percent__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/Percent */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Percent.js");
/* harmony import */ var _utils_Math__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
/* harmony import */ var _utils_Ease__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../utils/Ease */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Ease.js");
/* harmony import */ var _utils_Type__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/* harmony import */ var _utils_Utils__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../utils/Utils */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Utils.js");
/**
 * Provides functionality used to build scrollbars.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */















;
/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Scrollbar is a generic control allowing to select a range of values or pan
 * the selection.
 *
 * @see {@link IScrollbarEvents} for a list of available events
 * @see {@link IScrollbarAdapters} for a list of available Adapters
 */

var Scrollbar =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_14__.__extends)(Scrollbar, _super);
  /**
   * Construtor
   */


  function Scrollbar() {
    var _this = _super.call(this) || this;
    /**
     * Previously selected lower (start) value.
     */


    _this._previousStart = 0;
    /**
     * Previously selected upper (end) value.
     */

    _this._previousEnd = 1;
    /**
     * A value of previously selected lower value, used for doubleclick function.
     */

    _this._prevStart = 0;
    /**
     * A value of previously selected upper value, used for doubleclick function.
     */

    _this._prevEnd = 1;
    /**
     * Indicates if the Scrollbar is currently "busy" (animating and or
     * performing zoom by user interaction).
     */

    _this._isBusy = false;
    /**
     * [_skipRangeEvents description]
     *
     * @todo Description
     */

    _this._skipRangeEvents = false;
    /**
     * Update the selection when dragging the grips.
     *
     * If set to `false` selection will be updated only when the grip is
     * released.
     *
     * @default true
     */

    _this.updateWhileMoving = true;
    _this.className = "Scrollbar";
    _this.minHeight = 12;
    _this.minWidth = 12;
    _this.animationDuration = 0;
    _this.animationEasing = _utils_Ease__WEBPACK_IMPORTED_MODULE_11__.cubicOut;

    _this.margin(10, 10, 10, 10);

    var interfaceColors = new _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_8__.InterfaceColorSet(); // background is also container as it might contain graphs, grid, etc

    var background = _this.background;
    background.cornerRadius(10, 10, 10, 10);
    background.fill = interfaceColors.getFor("fill");
    background.fillOpacity = 0.5; // Make system tooltips appear by default

    _this.showSystemTooltip = true;
    _this.startGrip = new _elements_ResizeButton__WEBPACK_IMPORTED_MODULE_1__.ResizeButton();
    _this.endGrip = new _elements_ResizeButton__WEBPACK_IMPORTED_MODULE_1__.ResizeButton(); // Default orientation...
    // ... is set in `applyInternalDefaults()` because it accesses `language`
    // and should only be started to access when parent is set
    // Set events

    _this.events.on("transformed", function () {
      _this.updateThumb();
    }, _this, false); // Initial positions


    _this.start = 0;
    _this.end = 1; // Set roles

    _this.role = "scrollbar";
    _this.thumb.role = "slider";
    _this.thumb.readerLive = "polite";
    _this.startGrip.role = "slider";
    _this.endGrip.role = "slider"; // otherwise range changed won't be registered

    _this.events.once("inited", function () {
      _this._previousStart = undefined;

      _this.dispatchRangeChange();
    }, undefined, false);

    _this.hideGrips = false;
    _this.orientation = "horizontal"; // Min/max values for accessibility

    _this.setSVGAttribute({
      "aria-valuemin": "0"
    });

    _this.setSVGAttribute({
      "aria-valuemax": "100"
    });

    _this.applyTheme();

    return _this;
  }
  /**
   * Sets defaults that instantiate some objects that rely on parent, so they
   * cannot be set in constructor.
   */


  Scrollbar.prototype.applyInternalDefaults = function () {
    _super.prototype.applyInternalDefaults.call(this); // Set screen reader tetxt accordingly


    if (this.orientation === "horizontal") {
      if (!_utils_Type__WEBPACK_IMPORTED_MODULE_12__.hasValue(this.readerTitle)) {
        this.readerTitle = this.language.translate("Use TAB to select grip buttons or left and right arrows to change selection");
      }

      if (!_utils_Type__WEBPACK_IMPORTED_MODULE_12__.hasValue(this.thumb.readerDescription)) {
        this.thumb.readerDescription = this.language.translate("Use left and right arrows to move selection");
      }

      if (!_utils_Type__WEBPACK_IMPORTED_MODULE_12__.hasValue(this.startGrip.readerDescription)) {
        this.startGrip.readerDescription = this.language.translate("Use left and right arrows to move left selection");
      }

      if (!_utils_Type__WEBPACK_IMPORTED_MODULE_12__.hasValue(this.endGrip.readerDescription)) {
        this.endGrip.readerDescription = this.language.translate("Use left and right arrows to move right selection");
      }

      this.readerOrientation = "horizontal";
    } else {
      if (!_utils_Type__WEBPACK_IMPORTED_MODULE_12__.hasValue(this.readerTitle)) {
        this.readerTitle = this.language.translate("Use TAB select grip buttons or up and down arrows to change selection");
      }

      if (!_utils_Type__WEBPACK_IMPORTED_MODULE_12__.hasValue(this.thumb.readerDescription)) {
        this.thumb.readerDescription = this.language.translate("Use up and down arrows to move selection");
      }

      if (!_utils_Type__WEBPACK_IMPORTED_MODULE_12__.hasValue(this.startGrip.readerDescription)) {
        this.startGrip.readerDescription = this.language.translate("Use up and down arrows to move upper selection");
      }

      if (!_utils_Type__WEBPACK_IMPORTED_MODULE_12__.hasValue(this.endGrip.readerDescription)) {
        this.endGrip.readerDescription = this.language.translate("Use up and down arrows to move lower selection");
      }

      this.readerOrientation = "vertical";
    }

    this.readerControls = this.baseSprite.uidAttr();
  };
  /**
   * Validates the layout of the scrollbar's elements.
   *
   * @ignore Exclude from docs
   */


  Scrollbar.prototype.validateLayout = function () {
    this.updateSize();

    _super.prototype.validateLayout.call(this); // when size changes, need to update extremes


    this.updateExtremes();
  };
  /**
   * Update background for the scrollbar.
   *
   * @ignore Exclude from docs
   */


  Scrollbar.prototype.processBackground = function () {
    _super.prototype.processBackground.call(this);

    var background = this.background;
    background.clickable = true;
    background.events.on("hit", this.handleBgHit, this, undefined);
  };
  /**
   * Zooms to the particular place when clicked/tapped on the scrollbar
   * background.
   *
   * @ignore Exclude from docs
   * @param event  Event
   */


  Scrollbar.prototype.handleBgHit = function (event) {
    this.makeBusy();
    var point = event.spritePoint;
    point = _utils_Utils__WEBPACK_IMPORTED_MODULE_13__.spritePointToSprite(point, this.background, this);
    var thumb = this.thumb;

    if (this.orientation == "horizontal") {
      var thumbX = point.x - thumb.pixelWidth / 2;
      thumbX = _utils_Math__WEBPACK_IMPORTED_MODULE_10__.fitToRange(thumbX, 0, this.innerWidth - thumb.pixelWidth);
      this._thumbAnimation = thumb.animate({
        property: "x",
        to: thumbX
      }, this.animationDuration, this.animationEasing);
    } else {
      var thumbY = point.y - thumb.pixelHeight / 2;
      thumbY = _utils_Math__WEBPACK_IMPORTED_MODULE_10__.fitToRange(thumbY, 0, this.innerHeight - thumb.pixelHeight);
      this._thumbAnimation = thumb.animate({
        property: "y",
        to: thumbY
      }, this.animationDuration, this.animationEasing);
    }

    if (this.animationDuration > 0) {
      this._thumbAnimation.events.on("animationended", this.makeUnbusy, this, false);
    } else {
      this._thumb.validate();

      this.makeUnbusy();
    }
  };
  /**
   * Set scrollbar as busy. (currently zooming)
   *
   * @ignore Exclude from docs
   */


  Scrollbar.prototype.makeBusy = function () {
    this._isBusy = true;
    this._skipRangeEvents = false;

    if (this._unbusyTimeout) {
      this.removeDispose(this._unbusyTimeout);
    }

    this._unbusyTimeout = undefined;
    this.stopAnimations();
  };
  /**
   * Stops all animations, currently playing for the scrollbar.
   *
   * @ignore Exclude from docs
   */


  Scrollbar.prototype.stopAnimations = function () {
    if (this._thumbAnimation) {
      this._thumbAnimation.stop(true);
    }

    if (this._zoomAnimation) {
      this._zoomAnimation.stop(true);
    }
  };
  /**
   * Cancels "busy" status of the Scrollbar.
   *
   * @ignore Exclude from docs
   */


  Scrollbar.prototype.makeUnbusy = function () {
    /**
     * We cannot make Scrollbar not busy right after release, because then axes
     * will take over controll and Scrollbar will start to animate.
     * Theorethically, it's not right to set timeout by `animationDuration`,
     * however we can not know all the durations of elements we scroll, so we
     * assume that animation duration will be the same as
     * `interpolationDuration` or `rangeChange` duration.
     */
    this._unbusyTimeout = this.setTimeout(this.makeUnbusyReal.bind(this), this.animationDuration * 1.1);
  };
  /**
   * [makeUnbusyReal description]
   *
   * @todo Description
   * @ignore Exclude from docs
   */


  Scrollbar.prototype.makeUnbusyReal = function () {
    this._usingGrip = undefined;
    this._isBusy = false;

    if (!this.updateWhileMoving) {
      this.dispatchRangeChange();
    }
  };
  /**
   * Disptatches rangechanged event if it really changed
   *
   * @ignore Exclude from docs
   */


  Scrollbar.prototype.dispatchRangeChange = function () {
    if (this._previousEnd != this.end || this._previousStart != this.start) {
      this._previousStart = this.start;
      this._previousEnd = this.end;
      this.dispatch("rangechanged");
    }
  };
  /**
   * Updates the "thumb" element. A draggable element between the grips.
   * @ignore
   */


  Scrollbar.prototype.updateThumb = function (dispatchEvents) {
    if (dispatchEvents === void 0) {
      dispatchEvents = true;
    }

    if (!this.parent) {
      return;
    }

    var thumb = this.thumb;
    var start = this.start;
    var end = this.end;
    var startGrip = this.startGrip;
    var endGrip = this.endGrip;

    if (this.orientation == "horizontal") {
      var innerWidth_1 = this.innerWidth;
      thumb.width = innerWidth_1 * (end - start);
      thumb.maxX = innerWidth_1 - thumb.pixelWidth;
      thumb.x = start * innerWidth_1;
      startGrip.moveTo({
        x: thumb.pixelX,
        y: 0
      }, undefined, undefined, true); // overrides dragging

      endGrip.moveTo({
        x: thumb.pixelX + thumb.pixelWidth,
        y: 0
      }, undefined, undefined, true);
      startGrip.readerTitle = this.language.translate("From %1", undefined, this.adapter.apply("positionValue", {
        value: Math.round(start * 100) + "%",
        position: start
      }).value);
      startGrip.readerValueNow = "" + Math.round(start * 100);
      startGrip.readerValueText = startGrip.readerTitle;
      endGrip.readerTitle = this.language.translate("To %1", undefined, this.adapter.apply("positionValue", {
        value: Math.round(end * 100) + "%",
        position: end
      }).value);
      endGrip.readerValueNow = "" + Math.round(end * 100);
      endGrip.readerValueText = endGrip.readerTitle;
    } else {
      var innerHeight_1 = this.innerHeight;
      thumb.height = innerHeight_1 * (end - start);
      thumb.maxY = innerHeight_1 - thumb.pixelHeight;
      thumb.y = (1 - end) * innerHeight_1;
      startGrip.moveTo({
        x: 0,
        y: thumb.pixelY + thumb.pixelHeight
      }, undefined, undefined, true);
      endGrip.moveTo({
        x: 0,
        y: thumb.pixelY
      }, undefined, undefined, true);
      startGrip.readerTitle = this.language.translate("To %1", undefined, this.adapter.apply("positionValue", {
        value: Math.round((1 - start) * 100) + "%",
        position: 1 - start
      }).value);
      startGrip.readerValueNow = "" + Math.round(start * 100);
      startGrip.readerValueText = startGrip.readerTitle;
      endGrip.readerTitle = this.language.translate("From %1", undefined, this.adapter.apply("positionValue", {
        value: Math.round((1 - end) * 100) + "%",
        position: 1 - end
      }).value);
      endGrip.readerValueNow = "" + Math.round(end * 100);
      endGrip.readerValueText = endGrip.readerTitle;
    } // Add accessibility


    thumb.readerTitle = this.language.translate("From %1 to %2", undefined, this.adapter.apply("positionValue", {
      value: Math.round(start * 100) + "%",
      position: start
    }).value, this.adapter.apply("positionValue", {
      value: Math.round(end * 100) + "%",
      position: end
    }).value);
    thumb.readerValueNow = "" + Math.round(start * 100);
    thumb.readerValueText = thumb.readerTitle;
    this.readerValueNow = "" + Math.round(start * 100);
    this.readerValueText = thumb.readerTitle;

    if (!this._skipRangeEvents && this.updateWhileMoving && dispatchEvents) {
      this.dispatchRangeChange();
    }
  };
  /**
   * Updates extremes of the scrollbar.
   */


  Scrollbar.prototype.updateExtremes = function () {
    var orientation = this.orientation;
    var minX = 0;
    var minY = 0;
    var maxX = 0;
    var maxY = 0;

    if (orientation == "horizontal") {
      maxX = this.innerWidth;
      minY = maxY = this.innerHeight / 2;
    } else {
      maxY = this.innerHeight;
      minX = maxX = this.innerWidth / 2;
    }

    var startGrip = this.startGrip;
    startGrip.minX = minX;
    startGrip.maxX = maxX;
    startGrip.minY = minY;
    startGrip.maxY = maxY;
    var endGrip = this.endGrip;
    endGrip.minX = minX;
    endGrip.maxX = maxX;
    endGrip.minY = minY;
    endGrip.maxY = maxY;
    var thumb = this.thumb;
    thumb.minX = minX;
    thumb.maxX = maxX;
    thumb.minY = minY;
    thumb.maxY = maxY;
  };
  /**
   * Updates size of the scrollbar.
   */


  Scrollbar.prototype.updateSize = function () {
    var orientation = this.orientation;
    var startGrip = this.startGrip;

    if (startGrip) {
      startGrip.orientation = orientation;
    }

    if (this.endGrip) {
      this.endGrip.orientation = orientation;
    }

    var thumb = this.thumb;

    if (thumb) {
      if (orientation == "horizontal") {
        if (!_utils_Type__WEBPACK_IMPORTED_MODULE_12__.isNumber(this._pixelWidth)) {
          if (!(this.width instanceof _utils_Percent__WEBPACK_IMPORTED_MODULE_9__.Percent)) {
            this.width = (0,_utils_Percent__WEBPACK_IMPORTED_MODULE_9__.percent)(100);
          }
        } // this teorethically might be wrong, if user indeed sets height of a horizontal scrollbar in percent
        // however without this height might be equal to 100% if previous orientation was set to horizontal
        // so this is ok solution, in case user really wants to have scrollbar height set in percent,
        // he should do this after orientation.


        if (_utils_Type__WEBPACK_IMPORTED_MODULE_12__.hasValue(this.percentHeight)) {
          this.height = this.minHeight;
        }

        thumb.height = this.innerHeight;
        thumb.verticalCenter = "middle";
        thumb.horizontalCenter = "left";
      } else {
        if (!_utils_Type__WEBPACK_IMPORTED_MODULE_12__.isNumber(this._pixelHeight)) {
          if (!(this.height instanceof _utils_Percent__WEBPACK_IMPORTED_MODULE_9__.Percent)) {
            this.height = (0,_utils_Percent__WEBPACK_IMPORTED_MODULE_9__.percent)(100);
          }
        } // same as above with percentHeight


        if (_utils_Type__WEBPACK_IMPORTED_MODULE_12__.hasValue(this.percentWidth)) {
          this.width = this.minWidth;
        }

        thumb.width = this.innerWidth;
        thumb.verticalCenter = "top";
        thumb.horizontalCenter = "middle";
      }
    }
  };

  Object.defineProperty(Scrollbar.prototype, "isBusy", {
    /**
     * Indicates if the Scrollbar is currently "busy" (animating and or
     * performing zoom by user interaction).
     * @return boolean
     */
    get: function get() {
      return this._isBusy;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Scrollbar.prototype, "start", {
    /**
     * @return Position (0-1)
     */
    get: function get() {
      return Math.min(this.getPosition(this._start), this.getPosition(this._end));
    },

    /**
     * ==========================================================================
     * POSITIONS
     * ==========================================================================
     * @hidden
     */

    /**
     * Relative position (0-1) of the start grip.
     *
     * @param position  Position (0-1)
     */
    set: function set(position) {
      if (!this._isBusy) {
        this.__start = position;
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Scrollbar.prototype, "__start", {
    /**
     * @return [description]
     */
    get: function get() {
      return this._start;
    },

    /**
     * [__start description]
     *
     * @todo Description
     * @param position [description]
     */
    set: function set(position) {
      this._start = this.getPosition(position);
      this.updateThumb();
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Scrollbar.prototype, "end", {
    /**
     * @return Position (0-1)
     */
    get: function get() {
      return Math.max(this.getPosition(this._start), this.getPosition(this._end));
    },

    /**
     * Relative position (0-1) of the end grip.
     *
     * @param position  Position (0-1)
     */
    set: function set(position) {
      if (!this._isBusy) {
        this.__end = position;
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Scrollbar.prototype, "__end", {
    /**
     * @return [description]
     */
    get: function get() {
      return this._end;
    },

    /**
     * [__end description]
     *
     * @todo Description
     * @param position [description]
     */
    set: function set(position) {
      this._end = this.getPosition(position);
      this.updateThumb();
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Scrollbar.prototype, "range", {
    /**
     * Current selection range.
     *
     * @readonly
     * @return Range
     */
    get: function get() {
      return {
        start: this.start,
        end: this.end,
        priority: this._usingGrip
      };
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Disables range change events.
   *
   * @ignore Exclude from docs
   */

  Scrollbar.prototype.skipRangeEvents = function () {
    if (!this._isBusy) {
      this._skipRangeEvents = true;
    }
  };
  /**
   * [fixRange description]
   *
   * @todo Description
   * @ignore Exclude from docs
   * @param range  Range
   */


  Scrollbar.prototype.fixRange = function (range) {
    if (range.start != _utils_Math__WEBPACK_IMPORTED_MODULE_10__.round(this._start, 2) || range.end != _utils_Math__WEBPACK_IMPORTED_MODULE_10__.round(this._end, 2)) {
      this._start = range.start;
      this._end = range.end;
      this._skipRangeEvents = true;
      this.updateThumb();
      this._skipRangeEvents = false;
      this.thumb.validate();
      this.thumb.background.validate();
    }
  };
  /**
   * [getPosition description]
   *
   * @todo Description
   * @param position  [description]
   * @return [description]
   */


  Scrollbar.prototype.getPosition = function (position) {
    return _utils_Math__WEBPACK_IMPORTED_MODULE_10__.fitToRange(_utils_Math__WEBPACK_IMPORTED_MODULE_10__.round(position, 4), 0, 1);
  };

  Object.defineProperty(Scrollbar.prototype, "orientation", {
    /**
     * @return Orientation
     */
    get: function get() {
      return this.getPropertyValue("orientation");
    },

    /**
     * ==========================================================================
     * MISC
     * ==========================================================================
     * @hidden
     */

    /**
     * Orientation of the scrollbar.
     *
     * Available options: "horizontal" (default) and "vertical".
     *
     * @default "horizontal"
     * @param value  Orientation
     */
    set: function set(value) {
      if (this.setPropertyValue("orientation", value)) {
        // Set mouse cursors and screen reader tetxt accordingly
        if (value === "horizontal") {
          // Mouse styles
          this.startGrip.cursorOverStyle = _interaction_Mouse__WEBPACK_IMPORTED_MODULE_4__.MouseCursorStyle.horizontalResize;
          this.endGrip.cursorOverStyle = _interaction_Mouse__WEBPACK_IMPORTED_MODULE_4__.MouseCursorStyle.horizontalResize; // Reader text

          /*this.readerTitle = this.language.translate("Use TAB to select grip buttons or left and right arrows to change selection");
          this.thumb.readerDescription = this.language.translate("Use left and right arrows to move selection");
          this.startGrip.readerDescription = this.language.translate("Use left and right arrows to move left selection");
          this.endGrip.readerDescription = this.language.translate("Use left and right arrows to move right selection");*/
        } else {
          // Mouse styles
          this.startGrip.cursorOverStyle = _interaction_Mouse__WEBPACK_IMPORTED_MODULE_4__.MouseCursorStyle.verticalResize;
          this.endGrip.cursorOverStyle = _interaction_Mouse__WEBPACK_IMPORTED_MODULE_4__.MouseCursorStyle.verticalResize; // Reader text

          /*this.readerTitle = this.language.translate("Use TAB select grip buttons or up and down arrows to change selection");
          this.thumb.readerDescription = this.language.translate("Use up and down arrows to move selection");
          this.startGrip.readerDescription = this.language.translate("Use up and down arrows to move upper selection");
          this.endGrip.readerDescription = this.language.translate("Use up and down arrows to move lower selection");*/
        }

        this.updateByOrientation();
        this.invalidate();
      }
    },
    enumerable: true,
    configurable: true
  });
  /**
   * @ignore
   */

  Scrollbar.prototype.updateByOrientation = function () {};

  Object.defineProperty(Scrollbar.prototype, "startGrip", {
    /**
     * @return Grip element
     */
    get: function get() {
      return this._startGrip;
    },

    /**
     * ==========================================================================
     * GRIPS
     * ==========================================================================
     * @hidden
     */

    /**
     * Start grip element. (button)
     *
     * @param button  Grip element
     */
    set: function set(button) {
      if (this._startGrip) {
        this.removeDispose(this._startGrip);
      }

      this._startGrip = button;
      this.processGrip(button);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Scrollbar.prototype, "endGrip", {
    /**
     * @return Grip element
     */
    get: function get() {
      return this._endGrip;
    },

    /**
     * End grip element. (button)
     *
     * @param button  Grip element
     */
    set: function set(button) {
      if (this._endGrip) {
        this.removeDispose(this._endGrip);
      }

      this._endGrip = button;
      this.processGrip(button);
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Decorates the grip button with properties and events.
   *
   * @ignore Exclude from docs
   * @param button Grip button
   */

  Scrollbar.prototype.processGrip = function (button) {
    button.parent = this;
    button.isMeasured = false;
    button.focusable = true;
    button.shouldClone = false; // Set button defaults
    //button.showSystemTooltip = true; // setting this here is not right because we break inheritance

    button.zIndex = 100;
    button.events.on("drag", this.handleGripDrag, this, false);
    button.events.on("dragstop", this.makeUnbusy, this, false);
    button.events.on("down", this.makeBusy, this, false);
    button.events.on("up", this.makeUnbusy, this, false);

    this._disposers.push(button);
  };
  /**
   * Updates positions of related elements after grip element is dragged.
   *
   * @ignore Exclude from docs
   * @param event  Event
   */


  Scrollbar.prototype.handleGripDrag = function (event) {
    this.makeBusy();

    if (event.target === this._startGrip) {
      this._usingGrip = "start";
    } else {
      this._usingGrip = "end";
    }

    if (this.orientation == "horizontal") {
      this._start = this.startGrip.pixelX / this.innerWidth;
      this._end = this.endGrip.pixelX / this.innerWidth;
    } else {
      this._start = 1 - this.startGrip.pixelY / this.innerHeight;
      this._end = 1 - this.endGrip.pixelY / this.innerHeight;
    }

    this.updateThumb();
  };

  Object.defineProperty(Scrollbar.prototype, "thumb", {
    /**
     * @return Thumb element
     */
    get: function get() {
      if (!this._thumb) {
        // Create scrollbar controls (setters will handle adding disposers)
        var thumb = new _elements_Button__WEBPACK_IMPORTED_MODULE_2__.Button();
        thumb.background.cornerRadius(10, 10, 10, 10);
        thumb.padding(0, 0, 0, 0);
        this.thumb = thumb;
      }

      return this._thumb;
    },

    /**
     * A "thumb" element.
     *
     * It's a draggable square space between the grips, that can be used to
     * pan the selection.
     *
     * @param thumb  Thumb element
     */
    set: function set(thumb) {
      var _this = this;

      if (thumb) {
        if (this._thumb) {
          this.removeDispose(this._thumb);
        }

        this._thumb = thumb;
        thumb.parent = this;
        thumb.isMeasured = false;
        thumb.inert = true;
        thumb.draggable = true;
        thumb.clickable = true;
        thumb.hoverable = true;
        thumb.focusable = true;
        thumb.shouldClone = false;
        thumb.zIndex = 0; // TODO remove closures ?
        // Add events
        // Add cursor styles to thumb

        thumb.cursorOverStyle = _interaction_Mouse__WEBPACK_IMPORTED_MODULE_4__.MouseCursorStyle.grab;
        thumb.cursorDownStyle = _interaction_Mouse__WEBPACK_IMPORTED_MODULE_4__.MouseCursorStyle.grabbing;
        thumb.events.on("dragstart", this.makeBusy, this, false);
        thumb.events.on("dragstop", this.makeUnbusy, this, false);
        thumb.events.on("positionchanged", this.handleThumbPosition, this, false);
        thumb.events.on("sizechanged", this.handleThumbPosition, this, false);
        thumb.events.on("doublehit", this.handleDoubleClick, this, false); // Add event for space and ENTER to toggle full zoom out and back
        // (same as doubleclick)

        this._disposers.push((0,_interaction_Interaction__WEBPACK_IMPORTED_MODULE_3__.getInteraction)().body.events.on("keyup", function (ev) {
          if (_utils_Keyboard__WEBPACK_IMPORTED_MODULE_7__.keyboard.isKey(ev.event, ["space", "enter"]) && _this.thumb.isFocused) {
            ev.event.preventDefault();

            _this.handleDoubleClick();
          }
        }));

        this._disposers.push(this._thumb);
      }
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Zooms-in and out the selection on double-click of the thumb.
   *
   * @ignore Exclude from docs
   */

  Scrollbar.prototype.handleDoubleClick = function () {
    this.makeBusy();
    var newStart = 0;
    var newEnd = 1;

    if (this.start != 0 || this.end != 1) {
      this._prevStart = this.start;
      this._prevEnd = this.end;
    } else {
      newStart = this._prevStart;
      newEnd = this._prevEnd;
    }

    var zoomAnimation = this.animate([{
      property: "__start",
      to: newStart
    }, {
      property: "__end",
      to: newEnd
    }], this.animationDuration, this.animationEasing);

    if (zoomAnimation && !zoomAnimation.isFinished()) {
      zoomAnimation.events.on("animationended", this.makeUnbusy, this, false);
      this._zoomAnimation = zoomAnimation;
    } else {
      this.makeUnbusy();
    }
  };
  /**
   * Updates positions of other elements when thumb is moved.
   *
   * @ignore Exclude from docs
   */


  Scrollbar.prototype.handleThumbPosition = function () {
    var thumb = this.thumb;

    if (this.orientation == "horizontal") {
      var innerWidth_2 = this.innerWidth;
      var w = thumb.innerWidth;
      var x = thumb.pixelX;
      this._start = x / innerWidth_2;
      this._end = (x + w) / innerWidth_2;
      this.updateThumb();
    } else {
      var innerHeight_2 = this.innerHeight;
      var h = thumb.innerHeight;
      var y = thumb.pixelY;

      if (y + h > innerHeight_2) {
        y = innerHeight_2 - h;
        thumb.y = y;
      }

      this._start = 1 - (y + h) / innerHeight_2;
      this._end = 1 - y / innerHeight_2;
      this.updateThumb();
    }
  };
  /**
   * Creates a background element for the scrollbar.
   *
   * @ignore Exclude from docs
   * @return Background
   */


  Scrollbar.prototype.createBackground = function () {
    return new _elements_RoundedRectangle__WEBPACK_IMPORTED_MODULE_5__.RoundedRectangle();
  };

  Object.defineProperty(Scrollbar.prototype, "hideGrips", {
    /**
     * @return Show only on hover?
     */
    get: function get() {
      return this._hideGrips;
    },

    /**
     * Use this property to set whether grips should be always visible (`false`),
     * or they should just appear on scrollbar hover (`true`).
     *
     * @param value  Show only on hover?
     */
    set: function set(value) {
      var _this = this;

      this._hideGrips = value;

      if (this._overDisposer) {
        this.removeDispose(this._overDisposer);
      }

      if (this._outDisposer) {
        this.removeDispose(this._outDisposer);
      }

      if (value) {
        this._overDisposer = this.events.on("over", function () {
          _this.startGrip.show();

          _this.endGrip.show();
        }, undefined, false);
        this._outDisposer = this.events.on("out", function () {
          _this.startGrip.hide();

          _this.endGrip.hide();
        }, undefined, false);
        this.startGrip.hide();
        this.endGrip.hide();
      } else {
        this.startGrip.show();
        this.endGrip.show();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Scrollbar.prototype, "animationDuration", {
    /**
     * @return Orientation
     */
    get: function get() {
      return this.getPropertyValue("animationDuration");
    },

    /**
     * Duration in milliseconds of scrollbar animation (happens when user clicks on a background of a scrollbar)
     * @default 0
     * @param value number
     */
    set: function set(value) {
      this.setPropertyValue("animationDuration", value);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Scrollbar.prototype, "animationEasing", {
    /**
     * @return {Function}
     */
    get: function get() {
      return this.getPropertyValue("animationEasing");
    },

    /**
     * Animation easing function.
     * @todo: review description and default
     * @default $ease.cubicOut
     * @param value (value: number) => number
     */
    set: function set(value) {
      this.setPropertyValue("animationEasing", value);
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Adds easing functions to "function" fields.
   *
   * @param field  Field name
   * @return Assign as function?
   */

  Scrollbar.prototype.asFunction = function (field) {
    return field == "animationEasing" || _super.prototype.asIs.call(this, field);
  };

  return Scrollbar;
}(_Container__WEBPACK_IMPORTED_MODULE_0__.Container);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_Registry__WEBPACK_IMPORTED_MODULE_6__.registry.registeredClasses.Scrollbar = Scrollbar;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Slice.js":
/*!***************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/elements/Slice.js ***!
  \***************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Slice": () => (/* binding */ Slice)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Container__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Container */ "./node_modules/@amcharts/amcharts4/.internal/core/Container.js");
/* harmony import */ var _Sprite__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Sprite */ "./node_modules/@amcharts/amcharts4/.internal/core/Sprite.js");
/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _utils_Math__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
/* harmony import */ var _rendering_Path__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../rendering/Path */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Path.js");
/* harmony import */ var _utils_Type__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/* harmony import */ var _utils_Utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/Utils */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Utils.js");
/* harmony import */ var _utils_Percent__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/Percent */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Percent.js");
/* harmony import */ var _rendering_fills_RadialGradient__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../rendering/fills/RadialGradient */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/RadialGradient.js");
/**
 * Slice module.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */










/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Draws a wedged semi-circle - slice. Usually used for Pie/Donut charts.
 *
 * @see {@link ISliceEvents} for a list of available events
 * @see {@link ISliceAdapters} for a list of available Adapters
 */

var Slice =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_9__.__extends)(Slice, _super);
  /**
   * Constructor
   */


  function Slice() {
    var _this = // Init
    _super.call(this) || this;

    _this.className = "Slice"; // Set defaults

    _this.setPropertyValue("cornerRadius", 0);

    _this.setPropertyValue("startAngle", 0);

    _this.setPercentProperty("innerRadius", 0);

    _this.setPercentProperty("radius", 0);

    _this.setPropertyValue("arc", 0);

    _this.setPropertyValue("shiftRadius", 0);

    _this.strokeOpacity = 1;

    _this.setPropertyValue("layout", "none"); // Create a slice wedge element


    _this.slice = _this.createChild(_Sprite__WEBPACK_IMPORTED_MODULE_1__.Sprite);
    _this.slice.isMeasured = false;

    _this._disposers.push(_this.slice); //this.element.attr({ "stroke-linejoin": "round" });
    //this.element.attr({ "stroke-linecap": "round" });
    // Apply theme


    _this.applyTheme();

    return _this;
  }
  /**
   * Draws the element.
   *
   * @ignore Exclude from docs
   */


  Slice.prototype.draw = function () {
    _super.prototype.draw.call(this);

    var radiusY = this.radiusY;

    if (this.radius > 0 && radiusY == 0) {
      radiusY = 0.01;
    }

    this.slice.path = _rendering_Path__WEBPACK_IMPORTED_MODULE_4__.arc(this.startAngle, this.arc, this.radius, this.pixelInnerRadius, radiusY, this.cornerRadius, this.innerCornerRadius);
    this.slice.invalidate();
    this.shiftRadius = this.shiftRadius;

    if (this.realFill instanceof _rendering_fills_RadialGradient__WEBPACK_IMPORTED_MODULE_8__.RadialGradient) {
      this.updateGradient(this.realFill);
    }

    if (this.realStroke instanceof _rendering_fills_RadialGradient__WEBPACK_IMPORTED_MODULE_8__.RadialGradient) {
      this.updateGradient(this.realStroke);
    }
  };

  Slice.prototype.updateGradient = function (gradient) {
    gradient.element.attr({
      "gradientUnits": "userSpaceOnUse"
    });
    gradient.element.attr({
      "r": this.radius
    });
    gradient.cx = 0;
    gradient.cy = 0;
    gradient.element.attr({
      radius: this.radius
    });
  };

  Object.defineProperty(Slice.prototype, "bbox", {
    /**
     * Returns bounding box (square) for this element.
     *
     * @ignore Exclude from docs
     */
    get: function get() {
      if (this.definedBBox) {
        return this.definedBBox;
      }

      if (this.isMeasured) {
        var innerRect = _utils_Math__WEBPACK_IMPORTED_MODULE_3__.getArcRect(this.startAngle, this.startAngle + this.arc, this.pixelInnerRadius);
        var outerRect = _utils_Math__WEBPACK_IMPORTED_MODULE_3__.getArcRect(this.startAngle, this.startAngle + this.arc, this.radius);
        return _utils_Math__WEBPACK_IMPORTED_MODULE_3__.getCommonRectangle([innerRect, outerRect]);
      } else {
        return {
          x: 0,
          y: 0,
          width: 0,
          height: 0
        };
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Slice.prototype, "startAngle", {
    /**
     * @return Angle (0-360)
     */
    get: function get() {
      return this.getPropertyValue("startAngle");
    },

    /**
     * The angle at which left edge of the slice is drawn. (0-360)
     *
     * 0 is to the right of the center.
     *
     * @param value  Angle (0-360)
     */
    set: function set(value) {
      this.setPropertyValue("startAngle", _utils_Math__WEBPACK_IMPORTED_MODULE_3__.normalizeAngle(value), true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Slice.prototype, "arc", {
    /**
     * @return [description]
     */
    get: function get() {
      return this.getPropertyValue("arc");
    },

    /**
     * [arc description]
     *
     * @todo Description
     * @param value [description]
     */
    set: function set(value) {
      if (!_utils_Type__WEBPACK_IMPORTED_MODULE_5__.isNumber(value)) {
        value = 0;
      }

      this.setPropertyValue("arc", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Slice.prototype, "radius", {
    /**
     * @return Radius (px)
     */
    get: function get() {
      var radius = this.getPropertyValue("radius");

      if (!_utils_Type__WEBPACK_IMPORTED_MODULE_5__.isNumber(radius)) {
        radius = 0;
      }

      return radius;
    },

    /**
     * Radius of the slice in pixels.
     *
     * @param value  Radius (px)
     */
    set: function set(value) {
      this.setPropertyValue("radius", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Slice.prototype, "radiusY", {
    /**
     * @return Vertical radius (0-1)
     */
    get: function get() {
      var value = this.getPropertyValue("radiusY");

      if (!_utils_Type__WEBPACK_IMPORTED_MODULE_5__.isNumber(value)) {
        value = this.radius;
      }

      return value;
    },

    /**
     * Vertical radius for creating skewed slices.
     *
     * This is relevant to `radius`, e.g. 0.5 will set vertical radius to half
     * the `radius`.
     *
     * @param value Vertical radius (0-1)
     */
    set: function set(value) {
      this.setPropertyValue("radiusY", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Slice.prototype, "innerRadius", {
    /**
     * @return Radius (px or %)
     */
    get: function get() {
      return this.getPropertyValue("innerRadius");
    },

    /**
     * Inner radius of the slice for creating cut out (donut) slices.
     *
     * @default 0
     * @param value  Radius (px or %)
     */
    set: function set(value) {
      this.setPercentProperty("innerRadius", value, true, false, 10, false);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Slice.prototype, "pixelInnerRadius", {
    /**
     * @return Radius px
     */
    get: function get() {
      return _utils_Utils__WEBPACK_IMPORTED_MODULE_6__.relativeToValue(this.innerRadius, this.radius);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Slice.prototype, "cornerRadius", {
    /**
     * @return Radius (px)
     */
    get: function get() {
      return this.getPropertyValue("cornerRadius");
    },

    /**
     * Radius of slice's outer corners in pixels.
     *
     * @default 0
     * @param value  Radius (px)
     */
    set: function set(value) {
      this.setPropertyValue("cornerRadius", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Slice.prototype, "innerCornerRadius", {
    /**
     * @return Radius (px)
     */
    get: function get() {
      return this.getPropertyValue("innerCornerRadius");
    },

    /**
     * Radius of slice's inner corners in pixels.
     *
     * @default 0
     * @param value  Radius (px)
     */
    set: function set(value) {
      this.setPropertyValue("innerCornerRadius", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Slice.prototype, "shiftRadius", {
    /**
     * @return Radius shift
     */
    get: function get() {
      return this.getPropertyValue("shiftRadius");
    },

    /**
     * Indicates how far (relatively to center) a slice should be moved.
     *
     * The value is relative to the radius of the slice. Meaning 0 no shift,
     * 1 - slice shifted outside by whole of its radius.
     *
     * @param  value  Radius shift
     */
    set: function set(value) {
      this.setPropertyValue("shiftRadius", value);
      value = this.getPropertyValue("shiftRadius");
      this.dx = value * this.radius * this.ix;
      this.dy = value * this.radiusY * this.iy;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Slice.prototype, "ix", {
    /**
     * [ix description]
     *
     * @ignore Exclude from docs
     * @todo Description
     * @return [description]
     */
    get: function get() {
      return _utils_Math__WEBPACK_IMPORTED_MODULE_3__.cos(this.middleAngle);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Slice.prototype, "iy", {
    /**
     * [iy description]
     *
     * @ignore Exclude from docs
     * @todo Description
     * @return [description]
     */
    get: function get() {
      return _utils_Math__WEBPACK_IMPORTED_MODULE_3__.sin(this.middleAngle);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Slice.prototype, "middleAngle", {
    /**
     * An angle of the slice's middle.
     *
     * @ignore Exclude from docs
     * @return Angle
     */
    get: function get() {
      return this.startAngle + this.arc / 2;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * X coordinate for the slice tooltip.
   *
   * @return X
   */

  Slice.prototype.getTooltipX = function () {
    var value = this.getPropertyValue("tooltipX");

    if (_utils_Type__WEBPACK_IMPORTED_MODULE_5__.isNumber(value)) {
      return value;
    }

    var p = 0.5;

    if (value instanceof _utils_Percent__WEBPACK_IMPORTED_MODULE_7__.Percent) {
      p = value.value;
    }

    var innerRadius = _utils_Utils__WEBPACK_IMPORTED_MODULE_6__.relativeToValue(this.innerRadius, this.radius);
    return this.ix * (innerRadius + (this.radius - innerRadius) * p);
  };
  /**
   * Y coordinate for the slice tooltip.
   *
   * @return Y
   */


  Slice.prototype.getTooltipY = function () {
    var value = this.getPropertyValue("tooltipY");

    if (_utils_Type__WEBPACK_IMPORTED_MODULE_5__.isNumber(value)) {
      return value;
    }

    var p = 0.5;

    if (value instanceof _utils_Percent__WEBPACK_IMPORTED_MODULE_7__.Percent) {
      p = value.value;
    }

    var innerRadius = _utils_Utils__WEBPACK_IMPORTED_MODULE_6__.relativeToValue(this.innerRadius, this.radius);
    return this.iy * (innerRadius + (this.radius - innerRadius) * p) + this.slice.dy;
  };

  return Slice;
}(_Container__WEBPACK_IMPORTED_MODULE_0__.Container);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_Registry__WEBPACK_IMPORTED_MODULE_2__.registry.registeredClasses.Slice = Slice;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Slider.js":
/*!****************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/elements/Slider.js ***!
  \****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Slider": () => (/* binding */ Slider)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _core_elements_Scrollbar__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../core/elements/Scrollbar */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Scrollbar.js");
/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/**
 * Slider is a scrollbar with just one selection grip.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */



/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Creates a slider - a version of scrollbar with just one grip.
 *
 * @see {@link ISliderEvents} for a list of available events
 * @see {@link ISliderAdapters} for a list of available Adapters
 */

var Slider =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(Slider, _super);
  /**
   * Constructor
   */


  function Slider() {
    var _this = _super.call(this) || this;

    _this.className = "Slider";
    _this.thumb.opacity = 0;
    _this.thumb.interactionsEnabled = false;
    _this.endGrip.opacity = 0;
    _this.endGrip.interactionsEnabled = false;

    _this.startGrip.events.on("drag", function () {
      _this.endGrip.x = _this.startGrip.x;
      _this.endGrip.y = _this.startGrip.y;
    });

    _this.applyTheme();

    return _this;
  }

  Object.defineProperty(Slider.prototype, "__end", {
    /**
     * @return [description]
     */
    get: function get() {
      return this._start;
    },
    set: function set(value) {},
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Slider.prototype, "end", {
    /**
     * @return [description]
     */
    get: function get() {
      return this._start;
    },

    /**
     * Relative position (0-1) of the end grip.
     *
     * @param position  Position (0-1)
     */
    set: function set(position) {},
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Slider.prototype, "start", {
    /**
     * @return Position (0-1)
     */
    get: function get() {
      return this._start;
    },

    /**
     * Relative position (0-1) of the start grip.
     *
     * @param position  Position (0-1)
     */
    set: function set(position) {
      if (!this._isBusy) {
        this.__start = position;
      }
    },
    enumerable: true,
    configurable: true
  });
  return Slider;
}(_core_elements_Scrollbar__WEBPACK_IMPORTED_MODULE_0__.Scrollbar);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses.Slider = Slider;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/elements/SwitchButton.js":
/*!**********************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/elements/SwitchButton.js ***!
  \**********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "SwitchButton": () => (/* binding */ SwitchButton)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Container__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Container */ "./node_modules/@amcharts/amcharts4/.internal/core/Container.js");
/* harmony import */ var _Label__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Label */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Label.js");
/* harmony import */ var _elements_Button__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../elements/Button */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Button.js");
/* harmony import */ var _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/utils/InterfaceColorSet */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/InterfaceColorSet.js");
/* harmony import */ var _core_elements_Circle__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../core/elements/Circle */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Circle.js");
/* harmony import */ var _core_utils_Percent__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../core/utils/Percent */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Percent.js");
/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/**
 * Functionality for drawing simple SwitchButtons.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */








/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * SwitchButton class is capable of drawing a simple rectangular SwitchButton with
 * optionally rounded corners and an icon in it.
 *
 * @see {@link ISwitchButtonEvents} for a list of available events
 * @see {@link ISwitchButtonAdapters} for a list of available Adapters
 */

var SwitchButton =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_7__.__extends)(SwitchButton, _super);
  /**
   * Constructor
   */


  function SwitchButton() {
    var _this = // Init
    _super.call(this) || this;

    _this.className = "SwitchButton";
    _this.tooltipY = 0; // Set defaults

    _this.layout = "horizontal";
    _this.contentAlign = "center";
    _this.contentValign = "middle";

    _this.padding(8, 16, 8, 16);

    _this.setStateOnChildren = true;

    _this.states.create("active");

    var interfaceColors = new _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_3__.InterfaceColorSet(); // Create the label element

    var leftLabel = new _Label__WEBPACK_IMPORTED_MODULE_1__.Label();
    leftLabel.fillOpacity = 0.3;
    var llas = leftLabel.states.create("active");
    llas.properties.fillOpacity = 1;
    leftLabel.isActive = true;
    _this.leftLabel = leftLabel;
    var button = new _elements_Button__WEBPACK_IMPORTED_MODULE_2__.Button();
    var circle = new _core_elements_Circle__WEBPACK_IMPORTED_MODULE_4__.Circle();
    button.contentValign = "none";
    button.padding(0, 0, 0, 0);
    circle.radius = 10;
    button.icon = circle;
    button.icon.valign = "middle";
    button.label = undefined;
    var p100 = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_5__.percent)(100);
    button.background.cornerRadius(p100, p100, p100, p100);
    button.width = circle.radius * 3.5;
    button.height = circle.radius * 2.1;
    button.marginLeft = 8;
    button.marginRight = 8;
    button.togglable = true;
    circle.dx = -circle.radius * 0.7;
    circle.fill = interfaceColors.getFor("primaryButton");
    var hs = circle.states.create("hover");
    hs.properties.fill = interfaceColors.getFor("primaryButtonHover");
    var as = circle.states.create("active");
    as.properties.fill = interfaceColors.getFor("primaryButtonActive");
    as.properties.dx = circle.radius * 0.7;
    _this.switchButton = button;

    _this.events.on("toggled", function () {
      _this.leftLabel.isActive = !_this.isActive;
      _this.rightLabel.isActive = _this.isActive;
    }); // Create the label element


    var rightLabel = new _Label__WEBPACK_IMPORTED_MODULE_1__.Label();
    rightLabel.fillOpacity = 0.3;
    var rlas = rightLabel.states.create("active");
    rlas.properties.fillOpacity = 1;
    _this.rightLabel = rightLabel; // Set up accessibility
    // A Button should be always focusable

    _this.role = "button";
    _this.focusable = true;
    rightLabel.valign = "middle";
    leftLabel.valign = "middle";
    button.valign = "middle"; // Apply theme

    _this.applyTheme();

    return _this;
  }

  Object.defineProperty(SwitchButton.prototype, "leftLabel", {
    /**
     * @return Left label element
     */
    get: function get() {
      return this._leftLabel;
    },

    /**
     * [[Label]] element to be used for left text.
     *
     * @param left label element
     */
    set: function set(label) {
      if (this._leftLabel) {
        this.removeDispose(this._leftLabel);
      }

      this._leftLabel = label;

      if (label) {
        label.parent = this;
        label.interactionsEnabled = false;
        label.shouldClone = false;

        this._disposers.push(this._leftLabel);
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(SwitchButton.prototype, "rightLabel", {
    /**
     * @return Rigth label element
     */
    get: function get() {
      return this._rightLabel;
    },

    /**
     * [[Label]] element to be used for left text.
     *
     * @param rigth label element
     */
    set: function set(label) {
      if (this._rightLabel) {
        this.removeDispose(this._rightLabel);
      }

      this._rightLabel = label;

      if (label) {
        label.parent = this;
        label.interactionsEnabled = false;
        label.shouldClone = false;

        this._disposers.push(this._rightLabel);
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(SwitchButton.prototype, "switch", {
    /**
     * @ignore
     * @deprecated Use `switchButton` instead
     */
    get: function get() {
      return this._switchButton;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(SwitchButton.prototype, "switchButton", {
    /**
     * @return Button
     */
    get: function get() {
      return this._switchButton;
    },

    /**
     * A [[Button]] element for switch.
     *
     * @param Button
     */
    set: function set(button) {
      if (this._switchButton) {
        this.removeDispose(this._switchButton);
      }

      this._switchButton = button;

      if (button) {
        button.parent = this;
        button.shouldClone = false;

        this._disposers.push(this._switchButton);
      }
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Copies properties and other attributes.
   *
   * @param source  Source
   */

  SwitchButton.prototype.copyFrom = function (source) {
    _super.prototype.copyFrom.call(this, source);

    if (source.leftLabel) {
      this.leftLabel.copyFrom(source.leftLabel);
    }

    if (source.rightLabel) {
      this.rightLabel.copyFrom(source.rightLabel);
    }

    if (source.switchButton) {
      this.switchButton.copyFrom(source.switchButton);
    }
  };

  return SwitchButton;
}(_Container__WEBPACK_IMPORTED_MODULE_0__.Container);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_Registry__WEBPACK_IMPORTED_MODULE_6__.registry.registeredClasses.SwitchButton = SwitchButton;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/elements/TextLink.js":
/*!******************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/elements/TextLink.js ***!
  \******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "TextLink": () => (/* binding */ TextLink)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _core_elements_Label__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../core/elements/Label */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Label.js");
/* harmony import */ var _core_interaction_Mouse__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/interaction/Mouse */ "./node_modules/@amcharts/amcharts4/.internal/core/interaction/Mouse.js");
/* harmony import */ var _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/utils/InterfaceColorSet */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/InterfaceColorSet.js");
/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/**
 * A module that defines Text element used to indicate links.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */





/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Creates a text element with a link.
 *
 * @see {@link ITextLinkEvents} for a list of available events
 * @see {@link ITextLinkAdapters} for a list of available Adapters
 */

var TextLink =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_4__.__extends)(TextLink, _super);
  /**
   * Constructor
   */


  function TextLink() {
    var _this = _super.call(this) || this;

    _this.className = "TextLink";
    _this.selectable = true;
    var interfaceColors = new _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_2__.InterfaceColorSet();
    _this.fill = interfaceColors.getFor("primaryButton").brighten(0.3);

    var hoverState = _this.states.create("hover");

    hoverState.properties.fill = interfaceColors.getFor("primaryButtonHover").brighten(0.3);

    var downState = _this.states.create("down");

    downState.properties.fill = interfaceColors.getFor("primaryButtonDown").brighten(0.3);
    _this.cursorOverStyle = _core_interaction_Mouse__WEBPACK_IMPORTED_MODULE_1__.MouseCursorStyle.pointer;

    _this.applyTheme();

    return _this;
  }

  return TextLink;
}(_core_elements_Label__WEBPACK_IMPORTED_MODULE_0__.Label);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_Registry__WEBPACK_IMPORTED_MODULE_3__.registry.registeredClasses.TextLink = TextLink;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Tooltip.js":
/*!*****************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/elements/Tooltip.js ***!
  \*****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Tooltip": () => (/* binding */ Tooltip)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Container__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Container */ "./node_modules/@amcharts/amcharts4/.internal/core/Container.js");
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _PointedRectangle__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./PointedRectangle */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/PointedRectangle.js");
/* harmony import */ var _elements_Label__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../elements/Label */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Label.js");
/* harmony import */ var _utils_Animation__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/Animation */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Animation.js");
/* harmony import */ var _utils_Color__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/Color */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Color.js");
/* harmony import */ var _rendering_filters_DropShadowFilter__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../rendering/filters/DropShadowFilter */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/filters/DropShadowFilter.js");
/* harmony import */ var _utils_Math__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
/* harmony import */ var _utils_Ease__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/Ease */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Ease.js");
/* harmony import */ var _utils_Utils__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/Utils */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Utils.js");
/**
 * Provides functionality used to creating and showing tooltips (balloons).
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */











/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Tooltip displays text and/or multimedia information in a balloon over chart
 * area.
 * @see {@link ITooltipEvents} for a list of available events
 * @see {@link ITooltipAdapters} for a list of available Adapters
 */

var Tooltip =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_10__.__extends)(Tooltip, _super);
  /**
   * Constructor
   */


  function Tooltip() {
    var _this = // Init
    _super.call(this) || this;
    /**
     * Holds numeric boundary values. Calculated from the `boundingContainer`.
     * @ignore
     */


    _this._boundingRect = {
      x: -40000,
      y: -40000,
      width: 80000,
      height: 80000
    };
    /**
     * Coordinates tooltip's pointer (stem) should point to.
     */

    _this._pointTo = {
      x: 0,
      y: 0
    };
    /**
     * If set to `true` the pointer/stem of the Tooltip will not go outside
     * Tooltip's width or height depending on pointer's orientation.
     *
     * @default false
     */

    _this.fitPointerToBounds = false;
    /**
     * If `tooltipOrientation` is vertical, it can be drawn below or above point
     * We need to know this when solving overlapping.
     */

    _this._verticalOrientation = "up";
    /**
     * @ignore
     */

    _this.fixDoc = true;
    _this.className = "Tooltip";
    _this.isMeasured = false;
    _this.getFillFromObject = true;

    _this.margin(5, 5, 5, 5);

    _this.defaultState.transitionDuration = 1;
    _this.hiddenState.transitionDuration = 1; // Create chrome/background

    var background = _this.background;
    background.interactionsEnabled = false;
    background.fillOpacity = 0.9;
    background.strokeWidth = 1;
    background.strokeOpacity = 1;
    background.stroke = (0,_utils_Color__WEBPACK_IMPORTED_MODULE_5__.color)("#ffffff");
    background.cornerRadius = 3;
    background.pointerLength = 6;
    background.pointerBaseWidth = 10;
    var dropShadow = new _rendering_filters_DropShadowFilter__WEBPACK_IMPORTED_MODULE_6__.DropShadowFilter();
    dropShadow.dy = 1;
    dropShadow.dx = 1;
    dropShadow.opacity = 0.5;
    background.filters.push(dropShadow);
    _this.autoTextColor = true; // Create text element

    var label = _this.createChild(_elements_Label__WEBPACK_IMPORTED_MODULE_3__.Label);

    label.shouldClone = false;
    _this.label = label;
    label.padding(7, 12, 4, 12);
    label.interactionsEnabled = false;
    label.horizontalCenter = "middle";
    label.fill = (0,_utils_Color__WEBPACK_IMPORTED_MODULE_5__.color)("#ffffff");

    _this._disposers.push(label);

    _this.label.events.on("sizechanged", _this.drawBackground, _this);

    _this.label.zIndex = 1; // @todo remove this line when bg sorting is solved
    // Set defaults

    _this.pointerOrientation = "vertical";
    _this.animationDuration = 0;
    _this.animationEasing = _utils_Ease__WEBPACK_IMPORTED_MODULE_8__.cubicOut;

    _this.setPropertyValue("showInViewport", false); // Set accessibility options


    _this.role = "tooltip";
    _this.visible = false;
    _this.opacity = 0;
    _this.x = 0;
    _this.y = 0;

    _this.events.on("visibilitychanged", _this.handleVisibility, _this); // Apply theme


    _this.applyTheme();

    return _this;
  }

  Tooltip.prototype.handleVisibility = function () {
    if (this.visible) {
      this.label.invalidate();
    }
  };

  Object.defineProperty(Tooltip.prototype, "getStrokeFromObject", {
    /**
     * Specifies if tooltip background should get stroke color from the sprite it is pointing to.
     *
     * @return {boolean}
     * @default false
     */
    get: function get() {
      return this.getPropertyValue("getStrokeFromObject");
    },

    /**
     * Specifies if tooltip background should get stroke color from the sprite it is pointing to.
     *
     * @param value boolean
     */
    set: function set(value) {
      this.setPropertyValue("getStrokeFromObject", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Tooltip.prototype, "autoTextColor", {
    /**
     * @return {boolean}
     */
    get: function get() {
      return this.getPropertyValue("autoTextColor");
    },

    /**
     * Specifies if text color should be chosen automatically for a better
     * readability.
     *
     * IMPORTANT: this feature is generally ignored, if `getFillFromObject = false`.
     *
     * If inheriting of `fill` color from object tooltip is displayed for is
     * disabled, this feature will not work. If you are explicitly setting a
     * color for tooltip background, you may set a color for its label as well
     * using `tooltip.label.fill` property.
     *
     *
     * @param value boolean
     */
    set: function set(value) {
      this.setPropertyValue("autoTextColor", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Tooltip.prototype, "keepTargetHover", {
    /**
     * @return Keep target hovered?
     */
    get: function get() {
      return this.getPropertyValue("keepTargetHover");
    },

    /**
     * If this tooltip is displayed on hover on some other object, keep that
     * element hovered if hovering on the tooltip.
     *
     * @default false
     * @since 4.1.13
     * @param  value  Keep target hovered?
     */
    set: function set(value) {
      var _this = this;

      if (this.setPropertyValue("keepTargetHover", value, true)) {
        if (value) {
          this.hoverable = true;
          this.background.interactionsEnabled = true;

          this._disposers.push(this.events.on("over", function (ev) {
            if (_this.targetSprite && _this.targetSprite.hoverable) {
              _this.targetSprite.isHover = true;
            }
          }));

          this._disposers.push(this.events.on("out", function (ev) {
            if (_this.targetSprite && _this.targetSprite.hoverable) {
              //this.hideTooltip();
              //this.targetSprite.handleOut();
              _this.targetSprite.isHover = false;
            }
          }));
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Tooltip.prototype, "showInViewport", {
    /**
     * @return Force showing tooltip?
     */
    get: function get() {
      return this.getPropertyValue("showInViewport");
    },

    /**
     * Normally, a tooltip will hide itself if it is pointing to a coordinate
     * that is outside viewport.
     *
     * Setting this setting to `true` will override that and make tooltip
     * appear next to the viewport edge closest to the target point.
     *
     * @default false
     * @since 4.5.7
     * @param  value  Force showing tooltip?
     */
    set: function set(value) {
      this.setPropertyValue("showInViewport", value);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Tooltip.prototype, "getFillFromObject", {
    /**
     * Specifies if tooltip background should get fill color from the sprite it is pointing to.
     *
     * @return {boolean}
     * @default true
     */
    get: function get() {
      return this.getPropertyValue("getFillFromObject");
    },

    /**
     * @param value boolean
     */
    set: function set(value) {
      this.setPropertyValue("getFillFromObject", value, true);
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Creates and returns a background element.
   *
   * @ignore Exclude from docs
   * @return Background
   */

  Tooltip.prototype.createBackground = function () {
    return new _PointedRectangle__WEBPACK_IMPORTED_MODULE_2__.PointedRectangle();
  };

  Object.defineProperty(Tooltip.prototype, "pointerOrientation", {
    /**
     * @return Orientation
     */
    get: function get() {
      return this.getPropertyValue("pointerOrientation");
    },

    /**
     * Pointer orientation: `"horizontal"`, `"vertical"`, `"up"`, `"down"`,
     * `"right"`, or `"left"`.
     *
     * Options`"horizontal"` or `"vertical"` are location-aware, meaning they
     * will change position of the Tooltip based on the target point's position
     * in relation to chart center.
     *
     * Options `"up"`, `"down"`, `"right"`, `"left"` are static and will point
     * in the specified direction regardless of the position, even if that means
     * going out of chart/screen bounds.
     *
     * IMPORTANT: in some situations, like having multiple tooltips stacked for
     * multiple series, the `"up"` and `"down"` values might be ignored in order
     * to make tooltip overlap algorithm work.
     *
     * @default "vertical"
     * @param  value  Orientation
     */
    set: function set(value) {
      this.setPropertyValue("pointerOrientation", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Tooltip.prototype, "animationDuration", {
    /**
     * @return Orientation
     */
    get: function get() {
      return this.getPropertyValue("animationDuration");
    },

    /**
     * Duration in milliseconds for the animation to take place when the tooltip
     * is moving from one place to another.
     *
     * @default 0
     * @param value  number
     */
    set: function set(value) {
      this.setPropertyValue("animationDuration", value);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Tooltip.prototype, "animationEasing", {
    /**
     * @return {Function}
     */
    get: function get() {
      return this.getPropertyValue("animationEasing");
    },

    /**
     * Tooltip animation (moving from one place to another) easing function.
     *
     * @default $ease.cubicOut
     * @param value (value: number) => number
     */
    set: function set(value) {
      this.setPropertyValue("animationEasing", value);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Tooltip.prototype, "html", {
    /**
     * @return HTML content
     */
    get: function get() {
      return this.label.html;
    },

    /**
     * HTML content for the Tooltip.
     *
     * Provided value will be used as is, without applying any further
     * formatting to it.
     *
     * @param value  HTML content
     */
    set: function set(value) {
      if (this.label.html != value) {
        this.label.html = value;
        this.invalidate();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Tooltip.prototype, "text", {
    /**
     * @return SVG text
     */
    get: function get() {
      return this.label.text;
    },

    /**
     * SVG text content for the Tooltip.
     *
     * Text can have a number of formatting options supported by
     * [[TextFormatter]].
     *
     * @param value  SVG text
     */
    set: function set(value) {
      if (this.label.text != value) {
        this.label.text = value;
        this.invalidate();
      }
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Creates the Tooltip.
   *
   * @ignore Exclude from docs
   */

  Tooltip.prototype.draw = function () {
    _super.prototype.draw.call(this);

    var label = this.label;

    if (label.invalid) {
      label.validate();
    }

    var x = this._pointTo.x;
    var y = this._pointTo.y;
    var boundingRect = this._boundingRect;
    var textW = label.measuredWidth;
    var textH = label.measuredHeight;
    var pointerLength = this.background.pointerLength;
    var textX;
    var textY;

    if (this.ignoreBounds) {
      boundingRect = undefined;
    } // try to handle if text is wider than br


    if (boundingRect && this.fixDoc && textW > boundingRect.width) {
      // TODO maybe this isn't needed ?
      _utils_Utils__WEBPACK_IMPORTED_MODULE_9__.spritePointToDocument({
        x: boundingRect.x,
        y: boundingRect.y
      }, this.parent);
      var p1 = _utils_Utils__WEBPACK_IMPORTED_MODULE_9__.spritePointToDocument({
        x: boundingRect.x + boundingRect.width,
        y: boundingRect.y + boundingRect.height
      }, this.parent);
      var documentWidth = document.body.offsetWidth; // TODO maybe this isn't needed ?

      _utils_Utils__WEBPACK_IMPORTED_MODULE_9__.used(document.body.offsetHeight);

      if (p1.x > documentWidth / 2) {
        boundingRect.x = boundingRect.width - textW;
      } else {
        boundingRect.width = boundingRect.x + textW;
      }
    }

    var pointerOrientation = this.pointerOrientation; // horizontal

    if (pointerOrientation == "horizontal" || pointerOrientation == "left" || pointerOrientation == "right") {
      textY = -textH / 2;

      if (pointerOrientation == "horizontal") {
        if (boundingRect && x > boundingRect.x + boundingRect.width / 2) {
          textX = -textW / 2 - pointerLength;
        } else {
          textX = textW / 2 + pointerLength;
        }
      } else if (pointerOrientation == "left") {
        textX = textW / 2 + pointerLength;
      } else {
        textX = -textW / 2 - pointerLength;
      }
    } // vertical pointer
    else {
      if (boundingRect) {
        textX = _utils_Math__WEBPACK_IMPORTED_MODULE_7__.fitToRange(0, boundingRect.x - x + textW / 2, boundingRect.x - x + boundingRect.width - textW / 2);
      }

      if (pointerOrientation == "vertical") {
        if (boundingRect && y > boundingRect.y + textH + pointerLength) {
          textY = -textH - pointerLength;
          this._verticalOrientation = "up";
        } else {
          textY = pointerLength;
          this._verticalOrientation = "down";
        }
      } else if (pointerOrientation == "down") {
        textY = -textH - pointerLength;
        this._verticalOrientation = "up";
      } else {
        textY = pointerLength;
        this._verticalOrientation = "down";
      }
    }

    if (boundingRect) {
      textY = _utils_Math__WEBPACK_IMPORTED_MODULE_7__.fitToRange(textY, boundingRect.y - y, boundingRect.y + boundingRect.height - textH - y);
    }

    label.x = textX;
    label.y = textY;
    this.drawBackground();
  };
  /**
   * Overrides functionality from the superclass.
   *
   * @ignore Exclude from docs
   */


  Tooltip.prototype.updateBackground = function () {
    this.group.addToBack(this.background.group);
  };
  /**
   * Draws Tooltip background (chrome, background and pointer/stem).
   *
   * @ignore Exclude from docs
   */


  Tooltip.prototype.drawBackground = function () {
    var label = this.label;
    var background = this.background;
    var textWidth = label.measuredWidth;
    var textHeight = label.measuredHeight;
    var boundingRect = this._boundingRect;
    var bgWidth = textWidth;
    var bgX = label.pixelX - textWidth / 2;
    var bgHeight = textHeight;
    var bgY = label.pixelY;
    var x = this._pointTo.x;
    var y = this._pointTo.y;
    var boundX1 = boundingRect.x - x;
    var boundX2 = boundX1 + boundingRect.width;
    var boundY1 = boundingRect.y - y;
    var boundY2 = boundY1 + boundingRect.height;
    background.x = bgX;
    background.y = bgY;
    background.width = bgWidth;
    background.height = bgHeight;

    if (this.fitPointerToBounds) {
      background.pointerX = _utils_Math__WEBPACK_IMPORTED_MODULE_7__.fitToRange(-background.x, boundX1 - background.x, boundX2 - background.x);
      background.pointerY = _utils_Math__WEBPACK_IMPORTED_MODULE_7__.fitToRange(-background.y, boundY1 - background.y, boundY2 - background.y);
    } else {
      background.pointerX = -background.x;
      background.pointerY = -background.y;
    }

    background.validate();
  };
  /**
   *
   */


  Tooltip.prototype.delayedPointTo = function (point, instantly) {
    var _this = this;

    if (this._pointToDisposer) {
      this._pointToDisposer.dispose();
    }

    this._pointToDisposer = _core_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.events.once("exitframe", function () {
      _this.pointTo(point, instantly);
    });
    this.addDisposer(this._pointToDisposer);
  };
  /**
   * Set nes tooltip's anchor point and moves whole tooltip.
   *
   * @param x  X coordinate
   * @param y  Y coordinate
   */


  Tooltip.prototype.pointTo = function (point, instantly) {
    if (this._pointTo.x != point.x || this._pointTo.y != point.y) {
      this._pointTo = point;
      this.invalidate(); // this helps to avoid strange animation from nowhere on initial show or when balloon was hidden already

      if (!this.visible || instantly) {
        this.moveTo(this._pointTo);

        if (this._animation) {
          this._animation.kill();
        }
      } else {
        // helps to avoid flicker on top/left corner
        if (this.pixelX == 0 && this.pixelY == 0) {
          this.moveTo(this._pointTo);
        } else {
          if (this._animation) {
            this._animation.kill();
          }

          this._animation = new _utils_Animation__WEBPACK_IMPORTED_MODULE_4__.Animation(this, [{
            property: "x",
            to: point.x,
            from: this.pixelX
          }, {
            property: "y",
            to: point.y,
            from: this.pixelY
          }], this.animationDuration, this.animationEasing).start();
        }
      }
    }
  };
  /**
   * Sets numeric boundaries Tooltip needs to obey (so it does not go outside
   * specific area).
   *
   * @ignore Exclude from docs
   * @param rectangle Boundary rectangle
   */


  Tooltip.prototype.setBounds = function (rectangle) {
    var oldRect = this._boundingRect;

    if (oldRect.x != rectangle.x || oldRect.y != rectangle.y || oldRect.width != rectangle.width || oldRect.height != rectangle.height) {
      this._boundingRect = rectangle;
      this.invalidate();
    }
  };

  Object.defineProperty(Tooltip.prototype, "boundingContainer", {
    /**
     * Sets a [[Container]] instance to be used when calculating numeric
     * boundaries for the Tooltip.
     *
     * @ignore Exclude from docs
     * @param container  Boundary container
     */
    set: function set(container) {
      this._boundingContainer = container; // TODO remove closures ?

      container.events.on("sizechanged", this.updateBounds, this);
      container.events.on("positionchanged", this.updateBounds, this);
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Updates numeric boundaries for the Tooltip, based on the
   * `boundingCountrainer`.
   */

  Tooltip.prototype.updateBounds = function () {
    var boundingContainer = this._boundingContainer; // to global

    var rect = _utils_Utils__WEBPACK_IMPORTED_MODULE_9__.spriteRectToSvg({
      x: boundingContainer.pixelX,
      y: boundingContainer.pixelY,
      width: boundingContainer.maxWidth,
      height: boundingContainer.maxHeight
    }, boundingContainer);
    this.setBounds(rect);
  };

  Object.defineProperty(Tooltip.prototype, "ignoreBounds", {
    /**
     * @return Ignore chart bounds?
     */
    get: function get() {
      return this.getPropertyValue("ignoreBounds");
    },

    /**
     * Normally, a tooltip's position will be adjusted so it always fits into
     * chart's coundaries.
     *
     * Setting this to `false` will disable such checks and will allow tooltip
     * to "bleed over" the edge of the chart.
     *
     * @default false
     * @since 4.10.8
     * @param  value  Ignore chart bounds?
     */
    set: function set(value) {
      this.setPropertyValue("ignoreBounds", value);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Tooltip.prototype, "verticalOrientation", {
    /**
     * If tooltipOrientation is vertical, it can be drawn below or above point.
     * We need to know this when solving overlapping.
     *
     * @ignore Exclude from docs
     * @return "up" | "down"
     */
    get: function get() {
      return this._verticalOrientation;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Tooltip.prototype, "tooltip", {
    /**
     * To avoid stackoverflow
     * @ignore
     */
    get: function get() {
      return undefined;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Copies properties and other attributes.
   *
   * @param source  Source
   */

  Tooltip.prototype.copyFrom = function (source) {
    _super.prototype.copyFrom.call(this, source);

    this.label.copyFrom(source.label);

    if (source._boundingRect) {
      this._boundingRect = source._boundingRect;
    }
  };
  /**
   * Adds easing functions to "function" fields.
   *
   * @param field  Field name
   * @return Assign as function?
   */


  Tooltip.prototype.asFunction = function (field) {
    return field == "animationEasing" || _super.prototype.asIs.call(this, field);
  };

  return Tooltip;
}(_Container__WEBPACK_IMPORTED_MODULE_0__.Container);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_core_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses.Tooltip = Tooltip;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Trapezoid.js":
/*!*******************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/elements/Trapezoid.js ***!
  \*******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Trapezoid": () => (/* binding */ Trapezoid)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Sprite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Sprite */ "./node_modules/@amcharts/amcharts4/.internal/core/Sprite.js");
/* harmony import */ var _core_utils_Percent__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/utils/Percent */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Percent.js");
/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _utils_Utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/Utils */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Utils.js");
/* harmony import */ var _utils_Type__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/* harmony import */ var _rendering_Path__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../rendering/Path */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Path.js");
/**
 * Functionality for drawing a trapezoid.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */







/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Used to draw a Trapezoid.
 *
 * @see {@link ITrapezoidEvents} for a list of available events
 * @see {@link ITrapezoidAdapters} for a list of available Adapters
 */

var Trapezoid =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_6__.__extends)(Trapezoid, _super);
  /**
   * Constructor
   */


  function Trapezoid() {
    var _this = _super.call(this) || this;

    _this.className = "Trapezoid";
    _this.element = _this.paper.add("path");
    _this.topSide = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_1__.percent)(100);
    _this.bottomSide = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_1__.percent)(100);
    _this.leftSide = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_1__.percent)(100);
    _this.rightSide = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_1__.percent)(100);
    _this.isMeasured = false; // todo: add measureElement

    _this.applyTheme();

    return _this;
  }
  /**
   * Draws the element.
   *
   * @ignore Exclude from docs
   */


  Trapezoid.prototype.draw = function () {
    _super.prototype.draw.call(this);

    var w = this.pixelWidth;
    var h = this.pixelHeight;
    var ts = _utils_Utils__WEBPACK_IMPORTED_MODULE_3__.relativeToValue(this.topSide, w);
    var bs = _utils_Utils__WEBPACK_IMPORTED_MODULE_3__.relativeToValue(this.bottomSide, w);
    var ls = _utils_Utils__WEBPACK_IMPORTED_MODULE_3__.relativeToValue(this.leftSide, h);
    var rs = _utils_Utils__WEBPACK_IMPORTED_MODULE_3__.relativeToValue(this.rightSide, h); // 1----2
    // |    |
    // 4----3

    var x0 = (w - ts) / 2;
    var y0 = (h - ls) / 2;
    var x1 = w - (w - ts) / 2;
    var y1 = (h - rs) / 2;
    var x2 = w - (w - bs) / 2;
    var y2 = h - (h - rs) / 2;
    var x3 = (w - bs) / 2;
    var y3 = h - (h - ls) / 2;
    var mt = "";
    var mr = "";
    var mb = "";
    var ml = "";

    if (_utils_Type__WEBPACK_IMPORTED_MODULE_4__.hasValue(this.horizontalNeck)) {
      var hn = this.horizontalNeck.value;
      mt = _rendering_Path__WEBPACK_IMPORTED_MODULE_5__.lineTo({
        x: w * hn,
        y: Math.max(y0, y1)
      });
      mb = _rendering_Path__WEBPACK_IMPORTED_MODULE_5__.lineTo({
        x: w * hn,
        y: Math.min(y2, y3)
      });
    }

    if (_utils_Type__WEBPACK_IMPORTED_MODULE_4__.hasValue(this.verticalNeck)) {
      var vn = this.verticalNeck.value;
      mr = _rendering_Path__WEBPACK_IMPORTED_MODULE_5__.lineTo({
        x: Math.min(x1, x2),
        y: h * vn
      });
      ml = _rendering_Path__WEBPACK_IMPORTED_MODULE_5__.lineTo({
        x: Math.max(x0, x3),
        y: h * vn
      });
    }

    var path = _rendering_Path__WEBPACK_IMPORTED_MODULE_5__.moveTo({
      x: x0,
      y: y0
    }) + mt + _rendering_Path__WEBPACK_IMPORTED_MODULE_5__.lineTo({
      x: x1,
      y: y1
    }) + mr + _rendering_Path__WEBPACK_IMPORTED_MODULE_5__.lineTo({
      x: x2,
      y: y2
    }) + mb + _rendering_Path__WEBPACK_IMPORTED_MODULE_5__.lineTo({
      x: x3,
      y: y3
    }) + ml;
    this.path = path;
  };

  Object.defineProperty(Trapezoid.prototype, "topSide", {
    /**
     * @return Width
     */
    get: function get() {
      return this.getPropertyValue("topSide");
    },

    /**
     * Wdith of the top side. Absolute (px) or relative ([[Percent]]).
     *
     * @default Percent(100)
     * @param value  Width
     */
    set: function set(value) {
      this.setPercentProperty("topSide", value, true, false, 10, false);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Trapezoid.prototype, "bottomSide", {
    /**
     * @return Width
     */
    get: function get() {
      return this.getPropertyValue("bottomSide");
    },

    /**
     * Wdith of the bottom side. Absolute (px) or relative ([[Percent]]).
     *
     * @default Percent(100)
     * @param value  Width
     */
    set: function set(value) {
      this.setPercentProperty("bottomSide", value, true, false, 10, false);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Trapezoid.prototype, "leftSide", {
    /**
     * @return Height
     */
    get: function get() {
      return this.getPropertyValue("leftSide");
    },

    /**
     * Height of the left side. Absolute (px) or relative ([[Percent]]).
     *
     * @default Percent(100)
     * @param value  Height
     */
    set: function set(value) {
      this.setPercentProperty("leftSide", value, true, false, 10, false);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Trapezoid.prototype, "rightSide", {
    /**
     * @return Height
     */
    get: function get() {
      return this.getPropertyValue("rightSide");
    },

    /**
     * Height of the right side. Absolute (px) or relative ([[Percent]]).
     *
     * @default Percent(100)
     * @param value  Height
     */
    set: function set(value) {
      this.setPercentProperty("rightSide", value, true, false, 10, false);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Trapezoid.prototype, "horizontalNeck", {
    /**
     * @return Horizontal neck position
     */
    get: function get() {
      return this.getPropertyValue("horizontalNeck");
    },

    /**
     * A relative vertical position of the "neck". If the top and bottom sides
     * are of different width, and `horizontalNeck` is set, a choke point
     * will be created at that position, creating a funnel shape.
     *
     * @param value  Horizontal neck position
     */
    set: function set(value) {
      this.setPropertyValue("horizontalNeck", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Trapezoid.prototype, "verticalNeck", {
    /**
     * @return Vertical neck position
     */
    get: function get() {
      return this.getPropertyValue("verticalNeck");
    },

    /**
     * A relative horizontal position of the "neck". If the left and right sides
     * are of different height, and `verticalNeck` is set, a choke point
     * will be created at that position, creating a funnel shape.
     *
     * @param value  Vertical neck position
     */
    set: function set(value) {
      this.setPropertyValue("verticalNeck", value, true);
    },
    enumerable: true,
    configurable: true
  });
  return Trapezoid;
}(_Sprite__WEBPACK_IMPORTED_MODULE_0__.Sprite);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_Registry__WEBPACK_IMPORTED_MODULE_2__.registry.registeredClasses.Trapezoid = Trapezoid;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Triangle.js":
/*!******************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/elements/Triangle.js ***!
  \******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Triangle": () => (/* binding */ Triangle)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Sprite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Sprite */ "./node_modules/@amcharts/amcharts4/.internal/core/Sprite.js");
/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _rendering_Path__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../rendering/Path */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Path.js");
/**
 * Functionality for drawing triangles.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */




/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Used to draw a triangle.
 *
 * @see {@link ITriangleEvents} for a list of available events
 * @see {@link ITriangleAdapters} for a list of available Adapters
 */

var Triangle =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__extends)(Triangle, _super);
  /**
   * Constructor
   */


  function Triangle() {
    var _this = _super.call(this) || this;

    _this.className = "Triangle";
    _this.element = _this.paper.add("path");
    _this.direction = "top";

    _this.applyTheme();

    return _this;
  }
  /**
   * Draws the element.
   *
   * @ignore Exclude from docs
   */


  Triangle.prototype.draw = function () {
    _super.prototype.draw.call(this);

    var w = this.pixelWidth;
    var h = this.pixelHeight;
    var path;

    switch (this.direction) {
      case "right":
        path = _rendering_Path__WEBPACK_IMPORTED_MODULE_2__.moveTo({
          x: 0,
          y: 0
        }) + _rendering_Path__WEBPACK_IMPORTED_MODULE_2__.lineTo({
          x: w,
          y: h / 2
        }) + _rendering_Path__WEBPACK_IMPORTED_MODULE_2__.lineTo({
          x: 0,
          y: h
        }) + _rendering_Path__WEBPACK_IMPORTED_MODULE_2__.closePath();
        break;

      case "left":
        path = _rendering_Path__WEBPACK_IMPORTED_MODULE_2__.moveTo({
          x: w,
          y: 0
        }) + _rendering_Path__WEBPACK_IMPORTED_MODULE_2__.lineTo({
          x: 0,
          y: h / 2
        }) + _rendering_Path__WEBPACK_IMPORTED_MODULE_2__.lineTo({
          x: w,
          y: h
        }) + _rendering_Path__WEBPACK_IMPORTED_MODULE_2__.closePath();
        break;

      case "bottom":
        path = _rendering_Path__WEBPACK_IMPORTED_MODULE_2__.moveTo({
          x: 0,
          y: 0
        }) + _rendering_Path__WEBPACK_IMPORTED_MODULE_2__.lineTo({
          x: w,
          y: 0
        }) + _rendering_Path__WEBPACK_IMPORTED_MODULE_2__.lineTo({
          x: w / 2,
          y: h
        }) + _rendering_Path__WEBPACK_IMPORTED_MODULE_2__.closePath();
        break;

      case "top":
        path = _rendering_Path__WEBPACK_IMPORTED_MODULE_2__.moveTo({
          x: w / 2,
          y: 0
        }) + _rendering_Path__WEBPACK_IMPORTED_MODULE_2__.lineTo({
          x: w,
          y: h
        }) + _rendering_Path__WEBPACK_IMPORTED_MODULE_2__.lineTo({
          x: 0,
          y: h
        }) + _rendering_Path__WEBPACK_IMPORTED_MODULE_2__.closePath();
        break;
    }

    this.path = path;
  };

  Object.defineProperty(Triangle.prototype, "direction", {
    /**
     * Returns direction of a triangle
     *
     * @return value
     */
    get: function get() {
      return this.getPropertyValue("direction");
    },

    /**
     * Sets direction of a triangle
     *
     * @param value
     */
    set: function set(value) {
      this.setPropertyValue("direction", value, true);
    },
    enumerable: true,
    configurable: true
  });
  return Triangle;
}(_Sprite__WEBPACK_IMPORTED_MODULE_0__.Sprite);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses.Triangle = Triangle;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/elements/WavedCircle.js":
/*!*********************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/elements/WavedCircle.js ***!
  \*********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "WavedCircle": () => (/* binding */ WavedCircle)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Circle__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Circle */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Circle.js");
/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _rendering_Path__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../rendering/Path */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Path.js");
/* harmony import */ var _utils_Math__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
/* harmony import */ var _utils_Utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/Utils */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Utils.js");
/* harmony import */ var _core_rendering_Smoothing__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../core/rendering/Smoothing */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Smoothing.js");
/**
 * Functionality for drawing waved circles.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */







/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Draws a waved circle.
 *
 * @see {@link IWavedCircleEvents} for a list of available events
 * @see {@link IWavedCircleAdapters} for a list of available Adapters
 */

var WavedCircle =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_6__.__extends)(WavedCircle, _super);
  /**
   * Constructor
   */


  function WavedCircle() {
    var _this = _super.call(this) || this;

    _this.className = "WavedCircle";
    _this.element = _this.paper.add("path");
    _this.waveLength = 16;
    _this.waveHeight = 4;
    _this.fill = undefined;
    _this.fillOpacity = 0;
    _this.tension = 0.8;

    _this.applyTheme();

    return _this;
  }
  /**
   * Draws the waved line.
   *
   * @ignore Exclude from docs
   */


  WavedCircle.prototype.draw = function () {
    var path = "";
    var radius = this.pixelRadius;

    if (radius > 0) {
      var points = this.getPoints(radius);
      path = _rendering_Path__WEBPACK_IMPORTED_MODULE_2__.moveTo(points[0]) + new _core_rendering_Smoothing__WEBPACK_IMPORTED_MODULE_5__.Tension(this.tension, this.tension).smooth(points);
    }

    var innerRadius = this.pixelInnerRadius;

    if (innerRadius > 0) {
      var points = this.getPoints(innerRadius);
      points.reverse();
      path += _rendering_Path__WEBPACK_IMPORTED_MODULE_2__.moveTo(points[0]) + new _core_rendering_Smoothing__WEBPACK_IMPORTED_MODULE_5__.Tension(this.tension, this.tension).smooth(points);
    }

    this.path = path;
  };
  /**
   * Returns points that circle consists of.
   *
   * @param radius  Radius (px)
   * @return Points
   */


  WavedCircle.prototype.getPoints = function (radius) {
    var circleLength = radius * Math.PI * 2;
    var halfWaveHeight = this.waveHeight / 2;
    var waveLength = circleLength / Math.round(circleLength / this.waveLength);
    var halfWaveLength = waveLength / 2;
    var points = [];
    var count = circleLength / waveLength;

    for (var i = 0; i <= count; i++) {
      var angle1 = i * waveLength / circleLength * 360;
      var angle2 = (i * waveLength + halfWaveLength) / circleLength * 360;
      points.push({
        x: (radius - halfWaveHeight) * _utils_Math__WEBPACK_IMPORTED_MODULE_3__.cos(angle1),
        y: (radius - halfWaveHeight) * _utils_Math__WEBPACK_IMPORTED_MODULE_3__.sin(angle1)
      });
      points.push({
        x: (radius + halfWaveHeight) * _utils_Math__WEBPACK_IMPORTED_MODULE_3__.cos(angle2),
        y: (radius + halfWaveHeight) * _utils_Math__WEBPACK_IMPORTED_MODULE_3__.sin(angle2)
      });
    }

    points.pop();
    return points;
  };

  Object.defineProperty(WavedCircle.prototype, "innerRadius", {
    /**
     * @return Inner radius
     */
    get: function get() {
      return this.getPropertyValue("innerRadius");
    },

    /**
     * Inner radius of the circle in pixels (absolute) or [[Percent]] (relative).
     *
     * @param value  Inner radius
     */
    set: function set(value) {
      this.setPercentProperty("innerRadius", value, true, false, 10, false);
      this.invalidate();
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(WavedCircle.prototype, "pixelInnerRadius", {
    /**
     * Calculated inner radius of the circle in pixels.
     *
     * @readonly
     * @return Inner radius (px)
     */
    get: function get() {
      return _utils_Utils__WEBPACK_IMPORTED_MODULE_4__.relativeToValue(this.innerRadius, _utils_Math__WEBPACK_IMPORTED_MODULE_3__.min(this.innerWidth / 2, this.innerHeight / 2));
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(WavedCircle.prototype, "waveLength", {
    /**
     * @return Wave length (px)
     */
    get: function get() {
      return this.getPropertyValue("waveLength");
    },

    /**
     * Wave length in pixels.
     *
     * @default 16
     * @param value  Wave length (px)
     */
    set: function set(value) {
      this.setPropertyValue("waveLength", value);
      this.invalidate();
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(WavedCircle.prototype, "waveHeight", {
    /**
     * @return Wave height (px)
     */
    get: function get() {
      return this.getPropertyValue("waveHeight");
    },

    /**
     * Wave height in pixels.
     *
     * @default 4
     * @param value  Wave height (px)
     */
    set: function set(value) {
      this.setPropertyValue("waveHeight", value);
      this.invalidate();
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(WavedCircle.prototype, "tension", {
    /**
     * @return Tension
     */
    get: function get() {
      return this.getPropertyValue("tension");
    },

    /**
     * Tension of the wave.
     *
     * @default 0.8
     * @param value  Tension
     */
    set: function set(value) {
      this.setPropertyValue("tension", value);
      this.invalidate();
    },
    enumerable: true,
    configurable: true
  });
  return WavedCircle;
}(_Circle__WEBPACK_IMPORTED_MODULE_0__.Circle);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses.WavedCircle = WavedCircle;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/elements/WavedLine.js":
/*!*******************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/elements/WavedLine.js ***!
  \*******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "WavedLine": () => (/* binding */ WavedLine)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Line__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Line */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Line.js");
/* harmony import */ var _utils_Color__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/Color */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Color.js");
/* harmony import */ var _rendering_Smoothing__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../rendering/Smoothing */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Smoothing.js");
/* harmony import */ var _rendering_Path__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../rendering/Path */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Path.js");
/**
 * Functionality for drawing waved lines.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */





/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Draws a waved line.
 *
 * @see {@link IWavedLineEvents} for a list of available events
 * @see {@link IWavedLineAdapters} for a list of available Adapters
 */

var WavedLine =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_4__.__extends)(WavedLine, _super);
  /**
   * Constructor
   */


  function WavedLine() {
    var _this = _super.call(this) || this;

    _this.className = "WavedLine";
    _this.element = _this.paper.add("path");
    _this.waveLength = 16;
    _this.waveHeight = 4;
    _this.tension = 0.8;
    _this.pixelPerfect = false;
    _this.fill = (0,_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)();

    _this.applyTheme();

    return _this;
  }
  /**
   * Draws the waved line.
   *
   * @ignore Exclude from docs
   */


  WavedLine.prototype.draw = function () {
    //super.draw();
    var p1 = {
      x: this.x1,
      y: this.y1
    };
    var p2 = {
      x: this.x2,
      y: this.y2
    };
    this.path = _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.moveTo(p1) + (0,_rendering_Smoothing__WEBPACK_IMPORTED_MODULE_2__.wavedLine)(p1, p2, this.waveLength, this.waveHeight, this.tension, true);
  };

  Object.defineProperty(WavedLine.prototype, "waveLength", {
    /**
     * @return Wave length (px)
     */
    get: function get() {
      return this.getPropertyValue("waveLength");
    },

    /**
     * Wave length in pixels.
     *
     * @default 16
     * @param value  Wave length (px)
     */
    set: function set(value) {
      this.setPropertyValue("waveLength", value);
      this.invalidate();
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(WavedLine.prototype, "waveHeight", {
    /**
     * @return Wave height (px)
     */
    get: function get() {
      return this.getPropertyValue("waveHeight");
    },

    /**
     * Wave height in pixels.
     *
     * @default 4
     * @param value  Wave height (px)
     */
    set: function set(value) {
      this.setPropertyValue("waveHeight", value);
      this.invalidate();
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(WavedLine.prototype, "tension", {
    /**
     * @return Tension
     */
    get: function get() {
      return this.getPropertyValue("tension");
    },

    /**
     * Tension of the wave.
     *
     * @default 0.8
     * @param value  Tension
     */
    set: function set(value) {
      this.setPropertyValue("tension", value);
      this.invalidate();
    },
    enumerable: true,
    configurable: true
  });
  return WavedLine;
}(_Line__WEBPACK_IMPORTED_MODULE_0__.Line);



/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/elements/WavedRectangle.js":
/*!************************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/elements/WavedRectangle.js ***!
  \************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "WavedRectangle": () => (/* binding */ WavedRectangle)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Rectangle__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Rectangle */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Rectangle.js");
/* harmony import */ var _rendering_Smoothing__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../rendering/Smoothing */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Smoothing.js");
/* harmony import */ var _rendering_Path__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../rendering/Path */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Path.js");
/**
 * Functionality for drawing rectangles with waved edges.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */




/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Draws a rectangle with waved edges.
 *
 * @see {@link IWavedRectangleEvents} for a list of available events
 * @see {@link IWavedRectangleAdapters} for a list of available Adapters
 */

var WavedRectangle =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__extends)(WavedRectangle, _super);
  /**
   * Constructor
   */


  function WavedRectangle() {
    var _this = // Init
    _super.call(this) || this;

    _this.className = "WavedRectangle"; // Add path element

    _this.element = _this.paper.add("path"); // Set defaults

    _this.waveLength = 16;
    _this.waveHeight = 4;
    _this.tension = 0.8;

    _this.setPropertyValue("wavedLeft", true);

    _this.setPropertyValue("wavedRight", true);

    _this.setPropertyValue("wavedTop", true);

    _this.setPropertyValue("wavedBottom", true); // Apply theme


    _this.applyTheme();

    return _this;
  }
  /**
   * Draws the waved rectangle.
   *
   * @ignore Exclude from docs
   */


  WavedRectangle.prototype.draw = function () {
    _super.prototype.draw.call(this);

    var w = this.pixelWidth;
    var h = this.pixelHeight;

    if (w > 0 && h > 0) {
      var p1 = {
        x: 0,
        y: 0
      };
      var p2 = {
        x: w,
        y: 0
      };
      var p3 = {
        x: w,
        y: h
      };
      var p4 = {
        x: 0,
        y: h
      };
      var waveLengthH = Math.min(w, this.waveLength);
      var waveHeightH = Math.min(h, this.waveHeight);
      var waveLengthV = Math.min(h, this.waveLength);
      var waveHeightV = Math.min(w, this.waveHeight);
      var td = "";
      var rd = "";
      var bd = "";
      var ld = "";

      if (this.wavedTop) {
        td = (0,_rendering_Smoothing__WEBPACK_IMPORTED_MODULE_1__.wavedLine)(p1, p2, waveLengthH, waveHeightH, this.tension, true);
      }

      if (this.wavedRight) {
        rd = (0,_rendering_Smoothing__WEBPACK_IMPORTED_MODULE_1__.wavedLine)(p2, p3, waveLengthV, waveHeightV, this.tension, true);
      }

      if (this.wavedBottom) {
        bd = (0,_rendering_Smoothing__WEBPACK_IMPORTED_MODULE_1__.wavedLine)(p3, p4, waveLengthH, waveHeightH, this.tension, true);
      }

      if (this.wavedLeft) {
        ld = (0,_rendering_Smoothing__WEBPACK_IMPORTED_MODULE_1__.wavedLine)(p4, p1, waveLengthV, waveHeightV, this.tension, true);
      }

      this.path = _rendering_Path__WEBPACK_IMPORTED_MODULE_2__.moveTo(p1) + td + _rendering_Path__WEBPACK_IMPORTED_MODULE_2__.lineTo(p2) + rd + _rendering_Path__WEBPACK_IMPORTED_MODULE_2__.lineTo(p3) + bd + _rendering_Path__WEBPACK_IMPORTED_MODULE_2__.lineTo(p4) + ld + "z";
    }
  };

  Object.defineProperty(WavedRectangle.prototype, "waveLength", {
    /**
     * @return Wave length (px)
     */
    get: function get() {
      return this.getPropertyValue("waveLength");
    },

    /**
     * Wave length in pixels.
     *
     * @default 16
     * @param value  Wave length (px)
     */
    set: function set(value) {
      this.setPropertyValue("waveLength", value);
      this.invalidate();
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(WavedRectangle.prototype, "waveHeight", {
    /**
     * @return Wave height (px)
     */
    get: function get() {
      return this.getPropertyValue("waveHeight");
    },

    /**
     * Wave height in pixels.
     *
     * @default 4
     * @param value  Wave height (px)
     */
    set: function set(value) {
      this.setPropertyValue("waveHeight", value);
      this.invalidate();
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Sets which side should be waved or not. If particular side is set to
   * `false`, a straight line will be drawn on that side.
   *
   * @param top     Top waved?
   * @param right   Right side waved?
   * @param bottom  Bottom Waved?
   * @param left    Left side waved?
   */

  WavedRectangle.prototype.setWavedSides = function (top, right, bottom, left) {
    this.wavedTop = top;
    this.wavedRight = right;
    this.wavedBottom = bottom;
    this.wavedLeft = left;
  };

  Object.defineProperty(WavedRectangle.prototype, "tension", {
    /**
     * @return Tension
     */
    get: function get() {
      return this.getPropertyValue("tension");
    },

    /**
     * Tension of the wave.
     *
     * @default 0.8
     * @param value  Tension
     */
    set: function set(value) {
      this.setPropertyValue("tension", value);
      this.invalidate();
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(WavedRectangle.prototype, "wavedRight", {
    /**
     * @return Wave right side?
     */
    get: function get() {
      return this.getPropertyValue("wavedRight");
    },

    /**
     * Specifies if right side should be waved.
     *
     * @default true
     * @param value Waved?
     */
    set: function set(value) {
      this.setPropertyValue("wavedRight", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(WavedRectangle.prototype, "wavedLeft", {
    /**
     * @return Wave left side?
     */
    get: function get() {
      return this.getPropertyValue("wavedLeft");
    },

    /**
     * Specifies if left side should be waved.
     *
     * @default true
     * @param value Waved?
     */
    set: function set(value) {
      this.setPropertyValue("wavedLeft", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(WavedRectangle.prototype, "wavedTop", {
    /**
     * @return Wave top side?
     */
    get: function get() {
      return this.getPropertyValue("wavedTop");
    },

    /**
     * Specifies if top side should be waved.
     *
     * @default true
     * @param value Waved?
     */
    set: function set(value) {
      this.setPropertyValue("wavedTop", value, true);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(WavedRectangle.prototype, "wavedBottom", {
    /**
     * @return Wave bottom side?
     */
    get: function get() {
      return this.getPropertyValue("wavedBottom");
    },

    /**
     * Specifies if bottom side should be waved.
     *
     * @default true
     * @param value Waved?
     */
    set: function set(value) {
      this.setPropertyValue("wavedBottom", value, true);
    },
    enumerable: true,
    configurable: true
  });
  return WavedRectangle;
}(_Rectangle__WEBPACK_IMPORTED_MODULE_0__.Rectangle);



/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/elements/ZoomOutButton.js":
/*!***********************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/elements/ZoomOutButton.js ***!
  \***********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "ZoomOutButton": () => (/* binding */ ZoomOutButton)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Button__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Button */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Button.js");
/* harmony import */ var _Sprite__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Sprite */ "./node_modules/@amcharts/amcharts4/.internal/core/Sprite.js");
/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/utils/InterfaceColorSet */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/InterfaceColorSet.js");
/* harmony import */ var _rendering_Path__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../rendering/Path */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Path.js");
/* harmony import */ var _core_utils_Type__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../core/utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/**
 * Zoom out button functionality.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */







/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Creates a zoom out button.
 *
 * @see {@link IZoomOutButtonEvents} for a list of available events
 * @see {@link IZoomOutButtonAdapters} for a list of available Adapters
 */

var ZoomOutButton =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_6__.__extends)(ZoomOutButton, _super);
  /**
   * Constructor
   */


  function ZoomOutButton() {
    var _this = // Init
    _super.call(this) || this;

    _this.className = "ZoomOutButton";

    _this.padding(9, 9, 9, 9); //this.dx = - 5;
    //this.dy = 5;


    _this.showSystemTooltip = true;
    var interfaceColors = new _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_3__.InterfaceColorSet();
    var background = _this.background;
    background.cornerRadius(20, 20, 20, 20);
    background.fill = interfaceColors.getFor("primaryButton");
    background.stroke = interfaceColors.getFor("primaryButtonStroke");
    background.strokeOpacity = 0;
    background.states.getKey("hover").properties.fill = interfaceColors.getFor("primaryButtonHover");
    background.states.getKey("down").properties.fill = interfaceColors.getFor("primaryButtonActive"); // Create an icon

    var icon = new _Sprite__WEBPACK_IMPORTED_MODULE_1__.Sprite();
    icon.element = _this.paper.add("path");
    var path = _rendering_Path__WEBPACK_IMPORTED_MODULE_4__.moveTo({
      x: 0,
      y: 0
    });
    path += _rendering_Path__WEBPACK_IMPORTED_MODULE_4__.lineTo({
      x: 11,
      y: 0
    });
    icon.path = path;
    icon.pixelPerfect = true;
    icon.padding(8, 3, 8, 3);
    icon.stroke = interfaceColors.getFor("primaryButtonText");
    _this.icon = icon; // Apply theme

    _this.applyTheme();

    return _this;
  }
  /**
   * Sets defaults that instantiate some objects that rely on parent, so they
   * cannot be set in constructor.
   */


  ZoomOutButton.prototype.applyInternalDefaults = function () {
    _super.prototype.applyInternalDefaults.call(this);

    if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_5__.hasValue(this.readerTitle)) {
      this.readerTitle = this.language.translate("Zoom Out");
    }
  };

  return ZoomOutButton;
}(_Button__WEBPACK_IMPORTED_MODULE_0__.Button);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_Registry__WEBPACK_IMPORTED_MODULE_2__.registry.registeredClasses.ZoomOutButton = ZoomOutButton;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/export/Export.js":
/*!**************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/export/Export.js ***!
  \**************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Export": () => (/* binding */ Export)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _ExportMenu__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ExportMenu */ "./node_modules/@amcharts/amcharts4/.internal/core/export/ExportMenu.js");
/* harmony import */ var _utils_Adapter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/Adapter */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Adapter.js");
/* harmony import */ var _Sprite__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Sprite */ "./node_modules/@amcharts/amcharts4/.internal/core/Sprite.js");
/* harmony import */ var _elements_Modal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../elements/Modal */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Modal.js");
/* harmony import */ var _utils_List__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/List */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/List.js");
/* harmony import */ var _utils_Dictionary__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/Dictionary */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Dictionary.js");
/* harmony import */ var _formatters_DateFormatter__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../formatters/DateFormatter */ "./node_modules/@amcharts/amcharts4/.internal/core/formatters/DateFormatter.js");
/* harmony import */ var _formatters_DurationFormatter__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../formatters/DurationFormatter */ "./node_modules/@amcharts/amcharts4/.internal/core/formatters/DurationFormatter.js");
/* harmony import */ var _formatters_NumberFormatter__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../formatters/NumberFormatter */ "./node_modules/@amcharts/amcharts4/.internal/core/formatters/NumberFormatter.js");
/* harmony import */ var _utils_Language__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/Language */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Language.js");
/* harmony import */ var _utils_Validatable__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../utils/Validatable */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Validatable.js");
/* harmony import */ var _utils_Color__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../utils/Color */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Color.js");
/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _Options__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../Options */ "./node_modules/@amcharts/amcharts4/.internal/core/Options.js");
/* harmony import */ var _utils_DOM__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../utils/DOM */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/DOM.js");
/* harmony import */ var _utils_Browser__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../utils/Browser */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Browser.js");
/* harmony import */ var _utils_Object__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../utils/Object */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Object.js");
/* harmony import */ var _utils_Net__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../utils/Net */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Net.js");
/* harmony import */ var _utils_Type__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/* harmony import */ var _utils_Log__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../utils/Log */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Log.js");
/* harmony import */ var _utils_Utils__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../utils/Utils */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Utils.js");
/* harmony import */ var _utils_Array__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../utils/Array */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Array.js");
/* harmony import */ var _utils_Math__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
/* harmony import */ var _utils_Strings__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../utils/Strings */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Strings.js");
/**
 * Export module.
 *
 * Parts of Export functionality rely on the following third party libraries:
 *
 * [canvg.js](https://github.com/canvg/canvg)
 * Copyright (c) Gabe Lerner
 * Licensed under [MIT](https://github.com/canvg/canvg/blob/master/LICENSE)
 *
 * [pdfmake](http://pdfmake.org/)
 * Copyright (c) 2014 bpampuch
 * Licensed under [MIT](https://github.com/bpampuch/pdfmake/blob/master/LICENSE)
 *
 * [SheetJS Community Edition](https://github.com/sheetjs/js-xlsx)
 * Licensed under [Apache License 2.0](https://github.com/SheetJS/js-xlsx/blob/master/LICENSE)
 *
 * [JSZip](http://stuartk.com/jszip)
 * Copyright (c) Stuart Knightley
 * Dual licenced under the [MIT license or GPLv3](https://raw.githubusercontent.com/Stuk/jszip/master/LICENSE.markdown).
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */

























 // This is used to cache the pdfmake loading

var pdfmakePromise;
/**
 * Loads pdfmake dynamic module
 *
 * This is an asynchronous function. Check the description of `getImage()`
 * for description and example usage.
 *
 * @ignore Exclude from docs
 * @return Instance of pdfmake
 * @async
 */

function _pdfmake() {
  return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__awaiter)(this, void 0, void 0, function () {
    var a, pdfmake, vfs_fonts, global;
    return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__generator)(this, function (_a) {
      switch (_a.label) {
        case 0:
          return [4
          /*yield*/
          , Promise.all([Promise.resolve(/*! import() */).then(__webpack_require__.t.bind(__webpack_require__, /*! pdfmake/build/pdfmake.js */ "pdfmake/build/pdfmake.js", 23)), Promise.resolve(/*! import() */).then(__webpack_require__.t.bind(__webpack_require__, /*! ../../pdfmake/vfs_fonts */ "../../pdfmake/vfs_fonts", 23))])];

        case 1:
          a = _a.sent();
          pdfmake = a[0];
          vfs_fonts = a[1];
          global = window;
          global.pdfMake = global.pdfMake || {};
          global.pdfMake.vfs = vfs_fonts.default;
          pdfmake.vfs = vfs_fonts.default;
          return [2
          /*return*/
          , pdfmake];
      }
    });
  });
} // TODO better parsing


var fontFamilySrcRegexp = /src: ([^;]+);/; // TODO better checks

function supportsBlobUri() {
  return window.navigator.msSaveOrOpenBlob != null;
} // TODO move into utils or something ?


function blobToDataUri(blob) {
  return new Promise(function (resolve, reject) {
    // TODO handle abort ?
    var f = new FileReader();

    f.onload = function (e) {
      resolve(f.result);
    };

    f.onerror = function (e) {
      reject(e);
    };

    f.readAsDataURL(blob);
  });
}

function getCssRules(s) {
  return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__awaiter)(this, void 0, void 0, function () {
    var sheet, e_1;
    return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__generator)(this, function (_a) {
      switch (_a.label) {
        case 0:
          sheet = s.sheet;
          _a.label = 1;

        case 1:
          _a.trys.push([1, 2,, 4]);

          return [2
          /*return*/
          , sheet.cssRules];

        case 2:
          e_1 = _a.sent();
          return [4
          /*yield*/
          , new Promise(function (success, error) {
            s.addEventListener("load", function () {
              success(sheet.cssRules);
            }, true);
            s.addEventListener("error", function (e) {
              error(e);
            }, true);
            setTimeout(function () {
              error(new Error("Timeout while waiting for <style> to load"));
            }, 10000);
          })];

        case 3:
          // Needed because of https://bugzilla.mozilla.org/show_bug.cgi?id=625013
          return [2
          /*return*/
          , _a.sent()];

        case 4:
          return [2
          /*return*/
          ];
      }
    });
  });
} // This loads a stylesheet by URL and then calls the function with it
// TODO this should be moved into utils or something


function loadStylesheet(doc, url, f) {
  return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__awaiter)(this, void 0, void 0, function () {
    var response, e_2, s, rules;
    return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__generator)(this, function (_a) {
      switch (_a.label) {
        case 0:
          _a.trys.push([0, 2,, 3]);

          return [4
          /*yield*/
          , _utils_Net__WEBPACK_IMPORTED_MODULE_17__.load(url)];

        case 1:
          response = _a.sent();
          return [3
          /*break*/
          , 3];

        case 2:
          e_2 = _a.sent();
          console.error("Failed to load stylesheet", url, e_2);
          return [2
          /*return*/
          ];

        case 3:
          s = doc.createElement("style");
          s.textContent = response.response;

          if (_Options__WEBPACK_IMPORTED_MODULE_13__.options.nonce != "") {
            s.setAttribute("nonce", _Options__WEBPACK_IMPORTED_MODULE_13__.options.nonce);
          }

          doc.head.appendChild(s);
          _a.label = 4;

        case 4:
          _a.trys.push([4,, 7, 8]);

          return [4
          /*yield*/
          , getCssRules(s)];

        case 5:
          rules = _a.sent();
          return [4
          /*yield*/
          , eachStylesheet(doc, url, rules, f)];

        case 6:
          _a.sent();

          return [3
          /*break*/
          , 8];

        case 7:
          doc.head.removeChild(s);
          return [7
          /*endfinally*/
          ];

        case 8:
          return [2
          /*return*/
          ];
      }
    });
  });
} // This calls a function for each CSSRule inside of a CSSStyleSheet.
// If the CSSStyleSheet has any @import, then it will recursively call the function for those CSSRules too.
// TODO this should be moved into utils or something


function eachStylesheet(doc, topUrl, rules, f) {
  return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__awaiter)(this, void 0, void 0, function () {
    var promises, length, i, rule, url;
    return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__generator)(this, function (_a) {
      switch (_a.label) {
        case 0:
          promises = [];
          length = rules.length;

          for (i = 0; i < length; i++) {
            rule = rules[i];

            if (rule.type === CSSRule.IMPORT_RULE) {
              url = rule.href;

              if (url) {
                url = _utils_Utils__WEBPACK_IMPORTED_MODULE_20__.joinUrl(topUrl, url);
                promises.push(loadStylesheet(doc, url, f));
              }
            } else {
              f(topUrl, rule);
            }
          }

          if (!promises.length) return [3
          /*break*/
          , 2];
          return [4
          /*yield*/
          , Promise.all(promises)];

        case 1:
          _a.sent();

          _a.label = 2;

        case 2:
          return [2
          /*return*/
          ];
      }
    });
  });
} // This calls a function for each CSSRule for all of the stylesheets in the page.
// If the CSSStyleSheet has any @import, then it will recursively call the function for those CSSRules too.
// TODO this should be moved into utils or something


function eachStylesheets(f) {
  return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__awaiter)(this, void 0, void 0, function () {
    var iframe, doc_1;
    return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__generator)(this, function (_a) {
      switch (_a.label) {
        case 0:
          iframe = document.createElement("iframe"); // This causes it to use the same origin policy as the parent page

          iframe.src = "about:blank"; // This tries to make it more accessible for screen readers

          iframe.setAttribute("title", "");
          document.head.appendChild(iframe);
          _a.label = 1;

        case 1:
          _a.trys.push([1,, 3, 4]);

          doc_1 = iframe.contentDocument; // TODO use $dom.getRoot instead of document ?

          return [4
          /*yield*/
          , Promise.all(_utils_Array__WEBPACK_IMPORTED_MODULE_21__.map(document.styleSheets, function (sheet) {
            var url = sheet.href;

            if (url == null) {
              return eachStylesheet(doc_1, location.href, sheet.cssRules, f);
            } else {
              url = _utils_Utils__WEBPACK_IMPORTED_MODULE_20__.joinUrl(location.href, url);
              return loadStylesheet(doc_1, url, f);
            }
          }))];

        case 2:
          // TODO use $dom.getRoot instead of document ?
          _a.sent();

          return [3
          /*break*/
          , 4];

        case 3:
          document.head.removeChild(iframe);
          return [7
          /*endfinally*/
          ];

        case 4:
          return [2
          /*return*/
          ];
      }
    });
  });
}
/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * [[Export]] allows downloading of current snapshot of the chart as an
 * image, PDF, or its data in various formats.
 *
 * The export functionality is enabled by default in charts and is accessible
 * via API or optional export menu.
 *
 * To enable menu, simply access export's `menu` property. E.g.:
 *
 * ```TypeScript
 * chart.exporting.menu = new am4core.ExportMenu();
 * ```
 * ```JavaScript
 * chart.exporting.menu = new am4core.ExportMenu();
 * ```
 * ```JSON
 * {
 *   // ...
 *   "exporting": {
 *     "menu": {}
 *   }
 * }
 * ```
 *
 * To export via API, use `export()` method:
 *
 * ```TypeScript
 * chart.exporting.export(type, [options]);
 * ```
 * ```JavaScript
 * chart.exporting.export(type, [options]);
 * ```
 *
 * E.g.:
 *
 * ```TypeScript
 * chart.exporting.export("png");
 * ```
 * ```JavaScript
 * chart.exporting.export("png");
 * ```
 *
 * @todo Better loading indicator?
 * @todo Implement multiplier option
 * @todo Handling of hanged exports
 * @important
 */


var Export =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__extends)(Export, _super);
  /**
   * Constructor
   */


  function Export(container) {
    var _this = _super.call(this) || this;
    /**
     * Adapter.
     */


    _this.adapter = new _utils_Adapter__WEBPACK_IMPORTED_MODULE_1__.Adapter(_this);
    /**
     * Holds options for each format.
     *
     * @ignore Exclude from docs
     */

    _this._formatOptions = new _utils_Dictionary__WEBPACK_IMPORTED_MODULE_5__.Dictionary();
    /**
     * Extra [[Sprite]] elements to include in exports.
     */

    _this._extraSprites = [];
    /**
     * A list of [[Sprite]] elements that need to be valid before export
     * commences.
     */

    _this._validateSprites = [];
    /**
     * Holds an array of data field names. If set, exported data fields will try
     * to maintain this order.
     *
     * If not set (default), the export will try to maintain the same order as
     * in source data, or as in `dataFields` (if set).
     *
     * @since 4.9.7
     */

    _this.dataFieldsOrder = [];
    /**
     * Indicates whether data fields were generated dynamically (`true`) or
     * if they were pre-set by the user (`false`).
     */

    _this._dynamicDataFields = true;
    /**
     * Holds a list of objects that were temporarily removed from the DOM while
     * exporting. Those most probably are tainted images, or foreign objects that
     * would otherwise prevent SVG to be converted to canvas.
     *
     * @ignore Exclude from docs
     */

    _this._removedObjects = new _utils_List__WEBPACK_IMPORTED_MODULE_4__.List();
    /**
     * Holds references to the objects that were temporarily hidden when export
     * started, so that we can reveal them back when export ends.
     */

    _this._hiddenObjects = [];
    /**
     * Indicates if non-exportable objects are now hidden;
     */

    _this._objectsAlreadyHidden = false;
    /**
     * Exported files will be prefixed with whatever it is set here.
     *
     * @ignore Exclude from docs
     */

    _this._filePrefix = "amCharts";
    /**
     * If you are using web fonts (such as Google Fonts), your chart might be
     * using them as well.
     *
     * Normally, exporting to image will require to download these fonts so the
     * are carried over to exported image.
     *
     * This setting can be used to disable or enable this functionality.
     *
     * @default true
     */

    _this.useWebFonts = true;
    /**
     * Many modern displays have use more actual pixels per displayed pixel. This
     * results in sharper images on screen. Unfortunately, when exported to a
     * bitmap image of the sam width/height size it will lose those extra pixels,
     * resulting in somewhat blurry image.
     *
     * This is why we are going to export images larger than they are, so that we
     * don't lose any details.
     *
     * If you'd rather export images without change in size, set this to `false`.
     *
     * @default true
     */

    _this.useRetina = true;
    /**
     * By default Export will try to use built-in method for transforming chart
     * into an image for download, then fallback to external library (canvg) for
     * conversion if failed.
     *
     * Setting this to `false` will force use of external library for all export
     * operations.
     *
     * It might be useful to turn off simplified export if you are using strict
     * content security policies, that disallow images with blobs as their
     * source.
     *
     * @default true
     * @since 4.2.5
     */

    _this.useSimplifiedExport = true;
    /**
     * If export operation takes longer than milliseconds in this second, we will
     * show a modal saying export operation took longer than expected.
     */

    _this.timeoutDelay = 2000;
    _this._exportRunning = false;
    /**
     * Indicator used by [[Component]].
     *
     * @ignore
     */

    _this._prevHasData = false;
    _this._container = container;
    _this.className = "Export"; // Set default options

    _this._formatOptions.setKey("png", {});

    _this._formatOptions.setKey("jpg", {
      quality: 0.8
    });

    _this._formatOptions.setKey("gif", {});

    _this._formatOptions.setKey("svg", {});

    _this._formatOptions.setKey("pdf", {
      fontSize: 14,
      imageFormat: "png",
      align: "left",
      addURL: true,
      addColumnNames: true
    });

    _this._formatOptions.setKey("json", {
      indent: 2,
      useLocale: true
    });

    _this._formatOptions.setKey("csv", {
      addColumnNames: true,
      emptyAs: "",
      addBOM: true
    });

    _this._formatOptions.setKey("xlsx", {
      addColumnNames: true,
      useLocale: true,
      emptyAs: ""
    });

    _this._formatOptions.setKey("html", {
      addColumnNames: true,
      emptyAs: ""
    });

    _this._formatOptions.setKey("pdfdata", {
      fontSize: 14,
      imageFormat: "png",
      addURL: true,
      addColumnNames: true,
      emptyAs: ""
    });

    _this._formatOptions.setKey("print", {
      delay: 500,
      printMethod: "iframe"
    }); // Add options adapter


    _this.adapter.add("options", function (arg) {
      var formatOptions = _this._formatOptions.getKey(arg.type);

      if (arg.options) {
        arg.options = _utils_Object__WEBPACK_IMPORTED_MODULE_16__.merge(formatOptions, arg.options);
      } else {
        arg.options = formatOptions;
      }

      return arg;
    });

    _this.applyTheme();

    _this.dispatchImmediately("inited");

    return _this;
  }

  Object.defineProperty(Export.prototype, "menu", {
    /**
     * @return ExportMenu instance
     */
    get: function get() {
      return this._menu;
    },

    /**
     * An instance of [[ExportMenu]].
     *
     * To add an export menu to a chart, set this to a new instance of
     * [[ExportMenu]].
     *
     * ```TypeScript
     * chart.exporting.menu = new am4core.ExportMenu();
     * ```
     * ```JavaScript
     * chart.exporting.menu = new am4core.ExportMenu();
     * ```
     * ```JSON
     * {
     *   // ...
     *   "exporting": {
     *     "menu": {}
     *   }
     * }
     * ```
     *
     * @param menu  ExportMenu instance
     */
    set: function set(menu) {
      var _this = this;

      if (this._menu) {
        this.removeDispose(this._menu);
      }

      this._menu = menu; // Set container and language

      this._menu.container = this.container;
      this._menu.language = this._language; // Add adapter to check for browser support

      this._menu.adapter.add("branch", function (arg) {
        arg.branch.unsupported = !_this.typeSupported(arg.branch.type);
        return arg;
      }); // Add click events


      this._menu.events.on("hit", function (ev) {
        _this.export(ev.branch.type, ev.branch.options);

        _this.menu.close();
      });

      this._menu.events.on("enter", function (ev) {
        _this.export(ev.branch.type, ev.branch.options);

        _this.menu.close();
      });

      this._menu.events.on("over", function (ev) {
        _this._disablePointers();
      });

      this._menu.events.on("out", function (ev) {
        setTimeout(function () {
          _this._releasePointers();
        }, 10);
      }); // Dispatch event


      this.dispatchImmediately("menucreated"); // Prefix with Sprite's class name

      this._menu.adapter.add("classPrefix", function (obj) {
        obj.classPrefix = _Options__WEBPACK_IMPORTED_MODULE_13__.options.classNamePrefix + obj.classPrefix;
        return obj;
      }); // Add menu to disposers so that it's destroyed when Export is disposed


      this._disposers.push(this._menu);
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Checks if this specific menu item type is supported by current system.
   *
   * @param type  Menu item type
   * @return `false` if not supported
   */

  Export.prototype.typeSupported = function (type) {
    var supported = true;
    var options = this.getFormatOptions(type);

    if (_utils_Type__WEBPACK_IMPORTED_MODULE_18__.hasValue(options) && options.disabled) {
      supported = false;
    } else if (type === "pdf") {//supported = this.downloadSupport();
    } else if (type === "xlsx") {
      //supported = (this.downloadSupport() && this._hasData()) ? true : false;
      supported = this._hasData() ? true : false;
    } else if (type == "print" && !window.print) {
      supported = false;
    } else if (["json", "csv", "html", "pdfdata"].indexOf(type) !== -1 && !this._hasData()) {
      supported = false;
    }

    return this.adapter.apply("supported", {
      supported: supported,
      type: type
    }).supported;
  };
  /**
   * Checks if data is available.
   *
   * @return Has data?
   */


  Export.prototype._hasData = function () {
    return this.data && this.data.length;
  };
  /**
   * Get function to handle export for particular format.
   *
   * @ignore Exclude from docs
   */


  Export.prototype._getFunction = function (type) {
    switch (type) {
      case "png":
      case "gif":
      case "jpg":
        return this.getImage;

      case "svg":
        return this.getSVG;

      case "pdf":
      case "pdfdata":
        return this.getPDF;

      case "xlsx":
        return this.getExcel;

      case "csv":
        return this.getCSV;

      case "json":
        return this.getJSON;

      case "html":
        return this.getHTML;

      case "print":
        return this.getPrint;

      default:
        return this.unsupported;
    }
  };
  /**
   * Initiates export procedure.
   *
   * @param type     Export type
   * @param options  Options
   * @return `true` if export was successful
   * @async
   */


  Export.prototype.export = function (type, options) {
    return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__awaiter)(this, void 0, void 0, function () {
      var event_1, func, data, event_2, event_3;

      var _this = this;

      return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__generator)(this, function (_a) {
        switch (_a.label) {
          case 0:
            // Check if it's a custom item, and do nothing or execute custom callback
            if (type == "custom") {
              this.handleCustom(options);
              return [2
              /*return*/
              , true];
            } // Set export running flag


            this._exportRunning = true; // Dispatch event

            if (this.events.isEnabled("exportstarted")) {
              event_1 = {
                "type": "exportstarted",
                "target": this,
                "format": type,
                "options": options
              };
              this.events.dispatchImmediately("exportstarted", event_1);
            } // Schedule a preloader


            this.showPreloader(); // Schedule a timeout

            if (this.timeoutDelay) {
              this.hideTimeout();
              this._timeoutTimeout = this.setTimeout(function () {
                // Dispatch event
                if (_this.events.isEnabled("exporttimedout")) {
                  var event_4 = {
                    "type": "exporttimedout",
                    "target": _this,
                    "format": type,
                    "options": options
                  };

                  _this.events.dispatchImmediately("exporttimedout", event_4);
                } // Show modal


                _this.showTimeout();
              }, this.timeoutDelay);
            } // Hide items that should not be exported


            this.hideNonExportableSprites();
            func = this._getFunction(type); // Give chance for plugins to override both function and options

            options = this.adapter.apply("options", {
              options: options,
              type: type
            }).options;
            func = this.adapter.apply("exportFunction", {
              func: func,
              type: type,
              options: options
            }).func;
            return [4
            /*yield*/
            , func.call(this, type, options)];

          case 1:
            data = _a.sent(); // Release pointers

            this._exportRunning = false;

            this._releasePointers(); // Restore temporarily hidden elements


            this.restoreNonExportableSprites();

            if (data) {
              // Dispatch event
              if (this.events.isEnabled("exportfinished")) {
                event_2 = {
                  "type": "exportfinished",
                  "target": this,
                  "format": type,
                  "options": options
                };
                this.events.dispatchImmediately("exportfinished", event_2);
              } // Hide preloader and timeout modals


              this.hidePreloader();
              this.hideTimeout();

              if (this.menu) {
                this.menu.close();
              } // Download or print


              if (type === "print") {
                return [2
                /*return*/
                , this.print(data, options, this.adapter.apply("title", {
                  title: this.title,
                  options: options
                }).title)];
              } else {
                if (type == "pdfdata") {
                  return [2
                  /*return*/
                  , this.download(data, this.filePrefix + ".pdf")];
                }

                return [2
                /*return*/
                , this.download(data, this.filePrefix + "." + type, options && options.addBOM)];
              }
            } else {
              // Throw exception?
              // @todo
              // Dispatch event
              if (this.events.isEnabled("error")) {
                event_3 = {
                  "type": "error",
                  "target": this,
                  "format": type,
                  "options": options
                };
                this.events.dispatchImmediately("error", event_3);
              }

              return [2
              /*return*/
              , false];
            }

            return [2
            /*return*/
            ];
        }
      });
    });
  };
  /**
   * A function that should handle unsupported export types.
   *
   * @ignore Exclude from docs
   * @param type     Export type
   * @param options  Options
   * @return Promise
   * @async
   */


  Export.prototype.unsupported = function (type, options) {
    return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__awaiter)(this, void 0, void 0, function () {
      return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__generator)(this, function (_a) {
        // TODO should this return `undefined`?
        return [2
        /*return*/
        , ""];
      });
    });
  };
  /**
   * Handles click on a "custom" menu item.
   *
   * Basically, if it has "callback" enabled, it will be called. Nothing else.
   *
   * @ignore Exclude from docs
   * @param options  Options
   */


  Export.prototype.handleCustom = function (options) {
    if (_utils_Type__WEBPACK_IMPORTED_MODULE_18__.hasValue(options) && _utils_Type__WEBPACK_IMPORTED_MODULE_18__.hasValue(options.callback)) {
      options.callback.call(options.callbackTarget || this, options);
    }
  };
  /**
   * Requests a Print of the chart.
   *
   * @param type     Export type
   * @param options  Options
   * @return Promise
   * @async
   */


  Export.prototype.getPrint = function (type, options) {
    return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__awaiter)(this, void 0, void 0, function () {
      return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__generator)(this, function (_a) {
        return [2
        /*return*/
        , this.getImage("png", options)];
      });
    });
  };
  /**
   * A function that returns data: URI encoded @font-family, so that way it can be embedded into SVG.
   *
   * @ignore Exclude from docs
   * @return String which can be embedded directly into a <style> element.
   * @async
   */


  Export.prototype.getFontFamilies = function () {
    return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__awaiter)(this, void 0, void 0, function () {
      var DOMURL, blobs, promises, a;

      var _this = this;

      return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__generator)(this, function (_a) {
        switch (_a.label) {
          case 0:
            DOMURL = this.getDOMURL();
            blobs = [];
            promises = [];
            return [4
            /*yield*/
            , eachStylesheets(function (topUrl, rule) {
              if (rule.type === CSSRule.FONT_FACE_RULE) {
                var cssText_1 = rule.cssText; // TODO this is necessary because Edge doesn't let you access the src using getPropertyValue

                var src = fontFamilySrcRegexp.exec(cssText_1);

                if (src !== null) {
                  // TODO make this faster (don't create Promises for non-url stuff)
                  var urls = src[1].split(/ *, */).map(function (url) {
                    return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__awaiter)(_this, void 0, void 0, function () {
                      var a, after, fullUrl, response, url_1, e_3;
                      return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__generator)(this, function (_a) {
                        switch (_a.label) {
                          case 0:
                            a = /^url\(["']?([^"'\)]+)["']?\)([^,]*)$/.exec(url);
                            if (!(a === null)) return [3
                            /*break*/
                            , 1];
                            return [2
                            /*return*/
                            , url];

                          case 1:
                            after = a[2];
                            fullUrl = _utils_Utils__WEBPACK_IMPORTED_MODULE_20__.joinUrl(topUrl, a[1]);

                            if (this.webFontFilter && !fullUrl.match(this.webFontFilter)) {
                              return [2
                              /*return*/
                              , null];
                            }

                            _a.label = 2;

                          case 2:
                            _a.trys.push([2, 7,, 8]);

                            return [4
                            /*yield*/
                            , _utils_Net__WEBPACK_IMPORTED_MODULE_17__.load(fullUrl, undefined, {
                              responseType: "blob"
                            })];

                          case 3:
                            response = _a.sent();
                            if (!supportsBlobUri()) return [3
                            /*break*/
                            , 4];
                            url_1 = DOMURL.createObjectURL(response.blob);
                            blobs.push(url_1);
                            return [3
                            /*break*/
                            , 6];

                          case 4:
                            return [4
                            /*yield*/
                            , blobToDataUri(response.blob)];

                          case 5:
                            url_1 = _a.sent();
                            _a.label = 6;

                          case 6:
                            // TODO should it should escape the URI ?
                            return [2
                            /*return*/
                            , "url(\"" + url_1 + "\")" + after];

                          case 7:
                            e_3 = _a.sent();
                            console.error("Failed to load font", fullUrl, e_3);
                            return [2
                            /*return*/
                            , null];

                          case 8:
                            return [2
                            /*return*/
                            ];
                        }
                      });
                    });
                  });
                  promises.push(Promise.all(urls).then(function (a) {
                    a = a.filter(function (x) {
                      return x != null;
                    });

                    if (a.length === 0) {
                      return "";
                    } else {
                      return cssText_1.replace(fontFamilySrcRegexp, "src: " + a.join(", ") + ";");
                    }
                  }));
                }
              }
            })];

          case 1:
            _a.sent();

            return [4
            /*yield*/
            , Promise.all(promises)];

          case 2:
            a = _a.sent();
            return [2
            /*return*/
            , {
              blobs: blobs,
              cssText: a.filter(function (x) {
                return !!x;
              }).join("\n")
            }];
        }
      });
    });
  };
  /**
   * Produces image output from the element.
   *
   * Converts to a `Canvas` first, then produces an image to download.
   *
   * This is an asynchronous function. Rather than returning a result, it
   * returns a Promise.
   *
   * You can use `await` notion from other async functions, or `then()`
   * anywhere else.
   *
   * ```TypeScript
   * let img;
   *
   * // Async
   * img = await chart.exporting.getImage( "png" );
   *
   * // Sync
   * chart.exporting.getImage( "png" ).then( ( data ) => {
   *   img = data;
   * } );
   * ```
   * ```JavaScript
   * var img;
   * chart.exporting.getImage( "png" ).then( ( data ) => {
   *   img = data;
   * } );
   * ```
   *
   * @param  type           Image format
   * @param  options        Options
   * @param  includeExtras  Should extra sprites be included if set?
   * @return Promise
   */


  Export.prototype.getImage = function (type, options, includeExtras) {
    return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__awaiter)(this, void 0, void 0, function () {
      var prehidden, canvas, uri, e_4, data, data;
      return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__generator)(this, function (_a) {
        switch (_a.label) {
          case 0:
            prehidden = this._objectsAlreadyHidden;

            if (!prehidden) {
              this.hideNonExportableSprites();
            }

            if (!_utils_Type__WEBPACK_IMPORTED_MODULE_18__.hasValue(options)) {
              options = this.getFormatOptions(type);
            } // Wait for required elements to be ready before proceeding


            return [4
            /*yield*/
            , this.awaitValidSprites()];

          case 1:
            // Wait for required elements to be ready before proceeding
            _a.sent();

            return [4
            /*yield*/
            , this.simplifiedImageExport()];

          case 2:
            if (!_a.sent()) return [3
            /*break*/
            , 10];
            canvas = void 0;
            _a.label = 3;

          case 3:
            _a.trys.push([3, 7,, 9]);

            return [4
            /*yield*/
            , this.getCanvas(options)];

          case 4:
            canvas = _a.sent();
            if (!(includeExtras !== false)) return [3
            /*break*/
            , 6];
            return [4
            /*yield*/
            , this.addExtras(canvas, options)];

          case 5:
            canvas = _a.sent();
            _a.label = 6;

          case 6:
            uri = canvas.toDataURL(this.getContentType(type), options.quality); // Get rid of the canvas

            this.disposeCanvas(canvas);

            if (!prehidden) {
              this.restoreNonExportableSprites();
            }

            return [2
            /*return*/
            , uri];

          case 7:
            e_4 = _a.sent();
            console.error(e_4.message + "\n" + e_4.stack);
            _utils_Log__WEBPACK_IMPORTED_MODULE_19__.warn("Simple export failed, falling back to advanced export");

            if (canvas) {
              this.disposeCanvas(canvas);
            }

            return [4
            /*yield*/
            , this.getImageAdvanced(type, options, includeExtras)];

          case 8:
            data = _a.sent();

            if (!prehidden) {
              this.restoreNonExportableSprites();
            }

            return [2
            /*return*/
            , data];

          case 9:
            return [3
            /*break*/
            , 12];

          case 10:
            return [4
            /*yield*/
            , this.getImageAdvanced(type, options, includeExtras)];

          case 11:
            data = _a.sent();

            if (!prehidden) {
              this.restoreNonExportableSprites();
            }

            return [2
            /*return*/
            , data];

          case 12:
            return [2
            /*return*/
            ];
        }
      });
    });
  };
  /**
   * Adds extra elements to the canvas.
   *
   * @param  canvas   Original canvas
   * @param  options  Options
   */


  Export.prototype.addExtras = function (canvas, options, advanced) {
    return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__awaiter)(this, void 0, void 0, function () {
      var middleLeft_1, middleTop_1, middleWidth_1, middleHeight_1, extraRight_1, extraBottom_1, extras, newCanvas, ctx_1, background, left_1, top_1, right_1, bottom_1;

      var _this = this;

      return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__generator)(this, function (_a) {
        switch (_a.label) {
          case 0:
            if (!this.extraSprites.length) return [3
            /*break*/
            , 2];
            middleLeft_1 = 0;
            middleTop_1 = 0;
            middleWidth_1 = canvas.width;
            middleHeight_1 = canvas.height;
            extraRight_1 = 0;
            extraBottom_1 = 0;
            return [4
            /*yield*/
            , Promise.all(_utils_Array__WEBPACK_IMPORTED_MODULE_21__.map(this.extraSprites, function (extraSprite) {
              return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__awaiter)(_this, void 0, void 0, function () {
                var extra, extraCanvas, extraWidth, extraHeight;
                return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__generator)(this, function (_a) {
                  switch (_a.label) {
                    case 0:
                      if (extraSprite instanceof _Sprite__WEBPACK_IMPORTED_MODULE_2__.Sprite) {
                        extra = {
                          sprite: extraSprite,
                          position: "bottom"
                        };
                      } else {
                        extra = extraSprite;
                      } // Set defaults


                      extra.position = extra.position || "bottom";
                      extra.marginTop = extra.marginTop || 0;
                      extra.marginRight = extra.marginRight || 0;
                      extra.marginBottom = extra.marginBottom || 0;
                      extra.marginLeft = extra.marginLeft || 0;
                      if (!advanced) return [3
                      /*break*/
                      , 2];
                      return [4
                      /*yield*/
                      , extra.sprite.exporting.getCanvasAdvanced(options)];

                    case 1:
                      extraCanvas = _a.sent();
                      return [3
                      /*break*/
                      , 4];

                    case 2:
                      return [4
                      /*yield*/
                      , extra.sprite.exporting.getCanvas(options)];

                    case 3:
                      extraCanvas = _a.sent();
                      _a.label = 4;

                    case 4:
                      extraWidth = extraCanvas.width + extra.marginLeft + extra.marginRight;
                      extraHeight = extraCanvas.height + extra.marginTop + extra.marginBottom;

                      if (extra.position == "top") {
                        middleWidth_1 = extra.crop ? middleHeight_1 : _utils_Math__WEBPACK_IMPORTED_MODULE_22__.max(middleWidth_1, extraWidth);
                        middleTop_1 += extraHeight;
                      } else if (extra.position == "right") {
                        middleHeight_1 = extra.crop ? middleHeight_1 : _utils_Math__WEBPACK_IMPORTED_MODULE_22__.max(middleHeight_1, extraHeight);
                        extraRight_1 += extraWidth;
                      } else if (extra.position == "left") {
                        middleHeight_1 = extra.crop ? middleHeight_1 : _utils_Math__WEBPACK_IMPORTED_MODULE_22__.max(middleHeight_1, extraHeight);
                        middleLeft_1 += extraWidth;
                      } else if (extra.position === "bottom") {
                        middleWidth_1 = extra.crop ? middleHeight_1 : _utils_Math__WEBPACK_IMPORTED_MODULE_22__.max(middleWidth_1, extraWidth);
                        extraBottom_1 += extraHeight;
                      }

                      return [2
                      /*return*/
                      , {
                        canvas: extraCanvas,
                        position: extra.position,
                        left: extra.marginLeft,
                        top: extra.marginTop,
                        width: extraWidth,
                        height: extraHeight
                      }];
                  }
                });
              });
            }))];

          case 1:
            extras = _a.sent();
            newCanvas = this.getDisposableCanvas();
            newCanvas.width = middleLeft_1 + middleWidth_1 + extraRight_1;
            newCanvas.height = middleTop_1 + middleHeight_1 + extraBottom_1;
            ctx_1 = newCanvas.getContext("2d");
            background = this.backgroundColor || this.findBackgroundColor(this.sprite.dom);

            if (background) {
              ctx_1.fillStyle = background.toString();
              ctx_1.fillRect(0, 0, newCanvas.width, newCanvas.height);
            }

            left_1 = middleLeft_1;
            top_1 = middleTop_1;
            right_1 = left_1 + middleWidth_1;
            bottom_1 = top_1 + middleHeight_1; // Radiates outwards from center

            _utils_Array__WEBPACK_IMPORTED_MODULE_21__.each(extras, function (extra) {
              if (extra.position == "top") {
                top_1 -= extra.height;
                ctx_1.drawImage(extra.canvas, middleLeft_1 + extra.left, top_1 + extra.top);
              } else if (extra.position == "right") {
                ctx_1.drawImage(extra.canvas, right_1 + extra.left, middleTop_1 + extra.top);
                right_1 += extra.width;
              } else if (extra.position == "left") {
                left_1 -= extra.width;
                ctx_1.drawImage(extra.canvas, left_1 + extra.left, middleTop_1 + extra.top);
              } else if (extra.position === "bottom") {
                ctx_1.drawImage(extra.canvas, middleLeft_1 + extra.left, bottom_1 + extra.top);
                bottom_1 += extra.height;
              }

              _this.disposeCanvas(extra.canvas);
            });
            ctx_1.drawImage(canvas, middleLeft_1, middleTop_1);
            return [2
            /*return*/
            , newCanvas];

          case 2:
            return [2
            /*return*/
            , canvas];
        }
      });
    });
  };
  /**
   * Returns canvas representation of the [[Sprite]].
   *
   * @param   options  Options
   * @return           Canvas
   */


  Export.prototype.getCanvas = function (options) {
    return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__awaiter)(this, void 0, void 0, function () {
      var background, DOMURL, url, blobs, canvas, width, height, font, fontSize, scale, pixelRatio, ctx, promises, a, data, svg, img;
      return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__generator)(this, function (_a) {
        switch (_a.label) {
          case 0:
            // Options are set?
            if (!_utils_Type__WEBPACK_IMPORTED_MODULE_18__.hasValue(options)) {
              options = {};
            }

            background = this.backgroundColor || this.findBackgroundColor(this.sprite.dom);
            DOMURL = this.getDOMURL();
            url = null;
            blobs = null;
            _a.label = 1;

          case 1:
            _a.trys.push([1,, 4, 5]);

            width = this.sprite.pixelWidth;
            height = this.sprite.pixelHeight;
            font = _utils_DOM__WEBPACK_IMPORTED_MODULE_14__.findFont(this.sprite.dom);
            fontSize = _utils_DOM__WEBPACK_IMPORTED_MODULE_14__.findFontSize(this.sprite.dom);
            scale = options.scale || 1;
            pixelRatio = this.getPixelRatio(options); // Check if scale needs to be updated as per min/max dimensions

            scale = this.getAdjustedScale(width * pixelRatio, height * pixelRatio, scale, options); // Create canvas and its 2D context

            canvas = this.getDisposableCanvas(); // Set canvas width/height

            canvas.style.width = width * scale + 'px';
            canvas.style.height = height * scale + 'px';
            canvas.width = width * scale;
            canvas.height = height * scale;
            ctx = canvas.getContext("2d"); // if (pixelRatio != 1) {
            // 	ctx.setTransform(pixelRatio, 0, 0, pixelRatio, 0, 0);
            // }
            // Add background if necessary

            if (background) {
              ctx.fillStyle = background.toString();
              ctx.fillRect(0, 0, width * scale, height * scale);
            }

            promises = [];

            if (this.useWebFonts) {
              // TODO what if one of the other things errors before it's been able to set `blobs` ?
              promises.push(this.getFontFamilies().then(function (fonts) {
                blobs = fonts.blobs;
                return fonts.cssText;
              }));
            }

            promises.push(this.imagesToDataURI(this.sprite.dom, options));
            promises.push(this.prepForeignObjects(this.sprite.dom, options));
            return [4
            /*yield*/
            , Promise.all(promises)];

          case 2:
            a = _a.sent();
            data = this.normalizeSVG("<style>" + a[0] + "</style>" + this.serializeElement(this.sprite.paper.defs) + this.serializeElement(this.sprite.dom), options, width, height, scale, font, fontSize);
            svg = new Blob([data], {
              type: "image/svg+xml"
            });
            url = DOMURL.createObjectURL(svg);
            return [4
            /*yield*/
            , this.loadNewImage(url, width * scale * pixelRatio, height * scale * pixelRatio, "anonymous")];

          case 3:
            img = _a.sent(); // Draw image on canvas

            ctx.drawImage(img, 0, 0);
            return [3
            /*break*/
            , 5];

          case 4:
            if (url !== null) {
              DOMURL.revokeObjectURL(url);
            }

            if (blobs !== null) {
              _utils_Array__WEBPACK_IMPORTED_MODULE_21__.each(blobs, function (url) {
                DOMURL.revokeObjectURL(url);
              });
            } // Restore replaced tainted images in DOM


            this.restoreRemovedObjects();
            return [7
            /*endfinally*/
            ];

          case 5:
            return [2
            /*return*/
            , canvas];
        }
      });
    });
  };
  /**
   * Returns canvas representation of the [[Sprite]] using canvg.
   *
   * @param   options  Options
   * @return           Canvas
   */


  Export.prototype.getCanvasAdvanced = function (options) {
    return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__awaiter)(this, void 0, void 0, function () {
      var background, canvg, width, height, font, fontSize, scale, pixelRatio, data, canvas, config;
      return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__generator)(this, function (_a) {
        switch (_a.label) {
          case 0:
            // Options are set?
            if (!_utils_Type__WEBPACK_IMPORTED_MODULE_18__.hasValue(options)) {
              options = {};
            } // Convert external images to data uris


            return [4
            /*yield*/
            , this.imagesToDataURI(this.sprite.dom, options)];

          case 1:
            // Convert external images to data uris
            _a.sent();

            background = this.backgroundColor || this.findBackgroundColor(this.sprite.dom);
            return [4
            /*yield*/
            , this.canvg];

          case 2:
            canvg = _a.sent();
            width = this.sprite.pixelWidth;
            height = this.sprite.pixelHeight;
            font = _utils_DOM__WEBPACK_IMPORTED_MODULE_14__.findFont(this.sprite.dom);
            fontSize = _utils_DOM__WEBPACK_IMPORTED_MODULE_14__.findFontSize(this.sprite.dom);
            scale = options.scale || 1;
            pixelRatio = this.getPixelRatio(options); // Check if scale needs to be updated as per min/max dimensions

            scale = this.getAdjustedScale(width * pixelRatio, height * pixelRatio, scale, options);
            data = this.normalizeSVG(this.serializeElement(this.sprite.paper.defs) + this.serializeElement(this.sprite.dom), options, width, height, scale, font, fontSize, background);
            canvas = this.getDisposableCanvas(); // Set canvas width/height

            canvas.style.width = width * pixelRatio * scale + 'px';
            canvas.style.height = height * pixelRatio * scale + 'px';
            canvas.width = width * pixelRatio * scale;
            canvas.height = height * pixelRatio * scale;
            config = {
              //ignoreDimensions: true,
              useCORS: true
            };

            if (pixelRatio != 1) {
              config.ignoreDimensions = true;
              config.scaleWidth = width * pixelRatio * scale;
              config.scaleHeight = height * pixelRatio * scale;
            }

            return [4
            /*yield*/
            , canvg.fromString(canvas.getContext("2d"), data, config).render()];

          case 3:
            _a.sent();

            return [2
            /*return*/
            , canvas];
        }
      });
    });
  };
  /**
   * Tries to dynamically load [canvg.js](https://github.com/canvg/canvg) and
   * export an image using its functions.
   *
   * This is an asynchronous function. Check the description of `getImage()`
   * for description and example usage.
   *
   * @param type     Image format
   * @param options  Options
   * @return Data uri
   */


  Export.prototype.getImageAdvanced = function (type, options, includeExtras) {
    return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__awaiter)(this, void 0, void 0, function () {
      var prehidden, canvas, uri;
      return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__generator)(this, function (_a) {
        switch (_a.label) {
          case 0:
            prehidden = this._objectsAlreadyHidden;

            if (!prehidden) {
              this.hideNonExportableSprites();
            }

            if (!_utils_Type__WEBPACK_IMPORTED_MODULE_18__.hasValue(options)) {
              options = this.getFormatOptions(type);
            }

            return [4
            /*yield*/
            , this.getCanvasAdvanced(options)];

          case 1:
            canvas = _a.sent();
            if (!(includeExtras !== false)) return [3
            /*break*/
            , 3];
            return [4
            /*yield*/
            , this.addExtras(canvas, options, true)];

          case 2:
            canvas = _a.sent();
            _a.label = 3;

          case 3:
            uri = canvas.toDataURL(this.getContentType(type), options.quality); // Get rid of the canvas

            this.disposeCanvas(canvas);

            if (!prehidden) {
              this.restoreNonExportableSprites();
            }

            return [2
            /*return*/
            , uri];
        }
      });
    });
  };
  /**
   * Creates a `<canvas>` element and returns it.
   *
   * @return Canvas element
   */


  Export.prototype.getDisposableCanvas = function () {
    var canvas = document.createElement("canvas");
    canvas.style.position = "fixed";
    canvas.style.top = "-10000px";
    document.body.appendChild(canvas);
    return canvas;
  };
  /**
   * Removes canvas.
   *
   * @param canvas  Canvas element
   */


  Export.prototype.disposeCanvas = function (canvas) {
    document.body.removeChild(canvas);
  };
  /**
   * Returns pixel ratio for retina displays.
   *
   * @return Pixel ratio
   */


  Export.prototype.getPixelRatio = function (options) {
    // const scale = options && options.scale ? options.scale : 1;
    // return (this.useRetina ? $utils.getPixelRatio() : 1) * scale;
    return this.useRetina ? _utils_Utils__WEBPACK_IMPORTED_MODULE_20__.getPixelRatio() : 1;
  };
  /**
   * Calculates adjusted scale if image does not fit or is larger than min/max
   * settings.
   *
   * @param   width    Width of the source image
   * @param   height   Height of the source image
   * @param   scale    Current scale
   * @param   options  Options
   * @return           Adjusted scale
   */


  Export.prototype.getAdjustedScale = function (width, height, scale, options) {
    if (!options) {
      return scale;
    }

    var adjWidth = width * scale;
    var adjHeight = width * scale; // Check max restrictions

    var widthScale;
    var heightScale;

    if (options.maxWidth && adjWidth > options.maxWidth) {
      widthScale = options.maxWidth / width;
    }

    if (options.maxHeight && adjHeight > options.maxHeight) {
      heightScale = options.maxHeight / height;
    }

    if (widthScale || heightScale) {
      return _utils_Math__WEBPACK_IMPORTED_MODULE_22__.min(widthScale, heightScale);
    } // Check min restrictions


    if (options.minWidth && adjWidth < options.minWidth) {
      widthScale = options.minWidth / width;
    }

    if (options.minHeight && adjHeight < options.minHeight) {
      heightScale = options.minHeight / height;
    }

    if (widthScale || heightScale) {
      return _utils_Math__WEBPACK_IMPORTED_MODULE_22__.max(widthScale, heightScale);
    }

    return scale;
  };
  /**
   * Converts all `<image>` tags in SVG to use data uris instead of external
   * URLs
   *
   * This is an asynchronous function. Check the description of `getImage()`
   * for description and example usage.
   *
   * @ignore Exclude from docs
   * @param el       SVG node
   * @param options  Options
   * @return Promise
   */


  Export.prototype.imagesToDataURI = function (el, options) {
    return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__awaiter)(this, void 0, void 0, function () {
      var images, promises, count, i, image, href;
      return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__generator)(this, function (_a) {
        switch (_a.label) {
          case 0:
            images = el.querySelectorAll("image");
            if (!images.length) return [3
            /*break*/
            , 2];
            promises = []; // There are images, process each of them

            for (count = images.length, i = 0; i < count; i++) {
              image = images[i];
              href = image.getAttributeNS(Export.XLINK, "href"); // no href?

              if (!href) {
                continue;
              }

              if (href.indexOf("data:image") !== -1) {// Ignore image if it's already in Data URI format
              } else {
                // SVG or bitmap image?
                if (href.indexOf(".svg") !== -1) {
                  promises.push(this.svgToDataURI(image, options));
                } else {
                  promises.push(this.imageToDataURI(image, options));
                }
              }
            }

            return [4
            /*yield*/
            , Promise.all(promises)];

          case 1:
            _a.sent();

            return [2
            /*return*/
            ];

          case 2:
            return [2
            /*return*/
            ];
        }
      });
    });
  };
  /**
   * `foreignObject` elements cannot be exported. This function hides them
   * temprarily. In the future it might try to convert them to SVG to make them
   * exportable.
   *
   * This is an asynchronous function. Check the description of `getImage()`
   * for description and example usage.
   *
   * @ignore Exclude from docs
   * @param el       SVG node
   * @param options  Options
   * @return Promise
   */


  Export.prototype.prepForeignObjects = function (el, options) {
    return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__awaiter)(this, void 0, void 0, function () {
      var objects, count, i;
      return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__generator)(this, function (_a) {
        objects = el.querySelectorAll("foreignObject");

        if (objects.length) {
          // There are foreign objects, process each of them
          for (count = objects.length, i = 0; i < count; i++) {
            this.temporarilyRemoveObject(objects[i]);
          }
        }

        return [2
        /*return*/
        ];
      });
    });
  };
  /**
   * Converts an SVG `<image>` to use its data uri for `href` instead of
   * external file.
   *
   * This is an asynchronous function. Check the description of `getImage()`
   * for description and example usage.
   *
   * @ignore Exclude from docs
   * @param el       SVG element
   * @param options  Options
   */


  Export.prototype.imageToDataURI = function (el, options) {
    return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__awaiter)(this, void 0, void 0, function () {
      var img, canvas, uri, e_5;
      return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__generator)(this, function (_a) {
        switch (_a.label) {
          case 0:
            _a.trys.push([0, 2,, 3]);

            return [4
            /*yield*/
            , this.loadNewImage(el.getAttributeNS(Export.XLINK, "href"), null, null, "anonymous")];

          case 1:
            // Create image
            img = _a.sent();
            canvas = document.createElement("canvas");
            canvas.width = img.width;
            canvas.height = img.height; // Draw new image on it via `toDataURL`

            canvas.getContext("2d").drawImage(img, 0, 0); // Replace image `href` with data uri
            // If we got to this point it means image has loaded, however we might
            // still get an error with `toDataURL()`

            try {
              uri = canvas.toDataURL();
              el.setAttribute("href", uri);
              return [2
              /*return*/
              , uri];
            } catch (e) {
              // Give up and temporarily remove the element href temporarily
              if (options.keepTainted !== false) {
                /*this._removedObjects.push({
                    "element": el,
                    "originalHref": el.getAttributeNS(Export.XLINK, "href")
                });
                el.setAttributeNS(Export.XLINK, "href", "");*/
                this.temporarilyRemoveObject(el);
              }

              return [2
              /*return*/
              , undefined];
            }

            return [3
            /*break*/
            , 3];

          case 2:
            e_5 = _a.sent(); // Give up and temporarily remove the element's href

            if (!options || options.keepTainted !== false) {
              /*this._removedObjects.push({
                  "element": el,
                  "originalHref": el.getAttributeNS(Export.XLINK, "href")
              });
              el.setAttributeNS(Export.XLINK, "href", "");*/
              this.temporarilyRemoveObject(el);
            }

            return [2
            /*return*/
            , undefined];

          case 3:
            return [2
            /*return*/
            ];
        }
      });
    });
  };
  /**
   * Converts `<image>` with external SVG source to data uri. Loads external SVG
   * file, then converts it to data uri and replaces the `xlink:href` parameter.
   *
   * This is an asynchronous function. Check the description of `getImage()`
   * for description and example usage.
   *
   * @ignore Exclude from docs
   * @param el        An SVG element
   * @param options   Options
   */


  Export.prototype.svgToDataURI = function (el, options) {
    return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__awaiter)(this, void 0, void 0, function () {
      var href, data, charset, uri, e_6;
      return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__generator)(this, function (_a) {
        switch (_a.label) {
          case 0:
            href = el.getAttributeNS(Export.XLINK, "href");
            _a.label = 1;

          case 1:
            _a.trys.push([1, 3,, 4]);

            return [4
            /*yield*/
            , _utils_Net__WEBPACK_IMPORTED_MODULE_17__.load(href)];

          case 2:
            data = _a.sent();
            charset = this.adapter.apply("charset", {
              charset: "base64",
              type: "svg",
              options: options
            }).charset;
            uri = this.adapter.apply("svgToDataURI", {
              data: "data:" + this.getContentType("svg") + ";" + charset + "," + btoa(data.response),
              options: options
            }).data;
            el.setAttributeNS(Export.XLINK, "href", uri);
            return [2
            /*return*/
            , uri];

          case 3:
            e_6 = _a.sent(); // Disable temporarily

            if (!options || options.keepTainted !== false) {
              /*this._removedObjects.push({
                  "element": el,
                  "originalHref": href
              });
              el.setAttributeNS(Export.XLINK, "href", "");*/
              this.temporarilyRemoveObject(el);
            }

            return [2
            /*return*/
            , undefined];

          case 4:
            return [2
            /*return*/
            ];
        }
      });
    });
  };
  /**
   * Temporarily removes element from DOM, and replaces it with a dummy
   * placeholder, as well as stores it for later restoration.
   *
   * This is an asynchronous function. Check the description of `getImage()`
   * for description and example usage.
   *
   * @ignore Exclude from docs
   * @param el Node
   */


  Export.prototype.temporarilyRemoveObject = function (el, placeholder) {
    // Get parent
    var parent = el.parentElement || el.parentNode; // Create a placeholder group element if it has not been passed in

    if (!placeholder) {
      placeholder = this.sprite.paper.add("g").node;
    }

    parent.insertBefore(placeholder, el); // Check if we have a textContents we can replace with
    // @todo Perhaps we should explore alternatives to creating text nodes
    // i.e. creating a text version of the HTML-based Text, just for export
    // purposes. Converting HTML into SVG is very complicated

    if (el.textContent) {
      /*let text = this.sprite.paper.add("text").node;
      text.textContent = el.textContent;
      placeholder.appendChild(text);
        // Copy properties from the removing element to the placeholder
      $dom.copyAttributes(el, placeholder);*/
    } // Remove the old element


    parent.removeChild(el); // Log removed item

    this._removedObjects.push({
      "element": el,
      "placeholder": placeholder
    });
  };
  /**
   * Restores all (possibly tainted or unsupported) objects that were
   * temporarily removed when exporting.
   *
   * @ignore Exclude from docs
   */


  Export.prototype.restoreRemovedObjects = function () {
    var obj;

    while (true) {
      obj = this._removedObjects.pop();

      if (!obj) {
        break;
      } //obj.element.setAttribute("href", obj.originalHref);


      var parent_1 = obj.placeholder.parentElement || obj.placeholder.parentNode;
      parent_1.insertBefore(obj.element, obj.placeholder); //parent.removeChild(obj.placeholder);
    }
  };
  /**
   * Checkes if simplified export can be used using `createObjectURL` and SVG
   * document does not contain any external images.
   *
   * This is an asynchronous function. Check the description of `getImage()`
   * for description and example usage.
   *
   * @ignore Exclude from docs
   * @return `true` if simplified export can be used
   */


  Export.prototype.simplifiedImageExport = function () {
    return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__awaiter)(this, void 0, void 0, function () {
      var cache, canvas, ctx, DOMURL, svg, url, img, e_7, e_8;
      return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__generator)(this, function (_a) {
        switch (_a.label) {
          case 0:
            if (this.useSimplifiedExport === false) {
              return [2
              /*return*/
              , false];
            }

            cache = _Registry__WEBPACK_IMPORTED_MODULE_12__.registry.getCache("simplifiedImageExport");

            if (cache === false || cache === true) {
              return [2
              /*return*/
              , cache];
            }

            _a.label = 1;

          case 1:
            _a.trys.push([1, 6,, 7]);

            canvas = document.createElement("canvas");
            canvas.width = 1;
            canvas.height = 1;
            ctx = canvas.getContext("2d");
            DOMURL = this.getDOMURL();
            svg = new Blob([this.normalizeSVG("<g></g>", {}, 1, 1)], {
              type: "image/svg+xml"
            });
            url = DOMURL.createObjectURL(svg);
            img = void 0;
            _a.label = 2;

          case 2:
            _a.trys.push([2, 4,, 5]);

            return [4
            /*yield*/
            , this.loadNewImage(url, 1, 1)];

          case 3:
            img = _a.sent();
            return [3
            /*break*/
            , 5];

          case 4:
            e_7 = _a.sent();
            return [2
            /*return*/
            , false];

          case 5:
            ctx.drawImage(img, 0, 0);
            DOMURL.revokeObjectURL(url);

            try {
              //let uri = canvas.toDataURL("image/png");
              _Registry__WEBPACK_IMPORTED_MODULE_12__.registry.setCache("simplifiedImageExport", true);
              return [2
              /*return*/
              , true];
            } catch (e) {
              _Registry__WEBPACK_IMPORTED_MODULE_12__.registry.setCache("simplifiedImageExport", false);
              return [2
              /*return*/
              , false];
            }

            return [3
            /*break*/
            , 7];

          case 6:
            e_8 = _a.sent();
            _Registry__WEBPACK_IMPORTED_MODULE_12__.registry.setCache("simplifiedImageExport", false);
            return [2
            /*return*/
            , false];

          case 7:
            return [2
            /*return*/
            ];
        }
      });
    });
  };
  /**
   * Returns a new `<image>` element.
   *
   * @ignore Exclude from docs
   * @param url          URL of the image
   * @param width        Width (px)
   * @param height       Height (px)
   * @param crossOrigin  Cross-Origin setting
   * @return Promise
   */


  Export.prototype.loadNewImage = function (url, width, height, crossOrigin) {
    return new Promise(function (success, error) {
      // New image
      var image;

      if (width && height) {
        image = new Image(width, height);
      } else {
        image = new Image();
      } // Set crossorigin


      if (crossOrigin) {
        image.setAttribute("crossOrigin", crossOrigin);
      } // Report success on load


      image.onload = function () {
        success(image);
      };

      function onerror() {
        // Error occurred. Just in case it's the crossOrigin issue, let's try
        // stripping off this attribute and trying again
        if (crossOrigin) {
          // Retain old uri
          var currentHref = image.src; // Set up another `onerror` to handle situations where image is not
          // loadable at all (i.e. protected by CORS)

          image.onerror = function () {
            // Nope, no luck
            error(new Error("Loading image \"" + url + "\" failed"));
          }; // remove the `crossOrigin` attribute


          image.removeAttribute("crossorigin"); // retry

          image.src = "";
          image.src = currentHref;
        } else {
          error(new Error("Loading image \"" + url + "\" failed"));
        }
      } // Set image error handlers


      image.onabort = onerror;
      image.onerror = onerror; // Trigger load

      image.src = url;
    });
  };
  /**
   * Returns current DOM URL.
   *
   * @ignore Exclude from docs
   * @return URL
   */


  Export.prototype.getDOMURL = function () {
    return self.URL || self.webkitURL || self;
  };
  /**
   * Returns an SVG representation of the chart.
   *
   * This is an asynchronous function. Check the description of `getImage()`
   * for description and example usage.
   *
   * @param type       Type of the export
   * @param options    Options
   * @param encodeURI  If true, will return result will be data URI
   * @return Promise
   */


  Export.prototype.getSVG = function (type, options, encodeURI) {
    if (encodeURI === void 0) {
      encodeURI = true;
    }

    return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__awaiter)(this, void 0, void 0, function () {
      var prehidden, width, height, font, fontSize, scale, pixelRatio, svg, charset, uri;
      return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__generator)(this, function (_a) {
        switch (_a.label) {
          case 0:
            prehidden = this._objectsAlreadyHidden;

            if (!prehidden) {
              this.hideNonExportableSprites();
            }

            if (!_utils_Type__WEBPACK_IMPORTED_MODULE_18__.hasValue(options)) {
              options = this.getFormatOptions("svg");
            } // Wait for required elements to be ready before proceeding


            return [4
            /*yield*/
            , this.awaitValidSprites()];

          case 1:
            // Wait for required elements to be ready before proceeding
            _a.sent();

            width = this.sprite.pixelWidth;
            height = this.sprite.pixelHeight;
            font = _utils_DOM__WEBPACK_IMPORTED_MODULE_14__.findFont(this.sprite.dom);
            fontSize = _utils_DOM__WEBPACK_IMPORTED_MODULE_14__.findFontSize(this.sprite.dom);
            scale = options.scale || 1;
            pixelRatio = this.getPixelRatio(options); // Check if scale needs to be updated as per min/max dimensions

            scale = this.getAdjustedScale(width * pixelRatio, height * pixelRatio, scale, options);
            svg = this.normalizeSVG(this.serializeElement(this.sprite.paper.defs) + this.serializeElement(this.sprite.dom), options, width, height, scale, font, fontSize);
            charset = this.adapter.apply("charset", {
              charset: "charset=utf-8",
              type: "svg",
              options: options
            }).charset;
            uri = this.adapter.apply("getSVG", {
              data: encodeURI ? "data:" + this.getContentType(type) + ";" + charset + "," + encodeURIComponent(svg) : svg,
              options: options
            }).data;

            if (!prehidden) {
              this.restoreNonExportableSprites();
            }

            return [2
            /*return*/
            , uri];
        }
      });
    });
  };
  /**
   * Checks if SVG is fully formatted. Encloses in `<svg>...</svg>` if
   * necessary.
   *
   * @ignore Exclude from docs
   * @param svg       Input SVG
   * @param options   Options
   * @param width     Width of the SVG viewport
   * @param height    Height of the SVG viewport
   * @param font      Font family to use as a base
   * @param fontSize  Font size to use as a base
   * @return Output SVG
   * @todo Add style params to existing <svg>
   */


  Export.prototype.normalizeSVG = function (svg, options, width, height, scale, font, fontSize, background) {
    // Construct width/height params
    var dimParams = "";

    if (width) {
      dimParams += "width=\"" + Math.round(width * (scale || 1)) + "px\" ";
    }

    if (height) {
      dimParams += "height=\"" + Math.round(height * (scale || 1)) + "px\" ";
    } // Apply font settings


    var styleParams = "";

    if (font) {
      styleParams += "font-family: " + font.replace(/"/g, "") + ";";
    }

    if (fontSize) {
      styleParams += "font-size: " + fontSize + ";";
    } // Scale


    if (scale) {
      dimParams += "viewBox=\"0 0 " + width + " " + height + "\" ";
    } // Remove foreign objects temporarily


    var fos = [];
    var ms = svg.match(/<foreignObject[\s\S]*<\/foreignObject>/gi);

    if (ms) {
      for (var i = 0; i < ms.length; i++) {
        svg = svg.replace(ms[i], _utils_Strings__WEBPACK_IMPORTED_MODULE_23__.PLACEHOLDER);
        fos.push(ms[i]);
      }
    } // Add missing <svg> enclosure


    if (!svg.match(/<svg/)) {
      svg = "<?xml version=\"1.0\" encoding=\"utf-8\"?><svg " + dimParams + " style=\"" + styleParams + "\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">" + svg + "</svg>";
    } else {
      if (dimParams !== "") {
        // Clear current params
        svg = svg.replace(/(<svg[^>]*)width="[^"]*"/, "$1");
        svg = svg.replace(/(<svg[^>]*)height="[^"]*"/, "$1"); // Add new params

        svg = svg.replace(/(<svg)/, "$1" + dimParams);
      }
      /*if (styleParams !== "") {
          // Clear current params
          svg = svg.replace(/(<svg[^>]*)stylewidth="[^"]*"/, "$1");
          svg = svg.replace(/(<svg[^>]*)height="[^"]*"/, "$1");
            // Add new params
          svg = svg.replace(/(<svg)/, "$1" + dimParams);
      }*/

    }

    if (background) {
      svg = svg.replace(/(<svg[^>]*>)/, "$1<rect width=\"100%\" height=\"100%\" fill=\"" + background.rgba + "\"/>"); //svg = svg.replace(/<\/svg>/, "<rect width=\"100%\" height=\"100%\" fill=\"" + background.rgba + "\"/></svg>");
    }

    if (_utils_Browser__WEBPACK_IMPORTED_MODULE_15__.isInternetExplorer()) {
      // IE can't handle exporting <feColorMatrix> for some reason
      svg = svg.replace(/<feColorMatrix [^\/>]*\/>/gi, "");
    } // Remove base uri-related stuff


    var reg = new RegExp("url\\(" + _utils_Utils__WEBPACK_IMPORTED_MODULE_20__.escapeForRgex(_utils_Utils__WEBPACK_IMPORTED_MODULE_20__.getBaseURI()), "g");
    svg = svg.replace(reg, "url(#"); // Remove escaped quotes in url() parameters

    svg = svg.replace(/url\(&quot;([^)]*)&quot;\)/gm, "url($1)"); // Put foreignObjects back in

    if (fos.length) {
      for (var i = 0; i < fos.length; i++) {
        svg = svg.replace(_utils_Strings__WEBPACK_IMPORTED_MODULE_23__.PLACEHOLDER, fos[i]);
      }
    }

    svg = this.adapter.apply("normalizeSVG", {
      data: svg,
      options: options
    }).data;
    return svg;
  };
  /**
   * Serializes an element and returns its contents.
   *
   * @ignore Exclude from docs
   * @param element  An element to serialize
   * @return A serialized XML
   */


  Export.prototype.serializeElement = function (element) {
    return new XMLSerializer().serializeToString(element);
  };
  /**
   * Returns a PDF containing chart image.
   *
   * This is an asynchronous function. Check the description of `getImage()`
   * for description and example usage.
   *
   * @param type     Type of the export
   * @param options  Options
   * @return Promise
   * @async
   * @todo Account for header when calculating vertical fit
   */


  Export.prototype.getPDF = function (type, options) {
    return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__awaiter)(this, void 0, void 0, function () {
      function addFont(font) {
        var paths = {};
        paths.normal = font.normal.path;
        vfs[font.normal.path] = font.normal.bytes;

        if (font.bold) {
          paths.bold = font.bold.path;
          vfs[font.bold.path] = font.bold.bytes;
        } else {
          paths.bold = font.normal.path;
        }

        if (font.italics) {
          paths.italics = font.italics.path;
          vfs[font.italics.path] = font.italics.bytes;
        } else {
          paths.italics = font.normal.path;
        }

        if (font.bolditalics) {
          paths.bolditalics = font.bolditalics.path;
          vfs[font.bolditalics.path] = font.bolditalics.bytes;
        } else {
          paths.bolditalics = font.normal.path;
        }

        fonts[font.name] = paths;
      }

      var image, pdfmake, defaultMargins, doc, title, extraMargin, _a, _b, _c, fonts, vfs;

      return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__generator)(this, function (_d) {
        switch (_d.label) {
          case 0:
            return [4
            /*yield*/
            , this.getImage(options.imageFormat || "png", options)];

          case 1:
            image = _d.sent();
            return [4
            /*yield*/
            , this.pdfmake];

          case 2:
            pdfmake = _d.sent();
            defaultMargins = [30, 30, 30, 30];
            doc = {
              pageSize: options.pageSize || "A4",
              pageOrientation: options.pageOrientation || "portrait",
              pageMargins: options.pageMargins || defaultMargins,
              defaultStyle: {
                font: options.font ? options.font.name : undefined
              },
              //header: <any>[],
              content: []
            };
            title = this.adapter.apply("title", {
              title: this.title,
              options: options
            }).title;
            extraMargin = 0;

            if (title) {
              doc.content.push({
                text: title,
                fontSize: options.fontSize || 14,
                bold: true,
                margin: [0, 0, 0, 15]
              }); // Add some leftover margin for title

              extraMargin += 50;
            } // Add page URL?


            if (options.addURL) {
              doc.content.push({
                text: this.language.translate("Saved from") + ": " + document.location.href,
                fontSize: options.fontSize,
                margin: [0, 0, 0, 15]
              }); // Add some leftover margin for URL

              extraMargin += 50;
            } // Add image


            if (type != "pdfdata") {
              doc.content.push({
                image: image,
                alignment: options.align || "left",
                fit: this.getPageSizeFit(doc.pageSize, doc.pageMargins, extraMargin)
              });
            }

            if (!(type == "pdfdata" || options.addData)) return [3
            /*break*/
            , 4];
            _b = (_a = doc.content).push;
            _c = {};
            return [4
            /*yield*/
            , this.getPDFData("pdf", options)];

          case 3:
            _b.apply(_a, [(_c.table = _d.sent(), _c.fontSize = options.fontSize || 14, _c)]);

            _d.label = 4;

          case 4:
            // Apply adapters
            doc = this.adapter.apply("pdfmakeDocument", {
              doc: doc,
              options: options
            }).doc;
            fonts = null;
            vfs = null;

            if (options.font) {
              fonts = {};
              vfs = {};
              addFont(options.font);

              if (options.extraFonts) {
                _utils_Array__WEBPACK_IMPORTED_MODULE_21__.each(options.extraFonts, addFont);
              }
            }

            return [4
            /*yield*/
            , new Promise(function (success, error) {
              pdfmake.createPdf(doc, null, fonts, vfs).getDataUrl(function (uri) {
                success(uri);
              });
            })];

          case 5:
            // Create PDF
            return [2
            /*return*/
            , _d.sent()];
        }
      });
    });
  };
  /**
   * Returns chart's data formatted suitable for PDF export (pdfmake).
   *
   * This is an asynchronous function. Check the description of `getImage()`
   * for description and example usage.
   *
   * @since 4.7.0
   * @param type     Type of the export
   * @param options  Options
   * @return Promise
   * @async
   */


  Export.prototype.getPDFData = function (type, options) {
    return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__awaiter)(this, void 0, void 0, function () {
      var content, dataFields, data, dataFieldsOrder_1, len, i;

      var _this = this;

      return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__generator)(this, function (_a) {
        content = {
          "body": []
        };
        dataFields = this.adapter.apply("formatDataFields", {
          dataFields: this.dataFields,
          format: "pdf"
        }).dataFields;
        data = this.data; // Vertical or horizontal (default) layout

        if (options.pivot) {
          dataFieldsOrder_1 = this.adapter.apply("dataFieldsOrder", {
            dataFieldsOrder: this.dataFieldsOrder,
            format: "pdfdata"
          }).dataFieldsOrder;
          _utils_Object__WEBPACK_IMPORTED_MODULE_16__.eachOrdered(dataFields, function (key, val) {
            var dataRow = [];

            if (options.addColumnNames) {
              dataRow.push(val);
            }

            for (var len = data.length, i = 0; i < len; i++) {
              var dataValue = data[i][key];
              dataRow.push(_this.convertToSpecialFormat(key, dataValue, options, true));
            }

            content.body.push(_this.getPDFDataRow(dataRow, options, undefined, true));
          }, function (a, b) {
            //console.log(a, b)
            var ai = dataFieldsOrder_1.indexOf(a);
            var bi = dataFieldsOrder_1.indexOf(b);

            if (ai > bi) {
              return 1;
            } else if (ai < bi) {
              return -1;
            }

            return 0;
          });
        } else {
          // Add column names?
          if (options.addColumnNames) {
            content.body.push(this.getPDFDataRow(dataFields, options, undefined, true));
            content.headerRows = 1;
          }

          for (len = data.length, i = 0; i < len; i++) {
            content.body.push(this.getPDFDataRow(data[i], options, dataFields));
          }
        }

        return [2
        /*return*/
        , this.adapter.apply("pdfmakeTable", {
          table: content,
          options: options
        }).table];
      });
    });
  };
  /**
   * Formats a row of data for use in PDF data table (pdfmake).
   *
   * @ignore Exclude from docs
   * @since 4.7.0
   * @param  row         An object holding data for the row
   * @param  options     Options
   * @param  dataFields  Data fields
   * @param  asIs        Do not try to convert to dates
   * @return Formated Data line
   */


  Export.prototype.getPDFDataRow = function (row, options, dataFields, asIs) {
    var _this = this;

    if (asIs === void 0) {
      asIs = false;
    } // Init


    var items = []; // Data fields

    if (!dataFields) {
      dataFields = row;
    } // Data fields order


    var dataFieldsOrder = this.adapter.apply("dataFieldsOrder", {
      dataFieldsOrder: this.dataFieldsOrder,
      format: "pdfdata"
    }).dataFieldsOrder; // Process each row item

    _utils_Object__WEBPACK_IMPORTED_MODULE_16__.eachOrdered(dataFields, function (key, name) {
      // Get value
      var value = _this.convertEmptyValue(key, row[key], options); // Convert dates


      var item = asIs ? value : _this.convertToSpecialFormat(key, value, options);
      item = "" + item; // Add to item

      items.push(item);
    }, function (a, b) {
      //console.log(a, b)
      var ai = dataFieldsOrder.indexOf(a);
      var bi = dataFieldsOrder.indexOf(b);

      if (ai > bi) {
        return 1;
      } else if (ai < bi) {
        return -1;
      }

      return 0;
    });
    return items;
  };
  /**
   * Returns fit dimensions for available page sizes.
   *
   * @ignore Exclude from docs
   * @param pageSize Page size
   * @return `[width, height]` in pixels
   */


  Export.prototype.getPageSizeFit = function (pageSize, margins, extraMargin) {
    if (extraMargin === void 0) {
      extraMargin = 0;
    } // Check margins


    var newMargins = [0, 0, 0, 0];

    if (typeof margins == "number") {
      newMargins = [margins, margins, margins, margins];
    } else if (margins.length == 2) {
      newMargins = [margins[0], margins[1], margins[0], margins[1]];
    } else if (margins.length == 4) {
      newMargins = margins;
    } // Define available page sizes


    var sizes = {
      "4A0": [4767.87, 6740.79],
      "2A0": [3370.39, 4767.87],
      A0: [2383.94, 3370.39],
      A1: [1683.78, 2383.94],
      A2: [1190.55, 1683.78],
      A3: [841.89, 1190.55],
      A4: [595.28, 841.89],
      A5: [419.53, 595.28],
      A6: [297.64, 419.53],
      A7: [209.76, 297.64],
      A8: [147.40, 209.76],
      A9: [104.88, 147.40],
      A10: [73.70, 104.88],
      B0: [2834.65, 4008.19],
      B1: [2004.09, 2834.65],
      B2: [1417.32, 2004.09],
      B3: [1000.63, 1417.32],
      B4: [708.66, 1000.63],
      B5: [498.90, 708.66],
      B6: [354.33, 498.90],
      B7: [249.45, 354.33],
      B8: [175.75, 249.45],
      B9: [124.72, 175.75],
      B10: [87.87, 124.72],
      C0: [2599.37, 3676.54],
      C1: [1836.85, 2599.37],
      C2: [1298.27, 1836.85],
      C3: [918.43, 1298.27],
      C4: [649.13, 918.43],
      C5: [459.21, 649.13],
      C6: [323.15, 459.21],
      C7: [229.61, 323.15],
      C8: [161.57, 229.61],
      C9: [113.39, 161.57],
      C10: [79.37, 113.39],
      RA0: [2437.80, 3458.27],
      RA1: [1729.13, 2437.80],
      RA2: [1218.90, 1729.13],
      RA3: [864.57, 1218.90],
      RA4: [609.45, 864.57],
      SRA0: [2551.18, 3628.35],
      SRA1: [1814.17, 2551.18],
      SRA2: [1275.59, 1814.17],
      SRA3: [907.09, 1275.59],
      SRA4: [637.80, 907.09],
      EXECUTIVE: [521.86, 756.00],
      FOLIO: [612.00, 936.00],
      LEGAL: [612.00, 1008.00],
      LETTER: [612.00, 792.00],
      TABLOID: [792.00, 1224.00]
    }; // Calculate size

    var fitSize = sizes[pageSize];
    fitSize[0] -= newMargins[0] + newMargins[2];
    fitSize[1] -= newMargins[1] + newMargins[3] + extraMargin;
    return fitSize;
  };
  /**
   * Returns an Excel file of chart's data.
   *
   * This is an asynchronous function. Check the description of `getImage()`
   * for description and example usage.
   *
   * @param type     Type of the export
   * @param options  Options
   * @return Promise
   * @async
   * @todo Handle dates
   * @todo Support for multi-sheet
   */


  Export.prototype.getExcel = function (type, options) {
    return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__awaiter)(this, void 0, void 0, function () {
      var XLSX, wbOptions, sheetName, wb, data, dataFields, dataFieldsOrder_2, len, i, uri;

      var _this = this;

      return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__generator)(this, function (_a) {
        switch (_a.label) {
          case 0:
            if (!_utils_Type__WEBPACK_IMPORTED_MODULE_18__.hasValue(options)) {
              options = this.getFormatOptions("xlsx");
            }

            return [4
            /*yield*/
            , this.xlsx];

          case 1:
            XLSX = _a.sent();
            wbOptions = this.adapter.apply("xlsxWorkbookOptions", {
              xlsx: XLSX,
              options: {
                bookType: "xlsx",
                bookSST: false,
                type: "base64"
              }
            }).options;
            sheetName = this.normalizeExcelSheetName(this.adapter.apply("xlsxSheetName", {
              xlsx: XLSX,
              name: this.title || this.language.translate("Data")
            }).name);
            wb = {
              SheetNames: [sheetName],
              Sheets: {}
            };
            data = [];
            dataFields = this.adapter.apply("formatDataFields", {
              dataFields: this.dataFields,
              format: "xslx"
            }).dataFields; // Vertical or horizontal (default) layout

            if (options.pivot) {
              dataFieldsOrder_2 = this.adapter.apply("dataFieldsOrder", {
                dataFieldsOrder: this.dataFieldsOrder,
                format: "xlsx"
              }).dataFieldsOrder;
              _utils_Object__WEBPACK_IMPORTED_MODULE_16__.eachOrdered(dataFields, function (key, val) {
                var dataRow = [];

                if (options.addColumnNames) {
                  dataRow.push(val);
                }

                for (var len = _this.data.length, i = 0; i < len; i++) {
                  var dataValue = _this.data[i][key];
                  dataRow.push(_this.convertToSpecialFormat(key, dataValue, options, true));
                }

                data.push(_this.getExcelRow(dataRow, options, undefined, true));
              }, function (a, b) {
                //console.log(a, b)
                var ai = dataFieldsOrder_2.indexOf(a);
                var bi = dataFieldsOrder_2.indexOf(b);

                if (ai > bi) {
                  return 1;
                } else if (ai < bi) {
                  return -1;
                }

                return 0;
              });
            } else {
              // Add column names?
              if (options.addColumnNames) {
                data.push(this.getExcelRow(dataFields, options, undefined, true));
              } // Add lines


              for (len = this.data.length, i = 0; i < len; i++) {
                data.push(this.getExcelRow(this.data[i], options, dataFields));
              }
            } // Create sheet and add data


            wb.Sheets[sheetName] = XLSX.utils.aoa_to_sheet(data); // Apply adapters

            wb = this.adapter.apply("xlsxWorkbook", {
              xlsx: XLSX,
              workbook: wb,
              options: options
            }).workbook;
            uri = this.adapter.apply("getExcel", {
              data: "data:" + this.getContentType(type) + ";base64," + XLSX.write(wb, wbOptions),
              options: options
            }).data;
            return [2
            /*return*/
            , uri];
        }
      });
    });
  };
  /**
   * This is needed to work around Excel limitations.
   *
   * @param name  Source name
   * @return Normalized name
   */


  Export.prototype.normalizeExcelSheetName = function (name) {
    name = name.replace(/([:\\\/?*\[\]]+)/g, " ");
    return _utils_Utils__WEBPACK_IMPORTED_MODULE_20__.truncateWithEllipsis(name, 31, "...", true);
  };
  /**
   * Rertuns an array of values to be used as Excel row.
   *
   * @ignore Exclude from docs
   * @param  row         Row data
   * @param  options     Options
   * @param  dataFields  Data fields
   * @param  asIs        Do not try to convert to dates
   * @return Array of values
   */


  Export.prototype.getExcelRow = function (row, options, dataFields, asIs) {
    var _this = this;

    if (asIs === void 0) {
      asIs = false;
    } // Init


    var items = []; // Data fields

    if (!dataFields) {
      dataFields = row;
    } // Data fields order


    var dataFieldsOrder = this.adapter.apply("dataFieldsOrder", {
      dataFieldsOrder: this.dataFieldsOrder,
      format: "xlsx"
    }).dataFieldsOrder; // Process each row item

    _utils_Object__WEBPACK_IMPORTED_MODULE_16__.eachOrdered(dataFields, function (key, name) {
      // Get value
      var value = _this.convertEmptyValue(key, row[key], options); // Convert dates


      var item = asIs ? value : _this.convertToSpecialFormat(key, value, options, true);
      items.push(item);
    }, function (a, b) {
      //console.log(a, b)
      var ai = dataFieldsOrder.indexOf(a);
      var bi = dataFieldsOrder.indexOf(b);

      if (ai > bi) {
        return 1;
      } else if (ai < bi) {
        return -1;
      }

      return 0;
    });
    return items;
  };
  /**
   * Returns chart's data formatted as CSV.
   *
   * This is an asynchronous function. Check the description of `getImage()`
   * for description and example usage.
   *
   * @param type       Type of the export
   * @param options    Options
   * @param encodeURI  If true, will return result will be data URI
   * @return Promise
   * @async
   */


  Export.prototype.getCSV = function (type, options, encodeURI) {
    if (encodeURI === void 0) {
      encodeURI = true;
    }

    return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__awaiter)(this, void 0, void 0, function () {
      var csv, dataFields, br, data, dataFieldsOrder_3, len, i, row, charset, uri;

      var _this = this;

      return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__generator)(this, function (_a) {
        if (!_utils_Type__WEBPACK_IMPORTED_MODULE_18__.hasValue(options)) {
          options = this.getFormatOptions("csv");
        }

        csv = "";
        dataFields = this.adapter.apply("formatDataFields", {
          dataFields: this.dataFields,
          format: "csv"
        }).dataFields;
        br = "";
        data = this.data; // Vertical or horizontal (default) layout

        if (options.pivot) {
          dataFieldsOrder_3 = this.adapter.apply("dataFieldsOrder", {
            dataFieldsOrder: this.dataFieldsOrder,
            format: "csv"
          }).dataFieldsOrder;
          _utils_Object__WEBPACK_IMPORTED_MODULE_16__.eachOrdered(dataFields, function (key, val) {
            var dataRow = [];

            if (options.addColumnNames) {
              dataRow.push(val);
            }

            for (var len = data.length, i = 0; i < len; i++) {
              var dataValue = data[i][key];
              dataRow.push(_this.convertToSpecialFormat(key, dataValue, options, true));
            }

            csv += br + _this.getCSVRow(dataRow, options, undefined, true);
            br = "\n";
          }, function (a, b) {
            var ai = dataFieldsOrder_3.indexOf(a);
            var bi = dataFieldsOrder_3.indexOf(b);

            if (ai > bi) {
              return -1;
            } else if (ai < bi) {
              return 1;
            }

            return 0;
          });
        } else {
          for (len = data.length, i = 0; i < len; i++) {
            row = this.getCSVRow(data[i], options, dataFields);

            if (options.reverse) {
              csv = row + br + csv;
            } else {
              csv += br + row;
            }

            br = "\n";
          } // Add column names?


          if (options.addColumnNames) {
            csv = this.getCSVRow(dataFields, options, undefined, true) + br + csv;
          }
        }

        charset = this.adapter.apply("charset", {
          charset: "charset=utf-8",
          type: type,
          options: options
        }).charset;
        uri = this.adapter.apply("getCSV", {
          data: encodeURI ? "data:" + this.getContentType(type) + ";" + charset + "," + encodeURIComponent(csv) : csv,
          options: options
        }).data;
        return [2
        /*return*/
        , uri];
      });
    });
  };
  /**
   * Formats a row of CSV data.
   *
   * @ignore Exclude from docs
   * @param  row         An object holding data for the row
   * @param  options     Options
   * @param  dataFields  Data fields
   * @param  asIs        Do not try to convert to dates
   * @return Formated CSV line
   */


  Export.prototype.getCSVRow = function (row, options, dataFields, asIs) {
    var _this = this;

    if (asIs === void 0) {
      asIs = false;
    } // Init


    var separator = options.separator || ",";
    var items = []; // Data fields

    if (!dataFields) {
      dataFields = row;
    } // Data fields order


    var dataFieldsOrder = this.adapter.apply("dataFieldsOrder", {
      dataFieldsOrder: this.dataFieldsOrder,
      format: "csv"
    }).dataFieldsOrder; // Process each row item

    _utils_Object__WEBPACK_IMPORTED_MODULE_16__.eachOrdered(dataFields, function (key, name) {
      // Get value
      var value = _this.convertEmptyValue(key, row[key], options); // Check if we need to skip
      // This is no longer required because we are iterating via dataFields anyway

      /*if ($type.hasValue(this.dataFields) && !$type.hasValue(this.dataFields[key])) {
          return;
      }*/
      // Convert dates


      var item = asIs ? value : _this.convertToSpecialFormat(key, value, options); // Cast and escape doublequotes

      item = "" + item;
      item = item.replace(/"/g, '""'); // Enclose into double quotes

      if (options.forceQuotes || item.search(new RegExp("\"|\n|" + separator, "g")) >= 0) {
        item = "\"" + item + "\"";
      } // Add to item


      items.push(item);
    }, function (a, b) {
      //console.log(a, b)
      var ai = dataFieldsOrder.indexOf(a);
      var bi = dataFieldsOrder.indexOf(b);

      if (ai > bi) {
        return 1;
      } else if (ai < bi) {
        return -1;
      }

      return 0;
    });
    return items.join(separator);
  };
  /**
   * Returns chart's data formatted as HTML table.
   *
   * This is an asynchronous function. Check the description of `getImage()`
   * for description and example usage.
   *
   * @since 4.7.0
   * @param type       Type of the export
   * @param options    Options
   * @param encodeURI  If true, will return result will be data URI
   * @return Promise
   * @async
   */


  Export.prototype.getHTML = function (type, options, encodeURI) {
    if (encodeURI === void 0) {
      encodeURI = true;
    }

    return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__awaiter)(this, void 0, void 0, function () {
      var html, dataFields, data, dataFieldsOrder_4, len, i, charset, uri;

      var _this = this;

      return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__generator)(this, function (_a) {
        if (!_utils_Type__WEBPACK_IMPORTED_MODULE_18__.hasValue(options)) {
          options = this.getFormatOptions("html");
        }

        html = "<table>";

        if (options.tableClass) {
          html = "<table class=\"" + options.tableClass + "\">";
        }

        dataFields = this.adapter.apply("formatDataFields", {
          dataFields: this.dataFields,
          format: "html"
        }).dataFields;
        data = this.data; // Vertical or horizontal (default) layout

        if (options.pivot) {
          dataFieldsOrder_4 = this.adapter.apply("dataFieldsOrder", {
            dataFieldsOrder: this.dataFieldsOrder,
            format: "html"
          }).dataFieldsOrder;
          html += "\n<tbody>";
          _utils_Object__WEBPACK_IMPORTED_MODULE_16__.eachOrdered(dataFields, function (key, val) {
            var dataRow = [];

            if (options.addColumnNames) {
              dataRow.push(val);
            }

            for (var len = data.length, i = 0; i < len; i++) {
              var dataValue = data[i][key];
              dataRow.push(_this.convertToSpecialFormat(key, dataValue, options, true));
            }

            html += "\n" + _this.getHTMLRow(dataRow, options, undefined, true);
          }, function (a, b) {
            var ai = dataFieldsOrder_4.indexOf(a);
            var bi = dataFieldsOrder_4.indexOf(b);

            if (ai > bi) {
              return -1;
            } else if (ai < bi) {
              return 1;
            }

            return 0;
          });
          html += "\n</tbody>";
        } else {
          // Add column names?
          if (options.addColumnNames) {
            html += "\n<thead>\n" + this.getHTMLRow(dataFields, options, undefined, true, true) + "\n</thead>";
          }

          html += "\n<tbody>";

          for (len = data.length, i = 0; i < len; i++) {
            html += "\n" + this.getHTMLRow(data[i], options, dataFields);
          }

          html += "\n</tbody>";
        }

        html += "\n</table>";
        charset = this.adapter.apply("charset", {
          charset: "charset=utf-8",
          type: type,
          options: options
        }).charset;
        uri = this.adapter.apply("getHTML", {
          data: encodeURI ? "data:" + this.getContentType(type) + ";" + charset + "," + encodeURIComponent(html) : html,
          options: options
        }).data;
        return [2
        /*return*/
        , uri];
      });
    });
  };
  /**
   * Formats a row of HTML data.
   *
   * @since 4.7.0
   * @ignore Exclude from docs
   * @param  row         An object holding data for the row
   * @param  options     Options
   * @param  dataFields  Data fields
   * @param  asIs        Do not try to convert to dates
   * @return Formated HTML row
   */


  Export.prototype.getHTMLRow = function (row, options, dataFields, asIs, headerRow) {
    var _this = this;

    if (asIs === void 0) {
      asIs = false;
    }

    if (headerRow === void 0) {
      headerRow = false;
    } // Init output


    var html = "\t<tr>";

    if (options.rowClass) {
      html = "\t<tr class=\"" + options.rowClass + "\">";
    } // Data fields


    if (!dataFields) {
      dataFields = row;
    } // Data fields order


    var dataFieldsOrder = this.adapter.apply("dataFieldsOrder", {
      dataFieldsOrder: this.dataFieldsOrder,
      format: "html"
    }).dataFieldsOrder; // th or dh?

    var tag = headerRow ? "th" : "td"; // Process each row item

    var first = true;
    _utils_Object__WEBPACK_IMPORTED_MODULE_16__.eachOrdered(dataFields, function (key, name) {
      // Get value
      var value = _this.convertEmptyValue(key, row[key], options); // Convert dates


      var item = asIs ? value : _this.convertToSpecialFormat(key, value, options); // Escape HTML entities

      item = "" + item;
      item = item.replace(/[\u00A0-\u9999<>\&]/gim, function (i) {
        return "&#" + i.charCodeAt(0) + ";";
      }); // Which tag to use

      var useTag = tag;

      if (options.pivot && first) {
        useTag = "th";
      } // Add cell


      if (options.cellClass) {
        html += "\n\t\t<" + useTag + " class=\"" + options.cellClass + "\">" + item + "</" + useTag + ">";
      } else {
        html += "\n\t\t<" + useTag + ">" + item + "</" + useTag + ">";
      }

      first = false;
    }, function (a, b) {
      var ai = dataFieldsOrder.indexOf(a);
      var bi = dataFieldsOrder.indexOf(b);

      if (ai > bi) {
        return 1;
      } else if (ai < bi) {
        return -1;
      }

      return 0;
    });
    html += "\n\t</tr>";
    return html;
  };
  /**
   * Returns chart's data in JSON format.
   *
   * This is an asynchronous function. Check the description of `getImage()`
   * for description and example usage.
   *
   * @param type       Type of the export
   * @param options    Options
   * @param encodeURI  If true, will return result will be data URI
   * @return Promise
   * @async
   */


  Export.prototype.getJSON = function (type, options, encodeURI) {
    if (encodeURI === void 0) {
      encodeURI = true;
    }

    return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__awaiter)(this, void 0, void 0, function () {
      var data, dataFields, sourceData, _loop_1, len, i, json, charset, uri;

      var _this = this;

      return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__generator)(this, function (_a) {
        if (!_utils_Type__WEBPACK_IMPORTED_MODULE_18__.hasValue(options)) {
          options = this.getFormatOptions("json");
        }

        dataFields = this.adapter.apply("formatDataFields", {
          dataFields: this.dataFields,
          format: "json"
        }).dataFields;

        if (!this._dynamicDataFields) {
          data = [];
          sourceData = this.data;

          _loop_1 = function _loop_1(len, i) {
            var value = sourceData[i];

            if (typeof value == "object") {
              var newValue_1 = {};
              _utils_Object__WEBPACK_IMPORTED_MODULE_16__.each(value, function (field, item) {
                if (_utils_Type__WEBPACK_IMPORTED_MODULE_18__.hasValue(dataFields[field])) {
                  newValue_1[dataFields[field]] = _this.convertToSpecialFormat(field, item, options);
                }
              });
              data.push(newValue_1);
            }
          };

          for (len = sourceData.length, i = 0; i < len; i++) {
            _loop_1(len, i);
          }
        } else {
          data = this.data;
        }

        json = JSON.stringify(data, function (key, value) {
          if (typeof value == "object") {
            _utils_Object__WEBPACK_IMPORTED_MODULE_16__.each(value, function (field, item) {
              value[field] = _this.convertToSpecialFormat(field, item, options);
            });
          }

          return value;
        }, options.indent);
        charset = this.adapter.apply("charset", {
          charset: "charset=utf-8",
          type: type,
          options: options
        }).charset;
        uri = this.adapter.apply("getJSON", {
          data: encodeURI ? "data:" + this.getContentType(type) + ";" + charset + "," + encodeURIComponent(json) : json,
          options: options
        }).data;
        return [2
        /*return*/
        , uri];
      });
    });
  };
  /**
   * Converts the value to proper date format.
   *
   * @ignore Exclude from docs
   * @param  field         Field name
   * @param  value         Value
   * @param  options       Options
   * @param  keepOriginal  Will ignore formatting and will keep value as it is in data
   * @return Formatted date value or unmodified value
   */


  Export.prototype.convertToSpecialFormat = function (field, value, options, keepOriginal) {
    // Is this a timestamp or duration?
    if (typeof value == "number") {
      if (this.isDateField(field)) {
        value = new Date(value);
      } else if (this.isDurationField(field)) {
        return this.durationFormatter.format(value, this.durationFormat);
      } else if (this.isNumberField(field) && this.numberFormat) {
        return this.numberFormatter.format(value, this.numberFormat);
      }
    }

    if (value instanceof Date) {
      if (options.useTimestamps) {
        value = value.getTime();
      } else if (options.useLocale) {
        if (!keepOriginal) {
          value = value.toLocaleString();
        }
      } else {
        value = this.dateFormatter.format(value, this.dateFormat);
      }
    } else if (_utils_Type__WEBPACK_IMPORTED_MODULE_18__.isString(value) && this.isDateField(field) && this.dateFormat) {
      value = this.dateFormatter.format(this.dateFormatter.parse(value), this.dateFormat);
    }

    return value;
  };
  /**
   * Converts empty value based on `emptyAs` option.
   *
   * @ignore Exclude from docs
   */


  Export.prototype.convertEmptyValue = function (field, value, options) {
    return _utils_Type__WEBPACK_IMPORTED_MODULE_18__.hasValue(value) ? value : options.emptyAs;
  };
  /**
   * Triggers download of the file.
   *
   * This is an asynchronous function. Check the description of `getImage()`
   * for description and example usage.
   *
   * @param uri       Data URI with file content
   * @param fileName  File name
   * @return Promise
   * @async
   */


  Export.prototype.download = function (uri, fileName, addBOM) {
    if (addBOM === void 0) {
      addBOM = false;
    }

    return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__awaiter)(this, void 0, void 0, function () {
      var parts, contentType, decoded, blob_1, chars, i, charCode, blob, link_1, parts, contentType, decoded, blob_2, url_2, chars, i, charCode, blob, url_3, link, parts, contentType, iframe, idoc;
      return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__generator)(this, function (_a) {
        if (this.msBlobDownloadSupport()) {
          parts = uri.split(";");
          contentType = parts.shift().replace(/data:/, "");
          uri = decodeURIComponent(parts.join(";").replace(/^[^,]*,/, "")); // Check if we need to Base64-decode

          if (["image/svg+xml", "application/json", "text/csv"].indexOf(contentType) == -1) {
            try {
              decoded = atob(uri);
              uri = decoded;
            } catch (e) {
              // Error occurred, meaning string was not Base64-encoded. Do nothing.
              return [2
              /*return*/
              , false];
            }
          } else {
            blob_1 = new Blob([uri], {
              type: contentType
            });
            window.navigator.msSaveBlob(blob_1, fileName);
            return [2
            /*return*/
            , true];
          }

          chars = new Array(uri.length);

          for (i = 0; i < uri.length; ++i) {
            charCode = uri.charCodeAt(i);
            chars[i] = charCode;
          }

          blob = new Blob([new Uint8Array(chars)], {
            type: contentType
          });
          window.navigator.msSaveBlob(blob, fileName);
        } else if (this.blobDownloadSupport()) {
          link_1 = document.createElement("a");
          link_1.download = fileName;
          document.body.appendChild(link_1);
          parts = uri.split(";");
          contentType = parts.shift().replace(/data:/, "");
          uri = decodeURIComponent(parts.join(";").replace(/^[^,]*,/, ""));

          if (["image/svg+xml", "application/json", "text/csv", "text/html"].indexOf(contentType) == -1) {
            try {
              decoded = atob(uri);
              uri = decoded;
            } catch (e) {
              // Error occurred, meaning string was not Base64-encoded. Do nothing.
              return [2
              /*return*/
              , false];
            }
          } else {
            if (addBOM) {
              uri = "\ufeff" + uri;
            }

            blob_2 = new Blob([uri], {
              type: contentType
            });
            url_2 = window.URL.createObjectURL(blob_2);
            link_1.href = url_2;
            link_1.download = fileName;
            link_1.click();
            setTimeout(function () {
              document.body.removeChild(link_1);
              window.URL.revokeObjectURL(url_2);
            }, 100);
            return [2
            /*return*/
            , true];
          }

          chars = new Array(uri.length);

          for (i = 0; i < uri.length; ++i) {
            charCode = uri.charCodeAt(i);
            chars[i] = charCode;
          }

          if (addBOM) {
            chars = [0xEF, 0xBB, 0xBF].concat(chars);
          }

          blob = new Blob([new Uint8Array(chars)], {
            type: contentType
          });
          url_3 = window.URL.createObjectURL(blob);
          link_1.href = url_3;
          link_1.download = fileName;
          document.body.appendChild(link_1);
          link_1.click();
          document.body.removeChild(link_1);
          setTimeout(function () {
            window.URL.revokeObjectURL(url_3);
          }, 100);
        } else if (this.linkDownloadSupport()) {
          link = document.createElement("a");
          link.download = fileName;
          link.href = uri;
          document.body.appendChild(link);
          link.click();
          document.body.removeChild(link);
        } else if (this.legacyIE()) {
          parts = uri.match(/^data:(.*);[ ]*([^,]*),(.*)$/);

          if (parts.length === 4) {
            // Base64-encoded or text-based stuff?
            if (parts[2] == "base64") {
              // Base64-encoded - probably an image
              if (parts[1].match(/^image\//)) {
                // Yep, an image. Let's create a temporary image placeholder,
                // so that user can use do Save As.
                this.showModal("<img src=\"" + uri + "\" style=\"float: left; max-width: 50%; max-height: 80%; margin: 0 1em 0.5em 0; border: 1px solid #eee;\" />" + "<p>" + this.language.translate("To save the image, right-click thumbnail on the left and choose \"Save picture as...\"") + "</p>" + "<p style=\"text-align: center;\"><small>" + this.language.translate("(Press ESC to close this message)") + "</small></p>", this.language.translate("Image Export Complete"));
              }
            } else {
              contentType = void 0;

              if (fileName.match(/\.svg$/)) {
                contentType = "image/svg+xml";
              } else {
                contentType = "text/plain";
                fileName += ".txt";
              }

              iframe = document.createElement("iframe");
              iframe.width = "1px";
              iframe.height = "1px";
              iframe.style.display = "none";
              document.body.appendChild(iframe);
              idoc = iframe.contentDocument;
              idoc.open(contentType, "replace"); // TODO test this with various encodings (e.g. UTF)
              //idoc.charset = parts[2].replace(/charset=/, "");

              idoc.write(decodeURIComponent(parts[3]));
              idoc.close();
              idoc.execCommand("SaveAs", true, fileName); // Destroy the iframe

              document.body.removeChild(iframe);
            }
          }
        } else {
          /**
           * Something else - perhaps a mobile.
           * Let's just display it in the same page.
           * (hey we don't like it either)
           */
          window.location.href = uri;
        }

        return [2
        /*return*/
        , true];
      });
    });
  };
  /**
   * Returns `true` if browser has any supported methods to trigger download
   * of a binary file.
   *
   * @return Supports downloads?
   */


  Export.prototype.downloadSupport = function () {
    //return !this.legacyIE();
    return this.linkDownloadSupport() || this.msBlobDownloadSupport();
  };
  /**
   * Checks if the browser supports "download" attribute on links.
   *
   * @ignore Exclude from docs
   * @return Browser supports triggering downloads?
   */


  Export.prototype.linkDownloadSupport = function () {
    // Do we have this cached?
    var cache = _Registry__WEBPACK_IMPORTED_MODULE_12__.registry.getCache("linkDownloadSupport");

    if (cache === false || cache === true) {
      return cache;
    }

    var a = document.createElement("a");
    var res = typeof a.download !== "undefined";
    _Registry__WEBPACK_IMPORTED_MODULE_12__.registry.setCache("linkDownloadSupport", res);
    return res;
  };
  /**
   * Checks if the browser supports download via `msBlob`.
   *
   * @ignore Exclude from docs
   * @return Browser supports triggering downloads?
   */


  Export.prototype.blobDownloadSupport = function () {
    return _utils_Type__WEBPACK_IMPORTED_MODULE_18__.hasValue(window.Blob);
  };
  /**
   * Checks if the browser supports download via `msBlob`.
   *
   * @ignore Exclude from docs
   * @return Browser supports triggering downloads?
   */


  Export.prototype.msBlobDownloadSupport = function () {
    return _utils_Type__WEBPACK_IMPORTED_MODULE_18__.hasValue(window.navigator.msSaveOrOpenBlob);
  };
  /**
   * Checks if this is a legacy version of IE.
   *
   * @ignore Exclude from docs
   * @return IE9 or less?
   */


  Export.prototype.legacyIE = function () {
    // Create a temporary <div> with conditional tags in it an an <i> tag.
    // Count <i>s. If there are some, we have IE9 or late on our hands.
    var div = document.createElement("div");
    div.innerHTML = "<!--[if lt IE 10]><i></i><![endif]-->";
    return div.getElementsByTagName("i").length == 1;
  };
  /**
   * Initiates print of the chart.
   *
   * This is an asynchronous function. Check the description of `getImage()`
   * for description and example usage.
   *
   * @param data     Data URI for the image
   * @param options  Options
   * @param title    Optional title to use (uses window's title by default)
   * @return Promise
   * @async
   */


  Export.prototype.print = function (data, options, title) {
    return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__awaiter)(this, void 0, void 0, function () {
      return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__generator)(this, function (_a) {
        if (options.printMethod == "css") {
          return [2
          /*return*/
          , this.printViaCSS(data, options, title)];
        } else {
          return [2
          /*return*/
          , this.printViaIframe(data, options, title)];
        }

        return [2
        /*return*/
        ];
      });
    });
  };

  Export.prototype.printViaCSS = function (data, options, title) {
    return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__awaiter)(this, void 0, void 0, function () {
      var scroll, rule, originalTitle, img, isIOS;
      return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__generator)(this, function (_a) {
        scroll = document.documentElement.scrollTop || document.body.scrollTop;
        rule = new _utils_DOM__WEBPACK_IMPORTED_MODULE_14__.StyleRule(_utils_DOM__WEBPACK_IMPORTED_MODULE_14__.getShadowRoot(this.container), "body > *", {
          "display": "none",
          "position": "fixed",
          "visibility": "hidden",
          "opacity": "0",
          "clipPath": "polygon(0px 0px,0px 0px,0px 0px,0px 0px);"
        });

        if (title && document && document.title) {
          originalTitle = document.title;
          document.title = title;
        }

        img = new Image();
        img.src = data;
        img.style.maxWidth = "100%";
        img.style.display = "block";
        img.style.position = "relative";
        img.style.visibility = "visible";
        img.style.opacity = "1";
        img.style.clipPath = "none";
        document.body.appendChild(img); // Print

        this.setTimeout(function () {
          window.print();
        }, 50);
        isIOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;

        if (isIOS && options.delay < 1000) {
          options.delay = 1000;
        } else if (options.delay < 100) {
          options.delay = 100;
        } // Delay function that resets back the document the way ot was before


        this.setTimeout(function () {
          // Remove image
          document.body.removeChild(img); // Reset back all elements

          /*for (let len = items.length, i = 0; i < len; i++) {
              let item = <HTMLElement>items[i];
              if ($dom.isElement(item)) {
                  item.style.display = states[i];
              }
          }*/

          rule.dispose(); // Restore title

          if (originalTitle) {
            document.title = document.title;
          } // Scroll back the document the way it was before


          document.documentElement.scrollTop = document.body.scrollTop = scroll;
        }, options.delay || 500);
        return [2
        /*return*/
        , true];
      });
    });
  };

  Export.prototype.printViaIframe = function (data, options, title) {
    return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__awaiter)(this, void 0, void 0, function () {
      var iframe, img, isIOS;
      return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__generator)(this, function (_a) {
        iframe = document.createElement("iframe");
        iframe.style.visibility = "hidden";
        document.body.appendChild(iframe); // This is needed for FireFox

        iframe.contentWindow.document.open();
        iframe.contentWindow.document.close();
        img = new Image();
        img.src = data;
        img.style.maxWidth = "100%";
        img.style.height = "auto";

        if (title) {
          iframe.contentWindow.document.title = title;
        }

        iframe.contentWindow.document.body.appendChild(img);

        iframe.load = function () {
          iframe.contentWindow.document.body.appendChild(img);
        }; // Print


        this.setTimeout(function () {
          try {
            if (!iframe.contentWindow.document.execCommand("print", false, null)) {
              iframe.contentWindow.print();
            }
          } catch (e) {
            iframe.contentWindow.print();
          }
        }, options.delay || 50);
        isIOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;

        if (isIOS && options.delay < 1000) {
          options.delay = 1000;
        } else if (options.delay < 100) {
          options.delay = 100;
        } // Delay function that resets back the document the way ot was before


        this.setTimeout(function () {
          // Remove image
          document.body.removeChild(iframe);
        }, options.delay + 50 || 100);
        return [2
        /*return*/
        , true];
      });
    });
  };
  /**
   * Finds a background color for the element. If element is transparent it goes
   * up the DOM hierarchy to find a parent element that does.
   *
   * @ignore Exclude from docs
   * @param element Element
   * @return Color code
   */


  Export.prototype.findBackgroundColor = function (element) {
    // Check if element has styles set
    var opacity = 1,
        currentColor = (0,_utils_DOM__WEBPACK_IMPORTED_MODULE_14__.getComputedStyle)(element, "background-color"); // Check opacity

    if (currentColor.match(/[^,]*,[^,]*,[^,]*,[ ]?0/) || currentColor == "transparent") {
      opacity = 0;
    }

    if (opacity == 0) {
      var parent_2 = element.parentElement; // || <Element>element.parentNode;
      // Completely transparent. Look for a parent

      if (parent_2) {
        return this.findBackgroundColor(parent_2);
      } else {
        return (0,_utils_Color__WEBPACK_IMPORTED_MODULE_11__.color)("#fff");
      }
    } else {
      return (0,_utils_Color__WEBPACK_IMPORTED_MODULE_11__.color)(currentColor, opacity);
    }
  };

  Object.defineProperty(Export.prototype, "container", {
    /**
     * @return Reference
     */
    get: function get() {
      return this.adapter.apply("container", {
        container: this._container
      }).container;
    },

    /**
     * A reference to a container to be used to place [[ExportMenu]] in.
     *
     * @param value Reference
     */
    set: function set(value) {
      this._container = value;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Export.prototype, "sprite", {
    /**
     * @return Sprite
     */
    get: function get() {
      return this.adapter.apply("sprite", {
        sprite: this._sprite
      }).sprite;
    },

    /**
     * A reference to [[Sprite]] to export. Can be any Sprite, including some
     * internal elements.
     *
     * @param value Sprite
     */
    set: function set(value) {
      this._sprite = value;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Export.prototype, "extraSprites", {
    /**
     * @return Sprite
     */
    get: function get() {
      return this.adapter.apply("extraSprites", {
        extraSprites: this._extraSprites
      }).extraSprites;
    },

    /**
     * An array of extra [[Sprite]] elements to include in export.
     *
     * It can be used to export any external elements, or even other charts.
     *
     * E.g.:
     *
     * ```TypeScript
     * chart.exporting.extraSprites.push(chart2);
     * ```
     * ```JavaScript
     * chart.exporting.extraSprites.push(chart2);
     * ```
     *
     * IMPORTANT: This setting is ignored when exporting to SVG format.
     *
     * @since 4.2.0
     * @param value Sprite
     */
    set: function set(value) {
      this._extraSprites = value;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Export.prototype, "validateSprites", {
    /**
     * @return Sprite
     */
    get: function get() {
      return this.adapter.apply("validateSprites", {
        validateSprites: this._validateSprites
      }).validateSprites;
    },

    /**
     * An array of [[Sprite]] elements that need to be valid before export
     * commences.
     *
     * If any of those elements is not completely ready when export is triggered,
     * the export will wait until they are (their `validated` event triggers)
     * before going through with the export opertaion.
     *
     * This is useful if you need to modify chart appearance for the export.
     *
     * E.g.:
     *
     * ```TypeScript
     * // Add watermark
     * let watermark = chart.createChild(am4core.Label);
     * watermark.text = "Copyright (C) 2019";
     * watermark.disabled = true;
     *
     * // Add watermark to validated sprites
     * chart.exporting.validateSprites.push(watermark);
     *
     * // Enable watermark on export
     * chart.exporting.events.on("exportstarted", function(ev) {
     *   watermark.disabled = false;
     * });
     *
     * // Disable watermark when export finishes
     * chart.exporting.events.on("exportfinished", function(ev) {
     *   watermark.disabled = true;
     * });
     * ```
     * ```JavaScript
     * // Add watermark
     * var watermark = chart.createChild(am4core.Label);
     * watermark.text = "Copyright (C) 2019";
     * watermark.disabled = true;
     *
     * // Add watermark to validated sprites
     * chart.exporting.validateSprites.push(watermark);
     *
     * // Enable watermark on export
     * chart.exporting.events.on("exportstarted", function(ev) {
     *   watermark.disabled = false;
     * });
     *
     * // Disable watermark when export finishes
     * chart.exporting.events.on("exportfinished", function(ev) {
     *   watermark.disabled = true;
     * });
     * ```
     *
     * @since 4.6.8
     * @param value Sprite
     */
    set: function set(value) {
      this._validateSprites = value;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Export.prototype, "data", {
    /**
     * @return Data
     */
    get: function get() {
      return this.adapter.apply("data", {
        data: this._data
      }).data;
    },

    /**
     * Data to export.
     *
     * @param value Data
     */
    set: function set(value) {
      this._data = value;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Export.prototype, "dataFields", {
    /**
     * @return Field names `{ field: fieldName }`
     */
    get: function get() {
      if (!this._dataFields) {
        this.generateDataFields();
      }

      return this.adapter.apply("dataFields", {
        dataFields: this._dataFields
      }).dataFields;
    },

    /**
     * Data fields in `{ field: fieldName }` format. Those are used for
     * exporting in data formats to name the columns.
     *
     * @see {@link https://www.amcharts.com/docs/v4/concepts/exporting/#Changing_order_and_names_of_columns} for examples and details
     * @param value Field names
     */
    set: function set(value) {
      this._dataFields = value;
      this._dynamicDataFields = false;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Called after target chart's data updates.
   *
   * @ignore
   */

  Export.prototype.handleDataUpdated = function () {
    if (this._dynamicDataFields) {
      this._dataFields = undefined;
    }

    var hasData = this.data.length > 0;

    if (this._prevHasData != hasData) {
      this._prevHasData = hasData;

      if (this.menu) {
        this.menu.invalidate();
      }
    }
  };

  Object.defineProperty(Export.prototype, "dateFormatter", {
    /**
     * @return A DateFormatter instance
     */
    get: function get() {
      if (!this._dateFormatter) {
        this._dateFormatter = new _formatters_DateFormatter__WEBPACK_IMPORTED_MODULE_6__.DateFormatter();
        this._dateFormatter.language = this.language;
      }

      return this.adapter.apply("dateFormatter", {
        dateFormatter: this._dateFormatter
      }).dateFormatter;
    },

    /**
     * A [[DateFormatter]] to use when formatting dates when exporting data.
     *
     * @param value DateFormatter instance
     */
    set: function set(value) {
      this._dateFormatter = value;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Export.prototype, "dateFormat", {
    /**
     * @return Date format
     */
    get: function get() {
      return this.adapter.apply("dateFormat", {
        dateFormat: this._dateFormat
      }).dateFormat;
    },

    /**
     * A date format to use for exporting dates. Will use [[DateFormatter]]
     * format if not set.
     *
     * @param value Date format
     */
    set: function set(value) {
      this._dateFormat = value;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Export.prototype, "dateFields", {
    /**
     * @return Date field list
     */
    get: function get() {
      if (!this._dateFields) {
        this._dateFields = new _utils_List__WEBPACK_IMPORTED_MODULE_4__.List();
      }

      return this.adapter.apply("dateFields", {
        dateFields: this._dateFields
      }).dateFields;
    },

    /**
     * A list of fields that hold date values.
     *
     * @param value Date field list
     */
    set: function set(value) {
      this._dateFields = value;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Export.prototype, "numberFormatter", {
    /**
     * @return A NumberFormatter instance
     */
    get: function get() {
      if (!this._numberFormatter) {
        this._numberFormatter = new _formatters_NumberFormatter__WEBPACK_IMPORTED_MODULE_8__.NumberFormatter();
        this._numberFormatter.language = this.language;
      }

      return this.adapter.apply("numberFormatter", {
        numberFormatter: this._numberFormatter
      }).numberFormatter;
    },

    /**
     * A [[NumberFormatter]] to use when formatting dates when exporting data.
     *
     * @since 4.5.15
     * @param value NumberFormatter instance
     */
    set: function set(value) {
      this._numberFormatter = value;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Export.prototype, "numberFormat", {
    /**
     * @return Number format
     */
    get: function get() {
      return this.adapter.apply("numberFormat", {
        numberFormat: this._numberFormat
      }).numberFormat;
    },

    /**
     * A number format to use for exporting dates. Will use [[NumberFormatter]]
     * format if not set.
     *
     * @since 4.5.15
     * @param value Number format
     */
    set: function set(value) {
      this._numberFormat = value;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Export.prototype, "numberFields", {
    /**
     * @return Number field list
     */
    get: function get() {
      if (!this._numberFields) {
        this._numberFields = new _utils_List__WEBPACK_IMPORTED_MODULE_4__.List();
      }

      return this.adapter.apply("numberFields", {
        numberFields: this._numberFields
      }).numberFields;
    },

    /**
     * A list of fields that hold number values.
     *
     * @since 4.5.15
     * @param value Number field list
     */
    set: function set(value) {
      this._numberFields = value;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Export.prototype, "durationFormatter", {
    /**
     * @return A DurationFormatter instance
     */
    get: function get() {
      if (!this._durationFormatter) {
        this._durationFormatter = new _formatters_DurationFormatter__WEBPACK_IMPORTED_MODULE_7__.DurationFormatter();
        this._durationFormatter.language = this.language;
      }

      return this.adapter.apply("durationFormatter", {
        durationFormatter: this._durationFormatter
      }).durationFormatter;
    },

    /**
     * A [[DurationFormatter]] to use when formatting duration values when
     * exporting data.
     *
     * @param value  DurationFormatter instance
     */
    set: function set(value) {
      this._durationFormatter = value;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Export.prototype, "durationFormat", {
    /**
     * @return Duration format
     */
    get: function get() {
      return this.adapter.apply("durationFormat", {
        durationFormat: this._durationFormat
      }).durationFormat;
    },

    /**
     * A format to use when formatting values from `durationFields`.
     * Will use [[DurationFormatter]] format if not set.
     *
     * @param value Duration format
     */
    set: function set(value) {
      this._durationFormat = value;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Export.prototype, "durationFields", {
    /**
     * @return Duration field list
     */
    get: function get() {
      if (!this._durationFields) {
        this._durationFields = new _utils_List__WEBPACK_IMPORTED_MODULE_4__.List();
      }

      return this.adapter.apply("durationFields", {
        durationFields: this._durationFields
      }).durationFields;
    },

    /**
     * A list of fields that hold duration values.
     *
     * @param value Duration field list
     */
    set: function set(value) {
      this._durationFields = value;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Generates data fields out of the first row of data.
   *
   * @ignore Exclude from docs
   */

  Export.prototype.generateDataFields = function () {
    var _this = this;

    this._dataFields = {};

    if (this.data.length) {
      _utils_Array__WEBPACK_IMPORTED_MODULE_21__.each(this.data, function (row) {
        _utils_Object__WEBPACK_IMPORTED_MODULE_16__.each(row, function (key, value) {
          if (!_utils_Type__WEBPACK_IMPORTED_MODULE_18__.hasValue(_this._dataFields[key])) {
            _this._dataFields[key] = _this.adapter.apply("dataFieldName", {
              name: key,
              field: key
            }).name;
          }
        });
      });
    }
  };
  /**
   * Cheks against `dateFields` property to determine if this field holds
   * dates.
   *
   * @ignore Exclude from docs
   * @param field   Field name
   * @param options Options
   * @return `true` if it's a date field
   */


  Export.prototype.isDateField = function (field) {
    return this.adapter.apply("isDateField", {
      isDateField: this.dateFields.contains(field),
      field: field
    }).isDateField;
  };
  /**
   * Cheks against `numberFields` property to determine if this field holds
   * numbers.
   *
   * @ignore Exclude from docs
   * @param field   Field name
   * @param options Options
   * @return `true` if it's a number field
   */


  Export.prototype.isNumberField = function (field) {
    return this.adapter.apply("isNumberField", {
      isNumberField: this.numberFields.contains(field),
      field: field
    }).isNumberField;
  };
  /**
   * Cheks against `durationFields` property to determine if this field holds
   * durations.
   *
   * @ignore Exclude from docs
   * @param field   Field name
   * @param options Options
   * @return `true` if it's a date field
   */


  Export.prototype.isDurationField = function (field) {
    return this.adapter.apply("isDurationField", {
      isDurationField: this.durationFields.contains(field),
      field: field
    }).isDurationField;
  };
  /**
   * Returns proper content type for the export type.
   *
   * @param type  Export format/type
   * @return Proper content type, i.e. "image/jpeg"
   */


  Export.prototype.getContentType = function (type) {
    var contentType = "";

    switch (type) {
      case "png":
      case "gif":
        contentType = "image/" + type;
        break;

      case "jpg":
        contentType = "image/jpeg";
        break;

      case "svg":
        contentType = "image/svg+xml";
        break;

      case "csv":
        contentType = "text/csv";
        break;

      case "json":
        contentType = "application/json";
        break;

      case "html":
        contentType = "text/html";
        break;

      case "pdf":
      case "pdfdata":
        contentType = "application/pdf";
        break;

      case "xlsx":
        contentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
        break;
    }

    return this.adapter.apply("contentType", {
      contentType: contentType,
      type: type
    }).contentType;
  };

  Object.defineProperty(Export.prototype, "filePrefix", {
    /**
     * @return File prefix
     */
    get: function get() {
      return this.adapter.apply("filePrefix", {
        filePrefix: this._filePrefix
      }).filePrefix;
    },

    /**
     * A file prefix to be used for all exported formats.
     *
     * Export will apply format-related extension to it. E.g. if this is set to
     * "myExport", the file name of the PNG exported image will be "myExport.png".
     *
     * @param value File prefix
     */
    set: function set(value) {
      this._filePrefix = value;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Export.prototype, "backgroundColor", {
    /**
     * @return Background color
     */
    get: function get() {
      return this.adapter.apply("backgroundColor", {
        backgroundColor: this._backgroundColor
      }).backgroundColor;
    },

    /**
     * A background color to be used for exported images. If set, this will
     * override the automatically acquired background color.
     *
     * @param value Color
     */
    set: function set(value) {
      this._backgroundColor = value;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Export.prototype, "title", {
    /**
     * @return Title
     */
    get: function get() {
      return this.adapter.apply("title", {
        title: this._title
      }).title;
    },

    /**
     * A title to be used when printing.
     *
     * @param value Title
     */
    set: function set(value) {
      this._title = value;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Displays a preloader/exporting indicator.
   *
   * @ignore Exclude from docs
   * @todo Add ability to change text
   */

  Export.prototype.showPreloader = function () {
    var preloader = this.preloader;

    if (preloader) {
      preloader.progress = 0.5;
      preloader.label.text = "...";
    }
  };
  /**
   * Hides preloader/exporting indicator
   *
   * @ignore Exclude from docs
   */


  Export.prototype.hidePreloader = function () {
    var preloader = this.preloader;

    if (preloader) {
      preloader.progress = 1;
    }
  };

  Object.defineProperty(Export.prototype, "preloader", {
    /**
     * Returns a an instance of [[Preloader]] associated with the Sprite being
     * exported.
     *
     * @return Preloader
     */
    get: function get() {
      return this._sprite && this._sprite.parent && this._sprite.parent.preloader ? this._sprite.parent.preloader : undefined;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Displays a modal saying export is taking longer than expected.
   *
   * @ignore Exclude from docs
   */

  Export.prototype.showTimeout = function () {
    this.showModal(this.adapter.apply("timeoutMessage", {
      message: this.language.translate("Export operation took longer than expected. Something might have gone wrong.")
    }).message);
  };
  /**
   * Hides preloader/exporting indicator.
   *
   * @ignore Exclude from docs
   */


  Export.prototype.hideTimeout = function () {
    if (this._timeoutTimeout) {
      this.removeDispose(this._timeoutTimeout);
      this._timeoutTimeout = null;
    }

    this.hideModal();
  };

  Object.defineProperty(Export.prototype, "language", {
    /**
     * @return A [[Language]] instance to be used
     */
    get: function get() {
      if (!this._language) {
        this._language = new _utils_Language__WEBPACK_IMPORTED_MODULE_9__.Language();
      }

      return this._language;
    },

    /**
     * A [[Language]] instance to be used for translations.
     *
     * @param value An instance of [[Language]]
     */
    set: function set(value) {
      this._language = value;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Export.prototype, "modal", {
    /**
     * Returns (and creates) [[Modal]].
     *
     * @ignore Exclude from docs
     * @return Modal instance
     */
    get: function get() {
      if (!this._modal) {
        this._modal = new _elements_Modal__WEBPACK_IMPORTED_MODULE_3__.Modal(); // Prefix with Sprite's class name

        this._modal.adapter.add("classPrefix", function (value) {
          value = _Options__WEBPACK_IMPORTED_MODULE_13__.options.classNamePrefix + value;
          return value;
        });
      }

      return this._modal;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Shows [[Modal]] with specific text.
   *
   * @ignore Exclude from docs
   * @param text Modal contents
   */

  Export.prototype.showModal = function (text, title) {
    // Hide previous modal and preloader
    this.hideModal();
    this.hidePreloader(); // Create modal

    var modal = this.modal;
    modal.container = this.sprite.svgContainer.SVGContainer;
    modal.content = text;
    modal.readerTitle = title;
    modal.open();
  };
  /**
   * Hides modal window if one's currently open.
   *
   * @ignore Exclude from docs
   */


  Export.prototype.hideModal = function () {
    if (this._modal) {
      this.modal.close();
    }
  };
  /**
   * Loads canvg dynamic module.
   *
   * This is an asynchronous function. Check the description of `getImage()`
   * for description and example usage.
   *
   * @ignore Exclude from docs
   * @return Instance of canvg
   * @async
   */


  Export.prototype._canvg = function () {
    return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__awaiter)(this, void 0, void 0, function () {
      var canvg;
      return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__generator)(this, function (_a) {
        switch (_a.label) {
          case 0:
            return [4
            /*yield*/
            , Promise.resolve(/*! import() */).then(__webpack_require__.t.bind(__webpack_require__, /*! ../../canvg/index.js */ "../../canvg/index.js", 23))];

          case 1:
            canvg = _a.sent();

            if (canvg.default != null) {
              return [2
              /*return*/
              , canvg.default];
            } else {
              return [2
              /*return*/
              , canvg];
            }

            return [2
            /*return*/
            ];
        }
      });
    });
  };

  Object.defineProperty(Export.prototype, "canvg", {
    /**
     * Returns canvg instance.
     *
     * @ignore Exclude from docs
     * @return Instance of canvg
     */
    get: function get() {
      return this._canvg();
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Export.prototype, "pdfmake", {
    /**
     * Returns pdfmake instance.
     *
     * @ignore Exclude from docs
     * @return Instance of pdfmake
     */
    get: function get() {
      if (pdfmakePromise == null) {
        pdfmakePromise = _pdfmake();
      }

      return pdfmakePromise;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Loads xlsx dynamic module.
   *
   * This is an asynchronous function. Check the description of `getImage()`
   * for description and example usage.
   *
   * @ignore Exclude from docs
   * @return Instance of pdfmake
   * @async
   */

  Export.prototype._xlsx = function () {
    return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__awaiter)(this, void 0, void 0, function () {
      return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__generator)(this, function (_a) {
        switch (_a.label) {
          case 0:
            return [4
            /*yield*/
            , Promise.resolve(/*! import() */).then(__webpack_require__.t.bind(__webpack_require__, /*! xlsx/dist/xlsx.core.min.js */ "xlsx/dist/xlsx.core.min.js", 23))];

          case 1:
            return [2
            /*return*/
            , _a.sent()];
        }
      });
    });
  };

  Object.defineProperty(Export.prototype, "xlsx", {
    /**
     * Returns xlsx instance.
     *
     * @ignore Exclude from docs
     * @return Instance of pdfmake
     */
    get: function get() {
      return this._xlsx();
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Sets options for a format.
   */

  Export.prototype.setFormatOptions = function (type, options) {
    this._formatOptions.setKey(type, options);
  };
  /**
   * Returns current options for a format.
   */


  Export.prototype.getFormatOptions = function (type) {
    return this._formatOptions.getKey(type);
  };

  Object.defineProperty(Export.prototype, "formatOptions", {
    /**
     * A [[Dictionary]] object containing format-specific options.
     *
     * May be used to change specific option for the format:
     *
     * ```TypeScript
     * chart.exporting.formatOptions.getKey("csv").disabled = true;
     * ```
     * ```JavaScript
     * chart.exporting.formatOptions.getKey("csv").disabled = true;
     * ```
     * ```JSON
     * {
     *   // ...
     *   "exporting": {
     *     // ...
     *     "formatOptions": {
     *       "csv": {
     *         "disabled": true
     *       }
     *     }
     *   }
     * }
     * ```
     *
     * @since 4.9.12
     * @return  Options
     */
    get: function get() {
      return this._formatOptions;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Disables interactivity on parent chart.
   */

  Export.prototype._disablePointers = function () {
    if (!_utils_Type__WEBPACK_IMPORTED_MODULE_18__.hasValue(this._spriteInteractionsEnabled)) {
      this._spriteInteractionsEnabled = this.sprite.interactionsEnabled;
    }

    this.sprite.interactionsEnabled = false;
  };
  /**
   * Releases temporarily disabled pointers on parent chart.
   */


  Export.prototype._releasePointers = function () {
    if (_utils_Type__WEBPACK_IMPORTED_MODULE_18__.hasValue(this._spriteInteractionsEnabled) && !this._exportRunning) {
      this.sprite.interactionsEnabled = this._spriteInteractionsEnabled;
    }
  };
  /**
   * Hides all elements that should not be included in the exported image.
   */


  Export.prototype.hideNonExportableSprites = function () {
    var _this = this;

    if (this._objectsAlreadyHidden) {
      return;
    }

    var svgContainer = this.sprite.svgContainer;

    if (svgContainer) {
      _utils_Array__WEBPACK_IMPORTED_MODULE_21__.each(svgContainer.nonExportableSprites, function (item) {
        if (!item.isHidden && !item.isHiding && item.visible) {
          _this._hiddenObjects.push(item);
        }

        item.hide(0);
      });
    }

    this._objectsAlreadyHidden = true;
  };
  /**
   * Respores elements that were hidden before export.
   */


  Export.prototype.restoreNonExportableSprites = function () {
    if (!this._objectsAlreadyHidden) {
      return;
    }

    _utils_Array__WEBPACK_IMPORTED_MODULE_21__.each(this._hiddenObjects, function (item) {
      item.show(0);
    });
    this._hiddenObjects = [];
    this._objectsAlreadyHidden = false;
  };
  /**
   * Checks if there are elements that absolutely need to be validated before
   * export.
   *
   * If there are invalid elements, it will await for them to be validated.
   *
   * @return Promise
   */


  Export.prototype.awaitValidSprites = function () {
    return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__awaiter)(this, void 0, void 0, function () {
      var promises;
      return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__generator)(this, function (_a) {
        switch (_a.label) {
          case 0:
            promises = [];

            if (this.validateSprites.length) {
              _utils_Array__WEBPACK_IMPORTED_MODULE_21__.each(this.validateSprites, function (sprite, index) {
                if (sprite.invalid) {
                  promises.push(new Promise(function (resolve, reject) {
                    sprite.events.once("validated", function (ev) {
                      resolve();
                    });
                  }));
                }
              });
            }

            if (!promises.length) return [3
            /*break*/
            , 2];
            return [4
            /*yield*/
            , Promise.all(promises)];

          case 1:
            _a.sent();

            _a.label = 2;

          case 2:
            return [2
            /*return*/
            ];
        }
      });
    });
  };
  /**
   * Processes JSON-based config before it is applied to the object.
   *
   * @ignore Exclude from docs
   * @param config  Config
   */


  Export.prototype.processConfig = function (config) {
    _Registry__WEBPACK_IMPORTED_MODULE_12__.registry.registeredClasses.ExportMenu = _ExportMenu__WEBPACK_IMPORTED_MODULE_0__.ExportMenu;

    if (config) {
      // Set up menu
      if (_utils_Type__WEBPACK_IMPORTED_MODULE_18__.hasValue(config.menu) && !_utils_Type__WEBPACK_IMPORTED_MODULE_18__.hasValue(config.menu.type)) {
        config.menu.type = "ExportMenu";
      }

      if (_utils_Type__WEBPACK_IMPORTED_MODULE_18__.hasValue(config.dataFields) && _utils_Type__WEBPACK_IMPORTED_MODULE_18__.isObject(config.dataFields)) {
        this.dataFields = config.dataFields;
        delete config.dataFields;
      }
    }

    _super.prototype.processConfig.call(this, config);
  };
  /**
   * XLINK namespace definition.
   *
   * @ignore Exclude from docs
   */


  Export.XLINK = "http://www.w3.org/1999/xlink";
  return Export;
}(_utils_Validatable__WEBPACK_IMPORTED_MODULE_10__.Validatable);



/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/export/ExportCSS.js":
/*!*****************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/export/ExportCSS.js ***!
  \*****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* export default binding */ __WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _utils_DOM__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/DOM */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/DOM.js");
/* harmony import */ var _utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/InterfaceColorSet */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/InterfaceColorSet.js");
/* harmony import */ var _utils_Dictionary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/Dictionary */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Dictionary.js");
/* harmony import */ var _utils_Disposer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/Disposer */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Disposer.js");




var rules = new _utils_Dictionary__WEBPACK_IMPORTED_MODULE_2__.Dictionary();
/**
 * A dynamically-loadable CSS module for Export menu.
 *
 * @ignore Exclude from docs
 * @param prefix  Prefix to addtach to class names
 * @return A MultiDisposer with style rules
 */

/* harmony default export */ function __WEBPACK_DEFAULT_EXPORT__(element, prefix) {
  var newPrefix = prefix ? prefix : "amexport";
  var colorSet = new _utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_1__.InterfaceColorSet();
  var counter = rules.insertKeyIfEmpty(newPrefix, function () {
    var disposer = new _utils_Disposer__WEBPACK_IMPORTED_MODULE_3__.MultiDisposer([
    /*new StyleRule(`.${newPrefix}-menu`, {
        "opacity": "0.3",
        "transition": "all 100ms ease-in-out",
    }),
      new StyleRule(`div:hover .${newPrefix}-menu, .${newPrefix}-menu.active`, {
        "opacity": "0.9",
    }),*/
    new _utils_DOM__WEBPACK_IMPORTED_MODULE_0__.StyleRule(element, "." + newPrefix + "-menu *", {
      "box-sizing": "border-box"
    }), new _utils_DOM__WEBPACK_IMPORTED_MODULE_0__.StyleRule(element, "." + newPrefix + "-menu-level-0", {
      "position": "absolute",
      "top": "5px",
      "right": "5px"
    }), new _utils_DOM__WEBPACK_IMPORTED_MODULE_0__.StyleRule(element, "." + newPrefix + "-menu-level-0." + newPrefix + "-left", {
      "right": "auto",
      "left": "5px"
    }), new _utils_DOM__WEBPACK_IMPORTED_MODULE_0__.StyleRule(element, "." + newPrefix + "-menu-level-0." + newPrefix + "-right", {
      "right": "5px",
      "left": "auto"
    }), new _utils_DOM__WEBPACK_IMPORTED_MODULE_0__.StyleRule(element, "." + newPrefix + "-menu-level-0." + newPrefix + "-top", {
      "top": "5px",
      "bottom": "auto"
    }), new _utils_DOM__WEBPACK_IMPORTED_MODULE_0__.StyleRule(element, "." + newPrefix + "-menu-level-0." + newPrefix + "-bottom", {
      "top": "auto",
      "bottom": "5px"
    }), new _utils_DOM__WEBPACK_IMPORTED_MODULE_0__.StyleRule(element, "." + newPrefix + "-item." + newPrefix + "-item-level-0", {
      "opacity": "0.3",
      "width": "30px",
      "min-height": "30px",
      "transition": "all 100ms ease-in-out"
    }), new _utils_DOM__WEBPACK_IMPORTED_MODULE_0__.StyleRule(element, "div:hover > div > ." + newPrefix + "-menu ." + newPrefix + "-item." + newPrefix + "-item-level-0, ." + newPrefix + "-item." + newPrefix + "-item-level-0.active", {
      "opacity": "0.9"
    }), new _utils_DOM__WEBPACK_IMPORTED_MODULE_0__.StyleRule(element, "." + newPrefix + "-item." + newPrefix + "-item-level-0 > a", {
      "padding": "0",
      "text-align": "center",
      "overflow": "hidden"
    }), new _utils_DOM__WEBPACK_IMPORTED_MODULE_0__.StyleRule(element, "." + newPrefix + "-item." + newPrefix + "-item-level-0:before", {
      "display": "block"
    }), new _utils_DOM__WEBPACK_IMPORTED_MODULE_0__.StyleRule(element, "." + newPrefix + "-item", {
      "position": "relative",
      "display": "block",
      "opacity": "0",
      "z-index": "1",
      "border-radius": "3px",
      "background-color": colorSet.getFor("secondaryButton").hex,
      "padding": "0",
      "margin": "1px 1px 0 0",
      "color": colorSet.getFor("secondaryButton").alternative.hex,
      "transition": "all 100ms ease-in-out, opacity 0.5s ease 0.5s"
    }), new _utils_DOM__WEBPACK_IMPORTED_MODULE_0__.StyleRule(element, "." + newPrefix + "-left ." + newPrefix + "-item", {
      "margin": "1px 0 0 1px"
    }), new _utils_DOM__WEBPACK_IMPORTED_MODULE_0__.StyleRule(element, "." + newPrefix + "-item:hover, ." + newPrefix + "-item.active", {
      "background": colorSet.getFor("secondaryButtonHover").hex,
      "color": colorSet.getFor("secondaryButtonText").hex
    }), new _utils_DOM__WEBPACK_IMPORTED_MODULE_0__.StyleRule(element, "." + newPrefix + "-item > ." + newPrefix + "-menu", {
      "position": "absolute",
      "top": "-1px",
      "right": "0",
      "margin-right": "100%"
    }), new _utils_DOM__WEBPACK_IMPORTED_MODULE_0__.StyleRule(element, "." + newPrefix + "-left ." + newPrefix + "-item > ." + newPrefix + "-menu", {
      "left": "0",
      "right": "auto",
      "margin-left": "100%",
      "margin-right": "auto"
    }), new _utils_DOM__WEBPACK_IMPORTED_MODULE_0__.StyleRule(element, "." + newPrefix + "-right ." + newPrefix + "-item > ." + newPrefix + "-menu", {
      "left": "auto",
      "right": "0",
      "margin-left": "auto",
      "margin-right": "100%"
    }), new _utils_DOM__WEBPACK_IMPORTED_MODULE_0__.StyleRule(element, "." + newPrefix + "-top ." + newPrefix + "-item > ." + newPrefix + "-menu", {
      "top": "-1px",
      "bottom": "auto"
    }), new _utils_DOM__WEBPACK_IMPORTED_MODULE_0__.StyleRule(element, "." + newPrefix + "-bottom ." + newPrefix + "-item > ." + newPrefix + "-menu", {
      "top": "auto",
      "bottom": "0"
    }), new _utils_DOM__WEBPACK_IMPORTED_MODULE_0__.StyleRule(element, "." + newPrefix + "-item > ." + newPrefix + "-menu", {
      "display": "none"
    }), new _utils_DOM__WEBPACK_IMPORTED_MODULE_0__.StyleRule(element, "." + newPrefix + "-item:hover > ." + newPrefix + "-menu, ." + newPrefix + "-item.active > ." + newPrefix + "-menu", {
      "display": "block"
    }), new _utils_DOM__WEBPACK_IMPORTED_MODULE_0__.StyleRule(element, "." + newPrefix + "-item:hover > ." + newPrefix + "-menu > ." + newPrefix + "-item, ." + newPrefix + "-item.active > ." + newPrefix + "-menu > ." + newPrefix + "-item", {
      "opacity": "1"
    }), new _utils_DOM__WEBPACK_IMPORTED_MODULE_0__.StyleRule(element, "." + newPrefix + "-menu", {
      "display": "block",
      "list-style": "none",
      "margin": "0",
      "padding": "0"
    }), new _utils_DOM__WEBPACK_IMPORTED_MODULE_0__.StyleRule(element, "." + newPrefix + "-label", {
      "display": "block",
      "cursor": "default",
      "padding": "0.5em 1em"
    }), new _utils_DOM__WEBPACK_IMPORTED_MODULE_0__.StyleRule(element, "." + newPrefix + "-icon", {
      "display": "block",
      "cursor": "default",
      "padding": "0.2em 0.4em",
      "width": "1.2em",
      "height": "1.2em",
      "min-width": "32px",
      "min-height": "32px",
      "margin": "auto auto",
      "border-radius": "3px"
    }), new _utils_DOM__WEBPACK_IMPORTED_MODULE_0__.StyleRule(element, "." + newPrefix + "-item-level-0 > ." + newPrefix + "-icon", {
      "padding": "0.1em 0.2em"
    }), new _utils_DOM__WEBPACK_IMPORTED_MODULE_0__.StyleRule(element, "." + newPrefix + "-clickable", {
      "cursor": "pointer"
    })]);
    return new _utils_Disposer__WEBPACK_IMPORTED_MODULE_3__.CounterDisposer(function () {
      rules.removeKey(newPrefix);
      disposer.dispose();
    });
  });
  return counter.increment();
}

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/export/ExportMenu.js":
/*!******************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/export/ExportMenu.js ***!
  \******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "ExportMenu": () => (/* binding */ ExportMenu)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _ExportCSS__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ExportCSS */ "./node_modules/@amcharts/amcharts4/.internal/core/export/ExportCSS.js");
/* harmony import */ var _utils_Adapter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/Adapter */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Adapter.js");
/* harmony import */ var _utils_List__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/List */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/List.js");
/* harmony import */ var _interaction_Interaction__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../interaction/Interaction */ "./node_modules/@amcharts/amcharts4/.internal/core/interaction/Interaction.js");
/* harmony import */ var _utils_Disposer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/Disposer */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Disposer.js");
/* harmony import */ var _utils_Language__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/Language */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Language.js");
/* harmony import */ var _utils_Validatable__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/Validatable */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Validatable.js");
/* harmony import */ var _utils_Keyboard__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/Keyboard */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Keyboard.js");
/* harmony import */ var _utils_Utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/Utils */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Utils.js");
/* harmony import */ var _utils_Iterator__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/Iterator */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Iterator.js");
/* harmony import */ var _utils_DOM__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../utils/DOM */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/DOM.js");
/* harmony import */ var _utils_Type__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/**
 * ExportMenu provides functionality for building Export menu
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */













/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Creates a menu for Export operations.
 *
 * To add an export menu to a chart, set this to a new instance of
 * [[ExportMenu]].
 *
 * ```TypeScript
 * chart.exporting.menu = new am4core.ExportMenu();
 * ```
 * ```JavaScript
 * chart.exporting.menu = new am4core.ExportMenu();
 * ```
 * ```JSON
 * {
 *   // ...
 *   "exporting": {
 *     "menu": {}
 *   }
 * }
 * ```
 * @important
 */

var ExportMenu =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_12__.__extends)(ExportMenu, _super);
  /**
   * Constructor
   */


  function ExportMenu() {
    var _this = _super.call(this) || this;
    /**
     * An [[Adapter]].
     */


    _this.adapter = new _utils_Adapter__WEBPACK_IMPORTED_MODULE_1__.Adapter(_this);
    /**
     * How many milliseconds to hold menu/sub-menu open after it loses focus or
     * hover, before auto-closing it.
     *
     * @default 1000
     */

    _this.closeDelay = 1000;
    /**
     * Close the menu automatically when some export operation is triggered.
     *
     * @default true
     * @since 4.2.2
     */

    _this.closeOnClick = true;
    /**
     * An instance of [[Language]].
     */

    _this._language = new _utils_Disposer__WEBPACK_IMPORTED_MODULE_4__.MutableValueDisposer();
    /**
     * What HTML tags to use to build menu.
     */

    _this._menuTag = "ul";
    /**
     * Which tag to use to enclose individual menu items.
     */

    _this._itemTag = "li";
    /**
     * Tag to wrap menu item labels in.
     */

    _this._labelTag = "a";
    /**
     * Tag to use for icons
     */

    _this._iconTag = "img";
    /**
     * Prefix for class names applied to menu elements.
     */

    _this._classPrefix = "amexport";
    /**
     * If set to `true` [[ExportMenu]] will load it's own external CSS when
     * instantiated.
     */

    _this._defaultStyles = true;
    /**
     * Horizontal positioning.
     */

    _this._align = "right";
    /**
     * Vertical positioning.
     */

    _this._verticalAlign = "top";
    /**
     * A tabindex to apply to Export Menu.
     */

    _this._tabindex = 0;
    /**
     * Whether next menu close event should be ignored.
     */

    _this._ignoreNextClose = false;
    /**
     * Default menu items.
     */

    _this._items = [{
      "label": "...",
      "menu": [{
        "label": "Image",
        "menu": [{
          "type": "png",
          "label": "PNG"
        }, {
          "type": "jpg",
          "label": "JPG"
        }, {
          "type": "svg",
          "label": "SVG"
        }, {
          "type": "pdf",
          "label": "PDF"
        }]
      }, {
        "label": "Data",
        "menu": [{
          "type": "json",
          "label": "JSON"
        }, {
          "type": "csv",
          "label": "CSV"
        }, {
          "type": "xlsx",
          "label": "XLSX"
        }, {
          "type": "html",
          "label": "HTML"
        }, {
          "type": "pdfdata",
          "label": "PDF"
        }]
      }, {
        "label": "Print",
        "type": "print"
      }]
    }];
    _this.className = "ExportMenu";

    _this._disposers.push(_this._language);

    _this.invalidate();

    _this.applyTheme();

    return _this;
  }
  /**
   * (Re)draws the Export menu.
   *
   * @ignore Exclude from docs
   */


  ExportMenu.prototype.validate = function () {
    this.draw();

    _super.prototype.validate.call(this);
  };
  /**
   * Draws the menu based on current items.
   *
   * Normally, there's no need to call this explicitly. The chart, if it has
   * export menu enabled, will automatically draw the menu.
   */


  ExportMenu.prototype.draw = function () {
    var _this = this; // Create top-level menu item, or clear it


    if (!this._element) {
      this._element = this.createMenuElement(0);
    } else {
      this._element.innerHTML = "";
      this._element.className = this.getMenuItemClass(0);
    } // See if we're loading external CSS
    // Hide it until CSS is loaded


    if (this.defaultStyles) {
      this._element.style.display = "none";
    } // Append to container


    _utils_Type__WEBPACK_IMPORTED_MODULE_11__.getValue(this._container).appendChild(this._element); // Apply adapter to menu items before processing

    var items = this.adapter.apply("items", {
      items: this._items
    }).items;

    for (var len = items.length, i = 0; i < len; i++) {
      this.drawBranch(this._element, items[i], 0);
    } // Apply adapter to finalized menu element


    this._element = this.adapter.apply("menuElement", {
      menuElement: this._element
    }).menuElement; // Set up global "down" event

    this._disposers.push((0,_interaction_Interaction__WEBPACK_IMPORTED_MODULE_3__.getInteraction)().body.events.on("down", function (ev) {
      if (!ev.pointer.touch) {
        _this._ignoreNextClose = false;
      }

      _this.close();
    })); // Set up global event on ESC press to close the menu


    this._disposers.push((0,_interaction_Interaction__WEBPACK_IMPORTED_MODULE_3__.getInteraction)().body.events.on("keydown", function (ev) {
      var key = _utils_Keyboard__WEBPACK_IMPORTED_MODULE_7__.keyboard.getEventKey(ev.event);

      switch (key) {
        case "esc":
          _this.close();

          break;

        case "up":
        case "down":
        case "left":
        case "right":
          if (_this._currentSelection) {
            ev.event.preventDefault();
          }

          _this.moveSelection(key);

          break;
      }
    }));

    if (this.defaultStyles) {
      this.loadDefaultCSS();
    }
  };
  /**
   * Creates a new branch in export menu. This function is recursive for
   * building multi-level menus.
   *
   * @ignore Exclude from docs
   * @param container Container to put branch elements in
   * @param branch    Menu item
   * @param level     Current nesting level
   */


  ExportMenu.prototype.drawBranch = function (container, branch, level) {
    var _this = this; // Apply adapter


    branch = this.adapter.apply("branch", {
      branch: branch,
      level: level
    }).branch; // Unsupported?
    // ExportMenu does not check or know for specific browser/system
    // capabilities. It must happen in some other code and applied via Adapter.
    // Export itself will check compatibility, but there might be other plugins
    // that influence it or even add any specific export functionality.

    if (branch.unsupported === true) {
      return;
    } // Init ascendants


    if (!branch.ascendants) {
      branch.ascendants = new _utils_List__WEBPACK_IMPORTED_MODULE_2__.List();
    } // Get type


    var type = branch.type; // Create an item

    var element = this.createItemElement(level, type); // Create label

    var label; // Create icon

    if (branch.icon) {
      label = this.createIconElement(level, type);
      label.src = branch.icon;

      if (branch.label || branch.title) {
        label.title = branch.title || branch.label;
      }
    } else if (branch.svg) {
      label = this.createSvgElement(level, type, branch.svg);

      if (branch.label || branch.title) {
        label.title = branch.title || branch.label;
      }
    } else {
      label = this.createLabelElement(level, type);
      label.innerHTML = branch.label ? this.language.translate(branch.label) : "";

      if (branch.title) {
        label.title = branch.title;
      }
    } // Apply reader text to label


    var readerLabel = this.getReaderLabel(branch, label.innerHTML);
    label.setAttribute("aria-label", readerLabel); // Add Label

    element.appendChild(label); // Create interaction object
    // TODO clean this up when it's disposed

    branch.interactions = (0,_interaction_Interaction__WEBPACK_IMPORTED_MODULE_3__.getInteraction)().getInteraction(element);
    branch.element = element; // Create interaction manager we can set event listeners to

    if (this.typeClickable(type)) {
      //branch.interactions.clickable = true;
      // TODO clean this up when it's disposed
      branch.interactions.events.on("hit", function (ev) {
        if (_this.events.isEnabled("hit") && !_this.isDisposed()) {
          var event_1 = {
            "type": "hit",
            "event": ev.event,
            "target": _this,
            "branch": branch
          };

          _this.events.dispatchImmediately("hit", event_1);
        }
      }); // TODO clean this up when it's disposed

      branch.interactions.events.on("keyup", function (ev) {
        if (_utils_Keyboard__WEBPACK_IMPORTED_MODULE_7__.keyboard.isKey(ev.event, "enter")) {
          if (_this.events.isEnabled("enter")) {
            var event_2 = {
              "type": "enter",
              "event": ev.event,
              "target": _this,
              "branch": branch
            };

            _this.events.dispatchImmediately("enter", event_2);
          }
        }
      });
    }

    {
      var submenu_1 = this.getSubMenu(branch); // Add ENTER event to open sub-menus

      if (submenu_1 != null) {
        // TODO clean this up when it's disposed
        branch.interactions.events.on("keyup", function (ev) {
          if (_utils_Keyboard__WEBPACK_IMPORTED_MODULE_7__.keyboard.isKey(ev.event, "enter")) {
            // This is item has sub-menu, activate the first child on ENTER
            _this.selectBranch(submenu_1[0]); // Attempt to set focus


            _this.setFocus(submenu_1[0]);
          }
        });
        branch.interactions.events.on("hit", function (ev) {
          _this.selectBranch(branch);
        });
      }
    } // Add events
    // TODO clean this up when it's disposed

    branch.interactions.events.on("over", function (ev) {
      if (ev.pointer.touch) {
        // Cancel pending menu closure
        _this._ignoreNextClose = true;
      }

      _this.selectBranch(branch);

      if (_this.events.isEnabled("over")) {
        var event_3 = {
          "type": "over",
          "event": ev.event,
          "target": _this,
          "branch": branch
        };

        _this.events.dispatchImmediately("over", event_3);
      }
    }); // TODO clean this up when it's disposed

    branch.interactions.events.on("out", function (ev) {
      if (_this.isDisposed()) {
        return;
      }

      if (!ev.pointer.touch) {
        _this.delayUnselectBranch(branch);
      }

      if (_this.events.isEnabled("out")) {
        var event_4 = {
          "type": "out",
          "event": ev.event,
          "target": _this,
          "branch": branch
        };

        _this.events.dispatchImmediately("out", event_4);
      }
    }); // TODO clean this up when it's disposed

    branch.interactions.events.on("focus", function (ev) {
      _this.selectBranch(branch);
    }); // TODO clean this up when it's disposed

    branch.interactions.events.on("blur", function (ev) {
      _this.delayUnselectBranch(branch);
    }); // Increment level

    var local_level = level + 1; // Has sub-menu?

    if (branch.menu) {
      var submenu = this.createMenuElement(local_level);
      branch.submenuElement = submenu;

      for (var len = branch.menu.length, i = 0; i < len; i++) {
        var ascendants = new _utils_List__WEBPACK_IMPORTED_MODULE_2__.List();
        branch.menu[i].ascendants = ascendants;

        if (branch.ascendants.length) {
          ascendants.copyFrom(branch.ascendants);
        }

        ascendants.push(branch);
        this.drawBranch(submenu, branch.menu[i], local_level);
      } // Sub-menu is empty (all items are not supported)
      // Do not draw this menu item at all


      if (submenu.innerHTML == "") {
        return;
      }

      element.appendChild(submenu);
    } // Should this item be hidden?


    if (branch.hidden) {
      this.hideBranch(branch);
    } // Add id?


    if (branch.id) {
      element.setAttribute("id", branch.id);
    } // Background color?


    if (branch.color) {
      element.style.backgroundColor = branch.color.hex;
    } // Append to container


    container.appendChild(element);
  };
  /**
   * Creates a menu element to hold its elements in. Usually it's an `<ul>`
   * tag.
   *
   * @ignore Exclude from docs
   * @param level  Current nesting level
   * @return HTML element reference
   */


  ExportMenu.prototype.createMenuElement = function (level) {
    var element = document.createElement(this.menuTag);
    element.className = this.getMenuItemClass(level); // Accessibility

    if (level === 0) {
      element.setAttribute("role", "menubar");
    } else {
      element.setAttribute("role", "menu");
    }

    return element;
  };
  /**
   * Generates a class name for the menu element based on its nesting level.
   *
   * @ignore Exclude from docs
   * @param level  Current nesting level
   * @return Class name(s)
   */


  ExportMenu.prototype.getMenuItemClass = function (level) {
    var className = this.classPrefix + "-menu " + this.classPrefix + "-menu-level-" + level;

    if (level === 0) {
      className += " " + this.classPrefix + "-menu-root " + this.classPrefix + "-" + this.align + " " + this.classPrefix + "-" + this.verticalAlign;
    }

    return this.adapter.apply("menuClass", {
      className: className,
      level: level
    }).className;
  };
  /**
   * Creates menu item. Usually `<li>` tag. Its label and sub-elements will go
   * into this element.
   *
   * @ignore Exclude from docs
   * @param level  Current nesting level
   * @param type   Type of the menu item
   * @return HTML element reference
   */


  ExportMenu.prototype.createItemElement = function (level, type) {
    var element = document.createElement(this.itemTag);
    var className = this.classPrefix + "-item " + this.classPrefix + "-item-level-" + level + " " + this.classPrefix + "-item-" + (type || "blank");
    element.className = this.adapter.apply("itemClass", {
      className: className,
      level: level,
      type: type
    }).className;
    element.setAttribute("role", "menuitem");
    element.setAttribute("tabindex", this.tabindex.toString());
    return element;
  };
  /**
   * Creates a "label" part of the menu item. It could be text or any HTML
   * content.
   *
   * @ignore Exclude from docs
   * @param level  Current nesting level
   * @param type   Type of the menu item
   * @return An HTML Element
   */


  ExportMenu.prototype.createLabelElement = function (level, type) {
    var element = document.createElement(this.labelTag);
    var className = this.classPrefix + "-label " + this.classPrefix + "-label-level-" + level + " " + this.classPrefix + "-item-" + (type || "blank");

    if (this.typeClickable(type)) {
      className += " " + this.classPrefix + "-clickable";
    }

    element.className = this.adapter.apply("labelClass", {
      className: className,
      level: level,
      type: type
    }).className; // Accessible navigation
    //element.setAttribute("tabindex", this.tabindex.toString());
    //element.setAttribute("role", "menuitem");

    return element;
  };
  /**
   * Creates a "icon" part of the menu item.
   *
   * @ignore Exclude from docs
   * @param level  Current nesting level
   * @param type   Type of the menu item
   * @return An HTML Element
   */


  ExportMenu.prototype.createIconElement = function (level, type) {
    var element = document.createElement(this.iconTag);
    var className = this.classPrefix + "-icon " + this.classPrefix + "-icon-level-" + level + " " + this.classPrefix + "-item-" + (type || "blank");

    if (this.typeClickable(type)) {
      className += " " + this.classPrefix + "-clickable";
    }

    element.className = this.adapter.apply("labelClass", {
      className: className,
      level: level,
      type: type
    }).className; // Accessible navigation

    element.setAttribute("tabindex", this.tabindex.toString());
    element.setAttribute("role", "menuitem");
    return element;
  };
  /**
   * Creates a a custom element out of raw HTML.
   *
   * @ignore Exclude from docs
   * @param level  Current nesting level
   * @param type   Type of the menu item
   * @return An HTML Element
   */


  ExportMenu.prototype.createSvgElement = function (level, type, svg) {
    var parser = new DOMParser();
    var element = parser.parseFromString(svg, "image/svg+xml").documentElement;
    var className = this.classPrefix + "-icon " + this.classPrefix + "-icon-level-" + level + " " + this.classPrefix + "-item-" + (type || "blank");

    if (this.typeClickable(type)) {
      className += " " + this.classPrefix + "-clickable";
    }

    element.setAttribute("class", this.adapter.apply("labelClass", {
      className: className,
      level: level,
      type: type
    }).className); // Accessible navigation

    element.setAttribute("tabindex", this.tabindex.toString());
    element.setAttribute("role", "menuitem");
    return element;
  };
  /**
   * Destroys the menu and all its elements.
   */


  ExportMenu.prototype.dispose = function () {
    if (!this._disposed) {
      _super.prototype.dispose.call(this);

      if (this._element && this._element.parentNode) {
        this._element.parentNode.removeChild(this._element);
      }
    }
  };
  /**
   * Checks whether menu item type is supposed to be clickable.
   *
   * @ignore Exclude from docs
   * @param type  Menu item type
   * @return Is clickable?
   */


  ExportMenu.prototype.typeClickable = function (type) {
    return _utils_Type__WEBPACK_IMPORTED_MODULE_11__.hasValue(type);
  };
  /**
   * Checks whether menu item has any sub-items.
   *
   * @ignore Exclude from docs
   * @param branch  A menu item
   * @return Has sub-items?
   */


  ExportMenu.prototype.hasSubMenu = function (branch) {
    return branch.menu && branch.menu.length ? true : false;
  };
  /**
   * Returns sub-items (if they exist).
   *
   * @ignore Exclude from docs
   * @param branch  A menu item
   * @return Submenus
   */


  ExportMenu.prototype.getSubMenu = function (branch) {
    if (branch.menu && branch.menu.length) {
      return branch.menu;
    }
  };
  /**
   * Generates and returns an applicable label to be used for screen readers.
   *
   * @ignore Exclude from docs
   * @param item   A menu item instance
   * @param label  Current label
   * @return Reader text
   */


  ExportMenu.prototype.getReaderLabel = function (branch, label) {
    // Strip any HTML from the label
    label = _utils_Utils__WEBPACK_IMPORTED_MODULE_8__.stripTags(label); // Add textual note if the branch is clickable

    if (branch.ascendants.length == 0) {
      label = label == "..." ? this.language.translate("Export") : label;
      label += " [" + this.language.translate("Press ENTER or use arrow keys to navigate") + "]";
    } else if (this.hasSubMenu(branch)) {
      label += " [" + this.language.translate("Click, tap or press ENTER to open") + "]";
    } else if (branch.type == "print") {
      label = this.language.translate("Click, tap or press ENTER to print.");
    } else if (this.typeClickable(branch.type)) {
      label = this.language.translate("Click, tap or press ENTER to export as %1.", undefined, label);
    }

    return this.adapter.apply("rederLabel", {
      label: label,
      branch: branch
    }).label;
  };

  Object.defineProperty(ExportMenu.prototype, "container", {
    /**
     * @return Container
     */
    get: function get() {
      return this._container;
    },

    /**
     * Getters and setters
     */

    /**
     * An HTML container to place the Menu in.
     *
     * A container must be an HTML element, because menu itself is HTML, and
     * cannot be placed into SVG.
     *
     * @param container Reference to container element
     * @todo Check if menu is already build. If it is, just move it to a new container
     */
    set: function set(container) {
      this._container = container;
      this.invalidate();
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(ExportMenu.prototype, "items", {
    /**
     * @return Menu items
     */
    get: function get() {
      return this._items;
    },

    /**
     * A list of menu items. Can be nested.
     *
     * @param items  Menu items
     */
    set: function set(items) {
      this._items = items;
      this.invalidate();
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(ExportMenu.prototype, "tag", {
    /**
     * Sets main menu tag to place menu in.
     *
     * This also sets up how menu items are built.
     *
     * If you set this to "ul", menu items will be wrapped into `<li>` tags.
     *
     * If set to "div", menu items will be wrapped in `<div>` tags.
     *
     * @default "ul"
     * @param tag Tag to use for menu
     */
    set: function set(tag) {
      this._menuTag = tag;
      this._itemTag = tag == "ul" ? "li" : "div";
      this.invalidate();
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(ExportMenu.prototype, "menuTag", {
    /**
     * Returns current menu tag.
     *
     * @ignore Exclude from docs
     * @return Menu tag (item that contains sub-items)
     */
    get: function get() {
      return this.adapter.apply("menuTag", {
        tag: this._menuTag
      }).tag;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(ExportMenu.prototype, "itemTag", {
    /**
     * Returns tag to wrap items into.
     *
     * @ignore Exclude from docs
     * @return Item tag
     */
    get: function get() {
      return this.adapter.apply("itemTag", {
        tag: this._itemTag
      }).tag;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(ExportMenu.prototype, "labelTag", {
    /**
     * Returns menu label tag.
     *
     * @ignore Exclude from docs
     * @return Label tag
     */
    get: function get() {
      return this.adapter.apply("labelTag", {
        tag: this._labelTag
      }).tag;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(ExportMenu.prototype, "iconTag", {
    /**
     * Returns icon tag.
     *
     * @ignore Exclude from docs
     * @return Icon tag
     */
    get: function get() {
      return this.adapter.apply("iconTag", {
        tag: this._iconTag
      }).tag;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(ExportMenu.prototype, "align", {
    /**
     * @return Horizontal alignment
     */
    get: function get() {
      return this.adapter.apply("align", {
        align: this._align
      }).align;
    },

    /**
     * A horizontal alignment for the menu placement.
     *
     * @param value Horizontal alignment
     */
    set: function set(value) {
      this._align = value;
      this.invalidate();
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(ExportMenu.prototype, "verticalAlign", {
    /**
     * @return Vertical alignment
     */
    get: function get() {
      return this.adapter.apply("verticalAlign", {
        verticalAlign: this._verticalAlign
      }).verticalAlign;
    },

    /**
     * A vertical alignment for the menu placement.
     *
     * @param value Vertical alignment
     */
    set: function set(value) {
      this._verticalAlign = value;
      this.invalidate();
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(ExportMenu.prototype, "classPrefix", {
    /**
     * @return Class name prefix
     */
    get: function get() {
      return this.adapter.apply("classPrefix", {
        classPrefix: this._classPrefix
      }).classPrefix;
    },

    /**
     * Class name prefix.
     *
     * @default "amexport"
     * @param value Class name prefix
     */
    set: function set(value) {
      this._classPrefix = value;
      this.invalidate();
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(ExportMenu.prototype, "defaultStyles", {
    /**
     * @return Should ExportMenu load its own CSS?
     */
    get: function get() {
      return this.adapter.apply("defaultStyles", {
        defaultStyles: this._defaultStyles
      }).defaultStyles;
    },

    /**
     * Indicates whether [[ExportMenu]] should load external CSS to style itself.
     *
     * If set to `false`, the menu will not be styled, and will rely on some
     * external CSS.
     *
     * @default true
     * @param Should ExportMenu load its own CSS?
     */
    set: function set(value) {
      if (this._defaultStyles != value) {
        this._defaultStyles = value;

        if (value) {
          this.loadDefaultCSS();
        }
      }

      this.invalidate();
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Loads the default CSS.
   *
   * @ignore Exclude from docs
   */

  ExportMenu.prototype.loadDefaultCSS = function () {
    this._disposers.push((0,_ExportCSS__WEBPACK_IMPORTED_MODULE_0__["default"])(_utils_DOM__WEBPACK_IMPORTED_MODULE_10__.getShadowRoot(this.container), this.classPrefix));

    if (this._element) {
      this._element.style.display = "";
    }
  };

  Object.defineProperty(ExportMenu.prototype, "tabindex", {
    /**
     * @return Tab index
     */
    get: function get() {
      return this.adapter.apply("tabindex", {
        tabindex: this._tabindex
      }).tabindex;
    },

    /**
     * A tab index for the menu.
     *
     * Tab index will influence the order in which elements on the chart and
     * the whole page are selected when pressing TAB key.
     *
     * @param value Tab index
     */
    set: function set(value) {
      this._tabindex = value;
      this.invalidate();
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(ExportMenu.prototype, "language", {
    /**
     * @return A [[Language]] instance to be used
     */
    get: function get() {
      var _this = this;

      var language = this._language.get();

      if (language == null) {
        language = new _utils_Language__WEBPACK_IMPORTED_MODULE_5__.Language(); // TODO code duplication with `set language()`

        this._language.set(language, language.events.on("localechanged", function (ev) {
          _this.invalidate();
        }));
      }

      return language;
    },

    /**
     * A [[Language]] instance.
     *
     * @param value An instance of [[Language]]
     */
    set: function set(value) {
      var _this = this;

      this._language.set(value, value.events.on("localechanged", function (ev) {
        _this.invalidate();
      }));

      this.invalidate();
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Controlling the menu
   */

  /**
   * Removes all active classes from menu items. Useful on touch devices and
   * keyboard navigation where open menu can be closed instantly by clicking or
   * tapping outside it.
   *
   * @ignore Exclude from docs
   */

  ExportMenu.prototype.close = function () {
    var _this = this;

    if (this.isDisposed()) {
      return;
    }

    if (this._ignoreNextClose) {
      this._ignoreNextClose = false;
      return;
    }

    if (this.closeOnClick) {
      this._element.style.pointerEvents = "none";
      setTimeout(function () {
        _this._element.style.pointerEvents = "auto";
      }, 100);
    }

    if (this._currentSelection) {
      this.setBlur(this._currentSelection);
      this._currentSelection = undefined;
    }

    if (this._element) {
      var items = this._element.getElementsByClassName("active");

      for (var len = items.length, i = len - 1; i >= 0; i--) {
        if (items[i]) {
          _utils_DOM__WEBPACK_IMPORTED_MODULE_10__.removeClass(items[i], "active");
        }
      }
    }

    this.events.dispatchImmediately("closed", {
      type: "closed",
      target: this
    });
  };
  /**
   * Selects a branch in the menu.
   *
   * Handles closing of currently open branch.
   *
   * @ignore Exclude from docs
   * @param branch Branch to select
   */


  ExportMenu.prototype.selectBranch = function (branch) {
    var _this = this;

    if (this.isDisposed()) {
      return;
    } // Cancel previous closure


    if (branch.closeTimeout) {
      this.removeDispose(branch.closeTimeout);
      branch.closeTimeout = undefined;
    } // Add active class


    _utils_DOM__WEBPACK_IMPORTED_MODULE_10__.addClass(branch.element, "active"); // Set expanded

    if (branch.submenuElement) {
      branch.submenuElement.setAttribute("aria-expanded", "true");
    } // Remove current selection


    if (this._currentSelection && this._currentSelection !== branch && this._currentSelection.ascendants) {
      _utils_Iterator__WEBPACK_IMPORTED_MODULE_9__.each(_utils_Iterator__WEBPACK_IMPORTED_MODULE_9__.concat(_utils_Iterator__WEBPACK_IMPORTED_MODULE_9__.fromArray([this._currentSelection]), this._currentSelection.ascendants.iterator()), function (ascendant) {
        if (!branch.ascendants.contains(ascendant) && branch !== ascendant) {
          _this.unselectBranch(ascendant, true);
        }
      });
    } // Select and/or cancel timeout for current ascendants


    _utils_Iterator__WEBPACK_IMPORTED_MODULE_9__.each(branch.ascendants.iterator(), function (ascendant) {
      if (ascendant.closeTimeout) {
        _this.removeDispose(ascendant.closeTimeout);

        ascendant.closeTimeout = undefined;
      }

      _utils_DOM__WEBPACK_IMPORTED_MODULE_10__.addClass(ascendant.element, "active");
    }); // Log current selection

    this._currentSelection = branch; // Invoke event

    if (this.events.isEnabled("branchselected")) {
      var event_5 = {
        type: "branchselected",
        target: this,
        branch: branch
      };
      this.events.dispatchImmediately("branchselected", event_5);
    }
  };
  /**
   * Unselects a branch. Also selects a branch one level up if necessary.
   *
   * @ignore Exclude from docs
   * @param branch Branch to unselect
   * @param simple If `true`, only the branch will be unselected without selecting parent branch
   */


  ExportMenu.prototype.unselectBranch = function (branch, simple) {
    if (this.isDisposed()) {
      return;
    } // Remove active class


    _utils_DOM__WEBPACK_IMPORTED_MODULE_10__.removeClass(branch.element, "active"); // Set expanded

    if (branch.submenuElement) {
      branch.submenuElement.removeAttribute("aria-expanded");
    } // Remove current selection


    if (this._currentSelection == branch) {
      this._currentSelection = undefined;
    } // Invoke event


    if (this.events.isEnabled("branchunselected")) {
      var event_6 = {
        type: "branchunselected",
        target: this,
        branch: branch
      };
      this.events.dispatchImmediately("branchunselected", event_6);
    }
  };
  /**
   * Delay unselection of a branch. This can still be cancelled in some other
   * place if the branch or its children regain focus.
   *
   * @ignore Exclude from docs
   * @param branch Branch to unselect
   * @param simple If `true`, only the branch will be unselected without selecting parent branch
   */


  ExportMenu.prototype.delayUnselectBranch = function (branch, simple) {
    var _this = this;

    if (this.isDisposed()) {
      return;
    } // Schedule branch unselection


    if (branch.closeTimeout) {
      this.removeDispose(branch.closeTimeout);
      branch.closeTimeout = undefined;
    }

    branch.closeTimeout = this.setTimeout(function () {
      _this.unselectBranch(branch, simple);
    }, this.closeDelay); // Schedule unselection of all ascendants
    // In case focus went away from the export menu altogether, this will ensure
    // that all items will be closed.
    // In case we're jumping to other menu item, those delayed unselections will
    // be cancelled by `selectBranch`

    if (simple !== true && branch.ascendants) {
      _utils_Iterator__WEBPACK_IMPORTED_MODULE_9__.each(branch.ascendants.iterator(), function (ascendant) {
        _this.delayUnselectBranch(ascendant, true);
      });
    }
  };
  /**
   * Navigates the menu based on which direction kayboard key was pressed.
   *
   * @ignore Exclude from docs
   * @param key A key that was pressed
   */


  ExportMenu.prototype.moveSelection = function (key) {
    if (this.isDisposed()) {
      return;
    } // Check if there's a current selection


    if (!this._currentSelection) {
      return;
    }

    var newSelection;

    if (key == "up") {
      // Try moving up in current menu list, or to the last item if already
      // at the top
      newSelection = this.getPrevSibling(this._currentSelection);
    } else if (key == "down") {
      // Try moving down in current menu list, or to the top item if already
      // at the bottom
      newSelection = this.getNextSibling(this._currentSelection);
    } else if (key == "left" && this.align == "right" || key == "right" && this.align == "left") {
      var menu = this.getSubMenu(this._currentSelection); // Go one level-deeper

      if (menu != null) {
        newSelection = menu[0];
      }
    } else if (key == "right" && this.align == "right" || key == "left" && this.align == "left") {
      // Go one level-deeper
      newSelection = this.getParentItem(this._currentSelection);
    }

    if (newSelection && newSelection !== this._currentSelection) {
      this.selectBranch(newSelection);
      this.setFocus(newSelection);
      this._currentSelection = newSelection;
    }
  };
  /**
   * Returns all siblings of a menu item, including this same menu item.
   *
   * @ignore Exclude from docs
   * @param branch  Menu item
   * @return List of sibling menu items
   */


  ExportMenu.prototype.getSiblings = function (branch) {
    var parent = this.getParentItem(branch);

    if (parent && parent.menu) {
      return parent.menu;
    } else {
      return [];
    }
  };
  /**
   * Returns menu items parent item.
   *
   * @ignore Exclude from docs
   * @param branch  Menu item
   * @return Parent menu item
   */


  ExportMenu.prototype.getParentItem = function (branch) {
    if (branch.ascendants && branch.ascendants.length) {
      return branch.ascendants.getIndex(branch.ascendants.length - 1);
    } else {
      return undefined;
    }
  };
  /**
   * Returns next sibling in the same menu branch. If there is no next sibling,
   * the first one is returned. If there is just one item, that item is
   * returned. Unsupported menu items are skipped.
   *
   * @ignore Exclude from docs
   * @param branch  Menu item to search siblings for
   * @return Menu item
   */


  ExportMenu.prototype.getNextSibling = function (branch) {
    var siblings = this.getSiblings(branch);

    if (siblings.length > 1) {
      var next = siblings.indexOf(branch) + 1;
      next = siblings.length == next ? 0 : next;
      return siblings[next].unsupported ? this.getNextSibling(siblings[next]) : siblings[next];
    } else {
      return branch;
    }
  };
  /**
   * Returns previous sibling in the same menu branch. If there is no next
   * sibling, the first one is returned. If there is just one item, that item is
   * returned. Unsupported menu items are skipped.
   *
   * @ignore Exclude from docs
   * @param branch  Menu item to search siblings for
   * @return Menu item
   */


  ExportMenu.prototype.getPrevSibling = function (branch) {
    var siblings = this.getSiblings(branch);

    if (siblings.length > 1) {
      var prev = siblings.indexOf(branch) - 1;
      prev = prev == -1 ? siblings.length - 1 : prev;
      return siblings[prev].unsupported ? this.getPrevSibling(siblings[prev]) : siblings[prev];
    } else {
      return branch;
    }
  };
  /**
   * Attempts to set focus on particular menu element.
   *
   * @ignore Exclude from docs
   * @param branch Menu item
   */


  ExportMenu.prototype.setFocus = function (branch) {
    if (branch.interactions) {
      try {
        branch.interactions.element.focus();
      } catch (e) {// nothing
      }
    }
  };
  /**
   * Attempts to remove focus from the menu element.
   *
   * @ignore Exclude from docs
   * @param branch Menu item
   */


  ExportMenu.prototype.setBlur = function (branch) {
    if (branch.interactions) {
      try {
        branch.interactions.element.blur();
      } catch (e) {// nothing
      }
    }
  };
  /**
   * Hides the whole branch of menu.
   *
   * @param  branch  branch
   */


  ExportMenu.prototype.hideBranch = function (branch) {
    branch.element.style.display = "none";
  };
  /**
   * Show the branch of menu.
   *
   * @param  branch  branch
   */


  ExportMenu.prototype.showBranch = function (branch) {
    branch.element.style.display = "";
  };

  Object.defineProperty(ExportMenu.prototype, "element", {
    /**
     * The main element o fthe menu - usually `<ul>`.
     *
     * @since 4.10.6
     * @return Menu element
     */
    get: function get() {
      return this._element;
    },
    enumerable: true,
    configurable: true
  });
  return ExportMenu;
}(_utils_Validatable__WEBPACK_IMPORTED_MODULE_6__.Validatable);



/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/formatters/DateFormatter.js":
/*!*************************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/formatters/DateFormatter.js ***!
  \*************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "DateFormatter": () => (/* binding */ DateFormatter)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _utils_Language__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/Language */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Language.js");
/* harmony import */ var _Base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Base */ "./node_modules/@amcharts/amcharts4/.internal/core/Base.js");
/* harmony import */ var _formatters_TextFormatter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../formatters/TextFormatter */ "./node_modules/@amcharts/amcharts4/.internal/core/formatters/TextFormatter.js");
/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _utils_Strings__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/Strings */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Strings.js");
/* harmony import */ var _utils_Utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/Utils */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Utils.js");
/* harmony import */ var _utils_Type__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/* harmony import */ var _utils_Time__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/Time */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Time.js");
/**
 * Handles date and time formatting
 */









/**
 * Handles date and time formatting.
 *
 * @see {@link https://www.amcharts.com/docs/v4/concepts/formatters/formatting-date-time/} Tutorial on date/time formatting
 * @todo Better type casting of passed in date?
 * @todo Quarter support?
 * @todo When parsing named months make the search case-insensitive
 * @todo Escape a.m./p.m. properly when used in RegEx
 */

var DateFormatter =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_8__.__extends)(DateFormatter, _super);
  /**
   * Constructor
   */


  function DateFormatter() {
    var _this = _super.call(this) || this;
    /**
     * Date format.
     */


    _this._dateFormat = "yyyy-MM-dd";
    /**
     * Input date format.
     */

    _this._inputDateFormat = "yyyy-MM-dd";
    /**
     * Assume UTC time zone.
     */

    _this._utc = false;
    /**
     * If `timezone` is set, this will hold minute fraction of the timezone.
     *
     * @readonly
     * @ignore
     */

    _this.timezoneMinutes = 0;
    /**
     * First day of week.
     *
     * 0 - Sunday
     * 1 - Monday
     *
     * Etc.
     */

    _this._firstDayOfWeek = 1;
    /**
     * A list of month names.
     */

    _this.months = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
    /**
     * A list of short month names.
     */

    _this.monthsShort = ["Jan", "Feb", "Mar", "Apr", "May(short)", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
    /**
     * A list of weekday names.
     */

    _this.weekdays = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
    /**
     * A list of short weekday names.
     */

    _this.weekdaysShort = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
    /**
     * Output format to produce. If the format calls for applying color to the
     * formatted value, this setting will determine what markup to use: SVG or
     * HTML.
     *
     * Available options: svg, html.
     *
     * @default "svg"
     */

    _this._outputFormat = "svg";
    /**
     * Should the first letter of the formatted date be capitalized?
     *
     * @default true
     */

    _this.capitalize = true;
    _this.className = "DateFormatter";

    _this.applyTheme();

    return _this;
  }

  Object.defineProperty(DateFormatter.prototype, "language", {
    /**
     * @return Language
     */
    get: function get() {
      return this._language;
    },

    /**
     * A reference to [[Language]] object.
     *
     * @param  value  Language
     */
    set: function set(value) {
      this._language = value;
      this.dateFormat = this._language.translate("_date");
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Formats the date value according to specified format.
   *
   * @see {@link https://www.amcharts.com/docs/v4/concepts/formatters/formatting-date-time/} Tutorial on date/time formatting
   * @param source  Date value
   * @param format  Format
   * @return Formatted date string
   */

  DateFormatter.prototype.format = function (source, format, applyTimezone) {
    // No language?
    if (!this.language) {
      if (this.sprite) {
        this.language = this.sprite.language;
      } else {
        this.language = new _utils_Language__WEBPACK_IMPORTED_MODULE_0__.Language();
      }
    } // No format passed in or it's empty


    if (typeof format === "undefined" || format === "") {
      format = this._dateFormat;
    } // Init return value


    var formatted; // Do casting if required
    // This will take care of timestamps as well as Date objects

    var date;

    if (_utils_Type__WEBPACK_IMPORTED_MODULE_6__.isString(source)) {
      // If it's a string, let's try parsing it using our own functionality
      date = this.parse(source);
    } else {
      date = _utils_Utils__WEBPACK_IMPORTED_MODULE_5__.anyToDate(source);
    } // Is it a built-in format or Intl.DateTimeFormat


    if (_utils_Type__WEBPACK_IMPORTED_MODULE_6__.isObject(format)) {
      try {
        if (this.intlLocales) {
          return new Intl.DateTimeFormat(this.intlLocales, format).format(date);
        } else {
          return new Intl.DateTimeFormat(undefined, format).format(date);
        }
      } catch (e) {
        return "Invalid";
      }
    } else {
      // Clean format
      format = _utils_Utils__WEBPACK_IMPORTED_MODULE_5__.cleanFormat(format); // get format info (it will also deal with parser caching)

      var info = this.parseFormat(format); // Should we apply custom time zone?

      if (_utils_Type__WEBPACK_IMPORTED_MODULE_6__.hasValue(this.timezoneOffset)) {
        date.setMinutes(date.getMinutes() + date.getTimezoneOffset() - this.timezoneOffset);
      } else if (_utils_Type__WEBPACK_IMPORTED_MODULE_6__.hasValue(this.timezone) && applyTimezone !== false) {
        date = _utils_Time__WEBPACK_IMPORTED_MODULE_7__.setTimezone(date, this.timezone);
      } // Check if it's a valid date


      if (!_utils_Type__WEBPACK_IMPORTED_MODULE_6__.isNumber(date.getTime())) {
        return this.language.translate("Invalid date");
      } // Apply format


      formatted = this.applyFormat(date, info, this.language); // Capitalize

      if (this.capitalize) {
        formatted = formatted.replace(/^.{1}/, formatted.substr(0, 1).toUpperCase());
      }
    } // We're done


    return formatted;
  };
  /**
   * Parses format into structured infromation.
   *
   * @param format Format template
   */


  DateFormatter.prototype.parseFormat = function (format) {
    // Check cache
    var cached = this.getCache(format);

    if (_utils_Type__WEBPACK_IMPORTED_MODULE_6__.hasValue(cached)) {
      return cached;
    } // Init format parse info holder


    var info = {
      "template": "",
      "parts": []
    }; // Let TextFormatter split into chunks

    var chunks = (0,_formatters_TextFormatter__WEBPACK_IMPORTED_MODULE_2__.getTextFormatter)().chunk(format, true);

    for (var i = 0; i < chunks.length; i++) {
      var chunk = chunks[i];

      if (chunk.type === "value") {
        // Just "Date"?
        if (chunk.text.match(/^date$/i) && _utils_Type__WEBPACK_IMPORTED_MODULE_6__.isString(this._dateFormat)) {
          chunk.text = this._dateFormat;
        } // Find all possible parts


        var matches = chunk.text.match(/G|yyyy|yyy|yy|y|YYYY|YYY|YY|Y|u|q|MMMMM|MMMM|MMM|MM|M|ww|w|W|dd|d|DDD|DD|D|F|g|EEEEE|EEEE|EEE|EE|E|eeeee|eeee|eee|ee|e|aaa|aa|a|hh|h|HH|H|KK|K|kk|k|mm|m|ss|s|SSS|SS|S|A|zzzz|zzz|zz|z|ZZ|Z|t|x|nnn|nn|n|i|I/g); // Found?

        if (matches) {
          // Populate template
          for (var x = 0; x < matches.length; x++) {
            info.parts.push(matches[x]);
            chunk.text = chunk.text.replace(matches[x], _utils_Strings__WEBPACK_IMPORTED_MODULE_4__.PLACEHOLDER);
          }
        }
      } // Apply to template


      info.template += chunk.text;
    } // Apply style formatting
    //info.template = getTextFormatter().format(info.template, this.outputFormat);
    // Save cache


    this.setCache(format, info);
    return info;
  };
  /**
   * Applies format to Date.
   *
   * @param date      Date object
   * @param info      Parsed format information
   * @param language  Language
   * @return Formatted date string
   */


  DateFormatter.prototype.applyFormat = function (date, info, language) {
    // Init return value
    var res = info.template; // Get values

    var fullYear,
        month,
        weekday,
        day,
        hours,
        minutes,
        seconds,
        milliseconds,
        offset = date.getTimezoneOffset(),
        timestamp = date.getTime();

    if (this.utc) {
      fullYear = date.getUTCFullYear();
      month = date.getUTCMonth();
      weekday = date.getUTCDay();
      day = date.getUTCDate();
      hours = date.getUTCHours();
      minutes = date.getUTCMinutes();
      seconds = date.getUTCSeconds();
      milliseconds = date.getUTCMilliseconds();
    } else {
      fullYear = date.getFullYear();
      month = date.getMonth();
      weekday = date.getDay();
      day = date.getDate();
      hours = date.getHours();
      minutes = date.getMinutes();
      seconds = date.getSeconds();
      milliseconds = date.getMilliseconds();
    } // Go through each part and format/replace it in template


    for (var i = 0, len = info.parts.length; i < len; i++) {
      var value = "";

      switch (info.parts[i]) {
        case "G":
          value = language.translate(fullYear < 0 ? "_era_bc" : "_era_ad");
          break;

        case "yyyy":
          value = Math.abs(fullYear).toString();

          if (fullYear < 0) {
            value += language.translate("_era_bc");
          }

          break;

        case "yyy":
        case "yy":
        case "y":
          value = Math.abs(fullYear).toString().substr(-info.parts[i].length);

          if (fullYear < 0) {
            value += language.translate("_era_bc");
          }

          break;

        case "YYYY":
        case "YYY":
        case "YY":
        case "Y":
          var week = _utils_Utils__WEBPACK_IMPORTED_MODULE_5__.getWeek(date);
          var year = fullYear;

          if (week == 1 && weekday > 4) {
            year--;
          }

          if (info.parts[i] == "YYYY") {
            value = Math.abs(year).toString();
          } else {
            value = Math.abs(year).toString().substr(-info.parts[i].length);
          }

          if (year < 0) {
            value += language.translate("_era_bc");
          }

          break;

        case "u":
          // @todo
          break;

        case "q":
          value = "" + Math.ceil((date.getMonth() + 1) / 3);
          break;

        case "MMMMM":
          value = language.translate(this.months[month]).substr(0, 1);
          break;

        case "MMMM":
          value = language.translate(this.months[month]);
          break;

        case "MMM":
          value = language.translate(this.monthsShort[month]);
          break;

        case "MM":
          value = _utils_Utils__WEBPACK_IMPORTED_MODULE_5__.padString(month + 1, 2, "0");
          break;

        case "M":
          value = (month + 1).toString();
          break;

        case "ww":
          value = _utils_Utils__WEBPACK_IMPORTED_MODULE_5__.padString(_utils_Utils__WEBPACK_IMPORTED_MODULE_5__.getWeek(date, this.utc), 2, "0");
          break;

        case "w":
          value = _utils_Utils__WEBPACK_IMPORTED_MODULE_5__.getWeek(date, this.utc).toString();
          break;

        case "W":
          value = _utils_Utils__WEBPACK_IMPORTED_MODULE_5__.getMonthWeek(date, this.utc).toString();
          break;

        case "dd":
          value = _utils_Utils__WEBPACK_IMPORTED_MODULE_5__.padString(day, 2, "0");
          break;

        case "d":
          value = day.toString();
          break;

        case "DD":
        case "DDD":
          value = _utils_Utils__WEBPACK_IMPORTED_MODULE_5__.padString(_utils_Utils__WEBPACK_IMPORTED_MODULE_5__.getYearDay(date, this.utc).toString(), info.parts[i].length, "0");
          break;

        case "D":
          value = _utils_Utils__WEBPACK_IMPORTED_MODULE_5__.getYearDay(date, this.utc).toString();
          break;

        case "F":
          // @todo
          break;

        case "g":
          // @todo
          break;

        case "t":
          value = language.translateFunc("_dateOrd").call(this, day);
          break;

        case "E":
          value = (weekday || 7).toString();
          break;

        case "EE":
          value = _utils_Utils__WEBPACK_IMPORTED_MODULE_5__.padString((weekday || 7).toString(), 2, "0");
          break;

        case "EEE":
        case "eee":
          value = language.translate(this.weekdaysShort[weekday]);
          break;

        case "EEEE":
        case "eeee":
          value = language.translate(this.weekdays[weekday]);
          break;

        case "EEEEE":
        case "eeeee":
          value = language.translate(this.weekdays[weekday]).substr(0, 1);
          break;

        case "e":
        case "ee":
          value = (weekday - this.firstDayOfWeek + 1).toString();

          if (info.parts[i] == "ee") {
            value = _utils_Utils__WEBPACK_IMPORTED_MODULE_5__.padString(value, 2, "0");
          }

          break;

        case "a":
          if (hours >= 12) {
            value = language.translate("PM");
          } else {
            value = language.translate("AM");
          }

          break;

        case "aa":
          if (hours >= 12) {
            value = language.translate("P.M.");
          } else {
            value = language.translate("A.M.");
          }

          break;

        case "aaa":
          if (hours >= 12) {
            value = language.translate("P");
          } else {
            value = language.translate("A");
          }

          break;

        case "h":
          value = _utils_Utils__WEBPACK_IMPORTED_MODULE_5__.get12Hours(hours).toString();
          break;

        case "hh":
          value = _utils_Utils__WEBPACK_IMPORTED_MODULE_5__.padString(_utils_Utils__WEBPACK_IMPORTED_MODULE_5__.get12Hours(hours), 2, "0");
          break;

        case "H":
          value = hours.toString();
          break;

        case "HH":
          value = _utils_Utils__WEBPACK_IMPORTED_MODULE_5__.padString(hours, 2, "0");
          break;

        case "K":
          value = _utils_Utils__WEBPACK_IMPORTED_MODULE_5__.get12Hours(hours, 0).toString();
          break;

        case "KK":
          value = _utils_Utils__WEBPACK_IMPORTED_MODULE_5__.padString(_utils_Utils__WEBPACK_IMPORTED_MODULE_5__.get12Hours(hours, 0), 2, "0");
          break;

        case "k":
          value = (hours + 1).toString();
          break;

        case "kk":
          value = _utils_Utils__WEBPACK_IMPORTED_MODULE_5__.padString(hours + 1, 2, "0");
          break;

        case "m":
          value = minutes.toString();
          break;

        case "mm":
          value = _utils_Utils__WEBPACK_IMPORTED_MODULE_5__.padString(minutes, 2, "0");
          break;

        case "s":
          value = seconds.toString();
          break;

        case "ss":
          value = _utils_Utils__WEBPACK_IMPORTED_MODULE_5__.padString(seconds, 2, "0");
          break;

        case "S":
        case "SS":
        case "SSS":
          value = Math.round(milliseconds / 1000 * Math.pow(10, info.parts[i].length)).toString();
          break;

        case "x":
          value = timestamp.toString();
          break;

        case "n":
        case "nn":
        case "nnn":
          value = _utils_Utils__WEBPACK_IMPORTED_MODULE_5__.padString(milliseconds, info.parts[i].length, "0");
          break;

        case "z":
          value = _utils_Utils__WEBPACK_IMPORTED_MODULE_5__.getTimeZone(date, false, false, this.utc);
          break;

        case "zz":
          value = _utils_Utils__WEBPACK_IMPORTED_MODULE_5__.getTimeZone(date, true, false, this.utc);
          break;

        case "zzz":
          value = _utils_Utils__WEBPACK_IMPORTED_MODULE_5__.getTimeZone(date, false, true, this.utc);
          break;

        case "zzzz":
          value = _utils_Utils__WEBPACK_IMPORTED_MODULE_5__.getTimeZone(date, true, true, this.utc);
          break;

        case "Z":
        case "ZZ":
          var tz = Math.abs(offset) / 60;
          var tzh = Math.floor(tz);
          var tzm = tz * 60 - tzh * 60;

          if (this.utc) {
            tzh = 0;
            tzm = 0;
          }

          if (info.parts[i] == "Z") {
            value = "GMT";
            value += offset > 0 ? "-" : "+";
            value += _utils_Utils__WEBPACK_IMPORTED_MODULE_5__.padString(tzh, 2) + ":" + _utils_Utils__WEBPACK_IMPORTED_MODULE_5__.padString(tzm, 2);
          } else {
            value = offset > 0 ? "-" : "+";
            value += _utils_Utils__WEBPACK_IMPORTED_MODULE_5__.padString(tzh, 2) + _utils_Utils__WEBPACK_IMPORTED_MODULE_5__.padString(tzm, 2);
          }

          break;

        case "i":
          value = date.toISOString();
          break;

        case "I":
          value = date.toUTCString();
          break;
      }

      res = res.replace(_utils_Strings__WEBPACK_IMPORTED_MODULE_4__.PLACEHOLDER, value);
    }

    return res;
  };
  /**
   * Parses any input value into Date object.
   *
   * @see {@link https://www.amcharts.com/docs/v4/concepts/formatters/formatting-date-time/#Parsing_Dates} Tutorial on date/time parsing
   * @param source  Source value
   * @param format  Source format
   * @return Date object
   */


  DateFormatter.prototype.parse = function (source, format) {
    // Format set?
    if (!_utils_Type__WEBPACK_IMPORTED_MODULE_6__.hasValue(format)) {
      format = this.inputDateFormat;
    } // Is it already a Date


    if (source instanceof Date) {
      return source;
    } // Is it a numeric timestamp


    if (typeof source === "number") {
      return new Date(source);
    } // No? Let's check if it's string, and try converting to it if nec


    if (typeof source !== "string") {
      source = source.toString();
    } // no language?


    if (!this.language) {
      if (this.sprite) {
        this.language = this.sprite.language;
      } else {
        this.language = new _utils_Language__WEBPACK_IMPORTED_MODULE_0__.Language();
      }
    } // Init return value


    var res; // Init RegEx for parsing

    var reg = ""; // Clean format

    format = _utils_Utils__WEBPACK_IMPORTED_MODULE_5__.cleanFormat(format); // Clip format to length of the source string

    format = format.substr(0, source.length); // Parse format

    var info = this.parseFormat(format); // Init parsed items holder

    var parsedIndexes = {
      "year": -1,
      "year3": -1,
      "year2": -1,
      "year1": -1,
      "month": -1,
      "monthShort": -1,
      "monthLong": -1,
      "weekdayShort": -1,
      "weekdayLong": -1,
      "day": -1,
      "yearDay": -1,
      "week": -1,
      "hourBase0": -1,
      "hour12Base0": -1,
      "hourBase1": -1,
      "hour12Base1": -1,
      "minute": -1,
      "second": -1,
      "millisecond": -1,
      "millisecondDigits": -1,
      "am": -1,
      "zone": -1,
      "timestamp": -1,
      "iso": -1
    }; // Init values

    var resValues = {
      "year": 1970,
      "month": 0,
      "day": 1,
      "hour": 0,
      "minute": 0,
      "second": 0,
      "millisecond": 0,
      "timestamp": null,
      "offset": 0,
      "utc": this.utc
    }; // Index adjuster

    var indexAdjust = 0,
        index = 0; // Iterate through all of the parts

    for (var i = 0; i < info.parts.length; i++) {
      // Set current match index
      index = i + indexAdjust + 1;

      switch (info.parts[i]) {
        case "yyyy":
        case "YYYY":
          reg += "([0-9]{4})";
          parsedIndexes.year = index;
          break;

        case "yyy":
        case "YYY":
          reg += "([0-9]{3})";
          parsedIndexes.year3 = index;
          break;

        case "yy":
        case "YY":
          reg += "([0-9]{2})";
          parsedIndexes.year2 = index;
          break;

        case "y":
        case "Y":
          reg += "([0-9]{1})";
          parsedIndexes.year1 = index;
          break;

        case "MMMM":
          reg += "(" + this.getStringList(this.months).join("|") + ")";
          parsedIndexes.monthLong = index;
          break;

        case "MMM":
          reg += "(" + this.getStringList(this.monthsShort).join("|") + ")";
          parsedIndexes.monthShort = index;
          break;

        case "MM":
        case "M":
          reg += "([0-9]{2}|[0-9]{1})";
          parsedIndexes.month = index;
          break;

        case "ww":
        case "w":
          reg += "([0-9]{2}|[0-9]{1})";
          parsedIndexes.week = index;
          break;

        case "dd":
        case "d":
          reg += "([0-9]{2}|[0-9]{1})";
          parsedIndexes.day = index;
          break;

        case "DDD":
        case "DD":
        case "D":
          reg += "([0-9]{3}|[0-9]{2}|[0-9]{1})";
          parsedIndexes.yearDay = index;
          break;

        case "dddd":
          reg += "(" + this.getStringList(this.weekdays).join("|") + ")";
          parsedIndexes.weekdayLong = index;
          break;

        case "ddd":
          reg += "(" + this.getStringList(this.weekdaysShort).join("|") + ")";
          parsedIndexes.weekdayShort = index;
          break;

        case "aaa":
        case "aa":
        case "a":
          // TODO: fix (escape regex)
          reg += "(" + this.getStringList(["AM", "PM", "A\.M\.", "P\.M\.", "A", "P"]).join("|") + ")";
          parsedIndexes.am = index;
          break;

        case "hh":
        case "h":
          reg += "([0-9]{2}|[0-9]{1})";
          parsedIndexes.hour12Base1 = index;
          break;

        case "HH":
        case "H":
          reg += "([0-9]{2}|[0-9]{1})";
          parsedIndexes.hourBase0 = index;
          break;

        case "KK":
        case "K":
          reg += "([0-9]{2}|[0-9]{1})";
          parsedIndexes.hour12Base0 = index;
          break;

        case "kk":
        case "k":
          reg += "([0-9]{2}|[0-9]{1})";
          parsedIndexes.hourBase1 = index;
          break;

        case "mm":
        case "m":
          reg += "([0-9]{2}|[0-9]{1})";
          parsedIndexes.minute = index;
          break;

        case "ss":
        case "s":
          reg += "([0-9]{2}|[0-9]{1})";
          parsedIndexes.second = index;
          break;

        case "SSS":
        case "SS":
        case "S":
          reg += "([0-9]{3}|[0-9]{2}|[0-9]{1})";
          parsedIndexes.millisecond = index;
          parsedIndexes.millisecondDigits = info.parts[i].length;
          break;

        case "nnn":
        case "nn":
        case "n":
          reg += "([0-9]{3}|[0-9]{2}|[0-9]{1})";
          parsedIndexes.millisecond = index;
          break;

        case "x":
          reg += "([0-9]{1,})";
          parsedIndexes.timestamp = index;
          break;

        case "Z":
          reg += "GMT([-+]+[0-9]{2}:[0-9]{2})";
          parsedIndexes.zone = index;
          break;

        case "ZZ":
          reg += "([\\-+]+[0-9]{2}[0-9]{2})";
          parsedIndexes.zone = index;
          break;

        case "i":
          reg += "([0-9]{4})-?([0-9]{2})-?([0-9]{2})T?([0-9]{2}):?([0-9]{2}):?([0-9]{2})\.?([0-9]{0,3})([zZ]|[+\-][0-9]{2}:?[0-9]{2}|$)";
          parsedIndexes.iso = index;
          indexAdjust += 7;
          break;

        case "G":
        case "YYYY":
        case "YYY":
        case "YY":
        case "Y":
        case "MMMMM":
        case "W":
        case "EEEEE":
        case "EEEE":
        case "EEE":
        case "EE":
        case "E":
        case "eeeee":
        case "eeee":
        case "eee":
        case "ee":
        case "e":
        case "zzzz":
        case "zzz":
        case "zz":
        case "z":
        case "t":
          // Ignore
          indexAdjust--;
          break;
      }

      reg += "[^0-9]*";
    } // Try matching


    var regex = new RegExp(reg);
    var matches = source.match(regex);

    if (matches) {
      // Populate the date object
      // Full year
      if (parsedIndexes.year > -1) {
        resValues.year = parseInt(matches[parsedIndexes.year]);
      } // 3-digit year


      if (parsedIndexes.year3 > -1) {
        var val = parseInt(matches[parsedIndexes.year3]);
        val += 1000;
        resValues.year = val;
      } // 2-digit year


      if (parsedIndexes.year2 > -1) {
        var val = parseInt(matches[parsedIndexes.year2]);

        if (val > 50) {
          val += 1000;
        } else {
          val += 2000;
        }

        resValues.year = val;
      } // 1-digit year


      if (parsedIndexes.year1 > -1) {
        var val = parseInt(matches[parsedIndexes.year1]);
        val = Math.floor(new Date().getFullYear() / 10) * 10 + val;
        resValues.year = val;
      } // Full month


      if (parsedIndexes.monthLong > -1) {
        resValues.month = this.resolveMonth(matches[parsedIndexes.monthLong]);
      } // Short month


      if (parsedIndexes.monthShort > -1) {
        resValues.month = this.resolveShortMonth(matches[parsedIndexes.monthShort]);
      } // Numeric month


      if (parsedIndexes.month > -1) {
        resValues.month = parseInt(matches[parsedIndexes.month]) - 1;
      } // Weekday
      // @todo
      // Week


      if (parsedIndexes.week > -1 && parsedIndexes.day === -1) {
        // We parse weeks ONLY if day is not explicitly set
        // TODO: this needs work
        // (but maybe later - I can hardly imagine anyone passing their dates in weeks)
        resValues.month = 0;
        resValues.day = _utils_Utils__WEBPACK_IMPORTED_MODULE_5__.getDayFromWeek(parseInt(matches[parsedIndexes.week]), resValues.year, 1, this.utc);
      } // Day


      if (parsedIndexes.day > -1) {
        resValues.day = parseInt(matches[parsedIndexes.day]);
      } // Year day


      if (parsedIndexes.yearDay > -1) {
        resValues.month = 0;
        resValues.day = parseInt(matches[parsedIndexes.yearDay]);
      } // 24 Hour (0-23)


      if (parsedIndexes.hourBase0 > -1) {
        resValues.hour = parseInt(matches[parsedIndexes.hourBase0]);
      } // 24 Hour (1-24)


      if (parsedIndexes.hourBase1 > -1) {
        resValues.hour = parseInt(matches[parsedIndexes.hourBase1]) - 1;
      } // 12 Hour (0-11)


      if (parsedIndexes.hour12Base0 > -1) {
        var val = parseInt(matches[parsedIndexes.hour12Base0]);

        if (val == 11) {
          val = 0;
        }

        if (parsedIndexes.am > -1 && !this.isAm(matches[parsedIndexes.am])) {
          val += 12;
        }

        resValues.hour = val;
      } // 12 Hour (1-12)


      if (parsedIndexes.hour12Base1 > -1) {
        var val = parseInt(matches[parsedIndexes.hour12Base1]);

        if (val == 12) {
          val = 0;
        }

        if (parsedIndexes.am > -1 && !this.isAm(matches[parsedIndexes.am])) {
          val += 12;
        }

        resValues.hour = val;
      } // Minute


      if (parsedIndexes.minute > -1) {
        resValues.minute = parseInt(matches[parsedIndexes.minute]);
      } // Second


      if (parsedIndexes.second > -1) {
        resValues.second = parseInt(matches[parsedIndexes.second]);
      } // Millisecond


      if (parsedIndexes.millisecond > -1) {
        var val = parseInt(matches[parsedIndexes.millisecond]);

        if (parsedIndexes.millisecondDigits == 2) {
          val *= 10;
        } else if (parsedIndexes.millisecondDigits == 1) {
          val *= 100;
        }

        resValues.millisecond = val;
      } // Timestamp


      if (parsedIndexes.timestamp > -1) {
        resValues.timestamp = parseInt(matches[parsedIndexes.timestamp]);
        var ts = new Date(resValues.timestamp);
        resValues.year = ts.getUTCFullYear();
        resValues.month = ts.getUTCMonth();
        resValues.day = ts.getUTCDate();
        resValues.hour = ts.getUTCHours();
        resValues.minute = ts.getUTCMinutes();
        resValues.second = ts.getUTCSeconds();
        resValues.millisecond = ts.getUTCMilliseconds();
      } // Adjust time zone


      if (parsedIndexes.zone > -1) {
        resValues.offset = this.resolveTimezoneOffset(new Date(resValues.year, resValues.month, resValues.day), matches[parsedIndexes.zone]);
      } // ISO


      if (parsedIndexes.iso > -1) {
        resValues.year = _utils_Type__WEBPACK_IMPORTED_MODULE_6__.toNumber(matches[parsedIndexes.iso + 0]);
        resValues.month = _utils_Type__WEBPACK_IMPORTED_MODULE_6__.toNumber(matches[parsedIndexes.iso + 1]) - 1;
        resValues.day = _utils_Type__WEBPACK_IMPORTED_MODULE_6__.toNumber(matches[parsedIndexes.iso + 2]);
        resValues.hour = _utils_Type__WEBPACK_IMPORTED_MODULE_6__.toNumber(matches[parsedIndexes.iso + 3]);
        resValues.minute = _utils_Type__WEBPACK_IMPORTED_MODULE_6__.toNumber(matches[parsedIndexes.iso + 4]);
        resValues.second = _utils_Type__WEBPACK_IMPORTED_MODULE_6__.toNumber(matches[parsedIndexes.iso + 5]);
        resValues.millisecond = _utils_Type__WEBPACK_IMPORTED_MODULE_6__.toNumber(matches[parsedIndexes.iso + 6]);

        if (matches[parsedIndexes.iso + 7] == "Z" || matches[parsedIndexes.iso + 7] == "z") {
          resValues.utc = true;
        } else if (matches[parsedIndexes.iso + 7] != "") {
          resValues.offset = this.resolveTimezoneOffset(new Date(resValues.year, resValues.month, resValues.day), matches[parsedIndexes.iso + 7]);
        }
      } // Create Date object


      if (resValues.utc) {
        res = new Date(Date.UTC(resValues.year, resValues.month, resValues.day, resValues.hour, resValues.minute, resValues.second, resValues.millisecond));
      } else {
        res = new Date(resValues.year, resValues.month, resValues.day, resValues.hour, resValues.minute + resValues.offset, resValues.second, resValues.millisecond);
      }
    } else {
      // Didn't match anything
      // Let's try dropping it into Date constructor and hope for the best
      res = new Date(source);
    }

    return res;
  };

  DateFormatter.prototype.resolveTimezoneOffset = function (date, zone) {
    var value = zone.match(/([+\-]?)([0-9]{2}):?([0-9]{2})/);

    if (value) {
      var match = _utils_Type__WEBPACK_IMPORTED_MODULE_6__.getValue(zone.match(/([+\-]?)([0-9]{2}):?([0-9]{2})/));
      var dir = match[1];
      var hour = match[2];
      var minute = match[3];
      var offset = parseInt(hour) * 60 + parseInt(minute); // Adjust offset
      // Making it negative does not seem to make sense, but it's right
      // because of how JavaScript calculates GMT offsets

      if (dir == "+") {
        offset *= -1;
      } // Check the difference in offset


      var originalOffset = (date || new Date()).getTimezoneOffset();
      var diff = offset - originalOffset;
      return diff;
    }

    return 0;
  };
  /**
   * Resolves month name (i.e. "December") into a month number (11).
   *
   * @param value  Month name
   * @return Month number
   */


  DateFormatter.prototype.resolveMonth = function (value) {
    // Let's try English first
    var month = this.months.indexOf(value);

    if (month > -1) {
      return month;
    } // Try the translation


    if (this.language && !this.language.isDefault()) {
      month = this.language.translateAll(this.months).indexOf(value);

      if (month > -1) {
        return month;
      }
    }

    return 0;
  };
  /**
   * Resolves short month name (i.e. "Dec") into a month number.
   *
   * @param value  Short month name
   * @return Month number
   */


  DateFormatter.prototype.resolveShortMonth = function (value) {
    // Let's try English first
    var month = this.monthsShort.indexOf(value);

    if (month > -1) {
      return month;
    } // Maybe long month (workaround for May)


    month = this.months.indexOf(value);

    if (month > -1) {
      return month;
    } // Try the translation


    if (this.language && !this.language.isDefault()) {
      month = this.language.translateAll(this.monthsShort).indexOf(value);

      if (month > -1) {
        return month;
      }
    }

    return 0;
  };
  /**
   * Checks if passed in string represents AM/PM notation in many of its
   * versions.
   *
   * @param value  Source string
   * @return Is it AM/PM?
   */


  DateFormatter.prototype.isAm = function (value) {
    var list = this.getStringList(["AM", "A.M.", "A"]);
    return list.indexOf(value.toUpperCase()) > -1;
  };
  /**
   * Invalidates related [[Sprite]] causing it to redraw.
   */


  DateFormatter.prototype.invalidateSprite = function () {
    if (this.sprite) {
      this.sprite.invalidate();
    }
  };
  /**
   * Translates list of strings.
   *
   * @param list  Source strings
   * @return Translated strings
   */


  DateFormatter.prototype.getStringList = function (list) {
    var res = [];

    for (var i = 0; i < list.length; i++) {
      // translate?
      if (this.language) {
        res.push(_utils_Utils__WEBPACK_IMPORTED_MODULE_5__.escapeForRgex(this.language.translate(list[i])));
      } else {
        res.push(_utils_Utils__WEBPACK_IMPORTED_MODULE_5__.escapeForRgex(list[i]));
      }
    }

    return res;
  };

  Object.defineProperty(DateFormatter.prototype, "dateFormat", {
    /**
     * @return Date format
     */
    get: function get() {
      return this._dateFormat;
    },

    /**
     * Date format to use.
     *
     * If format is not supplied in-line in the string, this setting will be
     * used.
     *
     * @default "yyyy-MM-dd"
     * @param value Date format
     */
    set: function set(value) {
      this._dateFormat = value;
      this.invalidateSprite();
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(DateFormatter.prototype, "inputDateFormat", {
    /**
     * @return Date format
     */
    get: function get() {
      return this._inputDateFormat;
    },

    /**
     * Date format to use when parsing dates.
     *
     * @default "yyyy-MM-dd"
     * @param value Date format
     */
    set: function set(value) {
      this._inputDateFormat = value;
      this.invalidateSprite();
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(DateFormatter.prototype, "intlLocales", {
    /**
     * @return Date format
     */
    get: function get() {
      return this._intlLocales;
    },

    /**
     * Locales if you are using date formats in `Intl.DateTimeFormatOptions` syntax.
     *
     * @param value Locales
     */
    set: function set(value) {
      this._intlLocales = value;
      this.invalidateSprite();
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(DateFormatter.prototype, "utc", {
    /**
     * @return Use UTC?
     */
    get: function get() {
      return this._utc;
    },

    /**
     * Should formatter use UTC functions?
     *
     * If UTC is used, all date/time values will be independent on client's
     * time zone.
     *
     * @param value Use UTC?
     */
    set: function set(value) {
      this._utc = value;
      this.invalidateSprite();
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(DateFormatter.prototype, "timezoneOffset", {
    /**
     * @return Offset (minutes)
     */
    get: function get() {
      return this._timezoneOffset;
    },

    /**
     * If set, will apply specific offset in minutes before formatting the date
     * text.
     *
     * The value is a number of minutes from target time zone to UTC.
     *
     * E.g. `300` will recalculate Dates in "GMT-5" time zone.
     *
     * @param  value  Offset (minutes)
     */
    set: function set(value) {
      if (this._timezoneOffset != value) {
        this._timezoneOffset = value;
        this.invalidateSprite();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(DateFormatter.prototype, "timezone", {
    /**
     * @return Timezone
     */
    get: function get() {
      return this._timezone;
    },

    /**
     * If set, will format date/time in specific time zone.
     *
     * The value should be named time zone, e.g.:
     * `"America/Vancouver"`, `"Australia/Sydney"`, `"UTC"`.
     *
     * @since 4.10.1
     * @param  value  Timezone
     */
    set: function set(value) {
      if (this._timezone != value) {
        this._timezone = value;
        this.timezoneMinutes = _utils_Time__WEBPACK_IMPORTED_MODULE_7__.getTimezoneMinutes(value);
        this.invalidateSprite();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(DateFormatter.prototype, "firstDayOfWeek", {
    /**
     * @return First day of week
     */
    get: function get() {
      return this._firstDayOfWeek;
    },

    /**
     * First day of the week:
     *
     * * 0 - Sunday
     * * 1 - Monday
     * * 2 - Tuesday
     *
     * Etc.
     *
     * @param value First day of week
     */
    set: function set(value) {
      this._firstDayOfWeek = value;
      this.invalidateSprite();
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(DateFormatter.prototype, "outputFormat", {
    /**
     * @ignore Exclude from docs
     * @return Format
     */
    get: function get() {
      return this._outputFormat;
    },

    /**
     * Output format for the formatted date.
     *
     * @ignore Exclude from docs
     * @param value  Format
     */
    set: function set(value) {
      this._outputFormat = value.toLowerCase();
      this.invalidateSprite();
    },
    enumerable: true,
    configurable: true
  });
  return DateFormatter;
}(_Base__WEBPACK_IMPORTED_MODULE_1__.BaseObject);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_Registry__WEBPACK_IMPORTED_MODULE_3__.registry.registeredClasses.DateFormatter = DateFormatter;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/formatters/DurationFormatter.js":
/*!*****************************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/formatters/DurationFormatter.js ***!
  \*****************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "DurationFormatter": () => (/* binding */ DurationFormatter)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _utils_Language__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/Language */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Language.js");
/* harmony import */ var _Base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Base */ "./node_modules/@amcharts/amcharts4/.internal/core/Base.js");
/* harmony import */ var _formatters_TextFormatter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../formatters/TextFormatter */ "./node_modules/@amcharts/amcharts4/.internal/core/formatters/TextFormatter.js");
/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _utils_Strings__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/Strings */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Strings.js");
/* harmony import */ var _utils_Object__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/Object */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Object.js");
/* harmony import */ var _utils_Utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/Utils */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Utils.js");
/* harmony import */ var _utils_Type__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/* harmony import */ var _utils_Math__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
/**
 * Duration formatting functionality.
 */










/**
 * DurationFormatter class. Formats numbers as durations.
 *
 * `1000` as `16:40`
 *
 * @see {@link https://www.amcharts.com/docs/v4/concepts/formatters/formatting-duration/} Tutorial on duration formatting
 */

var DurationFormatter =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_9__.__extends)(DurationFormatter, _super);
  /**
   * Constructor
   */


  function DurationFormatter() {
    var _this = _super.call(this) || this;
    /**
     * A base value for negative numbers. Will treat all numbers below this value
     * as negative numbers.
     */


    _this._negativeBase = 0;
    /**
     * A base unit to consider values are in.
     *
     * @default "s"
     */

    _this._baseUnit = "second";
    /**
     * Output format to produce. If the format calls for applying color to the
     * formatted value, this setting will determine what markup to use: SVG or
     * HTML.
     *
     * Available options: svg, html.
     *
     * @default "svg"
     */

    _this._outputFormat = "svg";
    /**
     * How many milliseconds each unit represents.
     */

    _this._unitValues = {
      "millisecond": 1,
      "second": 1000,
      "minute": 60000,
      "hour": 3600000,
      "day": 86400000,
      "week": 604800000,
      "month": 2592000000,
      "year": 31536000000
    };
    /**
     * Collection of aliases for units.
     */

    _this._unitAliases = {
      "Y": "y",
      "D": "d",
      "H": "h",
      "K": "h",
      "k": "h",
      "n": "S"
    };
    _this.className = "DurationFormatter";

    _this.applyTheme();

    return _this;
  }
  /**
   * Formats the number according as duration.
   *
   * For example `1000` (base unit seconds) would be converted to `16:40` as in
   * 16 minutes and 40 seconds.
   *
   * @see {@link https://www.amcharts.com/docs/v4/concepts/formatters/formatting-duration/} Tutorial on duration formatting
   * @param value   Value to format
   * @param format  Format to apply
   * @param base    Override base unit
   * @return Formatted number
   */


  DurationFormatter.prototype.format = function (value, format, base) {
    // no language?
    if (!this.language) {
      if (this.sprite) {
        this.language = this.sprite.language;
      } else {
        this.language = new _utils_Language__WEBPACK_IMPORTED_MODULE_0__.Language();
      }
    } // no base unit?


    var baseUnit = base || this._baseUnit; // no format passed in or empty

    if (typeof format === "undefined" || format === "") {
      if (_utils_Type__WEBPACK_IMPORTED_MODULE_7__.hasValue(this.durationFormat)) {
        format = this.durationFormat;
      } else {
        format = this.getFormat(_utils_Type__WEBPACK_IMPORTED_MODULE_7__.toNumber(value), null, baseUnit);
      }
    } // Clean format


    format = _utils_Utils__WEBPACK_IMPORTED_MODULE_6__.cleanFormat(format); // get format info (it will also deal with parser caching)

    var info = this.parseFormat(format, baseUnit); // cast to number just in case
    // TODO: maybe use better casting

    var source = Number(value); // format and replace the number

    var details;

    if (source > this._negativeBase) {
      details = info.positive;
    } else if (source < this._negativeBase) {
      details = info.negative;
    } else {
      details = info.zero;
    } // Format


    var formatted = this.applyFormat(source, details); // Apply color?

    if (details.color !== "") {
      if (this._outputFormat === "svg") {
        formatted = "<tspan fill='" + details.color + "'>" + formatted + "</tspan>";
      } else if (this._outputFormat === "html") {
        formatted = "<span style='color: " + details.color + ";'>" + formatted + "</span>";
      }
    }

    return formatted;
  };
  /**
   * Parses supplied format into structured object which can be used to format
   * the number.
   *
   * @param format  Format string, i.e. "#,###.00"
   * @param base    Override base unit
   * @return Parsed information
   */


  DurationFormatter.prototype.parseFormat = function (format, base) {
    var _this = this; // Check cache


    var cached = this.getCache(format);

    if (_utils_Type__WEBPACK_IMPORTED_MODULE_7__.hasValue(cached)) {
      return cached;
    } // no base unit?


    var baseUnit = base || this._baseUnit; // Initialize duration parsing info

    var info = {
      "positive": {
        "color": "",
        "template": "",
        "parts": [],
        "source": "",
        "baseUnit": baseUnit,
        "parsed": false,
        "absolute": false
      },
      "negative": {
        "color": "",
        "template": "",
        "parts": [],
        "source": "",
        "baseUnit": baseUnit,
        "parsed": false,
        "absolute": false
      },
      "zero": {
        "color": "",
        "template": "",
        "parts": [],
        "source": "",
        "baseUnit": baseUnit,
        "parsed": false,
        "absolute": false
      }
    }; // Escape double vertical bars (that mean display one vertical bar)

    format = format.replace("||", _utils_Strings__WEBPACK_IMPORTED_MODULE_4__.PLACEHOLDER2); // Split it up and deal with different formats

    var parts = format.split("|");
    info.positive.source = parts[0];

    if (typeof parts[2] === "undefined") {
      info.zero = info.positive;
    } else {
      info.zero.source = parts[2];
    }

    if (typeof parts[1] === "undefined") {
      info.negative = info.positive;
    } else {
      info.negative.source = parts[1];
    } // Parse each


    _utils_Object__WEBPACK_IMPORTED_MODULE_5__.each(info, function (part, item) {
      // Already parsed
      if (item.parsed) {
        return;
      } // Check cached


      if (typeof _this.getCache(item.source) !== "undefined") {
        info[part] = _this.getCache(item.source);
        return;
      } // Begin parsing


      var partFormat = item.source; // Check for [] directives

      var dirs = [];
      dirs = item.source.match(/^\[([^\]]*)\]/);

      if (dirs && dirs.length && dirs[0] !== "") {
        partFormat = item.source.substr(dirs[0].length);
        item.color = dirs[1];
      } // Let TextFormatter split into chunks


      var chunks = (0,_formatters_TextFormatter__WEBPACK_IMPORTED_MODULE_2__.getTextFormatter)().chunk(partFormat, true);

      for (var i = 0; i < chunks.length; i++) {
        var chunk = chunks[i]; // replace back double vertical bar

        chunk.text = chunk.text.replace(_utils_Strings__WEBPACK_IMPORTED_MODULE_4__.PLACEHOLDER2, "|");

        if (chunk.type === "value") {
          // Just "Duration"?
          // if (chunk.text.toLowerCase() === "duration") {
          // 	chunk.text = durationFormat;
          // }
          // Check for "a" (absolute) modifier
          if (chunk.text.match(/[yYMdDwhHKkmsSn]+a/)) {
            item.absolute = true;
            chunk.text = chunk.text.replace(/([yYMdDwhHKkmsSn]+)a/, "$1");
          } // Find all possible parts


          var matches = chunk.text.match(/y+|Y+|M+|d+|D+|w+|h+|H+|K+|k+|m+|s+|S+|n+/g);

          if (matches) {
            // Populate template
            for (var x = 0; x < matches.length; x++) {
              // Is it an alias?
              if (!_utils_Type__WEBPACK_IMPORTED_MODULE_7__.hasValue(matches[x])) {
                matches[x] = _this._unitAliases[matches[x]];
              }

              item.parts.push(matches[x]);
              chunk.text = chunk.text.replace(matches[x], _utils_Strings__WEBPACK_IMPORTED_MODULE_4__.PLACEHOLDER);
            }
          }
        } // Apply to template


        item.template += chunk.text;
      } // Apply style formatting
      //item.template = getTextFormatter().format(item.template, this.outputFormat);
      // Save cache


      _this.setCache(item.source, item); // Mark this as parsed


      item.parsed = true;
    }); // Save cache (the whole thing)

    this.setCache(format, info);
    return info;
  };
  /**
   * Applies parsed format to a numeric value.
   *
   * @param value    Value
   * @param details  Parsed format as returned by {parseFormat}
   * @return Formatted duration
   */


  DurationFormatter.prototype.applyFormat = function (value, details) {
    // Use absolute values
    var negative = !details.absolute && value < this._negativeBase;
    value = Math.abs(value); // Recalculate to milliseconds

    var tstamp = this.toTimeStamp(value, details.baseUnit); // Init return value

    var res = details.template; // Iterate through duration parts

    for (var i = 0, len = details.parts.length; i < len; i++) {
      // Gather the part
      var part = details.parts[i];
      var unit = this.toTimeUnit(part.substr(0, 1));
      var digits = part.length; // Calculate current unit value

      var ints = Math.floor(tstamp / this._unitValues[unit]);
      res = res.replace(_utils_Strings__WEBPACK_IMPORTED_MODULE_4__.PLACEHOLDER, _utils_Utils__WEBPACK_IMPORTED_MODULE_6__.padString(ints, digits, "0")); // Reduce timestamp

      tstamp -= ints * this._unitValues[unit];
    } // Reapply negative sign


    if (negative) {
      res = "-" + res;
    }

    return res;
  };
  /**
   * Converts numeric value to timestamp in milliseconds.
   *
   * @param value     A source value
   * @param baseUnit  Base unit the source value is in: "q", "s", "i", "h", "d", "w", "m", "y"
   * @return Value representation as a timestamp in milliseconds
   */


  DurationFormatter.prototype.toTimeStamp = function (value, baseUnit) {
    return value * this._unitValues[baseUnit];
  };

  DurationFormatter.prototype.toTimeUnit = function (code) {
    switch (code) {
      case "S":
        return "millisecond";

      case "s":
        return "second";

      case "m":
        return "minute";

      case "h":
        return "hour";

      case "d":
        return "day";

      case "w":
        return "week";

      case "M":
        return "month";

      case "y":
        return "year";
    }

    ;
  };
  /**
   * Invalidates the parent [[Sprite]] object.
   */


  DurationFormatter.prototype.invalidateSprite = function () {
    if (this.sprite) {
      this.sprite.invalidate();
    }
  };

  Object.defineProperty(DurationFormatter.prototype, "baseUnit", {
    /**
     * @return Base unit
     */
    get: function get() {
      return this._baseUnit;
    },

    /**
     * Base unit the values are in.
     *
     * A base unit will be used to recalculate the numeric value to millisecond
     * timestamps.
     *
     * Available options:
     *
     * * "millisecond"
     * * "second"
     * * "minute"
     * * "hour"
     * * "day"
     * * "week"
     * * "month"
     * * "year"
     *
     * @default "s"
     * @param baseUnit  A base unit
     */
    set: function set(baseUnit) {
      this._baseUnit = baseUnit;
      this.invalidateSprite();
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(DurationFormatter.prototype, "outputFormat", {
    /**
     * Getter for output format.
     *
     * @ignore Exclude from docs
     * @return Output format
     */
    get: function get() {
      return this._outputFormat;
    },

    /**
     * Setter for output format: "svg" or "html.
     *
     * @ignore Exclude from docs
     * @param value  Output format
     */
    set: function set(outputFormat) {
      this._outputFormat = outputFormat.toLowerCase();
      this.invalidateSprite();
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Returns appropriate default format for the value.
   *
   * If `maxValue` is sepcified, it will use that value to determine the time
   * unit for the format.
   *
   * For example if your `baseUnit` is `"second"` and you pass in `10`, you
   * will get `"10"`.
   *
   * However, you might want it to be formatted in the context of bigger scale,
   * say 10 minutes (600 seconds). If you pass in `600` as `maxValue`, all
   * values, including small ones will use format with minutes, e.g.:
   * `00:10`, `00:50`, `12: 30`, etc.
   *
   * @param value     Value to format
   * @param maxValue  Maximum value to be used to determine format
   * @param baseUnit  Base unit of the value
   * @return Format
   */

  DurationFormatter.prototype.getFormat = function (value, maxValue, baseUnit) {
    // Is format override set?
    if (_utils_Type__WEBPACK_IMPORTED_MODULE_7__.hasValue(this.durationFormat)) {
      return this.durationFormat;
    } // Get base unit


    if (!baseUnit) {
      baseUnit = this.baseUnit;
    }

    if (_utils_Type__WEBPACK_IMPORTED_MODULE_7__.hasValue(maxValue) && value != maxValue) {
      value = Math.abs(value);
      maxValue = Math.abs(maxValue);
      var maxUnit = this.getValueUnit(_utils_Math__WEBPACK_IMPORTED_MODULE_8__.max(value, maxValue), baseUnit); //let diffUnit = this.getValueUnit(Math.abs(maxValue - value), baseUnit);
      //console.log(maxUnit, diffUnit);

      return this.durationFormats[baseUnit][maxUnit];
    } else {
      var unit = this.getValueUnit(value, baseUnit);
      return this.durationFormats[baseUnit][unit];
    }
  };
  /**
   * Returns value's closest denominator time unit, e.g 100 seconds is
   * `"minute"`, while 59 seconds would still be `second`.
   *
   * @param value     Source duration value
   * @param baseUnit  Base unit
   * @return Denominator
   */


  DurationFormatter.prototype.getValueUnit = function (value, baseUnit) {
    // Get base unit
    if (!baseUnit) {
      baseUnit = this.baseUnit;
    } // Convert to milliseconds


    var currentUnit;
    var ms = this.getMilliseconds(value, baseUnit);
    _utils_Object__WEBPACK_IMPORTED_MODULE_5__.eachContinue(this._unitValues, function (key, val) {
      if (key == baseUnit || currentUnit) {
        var num = ms / val;

        if (num <= 1) {
          if (!currentUnit) {
            currentUnit = key;
          }

          return false;
        }

        currentUnit = key;
      }

      return true;
    });
    return currentUnit;
  };
  /**
   * Converts value to milliseconds according to `baseUnit`.
   *
   * @param value     Source duration value
   * @param baseUnit  Base unit
   * @return Value in milliseconds
   */


  DurationFormatter.prototype.getMilliseconds = function (value, baseUnit) {
    // Get base unit
    if (!baseUnit) {
      baseUnit = this.baseUnit;
    }

    return value * this._unitValues[baseUnit];
  };

  Object.defineProperty(DurationFormatter.prototype, "durationFormat", {
    /**
     * @return Format
     */
    get: function get() {
      return this._durationFormat;
    },

    /**
     * If set, this format will be used instead of the one determined dynamically
     * based on the basedUnit and range of values.
     *
     * @see {@link https://www.amcharts.com/docs/v4/concepts/formatters/formatting-duration/} Available fomatting codes
     * @param value  Format
     */
    set: function set(value) {
      if (this._durationFormat != value) {
        this._durationFormat = value;
        this.invalidateSprite();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(DurationFormatter.prototype, "durationFormats", {
    /**
     * @return Formats
     */
    get: function get() {
      if (!this._durationFormats) {
        this._durationFormats = {
          "millisecond": {
            "millisecond": this.language.translate("_duration_millisecond"),
            "second": this.language.translate("_duration_millisecond_second"),
            "minute": this.language.translate("_duration_millisecond_minute"),
            "hour": this.language.translate("_duration_millisecond_hour"),
            "day": this.language.translate("_duration_millisecond_day"),
            "week": this.language.translate("_duration_millisecond_week"),
            "month": this.language.translate("_duration_millisecond_month"),
            "year": this.language.translate("_duration_millisecond_year")
          },
          "second": {
            "second": this.language.translate("_duration_second"),
            "minute": this.language.translate("_duration_second_minute"),
            "hour": this.language.translate("_duration_second_hour"),
            "day": this.language.translate("_duration_second_day"),
            "week": this.language.translate("_duration_second_week"),
            "month": this.language.translate("_duration_second_month"),
            "year": this.language.translate("_duration_second_year")
          },
          "minute": {
            "minute": this.language.translate("_duration_minute"),
            "hour": this.language.translate("_duration_minute_hour"),
            "day": this.language.translate("_duration_minute_day"),
            "week": this.language.translate("_duration_minute_week"),
            "month": this.language.translate("_duration_minute_month"),
            "year": this.language.translate("_duration_minute_year")
          },
          "hour": {
            "hour": this.language.translate("_duration_hour"),
            "day": this.language.translate("_duration_hour_day"),
            "week": this.language.translate("_duration_hour_week"),
            "month": this.language.translate("_duration_hour_month"),
            "year": this.language.translate("_duration_hour_year")
          },
          "day": {
            "day": this.language.translate("_duration_day"),
            "week": this.language.translate("_duration_day_week"),
            "month": this.language.translate("_duration_day_month"),
            "year": this.language.translate("_duration_day_year")
          },
          "week": {
            "week": this.language.translate("_duration_week"),
            "month": this.language.translate("_duration_week_month"),
            "year": this.language.translate("_duration_week_year")
          },
          "month": {
            "month": this.language.translate("_duration_month"),
            "year": this.language.translate("_duration_month_year")
          },
          "year": {
            "year": this.language.translate("_duration_year")
          }
        };
      }

      return this._durationFormats;
    },

    /**
     * Duration formats for various combination of base units.
     *
     * @param value  Formats
     */
    set: function set(value) {
      this._durationFormats = value;
      this.invalidateSprite();
    },
    enumerable: true,
    configurable: true
  });
  return DurationFormatter;
}(_Base__WEBPACK_IMPORTED_MODULE_1__.BaseObject);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_Registry__WEBPACK_IMPORTED_MODULE_3__.registry.registeredClasses.DurationFormatter = DurationFormatter;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/formatters/NumberFormatter.js":
/*!***************************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/formatters/NumberFormatter.js ***!
  \***************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "NumberFormatter": () => (/* binding */ NumberFormatter)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _utils_Language__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/Language */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Language.js");
/* harmony import */ var _Base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Base */ "./node_modules/@amcharts/amcharts4/.internal/core/Base.js");
/* harmony import */ var _formatters_TextFormatter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../formatters/TextFormatter */ "./node_modules/@amcharts/amcharts4/.internal/core/formatters/TextFormatter.js");
/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _utils_Strings__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/Strings */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Strings.js");
/* harmony import */ var _utils_Object__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/Object */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Object.js");
/* harmony import */ var _utils_Utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/Utils */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Utils.js");
/* harmony import */ var _utils_Type__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/* harmony import */ var _utils_Math__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
/**
 * Number formatting-related functionality.
 */










/**
 * NumberFormatter class. Formats numbers according to specified formats.
 *
 * @todo Apply translations to suffixes/prefixes
 */

var NumberFormatter =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_9__.__extends)(NumberFormatter, _super);
  /**
   * Constructor
   */


  function NumberFormatter() {
    var _this = _super.call(this) || this;
    /**
     * A base value for negative numbers. Will treat all numbers below this value
     * as negative numbers.
     */


    _this._negativeBase = 0;
    /**
     * Holds number format.
     *
     * @default #,###.#####
     */

    _this._numberFormat = "#,###.#####";
    /**
     * Output format to produce. If the format calls for applying color to the
     * formatted value, this setting will determine what markup to use: SVG or
     * HTML.
     *
     * Available options: svg, html.
     *
     * @default "svg"
     */

    _this._outputFormat = "svg";
    /**
     * Any number smaller than this will be considered "small" number, which will
     * trigger special formatting if "a" format modifier is used.
     */

    _this._smallNumberThreshold = 1.00;
    _this._forceLTR = false;
    _this.className = "NumberFormatter";

    _this.applyTheme();

    return _this;
  }

  NumberFormatter.prototype.dispose = function () {
    _super.prototype.dispose.call(this);

    if (this.language) {
      this.language.dispose();
    }
  };

  Object.defineProperty(NumberFormatter.prototype, "language", {
    /**
     * @return Language
     */
    get: function get() {
      if (!this._language) {
        if (this.sprite) {
          this._language = this.sprite.language;
        } else {
          this._language = new _utils_Language__WEBPACK_IMPORTED_MODULE_0__.Language();
        }
      }

      return this._language;
    },

    /**
     * A reference to [[Language]] instance.
     *
     * Formatter will use language to translate various items, like number
     * suffixes, etc.
     *
     * @param value  Language
     */
    set: function set(value) {
      this._language = value;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Formats the number according to specific format.
   *
   * @param value   Value to format
   * @param format  Format to apply
   * @return Formatted number
   */

  NumberFormatter.prototype.format = function (value, format, precision) {
    // no format passed in or "Number"
    if (typeof format === "undefined" || _utils_Type__WEBPACK_IMPORTED_MODULE_7__.isString(format) && format.toLowerCase() === "number") {
      format = this._numberFormat;
    } // Init return value


    var formatted; // Cast to number just in case
    // TODO: maybe use better casting

    var source = Number(value); // Is it a built-in format or Intl.NumberFormatOptions

    if (_utils_Type__WEBPACK_IMPORTED_MODULE_7__.isObject(format)) {
      try {
        if (this.intlLocales) {
          return new Intl.NumberFormat(this.intlLocales, format).format(source);
        } else {
          return new Intl.NumberFormat(undefined, format).format(source);
        }
      } catch (e) {
        return "Invalid";
      }
    } else {
      // Clean format
      format = _utils_Utils__WEBPACK_IMPORTED_MODULE_6__.cleanFormat(format); // Get format info (it will also deal with parser caching)

      var info = this.parseFormat(format, this.language); // format and replace the number

      var details = void 0;

      if (source > this._negativeBase) {
        details = info.positive;
      } else if (source < this._negativeBase) {
        details = info.negative;
      } else {
        details = info.zero;
      } // Adjust precision


      if (_utils_Type__WEBPACK_IMPORTED_MODULE_7__.hasValue(precision) && !details.mod) {
        details = _utils_Object__WEBPACK_IMPORTED_MODULE_5__.clone(details);
        details.decimals.active = source == 0 ? 0 : precision;
      } // Format


      formatted = details.template.split(_utils_Strings__WEBPACK_IMPORTED_MODULE_4__.PLACEHOLDER).join(this.applyFormat(source, details));
    }

    if (this.forceLTR) {
      formatted = "‎" + formatted;
    }

    return formatted;
  };
  /**
   * Parses supplied format into structured object which can be used to format
   * the number.
   *
   * @param format Format string, i.e. "#,###.00"
   * @param language Language
   */


  NumberFormatter.prototype.parseFormat = function (format, language) {
    var _this = this; // Check cache


    var cached = this.getCache(format);

    if (_utils_Type__WEBPACK_IMPORTED_MODULE_7__.hasValue(cached)) {
      return cached;
    } // init format parse info holder


    var info = {
      "positive": {
        "thousands": {
          "active": -1,
          "passive": -1,
          "interval": -1,
          "separator": language.translateEmpty("_thousandSeparator")
        },
        "decimals": {
          "active": -1,
          "passive": -1,
          "separator": language.translateEmpty("_decimalSeparator")
        },
        "template": "",
        "source": "",
        "parsed": false
      },
      "negative": {
        "thousands": {
          "active": -1,
          "passive": -1,
          "interval": -1,
          "separator": language.translateEmpty("_thousandSeparator")
        },
        "decimals": {
          "active": -1,
          "passive": -1,
          "separator": language.translateEmpty("_decimalSeparator")
        },
        "template": "",
        "source": "",
        "parsed": false
      },
      "zero": {
        "thousands": {
          "active": -1,
          "passive": -1,
          "interval": -1,
          "separator": language.translateEmpty("_thousandSeparator")
        },
        "decimals": {
          "active": -1,
          "passive": -1,
          "separator": language.translateEmpty("_decimalSeparator")
        },
        "template": "",
        "source": "",
        "parsed": false
      }
    }; // Escape double vertical bars (that mean display one vertical bar)

    format = format.replace("||", _utils_Strings__WEBPACK_IMPORTED_MODULE_4__.PLACEHOLDER2); // Split it up and deal with different formats

    var parts = format.split("|");
    info.positive.source = parts[0];

    if (typeof parts[2] === "undefined") {
      info.zero = info.positive;
    } else {
      info.zero.source = parts[2];
    }

    if (typeof parts[1] === "undefined") {
      info.negative = info.positive;
    } else {
      info.negative.source = parts[1];
    } // Parse each


    _utils_Object__WEBPACK_IMPORTED_MODULE_5__.each(info, function (part, item) {
      // Already parsed
      if (item.parsed) {
        return;
      } // Check cached


      if (typeof _this.getCache(item.source) !== "undefined") {
        info[part] = _this.getCache(item.source);
        return;
      } // Begin parsing


      var partFormat = item.source; // Just "Number"?

      if (partFormat.toLowerCase() === "number") {
        partFormat = _utils_Type__WEBPACK_IMPORTED_MODULE_7__.isString(_this._numberFormat) ? _this._numberFormat : "#,###.#####";
      } // Let TextFormatter split into chunks


      var chunks = (0,_formatters_TextFormatter__WEBPACK_IMPORTED_MODULE_2__.getTextFormatter)().chunk(partFormat, true);

      for (var i = 0; i < chunks.length; i++) {
        var chunk = chunks[i]; // replace back double vertical bar

        chunk.text = chunk.text.replace(_utils_Strings__WEBPACK_IMPORTED_MODULE_4__.PLACEHOLDER2, "|");

        if (chunk.type === "value") {
          // Parse format
          // Look for codes
          var matches = chunk.text.match(/[#0.,]+[ ]?[abespABESP%!]?[abespABESP‰!]?/);

          if (matches) {
            if (matches === null || matches[0] === "") {
              // no codes here - assume string
              // nothing to do here
              item.template += chunk.text;
            } else {
              // look for the format modifiers at the end
              var mods = matches[0].match(/[abespABESP%‰!]{2}|[abespABESP%‰]{1}$/);

              if (mods) {
                item.mod = mods[0].toLowerCase();
                item.modSpacing = matches[0].match(/[ ]{1}[abespABESP%‰!]{1}$/) ? true : false;
              } // break the format up


              var a = matches[0].split("."); // Deal with thousands

              if (a[0] === "") {// No directives for thousands
                // Leave default settings (no formatting)
              } else {
                // Counts
                item.thousands.active = (a[0].match(/0/g) || []).length;
                item.thousands.passive = (a[0].match(/\#/g) || []).length + item.thousands.active; // Separator interval

                var b = a[0].split(",");

                if (b.length === 1) {// No thousands separators
                  // Do nothing
                } else {
                  // Use length fo the last chunk as thousands length
                  item.thousands.interval = _utils_Type__WEBPACK_IMPORTED_MODULE_7__.getValue(b.pop()).length;

                  if (item.thousands.interval === 0) {
                    item.thousands.interval = -1;
                  }
                }
              } // Deal with decimals


              if (typeof a[1] === "undefined") {// No directives for decimals
                // Leave at defaults (no formatting)
              } else {
                // Counts
                item.decimals.active = (a[1].match(/0/g) || []).length;
                item.decimals.passive = (a[1].match(/\#/g) || []).length + item.decimals.active;
              } // Add special code to template


              item.template += chunk.text.split(matches[0]).join(_utils_Strings__WEBPACK_IMPORTED_MODULE_4__.PLACEHOLDER);
            }
          }
        } else {
          // Quoted string - take it as it is
          item.template += chunk.text;
        }
      } // Apply style formatting
      //item.template = getTextFormatter().format(item.template, this.outputFormat);
      // Save cache


      _this.setCache(item.source, item); // Mark this as parsed


      item.parsed = true;
    }); // Save cache (the whole thing)

    this.setCache(format, info);
    return info;
  };
  /**
   * Applies parsed format to a numeric value.
   *
   * @param value    Value
   * @param details  Parsed format as returned by parseFormat()
   * @return Formatted number
   */


  NumberFormatter.prototype.applyFormat = function (value, details) {
    // Use absolute values
    var negative = value < 0;
    value = Math.abs(value); // Recalculate according to modifier

    var prefix = "",
        suffix = "";
    var mods = details.mod ? details.mod.split("") : [];

    if (mods.indexOf("b") !== -1) {
      var a_1 = this.applyPrefix(value, this.bytePrefixes, mods.indexOf("!") !== -1);
      value = a_1[0];
      prefix = a_1[1];
      suffix = a_1[2];

      if (details.modSpacing) {
        suffix = " " + suffix;
      }
    } else if (mods.indexOf("a") !== -1) {
      var a_2 = this.applyPrefix(value, value < this.smallNumberThreshold ? this.smallNumberPrefixes : this.bigNumberPrefixes, mods.indexOf("!") !== -1);
      value = a_2[0];
      prefix = a_2[1];
      suffix = a_2[2];

      if (details.modSpacing) {
        suffix = " " + suffix;
      }
    } else if (mods.indexOf("p") !== -1) {
      var ol = Math.min(value.toString().length + 2, 21); //value *= 100;

      value = parseFloat(value.toPrecision(ol));
      prefix = this.language.translate("_percentPrefix") || "";
      suffix = this.language.translate("_percentSuffix") || "";

      if (prefix == "" && suffix == "") {
        suffix = "%";
      }
    } else if (mods.indexOf("%") !== -1) {
      var ol = _utils_Math__WEBPACK_IMPORTED_MODULE_8__.min(value.toString().length + 2, 21);
      value *= 100;
      value = parseFloat(value.toPrecision(ol));
      suffix = "%";
    } else if (mods.indexOf("‰") !== -1) {
      var ol = _utils_Math__WEBPACK_IMPORTED_MODULE_8__.min(value.toString().length + 3, 21);
      value *= 1000;
      value = parseFloat(value.toPrecision(ol));
      suffix = "‰";
    } // Round to passive


    if (mods.indexOf("e") !== -1) {
      // convert the value to exponential
      var exp = void 0;

      if (details.decimals.passive >= 0) {
        exp = value.toExponential(details.decimals.passive).split("e");
      } else {
        exp = value.toExponential().split("e");
      }

      value = Number(exp[0]);
      suffix = "e" + exp[1];

      if (details.modSpacing) {
        suffix = " " + suffix;
      }
    } else if (details.decimals.passive === 0) {
      value = Math.round(value);
    } else if (details.decimals.passive > 0) {
      var d = Math.pow(10, details.decimals.passive);
      value = Math.round(value * d) / d;
    } // Init return value


    var res = ""; // Calc integer and decimal parts

    var a = _utils_Utils__WEBPACK_IMPORTED_MODULE_6__.numberToString(value).split("."); // Format integers

    var ints = a[0]; // Pad integers to active length

    if (ints.length < details.thousands.active) {
      ints = Array(details.thousands.active - ints.length + 1).join("0") + ints;
    } // Insert thousands separators


    if (details.thousands.interval > 0) {
      var ip = [];
      var intsr = ints.split("").reverse().join("");

      for (var i = 0, len = ints.length; i <= len; i += details.thousands.interval) {
        var c = intsr.substr(i, details.thousands.interval).split("").reverse().join("");

        if (c !== "") {
          ip.unshift(c);
        }
      }

      ints = ip.join(details.thousands.separator);
    } // Add integers


    res += ints; // Add decimals

    if (a.length === 1) {
      a.push("");
    }

    var decs = a[1]; // Fill zeros?

    if (decs.length < details.decimals.active) {
      decs += Array(details.decimals.active - decs.length + 1).join("0");
    }

    if (decs !== "") {
      res += details.decimals.separator + decs;
    } // Can't have empty return value


    if (res === "") {
      res = "0";
    } // Add minus sign back


    if (value !== 0 && negative && mods.indexOf("s") === -1) {
      res = "-" + res;
    } // Add suffixes/prefixes


    if (prefix) {
      res = prefix + res;
    }

    if (suffix) {
      res += suffix;
    }

    return res;
  };
  /**
   * Chooses appropriate prefix and suffix based on the passed in rules.
   *
   * @param  value     Value
   * @param  prefixes  Prefix array
   * @param  force     Force application of a first prefix (@sice 4.5.4)
   * @return Result
   */


  NumberFormatter.prototype.applyPrefix = function (value, prefixes, force) {
    if (force === void 0) {
      force = false;
    }

    var newvalue = value;
    var prefix = "";
    var suffix = "";
    var applied = false;
    var k = 1;

    for (var i = 0, len = prefixes.length; i < len; i++) {
      if (prefixes[i].number <= value) {
        if (prefixes[i].number === 0) {
          newvalue = 0;
        } else {
          newvalue = value / prefixes[i].number;
          k = prefixes[i].number;
        }

        prefix = prefixes[i].prefix;
        suffix = prefixes[i].suffix;
        applied = true;
      }
    }

    if (!applied && force && prefixes.length && value != 0) {
      // Prefix was not applied. Use the first prefix.
      newvalue = value / prefixes[0].number;
      prefix = prefixes[0].prefix;
      suffix = prefixes[0].suffix;
      applied = true;
    }

    if (applied) {
      newvalue = parseFloat(newvalue.toPrecision(_utils_Math__WEBPACK_IMPORTED_MODULE_8__.min(k.toString().length + Math.floor(newvalue).toString().replace(/[^0-9]*/g, "").length, 21)));
    }

    return [newvalue, prefix, suffix];
  };
  /**
   * Invalidates the parent [[Sprite]] object.
   */


  NumberFormatter.prototype.invalidateSprite = function () {
    if (this.sprite) {
      this.sprite.invalidate();
    }
  };

  Object.defineProperty(NumberFormatter.prototype, "numberFormat", {
    /**
     * @return A format to use for number formatting
     */
    get: function get() {
      return this._numberFormat;
    },

    /**
     * Number format.
     *
     * @default "#,###.#####"
     * @see {@link https://www.amcharts.com/docs/v4/concepts/formatters/formatting-numbers/} Tutorial on number formatting
     * @param format  A format to use for number formatting
     */
    set: function set(format) {
      this._numberFormat = format;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(NumberFormatter.prototype, "intlLocales", {
    /**
     * @return Date format
     */
    get: function get() {
      return this._intlLocales;
    },

    /**
     * Locales if you are using date formats in `Intl.NumberFormatOptions` syntax.
     *
     * @see (@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NumberFormat) about using Intl for number formatting
     * @param value Locales
     */
    set: function set(value) {
      this._intlLocales = value;
      this.invalidateSprite();
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(NumberFormatter.prototype, "negativeBase", {
    /**
     * @return A format to use for number formatting
     */
    get: function get() {
      return this._negativeBase;
    },

    /**
     * Negative base for negative numbers.
     *
     * @default 0
     * @see {@link https://www.amcharts.com/docs/v4/concepts/formatters/formatting-numbers/} Tutorial on number formatting
     * @param format  A format to use for number formatting
     */
    set: function set(value) {
      this._negativeBase = value;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(NumberFormatter.prototype, "bigNumberPrefixes", {
    /**
     * @return Prefixes for big numbers
     */
    get: function get() {
      if (!_utils_Type__WEBPACK_IMPORTED_MODULE_7__.hasValue(this._bigNumberPrefixes)) {
        this._bigNumberPrefixes = [{
          "number": 1e+3,
          "suffix": this.language.translate("_big_number_suffix_3")
        }, {
          "number": 1e+6,
          "suffix": this.language.translate("_big_number_suffix_6")
        }, {
          "number": 1e+9,
          "suffix": this.language.translate("_big_number_suffix_9")
        }, {
          "number": 1e+12,
          "suffix": this.language.translate("_big_number_suffix_12")
        }, {
          "number": 1e+15,
          "suffix": this.language.translate("_big_number_suffix_15")
        }, {
          "number": 1e+18,
          "suffix": this.language.translate("_big_number_suffix_18")
        }, {
          "number": 1e+21,
          "suffix": this.language.translate("_big_number_suffix_21")
        }, {
          "number": 1e+24,
          "suffix": this.language.translate("_big_number_suffix_24")
        }];
      }

      return this._bigNumberPrefixes;
    },

    /**
     * Prefixes for big numbers.
     *
     * It's an array of objects of number/prefix pairs.
     *
     * ```JSON
     * [
     *   { "number": 1e+3, "suffix": "K" },
     *   { "number": 1e+6, "suffix": "M" },
     *   { "number": 1e+9, "suffix": "G" },
     *   { "number": 1e+12, "suffix": "T" },
     *   { "number": 1e+15, "suffix": "P" },
     *   { "number": 1e+18, "suffix": "E" },
     *   { "number": 1e+21, "suffix": "Z" },
     *   { "number": 1e+24, "suffix": "Y" }
     * ]
     * ```
     *
     * If the number is bigger than the `number` ir will be converted to the
     * appropriate bigger number with prefix.
     *
     * E.g. as per above `1500` will be converted to `1.5K`.
     *
     * Please note that for this transformation to be enabled, you need to
     * enable it specific modifier in your format setting.
     *
     * The modifier for big/small number modification is "a":
     *
     * ```Text
     * {myfield.formatNumber("#,###.00a")}
     * ```
     *
     * @see {@link https://www.amcharts.com/docs/v4/concepts/formatters/formatting-numbers/} Tutorial on number formatting
     * @param prefixes  Prefixes for big numbers
     */
    set: function set(prefixes) {
      this._bigNumberPrefixes = prefixes;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(NumberFormatter.prototype, "smallNumberPrefixes", {
    /**
     * @return Prefixes for small numbers
     */
    get: function get() {
      if (!_utils_Type__WEBPACK_IMPORTED_MODULE_7__.hasValue(this._smallNumberPrefixes)) {
        this._smallNumberPrefixes = [{
          "number": 1e-24,
          "suffix": this.language.translate("_small_number_suffix_24")
        }, {
          "number": 1e-21,
          "suffix": this.language.translate("_small_number_suffix_21")
        }, {
          "number": 1e-18,
          "suffix": this.language.translate("_small_number_suffix_18")
        }, {
          "number": 1e-15,
          "suffix": this.language.translate("_small_number_suffix_15")
        }, {
          "number": 1e-12,
          "suffix": this.language.translate("_small_number_suffix_12")
        }, {
          "number": 1e-9,
          "suffix": this.language.translate("_small_number_suffix_9")
        }, {
          "number": 1e-6,
          "suffix": this.language.translate("_small_number_suffix_6")
        }, {
          "number": 1e-3,
          "suffix": this.language.translate("_small_number_suffix_3")
        }];
      }

      return this._smallNumberPrefixes;
    },

    /**
     * Prefixes for big numbers.
     *
     * It's an array of objects of number/prefix pairs.
     *
     * ```JSON
     * [
     *   { "number": 1e-24, "suffix": "y" },
     *   { "number": 1e-21, "suffix": "z" },
     *   { "number": 1e-18, "suffix": "a" },
     *   { "number": 1e-15, "suffix": "f" },
     *   { "number": 1e-12, "suffix": "p" },
     *   { "number": 1e-9, "suffix": "n" },
     *   { "number": 1e-6, "suffix": "μ" },
     *   { "number": 1e-3, "suffix": "m" }
     * ]
     * ```
     *
     * If the number is smaller than the `number` ir will be converted to the
     * appropriate smaller number with prefix.
     *
     * E.g. as per above `0.0015` will be converted to `1.5m`.
     *
     * Please note that for this transformation to be enabled, you need to
     * enable it specific modifier in your format setting.
     *
     * The modifier for big/small number modification is "a":
     *
     * ```Text
     * {myfield.formatNumber("#,###.00a")}
     * ```
     *
     * IMPORTANT: The order of the suffixes is important. The list must start
     * from the smallest number and work towards bigger ones.
     *
     * @see {@link https://www.amcharts.com/docs/v4/concepts/formatters/formatting-numbers/} Tutorial on number formatting
     * @param prefixes  Prefixes for small numbers
     */
    set: function set(prefixes) {
      this._smallNumberPrefixes = prefixes;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(NumberFormatter.prototype, "smallNumberThreshold", {
    /**
     * @return Small number threshold
     */
    get: function get() {
      return this._smallNumberThreshold;
    },

    /**
     * Any number smaller than this will be considered "small" number, which will
     * trigger special formatting if "a" format modifier is used.
     *
     * @since 4.6.8
     * @param  value  Small number threshold
     */
    set: function set(value) {
      this._smallNumberThreshold = value;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(NumberFormatter.prototype, "bytePrefixes", {
    /**
     * @return Prefixes for byte-size formatting
     */
    get: function get() {
      if (!_utils_Type__WEBPACK_IMPORTED_MODULE_7__.hasValue(this._bytePrefixes)) {
        this._bytePrefixes = [{
          "number": 1,
          suffix: this.language.translate("_byte_suffix_B")
        }, {
          "number": 1024,
          suffix: this.language.translate("_byte_suffix_KB")
        }, {
          "number": 1048576,
          suffix: this.language.translate("_byte_suffix_MB")
        }, {
          "number": 1073741824,
          suffix: this.language.translate("_byte_suffix_GB")
        }, {
          "number": 1099511627776,
          suffix: this.language.translate("_byte_suffix_TB")
        }, {
          "number": 1125899906842624,
          suffix: this.language.translate("_byte_suffix_PB")
        }];
      }

      return this._bytePrefixes;
    },

    /**
     * Basically the same as `bigNumberPrefixes`, except base for calculation
     * is not thousand but byte (1024).
     *
     * The modifier is "b".
     *
     *  ```Text
     * {myfield.formatNumber("#,###.00b")}
     * ```
     *
     * The above `2048` will change to `2K`.
     *
     * @see {@link https://www.amcharts.com/docs/v4/concepts/formatters/formatting-numbers/} Tutorial on number formatting
     * @param prefixes  Prefixes for byte-size formatting
     */
    set: function set(prefixes) {
      this._bytePrefixes = prefixes;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(NumberFormatter.prototype, "outputFormat", {
    /**
     * @ignore Exclude from docs
     * @return Output format
     */
    get: function get() {
      return this._outputFormat;
    },

    /**
     * Ooutput format: "svg" or "html".
     *
     * @ignore Exclude from docs
     * @param value  Output format
     */
    set: function set(outputFormat) {
      this._outputFormat = outputFormat.toLowerCase();
      this.invalidateSprite();
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(NumberFormatter.prototype, "forceLTR", {
    get: function get() {
      return this._forceLTR;
    },
    set: function set(value) {
      this._forceLTR = value;
      this.invalidateSprite();
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Replaces brackets with temporary placeholders.
   *
   * @ignore Exclude from docs
   * @param text  Input text
   * @return Escaped text
   */

  NumberFormatter.prototype.escape = function (text) {
    return text.replace("||", _utils_Strings__WEBPACK_IMPORTED_MODULE_4__.PLACEHOLDER2);
  };
  /**
   * Replaces placeholders back to brackets.
   *
   * @ignore Exclude from docs
   * @param text  Escaped text
   * @return Unescaped text
   */


  NumberFormatter.prototype.unescape = function (text) {
    return text.replace(_utils_Strings__WEBPACK_IMPORTED_MODULE_4__.PLACEHOLDER2, "|");
  };

  return NumberFormatter;
}(_Base__WEBPACK_IMPORTED_MODULE_1__.BaseObject);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_Registry__WEBPACK_IMPORTED_MODULE_3__.registry.registeredClasses.NumberFormatter = NumberFormatter;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/formatters/TextFormatter.js":
/*!*************************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/formatters/TextFormatter.js ***!
  \*************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "TextFormatter": () => (/* binding */ TextFormatter),
/* harmony export */   "getTextFormatter": () => (/* binding */ getTextFormatter)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Base */ "./node_modules/@amcharts/amcharts4/.internal/core/Base.js");
/* harmony import */ var _rendering_AMElement__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../rendering/AMElement */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/AMElement.js");
/* harmony import */ var _utils_Adapter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/Adapter */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Adapter.js");
/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _utils_Strings__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/Strings */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Strings.js");
/* harmony import */ var _utils_Type__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/**
 * Handles formatting of pseudo-markup in text.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */







/**
 * Handles formatting of pseudo-markdown in text.
 *
 * @todo Encode < > in output
 * @todo Add more adapters
 * @important
 */

var TextFormatter =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_6__.__extends)(TextFormatter, _super);
  /**
   * Constructor
   */


  function TextFormatter() {
    var _this = _super.call(this) || this;
    /**
     * Adapter.
     */


    _this.adapter = new _utils_Adapter__WEBPACK_IMPORTED_MODULE_2__.Adapter(_this);
    _this.className = "TextFormatter";

    _this.applyTheme();

    return _this;
  }

  TextFormatter.prototype.debug = function () {};
  /**
   * Formats the text according to specifications passed in.
   *
   * @param text    Text to format
   * @param output  Output format (svg, html)
   * @return Formatted text
   */


  TextFormatter.prototype.format = function (text, output) {
    // Apply default
    if (!_utils_Type__WEBPACK_IMPORTED_MODULE_5__.hasValue(output)) {
      output = "svg";
    } // Init return value


    var formatted = ""; // Replace double (escaped) square spaces with remporary codes

    text = this.escape(text); // Divvy up the string by style tags

    var styles = text.match(/\[([^\]]*?)\]/gm);

    if (!styles) {
      // Nothing to do here - no formatting elements
      return this.wrap(text, "", output);
    } // Get pure text - no style tags


    var texts = text.split(/\[[^\[\]]*\]/); // Go through each of the texts and wrap it in style tags

    for (var i = 0, len = texts.length; i < len; i++) {
      // Get text bit
      var t = texts[i]; // Check if string is empty

      if (t === "") {
        continue;
      } // Run through an adapter


      t = this.adapter.apply("chunk", t); // Get related style

      var s = "";

      if (i > 0) {
        s = styles[i - 1].replace('[', '').replace(']', '');
      } // Wrap text in tag


      formatted += this.wrap(t, s, output);
    } // Replace placeholders back


    formatted = this.unescape(formatted); // Return result

    return this.cleanUp(formatted);
  };
  /**
   * Replaces brackets with temporary placeholders.
   *
   * @ignore Exclude from docs
   * @param text  Input text
   * @return Escaped text
   */


  TextFormatter.prototype.escape = function (text) {
    return text.replace(/\[\[/g, _Registry__WEBPACK_IMPORTED_MODULE_3__.registry.getPlaceholder("1")).replace(/([^\/\]]{1})\]\]/g, "$1" + _Registry__WEBPACK_IMPORTED_MODULE_3__.registry.getPlaceholder("2")).replace(/\]\]/g, _Registry__WEBPACK_IMPORTED_MODULE_3__.registry.getPlaceholder("2")).replace(/\{\{/g, _Registry__WEBPACK_IMPORTED_MODULE_3__.registry.getPlaceholder("3")).replace(/\}\}/g, _Registry__WEBPACK_IMPORTED_MODULE_3__.registry.getPlaceholder("4")).replace(/\'\'/g, _Registry__WEBPACK_IMPORTED_MODULE_3__.registry.getPlaceholder("5"));
  };
  /**
   * Replaces placeholders back to brackets.
   *
   * @ignore Exclude from docs
   * @param text  Escaped text
   * @return Unescaped text
   */


  TextFormatter.prototype.unescape = function (text) {
    return text.replace(new RegExp(_Registry__WEBPACK_IMPORTED_MODULE_3__.registry.getPlaceholder("1"), "g"), "[[").replace(new RegExp(_Registry__WEBPACK_IMPORTED_MODULE_3__.registry.getPlaceholder("2"), "g"), "]]").replace(new RegExp(_Registry__WEBPACK_IMPORTED_MODULE_3__.registry.getPlaceholder("3"), "g"), "{{").replace(new RegExp(_Registry__WEBPACK_IMPORTED_MODULE_3__.registry.getPlaceholder("4"), "g"), "}}").replace(new RegExp(_Registry__WEBPACK_IMPORTED_MODULE_3__.registry.getPlaceholder("5"), "g"), "''");
  };
  /**
   * Cleans up the text text for leftover double square brackets.
   *
   * @ignore Exclude from docs
   * @param text  Input text
   * @return Cleaned up text
   */


  TextFormatter.prototype.cleanUp = function (text) {
    return text.replace(/\[\[/g, "[").replace(/\]\]/g, "]").replace(/\{\{/g, "{").replace(/\}\}/g, "}").replace(/\'\'/g, "'");
  };
  /**
   * Wraps text into corresponding tags.
   *
   * @ignore Exclude from docs
   * @param text   Text to wrap
   * @param style  Styles
   * @param output  Format to output in (svg, html)
   * @return Formatted string
   */


  TextFormatter.prototype.wrap = function (text, style, output) {
    if (style === "" || style === "/") {
      //return text;
      style = "";
    }

    switch (output) {
      case "html":
        return this.wrapHtml(text, this.translateStyleShortcuts(style));

      default:
        return this.wrapSvg(text, this.translateStyleShortcuts(style));
    }
  };
  /**
   * Wraps text in styled SVG tag.
   *
   * @ignore Exclude from docs
   * @param text   Text to wrap
   * @param style  Style property
   * @return Formatted tag
   */


  TextFormatter.prototype.wrapSvg = function (text, style) {
    if (style === "") {
      return "<tspan>" + text + "</tspan>";
    } else {
      return "<tspan style='" + style + "'>" + text + "</tspan>";
    }
  };
  /**
   * Returns an SVG `<tspan>` element.
   *
   * @ignore Exclude from docs
   * @param text   Text
   * @param style  Style
   * @return Element
   */


  TextFormatter.prototype.getSvgElement = function (text, style) {
    var element = new _rendering_AMElement__WEBPACK_IMPORTED_MODULE_1__.AMElement("tspan");
    element.textContent = text;

    if (style) {
      element.node.setAttribute("style", style);
    }

    return element;
  };
  /**
   * Wraps text in HTML <span> tag.
   *
   * @ignore Exclude from docs
   * @param text   Text to wrap
   * @param style  Style property
   * @return Formatted tag
   * @todo Translate SVG styles into HTML ones
   */


  TextFormatter.prototype.wrapHtml = function (text, style) {
    if (style === "") {
      return "<span>" + text + "</span>";
    } else {
      return "<span style='" + this.styleSvgToHtml(style) + "'>" + text + "</span>";
    }
  };
  /**
   * Returns an HTML `<span>` element.
   *
   * @ignore Exclude from docs
   * @param text   Text/HTML
   * @param style  Style definition
   * @return HTML element
   */


  TextFormatter.prototype.getHtmlElement = function (text, style) {
    var element = document.createElement("span");
    element.innerHTML = text;

    if (style) {
      element.setAttribute("style", style);
    }

    return element;
  };
  /**
   * Trabslates SVG CSS into HTML CSS.
   *
   * @ignore Exclude from docs
   * @param style  SVG CSS
   * @return HTML CSS
   * @todo Implement actual translation
   */


  TextFormatter.prototype.styleSvgToHtml = function (style) {
    style = style.replace(/fill:/, "color:");
    return style;
  };
  /**
   * Translates style shortcuts into full styles, i.e.:
   * "bold" => "font-weight: bold"
   * "#f00" => "fill: #f00"
   *
   * @ignore Exclude from docs
   * @param style  Untranslated style
   * @return Translated style
   * @todo Implement actual translation
   */


  TextFormatter.prototype.translateStyleShortcuts = function (style) {
    if (style == "" || style == "[ ]") {
      return "";
    }

    var cached = _Registry__WEBPACK_IMPORTED_MODULE_3__.registry.getCache("translateStyleShortcuts_" + style);

    if (cached) {
      return cached;
    } // Pre-process quoted text


    var q = style.match(/('[^']*')|("[^"]*")/gi);

    if (q) {
      for (var i = 0; i < q.length; i++) {
        style = style.replace(q[i], q[i].replace(/['"]*/g, "").replace(/[ ]+/g, "+"));
      }
    } // Get style parts


    var b = style.match(/([\w\-]*:[\s]?[^;\s\]]*)|(\#[\w]{1,6})|([\w]+)|(\/)/gi); // Empty?

    if (!b) {
      return style;
    } // Check each part


    for (var i = 0; i < b.length; i++) {
      if (b[i].match(/^bold$/i)) {
        // Bold
        b[i] = "font-weight:" + b[i];
      } else if (b[i] == "/") {
        // Just closing tag
        // Do nothing
        b[i] = "";
      } else if (!b[i].match(/:/)) {
        // Color
        b[i] = "fill:" + b[i];
      } else {
        b[i] = b[i].replace(/\+/g, " ");
      }
    }

    var res = b.join(';');
    _Registry__WEBPACK_IMPORTED_MODULE_3__.registry.setCache("translateStyleShortcuts_" + style, res);
    return res;
  };
  /**
   * Splits string into chunks. (style blocks, quoted blocks, regular blocks)
   *
   * If the second parameter `quotedBlocks` is set to `true` this method will
   * also single out text blocks enclosed within single quotes that no
   * formatting should be applied to, and they should be displayed as is.
   *
   * Default for the above is `false`, so that you can use single quote in text
   * without escaping it.
   *
   * If enabled, single quotes can be escaped by doubling it - adding two
   * single quotes, which will be replaced by a one single quote in the final
   * output.
   *
   * @ignore Exclude from docs
   * @param text          Text to chunk
   * @param quotedBlocks  Use quoted blocks
   * @param noFormatting  Formatting blocks will be treated as regular text
   * @return Array of string chunks
   */


  TextFormatter.prototype.chunk = function (text, quotedBlocks, noFormatting) {
    if (quotedBlocks === void 0) {
      quotedBlocks = false;
    }

    if (noFormatting === void 0) {
      noFormatting = false;
    } // Init result


    var res = []; // Replace double (escaped) square spaces and quotes with temporary codes

    text = this.escape(text); // Deal with style blocks

    var chunks = quotedBlocks ? text.split("'") : [text];

    for (var i = 0; i < chunks.length; i++) {
      var chunk = chunks[i]; // Empty?

      if (chunk === "") {
        continue;
      }

      if (i % 2 === 0) {
        // Text outside quotes
        // Parse for style blocks which are "text" chunks, the rest chunks are
        // "value"
        chunk = chunk.replace(/\]\[/g, "]" + _utils_Strings__WEBPACK_IMPORTED_MODULE_4__.PLACEHOLDER + "[");
        chunk = chunk.replace(/\[\]/g, "[ ]");
        var chunks2 = chunk.split(/[\[\]]+/);

        for (var i2 = 0; i2 < chunks2.length; i2++) {
          var chunk2 = this.cleanUp(this.unescape(chunks2[i2])); // Placeholder?

          if (chunk2 === _utils_Strings__WEBPACK_IMPORTED_MODULE_4__.PLACEHOLDER) {
            continue;
          } // Empty?


          if (chunk2 === "") {
            continue;
          } // Block or value


          if (i2 % 2 === 0) {
            res.push({
              "type": "value",
              "text": this.adapter.apply("chunk", chunk2)
            });
          } else {
            res.push({
              "type": noFormatting ? "value" : "format",
              "text": "[" + chunk2 + "]"
            });
          }
        }
      } else {
        // A text within doublequotes
        // All chunks are "text"
        var chunks2 = chunk.split(/[\[\]]+/);

        for (var i2 = 0; i2 < chunks2.length; i2++) {
          var chunk2 = this.cleanUp(this.unescape(chunks2[i2])); // Empty?

          if (chunk2 === "") {
            continue;
          } // Block or text


          if (i2 % 2 === 0) {
            res.push({
              "type": "text",
              "text": chunk2
            });
          } else if (this.isImage(chunk2)) {
            res.push({
              "type": "image",
              "text": "[" + chunk2 + "]"
            });
          } else {
            res.push({
              "type": "format",
              "text": "[" + chunk2 + "]"
            });
          }
        }
      }
    }

    return res;
  };
  /**
   * Checks if supplied format contains image information and should be
   * formatted as such.
   * I.e.: `[img: myImage.png]`
   *
   * @ignore Exclude from docs
   * @param text  Format
   * @return `true` if it is an image
   */


  TextFormatter.prototype.isImage = function (text) {
    return text.match(/img[ ]?:/) ? true : false;
  };

  return TextFormatter;
}(_Base__WEBPACK_IMPORTED_MODULE_0__.BaseObject);


var formatter;
/**
 * Returns the global instance of [[TextFormatter]].
 *
 * All classes and instances should reuse this universal text formatter,
 * rather than create their own instance of it.
 */

function getTextFormatter() {
  if (formatter == null) {
    formatter = new TextFormatter();
  }

  return formatter;
}
/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_Registry__WEBPACK_IMPORTED_MODULE_3__.registry.registeredClasses.TextFormatter = TextFormatter;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/interaction/Inertia.js":
/*!********************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/interaction/Inertia.js ***!
  \********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Inertia": () => (/* binding */ Inertia)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Base */ "./node_modules/@amcharts/amcharts4/.internal/core/Base.js");
/* harmony import */ var _Interaction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Interaction */ "./node_modules/@amcharts/amcharts4/.internal/core/interaction/Interaction.js");
/* harmony import */ var _utils_Animation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/Animation */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Animation.js");
/* harmony import */ var _utils_Type__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/**
 * Functionality related to inertia
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */





/**
 * A point of inertia is to simulate gradually drecreasing motion even after
 * actual interaction by user, that caused it, has already ended.
 *
 * [[Inertia]] object will continue triggering the same [[Sprite]] handlers
 * as if the interaction was still happening, gradually reducing
 * shift/angle/scale values until full stop.
 *
 * Basically, from the target element's point of view, while inertia is
 * playing, it is still being interacted with by user, albeit with a
 * decreasing speed.
 */

var Inertia =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_4__.__extends)(Inertia, _super);
  /**
   * Constructor
   */


  function Inertia(interaction, type, point, startPoint) {
    var _this = // Init
    _super.call(this) || this;
    /**
     * List of animations currently playing.
     */


    _this.animations = [];
    _this.className = "Inertia";
    _this.interaction = interaction;
    _this.type = type;
    _this.point = point;
    _this.startPoint = startPoint; // Make animations disposable

    _this._disposers.push(new _utils_Animation__WEBPACK_IMPORTED_MODULE_2__.AnimationDisposer(_this.animations));

    return _this;
  }

  Object.defineProperty(Inertia.prototype, "x", {
    /**
     * Returns current X coordinate.
     *
     * @return X
     */
    get: function get() {
      return this.point.x;
    },

    /**
     * Sets current X coordinate.
     *
     * Will trigger "drag" event for the target element.
     *
     * @param value X
     */
    set: function set(value) {
      if (_utils_Type__WEBPACK_IMPORTED_MODULE_3__.isNumber(value)) {
        this.point.x = value;
        this.handleMove();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Inertia.prototype, "y", {
    /**
     * Returns current Y coordinate.
     *
     * @return Y
     */
    get: function get() {
      return this.point.y;
    },

    /**
     * Sets current Y coordinate.
     *
     * Will trigger "drag" event for the target element.
     *
     * @param value Y
     */
    set: function set(value) {
      if (_utils_Type__WEBPACK_IMPORTED_MODULE_3__.isNumber(value)) {
        this.point.y = value;
        this.handleMove();
      }
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Simulates dragging of element.
   */

  Inertia.prototype.handleMove = function () {
    // Prepare {InteractionEvent} object
    if (this.interaction.events.isEnabled("drag")) {
      var imev = {
        type: "drag",
        target: this.interaction,
        shift: {
          x: this.x - this.startPoint.x,
          y: this.y - this.startPoint.y
        },
        startPoint: this.startPoint,
        point: {
          x: this.x,
          y: this.y
        },
        touch: false
      }; // Call handler

      this.interaction.events.dispatchImmediately("drag", imev);
    }
  };
  /**
   * Finishes up the inertia animation. (removes reference to this animation
   * object)
   */


  Inertia.prototype.done = function () {
    // Remove inertia animation from the object
    this.interaction.inertias.removeKey(this.type); // Move ended

    if (this.type === "move") {
      (0,_Interaction__WEBPACK_IMPORTED_MODULE_1__.getInteraction)().processDragStop(this.interaction);
    } // Destroy


    this.dispose();
  };

  return Inertia;
}(_Base__WEBPACK_IMPORTED_MODULE_0__.BaseObject);



/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/interaction/Interaction.js":
/*!************************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/interaction/Interaction.js ***!
  \************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Interaction": () => (/* binding */ Interaction),
/* harmony export */   "getInteraction": () => (/* binding */ getInteraction)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Base */ "./node_modules/@amcharts/amcharts4/.internal/core/Base.js");
/* harmony import */ var _utils_List__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/List */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/List.js");
/* harmony import */ var _utils_Animation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/Animation */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Animation.js");
/* harmony import */ var _utils_Disposer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/Disposer */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Disposer.js");
/* harmony import */ var _InteractionObject__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./InteractionObject */ "./node_modules/@amcharts/amcharts4/.internal/core/interaction/InteractionObject.js");
/* harmony import */ var _InteractionKeyboardObject__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./InteractionKeyboardObject */ "./node_modules/@amcharts/amcharts4/.internal/core/interaction/InteractionKeyboardObject.js");
/* harmony import */ var _utils_Dictionary__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/Dictionary */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Dictionary.js");
/* harmony import */ var _Inertia__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Inertia */ "./node_modules/@amcharts/amcharts4/.internal/core/interaction/Inertia.js");
/* harmony import */ var _utils_DOM__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/DOM */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/DOM.js");
/* harmony import */ var _utils_Keyboard__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/Keyboard */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Keyboard.js");
/* harmony import */ var _System__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./../System */ "./node_modules/@amcharts/amcharts4/.internal/core/System.js");
/* harmony import */ var _Options__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./../Options */ "./node_modules/@amcharts/amcharts4/.internal/core/Options.js");
/* harmony import */ var _utils_Ease__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../utils/Ease */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Ease.js");
/* harmony import */ var _utils_Math__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
/* harmony import */ var _utils_Array__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../utils/Array */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Array.js");
/* harmony import */ var _utils_Iterator__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../utils/Iterator */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Iterator.js");
/* harmony import */ var _utils_Type__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/* harmony import */ var _utils_Time__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../utils/Time */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Time.js");
/**
 * Interaction manages all aspects of user interaction - mouse move,
 * click, hover, drag events, touch gestures.
 *
 * [[InteractionObject]] elements that want to use certain events, must attach event
 * listeners to Interaction instance.
 *
 * Interaction itself will not modify [[InteractionObject]] elements, it will be up to
 * those elements to handle interaction information received via event triggers.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */




















/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
* Interaction manages all aspects of user interaction - mouse move,
* click, hover, drag events, touch gestures.
*
* [[InteractionObject]] elements that want to use certain events, must attach event
* listeners to Interaction instance.
*
* Interaction itself will not modify [[InteractionObject]] elements, it will be up to
* those elements to handle interaction information received via event triggers.
*
* @see {@link IInteractionEvents} for a list of available events
*/

var Interaction =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_18__.__extends)(Interaction, _super);
  /**
   * Constructor. Sets up universal document-wide move events to handle stuff
   * outside particular chart container.
   */


  function Interaction() {
    var _this = // Call super
    _super.call(this) || this;
    /**
     * An indicator of global events were already initialized.
     */


    _this._globalEventsAdded = false;
    /**
     * Holds which mouse event listeners to use.
     */

    _this._pointerEvents = {
      "pointerdown": "mousedown",
      "pointerup": "mouseup",
      "pointermove": "mousemove",
      "pointercancel": "mouseup",
      "pointerover": "mouseover",
      "pointerout": "mouseout",
      "wheel": "wheel"
    };
    /**
     * Indicates if Interaction should use only "pointer" type events, like
     * "pointermove", available in all modern browsers, ignoring "legacy"
     * events, like "touchmove".
     */

    _this._usePointerEventsOnly = false;
    /**
     * Use only touch events (for touch only devices such as tablets and phones)
     */

    _this._useTouchEventsOnly = false;
    /**
     * Add special hover events. Normally, touch device tap will also simulate
     * hover event. On some devices (ahem iOS) we want to prevent that so that
     * over/out events are not duplicated.
     */

    _this._addHoverEvents = true;
    /**
     * Indicates if passive mode options is supported by this browser.
     */

    _this._passiveSupported = false;
    /**
     * Holds list of delayed events
     */

    _this._delayedEvents = {
      out: []
    };
    /**
     * List of objects that current have a pointer hovered over them.
     */

    _this.overObjects = new _utils_List__WEBPACK_IMPORTED_MODULE_1__.List();
    /**
     * List of objects that currently has a pressed pointer.
     */

    _this.downObjects = new _utils_List__WEBPACK_IMPORTED_MODULE_1__.List();
    /**
     * List of objects that need mouse position to be reported to them.
     */

    _this.trackedObjects = new _utils_List__WEBPACK_IMPORTED_MODULE_1__.List();
    /**
     * List of objects that are currently being dragged.
     */

    _this.transformedObjects = new _utils_List__WEBPACK_IMPORTED_MODULE_1__.List();
    /**
     * Holds all known pointers.
     */

    _this.pointers = new _utils_Dictionary__WEBPACK_IMPORTED_MODULE_6__.Dictionary();
    /**
     * Inertia options that need to be applied to after element drag, if it's
     * `inert = true`.
     *
     * This is just a default, which can and probably will be overridden by
     * actual elements.
     */

    _this.inertiaOptions = new _utils_Dictionary__WEBPACK_IMPORTED_MODULE_6__.Dictionary();
    /**
     * Default options for click events. These can be overridden in
     * [[InteractionObject]].
     */

    _this.hitOptions = {
      "doubleHitTime": 300,
      //"delayFirstHit": false,
      "hitTolerance": 10,
      "noFocus": true
    };
    /**
     * Default options for hover events. These can be overridden in
     * [[InteractionObject]].
     */

    _this.hoverOptions = {
      "touchOutBehavior": "leave",
      "touchOutDelay": 1000
    };
    /**
     * Default options for detecting a swipe gesture. These can be overridden in
     * [[InteractionObject]].
     */

    _this.swipeOptions = {
      "time": 500,
      "verticalThreshold": 75,
      "horizontalThreshold": 30
    };
    /**
     * Default options for keyboard operations. These can be overridden in
     * [[InteractionObject]].
     */

    _this.keyboardOptions = {
      "speed": 0.1,
      "accelleration": 1.2,
      "accellerationDelay": 2000
    };
    /**
     * Default options for keyboard operations. These can be overridden in
     * [[InteractionObject]].
     *
     * @since 4.5.14
     */

    _this.mouseOptions = {
      "sensitivity": 1
    }; // Set class name

    _this.className = "Interaction"; // Create InteractionObject for <body>

    _this.body = _this.getInteraction(document.body);

    _this._disposers.push(_this.body); // Detect browser capabilities and determine what event listeners to use


    if (window.hasOwnProperty("PointerEvent")) {
      // IE10+/Edge without touch controls enabled
      _this._pointerEvents.pointerdown = "pointerdown";
      _this._pointerEvents.pointerup = "pointerup";
      _this._pointerEvents.pointermove = "pointermove";
      _this._pointerEvents.pointercancel = "pointercancel";
      _this._pointerEvents.pointerover = "pointerover";
      _this._pointerEvents.pointerout = "pointerout"; //this._usePointerEventsOnly = true;
    } else if (window.hasOwnProperty("MSPointerEvent")) {
      // IE9
      _this._pointerEvents.pointerdown = "MSPointerDown";
      _this._pointerEvents.pointerup = "MSPointerUp";
      _this._pointerEvents.pointermove = "MSPointerMove";
      _this._pointerEvents.pointercancel = "MSPointerUp";
      _this._pointerEvents.pointerover = "MSPointerOver";
      _this._pointerEvents.pointerout = "MSPointerOut"; //this._usePointerEventsOnly = true;
    } else if (typeof matchMedia !== "undefined" && matchMedia('(pointer:fine)').matches) {
      // This is only for Safari as it does not support PointerEvent
      // Do nothing and let it use regular `mouse*` events
      // Hi Apple ;)
      // Additionally disable hover events for iOS devices
      if ('ontouchstart' in window) {
        _this._addHoverEvents = false;
        _this._useTouchEventsOnly = true;
      }
    } else if (window.navigator.userAgent.match(/MSIE /)) {
      // Oh looky, an MSIE that does not support PointerEvent. Hi granpa IE9!
      _this._usePointerEventsOnly = true;
    } else if (_this.fullFF()) {
      // Old FF, let's use regular events.
      // (Newer FFs would be detected by the PointerEvent availability check)
      _this._usePointerEventsOnly = true;
    } else {
      // Uses defaults for normal browsers
      // We also assume that this must be a touch device that does not have
      // any pointer events
      _this._useTouchEventsOnly = true;
    } // Detect if device has a mouse
    // This is turning out to be not reliable
    // @todo remove

    /*if (!window.navigator.msPointerEnabled && (typeof matchMedia !== "undefined") && !matchMedia('(pointer:fine)').matches && !this.fullFF()) {
        this._useTouchEventsOnly = true;
    }*/
    // Detect proper mouse wheel events


    if ("onwheel" in document.createElement("div")) {
      // Modern browsers
      _this._pointerEvents.wheel = "wheel";
    } else if (_utils_Type__WEBPACK_IMPORTED_MODULE_16__.hasValue(document.onmousewheel)) {
      // Webkit and IE support at least "mousewheel"
      _this._pointerEvents.wheel = "mousewheel";
    } // Set up default inertia options


    _this.inertiaOptions.setKey("move", {
      "time": 100,
      "duration": 500,
      "factor": 1,
      "easing": _utils_Ease__WEBPACK_IMPORTED_MODULE_12__.polyOut3
    });

    _this.inertiaOptions.setKey("resize", {
      "time": 100,
      "duration": 500,
      "factor": 1,
      "easing": _utils_Ease__WEBPACK_IMPORTED_MODULE_12__.polyOut3
    }); // Set the passive mode support


    _this._passiveSupported = Interaction.passiveSupported; // Apply theme

    _this.applyTheme();

    return _this;
  }
  /**
   * This is a nasty detection for Firefox. The reason why we have is that
   * Firefox ESR version does not support matchMedia correctly.
   *
   * On iOS, Firefox uses different userAgent, so we don't have to detect iOS.
   *
   * @return Full Firefox?
   */


  Interaction.prototype.fullFF = function () {
    return window.navigator.userAgent.match(/Firefox/) && !window.navigator.userAgent.match(/Android/);
  };

  Interaction.prototype.debug = function () {};
  /**
   * ==========================================================================
   * Processing
   * ==========================================================================
   * @hidden
   */

  /**
   * Sets up global events.
   *
   * We need this so that we can track drag movement beyond chart's container.
   *
   * @ignore Exclude from docs
   */


  Interaction.prototype.addGlobalEvents = function () {
    var _this = this;

    if (!this._globalEventsAdded) {
      if (!this._useTouchEventsOnly) {
        this._disposers.push((0,_utils_DOM__WEBPACK_IMPORTED_MODULE_8__.addEventListener)(document, this._pointerEvents.pointerdown, function (ev) {
          _this.handleGlobalPointerDown(ev);
        }));

        this._disposers.push((0,_utils_DOM__WEBPACK_IMPORTED_MODULE_8__.addEventListener)(document, this._pointerEvents.pointermove, function (ev) {
          _this.handleGlobalPointerMove(ev);
        }));

        this._disposers.push((0,_utils_DOM__WEBPACK_IMPORTED_MODULE_8__.addEventListener)(document, this._pointerEvents.pointerup, function (ev) {
          _this.handleGlobalPointerUp(ev);
        }));

        this._disposers.push((0,_utils_DOM__WEBPACK_IMPORTED_MODULE_8__.addEventListener)(document, this._pointerEvents.pointercancel, function (ev) {
          _this.handleGlobalPointerUp(ev, true);
        }));

        this._disposers.push((0,_utils_DOM__WEBPACK_IMPORTED_MODULE_8__.addEventListener)(document, "mouseenter", function (ev) {
          if (!_utils_Type__WEBPACK_IMPORTED_MODULE_16__.hasValue(ev.relatedTarget) && (ev.buttons == 0 || ev.which == 0)) {
            _this.handleDocumentLeave(ev);
          }
        }));
      } // No need to duplicate events for hubrid systems that support both
      // pointer events and touch events. Touch events are need only for
      // some touch-only systems, like Mobile Safari.


      if (!this._usePointerEventsOnly) {
        this._disposers.push((0,_utils_DOM__WEBPACK_IMPORTED_MODULE_8__.addEventListener)(document, "touchstart", function (ev) {
          _this.handleGlobalTouchStart(ev);
        }));

        this._disposers.push((0,_utils_DOM__WEBPACK_IMPORTED_MODULE_8__.addEventListener)(document, "touchmove", function (ev) {
          _this.handleGlobalTouchMove(ev);
        }));

        this._disposers.push((0,_utils_DOM__WEBPACK_IMPORTED_MODULE_8__.addEventListener)(document, "touchend", function (ev) {
          _this.handleGlobalTouchEnd(ev);
        }));
      }

      this._disposers.push((0,_utils_DOM__WEBPACK_IMPORTED_MODULE_8__.addEventListener)(document, "keydown", function (ev) {
        _this.handleGlobalKeyDown(ev);
      }));

      this._disposers.push((0,_utils_DOM__WEBPACK_IMPORTED_MODULE_8__.addEventListener)(document, "keyup", function (ev) {
        _this.handleGlobalKeyUp(ev);
      }));

      this._globalEventsAdded = true;
    }
  };
  /**
   * Sets if [[InteractionObject]] is clickable.
   *
   * @ignore Exclude from docs
   * @param io [[InteractionObject]] instance
   */


  Interaction.prototype.processClickable = function (io) {
    // Add or remove touch events
    this.processTouchable(io);
  };
  /**
   * Sets if [[InteractionObject]] will display context menu when right-clicked.
   *
   * @ignore Exclude from docs
   * @param io [[InteractionObject]] instance
   */


  Interaction.prototype.processContextMenu = function (io) {
    if (io.contextMenuDisabled) {
      if (!io.eventDisposers.hasKey("contextMenuDisabled")) {
        io.eventDisposers.setKey("contextMenuDisabled", (0,_utils_DOM__WEBPACK_IMPORTED_MODULE_8__.addEventListener)(io.element, "contextmenu", function (e) {
          e.preventDefault();
        }));
      }
    } else {
      if (io.eventDisposers.hasKey("contextMenuDisabled")) {
        io.eventDisposers.getKey("contextMenuDisabled").dispose();
      }
    }
  };
  /**
   * Sets if [[InteractionObject]] is hoverable.
   *
   * @ignore Exclude from docs
   * @param io [[InteractionObject]] instance
   */


  Interaction.prototype.processHoverable = function (io) {
    var _this = this;

    if (io.hoverable || io.trackable) {
      // Add global events
      this.addGlobalEvents(); // Add hover styles

      this.applyCursorOverStyle(io); // Add local events

      if (!io.eventDisposers.hasKey("hoverable") && this._addHoverEvents) {
        io.eventDisposers.setKey("hoverable", new _utils_Disposer__WEBPACK_IMPORTED_MODULE_3__.MultiDisposer([(0,_utils_DOM__WEBPACK_IMPORTED_MODULE_8__.addEventListener)(io.element, this._pointerEvents.pointerout, function (e) {
          return _this.handlePointerOut(io, e);
        }), (0,_utils_DOM__WEBPACK_IMPORTED_MODULE_8__.addEventListener)(io.element, this._pointerEvents.pointerover, function (e) {
          return _this.handlePointerOver(io, e);
        })]));
      }

      if (io.trackable) {//sprite.addEventListener("touchmove", this.handleTouchMove, false, this);
      }
    } else {
      var disposer = io.eventDisposers.getKey("hoverable");

      if (disposer != null) {
        disposer.dispose();
        io.eventDisposers.removeKey("hoverable");
      }
    } // Add or remove touch events


    this.processTouchable(io);
  };
  /**
   * Sets up [[InteractionObject]] as movable. Movable can be any
   * transformation, e.g. drag, swipe, resize, track.
   *
   * @ignore Exclude from docs
   * @param io  Element
   */


  Interaction.prototype.processMovable = function (io) {
    // Add unified events
    if (io.draggable || io.swipeable || io.trackable || io.resizable) {
      // Prep the element
      if (!this.isGlobalElement(io) && !io.isTouchProtected) {
        this.prepElement(io);
      } // Add hover styles


      this.applyCursorOverStyle(io);
    } // Add or remove touch events


    this.processTouchable(io);
  };
  /**
   * Checks if [[InteractionObject]] is trackable and sets relative events.
   *
   * @ignore Exclude from docs
   * @param io  Element
   */


  Interaction.prototype.processTrackable = function (io) {
    this.processHoverable(io);
    this.processMovable(io);

    if (io.trackable) {
      this.trackedObjects.moveValue(io);
    } else {
      this.trackedObjects.removeValue(io);
    }
  };
  /**
   * Checks if [[InteractionObject]] is draggable.
   *
   * @ignore Exclude from docs
   * @param io  Element
   */


  Interaction.prototype.processDraggable = function (io) {
    this.processMovable(io);
  };
  /**
   * Checks if [[InteractionObject]] is swipeable and sets relative events.
   *
   * A swipe event is triggered when a horizontal drag of 75px or more (and
   * less than 30px vertically) occurs within 700 milliseconds. This can be
   * overridden in sprites [[swipeOptions]].
   *
   * @ignore Exclude from docs
   * @param io  Element
   */


  Interaction.prototype.processSwipeable = function (io) {
    this.processMovable(io);
  };
  /**
   * Checks if [[InteractionObject]] is resizable and attaches required events
   * to it.
   *
   * @ignore Exclude from docs
   * @param io  Element
   */


  Interaction.prototype.processResizable = function (io) {
    this.processMovable(io);
  };
  /**
   * Checks if [[InteractionObject]] is supposed to capture mouse wheel events
   * and prepares it to catch those events.
   *
   * @ignore Exclude from docs
   * @param io  Element
   */


  Interaction.prototype.processWheelable = function (io) {
    var _this = this;

    if (io.wheelable) {
      //io.hoverable = true;
      if (!io.eventDisposers.hasKey("wheelable")) {
        io.eventDisposers.setKey("wheelable", new _utils_Disposer__WEBPACK_IMPORTED_MODULE_3__.MultiDisposer([(0,_utils_DOM__WEBPACK_IMPORTED_MODULE_8__.addEventListener)(io.element, this._pointerEvents.wheel, function (e) {
          return _this.handleMouseWheel(io, e);
        }, this._passiveSupported ? {
          passive: false
        } : false), io.events.on("out", function (e) {
          if (io.wheelable) {
            _this.unlockWheel();
          }
        }), io.events.on("over", function (e) {
          //console.log("whelab over")
          if (io.wheelable) {
            _this.lockWheel();
          }
        })]));
      }
    } else {
      var disposer = io.eventDisposers.getKey("wheelable");

      if (disposer != null) {
        disposer.dispose();
        io.eventDisposers.removeKey("wheelable");
      }
    }
  };
  /**
   * Checks if [[InteractionObject]] is focusable. A focusable element is an
   * element that will be highlighted when users presses TAB key. If the
   * element is focusable, this function will attach relative focus/blur
   * events to it.
   *
   * @ignore Exclude from docs
   * @param io  Element
   */


  Interaction.prototype.processFocusable = function (io) {
    var _this = this;

    if (io.focusable === true && io.tabindex > -1 && !this._useTouchEventsOnly) {
      if (!io.eventDisposers.hasKey("focusable")) {
        io.eventDisposers.setKey("focusable", new _utils_Disposer__WEBPACK_IMPORTED_MODULE_3__.MultiDisposer([(0,_utils_DOM__WEBPACK_IMPORTED_MODULE_8__.addEventListener)(io.element, "focus", function (e) {
          return _this.handleFocus(io, e);
        }), (0,_utils_DOM__WEBPACK_IMPORTED_MODULE_8__.addEventListener)(io.element, "blur", function (e) {
          return _this.handleBlur(io, e);
        }), (0,_utils_DOM__WEBPACK_IMPORTED_MODULE_8__.addEventListener)(io.element, this._pointerEvents.pointerdown, function (e) {
          return _this.handleFocusBlur(io, e);
        }), (0,_utils_DOM__WEBPACK_IMPORTED_MODULE_8__.addEventListener)(io.element, "touchstart", function (e) {
          return _this.handleFocusBlur(io, e);
        }, this._passiveSupported ? {
          passive: false
        } : false)]));
      }
    } else {
      var disposer = io.eventDisposers.getKey("focusable");

      if (disposer != null) {
        disposer.dispose();
        io.eventDisposers.removeKey("focusable");
      }
    }
  };
  /**
   * Checks if [[InteractionObject]] is "touchable". It means any interaction
   * whatsoever: mouse click, touch screen tap, swipe, drag, resize, etc.
   *
   * @ignore Exclude from docs
   * @param io  Element
   */


  Interaction.prototype.processTouchable = function (io) {
    var _this = this; // Add unified events


    if (io.clickable || io.hoverable || io.trackable || io.draggable || io.swipeable || io.resizable) {
      // Add global events
      this.addGlobalEvents(); // Add local events

      if (!io.eventDisposers.hasKey("touchable")) {
        if (!this._useTouchEventsOnly && !this._usePointerEventsOnly) {
          io.eventDisposers.setKey("touchable", new _utils_Disposer__WEBPACK_IMPORTED_MODULE_3__.MultiDisposer([(0,_utils_DOM__WEBPACK_IMPORTED_MODULE_8__.addEventListener)(io.element, this._pointerEvents.pointerdown, function (e) {
            return _this.handlePointerDown(io, e);
          }), (0,_utils_DOM__WEBPACK_IMPORTED_MODULE_8__.addEventListener)(io.element, "touchstart", function (e) {
            return _this.handleTouchDown(io, e);
          }, this._passiveSupported ? {
            passive: false
          } : false)]));
        } else if (!this._useTouchEventsOnly) {
          io.eventDisposers.setKey("touchable", (0,_utils_DOM__WEBPACK_IMPORTED_MODULE_8__.addEventListener)(io.element, this._pointerEvents.pointerdown, function (e) {
            return _this.handlePointerDown(io, e);
          }));
        } else if (!this._usePointerEventsOnly) {
          io.eventDisposers.setKey("touchable", (0,_utils_DOM__WEBPACK_IMPORTED_MODULE_8__.addEventListener)(io.element, "touchstart", function (e) {
            return _this.handleTouchDown(io, e);
          }, this._passiveSupported ? {
            passive: false
          } : false));
        }
      }
    } else {
      var disposer = io.eventDisposers.getKey("touchable");

      if (disposer != null) {
        disposer.dispose();
        io.eventDisposers.removeKey("touchable");
      }
    }
  };
  /**
   * ==========================================================================
   * Non-pointer events
   * ==========================================================================
   * @hidden
   */

  /**
   * Dispatches "focus" event when element gains focus.
   *
   * @ignore Exclude from docs
   * @param io  Element
   * @param ev  Original event
   */


  Interaction.prototype.handleFocus = function (io, ev) {
    if (!io.focusable) {
      ev.preventDefault();
      return;
    }

    io.isFocused = true;

    if (io.events.isEnabled("focus") && !_System__WEBPACK_IMPORTED_MODULE_10__.system.isPaused) {
      var imev = {
        type: "focus",
        target: io,
        event: ev
      };
      io.events.dispatchImmediately("focus", imev);
    }
  };
  /**
   * Used by regular click events to prevent focus if "noFocus" is set.
   *
   * This should not be called by "focus" handlers.
   *
   * @param io  Element
   * @param ev  Original event
   */


  Interaction.prototype.handleFocusBlur = function (io, ev) {
    if (io.focusable !== false && this.getHitOption(io, "noFocus")) {
      io.events.once("focus", function () {
        io.events.disableType("blur");
        _utils_DOM__WEBPACK_IMPORTED_MODULE_8__.blur();

        if (io.sprite) {
          io.sprite.handleBlur();
        }

        io.events.enableType("blur");
      });
    }
  };
  /**
   * Dispatches "blur" event when element loses focus.
   *
   * @ignore Exclude from docs
   * @param io  Element
   * @param ev  Original event
   */


  Interaction.prototype.handleBlur = function (io, ev) {
    if (!io.focusable) {
      ev.preventDefault();
      return;
    }

    io.isFocused = false;

    if (io.events.isEnabled("blur") && !_System__WEBPACK_IMPORTED_MODULE_10__.system.isPaused) {
      var imev = {
        type: "blur",
        target: io,
        event: ev
      };
      io.events.dispatchImmediately("blur", imev);
    }
  };
  /**
   * ==========================================================================
   * Global keyboard-related even handlers
   * ==========================================================================
   * @hidden
   */

  /**
   * Checks if there is an item that has currently focus and that they key is
   * one of the directional keys. If both of the conditions are true, it
   * creates an object to simulate movement of dragable element with keyboard.
   *
   * @ignore Exclude from docs
   * @param ev An original keyboard event
   */


  Interaction.prototype.handleGlobalKeyDown = function (ev) {
    if (this.focusedObject) {
      if (_utils_Keyboard__WEBPACK_IMPORTED_MODULE_9__.keyboard.isKey(ev, "esc")) {
        // ESC removes focus
        _utils_DOM__WEBPACK_IMPORTED_MODULE_8__.blur();
      } else if (this.focusedObject.draggable && _utils_Keyboard__WEBPACK_IMPORTED_MODULE_9__.keyboard.isKey(ev, ["up", "down", "left", "right"])) {
        // Prevent scrolling of the document
        ev.preventDefault(); // Get focused object

        var io = this.focusedObject; // Get particular key

        var disposerKey = "interactionKeyboardObject"; // If such disposer already exists we know the event is going on so we
        // just move on

        if (io.eventDisposers.hasKey(disposerKey)) {
          return;
        } // Create a keyboard mover


        var ko = new _InteractionKeyboardObject__WEBPACK_IMPORTED_MODULE_5__.InteractionKeyboardObject(io, ev);
        io.eventDisposers.setKey(disposerKey, ko);

        switch (_utils_Keyboard__WEBPACK_IMPORTED_MODULE_9__.keyboard.getEventKey(ev)) {
          case "up":
            ko.directionY = -1;
            break;

          case "down":
            ko.directionY = 1;
            break;

          case "left":
            ko.directionX = -1;
            break;

          case "right":
            ko.directionX = 1;
            break;
        }
      }
    }
  };
  /**
   * Dispatches related events when the keyboard key is realeasd.
   *
   * @ignore Exclude from docs
   * @param ev An original keyboard event
   */


  Interaction.prototype.handleGlobalKeyUp = function (ev) {
    var disposerKey = "interactionKeyboardObject";

    if (this.focusedObject) {
      var disposer = this.focusedObject.eventDisposers.getKey(disposerKey);

      if (disposer != null) {
        // Prevent scrolling of the document
        ev.preventDefault(); // Dispose stuff

        disposer.dispose();
        this.focusedObject.eventDisposers.removeKey(disposerKey);
      } // Does focused object have "hit" event?


      var sprite = this.focusedObject.sprite;

      if (_utils_Keyboard__WEBPACK_IMPORTED_MODULE_9__.keyboard.isKey(ev, "enter") && sprite) {
        if (sprite.events.isEnabled("hit") || sprite.events.isEnabled("toggled")) {
          this.focusedObject.dispatchImmediately("hit");
        } else if (sprite.showTooltipOn == "hit") {
          this.focusedObject.dispatchImmediately("up");
        }
      }
    }
  };
  /**
   * ==========================================================================
   * Global pointer-related even handlers
   * ==========================================================================
   * @hidden
   */

  /**
   * Handler for a global "pointermove" event.
   *
   * @ignore Exclude from docs
   * @param ev Event object
   */


  Interaction.prototype.handleGlobalPointerMove = function (ev) {
    // Get pointer
    var pointer = this.getPointer(ev); // Update current point position

    pointer.point = this.getPointerPoint(ev); // Prepare and fire global event

    if (this.events.isEnabled("track") && !_System__WEBPACK_IMPORTED_MODULE_10__.system.isPaused) {
      var imev = {
        type: "track",
        target: this,
        event: ev,
        pointer: pointer,
        touch: pointer.touch
      };
      this.events.dispatchImmediately("track", imev);
    } // Track


    this.addBreadCrumb(pointer, pointer.point); // Process further

    this.handleGlobalMove(pointer, ev);
  };
  /**
   * Handler for a global "pointerdown" event.
   *
   * @ignore Exclude from docs
   * @param ev Event object
   */


  Interaction.prototype.handleGlobalPointerDown = function (ev) {
    // Remove delayed hovers
    this.processDelayed(); // Get pointer

    var pointer = this.getPointer(ev); // Prepare and fire global event

    if (this.events.isEnabled("down") && !_System__WEBPACK_IMPORTED_MODULE_10__.system.isPaused) {
      var imev = {
        type: "down",
        target: this,
        event: ev,
        pointer: pointer,
        touch: pointer.touch
      };
      this.events.dispatchImmediately("down", imev);
    }
  };
  /**
   * Prevents touch action from firing.
   *
   * @ignore Exclude from docs
   * @param ev Event
   */


  Interaction.prototype.preventTouchAction = function (ev) {
    if (!ev.defaultPrevented) {
      ev.preventDefault();
    }
  };
  /**
   * Handler for a global "pointerup" event.
   *
   * @ignore Exclude from docs
   * @param ev Event object
   */


  Interaction.prototype.handleGlobalPointerUp = function (ev, cancelled) {
    if (cancelled === void 0) {
      cancelled = false;
    } // Get pointer


    var pointer = this.getPointer(ev); // Prepare and fire global event

    if (this.events.isEnabled("up") && !_System__WEBPACK_IMPORTED_MODULE_10__.system.isPaused) {
      var imev = {
        type: "up",
        target: this,
        event: ev,
        pointer: pointer,
        touch: pointer.touch
      };
      this.events.dispatchImmediately("up", imev);
    } // Process further


    this.handleGlobalUp(pointer, ev, cancelled);
  };
  /**
  * ==========================================================================
  * Global touch-related even handlers
  * ==========================================================================
  */

  /**
   * Handler for a global "touchmove" event.
   *
   * @ignore Exclude from docs
   * @param ev Event object
   */


  Interaction.prototype.handleGlobalTouchMove = function (ev) {
    // Process each changed touch point
    for (var i = 0; i < ev.changedTouches.length; i++) {
      // Get pointer
      var pointer = this.getPointer(ev.changedTouches[i]); // Update current point position

      pointer.point = this.getPointerPoint(ev.changedTouches[i]); // Prepare and fire global event

      if (this.events.isEnabled("track") && !_System__WEBPACK_IMPORTED_MODULE_10__.system.isPaused) {
        var imev = {
          type: "track",
          target: this,
          event: ev,
          pointer: pointer,
          touch: pointer.touch
        };
        this.events.dispatchImmediately("track", imev);
      } // Track


      this.addBreadCrumb(pointer, pointer.point); // Process further

      this.handleGlobalMove(pointer, ev);
    }
  };
  /**
   * Handler for a global "touchstart" event.
   *
   * @ignore Exclude from docs
   * @param ev Event object
   */


  Interaction.prototype.handleGlobalTouchStart = function (ev) {
    // Remove delayed hovers
    this.processDelayed(); // Process each changed touch point

    for (var i = 0; i < ev.changedTouches.length; i++) {
      // Get pointer
      var pointer = this.getPointer(ev.changedTouches[i]); // Prepare and fire global event

      if (!this._usePointerEventsOnly && this.events.isEnabled("down") && !_System__WEBPACK_IMPORTED_MODULE_10__.system.isPaused) {
        var imev = {
          type: "down",
          target: this,
          event: ev,
          pointer: pointer,
          touch: pointer.touch
        };
        this.events.dispatchImmediately("down", imev);
      }
    }
  };
  /**
   * Handler for a global "touchend" event.
   *
   * @ignore Exclude from docs
   * @param ev Event object
   */


  Interaction.prototype.handleGlobalTouchEnd = function (ev) {
    // Process each changed touch point
    for (var i = 0; i < ev.changedTouches.length; i++) {
      // Get pointer
      var pointer = this.getPointer(ev.changedTouches[i]); // Prepare and fire global event

      if (this.events.isEnabled("up") && !_System__WEBPACK_IMPORTED_MODULE_10__.system.isPaused) {
        var imev = {
          type: "up",
          target: this,
          event: ev,
          pointer: pointer,
          touch: pointer.touch
        };
        this.events.dispatchImmediately("up", imev);
      } // Handle element-related events


      this.handleGlobalUp(pointer, ev);
    }
  };
  /**
   * ==========================================================================
   * Element-specific pointer-related even handlers
   * ==========================================================================
   * @hidden
   */

  /**
   * Handles event when pointer is over [[InteractionObject]] and button is
   * pressed.
   *
   * @ignore Exclude from docs
   * @param io  Element
   * @param ev  Original event
   */


  Interaction.prototype.handlePointerDown = function (io, ev) {
    // Stop further propagation so we don't get multiple triggers on hybrid
    // devices (both mouse and touch capabilities)
    //ev.preventDefault();
    //ev.stopPropagation();
    //if (ev.defaultPrevented) {
    //}
    // Get pointer
    var pointer = this.getPointer(ev); // Ignore if it's anything but mouse's primary button

    if (!pointer.touch && ev.which != 1 && ev.which != 3) {
      return;
    } // Set mouse button


    pointer.button = ev.which; // Reset pointer

    this.resetPointer(pointer, ev); // Process down

    this.handleDown(io, pointer, ev);
  };
  /**
   * Handles event when [[InteractionObject]] is hovered by a mouse pointer.
   *
   * @ignore Exclude from docs
   * @param io  Element
   * @param ev  Original event
   */


  Interaction.prototype.handlePointerOver = function (io, ev) {
    // Get pointer
    var pointer = this.getPointer(ev); // Process down

    this.handleOver(io, pointer, ev);
  };
  /**
   * Handles event when [[InteractionObject]] loses hover from a mouse pointer.
   *
   * @ignore Exclude from docs
   * @param io  Element
   * @param ev  Original event
   */


  Interaction.prototype.handlePointerOut = function (io, ev) {
    // Get pointer
    var pointer = this.getPointer(ev); // Process down

    this.handleOut(io, pointer, ev);
  };
  /**
   * Handles event when mouse wheel is crolled over the [[InteractionObject]].
   *
   * @ignore Exclude from docs
   * @param io  Element
   * @param ev  Original event
   * @todo Investigate more-cross browser stuff https://developer.mozilla.org/en-US/docs/Web/Events/wheel
   */


  Interaction.prototype.handleMouseWheel = function (io, ev) {
    // Get pointer
    var pointer = this.getPointer(ev); // Update current point position

    pointer.point = this.getPointerPoint(ev); // Init delta values

    var deltaX = 0,
        deltaY = 0; // Set up modifier
    // This is needed because FireFox reports wheel deltas in "lines" instead
    // of pixels so we have to approximate pixel value

    var mod = 1;

    if (ev.deltaMode == 1) {
      mod = 50;
    } // Adjust configurable sensitivity


    mod *= this.getMouseOption(io, "sensitivity"); // Calculate deltas

    if (ev instanceof WheelEvent) {
      deltaX = Math.round(-1 * ev.wheelDeltaX || ev.deltaX * mod);
      deltaY = Math.round(-1 * ev.wheelDeltaY || ev.deltaY * mod);
    } else {
      throw new Error("Invalid event type");
    } // Handle the event


    this.handleWheel(io, pointer, deltaX, deltaY, ev);
  };
  /**
   * ==========================================================================
   * Element-specific touch-related even handlers
   * ==========================================================================
   * @hidden
   */

  /**
    * Handles an event when an [[InteractionObject]] is touched on a touch
    * device.
    *
    * @ignore Exclude from docs
    * @param io  Element
    * @param ev  Original event
    */


  Interaction.prototype.handleTouchDown = function (io, ev) {
    // Stop further propagation so we don't get multiple triggers on hybrid
    // devices (both mouse and touch capabilities)
    //this.maybePreventDefault(io, ev);
    //return;
    // Process each changed touch point
    for (var i = 0; i < ev.changedTouches.length; i++) {
      // Get pointer
      var pointer = this.getPointer(ev.changedTouches[i]);
      this.maybePreventDefault(io, ev, pointer); // Reset pointer

      this.resetPointer(pointer, ev.changedTouches[i]); // Process down

      this.handleDown(io, pointer, ev);
    }
  };
  /**
   * ==========================================================================
   * Universal handlers
   * ==========================================================================
   * @hidden
   */

  /**
   * Handles click/tap. Checks for doublehit.
   *
   * @ignore Exclude from docs
   * @param io       Interaction object
   * @param pointer  Pointer
   * @param ev       Original event
   */


  Interaction.prototype.handleHit = function (io, pointer, ev) {
    // Check if this is a double-hit
    var now = _utils_Time__WEBPACK_IMPORTED_MODULE_17__.getTime();

    if (io.lastHit && io.lastHit >= now - this.getHitOption(io, "doubleHitTime")) {
      // Yup - it's a double-hit
      // Cancel the hit
      //clearTimeout(io.lastHitPointer.hitTimeout);
      // If it happened too fast it probably means that hybrid device just
      // generated two events for the same tap
      if (now - io.lastHit < 100) {
        // Ignore
        return;
      } // Clear last hit


      io.lastHit = undefined;
      io.lastHitPointer = undefined; // Dispatch event

      if (io.events.isEnabled("doublehit") && !_System__WEBPACK_IMPORTED_MODULE_10__.system.isPaused) {
        var imev = {
          type: "doublehit",
          target: io,
          point: pointer.point,
          event: ev,
          touch: pointer.touch
        };
        io.events.dispatchImmediately("doublehit", imev);
      }
    } else {
      // Log last hit
      io.lastHit = now;
      io.lastHitPointer = pointer;

      if (pointer.button === 3) {
        // Execute HIT now
        if (io.events.isEnabled("rightclick") && !_System__WEBPACK_IMPORTED_MODULE_10__.system.isPaused) {
          var imev = {
            type: "rightclick",
            target: io,
            event: ev
          };
          io.events.dispatchImmediately("rightclick", imev);
        }
      } else {
        if (io.events.isEnabled("hit") && !_System__WEBPACK_IMPORTED_MODULE_10__.system.isPaused) {
          var imev = {
            type: "hit",
            target: io,
            event: ev,
            point: pointer.point,
            touch: pointer.touch
          };
          io.events.dispatchImmediately("hit", imev);
        }
      }
    }
  };
  /**
   * Handles pointer hovering over [[InteractionObject]].
   *
   * @ignore Exclude from docs
   * @param io       Interaction object
   * @param pointer  Pointer
   * @param ev       Original event
   * @param soft     Invoked by helper function
   */


  Interaction.prototype.handleOver = function (io, pointer, ev, soft) {
    if (soft === void 0) {
      soft = false;
    }

    if (!io.hoverable) {
      return;
    }

    var hoversPaused = false;

    if (this.shouldCancelHovers(pointer) && this.areTransformed() && this.moved(pointer, this.getHitOption(io, "hitTolerance"))) {
      hoversPaused = true;
      this.cancelAllHovers(ev);
    } // Remove any delayed outs


    this.processDelayed(); // Add pointer

    io.overPointers.moveValue(pointer); // Check if object is not yet hovered

    if (!io.isRealHover) {
      // Set element as hovered
      if (!hoversPaused) {
        io.isHover = true;
        io.isRealHover = true;
        this.overObjects.moveValue(io);
      } // Generate body track event. This is needed so that if element loads
      // under unmoved mouse cursor, we still need all the actions that are
      // required to happen to kick in.


      this.handleTrack(this.body, pointer, ev, true); // Event

      if (io.events.isEnabled("over") && !_System__WEBPACK_IMPORTED_MODULE_10__.system.isPaused && !hoversPaused) {
        var imev = {
          type: "over",
          target: io,
          event: ev,
          pointer: pointer,
          touch: pointer.touch
        };
        io.events.dispatchImmediately("over", imev);
      }
    }
  };
  /**
   * Handles when [[InteractionObject]] is no longer hovered.
   *
   * If `soft = true`, this means that method is being invoked by some other
   * code, not hard "out" function, like `handleUp` which implies we need to
   * run additional checks before unhovering the object.
   *
   * @ignore Exclude from docs
   * @param io       Interaction object
   * @param pointer  Pointer
   * @param ev       Original event
   * @param soft     Invoked by helper function
   * @param force    Force imediate out
   */


  Interaction.prototype.handleOut = function (io, pointer, ev, soft, force) {
    var _this = this;

    if (soft === void 0) {
      soft = false;
    }

    if (force === void 0) {
      force = false;
    }

    if (!io.hoverable) {
      return;
    } // Remove pointer


    io.overPointers.removeValue(pointer); // Check if element is still hovered

    if (io.isHover && (!io.hasDelayedOut || force)) {
      // Should we run additional checks?
      if (soft && io.overPointers.length) {
        // There are still pointers hovering - don't do anything else and
        // wait until either no over pointers are there or we get a hard out
        // event.
        return;
      } // Should we delay "out" if this is happening on a touch device?


      if (pointer && pointer.touch && !force && !this.old(pointer)) {
        // This is a touch pointer, and it hasn't moved, let's pretend
        // the object is still hovered, and act as per "behavior" setting
        var behavior = this.getHoverOption(io, "touchOutBehavior");

        if (behavior == "leave") {
          // Set to "leave", so we do not execute any "out" event.
          // It will be handled by any other interaction that happens
          // afterwards.
          this._delayedEvents.out.push({
            type: "out",
            io: io,
            pointer: pointer,
            event: ev,
            keepUntil: _utils_Time__WEBPACK_IMPORTED_MODULE_17__.getTime() + 500
          });

          io.hasDelayedOut = true;
          return;
        } else if (behavior == "delay" && this.getHoverOption(io, "touchOutDelay")) {
          this._delayedEvents.out.push({
            type: "out",
            io: io,
            pointer: pointer,
            event: ev,
            keepUntil: _utils_Time__WEBPACK_IMPORTED_MODULE_17__.getTime() + 500,
            timeout: this.setTimeout(function () {
              _this.handleOut(io, pointer, ev, true);
            }, this.getHoverOption(io, "touchOutDelay"))
          });

          return;
        } else {// Nothing for "remove" - that's how it works "out-of-the-box"
        }
      } // Set element as not hovered


      io.isHover = false;
      this.overObjects.removeValue(io); // Invoke event

      if (!io.isDisposed() && io.events.isEnabled("out") && !_System__WEBPACK_IMPORTED_MODULE_10__.system.isPaused) {
        var imev = {
          type: "out",
          target: io,
          event: ev,
          pointer: pointer,
          touch: pointer.touch
        };
        io.events.dispatchImmediately("out", imev);
      } // Reset object from lefover delayed outs, pointers


      io.overPointers.clear();
      io.hasDelayedOut = false; // @todo (clean delayed)
    }
  };
  /**
   * Processes dalyed events, such as "out" event that was initiated for
   * elements by touch.
   */


  Interaction.prototype.processDelayed = function () {
    var delayedEvent;

    while (true) {
      delayedEvent = this._delayedEvents.out.pop();

      if (!delayedEvent) {
        break;
      }

      if (delayedEvent.timeout) {
        delayedEvent.timeout.dispose();
      }

      this.handleOut(delayedEvent.io, delayedEvent.pointer, delayedEvent.event, false, true);
    }
  };
  /**
   * Performs tasks on pointer down.
   *
   * @ignore Exclude from docs
   * @param io       Element
   * @param pointer  Pointer
   * @param ev       Original event
   */


  Interaction.prototype.handleDown = function (io, pointer, ev) {
    // Need to prevent default event from happening on transformable objects
    this.maybePreventDefault(io, ev, pointer); // Stop inertia animations if they're currently being played out

    if (io.inert) {
      this.stopInertia(io);
    } // Trigger hover because some touch devices won't trigger over events
    // on their own


    this.handleOver(io, pointer, ev, true); // Add pointer to list

    io.downPointers.moveValue(pointer); // Apply styles if necessary

    this.applyCursorDownStyle(io, pointer); // Check if object is already down

    if (!io.isDown) {
      // Lose focus if needed
      if (io.focusable !== false && this.getHitOption(io, "noFocus") && this.focusedObject) {
        _utils_DOM__WEBPACK_IMPORTED_MODULE_8__.blur();
      } // Set object as hovered


      io.isDown = true;
      this.downObjects.moveValue(io); // Prep object for dragging and/or resizing

      if (io.draggable) {
        this.processDragStart(io, pointer, ev);
      }

      if (io.resizable) {
        this.processResizeStart(io, pointer, ev);
      }
    } // Dispatch "down" event


    if (io.events.isEnabled("down") && !_System__WEBPACK_IMPORTED_MODULE_10__.system.isPaused) {
      var imev = {
        type: "down",
        target: io,
        event: ev,
        pointer: pointer,
        touch: pointer.touch
      };
      io.events.dispatchImmediately("down", imev);
    }
  };
  /**
   * Performs tasks on pointer up.
   *
   * @ignore Exclude from docs
   * @param pointer  Pointer
   * @param ev       Original event
   */


  Interaction.prototype.handleGlobalUp = function (pointer, ev, cancelled) {
    var _this = this;

    if (cancelled === void 0) {
      cancelled = false;
    }

    var sorted = this.downObjects.values.slice();
    sorted.sort(function (x, y) {
      if (x && y) {
        var pos = x.element.compareDocumentPosition(y.element);

        if (pos & Node.DOCUMENT_POSITION_CONTAINED_BY) {
          return 1;
        } else if (pos & Node.DOCUMENT_POSITION_CONTAINS) {
          return -1;
        } else {
          return 0;
        }
      } else {
        return 0;
      }
    }); // Process all down objects

    _utils_Array__WEBPACK_IMPORTED_MODULE_14__.each(sorted, function (io) {
      // Check if this particular pointer is pressing down
      // on object
      if (io && io.downPointers.contains(pointer)) {
        _this.handleUp(io, pointer, ev, cancelled);
      }
    });
  };
  /**
   * Simulates all pointers being up once mouse leaves document area.
   *
   * @ignore Exclude from docs
   * @param ev       Original event
   */


  Interaction.prototype.handleDocumentLeave = function (ev) {
    var _this = this; // Process all down objects


    _utils_Iterator__WEBPACK_IMPORTED_MODULE_15__.each(this.downObjects.backwards().iterator(), function (io) {
      io.downPointers.each(function (pointer) {
        _this.handleUp(io, pointer, ev);
      });
    });
  };
  /**
   * Handles when [[InteractionObject]] is no longer hovered.
   *
   * @ignore Exclude from docs
   * @param io       Interaction object
   * @param pointer  Pointer
   * @param ev       Original event
   */


  Interaction.prototype.handleUp = function (io, pointer, ev, cancelled) {
    if (cancelled === void 0) {
      cancelled = false;
    } // Restore cursor style


    this.restoreCursorDownStyle(io, pointer); // Remove pointer from the list

    io.downPointers.removeValue(pointer); // Trigger out because some touch devices won't trigger out events
    // on their own

    if (pointer.touch || this._useTouchEventsOnly) {
      this.handleOut(io, pointer, ev, true);
    } // Check if object still down


    if (io.isDown) {
      // Check if there are no other pointers hovering this element
      if (io.downPointers.length == 0) {
        // Set element as no longer down
        io.isDown = false;
        this.downObjects.removeValue(io);
      } // Dispatch "up" event


      if (io.events.isEnabled("up") && !_System__WEBPACK_IMPORTED_MODULE_10__.system.isPaused) {
        var imev = {
          type: "up",
          target: io,
          event: ev,
          pointer: pointer,
          touch: pointer.touch
        };
        io.events.dispatchImmediately("up", imev);
      } // Check if this was not a cancelled event.
      // If event was canelled (which might happen if gesture resulted in
      // navigation or page scroll) there's no point in triggering hit and
      // other actions.


      if (!cancelled) {
        // Handle swiping-related stuff
        if (io.swipeable && this.swiped(io, pointer)) {
          // Swiped - nothing else should happen
          this.handleSwipe(io, pointer, ev);
        } else {
          // Check if it maybe a click
          if (io.clickable && !this.moved(pointer, this.getHitOption(io, "hitTolerance"))) {
            this.handleHit(io, pointer, ev);
          } // Handle inertia


          if (io.inert && this.moved(pointer, this.getHitOption(io, "hitTolerance"))) {
            this.handleInertia(io, pointer);
          } else if (io.draggable) {
            this.processDragStop(io, pointer, ev);
          }

          if (io.resizable) {
            this.processResizeStop(io, pointer, ev);
          }
        }
      }
    }
  };
  /**
   * Checks if event needs to be prevented on draggable and such items, so that
   * touch gestures like navigation and scroll do not kick in.
   *
   * @param io  Object
   * @param ev  Event
   */


  Interaction.prototype.maybePreventDefault = function (io, ev, pointer) {
    if (_utils_Type__WEBPACK_IMPORTED_MODULE_16__.hasValue(ev) && (io.draggable || io.swipeable || io.trackable || io.resizable) && !this.isGlobalElement(io) && ev.cancelable !== false && (!io.isTouchProtected || !pointer || !pointer.touch)) {
      ev.preventDefault();
    }
  };
  /**
   * Cancels all hovers on all currently hovered objects.
   *
   * @param  pointer  Pointer
   * @param  ev       Event
   */


  Interaction.prototype.cancelAllHovers = function (ev) {
    var _this = this; //this.overObjects.each((io) => {


    _utils_Iterator__WEBPACK_IMPORTED_MODULE_15__.each(this.overObjects.backwards().iterator(), function (io) {
      if (io) {
        var pointer = io.overPointers.getIndex(0);

        _this.handleOut(io, pointer, ev, true, true);
      }
    });
  };
  /**
   * Checks if hovers should be cancelled on transform as per global options.
   * @param   pointer  Pointer
   * @return           Cancel?
   */


  Interaction.prototype.shouldCancelHovers = function (pointer) {
    return _Options__WEBPACK_IMPORTED_MODULE_11__.options.disableHoverOnTransform == "always" || _Options__WEBPACK_IMPORTED_MODULE_11__.options.disableHoverOnTransform == "touch" && pointer.touch;
  };
  /**
   * Handles pointer move.
   *
   * @ignore Exclude from docs
   * @param pointer  Pointer
   * @param ev       Original event
   */


  Interaction.prototype.handleGlobalMove = function (pointer, ev) {
    var _this = this; // Process hovered elements
    // We check if the element became unhovered without reporting the mouseout
    // event. (it happens in some cases)


    if (!pointer.touch) {
      var target_1 = _utils_DOM__WEBPACK_IMPORTED_MODULE_8__.eventTarget(pointer.lastEvent);
      _utils_Iterator__WEBPACK_IMPORTED_MODULE_15__.each(this.overObjects.backwards().iterator(), function (io) {
        // Is this pointer relevant to element?
        if (io && io.overPointers.contains(pointer) && io.hoverable) {
          // Check if the element is still hovered
          var reset = false;

          if (io.element && pointer.lastEvent) {
            if (!_utils_DOM__WEBPACK_IMPORTED_MODULE_8__.contains(io.element, target_1)) {
              reset = true;
            }
          } else {
            reset = true;
          }

          if (reset) {
            _this.handleOut(io, pointer, ev, true);
          }
        }
      });
    } // Process down elements


    _utils_Iterator__WEBPACK_IMPORTED_MODULE_15__.each(this.transformedObjects.backwards().iterator(), function (io) {
      // Is this pointer relevant to element?
      if (io.downPointers.contains(pointer) && // Swipe still happening?
      !(io.swipeable && _this.swiping(io, pointer)) && (io.draggable || io.resizable)) {
        _this.handleTransform(io, ev);
      }
    }); // Process tracked elements

    _utils_Iterator__WEBPACK_IMPORTED_MODULE_15__.each(this.trackedObjects.backwards().iterator(), function (io) {
      // Is this pointer relevant to element?
      if (!io.overPointers.contains(pointer)) {
        _this.handleTrack(io, pointer, ev);
      }
    });
  };
  /**
   * Handles reporting of pointer movement.
   *
   * @ignore Exclude from docs
   * @param io        Element
   * @param pointer    Pointer
   * @param ev         Original event
   * @param skipCheck  Sould we skip check if cursor actually moved
   */


  Interaction.prototype.handleTrack = function (io, pointer, ev, skipCheck) {
    if (skipCheck === void 0) {
      skipCheck = false;
    } // Do nothing if the cursor did not actually move


    if (!skipCheck && !this.moved(pointer, 0)) {
      return;
    } // Initiate TRACK event


    if (io.events.isEnabled("track") && !_System__WEBPACK_IMPORTED_MODULE_10__.system.isPaused) {
      var imev = {
        type: "track",
        target: io,
        event: ev,
        point: pointer.point,
        pointer: pointer,
        touch: pointer.touch
      };
      io.events.dispatchImmediately("track", imev);
    }
  };
  /**
   * Handles swipe action.
   *
   * @ignore Exclude from docs
   * @param io       Element
   * @param pointer  Pointer
   * @param ev       Original event
   */


  Interaction.prototype.handleSwipe = function (io, pointer, ev) {
    // We pass in InteractionEvent with shift in mouse coordinates
    // between when the drag started and ended
    if (io.events.isEnabled("swipe") && !_System__WEBPACK_IMPORTED_MODULE_10__.system.isPaused) {
      var imev = {
        type: "swipe",
        target: io,
        event: ev,
        touch: pointer.touch
      };
      io.events.dispatchImmediately("swipe", imev);
    }

    if (pointer.startPoint.x < pointer.point.x) {
      if (io.events.isEnabled("swiperight") && !_System__WEBPACK_IMPORTED_MODULE_10__.system.isPaused) {
        var imev = {
          type: "swiperight",
          target: io,
          event: ev,
          touch: pointer.touch
        };
        io.events.dispatchImmediately("swiperight", imev);
      }
    } else {
      if (io.events.isEnabled("swipeleft") && !_System__WEBPACK_IMPORTED_MODULE_10__.system.isPaused) {
        var imev = {
          type: "swipeleft",
          target: io,
          event: ev,
          touch: pointer.touch
        };
        io.events.dispatchImmediately("swipeleft", imev);
      }
    }
  };
  /**
   * Handles event triggering for wheel rotation.
   *
   * @ignore Exclude from docs
   * @param io       Element
   * @param pointer  Pointer
   * @param deltaX   Horizontal shift
   * @param deltaY   Vertical shift
   * @param ev       Original event
   */


  Interaction.prototype.handleWheel = function (io, pointer, deltaX, deltaY, ev) {
    var shift = {
      x: deltaX,
      y: deltaY
    }; // Trigger generic WHEEL event

    if (io.events.isEnabled("wheel") && !_System__WEBPACK_IMPORTED_MODULE_10__.system.isPaused) {
      io.events.dispatchImmediately("wheel", {
        type: "wheel",
        target: io,
        event: ev,
        point: pointer.point,
        shift: shift
      });
    } // Trigger direction-specific events
    // Horizontal


    if (deltaX < 0) {
      if (io.events.isEnabled("wheelleft") && !_System__WEBPACK_IMPORTED_MODULE_10__.system.isPaused) {
        io.events.dispatchImmediately("wheelleft", {
          type: "wheelleft",
          target: io,
          event: ev,
          point: pointer.point,
          shift: shift
        });
      }
    } else if (deltaX > 0) {
      if (io.events.isEnabled("swiperight") && !_System__WEBPACK_IMPORTED_MODULE_10__.system.isPaused) {
        io.events.dispatchImmediately("wheelright", {
          type: "wheelright",
          target: io,
          event: ev,
          point: pointer.point,
          shift: shift
        });
      } // Vertical

    } else if (deltaY < 0) {
      if (io.events.isEnabled("wheelup") && !_System__WEBPACK_IMPORTED_MODULE_10__.system.isPaused) {
        io.events.dispatchImmediately("wheelup", {
          type: "wheelup",
          target: io,
          event: ev,
          point: pointer.point,
          shift: shift
        });
      }
    } else if (deltaY > 0) {
      if (io.events.isEnabled("wheeldown") && !_System__WEBPACK_IMPORTED_MODULE_10__.system.isPaused) {
        io.events.dispatchImmediately("wheeldown", {
          type: "wheeldown",
          target: io,
          event: ev,
          point: pointer.point,
          shift: shift
        });
      }
    }
  };
  /**
   * Initiates inertia checking sub-routines for different movement types:
   * drag, resize.
   *
   * @ignore Exclude from docs
   * @param sprite
   * @param pointer
   */


  Interaction.prototype.handleInertia = function (io, pointer) {
    if (io.draggable && io.downPointers.length === 0) {
      this.handleMoveInertia(io, pointer);
    }

    if (io.resizable && io.downPointers.length > 1) {
      this.handleResizeInertia(io, pointer);
    }
  };
  /**
   * Continues moving the element to simulate the effect of inertia. Happens
   * when `inert` and `draggable` object is dragged and then released.
   *
   * @ignore Exclude from docs
   * @param io       Element
   * @param pointer  Pointer
   */


  Interaction.prototype.handleMoveInertia = function (io, pointer) {
    var interaction = io;
    var type = "move";
    var point = {
      "x": pointer.point.x,
      "y": pointer.point.y
    };
    var startPoint = {
      "x": pointer.startPoint.x,
      "y": pointer.startPoint.y
    }; // Init inertia object

    var inertia = new _Inertia__WEBPACK_IMPORTED_MODULE_7__.Inertia(interaction, type, point, startPoint); // Get inertia data

    var ref = this.getTrailPoint(pointer, _utils_Time__WEBPACK_IMPORTED_MODULE_17__.getTime() - this.getInertiaOption(io, "move", "time"));

    if (typeof ref === "undefined") {
      this.processDragStop(io, pointer, pointer.lastUpEvent);
      return;
    } // Init animation options


    var factor = this.getInertiaOption(io, "move", "factor");
    var animationOptions = [{
      "to": pointer.point.x + (pointer.point.x - ref.point.x) * factor,
      "property": "x"
    }, {
      "to": pointer.point.y + (pointer.point.y - ref.point.y) * factor,
      "property": "y"
    }]; // Start animation

    var animation = new _utils_Animation__WEBPACK_IMPORTED_MODULE_2__.Animation(inertia, animationOptions, this.getInertiaOption(io, "move", "duration"), this.getInertiaOption(io, "move", "easing")).start();

    this._disposers.push(animation.events.on("animationended", function (ev) {
      inertia.done();
    })); // Add inertia object


    io.inertias.setKey("move", inertia);
  };
  /**
   * Continues resizing of a `resizable` element after it is resized and
   * released.
   *
   * **NOTE:** this is is just a placeholder function. No actual fucntionality
   * is implemented, yet.
   *
   * @ignore Exclude from docs
   * @param io       Element
   * @param pointer  Pointer
   */


  Interaction.prototype.handleResizeInertia = function (io, pointer) {// Some day, folks. Some day...
  };
  /**
   * Recalculates element's position and size based on position of
   * all its related pointers.
   *
   * @ignore Exclude from docs
   * @param io  Element
   * @param ev  Original event
   */


  Interaction.prototype.handleTransform = function (io, ev) {
    // Get primary pointer and its respective points
    var pointer1 = io.downPointers.getIndex(0);
    var point1 = null;
    var startPoint1 = null;

    if (pointer1) {
      point1 = pointer1.point;
      startPoint1 = pointer1.startPoint;
    } // Init secondary pointer


    var pointer2;
    var point2;
    var startPoint2; // Use center of the sprite to simulate "second" point of touch

    point2 = {
      "x": io.originalPosition.x,
      "y": io.originalPosition.y
    };
    startPoint2 = point2; // Determine if it's a sinngle pointer or multi

    var singlePoint = true;

    for (var i = 1; i < io.downPointers.length; i++) {
      // Get pointer
      var nextPointer = io.downPointers.getIndex(i); // Doublecheck if it's not the same pointer by comparing original position

      if (startPoint1.x != nextPointer.startPoint.x && startPoint1.y != nextPointer.startPoint.y) {
        // Several pointers down
        singlePoint = false; // Get second pointer

        pointer2 = nextPointer;
        point2 = pointer2.point;
        startPoint2 = pointer2.startPoint; // Stop looking

        break;
      }
    } // Primary touch point moved?


    var pointer1Moved = pointer1 && this.moved(pointer1, 0); // Report DRAG_START if necessary

    if (io.draggable && pointer1 && pointer1.dragStartEvents && pointer1.dragStartEvents.length && pointer1Moved) {
      if (io.events.isEnabled("dragstart") && !_System__WEBPACK_IMPORTED_MODULE_10__.system.isPaused) {
        io.events.dispatchImmediately("dragstart", pointer1.dragStartEvents.shift());
      } //delete pointer1.dragStartEvents;

    } // Determine what we do in order of superiority


    if (singlePoint && io.draggable) {
      // We have only one pointer and the Sprite is draggable
      // There's nothing else to be done - just move it
      this.handleTransformMove(io, point1, startPoint1, ev, pointer1Moved, pointer1.touch);

      if (this.shouldCancelHovers(pointer1) && this.moved(pointer1, this.getHitOption(io, "hitTolerance"))) {
        this.cancelAllHovers(ev);
      }
    } else {
      // Check if second touch point moved
      var pointer2Moved = pointer2 && this.moved(pointer2, 0);

      if (this.shouldCancelHovers(pointer1) && this.moved(pointer1, this.getHitOption(io, "hitTolerance")) || this.shouldCancelHovers(pointer2) && this.moved(pointer2, this.getHitOption(io, "hitTolerance"))) {
        this.cancelAllHovers(ev);
      }

      if (io.draggable && io.resizable) {
        //this.handleTransformAll(io, point1, startPoint1, point2, startPoint2, ev, pointer1Moved && pointer2Moved);
        this.handleTransformMove(io, point1, startPoint1, ev, pointer1Moved && pointer2Moved, pointer1.touch);
        this.handleTransformResize(io, point1, startPoint1, point2, startPoint2, ev, pointer1Moved && pointer2Moved, pointer1.touch);
      } else {
        if (io.draggable) {
          this.handleTransformMove(io, point1, startPoint1, ev, pointer1Moved, pointer1.touch);
        }

        if (io.resizable && (!singlePoint || ev.ctrlKey)) {
          this.handleTransformResize(io, point1, startPoint1, point2, startPoint2, ev, pointer1Moved && pointer2Moved, pointer1.touch);
        }
      }
    }
  };
  /**
   * Handles movement of the dragged element.
   *
   * @ignore Exclude from docs
   * @param io            Element
   * @param point         Current point of the pointer
   * @param startPoint    Starting point of the pointer
   * @param ev            Original event
   * @param pointerMoved  Did pointer move?
   */


  Interaction.prototype.handleTransformMove = function (io, point, startPoint, ev, pointerMoved, touch) {
    if (pointerMoved) {
      if (io.events.isEnabled("drag") && !_System__WEBPACK_IMPORTED_MODULE_10__.system.isPaused && (!io.isTouchProtected || !touch)) {
        var imev = {
          type: "drag",
          target: io,
          event: ev,
          shift: {
            "x": point.x - startPoint.x,
            "y": point.y - startPoint.y
          },
          startPoint: startPoint,
          point: point,
          touch: touch
        };
        io.events.dispatchImmediately("drag", imev);
      }
    }
  };
  /**
   * Handles resizing of the element.
   *
   * @ignore Exclude from docs
   * @param io            Element
   * @param point1        Current position of reference point #1
   * @param startPoint1   Original position of reference point #1
   * @param point2        Current position of reference point #2
   * @param startPoint2   Original position of reference point #2
   * @param ev            Original event
   * @param pointerMoved  Did pointer move?
   */


  Interaction.prototype.handleTransformResize = function (io, point1, startPoint1, point2, startPoint2, ev, pointerMoved, touch) {
    if (io.events.isEnabled("resize") && !_System__WEBPACK_IMPORTED_MODULE_10__.system.isPaused && (!io.isTouchProtected || !touch)) {
      var imev = {
        type: "resize",
        target: io,
        event: ev,
        scale: _utils_Math__WEBPACK_IMPORTED_MODULE_13__.getScale(point1, startPoint1, point2, startPoint2),
        startPoint1: startPoint1,
        point1: point1,
        startPoint2: startPoint2,
        point2: point2,
        touch: touch
      };
      io.events.dispatchImmediately("resize", imev);
    }
  };
  /**
   * Handles all the preparations of the element when it starts to be dragged.
   *
   * @ignore Exclude from docs
   * @param io       Element
   * @param pointer  Pointer
   * @param ev       Original event
   */


  Interaction.prototype.processDragStart = function (io, pointer, ev) {
    // Add to draggedObjects
    this.transformedObjects.moveValue(io);

    if (this.shouldCancelHovers(pointer)) {
      this.cancelAllHovers(ev);
    } // Report "dragstart"


    var imev = {
      type: "dragstart",
      target: io,
      event: ev,
      touch: pointer ? pointer.touch : false
    }; // Log object that we are starting to drag, so we can check against and
    // avoid hovers on other objects that might be in the path of movement.

    if (pointer) {
      pointer.dragTarget = io; //pointer.startPoint = pointer.point;
    }
    /**
     * If pointer is set we will not fire the event until the pointer has
     * actually moved. If it's not set we don't have to wait for anything, so we
     * just fire off the event right away.
     */


    if (pointer && pointer.dragStartEvents) {
      pointer.dragStartEvents.push(imev);
    } else {
      if (!_System__WEBPACK_IMPORTED_MODULE_10__.system.isPaused) {
        io.dispatchImmediately("dragstart", imev);
      }
    }
  };
  /**
   * Finishes up element drag operation.
   *
   * @ignore Exclude from docs
   * @param io       Element
   * @param pointer  Pointer
   * @param ev       Original event
   */


  Interaction.prototype.processDragStop = function (io, pointer, ev) {
    // Pointer set?
    if (!pointer) {
      pointer = this.getDragPointer(io);
    } // Unset drag object


    if (pointer) {
      pointer.dragTarget = undefined;
    } // Removed from transformedObjects


    this.transformedObjects.removeValue(io); // Unlock document
    //this.unlockDocument();
    // Report dragstop

    if (!pointer || this.moved(pointer, 0)) {
      if (io.events.isEnabled("dragstop") && !_System__WEBPACK_IMPORTED_MODULE_10__.system.isPaused) {
        var imev = {
          type: "dragstop",
          target: io,
          touch: pointer ? pointer.touch : false
        };
        io.events.dispatchImmediately("dragstop", imev);
      }
    }
  };
  /**
   * Handles all the preparations of the element when it starts to be resized.
   *
   * @ignore Exclude from docs
   * @param io       Element
   * @param pointer  Pointer
   * @param ev       Original event
   */


  Interaction.prototype.processResizeStart = function (io, pointer, ev) {
    // Add to draggedObjects
    this.transformedObjects.moveValue(io);
  };
  /**
   * Finishes up element drag operation.
   *
   * @ignore Exclude from docs
   * @param io       Element
   * @param pointer  Pointer
   * @param ev       Original event
   */


  Interaction.prototype.processResizeStop = function (io, pointer, ev) {
    // Removed from transformedObjects
    this.transformedObjects.removeValue(io);
  };
  /**
   * ==========================================================================
   * Controls for InteractionObjects initiating directly
   * ==========================================================================
   * @hidden
   */

  /**
   * Manually triggers drag start on the element. Could be useful in cases
   * where tracking or dragging one element can also influence dragging another
   * element.
   *
   * Passing in `pointer` reference is advisable. If not passed in it will try
   * to determine which pointer to attach to. However, it's better to specify
   * it explicitly.
   *
   * @param io       Element
   * @param pointer  Pointer
   */


  Interaction.prototype.dragStart = function (io, pointer) {
    if (!pointer) {
      pointer = this.getDragPointer(io);
    }

    if (pointer) {
      this.handleDown(io, pointer, pointer.lastDownEvent);
    }
  };
  /**
   * Manually ends drag on the element.
   *
   * @param io       Element
   * @param pointer  Pointer
   */


  Interaction.prototype.dragStop = function (io, pointer, cancelled) {
    if (!pointer) {
      pointer = this.getDragPointer(io);
    }

    if (pointer && !cancelled) {
      this.handleGlobalUp(pointer, pointer.lastUpEvent, cancelled);
    }
  };
  /**
   * This method uses a fuzzy logic to find the pointer to be used for dragging.
   * Beware that this is not a rock-solid solution. If there are a few objects
   * being dragged at the same time, you may get unexepected results.
   *
   * @param io  InteractionObject to get pointers from
   * @return Pointer currently being used for dragging
   */


  Interaction.prototype.getDragPointer = function (io) {
    if (io) {
      // InteractionObject is supplied
      // Use it's first down pointer
      return io.downPointers.getIndex(0);
    } else if (this.transformedObjects.length) {
      // Use first dragged object
      return this.getDragPointer(this.transformedObjects.getIndex(0));
    } else {
      return undefined;
    }
  };
  /**
   * ==========================================================================
   * Utils
   * ==========================================================================
   * @hidden
   */

  /**
   * Returns pointer id for the given event object.
   *
   * @param ev  Event
   * @return Pointer ID
   */


  Interaction.prototype.getPointerId = function (ev) {
    var id = "";

    if (_utils_Type__WEBPACK_IMPORTED_MODULE_16__.hasValue(ev.identifier)) {
      id = "" + ev.identifier;
    } else if (_utils_Type__WEBPACK_IMPORTED_MODULE_16__.hasValue(ev.pointerId)) {
      id = "" + ev.pointerId;
    } else {
      id = "m";
    }

    return id.replace("-", "");
  };
  /**
   * Returns a cursor position of the event.
   *
   * @param ev  Original event
   * @return Event point
   */


  Interaction.prototype.getPointerPoint = function (ev) {
    return {
      "x": ev.clientX,
      "y": ev.clientY
    };
  };
  /**
   * Returns [[Pointer]] object that is associated with the Event.
   *
   * If no such [[Pointer]] object exists, it is created.
   *
   * @param ev  Event
   * @return Pointer
   */


  Interaction.prototype.getPointer = function (ev) {
    // Get pointer id
    var id = this.getPointerId(ev); // Get current coordinates

    var point = this.getPointerPoint(ev); // Look for the pointer in the Dictionary if it maybe already exists

    var pointer;

    if (this.pointers.hasKey(id)) {
      // We already have such pointer
      pointer = this.pointers.getKey(id); // We need this, because Edge reuses pointer ids across touch and mouse

      pointer.touch = this.isPointerTouch(ev); // Reset pointer
      //pointer.point = point;
    } else {
      // Init pointer
      pointer = {
        "id": id,
        //"touch": !(ev instanceof MouseEvent) || ((<any>ev).pointerType && (<any>ev).pointerType != "pointer"),
        //"touch": !(ev instanceof MouseEvent) || ((<any>ev).pointerType && (<any>ev).pointerType != "mouse"),
        "touch": this.isPointerTouch(ev),
        "startPoint": point,
        "startTime": _utils_Time__WEBPACK_IMPORTED_MODULE_17__.getTime(),
        "point": point,
        "track": [],
        "swipeCanceled": false,
        "dragStartEvents": []
      }; // Add first breadcrumb

      this.addBreadCrumb(pointer, point); // Add for re-use later

      this.pointers.setKey(id, pointer);
    } // Log last event


    pointer.lastEvent = ev;
    this.lastPointer = pointer;
    return pointer;
  };
  /**
   * Determines if pointer event originated from a touch pointer or mouse.
   *
   * @param ev  Original event
   * @return Touch pointer?
   */


  Interaction.prototype.isPointerTouch = function (ev) {
    if (typeof Touch !== "undefined" && ev instanceof Touch) {
      return true;
    } else if (typeof PointerEvent !== "undefined" && ev instanceof PointerEvent && _utils_Type__WEBPACK_IMPORTED_MODULE_16__.hasValue(ev.pointerType)) {
      switch (ev.pointerType) {
        case "touch":
        case "pen":
        case 2:
          return true;

        case "mouse":
        case 4:
          return false;

        default:
          return !(ev instanceof MouseEvent);
      }
    } else if (_utils_Type__WEBPACK_IMPORTED_MODULE_16__.hasValue(ev.type)) {
      if (ev.type.match(/^mouse/)) {
        return false;
      }
    }

    return true;
  };
  /**
   * Resets the poiner to original state, i.e. cleans movement information,
   * starting point, etc.
   *
   * @param pointer Pointer
   */


  Interaction.prototype.resetPointer = function (pointer, ev) {
    // Get current coordinates
    var point = this.getPointerPoint(ev);
    ;
    pointer.startTime = _utils_Time__WEBPACK_IMPORTED_MODULE_17__.getTime();
    pointer.startPoint = {
      x: point.x,
      y: point.y
    };
    pointer.point = {
      x: point.x,
      y: point.y
    };
    pointer.track = [];
    pointer.swipeCanceled = false; //clearTimeout(pointer.swipeTimeout);
    //clearTimeout(pointer.holdTimeout);
  };
  /**
   * Adds a "breadcrumb" point to the [[Pointer]] to log its movement path.
   *
   * @param pointer  Pointer
   * @param point    Point coordinates
   */


  Interaction.prototype.addBreadCrumb = function (pointer, point) {
    pointer.track.push({
      "timestamp": _utils_Time__WEBPACK_IMPORTED_MODULE_17__.getTime(),
      "point": point
    });
  };
  /**
   * Prepares the document for various touch-related operations.
   *
   * @ignore Exclude from docs
   */


  Interaction.prototype.lockDocument = function () {
    this.prepElement(this.body);
  };
  /**
   * Restores document functionality.
   *
   * @ignore Exclude from docs
   */


  Interaction.prototype.unlockDocument = function () {
    if (this.transformedObjects.length == 0) {
      this.restoreAllStyles(this.body);
    }
  };
  /**
   * Lock element (disable all touch)
   *
   * @ignore Exclude from docs
   */


  Interaction.prototype.lockElement = function (io) {
    this.prepElement(io);
  };
  /**
   * Restores element's functionality.
   *
   * @ignore Exclude from docs
   */


  Interaction.prototype.unlockElement = function (io) {
    this.restoreAllStyles(io);
  };
  /**
   * Locks document's wheel scroll.
   *
   * @ignore Exclude from docs
   */


  Interaction.prototype.lockWheel = function () {
    window.addEventListener(this._pointerEvents.wheel, this.wheelLockEvent, this._passiveSupported ? {
      passive: false
    } : false);
  };
  /**
   * Unlocks document's wheel scroll.
   *
   * @ignore Exclude from docs
   */


  Interaction.prototype.unlockWheel = function () {
    window.removeEventListener(this._pointerEvents.wheel, this.wheelLockEvent);
  };
  /**
   * Checks if top element at pointer's position belongs to the SVG.
   *
   * @ignore Exlude from docs
   * @param pointer  Pointer
   * @param svg      The <svg> element
   * @param id       A unique identifier of the object that is checking for locality
   * @return Belongs to SVG
   */


  Interaction.prototype.isLocalElement = function (pointer, svg, id) {
    var cached = this.getCache("local_pointer_" + pointer.id);

    if (_utils_Type__WEBPACK_IMPORTED_MODULE_16__.hasValue(cached)) {
      return cached;
    }

    var doc = _utils_DOM__WEBPACK_IMPORTED_MODULE_8__.getRoot(svg) || document;

    if (doc.elementFromPoint) {
      var target = doc.elementFromPoint(pointer.point.x, pointer.point.y);
      var local = target && _utils_DOM__WEBPACK_IMPORTED_MODULE_8__.contains(svg, target);
      this.setCache("local_pointer_" + pointer.id + "_" + id, local, 100);
      return local;
    }

    return false;
  };
  /**
   * A function that cancels mouse wheel scroll.
   *
   * @ignore Exclude from docs
   * @param ev  Event object
   * @return Returns `false` to cancel
   */


  Interaction.prototype.wheelLockEvent = function (ev) {
    ev.preventDefault();
    return false;
  };
  /**
   * Applies a set of styles to an element. Stores the original styles so they
   * can be restored later.
   *
   * @ignore
   * @param io      Element
   */


  Interaction.prototype.prepElement = function (io) {
    var el = io.element;

    if (el) {
      // Define possible props
      var props = ["touchAction", "webkitTouchAction", "MozTouchAction", "MSTouchAction", "msTouchAction", "oTouchAction", "userSelect", "webkitUserSelect", "MozUserSelect", "MSUserSelect", "msUserSelect", "oUserSelect", "touchSelect", "webkitTouchSelect", "MozTouchSelect", "MSTouchSelect", "msTouchSelect", "oTouchSelect", "touchCallout", "webkitTouchCallout", "MozTouchCallout", "MSTouchCallout", "msTouchCallout", "oTouchCallout", "contentZooming", "webkitContentZooming", "MozContentZooming", "MSContentZooming", "msContentZooming", "oContentZooming", "userDrag", "webkitUserDrag", "MozUserDrag", "MSUserDrag", "msUserDrag", "oUserDrag"];

      for (var i = 0; i < props.length; i++) {
        if (props[i] in el.style) {
          this.setTemporaryStyle(io, props[i], "none");
        }
      } // Remove iOS-specific selection;


      this.setTemporaryStyle(io, "tapHighlightColor", "rgba(0, 0, 0, 0)"); //this.setTemporaryStyle(io, "webkitOverflowScrolling", "none");
    }
  };
  /**
   * Restores replaced styles
   *
   * @ignore
   * @param  io  Element
   */


  Interaction.prototype.unprepElement = function (io) {
    var el = io.element;

    if (el) {
      // Define possible props
      var props = ["touchAction", "webkitTouchAction", "MozTouchAction", "MSTouchAction", "msTouchAction", "oTouchAction", "userSelect", "webkitUserSelect", "MozUserSelect", "MSUserSelect", "msUserSelect", "oUserSelect", "touchSelect", "webkitTouchSelect", "MozTouchSelect", "MSTouchSelect", "msTouchSelect", "oTouchSelect", "touchCallout", "webkitTouchCallout", "MozTouchCallout", "MSTouchCallout", "msTouchCallout", "oTouchCallout", "contentZooming", "webkitContentZooming", "MozContentZooming", "MSContentZooming", "msContentZooming", "oContentZooming", "userDrag", "webkitUserDrag", "MozUserDrag", "MSUserDrag", "msUserDrag", "oUserDrag"];

      for (var i = 0; i < props.length; i++) {
        if (props[i] in el.style) {
          this.restoreStyle(io, props[i]);
        }
      } // Remove iOS-specific selection;


      this.restoreStyle(io, "tapHighlightColor"); //this.restoreStyle(io, "webkitOverflowScrolling");
    }
  };
  /**
   * Returns an option associated with hit events.
   *
   * @ignore Exclude from docs
   * @param io      Element
   * @param option  Option key
   * @return Option value
   */


  Interaction.prototype.getHitOption = function (io, option) {
    var res = io.hitOptions[option];

    if (typeof res === "undefined") {
      res = this.hitOptions[option];
    }

    return res;
  };
  /**
   * Returns an option associated with hover events.
   *
   * @ignore Exclude from docs
   * @param io      Element
   * @param option  Option key
   * @return Option value
   */


  Interaction.prototype.getHoverOption = function (io, option) {
    var res = io.hoverOptions[option];

    if (typeof res === "undefined") {
      res = this.hoverOptions[option];
    }

    return res;
  };
  /**
   * Returns an option associated with swipe events.
   *
   * @ignore Exclude from docs
   * @param io      Element
   * @param option  Option key
   * @return Option value
   */


  Interaction.prototype.getSwipeOption = function (io, option) {
    var res = io.swipeOptions[option];

    if (typeof res === "undefined") {
      res = this.swipeOptions[option];
    }

    return res;
  };
  /**
   * Returns an option for keyboard.
   *
   * @ignore Exclude from docs
   * @param io      Element
   * @param option  Option key
   * @return Option value
   */


  Interaction.prototype.getKeyboardOption = function (io, option) {
    var res = io.keyboardOptions[option];

    if (typeof res === "undefined") {
      res = this.keyboardOptions[option];
    }

    return res;
  };
  /**
   * Returns an option for mouse.
   *
   * @ignore Exclude from docs
   * @param io      Element
   * @param option  Option key
   * @return Option value
   */


  Interaction.prototype.getMouseOption = function (io, option) {
    var res = io.mouseOptions[option];

    if (typeof res === "undefined") {
      res = this.mouseOptions[option];
    }

    return res;
  };
  /**
   * Returns an option associated with inertia.
   *
   * @ignore Exclude from docs
   * @param io      Element
   * @param type    Inertia type
   * @param option  Option key
   * @return Option value
   */


  Interaction.prototype.getInertiaOption = function (io, type, option) {
    var options = io.inertiaOptions.getKey(type);
    var res;

    if (options && _utils_Type__WEBPACK_IMPORTED_MODULE_16__.hasValue(options[option])) {
      res = options[option];
    } else {
      res = this.inertiaOptions.getKey(type)[option];
    }

    return res;
  };
  /**
   * Stops currently going on inertia. Useful if inertia is currently being
   * animated and the object is being interacted with.
   *
   * @param io Element
   */


  Interaction.prototype.stopInertia = function (io) {
    var x;
    var inertias = ["move", "resize"];

    for (var i = 0; i < inertias.length; i++) {
      x = inertias[i];

      if (io.inertias.hasKey(x)) {
        var inertia = io.inertias.getKey(x);

        if (inertia) {
          inertia.dispose(); //io.inertiaAnimations.removeKey(x);
          //this.processDragStop(io);

          continue;
        }
      }
    }
  };
  /**
   * Check if swiping is currently being performed on an object.
   *
   * @param io       Element
   * @param pointer  Pointer to check
   * @return `true` if swiping
   */


  Interaction.prototype.swiping = function (io, pointer) {
    var now = _utils_Time__WEBPACK_IMPORTED_MODULE_17__.getTime();

    if (pointer.swipeCanceled || !io.swipeable) {
      return false;
    } else if (Math.abs(pointer.startPoint.y - pointer.point.y) < this.getSwipeOption(io, "verticalThreshold") && pointer.startTime > now - this.getSwipeOption(io, "time")) {
      return true;
    } else {
      return false;
    }
  };
  /**
   * Returns `true` if a successfull swipe action was performed on an element.
   *
   * @param io       Element
   * @param pointer  Pointer
   * @return Swiped?
   */


  Interaction.prototype.swiped = function (io, pointer) {
    var now = _utils_Time__WEBPACK_IMPORTED_MODULE_17__.getTime();

    if (pointer.swipeCanceled) {
      return false;
    } else if (Math.abs(pointer.startPoint.x - pointer.point.x) > this.getSwipeOption(io, "horizontalThreshold") && Math.abs(pointer.startPoint.y - pointer.point.y) < this.getSwipeOption(io, "verticalThreshold") && pointer.startTime > now - this.getSwipeOption(io, "time")) {
      return true;
    } else {
      return false;
    }
  };
  /**
   * Applies style to mouse cursor based on its stage in relation to
   * [[InteractionObject]].
   *
   * @ignore Exclude from docs
   * @param Element
   */


  Interaction.prototype.applyCursorOverStyle = function (io) {
    // Get sprite's cursor ooptions
    var options = io.cursorOptions;

    if (!_utils_Type__WEBPACK_IMPORTED_MODULE_16__.hasValue(options.overStyle)) {
      return;
    } // Apply cursor down styles


    for (var i = 0; i < options.overStyle.length; i++) {
      _utils_DOM__WEBPACK_IMPORTED_MODULE_8__.setStyle(io.element, options.overStyle[i].property, options.overStyle[i].value);
    }
  };
  /**
   * Applies style to mouse cursor based on its stage in relation to
   * [[InteractionObject]].
   *
   * @ignore Exclude from docs
   * @param io       Element
   * @param pointer  Pointer
   */


  Interaction.prototype.applyCursorDownStyle = function (io, pointer) {
    // Not applicable for touch pointers since they don't display a cursor
    if (pointer && pointer.touch) {
      return;
    }

    var downStyle = io.cursorOptions.downStyle; // Is down?

    if (io.downPointers.contains(pointer) && _utils_Type__WEBPACK_IMPORTED_MODULE_16__.hasValue(downStyle)) {
      // Apply cursor down styles
      for (var i = 0; i < downStyle.length; i++) {
        this.setTemporaryStyle(this.body, downStyle[i].property, downStyle[i].value);
        this.setTemporaryStyle(io, downStyle[i].property, downStyle[i].value);
      }
    }
  };
  /**
   * Restores original cursor style for the element.
   *
   * @ignore Exclude from docs
   * @param io       Element
   * @param pointer  Pointer
   */


  Interaction.prototype.restoreCursorDownStyle = function (io, pointer) {
    // Not applicable for touch pointers since they don't display a cursor
    if (pointer && pointer.touch) {
      return;
    }

    var downStyle = io.cursorOptions.downStyle; // Is down?

    if (io.downPointers.contains(pointer) && _utils_Type__WEBPACK_IMPORTED_MODULE_16__.hasValue(downStyle)) {
      // Apply cursor down styles
      for (var i = 0; i < downStyle.length; i++) {
        this.restoreStyle(this.body, downStyle[i].property);
        this.restoreStyle(io, downStyle[i].property);
      }
    }
  };
  /**
   * Sets style on the body of the document.
   *
   * @ignore Exclude from docs
   * @param style  Style definitions
   */


  Interaction.prototype.setGlobalStyle = function (style) {
    var body = getInteraction().body;
    var styles = _utils_Type__WEBPACK_IMPORTED_MODULE_16__.isArray(style) ? style : [style];

    for (var i = 0; i < styles.length; i++) {
      this.setTemporaryStyle(body, styles[i].property, styles[i].value);
    }
  };
  /**
   * Restores style on the body of the document.
   *
   * @ignore Exclude from docs
   * @param style  Style definitions
   */


  Interaction.prototype.restoreGlobalStyle = function (style) {
    var body = getInteraction().body;
    var styles = _utils_Type__WEBPACK_IMPORTED_MODULE_16__.isArray(style) ? style : [style];

    for (var i = 0; i < styles.length; i++) {
      this.restoreStyle(body, styles[i].property);
    }
  };
  /**
   * Checks if element is a non-cahrt element.
   *
   * @param io  InteractionObject
   * @return Global element?
   */


  Interaction.prototype.isGlobalElement = function (io) {
    return document.body === io.element;
  };
  /**
   * Checks if pointer has moved since it was created.
   *
   * @param pointer    Pointer
   * @param tolerance  Tolerance in pixels
   * @param minTime    Minimum time required for the pointer to be down to be considered moved
   * @return `true` if the pointer has moved
   */


  Interaction.prototype.moved = function (pointer, tolerance, minTime) {
    /*// If there was more time, we don't care if cursor actually moved
    let duration = $time.getTime() - pointer.startTime;
    if ($type.hasValue(minTime) && (minTime > duration)) {
        return false;
    }*/
    if (minTime === void 0) {
      minTime = 300;
    } // That was quick measure shift


    var shift = this.getShift(pointer);
    return Math.abs(shift.x) > tolerance || Math.abs(shift.y) > tolerance;
  };
  /**
   * Returns if pointer is "old", meaning it has been pressing for more than
   * X milliseconds.
   *
   * @ignore
   * @param pointer  Pointer
   * @param minTime  Minimum time to consider pointer old
   * @return {boolean}
   */


  Interaction.prototype.old = function (pointer, minTime) {
    if (minTime === void 0) {
      minTime = 300;
    }

    return _utils_Time__WEBPACK_IMPORTED_MODULE_17__.getTime() - pointer.startTime > minTime;
  };
  /**
   * Returns total a shift in pointers coordinates between its original
   * position and now.
   *
   * @param pointer  Pointer
   * @return Shift in coordinates (x/y)
   */


  Interaction.prototype.getShift = function (pointer) {
    return {
      "x": pointer.startPoint.x - pointer.point.x,
      "y": pointer.startPoint.y - pointer.point.y
    };
  };
  /**
   * Returns a point from [[Pointer]]'s move history at a certain timetamp.
   *
   * @param pointer    Pointer
   * @param timestamp  Timestamp
   * @return Point
   */


  Interaction.prototype.getTrailPoint = function (pointer, timestamp) {
    var res;

    for (var i = 0; i < pointer.track.length; i++) {
      if (pointer.track[i].timestamp >= timestamp) {
        res = pointer.track[i];
        break;
      }
    }

    return res;
  };
  /**
   * Checks if same pointer already exists in the list.
   *
   * @param list     List to check agains
   * @param pointer  Pointer
   * @return Exists?
   */


  Interaction.prototype.pointerExists = function (list, pointer) {
    var exists = false;
    list.each(function (item) {
      if (item == pointer) {
        return;
      }

      exists = item.point.x == pointer.point.x && item.point.y == pointer.point.y;
    });
    return exists;
  };
  /**
   * Returns an [[InteractionObject]] representation of a DOM element.
   *
   * You can use this on any HTML or SVG element, to add interactive features
   * to it.
   *
   * @param element  Element
   * @return InteractionObject
   */


  Interaction.prototype.getInteraction = function (element) {
    return new _InteractionObject__WEBPACK_IMPORTED_MODULE_4__.InteractionObject(element);
  };
  /**
   * Sets a style property on an element. Stores original value to be restored
   * later with [[restoreStyle]].
   *
   * @see {@link restoreStyle}
   * @param io        Element
   * @param property  Property
   * @param value     Value
   */


  Interaction.prototype.setTemporaryStyle = function (io, property, value) {
    // Get element
    //let el = io.element.tagName == "g" ? <SVGSVGElement>io.element.parentNode : io.element;
    var el = io.element; // Save original property if it is set and hasn't been saved before already

    if (_utils_Type__WEBPACK_IMPORTED_MODULE_16__.hasValue(el.style[property]) && !io.replacedStyles.hasKey(property)) {
      io.replacedStyles.setKey(property, el.style[property]);
    } // Replace with the new one


    _utils_DOM__WEBPACK_IMPORTED_MODULE_8__.setStyle(el, property, value);
  };
  /**
   * Restores specific style on an element.
   *
   * @param io        Element
   * @param property  Style property
   */


  Interaction.prototype.restoreStyle = function (io, property) {
    // Reset style
    if (io.replacedStyles.hasKey(property)) {
      io.element.style[property] = io.replacedStyles.getKey(property);
      io.replacedStyles.removeKey(property);
    } else {
      delete io.element.style[property];
    }
  };
  /**
   * Restore temporarily reset styles on an element.
   *
   * @param io Element
   */


  Interaction.prototype.restoreAllStyles = function (io) {
    _utils_Iterator__WEBPACK_IMPORTED_MODULE_15__.each(io.replacedStyles.iterator(), function (a) {
      var key = a[0];
      var value = a[1];
      io.element.style[key] = value;
      io.replacedStyles.removeKey(key);
    });
  };
  /**
   * Disposes this object and cleans up after itself.
   */


  Interaction.prototype.dispose = function () {
    if (!this.isDisposed()) {
      _super.prototype.dispose.call(this);

      this.restoreAllStyles(this.body);
      this.unlockWheel();
    }
  }; // @ts-ignore Used for debugging


  Interaction.prototype.log = function (text, ev, io) {
    var show = true;

    if (show) {
      // Touchlist?
      if (ev.changedTouches) {
        for (var i = 0; i < ev.changedTouches.length; i++) {
          this.logTouch(text, ev.type, ev.changedTouches[i]);
        }

        return;
      } // Get type


      var type = "";

      if (ev.pointerType) {
        switch (ev.pointerType) {
          case 2:
            type = "touch";
            break;

          case 4:
            type = "mouse";
            break;

          default:
            type = ev.pointerType;
            break;
        }
      } else if (typeof TouchEvent != "undefined" && ev instanceof TouchEvent) {
        type = "touch";
      } else if (ev.type.match(/^mouse/)) {
        type = "mouse";
      } else {
        type = "???";
      } // Get ID


      var id = "";

      if (_utils_Type__WEBPACK_IMPORTED_MODULE_16__.hasValue(ev.identifier)) {
        id = ev.identifier;
      } else if (_utils_Type__WEBPACK_IMPORTED_MODULE_16__.hasValue(ev.pointerId)) {
        id = ev.pointerId;
      } else {
        id = "???";
      }

      if (io) {
        console.log(text + " (" + io.uid + ")  " + ev.type + "  " + type + "  " + id);
      } else {
        console.log(text + "  " + ev.type + "  " + type + "  " + id);
      }
    }
  };
  /**
   * Checks whether there are currently any objects being transformed (dragged
   * or resized).
   *
   * If `except` is set, that object will be ignored.
   *
   * @since 4.9.3
   * @param   except  Ignore this object(s)
   * @return          Objects are being transformed
   */


  Interaction.prototype.areTransformed = function (except) {
    var count = this.transformedObjects.length;

    if (except) {
      var ex = _utils_Type__WEBPACK_IMPORTED_MODULE_16__.isArray(except) ? except : [except];

      for (var i = 0; i < ex.length; i++) {
        if (this.transformedObjects.contains(ex[i])) {
          count--;
        }
      }
    }

    return count > 0;
  };
  /**
   * Log.
   */


  Interaction.prototype.logTouch = function (text, type, ev) {
    console.log(text + "  " + type + "  " + "touch" + "  " + ev.identifier);
  };

  Object.defineProperty(Interaction, "passiveSupported", {
    /**
     * Indicates if passive mode options is supported by this browser.
     */
    get: function get() {
      var _this = this;

      if (this._passiveSupported == null) {
        // Check for passive mode support
        try {
          var options_1 = Object.defineProperty({}, "passive", {
            get: function get() {
              _this._passiveSupported = true;
            }
          });
          window.addEventListener("test", options_1, options_1);
          window.removeEventListener("test", options_1, options_1);
        } catch (err) {
          this._passiveSupported = false;
        }
      }

      return this._passiveSupported;
    },
    enumerable: true,
    configurable: true
  });
  return Interaction;
}(_Base__WEBPACK_IMPORTED_MODULE_0__.BaseObjectEvents);


var interaction = null;
/**
 * Returns a single unified global instance of [[Interaction]].
 *
 * All code should use this function, rather than create their own instances
 * of [[Interaction]].
 */

function getInteraction() {
  if (interaction == null) {
    interaction = new Interaction();
  }

  return interaction;
}

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/interaction/InteractionKeyboardObject.js":
/*!**************************************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/interaction/InteractionKeyboardObject.js ***!
  \**************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "InteractionKeyboardObject": () => (/* binding */ InteractionKeyboardObject)
/* harmony export */ });
/* harmony import */ var _Interaction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Interaction */ "./node_modules/@amcharts/amcharts4/.internal/core/interaction/Interaction.js");
/* harmony import */ var _System__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../System */ "./node_modules/@amcharts/amcharts4/.internal/core/System.js");
/* harmony import */ var _utils_Array__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/Array */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Array.js");
/**
 * Functionality related simulating of dragging of elements using keyboard.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */



/**
 * [[InteractionKeyboardObject]] is used to simulate dragging of the `draggable`
 * element using keyboard arrows.
 *
 * @ignore Exclude from docs
 */

var InteractionKeyboardObject =
/** @class */
function () {
  /**
   * Constructor.
   *
   * @param io An InteractionObject
   */
  function InteractionKeyboardObject(io, ev) {
    /**
     * Indicates if this object has already been deleted. Any
     * destruction/disposal code should take this into account when deciding
     * wheter to run potentially costly disposal operations if they already have
     * been run.
     */
    this._disposed = false;
    /**
     * Indicates direction of current horizontal movement.
     *
     * 0 - not moving horizontally
     * 1 - moving right
     * -1 - moving left
     */

    this.directionX = 0;
    /**
     * Indicates direction of current vertical movement.
     *
     * 0 - not moving vertically
     * 1 - moving down
     * -1 - moving up
     */

    this.directionY = 0;
    this.interaction = io;
    this.keyboardEvent = ev;
    this._startedOn = new Date().getTime();
    (0,_Interaction__WEBPACK_IMPORTED_MODULE_0__.getInteraction)().processDragStart(io);
    _System__WEBPACK_IMPORTED_MODULE_1__.system.animations.push(this);
    this.update();
  }
  /**
   * It's an update method which is called by the system if
   * [[InteractionObject]] is used as animation.
   *
   * This will update coordinates of the element based on the movement
   * directions.
   */


  InteractionKeyboardObject.prototype.update = function () {
    // Init and get settings
    var io = this.interaction;
    var speed = (0,_Interaction__WEBPACK_IMPORTED_MODULE_0__.getInteraction)().getKeyboardOption(io, "speed"),
        accelleration = (0,_Interaction__WEBPACK_IMPORTED_MODULE_0__.getInteraction)().getKeyboardOption(io, "accelleration"),
        accellerationDelay = (0,_Interaction__WEBPACK_IMPORTED_MODULE_0__.getInteraction)().getKeyboardOption(io, "accellerationDelay"),
        shift = {
      x: 0,
      y: 0
    }; // If SHIFT key is pressed we slash speed by half and disable accelleration

    if (this.keyboardEvent.shiftKey) {
      speed *= 0.5;
      accelleration = 1;
    } // If CTRL is pressed we increase speed by x2
    else if (this.keyboardEvent.ctrlKey) {
      speed *= 2;
    } // Get elapsed time


    var ms = new Date().getTime() - this._startedOn;

    var accelleratedMs = ms - accellerationDelay; // Add accellerated movement

    if (accelleration > 0 && accelleratedMs > 0) {
      var accellerationFactor = ms / accellerationDelay;
      ms = accellerationDelay;
      shift.x += this.directionX * (speed * accelleration * accellerationFactor * accelleratedMs);
      shift.y += this.directionY * (speed * accelleration * accellerationFactor * accelleratedMs);
    } // Calculate position


    shift.x += this.directionX * (speed * ms);
    shift.y += this.directionY * (speed * ms); // Simulate move on Interaction

    (0,_Interaction__WEBPACK_IMPORTED_MODULE_0__.getInteraction)().handleTransformMove(io, shift, {
      x: 0,
      y: 0
    }, this.keyboardEvent, true, false);
  };
  /**
   * Returns if this object has been already been disposed.
   *
   * @return Is disposed?
   */


  InteractionKeyboardObject.prototype.isDisposed = function () {
    return this._disposed;
  };
  /**
   * Disposes this object. Removes from system animations.
   */


  InteractionKeyboardObject.prototype.dispose = function () {
    if (!this._disposed) {
      (0,_Interaction__WEBPACK_IMPORTED_MODULE_0__.getInteraction)().processDragStop(this.interaction);
      _utils_Array__WEBPACK_IMPORTED_MODULE_2__.remove(_System__WEBPACK_IMPORTED_MODULE_1__.system.animations, this);
    }
  };

  return InteractionKeyboardObject;
}();



/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/interaction/InteractionObject.js":
/*!******************************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/interaction/InteractionObject.js ***!
  \******************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "InteractionObject": () => (/* binding */ InteractionObject),
/* harmony export */   "InteractionObjectEventDispatcher": () => (/* reexport safe */ _InteractionObjectEvents__WEBPACK_IMPORTED_MODULE_0__.InteractionObjectEventDispatcher)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _InteractionObjectEvents__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./InteractionObjectEvents */ "./node_modules/@amcharts/amcharts4/.internal/core/interaction/InteractionObjectEvents.js");
/* harmony import */ var _Base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Base */ "./node_modules/@amcharts/amcharts4/.internal/core/Base.js");
/* harmony import */ var _utils_List__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/List */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/List.js");
/* harmony import */ var _utils_Dictionary__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/Dictionary */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Dictionary.js");
/* harmony import */ var _Interaction__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Interaction */ "./node_modules/@amcharts/amcharts4/.internal/core/interaction/Interaction.js");
/* harmony import */ var _utils_Type__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/**
 * Interaction Object module
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */







/**
 * Re-exports
 */


/**
 * Interaction object represents an object that is subject for any kind of
 * interaction with it with any input devices: mouse, touch or keyboard.
 *
 * Any DOM element can be wrapped into an Internaction object which in turn
 * enables attaching various interaction events to it, such as: hit, drag,
 * swipe, etc.
 *
 * To create an [[InteractionObject]] out of a [[Sprite]], use:
 * `interaction.getInteractionFromSprite(sprite: Sprite)`
 *
 * To create an [[InteractionObject]] out of a a regular element:
 * `interaction.getInteraction(element: HTMLElement)`
 */

var InteractionObject =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_6__.__extends)(InteractionObject, _super);
  /**
   * Constructor
   */


  function InteractionObject(element) {
    var _this = _super.call(this) || this;
    /**
     * @ignore
     * An [[EventDispatcher]] instance which holds events for this object
     */


    _this._eventDispatcher = new _InteractionObjectEvents__WEBPACK_IMPORTED_MODULE_0__.InteractionObjectEventDispatcher(_this);
    /**
     * Collection of Disposers for various events. (so that those get disposed
     * when the whole InteractionObject is disposed)
     *
     * @ignore Exclude from docs
     */

    _this.eventDisposers = new _utils_Dictionary__WEBPACK_IMPORTED_MODULE_3__.Dictionary();
    /**
     * A [[Dictionary]] that holds temporarily replaced original style values for
     * HTML element, so that they can be restored when the functionality that
     * replaced them is done.
     *
     * @ignore Exclude from docs
     */

    _this.replacedStyles = new _utils_Dictionary__WEBPACK_IMPORTED_MODULE_3__.Dictionary();
    _this._clickable = false;
    _this._contextMenuDisabled = false;
    _this._hoverable = false;
    _this._trackable = false;
    _this._draggable = false;
    _this._swipeable = false;
    _this._resizable = false;
    _this._wheelable = false;
    _this._inert = false;
    /**
     * Is element currently hovered?
     */

    _this._isHover = false;
    /**
     * Was this element hovered via pointer or is it just "pretenting" to be
     * hovered.
     *
     * @ignore
     */

    _this.isRealHover = false;
    /**
     * Is the element hovered by touch pointer?
     */

    _this._isHoverByTouch = false;
    /**
     * Has element got any pointers currently pressing down on it?
     */

    _this._isDown = false;
    /**
     * Does element have focus?
     */

    _this._isFocused = false;
    /**
     * Is element currently protected from touch interactions?
     */

    _this._isTouchProtected = false;
    /**
     * Options used for inertia functionality.
     */

    _this._inertiaOptions = new _utils_Dictionary__WEBPACK_IMPORTED_MODULE_3__.Dictionary();
    /**
     * A collection of different inertia types, currently playing out.
     *
     * @ignore Exclude from docs
     */

    _this.inertias = new _utils_Dictionary__WEBPACK_IMPORTED_MODULE_3__.Dictionary();
    /**
     * Click/tap options.
     */

    _this._hitOptions = {};
    /**
     * Hover options.
     */

    _this._hoverOptions = {};
    /**
     * Swipe gesture options.
     */

    _this._swipeOptions = {};
    /**
     * Keyboard options.
     */

    _this._keyboardOptions = {};
    /**
     * Mouse options.
     */

    _this._mouseOptions = {};
    /**
     * Cursor options.
     */

    _this._cursorOptions = {
      "defaultStyle": [{
        "property": "cursor",
        "value": "default"
      }]
    };

    _this._disposers.push(_this._eventDispatcher);

    _this._element = element;
    _this.className = "InteractionObject";

    _this._disposers.push(new _utils_Dictionary__WEBPACK_IMPORTED_MODULE_3__.DictionaryDisposer(_this.inertias));

    _this._disposers.push(new _utils_Dictionary__WEBPACK_IMPORTED_MODULE_3__.DictionaryDisposer(_this.eventDisposers));

    _this.applyTheme();

    return _this;
  }

  ;
  Object.defineProperty(InteractionObject.prototype, "events", {
    /**
     * An [[EventDispatcher]] instance which holds events for this object
     */
    get: function get() {
      return this._eventDispatcher;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(InteractionObject.prototype, "isHover", {
    /**
     * @return Hovered?
     */
    get: function get() {
      return this._isHover;
    },

    /**
     * Indicates if this element is currently hovered.
     *
     * @param value Hovered?
     */
    set: function set(value) {
      if (this.isHover != value) {
        this._isHover = value;

        if (value) {
          (0,_Interaction__WEBPACK_IMPORTED_MODULE_4__.getInteraction)().overObjects.moveValue(this);
        } else {
          this.isRealHover = false;
          (0,_Interaction__WEBPACK_IMPORTED_MODULE_4__.getInteraction)().overObjects.removeValue(this);
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(InteractionObject.prototype, "isHoverByTouch", {
    /**
     * @return Hovered?
     */
    get: function get() {
      return this._isHoverByTouch;
    },

    /**
     * Indicates if this element is currently hovered.
     *
     * @param value Hovered?
     */
    set: function set(value) {
      if (this.isHoverByTouch != value) {
        this._isHoverByTouch = value;
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(InteractionObject.prototype, "overPointers", {
    /**
     * A list of pointers currently over the element.
     *
     * @see {@link Pointer}
     * @return List if pointers currently hovering the element
     */
    get: function get() {
      if (!this._overPointers) {
        this._overPointers = new _utils_List__WEBPACK_IMPORTED_MODULE_2__.List();
      }

      return this._overPointers;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(InteractionObject.prototype, "isDown", {
    /**
     * @return Has down pointers?
     */
    get: function get() {
      return this._isDown;
    },

    /**
     * Indicates if this element has currently any pointers pressing on it.
     *
     * @param value Has down pointers?
     */
    set: function set(value) {
      if (this.isDown != value) {
        this._isDown = value;

        if (value) {
          (0,_Interaction__WEBPACK_IMPORTED_MODULE_4__.getInteraction)().downObjects.moveValue(this);
        } else {
          (0,_Interaction__WEBPACK_IMPORTED_MODULE_4__.getInteraction)().downObjects.removeValue(this);
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(InteractionObject.prototype, "downPointers", {
    /**
     * A list of pointers currently pressing down on this element.
     *
     * @see {@link Pointer}
     * @return List of down pointers
     */
    get: function get() {
      if (!this._downPointers) {
        this._downPointers = new _utils_List__WEBPACK_IMPORTED_MODULE_2__.List();
      }

      return this._downPointers;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(InteractionObject.prototype, "isFocused", {
    /**
     * @return Focused?
     */
    get: function get() {
      return this._isFocused;
    },

    /**
     * Indicates if this element is currently focused.
     *
     * @param value Focused?
     */
    set: function set(value) {
      if (this.isFocused != value) {
        this._isFocused = value;

        if (value) {
          (0,_Interaction__WEBPACK_IMPORTED_MODULE_4__.getInteraction)().focusedObject = this;
        } else {
          (0,_Interaction__WEBPACK_IMPORTED_MODULE_4__.getInteraction)().focusedObject = undefined;
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(InteractionObject.prototype, "isTouchProtected", {
    /**
     * @ignore
     * @return Touch protected?
     */
    get: function get() {
      return this._isTouchProtected;
    },

    /**
     * Indicates if this element is currently being protected from touch actions.
     *
     * @ignore
     * @param value Touch protected?
     */
    set: function set(value) {
      if (this._isTouchProtected != value) {
        this._isTouchProtected = value;

        if (value) {
          (0,_Interaction__WEBPACK_IMPORTED_MODULE_4__.getInteraction)().unprepElement(this);
        } else if (this.draggable || this.swipeable || this.trackable || this.resizable) {
          (0,_Interaction__WEBPACK_IMPORTED_MODULE_4__.getInteraction)().prepElement(this);
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(InteractionObject.prototype, "clickable", {
    /**
     * @return Clickable?
     */
    get: function get() {
      return this._clickable;
    },

    /**
     * Is element clickable? Clickable elements will generate "hit" events when
     * clicked or tapped.
     *
     * @param value Clickable?
     */
    set: function set(value) {
      if (this._clickable !== value) {
        this._clickable = value;
        (0,_Interaction__WEBPACK_IMPORTED_MODULE_4__.getInteraction)().processClickable(this);
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(InteractionObject.prototype, "contextMenuDisabled", {
    /**
     * @return Context menu disabled?
     */
    get: function get() {
      return this._contextMenuDisabled;
    },

    /**
     * Should element prevent context menu to be displayed, e.g. when
     * right-clicked?
     *
     * @default false
     * @param value Context menu disabled?
     */
    set: function set(value) {
      if (this._contextMenuDisabled !== value) {
        this._contextMenuDisabled = value;
        (0,_Interaction__WEBPACK_IMPORTED_MODULE_4__.getInteraction)().processContextMenu(this);
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(InteractionObject.prototype, "hoverable", {
    /**
     * @return Hoverable?
     */
    get: function get() {
      return this._hoverable;
    },

    /**
     * Indicates if element should generate hover events.
     *
     * @param value Hoverable?
     */
    set: function set(value) {
      if (this._hoverable !== value) {
        this._hoverable = value;
        (0,_Interaction__WEBPACK_IMPORTED_MODULE_4__.getInteraction)().processHoverable(this);
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(InteractionObject.prototype, "trackable", {
    /**
     * @return Track pointer?
     */
    get: function get() {
      return this._trackable;
    },

    /**
     * Indicates if pointer movement over element should be tracked.
     *
     * @param value Track pointer?
     */
    set: function set(value) {
      if (this._trackable !== value) {
        this._trackable = value;
        (0,_Interaction__WEBPACK_IMPORTED_MODULE_4__.getInteraction)().processTrackable(this);
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(InteractionObject.prototype, "draggable", {
    /**
     * @return Draggable?
     */
    get: function get() {
      return this._draggable;
    },

    /**
     * Indicates if element can be dragged. (moved)
     *
     * @param value Draggable?
     */
    set: function set(value) {
      if (this._draggable !== value) {
        this._draggable = value;
        (0,_Interaction__WEBPACK_IMPORTED_MODULE_4__.getInteraction)().processDraggable(this);
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(InteractionObject.prototype, "swipeable", {
    /**
     * @return Track swipe?
     */
    get: function get() {
      return this._swipeable;
    },

    /**
     * Indicates whether element should react to swipe gesture.
     *
     * @param value Track swipe?
     */
    set: function set(value) {
      if (this._swipeable !== value) {
        this._swipeable = value;
        (0,_Interaction__WEBPACK_IMPORTED_MODULE_4__.getInteraction)().processSwipeable(this);
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(InteractionObject.prototype, "resizable", {
    /**
     * @return Resizeble?
     */
    get: function get() {
      return this._resizable;
    },

    /**
     * Indicates if element can be resized.
     *
     * @param value Resizeable?
     */
    set: function set(value) {
      if (this._resizable !== value) {
        this._resizable = value;
        (0,_Interaction__WEBPACK_IMPORTED_MODULE_4__.getInteraction)().processResizable(this);
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(InteractionObject.prototype, "wheelable", {
    /**
     * @return Track wheel?
     */
    get: function get() {
      return this._wheelable;
    },

    /**
     * Indicates whether track moouse wheel rotation over element.
     *
     * @param value Track wheel?
     */
    set: function set(value) {
      if (this._wheelable !== value) {
        this._wheelable = value;
        (0,_Interaction__WEBPACK_IMPORTED_MODULE_4__.getInteraction)().processWheelable(this);
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(InteractionObject.prototype, "inert", {
    /**
     * @return Inert?
     */
    get: function get() {
      return this._inert;
    },

    /**
     * Indicates if element is inert, i.e. if it should carry movement momentum
     * after it is dragged and released.
     *
     * @param value Inert?
     */
    set: function set(value) {
      if (this._inert !== value) {
        this._inert = value;
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(InteractionObject.prototype, "focusable", {
    /**
     * @return Focusable?
     */
    get: function get() {
      return this._focusable;
    },

    /**
     * Indicates if element can gain focus.
     *
     * @param value Focusable?
     */
    set: function set(value) {
      if (this._focusable !== value) {
        this._focusable = value;

        if (this._focusable && this.tabindex == -1) {
          this._tabindex = 1;
        }

        (0,_Interaction__WEBPACK_IMPORTED_MODULE_4__.getInteraction)().processFocusable(this);
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(InteractionObject.prototype, "tabindex", {
    /**
     * @return Tab index
     */
    get: function get() {
      return _utils_Type__WEBPACK_IMPORTED_MODULE_5__.getValueDefault(this._tabindex, -1);
    },

    /**
     * Element's tab index.
     *
     * @param value Tab index
     */
    set: function set(value) {
      if (this._tabindex !== value) {
        this._tabindex = value;

        if (value > -1) {
          this.focusable = true;
        }

        (0,_Interaction__WEBPACK_IMPORTED_MODULE_4__.getInteraction)().processFocusable(this);
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(InteractionObject.prototype, "element", {
    /**
     * @return Element
     */
    get: function get() {
      return this._element;
    },

    /**
     * A DOM element associated with this element.
     *
     * @param element Element
     */
    set: function set(element) {
      this._element = element;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(InteractionObject.prototype, "originalPosition", {
    /**
     * @ignore Exclude from docs
     * @return Position.
     */
    get: function get() {
      return this._originalPosition || {
        x: 0,
        y: 0
      };
    },

    /**
     * Element's original position.
     *
     * @ignore Exclude from docs
     * @param value Position
     */
    set: function set(value) {
      this._originalPosition = value;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(InteractionObject.prototype, "originalScale", {
    /**
     * @return Scale
     */
    get: function get() {
      return _utils_Type__WEBPACK_IMPORTED_MODULE_5__.getValueDefault(this._originalScale, 1);
    },

    /**
     * Element's original scale.
     *
     * @ignore Exclude from docs
     * @param value Scale
     */
    set: function set(value) {
      if (this._originalScale !== value) {
        this._originalScale = value;
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(InteractionObject.prototype, "originalAngle", {
    /**
     * @return Angle
     */
    get: function get() {
      return _utils_Type__WEBPACK_IMPORTED_MODULE_5__.getValueDefault(this._originalAngle, 0);
    },

    /**
     * Element's original angle.
     *
     * @ignore Exclude from docs
     * @param value Angle
     */
    set: function set(value) {
      if (this._originalAngle !== value) {
        this._originalAngle = value;
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(InteractionObject.prototype, "inertiaOptions", {
    /**
     * @return Options
     */
    get: function get() {
      if (this.sprite && this.sprite._adapterO) {
        return this.sprite._adapterO.apply("inertiaOptions", this._inertiaOptions);
      } else {
        return this._inertiaOptions;
      }
    },

    /**
     * Inertia options.
     *
     * @param value  Options
     */
    set: function set(value) {
      this._inertiaOptions = value;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(InteractionObject.prototype, "hitOptions", {
    /**
     * @return Options
     */
    get: function get() {
      if (this.sprite && this.sprite._adapterO) {
        return this.sprite._adapterO.apply("hitOptions", this._hitOptions);
      } else {
        return this._hitOptions;
      }
    },

    /**
     * Hit options.
     *
     * @param value  Options
     */
    set: function set(value) {
      this._hitOptions = value;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(InteractionObject.prototype, "hoverOptions", {
    /**
     * @return Options
     */
    get: function get() {
      if (this.sprite && this.sprite._adapterO) {
        return this.sprite._adapterO.apply("hoverOptions", this._hoverOptions);
      } else {
        return this._hoverOptions;
      }
    },

    /**
     * Hover options.
     *
     * @param value  Options
     */
    set: function set(value) {
      this._hoverOptions = value;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(InteractionObject.prototype, "swipeOptions", {
    /**
     * @return Options
     */
    get: function get() {
      if (this.sprite && this.sprite._adapterO) {
        return this.sprite._adapterO.apply("swipeOptions", this._swipeOptions);
      } else {
        return this._swipeOptions;
      }
    },

    /**
     * Swipe options.
     *
     * @param value  Options
     */
    set: function set(value) {
      this._swipeOptions = value;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(InteractionObject.prototype, "keyboardOptions", {
    /**
     * @return Options
     */
    get: function get() {
      if (this.sprite && this.sprite._adapterO) {
        return this.sprite._adapterO.apply("keyboardOptions", this._keyboardOptions);
      } else {
        return this._keyboardOptions;
      }
    },

    /**
     * Keyboard options.
     *
     * @param value  Options
     */
    set: function set(value) {
      this._keyboardOptions = value;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(InteractionObject.prototype, "mouseOptions", {
    /**
     * @return Options
     */
    get: function get() {
      if (this.sprite && this.sprite._adapterO) {
        return this.sprite._adapterO.apply("mouseOptions", this._mouseOptions);
      } else {
        return this._mouseOptions;
      }
    },

    /**
     * Mouse options.
     *
     * Enables controlling options related to the mouse, for example sensitivity
     * of its mouse wheel.
     *
     * E.g. the below will reduce chart's wheel-zoom speed to half its default
     * speed:
     *
     * ```TypeScript
     * chart.plotContainer.mouseOptions.sensitivity = 0.5;
     * ```
     * ```JavaScript
     * chart.plotContainer.mouseOptions.sensitivity = 0.5;
     * ```
     * ```JSON
     * {
     *   // ...
     *   "plotContainer": {
     *     "mouseOptions": {
     *       "sensitivity": 0.5
     *     }
     *   }
     * }
     * ```
     *
     * @since 4.5.14
     * @param value  Options
     */
    set: function set(value) {
      this._mouseOptions = value;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(InteractionObject.prototype, "cursorOptions", {
    /**
     * @return Options
     */
    get: function get() {
      if (this.sprite && this.sprite._adapterO) {
        return this.sprite._adapterO.apply("cursorOptions", this._cursorOptions);
      } else {
        return this._cursorOptions;
      }
    },

    /**
     * Cursor options.
     *
     * @param value  Options
     */
    set: function set(value) {
      this._cursorOptions = value;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Copies all properties and related assets from another object of the same
   * type.
   *
   * @param source Source object
   */

  InteractionObject.prototype.copyFrom = function (source) {
    _super.prototype.copyFrom.call(this, source);

    this.inertiaOptions = source.inertiaOptions;
    this.hitOptions = source.hitOptions;
    this.hoverOptions = source.hoverOptions;
    this.swipeOptions = source.swipeOptions;
    this.keyboardOptions = source.keyboardOptions;
    this.cursorOptions = source.cursorOptions;
    this.contextMenuDisabled = source.contextMenuDisabled;
    (0,_Interaction__WEBPACK_IMPORTED_MODULE_4__.getInteraction)().applyCursorOverStyle(this);
  };
  /**
   * @ignore Exclude from docs
   */


  InteractionObject.prototype.setEventDisposer = function (key, value, f) {
    var disposer = this.eventDisposers.getKey(key);

    if (value) {
      if (disposer == null) {
        this.eventDisposers.setKey(key, f());
      }
    } else {
      if (disposer != null) {
        disposer.dispose();
        this.eventDisposers.removeKey(key);
      }
    }
  };
  /**
   * Disposes object.
   */


  InteractionObject.prototype.dispose = function () {
    _super.prototype.dispose.call(this); // Remove from all interaction registries


    var interaction = (0,_Interaction__WEBPACK_IMPORTED_MODULE_4__.getInteraction)();
    interaction.overObjects.removeValue(this);
    interaction.downObjects.removeValue(this);
    interaction.trackedObjects.removeValue(this);
    interaction.transformedObjects.removeValue(this); // Unlock document wheel

    if (this.isHover && this.wheelable) {
      interaction.unlockWheel();
    }

    if (interaction.focusedObject === this) {
      interaction.focusedObject = undefined;
    }
  };

  return InteractionObject;
}(_Base__WEBPACK_IMPORTED_MODULE_1__.BaseObjectEvents);



/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/interaction/InteractionObjectEvents.js":
/*!************************************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/interaction/InteractionObjectEvents.js ***!
  \************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "InteractionObjectEventDispatcher": () => (/* binding */ InteractionObjectEventDispatcher)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _utils_EventDispatcher__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/EventDispatcher */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/EventDispatcher.js");
/* harmony import */ var _utils_Disposer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/Disposer */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Disposer.js");



/**
 * Represents an Event Dispatcher for [[InteractionObject]].
 *
 * Besides regular [[EventDispatcher]] functionality it adds new events with
 * direct application to DOM nodes. Primarily used to handle keyboard events,
 * but can turn into something else moving forward.
 */

var InteractionObjectEventDispatcher =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(InteractionObjectEventDispatcher, _super);

  function InteractionObjectEventDispatcher() {
    var _this = _super !== null && _super.apply(this, arguments) || this;
    /**
     * Holds a list of Disposers for DOM events added.
     */


    _this._domEvents = {};
    return _this;
  }
  /**
   * Adds a DOM event and returns Disposer.
   *
   * @return Disposer
   */


  InteractionObjectEventDispatcher.prototype._addDOMEvent = function (type, key, listener, context) {
    var _this = this;

    if (!this._domEvents[type]) {
      var callback_1 = function callback_1(e) {
        listener.call(context, key, e);
      };

      this.target.element.addEventListener(type, callback_1, false);
      this._domEvents[type] = new _utils_Disposer__WEBPACK_IMPORTED_MODULE_1__.CounterDisposer(function () {
        delete _this._domEvents[type];

        _this.target.element.removeEventListener(type, callback_1, false);
      });
    }

    return this._domEvents[type].increment();
  };

  InteractionObjectEventDispatcher.prototype._dispatchKeyboardEvent = function (key, ev) {
    // TODO use this.dispatchImmediately ?
    if (this.target.events.isEnabled(key)) {
      this.target.events.dispatchImmediately(key, {
        type: key,
        target: this.target,
        event: ev
      });
    }
  };

  InteractionObjectEventDispatcher.prototype._on = function (once, type, callback, context, shouldClone, dispatch) {
    var info = _super.prototype._on.call(this, once, type, callback, context, shouldClone, dispatch);

    var disposers = [info.disposer];

    switch (type) {
      case "hit":
      case "doublehit":
      case "rightclick":
      case "down":
      case "up":
        this.target.clickable = true;
        break;

      case "drag":
      case "dragstart":
      case "dragstop":
        this.target.draggable = true;
        break;

      case "track":
        this.target.trackable = true;
        break;

      case "resize":
        this.target.resizable = true;
        break;

      case "swipe":
      case "swipeleft":
      case "swiperight":
        this.target.swipeable = true;
        break;

      case "wheel":
      case "wheelup":
      case "wheeldown":
      case "wheelleft":
      case "wheelright":
        this.target.wheelable = true;
        break;

      case "over":
      case "out":
        this.target.hoverable = true;
        break;

      case "focus":
      case "blur":
      case "focusin":
      case "focusout":
        this.target.focusable = true;
        break;

      case "keydown":
        disposers.push(this._addDOMEvent(type, type, this._dispatchKeyboardEvent, this));
        break;

      case "keyup":
        disposers.push(this._addDOMEvent(type, type, this._dispatchKeyboardEvent, this));
        break;

      case "keypress":
        disposers.push(this._addDOMEvent(type, type, this._dispatchKeyboardEvent, this));
        break;

      case "input":
        disposers.push(this._addDOMEvent(type, type, this._dispatchKeyboardEvent, this));
        break;
    }

    info.disposer = new _utils_Disposer__WEBPACK_IMPORTED_MODULE_1__.MultiDisposer(disposers);
    return info;
  };

  return InteractionObjectEventDispatcher;
}(_utils_EventDispatcher__WEBPACK_IMPORTED_MODULE_0__.TargetedEventDispatcher);



/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/interaction/Mouse.js":
/*!******************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/interaction/Mouse.js ***!
  \******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "MouseCursorStyle": () => (/* binding */ MouseCursorStyle)
/* harmony export */ });
/**
 * Mouse-related functionality
 */

/**
 * Defines static methods that hold style list for various mouse cursor styles,
 * maintaining browser compatibility.
 */
var MouseCursorStyle =
/** @class */
function () {
  function MouseCursorStyle() {}
  /**
   * Styles for "grab" mouse cursor.
   */


  MouseCursorStyle.grab = [{
    "property": "cursor",
    "value": "move"
  }, {
    "property": "cursor",
    "value": "grab"
  }, {
    "property": "cursor",
    "value": "-webkit-grab"
  }];
  /**
   * Styles for "grabbing" mouse cursor.
   */

  MouseCursorStyle.grabbing = [{
    "property": "cursor",
    "value": "move"
  }, {
    "property": "cursor",
    "value": "grabbing"
  }, {
    "property": "cursor",
    "value": "-webkit-grabbing"
  }];
  /**
   * Styles for "pointer" mouse cursor. (usually used for links)
   */

  MouseCursorStyle.pointer = [{
    "property": "cursor",
    "value": "pointer"
  }];
  /**
   * Styles for default mouse cursor. (browser determines style)
   */

  MouseCursorStyle.default = [{
    "property": "cursor",
    "value": "default"
  }];
  /**
   * Styles for horizontal bi-directional resize mouse cursor.
   */

  MouseCursorStyle.horizontalResize = [{
    "property": "cursor",
    "value": "ew-resize"
  }];
  /**
   * Styles for vertical bi-directional mouse cursor.
   */

  MouseCursorStyle.verticalResize = [{
    "property": "cursor",
    "value": "ns-resize"
  }];
  /**
   * Styles for "no-allowed" cursor.
   * @since 4.7.15
   */

  MouseCursorStyle.notAllowed = [{
    "property": "cursor",
    "value": "not-allowed"
  }];
  /**
   * Styles for "text" cursor.
   * @since 4.9.12
   */

  MouseCursorStyle.text = [{
    "property": "cursor",
    "value": "text"
  }];
  return MouseCursorStyle;
}();



/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/AMElement.js":
/*!********************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/rendering/AMElement.js ***!
  \********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "AMElement": () => (/* binding */ AMElement)
/* harmony export */ });
/* harmony import */ var _utils_DOM__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/DOM */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/DOM.js");
/* harmony import */ var _utils_Object__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/Object */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Object.js");
/* harmony import */ var _utils_Type__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/**
 * [[AMElement]] represents any SVG element and related functionality.
 */



/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * A base class for all SVG elements. Provides low-level DOM functionality.
 *
 * All visual elements extend this class.
 */

var AMElement =
/** @class */
function () {
  /**
   * Constructor creates a new element or uses the one that was passed in.
   *
   * @param element Element reference node type
   */
  function AMElement(element) {
    /**
     * Indicates if the element was already disposed.
     */
    this._isDisposed = false;
    /**
     * Current X coordinate.
     */

    this._x = 0;
    /**
     * Current Y coordinate.
     */

    this._y = 0;
    /**
     *
     */

    this._rotationY = 0;
    /**
     *
     */

    this._rotationX = 0;
    /**
     * Current rotation.
     */

    this._rotation = 0;
    /**
     * Current scale.
     */

    this._scale = 1;

    if (typeof element === "string") {
      this.node = document.createElementNS(_utils_DOM__WEBPACK_IMPORTED_MODULE_0__.SVGNS, element);
    } else {
      this.node = element;
    }
  }
  /**
   * Removes element's node from DOM.
   */


  AMElement.prototype.removeNode = function () {
    if (this.node) {
      if (this.node.parentNode) {
        this.node.parentNode.removeChild(this.node);
      }
    }
  };

  Object.defineProperty(AMElement.prototype, "transformString", {
    /**
     * Returns `transform` attribute of the element.
     *
     * @ignore Exclude from docs
     * @return Transform attribute value
     */
    get: function get() {
      if (this.node) {
        return this._transformString;
        /*
        const value = this.node.getAttribute("transform");
              if (value !== null) {
            return value;
        }*/
      }
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Appply position, rotation and scale properties via elemen's `transform`
   * property
   *
   * @ignore Exclude from docs
   */

  AMElement.prototype.transform = function () {
    var transfromString = "translate(" + this._x + "," + this._y + ")";

    if (this._scale != 1) {
      transfromString += (transfromString ? " " : "") + "scale(" + this._scale + ")";
    }

    if (this._rotation != 0) {
      var rotateString = "rotate(" + this._rotation + ")";

      if (this._rotationX && this._rotationY) {
        rotateString = "rotate(" + this._rotation + " " + this._rotationX + " " + this._rotationY + ")";
      }

      transfromString += (transfromString ? " " : "") + rotateString;
    }

    this._transformString = transfromString;
    this.node.setAttribute("transform", transfromString);
  };
  /**
   * Returns bounding box of the element.
   *
   * ATTENTION: Bounding box calculations are extremely costly so should be
   * used sparingly and cached whenever possible.
   *
   * @return Bounding rectangle
   */


  AMElement.prototype.getBBox = function () {
    var bbox = {
      width: 0,
      height: 0,
      x: 0,
      y: 0
    }; // FF would fail if getBBox() is called without node added to parent

    if (this.node && this.node.parentNode) {
      try {
        // again for ff. TODO: check if this doesn't slow down
        var svgbbox = this.node.getBBox();
        bbox.x = svgbbox.x;
        bbox.y = svgbbox.y;
        bbox.width = svgbbox.width;
        bbox.height = svgbbox.height;
      } catch (err) {}
    }

    return bbox;
  };
  /**
   * Moves the element to new coordinates.
   *
   * @param x  Target X
   * @param y  Target Y
   */


  AMElement.prototype.moveTo = function (point) {
    if (point) {
      var x = point.x;
      var y = point.y;

      if (this._x != x || this._y != y) {
        this._x = x;
        this._y = y;
        this.transform();
      }
    }
  };

  Object.defineProperty(AMElement.prototype, "content", {
    /**
     * Returns element's contents as SVG markup.
     *
     * @return Contents
     */
    get: function get() {
      // @todo Do not use `innerHTML` as this is not reliable and will not work on all browsers
      return this.node.innerHTML || "";
    },

    /**
     * Element's SVG contents.
     *
     * @param value Contents
     */
    set: function set(value) {
      // @todo Do not use `innerHTML` as this is not reliable and will not work on all browsers
      this.node.innerHTML = value;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(AMElement.prototype, "textContent", {
    /**
     * @return Text contents
     */
    get: function get() {
      return this.node.textContent || "";
    },

    /**
     * Text contents of the SVG element.
     *
     * @param value Text contents
     */
    set: function set(value) {
      this.node.textContent = value;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(AMElement.prototype, "x", {
    /**
     * @return X coordinate (px)
     */
    get: function get() {
      return this._x;
    },

    /**
     * Element's X position in pixels.
     *
     * @param value  X coordinate (px)
     */
    set: function set(value) {
      if (this._x != value) {
        this._x = value;
        this.transform();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(AMElement.prototype, "y", {
    /**
     * @return Y coordinate (px)
     */
    get: function get() {
      return this._y;
    },

    /**
     * Element's Y position in pixels.
     *
     * @param value Y coordinate (px)
     */
    set: function set(value) {
      if (this._y != value) {
        this._y = value;
        this.transform();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(AMElement.prototype, "rotation", {
    /**
     * @return Rotation
     */
    get: function get() {
      return this._rotation;
    },

    /**
     * Element's rotation in degrees.
     *
     * @param value Rotation
     */
    set: function set(angle) {
      if (this._rotation != angle) {
        this._rotation = angle;
        this.transform();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(AMElement.prototype, "rotationX", {
    /**
     * @ignore
     */
    get: function get() {
      return this._rotationX;
    },

    /**
     * @ignore
     */
    set: function set(x) {
      if (this._rotationX != x) {
        this._rotationX = x;
        this.transform();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(AMElement.prototype, "rotationY", {
    /**
     * @ignore
     */
    get: function get() {
      return this._rotationY;
    },

    /**
     * @ignore
     */
    set: function set(y) {
      if (this._rotationY != y) {
        this._rotationY = y;
        this.transform();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(AMElement.prototype, "scale", {
    /**
     * @return Scale
     */
    get: function get() {
      return this._scale;
    },

    /**
     * Element's scale where 1 is original size.
     *
     * Setting to 0.5 will reduce element's size by 50%, 2 will make element
     * twice as large, etc.
     *
     * @param value Scale
     */
    set: function set(value) {
      if (this._scale != value) {
        this._scale = value;
        this.transform();
      }
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Removes an attribute from element.
   *
   * @param attribute  Attribute to remove
   */

  AMElement.prototype.removeAttr = function (attribute) {
    this.node.removeAttribute(attribute);
  };
  /**
   * Sets a set of attributes on a element.
   *
   * @param attributes  An object with attribute names (key) and values
   * @return The same element
   */


  AMElement.prototype.attr = function (attributes) {
    var _this = this;

    _utils_Object__WEBPACK_IMPORTED_MODULE_1__.each(attributes, function (attributeName, attributeValue) {
      if (!_utils_Type__WEBPACK_IMPORTED_MODULE_2__.hasValue(attributeValue)) {
        _this.node.removeAttribute(attributeName);
      } else {
        // this is for performance testing
        //if(attributeValue == this.node.getAttribute(attributeName)){
        //	console.log(attributeName, attributeValue)
        //}
        _this.node.setAttribute(attributeName, attributeValue);
      }
    });
    return this;
  };
  /**
   * Returns a value of a node attribute.
   *
   * @param attribute  Attribute name
   * @return Attribute value
   */


  AMElement.prototype.getAttr = function (attribute) {
    return this.node.getAttribute(attribute);
  };
  /**
   * Sets a single attribute of the element's node using namesspace.
   *
   * @param ns         Namespace
   * @param attribute  Attribute
   * @param value      Value
   * @return The same element
   */


  AMElement.prototype.attrNS = function (ns, attribute, value) {
    this.node.setAttributeNS(ns, attribute, value);
    return this;
  };
  /**
   * Returns a namespaced attribute value from node.
   *
   * @param ns         Namespace
   * @param attribute  Attribute
   * @return Attribute value
   */


  AMElement.prototype.getAttrNS = function (ns, attribute) {
    return this.node.getAttributeNS(ns, attribute);
  };
  /**
   * Removes `style` attribute from node.
   *
   * @param attribute  Attribute to remove
   */


  AMElement.prototype.removeStyle = function (attribute) {
    // @todo Review because it's a bit messy and maybe not needed (pratically not used)
    this.node.style[attribute] = null;
    delete this.node.style[attribute];
  };
  /**
   * Returns style attribute value.
   *
   * @param attribute  Style attribute value
   * @return Attribute value
   */


  AMElement.prototype.getStyle = function (attribute) {
    // @todo Review because it's a bit messy and maybe not needed (pratically not used)
    return this.node.style[attribute];
  };
  /**
   * Adds style attributes to element's node.
   *
   * @param attributes  Object containing attribute: value pairs
   * @return The same element
   */


  AMElement.prototype.addStyle = function (attributes) {
    var _this = this; // @todo Review because it's a bit messy and maybe not needed (pratically not used)


    _utils_Object__WEBPACK_IMPORTED_MODULE_1__.each(attributes, function (attributeName, attributeValue) {
      if (!_utils_Type__WEBPACK_IMPORTED_MODULE_2__.hasValue(attributeValue)) {
        _this.removeStyle(attributeName);
      } else {
        _this.node.style[attributeName] = attributeValue;
      }
    });
    return this;
  };
  /**
   * Adds a class to element.
   *
   * @param name  Class name
   */


  AMElement.prototype.addClass = function (name) {
    _utils_DOM__WEBPACK_IMPORTED_MODULE_0__.addClass(this.node, name);
  };
  /**
   * Removes a class from element.
   *
   * @param name Class name
   */


  AMElement.prototype.removeClass = function (name) {
    _utils_DOM__WEBPACK_IMPORTED_MODULE_0__.removeClass(this.node, name);
  };
  /**
   * Sets a class name on element.
   *
   * @param name  Class name
   */


  AMElement.prototype.setClass = function (name) {
    this.node.setAttribute("class", name);
  };
  /**
   * Removes all element's child nodes, basically leaving it empty.
   */


  AMElement.prototype.removeChildNodes = function () {
    // remove all children
    while (this.node.childNodes.length > 0) {
      this.node.removeChild(this.node.firstChild);
    }
  };
  /**
   * Was this element already been disposed?
   *
   * @return Disposed?
   */


  AMElement.prototype.isDisposed = function () {
    return this._isDisposed;
  };
  /**
   * Disposes element.
   */


  AMElement.prototype.dispose = function () {
    this.removeNode();
  };

  return AMElement;
}();



/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Group.js":
/*!****************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/rendering/Group.js ***!
  \****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Group": () => (/* binding */ Group)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _AMElement__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AMElement */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/AMElement.js");

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */


/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Creates an SVG `<g>` element.
 *
 * SVG groups are used for elements that need more elements just one.
 *
 * @see {@link https://developer.mozilla.org/en-US/docs/Web/SVG/Element/g} About `<g>` element
 */

var Group =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__extends)(Group, _super);
  /**
   * Constructor.
   *
   * @param elementName Element type (should be "g")
   */


  function Group(elementName) {
    return _super.call(this, elementName) || this;
  }
  /**
   * Adds an element to group.
   *
   * This will manipulate DOM. `element` will be physically moved into group.
   *
   * @param element  Element
   */


  Group.prototype.add = function (element) {
    if (element) {
      this.node.appendChild(element.node);
    }
  };
  /**
   * Adds an element to group.
   *
   * This will manipulate DOM. `element` will be physically moved into group.
   *
   * @param element  Element
   */


  Group.prototype.addToBack = function (element) {
    if (element) {
      var first = this.node.childNodes[0];

      if (first) {
        if (first != element.node) {
          this.node.insertBefore(element.node, first);
        }
      } else {
        this.node.appendChild(element.node);
      }
    }
  };
  /**
   * Removes the `element` from group.
   *
   * Please note that this will not dispose the element itself, it will just
   * remove it from the group.
   *
   * @param element  Element
   */


  Group.prototype.removeElement = function (element) {
    // todo: not sure about the speed, need to investigate, maybe it's faster to check if node is a child
    if (element) {
      try {
        if (element.node && element.node.parentNode == this.node) {
          this.node.removeChild(element.node);
        }
      } catch (err) {}
    }
  };
  /**
   * Checks if this group already has the child element added
   *
   * @param element
   * @return {boolean}
   */


  Group.prototype.hasChild = function (element) {
    for (var i = 0; i < this.node.childNodes.length; i++) {
      if (this.node.childNodes[i] == element.node) {
        return true;
      }
    }

    return false;
  };

  Object.defineProperty(Group.prototype, "content", {
    /**
     * @return SVG markup
     */
    get: function get() {
      return this.node.innerHTML;
    },

    /**
     * Content of the group element.
     *
     * Can be used to add a lot of proprietary SVG markup into group.
     *
     * @param value  SVG markup
     */
    set: function set(value) {
      this.node.innerHTML = value;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Removes all children from the group.
   */

  Group.prototype.removeChildren = function () {
    if (this.node.childNodes) {
      while (this.node.childNodes.length > 0) {
        var childNode = this.node.firstChild;

        if (childNode && childNode.parentNode) {
          childNode.parentNode.removeChild(childNode);
        }
      }
    }
  };

  Group.prototype.removeChildrenByTag = function (tag) {
    if (this.node.childNodes) {
      var remove = this.node.getElementsByTagName(tag);

      for (var i = 0; i < remove.length; i++) {
        this.node.removeChild(remove[i]);
      }
    }
  };

  return Group;
}(_AMElement__WEBPACK_IMPORTED_MODULE_0__.AMElement);



/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Paper.js":
/*!****************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/rendering/Paper.js ***!
  \****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Paper": () => (/* binding */ Paper),
/* harmony export */   "getGhostPaper": () => (/* binding */ getGhostPaper)
/* harmony export */ });
/* harmony import */ var _AMElement__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AMElement */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/AMElement.js");
/* harmony import */ var _Group__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Group */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Group.js");
/* harmony import */ var _SVGContainer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./SVGContainer */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/SVGContainer.js");
/* harmony import */ var _utils_DOM__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/DOM */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/DOM.js");
/**
 * Paper class just like the white sheet of pressed fiber it draws its name
 * inspiration from is used as a starting point to start a drawing.
 *
 * Before we can start adding elements (drawing) we need to take out a new sheet
 * of paper, or in this instance create a blank SVG element.
 *
 * This class creates such element, as well as implements methods needed to
 * start adding elements to it.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */




/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Paper class which when instantiated will create an SVG element as well as
 * some of the sub-elements like `<desc>`, `<defs>`.
 *
 * Use its methods like `addGroup` and `append` to add elements to the paper.
 */

var Paper =
/** @class */
function () {
  /**
   * Creates main `<svg>` container and related elements.
   *
   * @param container A reference to HTML element to create `<svg>` in
   */
  function Paper(container, id) {
    // Store container reference
    this.container = container;
    this.id = id; // Create SVG element

    var svg = document.createElementNS(_utils_DOM__WEBPACK_IMPORTED_MODULE_3__.SVGNS, "svg");
    svg.setAttribute("version", "1.1");
    svg.setAttributeNS(_utils_DOM__WEBPACK_IMPORTED_MODULE_3__.XMLNS, "xmlns", _utils_DOM__WEBPACK_IMPORTED_MODULE_3__.SVGNS);
    svg.setAttributeNS(_utils_DOM__WEBPACK_IMPORTED_MODULE_3__.XMLNS, "xmlns:xlink", _utils_DOM__WEBPACK_IMPORTED_MODULE_3__.XLINK);
    svg.setAttribute("role", "group");
    this.container.appendChild(svg); // Add description
    //let desc: SVGElement = <SVGElement>document.createElementNS($dom.SVGNS, "desc");
    //desc.appendChild(document.createTextNode("JavaScript chart by amCharts"));
    //svg.appendChild(desc);
    // Add defs

    this.defs = document.createElementNS(_utils_DOM__WEBPACK_IMPORTED_MODULE_3__.SVGNS, "defs");
    svg.appendChild(this.defs); // Set width and height to fit container

    svg.style.width = "100%";
    svg.style.height = "100%";
    svg.style.overflow = "visible"; // Store variable

    this.svg = svg;
  }
  /**
   * Creates and returns a new element. Does not attach it to Paper yet.
   *
   * @param elementName  Element name
   * @return New element
   */


  Paper.prototype.add = function (elementName) {
    return new _AMElement__WEBPACK_IMPORTED_MODULE_0__.AMElement(elementName);
  };
  /**
   * Creates and returns a new Group element. Does not attach it to Paper.
   *
   * @param groupName  Element name
   * @return New Group
   */


  Paper.prototype.addGroup = function (groupName) {
    return new _Group__WEBPACK_IMPORTED_MODULE_1__.Group(groupName);
  };
  /**
   * Appends an element to Paper.
   *
   * @param element Element to append
   */


  Paper.prototype.append = function (element) {
    if (element) {
      this.svg.appendChild(element.node);
    }
  };
  /**
   * Appends an element to `<defs>` block of the Paper.
   *
   * @param element  Element
   */


  Paper.prototype.appendDef = function (element) {
    if (element) {
      this.defs.appendChild(element.node);
    }
  };
  /**
   * Creates and returns new `<foreignObject>` element. Does not append it to
   * Paper.
   *
   * @return A foreignObject element
   */


  Paper.prototype.foreignObject = function () {
    var element = new _AMElement__WEBPACK_IMPORTED_MODULE_0__.AMElement("foreignObject"); //this.append(element);

    return element;
  };
  /**
   * Checks if browser supports `<foreignObject>` elements.
   *
   * @return Supports `foreignObject`?
   */


  Paper.prototype.supportsForeignObject = function () {
    return document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Extensibility", "1.1");
  };

  return Paper;
}();


var ghostPaper = null;
/**
 * A [[Paper]] instance to create elements, that are not yet ready to be
 * placed in visible DOM.
 *
 * @ignore Exclude from docs
 */

function getGhostPaper() {
  if (ghostPaper === null) {
    // ghost is used to draw elements while real paper is not yet created or Sprite doesn't know parent yet
    var ghostDiv = document.createElement("div");
    ghostDiv.hidden = true;
    ghostDiv.style.width = "1px";
    ghostDiv.style.height = "1px";
    ghostDiv.style.position = "absolute";
    ghostDiv.style.zIndex = "-1000000";
    document.body.appendChild(ghostDiv);
    var ghostSvgContainer = new _SVGContainer__WEBPACK_IMPORTED_MODULE_2__.SVGContainer(ghostDiv, true);
    ghostPaper = new Paper(ghostSvgContainer.SVGContainer, "ghost");
  }

  return ghostPaper;
}

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Path.js":
/*!***************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/rendering/Path.js ***!
  \***************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "arc": () => (/* binding */ arc),
/* harmony export */   "arcTo": () => (/* binding */ arcTo),
/* harmony export */   "arcToPoint": () => (/* binding */ arcToPoint),
/* harmony export */   "closePath": () => (/* binding */ closePath),
/* harmony export */   "cubicCurveTo": () => (/* binding */ cubicCurveTo),
/* harmony export */   "lineTo": () => (/* binding */ lineTo),
/* harmony export */   "moveTo": () => (/* binding */ moveTo),
/* harmony export */   "pathToPoints": () => (/* binding */ pathToPoints),
/* harmony export */   "pointsToPath": () => (/* binding */ pointsToPath),
/* harmony export */   "polyline": () => (/* binding */ polyline),
/* harmony export */   "quadraticCurveTo": () => (/* binding */ quadraticCurveTo),
/* harmony export */   "rectToPath": () => (/* binding */ rectToPath),
/* harmony export */   "rectangle": () => (/* binding */ rectangle),
/* harmony export */   "spiralPoints": () => (/* binding */ spiralPoints)
/* harmony export */ });
/* harmony import */ var _utils_Math__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
/* harmony import */ var _utils_Type__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/* harmony import */ var _rendering_Paper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../rendering/Paper */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Paper.js");
/* harmony import */ var _Options__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Options */ "./node_modules/@amcharts/amcharts4/.internal/core/Options.js");
/**
 * A collection of functions that deals with path calculations.
 */




/**
 * ============================================================================
 * PATH FUNCTIONS
 * ============================================================================
 * @hidden
 */

/**
 * Returns an SVG path from a number of points.
 *
 * @ignore Exclude from docs
 * @param points  An array of line elbow points
 * @return SVG path
 */

function polyline(points) {
  var path = lineTo(points[0]);
  var prevPoint = {
    x: 0,
    y: 0
  };
  var minStep = _Options__WEBPACK_IMPORTED_MODULE_3__.options.minPolylineStep;

  if (!_utils_Type__WEBPACK_IMPORTED_MODULE_1__.isNumber(minStep)) {
    minStep = 0.5;
  }

  for (var i = 0, len = points.length; i < len; i++) {
    var point = points[i];

    if (_utils_Math__WEBPACK_IMPORTED_MODULE_0__.getDistance(point, prevPoint) > minStep) {
      path += lineTo(point);
      prevPoint = point;
    }
  }

  return path;
}
/**
 * Returns a starting point of an SVG path.
 *
 * @ignore Exclude from docs
 * @param point  Starting point
 * @return SVG path
 */

function moveTo(point) {
  return " M" + _utils_Math__WEBPACK_IMPORTED_MODULE_0__.round(point.x, 4) + "," + _utils_Math__WEBPACK_IMPORTED_MODULE_0__.round(point.y, 4) + " ";
}
/**
 * Returns a line part of SVG path.
 *
 * @ignore Exclude from docs
 * @param point  SVG path
 * @return SVG path
 */

function lineTo(point) {
  return " L" + _utils_Math__WEBPACK_IMPORTED_MODULE_0__.round(point.x, 4) + "," + _utils_Math__WEBPACK_IMPORTED_MODULE_0__.round(point.y, 4) + " ";
}
/**
 * Returns a quadratic curve part of an SVG path.
 *
 * @ignore Exclude from docs
 * @param point         End point of the curve
 * @param controlPoint  Control point
 * @return SVG path
 */

function quadraticCurveTo(point, controlPoint) {
  return " Q" + _utils_Math__WEBPACK_IMPORTED_MODULE_0__.round(controlPoint.x, 4) + "," + _utils_Math__WEBPACK_IMPORTED_MODULE_0__.round(controlPoint.y, 4) + " " + _utils_Math__WEBPACK_IMPORTED_MODULE_0__.round(point.x, 4) + "," + _utils_Math__WEBPACK_IMPORTED_MODULE_0__.round(point.y, 4);
}
/**
 * Returns a cubic curve part of an SVG path.
 *
 * @ignore Exclude from docs
 * @param point          End point of the curve
 * @param controlPointA  Control point A
 * @param controlPointB  Control point B
 * @return SVG path
 */

function cubicCurveTo(point, controlPointA, controlPointB) {
  return " C" + _utils_Math__WEBPACK_IMPORTED_MODULE_0__.round(controlPointA.x, 4) + "," + _utils_Math__WEBPACK_IMPORTED_MODULE_0__.round(controlPointA.y, 4) + " " + _utils_Math__WEBPACK_IMPORTED_MODULE_0__.round(controlPointB.x, 4) + "," + _utils_Math__WEBPACK_IMPORTED_MODULE_0__.round(controlPointB.y, 4) + " " + _utils_Math__WEBPACK_IMPORTED_MODULE_0__.round(point.x, 4) + "," + _utils_Math__WEBPACK_IMPORTED_MODULE_0__.round(point.y, 4);
}
/**
 * Returns a terminator for an SVG path.
 *
 * @ignore Exclude from docs
 * @return SVG path
 */

function closePath() {
  return " Z";
}
/**
 * Returns an arc part of an SVG path.
 *
 * @ignore Exclude from docs
 * @todo Better parameter descriptions
 * @param startAngle  Starting angle
 * @param arc         Arc
 * @param radius      Radius
 * @param radiusY     Vertical radius
 * @return SVG path
 */

function arcTo(startAngle, arc, radius, radiusY) {
  if (arc == 0) {
    return "";
  }

  if (!_utils_Type__WEBPACK_IMPORTED_MODULE_1__.isNumber(radiusY)) {
    radiusY = radius;
  }

  var path = "";
  var c = ",";
  var segments = Math.ceil(Math.abs(arc) / 180);
  var l = 1;

  if (arc < 0) {
    l = 0;
  } // previous, as we use a not A


  var pax = 0;
  var pay = 0; // center

  var cx = -_utils_Math__WEBPACK_IMPORTED_MODULE_0__.cos(startAngle) * radius;
  var cy = -_utils_Math__WEBPACK_IMPORTED_MODULE_0__.sin(startAngle) * radiusY; // foir very short angles and big radius, solves artefacts

  if (arc < 0.5 && radius > 3000) {
    var endAngle = startAngle + arc;
    var ax = _utils_Math__WEBPACK_IMPORTED_MODULE_0__.round(_utils_Math__WEBPACK_IMPORTED_MODULE_0__.cos(endAngle) * radius, 4);
    var ay = _utils_Math__WEBPACK_IMPORTED_MODULE_0__.round(_utils_Math__WEBPACK_IMPORTED_MODULE_0__.sin(endAngle) * radiusY, 4);
    return lineTo({
      x: ax,
      y: ay
    });
  }

  for (var i = 0; i < segments; i++) {
    var endAngle = startAngle + arc / segments * (i + 1);
    var ax = _utils_Math__WEBPACK_IMPORTED_MODULE_0__.round(_utils_Math__WEBPACK_IMPORTED_MODULE_0__.cos(endAngle) * radius + cx - pax, 4);
    var ay = _utils_Math__WEBPACK_IMPORTED_MODULE_0__.round(_utils_Math__WEBPACK_IMPORTED_MODULE_0__.sin(endAngle) * radiusY + cy - pay, 4);
    path += " a" + radius + c + radiusY + c + 0 + c + 0 + c + l + c + ax + c + ay;
    pax = ax;
    pay = ay;
  }

  return path;
}
/**
 * Creates an arc path.
 *
 * @ignore Exclude from docs
 * @todo Description
 * @param startAngle         [description]
 * @param arc                [description]
 * @param radius             [description]
 * @param innerRadius        [description]
 * @param radiusY            [description]
 * @param cornerRadius       [description]
 * @param innerCornerRadius  [description]
 * @return SVG path
 */

function arc(startAngle, arc, radius, innerRadius, radiusY, cornerRadius, innerCornerRadius) {
  if (arc == 0) {
    return "";
  }

  if (!_utils_Type__WEBPACK_IMPORTED_MODULE_1__.isNumber(innerRadius)) {
    innerRadius = 0;
  }

  if (radius == 0 && innerRadius <= 0) {
    return "";
  }

  if (radius < innerRadius) {
    var temp = radius;
    radius = innerRadius;
    innerRadius = temp;

    if (_utils_Type__WEBPACK_IMPORTED_MODULE_1__.isNumber(radiusY)) {
      radiusY = radiusY / innerRadius * radius;
    }
  }

  arc = _utils_Math__WEBPACK_IMPORTED_MODULE_0__.min(arc, 360);

  if (arc == 360) {
    cornerRadius = 0;
    innerCornerRadius = 0;
  }

  var endAngle = startAngle + arc;
  var crSin = _utils_Math__WEBPACK_IMPORTED_MODULE_0__.sin(_utils_Math__WEBPACK_IMPORTED_MODULE_0__.min(arc, 45) / 2);
  radiusY = _utils_Type__WEBPACK_IMPORTED_MODULE_1__.isNumber(radiusY) ? radiusY : radius;
  cornerRadius = cornerRadius || 0;
  innerCornerRadius = _utils_Type__WEBPACK_IMPORTED_MODULE_1__.isNumber(innerCornerRadius) ? innerCornerRadius : cornerRadius;
  var innerRadiusY = radiusY / radius * innerRadius;
  var cornerRadiusY = radiusY / radius * cornerRadius;
  var innerCornerRadiusY = radiusY / radius * innerCornerRadius;
  cornerRadius = _utils_Math__WEBPACK_IMPORTED_MODULE_0__.fitToRange(cornerRadius, 0, (radius - innerRadius) / 2);
  cornerRadiusY = _utils_Math__WEBPACK_IMPORTED_MODULE_0__.fitToRange(cornerRadiusY, 0, (radiusY - innerRadiusY) / 2);
  innerCornerRadius = _utils_Math__WEBPACK_IMPORTED_MODULE_0__.fitToRange(innerCornerRadius, 0, (radius - innerRadius) / 2);
  innerCornerRadiusY = _utils_Math__WEBPACK_IMPORTED_MODULE_0__.fitToRange(innerCornerRadiusY, 0, (radiusY - innerRadiusY) / 2);
  cornerRadius = _utils_Math__WEBPACK_IMPORTED_MODULE_0__.round(_utils_Math__WEBPACK_IMPORTED_MODULE_0__.fitToRange(cornerRadius, 0, radius * crSin), 4);
  cornerRadiusY = _utils_Math__WEBPACK_IMPORTED_MODULE_0__.round(_utils_Math__WEBPACK_IMPORTED_MODULE_0__.fitToRange(cornerRadiusY, 0, radiusY * crSin), 4);
  innerCornerRadius = _utils_Math__WEBPACK_IMPORTED_MODULE_0__.round(_utils_Math__WEBPACK_IMPORTED_MODULE_0__.fitToRange(innerCornerRadius, 0, innerRadius * crSin), 4);
  innerCornerRadiusY = _utils_Math__WEBPACK_IMPORTED_MODULE_0__.round(_utils_Math__WEBPACK_IMPORTED_MODULE_0__.fitToRange(innerCornerRadiusY, 0, innerRadiusY * crSin), 4);
  var crAngle = Math.asin(cornerRadius / radius / 2) * _utils_Math__WEBPACK_IMPORTED_MODULE_0__.DEGREES * 2;
  var crAngleY = Math.asin(cornerRadiusY / radiusY / 2) * _utils_Math__WEBPACK_IMPORTED_MODULE_0__.DEGREES * 2;

  if (innerRadius < innerCornerRadius) {
    innerRadius = innerCornerRadius;
  }

  if (innerRadiusY < innerCornerRadiusY) {
    innerRadiusY = innerCornerRadiusY;
  }

  var crInnerAngle = Math.asin(innerCornerRadius / innerRadius / 2) * _utils_Math__WEBPACK_IMPORTED_MODULE_0__.DEGREES * 2;
  var crInnerAngleY = Math.asin(innerCornerRadiusY / innerRadiusY / 2) * _utils_Math__WEBPACK_IMPORTED_MODULE_0__.DEGREES * 2;

  if (!_utils_Type__WEBPACK_IMPORTED_MODULE_1__.isNumber(crInnerAngle)) {
    crInnerAngle = 0;
  }

  if (!_utils_Type__WEBPACK_IMPORTED_MODULE_1__.isNumber(crInnerAngleY)) {
    crInnerAngleY = 0;
  }

  var middleAngle = startAngle + arc / 2;
  var mPoint = {
    x: _utils_Math__WEBPACK_IMPORTED_MODULE_0__.round(_utils_Math__WEBPACK_IMPORTED_MODULE_0__.cos(middleAngle) * innerRadius, 4),
    y: _utils_Math__WEBPACK_IMPORTED_MODULE_0__.sin(middleAngle) * innerRadiusY
  };
  var a0 = {
    x: _utils_Math__WEBPACK_IMPORTED_MODULE_0__.cos(startAngle) * (innerRadius + innerCornerRadius),
    y: _utils_Math__WEBPACK_IMPORTED_MODULE_0__.sin(startAngle) * (innerRadiusY + innerCornerRadiusY)
  };
  var b0 = {
    x: _utils_Math__WEBPACK_IMPORTED_MODULE_0__.cos(startAngle) * (radius - cornerRadius),
    y: _utils_Math__WEBPACK_IMPORTED_MODULE_0__.sin(startAngle) * (radiusY - cornerRadiusY)
  };
  var c0 = {
    x: _utils_Math__WEBPACK_IMPORTED_MODULE_0__.cos(endAngle) * (radius - cornerRadius),
    y: _utils_Math__WEBPACK_IMPORTED_MODULE_0__.sin(endAngle) * (radiusY - cornerRadiusY)
  };
  var d0 = {
    x: _utils_Math__WEBPACK_IMPORTED_MODULE_0__.cos(endAngle) * (innerRadius + innerCornerRadius),
    y: _utils_Math__WEBPACK_IMPORTED_MODULE_0__.sin(endAngle) * (innerRadiusY + innerCornerRadiusY)
  };
  var b1 = {
    x: _utils_Math__WEBPACK_IMPORTED_MODULE_0__.cos(startAngle + crAngle) * radius,
    y: _utils_Math__WEBPACK_IMPORTED_MODULE_0__.sin(startAngle + crAngleY) * radiusY
  };
  var d1 = {
    x: _utils_Math__WEBPACK_IMPORTED_MODULE_0__.cos(endAngle - crInnerAngle) * innerRadius,
    y: _utils_Math__WEBPACK_IMPORTED_MODULE_0__.sin(endAngle - crInnerAngleY) * innerRadiusY
  }; // some magic math

  innerCornerRadius += innerCornerRadius * _utils_Math__WEBPACK_IMPORTED_MODULE_0__.sin(crInnerAngle / 2);
  innerCornerRadiusY += innerCornerRadiusY * _utils_Math__WEBPACK_IMPORTED_MODULE_0__.sin(crInnerAngleY / 2);

  if (crInnerAngle > (endAngle - startAngle) / 2) {
    d1 = mPoint;
  }

  var path = ""; // start from b if this is full circle

  if (arc == 360) {
    path = moveTo(b0);
  } // otherwise start from a
  else {
    path = moveTo(a0);
    path += lineTo(b0);
    path += arcToPoint(b1, cornerRadius, cornerRadiusY, true);
  } // draw arc


  path += arcTo(startAngle + crAngle, arc - 2 * crAngle, radius, radiusY); // draw inner arc

  if (_utils_Type__WEBPACK_IMPORTED_MODULE_1__.isNumber(innerRadius) && innerRadius != 0) {
    // move to B if this is full circle
    if (arc == 360 && cornerRadius == 0) {
      path += moveTo(d0);
    } // draw line otherwise
    else {
      path += arcToPoint(c0, cornerRadius, cornerRadiusY, true);
      path += lineTo(d0);
      path += arcToPoint(d1, innerCornerRadius, innerCornerRadiusY, true);
    }

    path += arcTo(endAngle - crInnerAngle, -(arc - 2 * crInnerAngle), innerRadius, innerRadiusY);

    if (arc < 360 || cornerRadius > 0) {
      path += arcToPoint(a0, innerCornerRadius, innerCornerRadiusY, true);
    }

    path += lineTo(a0);
  } else {
    path += arcToPoint(c0, cornerRadius, cornerRadiusY, true);

    if (arc < 360) {
      path += lineTo(a0);
    }
  }

  return path;
}
/**
 * Creates a path for an arc to specific coordinate.
 *
 * @ignore Exclude from docs
 * @todo Description
 * @param point         Reference point
 * @param radius        Radius
 * @param radiusY       Vertical radius (for skewed arcs)
 * @param sweepFlag     [description]
 * @param largeArcFlag  [description]
 * @param xAxisRotation [description]
 * @return Arc path
 */

function arcToPoint(point, radius, radiusY, sweepFlag, largeArcFlag, xAxisRotation) {
  if (radius == 0) {
    return "";
  }

  xAxisRotation = xAxisRotation || 0;
  largeArcFlag = Boolean(largeArcFlag);
  sweepFlag = Boolean(sweepFlag);
  var c = ",";
  var sweepFlagValue = +sweepFlag; // converts to 1 or 0

  var largeArcFlagValue = +largeArcFlag; // converts to 1 or 0

  return " A" + radius + c + radiusY + c + xAxisRotation + c + largeArcFlagValue + c + sweepFlagValue + c + _utils_Math__WEBPACK_IMPORTED_MODULE_0__.round(point.x, 4) + c + _utils_Math__WEBPACK_IMPORTED_MODULE_0__.round(point.y, 4);
}
/**
 * Creates a new rectangle.
 *
 * @ignore Exclude from docs
 * @param width   Width (px)
 * @param height  Height (px)
 * @param x       X position
 * @param y       Y position
 * @return Rectangle
 */

function rectangle(width, height, x, y) {
  if (!_utils_Type__WEBPACK_IMPORTED_MODULE_1__.isNumber(x)) {
    x = 0;
  }

  if (!_utils_Type__WEBPACK_IMPORTED_MODULE_1__.isNumber(y)) {
    y = 0;
  }

  return moveTo({
    x: x,
    y: y
  }) + lineTo({
    x: x + width,
    y: y
  }) + lineTo({
    x: x + width,
    y: y + height
  }) + lineTo({
    x: x,
    y: y + height
  }) + closePath();
}
/**
 * Converts a rectangle to an SVG path.
 *
 * @ignore Exclude from docs
 * @param rect  Rectangle
 * @param ccw   Counter-clockwise?
 * @return SVG path
 */

function rectToPath(rect, ccw) {
  var c = ",";
  var L = " L";

  if (ccw) {
    return "M" + rect.x + c + rect.y + L + rect.x + c + (rect.y + rect.height) + L + (rect.x + rect.width) + c + (rect.y + rect.height) + L + (rect.x + rect.width) + c + rect.y + L + rect.x + c + rect.y;
  } else {
    return "M" + rect.x + c + rect.y + L + (rect.x + rect.width) + c + rect.y + L + (rect.x + rect.width) + c + (rect.y + rect.height) + L + rect.x + c + (rect.y + rect.height) + L + rect.x + c + rect.y;
  }
}
/**
 * Converts SVG path to array of points.
 *
 * Note, this is experimental feature based on method which is deprecated
 * on some browsers and some browsers do not support it at all.
 *
 * You can save the output of this function, but not rely on it completely.
 */

function pathToPoints(path, pointCount) {
  var paper = (0,_rendering_Paper__WEBPACK_IMPORTED_MODULE_2__.getGhostPaper)();
  var svgPath = paper.add("path").node;
  svgPath.setAttribute("d", path);

  if (svgPath.getPointAtLength && svgPath.getTotalLength) {
    var length_1 = svgPath.getTotalLength();
    var toPoints = [];

    for (var i = 0; i < pointCount; i++) {
      var point = svgPath.getPointAtLength(i / pointCount * length_1);
      toPoints.push({
        x: point.x,
        y: point.y
      });
    }

    return toPoints;
  }

  svgPath.remove();
}
function spiralPoints(cx, cy, radius, radiusY, innerRadius, step, radiusStep, startAngle, endAngle) {
  if (!_utils_Type__WEBPACK_IMPORTED_MODULE_1__.isNumber(startAngle)) {
    startAngle = 0;
  }

  if (!_utils_Type__WEBPACK_IMPORTED_MODULE_1__.isNumber(startAngle)) {
    endAngle = startAngle;
  }

  var r = innerRadius + 0.01;
  var angle = startAngle * _utils_Math__WEBPACK_IMPORTED_MODULE_0__.RADIANS;
  var points = [];

  while (r < radius + radiusStep) {
    var stepSize = step;

    if (stepSize / 2 > r) {
      stepSize = 2 * r;
    }

    angle += 2 * Math.asin(stepSize / 2 / r);

    if (angle * _utils_Math__WEBPACK_IMPORTED_MODULE_0__.DEGREES > endAngle + (radius - innerRadius) / radiusStep * 360) {
      break;
    }

    var degrees = angle * _utils_Math__WEBPACK_IMPORTED_MODULE_0__.DEGREES;
    var point = {
      x: cx + r * Math.cos(angle),
      y: cy + r * radiusY / radius * Math.sin(angle)
    };
    points.push(point);
    r = innerRadius + degrees / 360 * radiusStep;
  }

  points.shift();
  return points;
}
function pointsToPath(points) {
  if (!points || points.length == 0) {
    return "";
  }

  var path = moveTo(points[0]);

  if (points && points.length > 0) {
    for (var i = 1; i < points.length; i++) {
      path += lineTo(points[i]);
    }
  }

  return path;
}

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/SVGContainer.js":
/*!***********************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/rendering/SVGContainer.js ***!
  \***********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "SVGContainer": () => (/* binding */ SVGContainer),
/* harmony export */   "svgContainers": () => (/* binding */ svgContainers)
/* harmony export */ });
/* harmony import */ var _elements_Popup__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../elements/Popup */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Popup.js");
/* harmony import */ var _elements_Modal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../elements/Modal */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Modal.js");
/* harmony import */ var _utils_List__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/List */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/List.js");
/* harmony import */ var _utils_Utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/Utils */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Utils.js");
/* harmony import */ var _utils_DOM__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/DOM */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/DOM.js");
/* harmony import */ var _utils_Array__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/Array */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Array.js");
/* harmony import */ var _utils_Type__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/* harmony import */ var _utils_ResizeSensor__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/ResizeSensor */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/ResizeSensor.js");
/**
 * This functionality is related to the HTML wrapper that houses `<svg>` tag.
 */








/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * A array of all SVG Containers (one SVG container per chart instance).
 *
 * @ignore Exclude from docs
 */

var svgContainers = [];
/**
 * A class used to create an HTML wrapper for the SVG contents.
 */

var SVGContainer =
/** @class */
function () {
  /**
   * Constructor
   *
   * * Creates an HTML wrapper for SVG
   */
  function SVGContainer(htmlElement, ghost) {
    var _this = this;
    /**
     * Indicates if this object has already been deleted. Any
     * destruction/disposal code should take this into account when deciding
     * wheter to run potentially costly disposal operations if they already have
     * been run.
     */


    this._disposed = false;
    /**
     * If this component is in a separate HTML container, `autoResize` means the
     * module will constantly measure container's size and adopt contents to it.
     */

    this.autoResize = true;
    /**
     * Holds list of references to [[Sprite]] objects that should not be exported
     * when exporting chart to an image.
     *
     * @ignore
     */

    this.nonExportableSprites = [];
    /**
     * List of objects that need to be disposed when this one is disposed.
     */

    this._disposers = [];
    this.cssScale = 1; // This is needed so that it won't resize while printing, so that way printing works correctly.

    this._printing = false; // Log parent HTML element

    this.htmlElement = htmlElement;

    if (!ghost) {
      this._printing = false;
      this.initSensor();

      this._disposers.push(_utils_DOM__WEBPACK_IMPORTED_MODULE_4__.addEventListener(window, "beforeprint", function () {
        _this._printing = true;
      }));

      this._disposers.push(_utils_DOM__WEBPACK_IMPORTED_MODULE_4__.addEventListener(window, "afterprint", function () {
        _this._printing = false;
      }));
    } // Adds to containers array


    svgContainers.push(this);
    /**
     * Create child div for the container - it will have svg node
     * It might seem that this container is not necessay, however having it solves
     * a problems with mouse position detection and some other.
     */

    var svgContainer = document.createElement("div");
    var style = svgContainer.style;
    style.width = "100%";
    style.height = "100%";
    style.position = "relative";
    htmlElement.appendChild(svgContainer);
    this.SVGContainer = svgContainer;
  }
  /**
   * (Re)Initializes a resize sensor.
   */


  SVGContainer.prototype.initSensor = function () {
    var _this = this;

    if (this.resizeSensor) {
      this.resizeSensor.dispose();
    }

    var callback = function callback() {
      if (_this.autoResize && !_this._printing) {
        _this.measure();
      }
    };

    this.resizeSensor = new _utils_ResizeSensor__WEBPACK_IMPORTED_MODULE_7__.ResizeSensor(this.htmlElement, callback);

    this._disposers.push(this.resizeSensor);
  };
  /**
   * Measures size of parent HTML element.
   *
   * @ignore Exclude from docs
   */


  SVGContainer.prototype.measure = function () {
    var width = _utils_Utils__WEBPACK_IMPORTED_MODULE_3__.width(this.htmlElement);
    var height = _utils_Utils__WEBPACK_IMPORTED_MODULE_3__.height(this.htmlElement);
    var container = this.container;

    if (container) {
      if (this.width != width || this.height != height) {
        this.width = width;
        this.height = height;

        if (width > 0) {
          container.maxWidth = width;
        }

        if (height > 0) {
          container.maxHeight = height;
        }

        _utils_DOM__WEBPACK_IMPORTED_MODULE_4__.fixPixelPerfect(this.SVGContainer);
      }

      if (!container.maxWidth) {
        container.maxWidth = 0;
      }

      if (!container.maxHeight) {
        container.maxHeight = 0;
      }

      this.cssScale = 1;
      this.checkTransform(this.htmlElement);
    }
  };

  Object.defineProperty(SVGContainer.prototype, "container", {
    /**
     * @return Container
     */
    get: function get() {
      return this._container;
    },

    /**
     * A [[Container]] element which is placed into container.
     *
     * @param container  Container
     */
    set: function set(container) {
      this._container = container;
      this.measure();
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Returns if this object has been already been disposed.
   *
   * @return Is disposed?
   */

  SVGContainer.prototype.isDisposed = function () {
    return this._disposed;
  };
  /**
   * Removes this container from SVG container list in system, which
   * effectively disables size change monitoring for it.
   */


  SVGContainer.prototype.dispose = function () {
    if (!this._disposed) {
      _utils_Array__WEBPACK_IMPORTED_MODULE_5__.remove(svgContainers, this);
    }

    _utils_Array__WEBPACK_IMPORTED_MODULE_5__.each(this._disposers, function (item) {
      item.dispose();
    });
  };

  Object.defineProperty(SVGContainer.prototype, "hideOverflow", {
    /**
     * Indicates if chart container should have its style set
     * to `overflow: hidden`.
     *
     * Normally, we don't want that, so that certain elements, such as tooltips,
     * would be able to go outside chart area.
     *
     * There is one issue though. Some browsers ignore SVG masks and would
     * display scrollbars if chart elements, that go outside chart area extend
     * outside window.
     *
     * This is especially true for [[MapChart]], which can have its elements
     * extend very widely when zoomed in. Even if those parts are not visible
     * because of SVG masks, some browsers might still display window scrollbars.
     *
     * This is why we set this setting to `true` in [[MapChart]].
     *
     * Other charts use default of `false`.
     */
    set: function set(value) {
      if (value) {
        this.SVGContainer.style.overflow = "hidden";
      } else {
        this.SVGContainer.style.overflow = "";
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(SVGContainer.prototype, "modal", {
    /**
     * ==========================================================================
     * MODAL/POPUP RELATED STUFF
     * ==========================================================================
     * @hidden
     */

    /**
     * Returns a [[Modal]] instance, associated with this chart.
     * (elements top parent)
     *
     * Accessing modal does not make it appear. To make a modal appear, use
     * `showModal()` method.
     *
     * @see {@link Modal} for more information about using Modal windows
     * @return Modal instance
     */
    get: function get() {
      if (!_utils_Type__WEBPACK_IMPORTED_MODULE_6__.hasValue(this._modal)) {
        // Create new modal
        this._modal = new _elements_Modal__WEBPACK_IMPORTED_MODULE_1__.Modal();
        this._modal.container = this.SVGContainer; // Add to disposers

        this._disposers.push(this._modal);
      }

      return this._modal;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Opens a modal window with specific content (`text` parameter) and,
   * optionally, `title`.
   *
   * The `text` parameter can contain HTML content.
   *
   * @see {@link Modal} for more information about using Modal windows
   * @param text   Modal contents
   * @param title  Title for the modal window
   */

  SVGContainer.prototype.openModal = function (text, title) {
    // Hide previous modal
    this.closeModal(); // Create modal

    var modal = this.modal;
    modal.content = text;
    modal.readerTitle = title || "";
    modal.title = title || "";
    modal.open();
    return modal;
  };
  /**
   * Hides modal window if there is one currently open.
   */


  SVGContainer.prototype.closeModal = function () {
    if (this._modal) {
      this.modal.close();
    }
  };

  Object.defineProperty(SVGContainer.prototype, "popups", {
    /**
     * A list of popups for this chart.
     *
     * @return Popups
     */
    get: function get() {
      if (!_utils_Type__WEBPACK_IMPORTED_MODULE_6__.hasValue(this._popups)) {
        // Create popup template
        var popupTemplate = new _elements_Popup__WEBPACK_IMPORTED_MODULE_0__.Popup();
        popupTemplate.container = this.SVGContainer; // Create the list

        this._popups = new _utils_List__WEBPACK_IMPORTED_MODULE_2__.ListTemplate(popupTemplate); // Add to disposers

        this._disposers.push(new _utils_List__WEBPACK_IMPORTED_MODULE_2__.ListDisposer(this._popups));

        this._disposers.push(this._popups.template);
      }

      return this._popups;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Creates, opens, and returns a new [[Popup]] window.
   *
   * `text` can be any valid HTML.
   *
   * `title` is currently not supported.
   *
   * @param text   Popup contents
   * @param title  Popup title
   * @return Popup instance
   */

  SVGContainer.prototype.openPopup = function (text, title) {
    var popup = this.popups.create();
    popup.content = text;

    if (_utils_Type__WEBPACK_IMPORTED_MODULE_6__.hasValue(title)) {
      popup.title = title;
    }

    popup.open();
    return popup;
  };
  /**
   * Closes all currently open popup windows
   */


  SVGContainer.prototype.closeAllPopups = function () {
    this.popups.each(function (popup) {
      popup.close();
    });
  };

  Object.defineProperty(SVGContainer.prototype, "readerAlertElement", {
    /**
     * ==========================================================================
     * ACCESSIBILITY STUFF
     * ==========================================================================
     * @hidden
     */

    /**
     * A `<div>` element used as as placeholder to trigger screen alerts.
     *
     * @sunce 4.9.2
     * @return Element
     */
    get: function get() {
      if (!_utils_Type__WEBPACK_IMPORTED_MODULE_6__.hasValue(this._readerAlertElement)) {
        // Create element
        var div = document.createElement("div");
        div.setAttribute("role", "alert");
        div.style.zIndex = "-100000";
        div.style.opacity = "0";
        div.style.position = "absolute";
        div.style.top = "0";
        this.SVGContainer.appendChild(div);
        this._readerAlertElement = div;
      }

      return this._readerAlertElement;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Triggers screen reader read out a message.
   *
   * @since 4.9.2
   * @param  text  Alert text
   */

  SVGContainer.prototype.readerAlert = function (text) {
    this.readerAlertElement.innerHTML = text;
  };
  /**
   * ==========================================================================
   * OTHER STUFF
   * ==========================================================================
   * @hidden
   */


  SVGContainer.prototype.checkTransform = function (div) {
    if (window.getComputedStyle) {
      if (div && div.style) {
        var style = window.getComputedStyle(div, null);

        if (style) {
          var matrix = style.getPropertyValue("-webkit-transform") || style.getPropertyValue("-moz-transform") || style.getPropertyValue("-ms-transform") || style.getPropertyValue("-o-transform") || style.getPropertyValue("transform");

          if (matrix && matrix !== "none") {
            var values = matrix.split('(')[1].split(')')[0].split(',');
            var a = Number(values[0]);
            var b = Number(values[1]);
            var scale = Math.sqrt(a * a + b * b);

            if (!isNaN(scale)) {
              this.cssScale *= scale;
            }
          }
        }
      }

      if (div.parentNode && div.parentNode instanceof HTMLElement) {
        this.checkTransform(div.parentNode);
      }
    }
  };

  return SVGContainer;
}();



/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Smoothing.js":
/*!********************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/rendering/Smoothing.js ***!
  \********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Basis": () => (/* binding */ Basis),
/* harmony export */   "Monotone": () => (/* binding */ Monotone),
/* harmony export */   "MonotoneX": () => (/* binding */ MonotoneX),
/* harmony export */   "MonotoneY": () => (/* binding */ MonotoneY),
/* harmony export */   "Tension": () => (/* binding */ Tension),
/* harmony export */   "wavedLine": () => (/* binding */ wavedLine)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _Path__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Path */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Path.js");
/* harmony import */ var _utils_Array__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/Array */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Array.js");
/* harmony import */ var _utils_Utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/Utils */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Utils.js");
/* harmony import */ var _utils_Math__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */






/**
 * @ignore Exclude from docs
 * @todo Description
 */

var Tension =
/** @class */
function () {
  /**
   * Constructor.
   *
   * @param tensionX [description]
   * @param tensionY [description]
   */
  function Tension(tensionX, tensionY) {
    this._tensionX = tensionX;
    this._tensionY = tensionY;
  }
  /**
   * [smooth description]
   *
   * @ignore Exclude from docs
   * @todo Description
   * @param points  [description]
   * @return [description]
   */


  Tension.prototype.smooth = function (points) {
    for (var i = points.length - 1; i > 0; i--) {
      var p0 = points[i];
      var p1 = points[i - 1];

      if (Math.abs(p0.x - p1.x) < 0.1 && Math.abs(p0.y - p1.y) < 0.1) {
        points.splice(i - 1, 1);
      }
    }

    var tensionX = this._tensionX;
    var tensionY = this._tensionY;

    if (points.length < 3 || tensionX >= 1 && tensionY >= 1) {
      return _Path__WEBPACK_IMPORTED_MODULE_1__.polyline(points);
    }

    var first = points[0];
    var last = points[points.length - 1];
    var closed = false;

    if (_utils_Math__WEBPACK_IMPORTED_MODULE_4__.round(first.x, 3) == _utils_Math__WEBPACK_IMPORTED_MODULE_4__.round(last.x) && _utils_Math__WEBPACK_IMPORTED_MODULE_4__.round(first.y) == _utils_Math__WEBPACK_IMPORTED_MODULE_4__.round(last.y)) {
      closed = true;
    } // Can't moveTo here, as it wont be possible to have fill then.


    var path = "";

    for (var i = 0, len = points.length - 1; i < len; i++) {
      var p0 = points[i - 1];
      var p1 = points[i];
      var p2 = points[i + 1];
      var p3 = points[i + 2];

      if (i === 0) {
        if (closed) {
          p0 = points[points.length - 2];
        } else {
          p0 = points[i];
        }
      } else if (i == points.length - 2) {
        if (closed) {
          p3 = points[1];
        } else {
          p3 = points[i + 1];
        }
      }

      var controlPointA = _utils_Math__WEBPACK_IMPORTED_MODULE_4__.getCubicControlPointA(p0, p1, p2, p3, tensionX, tensionY);
      var controlPointB = _utils_Math__WEBPACK_IMPORTED_MODULE_4__.getCubicControlPointB(p0, p1, p2, p3, tensionX, tensionY);
      path += _Path__WEBPACK_IMPORTED_MODULE_1__.cubicCurveTo(p2, controlPointA, controlPointB);
    }

    return path;
  };

  return Tension;
}();


/**
 * Returns a waved line SVG path between two points.
 *
 * @ignore Exclude from docs
 * @param point1            Starting point
 * @param point2            Ending point
 * @param waveLength        Wave length
 * @param waveHeight        Wave height
 * @param adjustWaveLength  Adjust wave length based on the actual line length
 * @return SVG path
 */

function wavedLine(point1, point2, waveLength, waveHeight, tension, adjustWaveLength) {
  var x1 = point1.x;
  var y1 = point1.y;
  var x2 = point2.x;
  var y2 = point2.y;
  var distance = _utils_Math__WEBPACK_IMPORTED_MODULE_4__.getDistance(point1, point2);

  if (adjustWaveLength) {
    waveLength = distance / Math.round(distance / waveLength);
  }

  var d = _Registry__WEBPACK_IMPORTED_MODULE_0__.registry.getCache(_utils_Utils__WEBPACK_IMPORTED_MODULE_3__.stringify(["wavedLine", point1.x, point2.x, point1.y, point2.y, waveLength, waveHeight]));

  if (!d) {
    if (distance > 0) {
      var angle = Math.atan2(y2 - y1, x2 - x1);
      var cos = Math.cos(angle);
      var sin = Math.sin(angle);
      var waveLengthX = waveLength * cos;
      var waveLengthY = waveLength * sin;

      if (waveLength <= 1 || waveHeight <= 1) {
        d = _Path__WEBPACK_IMPORTED_MODULE_1__.lineTo(point2);
      } else {
        var halfWaveCount = Math.round(2 * distance / waveLength);
        var points = [];
        var sign_1 = 1;

        if (x2 < x1) {
          sign_1 *= -1;
        }

        if (y2 < y1) {
          sign_1 *= -1;
        }

        for (var i = 0; i <= halfWaveCount; i++) {
          sign_1 *= -1;
          var x = x1 + i * waveLengthX / 2 + sign_1 * waveHeight / 2 * sin;
          var y = y1 + i * waveLengthY / 2 - sign_1 * waveHeight / 2 * cos;
          points.push({
            x: x,
            y: y
          });
        }

        d = new Tension(tension, tension).smooth(points);
      }
    } else {
      d = "";
    }

    _Registry__WEBPACK_IMPORTED_MODULE_0__.registry.setCache(_utils_Utils__WEBPACK_IMPORTED_MODULE_3__.stringify(["wavedLine", point1.x, point2.x, point1.y, point2.y, waveLength, waveHeight]), d);
  }

  return d;
}

var Monotone =
/** @class */
function () {
  function Monotone(reversed, info) {
    this._reversed = reversed;
    this._closed = info.closed;
  } // According to https://en.wikipedia.org/wiki/Cubic_Hermite_spline#Representations
  // "you can express cubic Hermite interpolation in terms of cubic Bézier curves
  // with respect to the four values p0, p0 + m0 / 3, p1 - m1 / 3, p1".


  Monotone.prototype._curve = function (x0, x1, y0, y1, t0, t1) {
    var dx = (x1 - x0) / 3;

    if (this._reversed) {
      return _Path__WEBPACK_IMPORTED_MODULE_1__.cubicCurveTo({
        x: y1,
        y: x1
      }, {
        x: y0 + dx * t0,
        y: x0 + dx
      }, {
        x: y1 - dx * t1,
        y: x1 - dx
      });
    } else {
      return _Path__WEBPACK_IMPORTED_MODULE_1__.cubicCurveTo({
        x: x1,
        y: y1
      }, {
        x: x0 + dx,
        y: y0 + dx * t0
      }, {
        x: x1 - dx,
        y: y1 - dx * t1
      });
    }
  };

  Monotone.prototype.smooth = function (points) {
    var _this = this;

    var x0 = NaN;
    var x1 = NaN;
    var y0 = NaN;
    var y1 = NaN;
    var t0 = NaN;
    var point = 0;
    var output = "";
    _utils_Array__WEBPACK_IMPORTED_MODULE_2__.each(points, function (_a) {
      var x = _a.x,
          y = _a.y;

      if (_this._reversed) {
        var temp = x;
        x = y;
        y = temp;
      }

      var t1 = NaN;

      if (!(x === x1 && y === y1)) {
        switch (point) {
          case 0:
            point = 1;

            if (_this._reversed) {
              output += _Path__WEBPACK_IMPORTED_MODULE_1__.lineTo({
                x: y,
                y: x
              });
            } else {
              output += _Path__WEBPACK_IMPORTED_MODULE_1__.lineTo({
                x: x,
                y: y
              });
            }

            break;

          case 1:
            point = 2;
            break;

          case 2:
            point = 3;
            output += _this._curve(x0, x1, y0, y1, slope2(x0, x1, y0, y1, t1 = slope3(x0, x1, y0, y1, x, y)), t1);
            break;

          default:
            output += _this._curve(x0, x1, y0, y1, t0, t1 = slope3(x0, x1, y0, y1, x, y));
            break;
        }

        x0 = x1;
        x1 = x;
        y0 = y1;
        y1 = y;
        t0 = t1;
      }
    });

    switch (point) {
      case 2:
        if (this._reversed) {
          output += _Path__WEBPACK_IMPORTED_MODULE_1__.lineTo({
            x: y1,
            y: x1
          });
        } else {
          output += _Path__WEBPACK_IMPORTED_MODULE_1__.lineTo({
            x: x1,
            y: y1
          });
        }

        break;

      case 3:
        output += this._curve(x0, x1, y0, y1, t0, slope2(x0, x1, y0, y1, t0));
        break;
    }

    if (this._closed) {
      output += _Path__WEBPACK_IMPORTED_MODULE_1__.closePath();
    }

    return output;
  };

  return Monotone;
}();

 // TODO move this someplace else

function sign(x) {
  return x < 0 ? -1 : 1;
}

function slope2(x0, x1, y0, y1, t) {
  var h = x1 - x0;
  return h ? (3 * (y1 - y0) / h - t) / 2 : t;
}

function slope3(x0, x1, y0, y1, x2, y2) {
  var h0 = x1 - x0;
  var h1 = x2 - x1;
  var s0 = (y1 - y0) / (h0 || h1 < 0 && -0);
  var s1 = (y2 - y1) / (h1 || h0 < 0 && -0);
  var p = (s0 * h1 + s1 * h0) / (h0 + h1);
  return (sign(s0) + sign(s1)) * Math.min(Math.abs(s0), Math.abs(s1), 0.5 * Math.abs(p)) || 0;
}

var MonotoneX =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__extends)(MonotoneX, _super);

  function MonotoneX(info) {
    return _super.call(this, false, info) || this;
  }

  return MonotoneX;
}(Monotone);



var MonotoneY =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__extends)(MonotoneY, _super);

  function MonotoneY(info) {
    return _super.call(this, true, info) || this;
  }

  return MonotoneY;
}(Monotone);


/**
 * @ignore Exclude from docs
 * @todo Description
 */

var Basis =
/** @class */
function () {
  /**
   * Constructor.
   *
   * @param info  [description]
   */
  function Basis(info) {
    this._closed = info.closed;
  }
  /**
   * [smooth description]
   *
   * @ignore Exclude from docs
   * @todo Description
   * @param points  [description]
   * @return [description]
   */


  Basis.prototype.smooth = function (points) {
    var _this = this;

    var x0 = NaN;
    var x1 = NaN;
    var x2 = NaN;
    var x3 = NaN;
    var x4 = NaN;
    var y0 = NaN;
    var y1 = NaN;
    var y2 = NaN;
    var y3 = NaN;
    var y4 = NaN;
    var point = 0;
    var output = "";

    var pushCurve = function pushCurve(x, y) {
      output += _Path__WEBPACK_IMPORTED_MODULE_1__.cubicCurveTo({
        x: (x0 + 4 * x1 + x) / 6,
        y: (y0 + 4 * y1 + y) / 6
      }, {
        x: (2 * x0 + x1) / 3,
        y: (2 * y0 + y1) / 3
      }, {
        x: (x0 + 2 * x1) / 3,
        y: (y0 + 2 * y1) / 3
      });
    };

    var pushPoint = function pushPoint(_a) {
      var x = _a.x,
          y = _a.y;

      switch (point) {
        case 0:
          point = 1;

          if (_this._closed) {
            x2 = x;
            y2 = y;
          } else {
            output += _Path__WEBPACK_IMPORTED_MODULE_1__.lineTo({
              x: x,
              y: y
            });
          }

          break;

        case 1:
          point = 2;

          if (_this._closed) {
            x3 = x;
            y3 = y;
          }

          break;

        case 2:
          point = 3;

          if (_this._closed) {
            x4 = x;
            y4 = y;
            output += _Path__WEBPACK_IMPORTED_MODULE_1__.moveTo({
              x: (x0 + 4 * x1 + x) / 6,
              y: (y0 + 4 * y1 + y) / 6
            });
            break;
          } else {
            output += _Path__WEBPACK_IMPORTED_MODULE_1__.lineTo({
              x: (5 * x0 + x1) / 6,
              y: (5 * y0 + y1) / 6
            }); // fall-through
          }

        default:
          pushCurve(x, y);
          break;
      }

      x0 = x1;
      x1 = x;
      y0 = y1;
      y1 = y;
    };

    _utils_Array__WEBPACK_IMPORTED_MODULE_2__.each(points, pushPoint);

    if (this._closed) {
      switch (point) {
        case 1:
          output += _Path__WEBPACK_IMPORTED_MODULE_1__.moveTo({
            x: x2,
            y: y2
          });
          output += _Path__WEBPACK_IMPORTED_MODULE_1__.closePath();
          break;

        case 2:
          output += _Path__WEBPACK_IMPORTED_MODULE_1__.moveTo({
            x: (x2 + 2 * x3) / 3,
            y: (y2 + 2 * y3) / 3
          });
          output += _Path__WEBPACK_IMPORTED_MODULE_1__.lineTo({
            x: (x3 + 2 * x2) / 3,
            y: (y3 + 2 * y2) / 3
          });
          output += _Path__WEBPACK_IMPORTED_MODULE_1__.closePath();
          break;

        case 3:
          pushPoint({
            x: x2,
            y: y2
          });
          pushPoint({
            x: x3,
            y: y3
          });
          pushPoint({
            x: x4,
            y: y4
          });
          break;
      }
    } else {
      switch (point) {
        case 3:
          pushCurve(x1, y1);
        // fall-through

        case 2:
          output += _Path__WEBPACK_IMPORTED_MODULE_1__.lineTo({
            x: x1,
            y: y1
          });
          break;
      }

      output += _Path__WEBPACK_IMPORTED_MODULE_1__.closePath();
    }

    return output;
  };

  return Basis;
}();



/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/CirclePattern.js":
/*!******************************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/CirclePattern.js ***!
  \******************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "CirclePattern": () => (/* binding */ CirclePattern)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Pattern__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Pattern */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/Pattern.js");
/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/**
 * Rectangular pattern module.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */



;
/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Circular pattern
 */

var CirclePattern =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(CirclePattern, _super);
  /**
   * Constructor
   */


  function CirclePattern() {
    var _this = _super.call(this) || this;

    _this.properties["radius"] = 2;
    _this._circle = _this.paper.add("circle");

    _this.addElement(_this._circle);

    _this.shapeRendering = "auto";
    return _this;
  }
  /**
   * Draws the circle element.
   */


  CirclePattern.prototype.draw = function () {
    _super.prototype.draw.call(this);

    if (this._circle) {
      this._circle.attr({
        "r": this.radius,
        "cx": this.width / 2,
        "cy": this.height / 2
      });
    }
  };

  Object.defineProperty(CirclePattern.prototype, "radius", {
    /**
     * @return Radius (px)
     */
    get: function get() {
      return this.properties["radius"];
    },

    /**
     * Circle radius in pixels.
     *
     * @param value Radius (px)
     */
    set: function set(value) {
      this.properties["radius"] = value;
      this.draw();
    },
    enumerable: true,
    configurable: true
  });
  return CirclePattern;
}(_Pattern__WEBPACK_IMPORTED_MODULE_0__.Pattern);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses.CirclePattern = CirclePattern;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/ColorModifier.js":
/*!******************************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/ColorModifier.js ***!
  \******************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "ColorModifier": () => (/* binding */ ColorModifier)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Base */ "./node_modules/@amcharts/amcharts4/.internal/core/Base.js");
/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */



/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * A base class for color modifiers.
 *
 * @ignore Exclude from docs
 */

var ColorModifier =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(ColorModifier, _super);
  /**
   * Constructor
   */


  function ColorModifier() {
    var _this = _super.call(this) || this;

    _this.className = "ColorModifier";

    _this.applyTheme();

    return _this;
  }
  /**
   * Modifies color value.
   *
   * @ignore Exclude from docs
   * @param value  Original color
   * @return Modified
   */


  ColorModifier.prototype.modify = function (value) {
    return value;
  };

  return ColorModifier;
}(_Base__WEBPACK_IMPORTED_MODULE_0__.BaseObject);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses.ColorModifier = ColorModifier;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/GradientModifier.js":
/*!*********************************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/GradientModifier.js ***!
  \*********************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "GradientModifier": () => (/* binding */ GradientModifier)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _ColorModifier__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ColorModifier */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/ColorModifier.js");
/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _utils_Math__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
/* harmony import */ var _utils_Type__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */





/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * This class can be used to modify linear gradient steps, changing visual
 * properties like lightness, brightness, opacity of each set.
 *
 * It can also set offsets for each gradient step.
 *
 * E.g. if I want to fill a columns in a column series to be a solid fill from
 * top to 80% of height, then gradually fades out, I can use the following
 * gradient modifier as a `fillModifier`:
 *
 * ```TypeScript
 * let fillModifier = new am4core.GradientModifier();
 * fillModifier.opacities = [1, 1, 0];
 * fillModifier.offsets = [0, 0.8, 1];
 * columnSeries.columns.template.fillModifier = fillModifier;
 * ```
 * ```JavaScript
 * var fillModifier = new am4core.GradientModifier();
 * fillModifier.opacities = [1, 1, 0];
 * fillModifier.offsets = [0, 0.8, 1];
 * columnSeries.columns.template.fillModifier = fillModifier;
 * ```
 * ```JSON
 * "series": [{
 *   "type": "ColumnSeries",
 *   "columns": {
 *     "fillModifier": {
 *       "type": "GradientModifier",
 *       "opacities": [1, 1, 0],
 *       "offsets": [0, 0.8, 1]
 *     }
 *   }
 * }]
 * ```
 */

var GradientModifier =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_4__.__extends)(GradientModifier, _super);
  /**
   * Constructor.
   */


  function GradientModifier() {
    var _this = _super.call(this) || this;

    _this.lightnesses = [];
    _this.brightnesses = [];
    _this.opacities = [];
    _this.offsets = [];
    _this.className = "GradientModifier";

    _this.applyTheme();

    return _this;
  }

  Object.defineProperty(GradientModifier.prototype, "lightnesses", {
    /**
     * @return Lightness values
     */
    get: function get() {
      return this._lightnesses;
    },

    /**
     * An array of lightness values for each step.
     *
     * @param value  Lightness values
     */
    set: function set(value) {
      this._lightnesses = value;
      this._brightnesses = [];
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(GradientModifier.prototype, "brightnesses", {
    /**
     * @return Brightness values
     */
    get: function get() {
      return this._brightnesses;
    },

    /**
     * An array of brightness values for each step.
     *
     * @param value  Brightness values
     */
    set: function set(value) {
      this._brightnesses = value;
      this._lightnesses = [];
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(GradientModifier.prototype, "opacities", {
    /**
     * @return Opacity values
     */
    get: function get() {
      return this._opacities;
    },

    /**
     * An array of opacity values for each step.
     *
     * @param value  Opacity values
     */
    set: function set(value) {
      this._opacities = value;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(GradientModifier.prototype, "offsets", {
    /**
     * @return Offsets
     */
    get: function get() {
      return this._offsets;
    },

    /**
     * An array of relative position (0-1) for each step.
     *
     * If not set, all steps will be of equal relative length.
     *
     * @param value  Offsets
     */
    set: function set(value) {
      this._offsets = value;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Modifies the color based on step setting.
   *
   * @ignore Exclude from docs
   * @param value  Source color
   * @return A gradient that matches set modification rules
   */

  GradientModifier.prototype.modify = function (value) {
    // Clear current gradient
    this.gradient.clear(); // Get step count

    var count = 0;

    if (this.opacities) {
      count = _utils_Math__WEBPACK_IMPORTED_MODULE_2__.max(count, this.opacities.length);
    }

    if (this.lightnesses) {
      count = _utils_Math__WEBPACK_IMPORTED_MODULE_2__.max(count, this.lightnesses.length);
    }

    if (this.brightnesses) {
      count = _utils_Math__WEBPACK_IMPORTED_MODULE_2__.max(count, this.brightnesses.length);
    } // Init step values


    var opacity = 1,
        lightness,
        brightness; // Apply steps

    for (var i = 0; i < count; i++) {
      // Take base color
      var color = value; // Check if there are any parameters for this step

      if (this.opacities && _utils_Type__WEBPACK_IMPORTED_MODULE_3__.isNumber(this.opacities[i])) {
        opacity = this.opacities[i];
      }

      if (this.lightnesses && _utils_Type__WEBPACK_IMPORTED_MODULE_3__.isNumber(this.lightnesses[i])) {
        lightness = this.lightnesses[i];
        brightness = undefined;
      }

      if (this.brightnesses && _utils_Type__WEBPACK_IMPORTED_MODULE_3__.isNumber(this.brightnesses[i])) {
        brightness = this.brightnesses[i];
        lightness = undefined;
      } // Check if we need to brighten/lighten color


      if (_utils_Type__WEBPACK_IMPORTED_MODULE_3__.isNumber(brightness)) {
        color = value.brighten(this.brightnesses[i]);
      } else if (_utils_Type__WEBPACK_IMPORTED_MODULE_3__.isNumber(lightness)) {
        color = value.lighten(this.lightnesses[i]);
      } // Get offset (it's OK if it's undefined)


      var offset = this.offsets[i]; // Apply step

      this.gradient.addColor(color, opacity, offset);
    }

    return this.gradient;
  };

  GradientModifier.prototype.copyFrom = function (source) {
    _super.prototype.copyFrom.call(this, source);

    this._offsets = source.offsets;
    this._brightnesses = source.brightnesses;
    this._lightnesses = source.lightnesses;
    this._opacities = source.opacities;
  };

  return GradientModifier;
}(_ColorModifier__WEBPACK_IMPORTED_MODULE_0__.ColorModifier);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses.GradientModifier = GradientModifier;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/LinePattern.js":
/*!****************************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/LinePattern.js ***!
  \****************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "LinePattern": () => (/* binding */ LinePattern)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Pattern__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Pattern */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/Pattern.js");
/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _rendering_Path__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../rendering/Path */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Path.js");

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */




;
/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Line pattern.
 */

var LinePattern =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__extends)(LinePattern, _super);
  /**
   * Constructor
   */


  function LinePattern() {
    var _this = _super.call(this) || this;

    _this.properties["gap"] = 0;
    _this._line = _this.paper.add("path");

    _this.addElement(_this._line);

    return _this;
  }
  /**
   * Draws the pattern.
   */


  LinePattern.prototype.draw = function () {
    _super.prototype.draw.call(this);

    if (Math.round(this.rotation / 90) != this.rotation / 90) {
      this.properties["shapeRendering"] = "auto";
    }

    if (this._line) {
      var w = this.width;
      var h = this.height;
      var path = "";

      if (!this.gap) {
        if (Math.round(this.rotation / 90) != this.rotation / 90) {
          path = _rendering_Path__WEBPACK_IMPORTED_MODULE_2__.moveTo({
            x: -w,
            y: h / 2
          }) + _rendering_Path__WEBPACK_IMPORTED_MODULE_2__.lineTo({
            x: w * 2,
            y: h / 2
          });
          this.properties["rotationX"] = this.width / 2;
          this.properties["rotationY"] = this.height / 2;
        } else {
          path = _rendering_Path__WEBPACK_IMPORTED_MODULE_2__.moveTo({
            x: 0,
            y: 0
          }) + _rendering_Path__WEBPACK_IMPORTED_MODULE_2__.lineTo({
            x: w,
            y: 0
          });
        }
      } else {
        var step = this.gap + this.strokeWidth;
        var count = this.height / step;

        for (var i = -count / 2; i < count * 1.5; i++) {
          if (Math.round(this.rotation / 90) != this.rotation / 90) {
            path += _rendering_Path__WEBPACK_IMPORTED_MODULE_2__.moveTo({
              x: -w,
              y: (i + 0.5) * step
            }) + _rendering_Path__WEBPACK_IMPORTED_MODULE_2__.lineTo({
              x: w * 2,
              y: (i + 0.5) * step
            });
            this.properties["rotationX"] = this.width / 2;
            this.properties["rotationY"] = this.height / 2;
          } else {
            path += _rendering_Path__WEBPACK_IMPORTED_MODULE_2__.moveTo({
              x: -w,
              y: i * step
            }) + _rendering_Path__WEBPACK_IMPORTED_MODULE_2__.lineTo({
              x: w * 2,
              y: i * step
            });
          }
        }
      }

      this._line.attr({
        "d": path
      });
    }
  };

  Object.defineProperty(LinePattern.prototype, "gap", {
    /**
     * @return gap
     */
    get: function get() {
      return this.properties["gap"];
    },

    /**
     * Number of pixels between pattern lines.
     *
     * The pattern will automatically draw required number of lines to fill
     * pattern area maintaining `gap` distance between them.
     *
     * 0 (zero) means only single line will be drawn.
     *
     * @default 0
     * @since 4.7.7
     */
    set: function set(value) {
      this.properties["gap"] = value;
      this.draw();
    },
    enumerable: true,
    configurable: true
  });
  return LinePattern;
}(_Pattern__WEBPACK_IMPORTED_MODULE_0__.Pattern);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses.LinePattern = LinePattern;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/LinearGradient.js":
/*!*******************************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/LinearGradient.js ***!
  \*******************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "LinearGradient": () => (/* binding */ LinearGradient)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Base */ "./node_modules/@amcharts/amcharts4/.internal/core/Base.js");
/* harmony import */ var _utils_List__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/List */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/List.js");
/* harmony import */ var _Paper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Paper */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Paper.js");
/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _utils_Iterator__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/Iterator */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Iterator.js");
/* harmony import */ var _utils_Math__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
/* harmony import */ var _utils_Type__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/**
 * Contains code and logic for generating linear gradients.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */








/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Linear gradient class.
 */

var LinearGradient =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_7__.__extends)(LinearGradient, _super);
  /**
   * Constructor.
   */


  function LinearGradient() {
    var _this = // Init
    _super.call(this) || this;
    /**
     * List of colors switch definitions in a gradient.
     */


    _this._stops = new _utils_List__WEBPACK_IMPORTED_MODULE_1__.List();
    /**
     * Gradient direction.
     */

    _this._rotation = 0;
    _this.className = "LinearGradient";

    _this._stops.events.on("setIndex", _this.validate, _this);

    _this._stops.events.on("inserted", _this.validate, _this); // Create element


    _this.element = _this.paper.addGroup("linearGradient");
    _this.id = "gradient-" + _Registry__WEBPACK_IMPORTED_MODULE_3__.registry.getUniqueId();

    _this.element.attr({
      "id": _this.id
    });

    _this._disposers.push(_this.element); // Apply theme


    _this.applyTheme();

    return _this;
  }
  /**
   * Draws gradient.
   *
   * @ignore Exclude from docs
   */


  LinearGradient.prototype.validate = function () {
    var _this = this;

    var rotation = (this._rotation + 90) * _utils_Math__WEBPACK_IMPORTED_MODULE_5__.RADIANS;
    var x1 = Math.round(50 + Math.sin(rotation + Math.PI) * 50) + '%';
    var y1 = Math.round(50 + Math.cos(rotation) * 50) + '%';
    var x2 = Math.round(50 + Math.sin(rotation) * 50) + '%';
    var y2 = Math.round(50 + Math.cos(rotation + Math.PI) * 50) + '%';
    var gradientElement = this.element;
    gradientElement.removeChildNodes();
    gradientElement.attr({
      "x1": x1,
      "x2": x2,
      "y1": y1,
      "y2": y2
    });
    _utils_Iterator__WEBPACK_IMPORTED_MODULE_4__.each(_utils_Iterator__WEBPACK_IMPORTED_MODULE_4__.indexed(this._stops.iterator()), function (a) {
      var i = a[0];
      var stop = a[1];
      var offset = stop.offset;

      if (!_utils_Type__WEBPACK_IMPORTED_MODULE_6__.isNumber(offset)) {
        offset = i / (_this._stops.length - 1);
      }

      var gradientStop = _this.paper.add("stop");

      if (_utils_Type__WEBPACK_IMPORTED_MODULE_6__.hasValue(stop.color)) {
        gradientStop.attr({
          "stop-color": stop.color.toString()
        });
      }

      if (_utils_Type__WEBPACK_IMPORTED_MODULE_6__.isNumber(stop.opacity)) {
        gradientStop.attr({
          "stop-opacity": stop.opacity
        });
      }

      if (_utils_Type__WEBPACK_IMPORTED_MODULE_6__.isNumber(offset)) {
        gradientStop.attr({
          "offset": offset
        });
      }

      gradientElement.add(gradientStop);
    });
  };
  /**
   * Clears the gradient.
   *
   * @ignore Exclude from docs
   */


  LinearGradient.prototype.clear = function () {
    this._stops.clear();
  };
  /**
   * Adds a color step to the gradient.
   *
   * @param color    Color (hex code or named color)
   * @param opacity  Opacity (value from 0 to 1; 0 completely transaprent, 1 fully opaque)
   * @param offset   Position of color in the gradient (value 0 to 1; 0 meaning start of the gradient and 1 end)
   */


  LinearGradient.prototype.addColor = function (color, opacity, offset) {
    this._stops.push({
      color: color,
      opacity: opacity,
      offset: offset
    });
  };

  Object.defineProperty(LinearGradient.prototype, "stops", {
    /**
     * A list of color stops in the gradient.
     *
     * @return Stops
     */
    get: function get() {
      return this._stops;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(LinearGradient.prototype, "paper", {
    /**
     * @ignore Exclude from docs
     * @return Paper
     */
    get: function get() {
      if (this._paper) {
        return this._paper;
      }

      return (0,_Paper__WEBPACK_IMPORTED_MODULE_2__.getGhostPaper)();
    },

    /**
     * [[Paper]] instace to use for the gradient.
     *
     * @ignore Exclude from docs
     * @param paper  Paper
     */
    set: function set(paper) {
      if (this._paper != paper) {
        this._paper = paper;
        this.validate();
        paper.appendDef(this.element);
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(LinearGradient.prototype, "rotation", {
    /**
     * @return Rotation
     */
    get: function get() {
      return this._rotation;
    },

    /**
     * Rotation (direction) of the gradient in degrees.
     *
     * @param value  Rotation
     */
    set: function set(value) {
      //this.element.attr({ "gradientTransform": "rotate(" + value + " 10 100)" });
      this._rotation = value;
      this.validate();
    },
    enumerable: true,
    configurable: true
  });

  LinearGradient.prototype.copyFrom = function (source) {
    _super.prototype.copyFrom.call(this, source);

    this.stops.copyFrom(source.stops);
    this._rotation = source.rotation;
  };

  Object.defineProperty(LinearGradient.prototype, "gradientUnits", {
    /**
     * Which units are used when drawing gradient filter.
     *
     * Use `"userSpaceOnUse"` when applying gradient on a perfectly straight line.
     *
     * @since 4.9.17
     * @default objectBoundingBox
     * @param value Filter units
     */
    set: function set(value) {
      this.element.attr({
        gradientUnits: value
      });
    },
    enumerable: true,
    configurable: true
  });
  return LinearGradient;
}(_Base__WEBPACK_IMPORTED_MODULE_0__.BaseObject);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_Registry__WEBPACK_IMPORTED_MODULE_3__.registry.registeredClasses.LinearGradient = LinearGradient;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/LinearGradientModifier.js":
/*!***************************************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/LinearGradientModifier.js ***!
  \***************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "LinearGradientModifier": () => (/* binding */ LinearGradientModifier)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _LinearGradient__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./LinearGradient */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/LinearGradient.js");
/* harmony import */ var _GradientModifier__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./GradientModifier */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/GradientModifier.js");
/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */




/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * This class can be used to modify linear gradient steps, changing visual
 * properties like lightness, brightness, opacity of each set.
 *
 * It can also set offsets for each gradient step.
 *
 * E.g. if I want to fill a columns in a column series to be a solid fill from
 * top to 80% of height, then gradually fades out, I can use the following
 * gradient modifier as a `fillModifier`:
 *
 * ```TypeScript
 * let fillModifier = new am4core.LinearGradientModifier();
 * fillModifier.opacities = [1, 1, 0];
 * fillModifier.offsets = [0, 0.8, 1];
 * columnSeries.columns.template.fillModifier = fillModifier;
 * ```
 * ```JavaScript
 * var fillModifier = new am4core.LinearGradientModifier();
 * fillModifier.opacities = [1, 1, 0];
 * fillModifier.offsets = [0, 0.8, 1];
 * columnSeries.columns.template.fillModifier = fillModifier;
 * ```
 * ```JSON
 * "series": [{
 *   "type": "ColumnSeries",
 *   "columns": {
 *     "fillModifier": {
 *       "type": "LinearGradientModifier",
 *       "opacities": [1, 1, 0],
 *       "offsets": [0, 0.8, 1]
 *     }
 *   }
 * }]
 * ```
 */

var LinearGradientModifier =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__extends)(LinearGradientModifier, _super);
  /**
   * Constructor.
   */


  function LinearGradientModifier() {
    var _this = _super.call(this) || this;

    _this.className = "LinearGradientModifier";
    _this.gradient = new _LinearGradient__WEBPACK_IMPORTED_MODULE_0__.LinearGradient();

    _this.applyTheme();

    return _this;
  }

  LinearGradientModifier.prototype.copyFrom = function (source) {
    _super.prototype.copyFrom.call(this, source);

    this.gradient = source.gradient.clone();
  };

  return LinearGradientModifier;
}(_GradientModifier__WEBPACK_IMPORTED_MODULE_1__.GradientModifier);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_Registry__WEBPACK_IMPORTED_MODULE_2__.registry.registeredClasses.LinearGradientModifier = LinearGradientModifier;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/Pattern.js":
/*!************************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/Pattern.js ***!
  \************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Pattern": () => (/* binding */ Pattern)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Base */ "./node_modules/@amcharts/amcharts4/.internal/core/Base.js");
/* harmony import */ var _Paper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Paper */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Paper.js");
/* harmony import */ var _utils_List__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils/List */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/List.js");
/* harmony import */ var _utils_Animation__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/Animation */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Animation.js");
/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils/InterfaceColorSet */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/InterfaceColorSet.js");
/* harmony import */ var _utils_Iterator__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../utils/Iterator */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Iterator.js");
/* harmony import */ var _utils_Object__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../utils/Object */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Object.js");
/* harmony import */ var _utils_Type__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/**
 * Pattern module.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */










;
/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Base class to define patterns.
 */

var Pattern =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_9__.__extends)(Pattern, _super); //public propertyValues = new Dictionary<PatternProperties, any>();

  /**
   * Constructor
   */


  function Pattern() {
    var _this = // Init
    _super.call(this) || this;
    /**
     * List of elements the pattern consists of.
     */


    _this._elements = new _utils_List__WEBPACK_IMPORTED_MODULE_2__.List();
    /**
     * A storage for Filter property/value pairs.
     *
     * @ignore Exclude from docs
     * @see {@link PatternProperties}
     */

    _this.properties = {};
    _this.className = "Pattern"; // Set defaults

    _this.width = 10;
    _this.height = 10;
    _this.x = 0;
    _this.y = 0;
    _this.patternUnits = "userSpaceOnUse";
    var interfaceColors = new _utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_5__.InterfaceColorSet();
    _this.backgroundFill = interfaceColors.getFor("background");
    _this.backgroundOpacity = 0;
    _this.fillOpacity = 1;
    _this.fill = interfaceColors.getFor("alternativeBackground");
    _this.stroke = interfaceColors.getFor("alternativeBackground");
    _this.strokeOpacity = 1;
    _this.strokeWidth = 1;
    _this.shapeRendering = "crispEdges";
    _this.rotation = 0; // Create main group to store pattern elements inelements

    _this.element = _this.paper.addGroup("pattern");
    _this.id = "pattern-" + _Registry__WEBPACK_IMPORTED_MODULE_4__.registry.getUniqueId();

    _this.element.attr({
      "id": _this.id
    });

    _this._disposers.push(_this.element); // Make elements disposable


    _this._disposers.push(new _utils_List__WEBPACK_IMPORTED_MODULE_2__.ListDisposer(_this._elements)); // Request again to trigger getter/setter code


    _this.patternUnits = _this.patternUnits;
    _this.width = _this.width;
    _this.height = _this.height; // Apply theme

    _this.applyTheme();

    return _this;
  }
  /**
   * Draws the pattern.
   */


  Pattern.prototype.draw = function () {
    var _this = this;

    var patternElement = this.element;

    if (patternElement) {
      patternElement.removeChildNodes();
      var background = this.paper.add("rect");
      background.attr({
        "width": this.width,
        "height": this.height,
        "shape-rendering": "crispEdges",
        "fill": this.backgroundFill.hex,
        "fill-opacity": this.backgroundOpacity,
        "stroke": this.backgroundFill.hex,
        "stroke-opacity": 0
      });
      patternElement.add(background);
      patternElement.attr({
        "x": this.x,
        "y": this.y,
        "width": this.width,
        "height": this.height,
        "stroke": this.stroke.hex,
        "fill": this.fill.hex,
        "fill-opacity": this.fillOpacity,
        "stroke-opacity": this.strokeOpacity,
        "stroke-width": this.strokeWidth,
        "shape-rendering": this.shapeRendering,
        "patternUnits": this.patternUnits,
        "stroke-dasharray": this.strokeDasharray
      });
      _utils_Iterator__WEBPACK_IMPORTED_MODULE_6__.each(this._elements.iterator(), function (element) {
        element.rotation = _this.rotation;
        element.rotationX = _this.properties["rotationX"];
        element.rotationY = _this.properties["rotationY"];

        _this.element.add(element);
      });
    }
  };
  /**
   * Animate pattern properties.
   *
   * @see {@link Animation}
   * @param animationOptions  Animation options
   * @param duration          Duration (ms)
   * @param easing            Easing function
   * @return Animation instance
   */


  Pattern.prototype.animate = function (animationOptions, duration, easing) {
    return new _utils_Animation__WEBPACK_IMPORTED_MODULE_3__.Animation(this, animationOptions, duration, easing).start();
  };
  /**
   * Adds an element to the pattern.
   *
   * @param element  Element
   */


  Pattern.prototype.addElement = function (element) {
    this._elements.push(element);

    this._disposers.push(element);
  };
  /**
   * Remove an element from the pattern.
   *
   * @param element  Element
   */


  Pattern.prototype.removeElement = function (element) {
    this._elements.removeValue(element);

    this.removeDispose(element);
  };

  Object.defineProperty(Pattern.prototype, "elements", {
    /**
     * Returns the list of SVG elements comprising the pattern.
     *
     * @return Pattern elements
     */
    get: function get() {
      return this._elements;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Pattern.prototype, "fillOpacity", {
    /**
     * @return Opacity (0-1)
     */
    get: function get() {
      return this.properties["fillOpacity"];
    },

    /**
     * Pattern fill opacity. (0-1)
     *
     * @param value  Opacity (0-1)
     */
    set: function set(value) {
      this.properties["fillOpacity"] = value;
      this.draw();
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Pattern.prototype, "fill", {
    /**
     * @return Fill color
     */
    get: function get() {
      return this.properties["fill"];
    },

    /**
     * Fill color of the pattern.
     *
     * @param value  Fill color
     */
    set: function set(value) {
      this.properties["fill"] = value;
      this.draw();
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Pattern.prototype, "backgroundFill", {
    /**
     * @return Background color
     */
    get: function get() {
      return this.properties["backgroundFill"];
    },

    /**
     * Pattern background fill color.
     *
     * @param value  Background color
     */
    set: function set(value) {
      this.properties["backgroundFill"] = value;
      this.draw();
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Pattern.prototype, "backgroundOpacity", {
    /**
     * @return Background opacity (0-1)
     */
    get: function get() {
      return this.properties["backgroundOpacity"];
    },

    /**
     * Pattern backgorund opacity. (0-1)
     *
     * @param value  Background opacity (0-1)
     */
    set: function set(value) {
      this.properties["backgroundOpacity"] = value;
      this.draw();
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Pattern.prototype, "stroke", {
    /**
     * @return Color
     */
    get: function get() {
      return this.properties["stroke"];
    },

    /**
     * Pattern stroke (border) color.
     *
     * @param value  Color
     */
    set: function set(value) {
      this.properties["stroke"] = value;
      this.draw();
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Pattern.prototype, "strokeOpacity", {
    /**
     * @return Opacity (0-1)
     */
    get: function get() {
      return this.properties["strokeOpacity"];
    },

    /**
     * Pattern stroke opacity. (0-1)
     *
     * @param value  Opacity (0-1)
     */
    set: function set(value) {
      this.properties["strokeOpacity"] = value;
      this.draw();
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Pattern.prototype, "strokeWidth", {
    /**
     * @return Stroke thickness (px)
     */
    get: function get() {
      return this.properties["strokeWidth"];
    },

    /**
     * Pattern stroke thickness in pixels.
     *
     * @param value  Stroke thickness (px)
     */
    set: function set(value) {
      this.properties["strokeWidth"] = value;
      this.draw();
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Pattern.prototype, "shapeRendering", {
    get: function get() {
      return this.properties["shapeRendering"];
    },

    /**
     * Shape rendering
     * @param value [description]
     */
    set: function set(value) {
      this.properties["shapeRendering"] = value;
      this.draw();
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Pattern.prototype, "rotation", {
    /**
     * @return Rotation
     */
    get: function get() {
      return this.properties["rotation"];
    },

    /**
     * Pattern rotation in degrees.
     *
     * @param value  Rotation
     */
    set: function set(value) {
      this.properties["rotation"] = value;
      this.draw();
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Pattern.prototype, "patternUnits", {
    /**
     * @return Units
     */
    get: function get() {
      return this.properties["patternUnits"];
    },

    /**
     * Pattern measuring units.
     *
     * Available options: "userSpaceOnUse" | "objectBoundingBox".
     *
     * @param value  Units
     */
    set: function set(value) {
      this.properties["patternUnits"] = value;
      this.draw();
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Pattern.prototype, "width", {
    /**
     * @return Width (px)
     */
    get: function get() {
      return this.properties["width"];
    },

    /**
     * Pattern width in pixels.
     *
     * @param value  Width (px)
     */
    set: function set(value) {
      this.properties["width"] = value;
      this.draw();
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Pattern.prototype, "height", {
    /**
     * @return Height (px)
     */
    get: function get() {
      return this.properties["height"];
    },

    /**
     * Pattern height in pixels.
     *
     * @param value Height (px)
     */
    set: function set(value) {
      this.properties["height"] = value;
      this.draw();
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Pattern.prototype, "x", {
    /**
     * @return X (px)
     */
    get: function get() {
      return this.properties["x"];
    },

    /**
     * X position. (pixels)
     *
     * @param value X (px)
     */
    set: function set(value) {
      this.properties["x"] = value;
      this.draw();
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Pattern.prototype, "y", {
    /**
     * @return Y (px)
     */
    get: function get() {
      return this.properties["y"];
    },

    /**
     * Y position (px).
     *
     * @param value Y (px)
     */
    set: function set(value) {
      this.properties["y"] = value;
      this.draw();
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Pattern.prototype, "paper", {
    /**
     * @ignore Exclude from docs
     * @return Paper
     */
    get: function get() {
      if (this._paper) {
        return this._paper;
      }

      return (0,_Paper__WEBPACK_IMPORTED_MODULE_1__.getGhostPaper)();
    },

    /**
     * [[Paper]] instance to draw pattern in.
     *
     * @ignore Exclude from docs
     * @param paper  Paper
     */
    set: function set(paper) {
      if (this._paper != paper) {
        this._paper = paper;
        this.draw();
        paper.appendDef(this.element);
      }
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Copies properties from another Pattern instance.
   *
   * @param source  Source pattern
   */

  Pattern.prototype.copyFrom = function (source) {
    var _this = this;

    _super.prototype.copyFrom.call(this, source);

    _utils_Object__WEBPACK_IMPORTED_MODULE_7__.each(source.properties, function (key, value) {
      _this[key] = value;
    });
  };

  Object.defineProperty(Pattern.prototype, "animations", {
    /**
     * A list of animations currently running on the patter.
     *
     * @ignore Exclude from docs
     * @return Animation list
     */
    get: function get() {
      if (!this._animations) {
        this._animations = [];

        this._disposers.push(new _utils_Animation__WEBPACK_IMPORTED_MODULE_3__.AnimationDisposer(this._animations));
      }

      return this._animations;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Pattern.prototype, "strokeDasharray", {
    /**
     * @return `stroke-dasharray`
     */
    get: function get() {
      return this.properties["strokeDashArray"];
    },

    /**
     * A `stroke-dasharray` for the stroke (outline).
     *
     * "Dasharray" allows setting rules to make lines dashed, dotted, etc.
     *
     * @see {@link https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-dasharray} for more info on `stroke-dasharray`
     * @param value  `stroke-dasharray`
     */
    set: function set(value) {
      this.properties["strokeDashArray"] = value;
      this.draw();
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Processes JSON-based config before it is applied to the object.
   *
   * @ignore Exclude from docs
   * @param config  Config
   */

  Pattern.prototype.processConfig = function (config) {
    if (config) {
      // Set up series
      if (_utils_Type__WEBPACK_IMPORTED_MODULE_8__.hasValue(config.elements) && _utils_Type__WEBPACK_IMPORTED_MODULE_8__.isArray(config.elements)) {
        for (var i = 0, len = config.elements.length; i < len; i++) {
          var element = config.elements[i];

          if (_utils_Type__WEBPACK_IMPORTED_MODULE_8__.hasValue(element["type"])) {
            var sprite = this.createEntryInstance(element);

            if (sprite instanceof _Base__WEBPACK_IMPORTED_MODULE_0__.BaseObject) {
              sprite.config = element;
            }

            this.addElement(_utils_Type__WEBPACK_IMPORTED_MODULE_8__.hasValue(element["typeProperty"]) ? sprite[element["typeProperty"]] : sprite.element);
          }
        }
      }
    }

    _super.prototype.processConfig.call(this, config);
  };

  return Pattern;
}(_Base__WEBPACK_IMPORTED_MODULE_0__.BaseObject);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_Registry__WEBPACK_IMPORTED_MODULE_4__.registry.registeredClasses.Pattern = Pattern;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/RadialGradient.js":
/*!*******************************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/RadialGradient.js ***!
  \*******************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "RadialGradient": () => (/* binding */ RadialGradient)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Base */ "./node_modules/@amcharts/amcharts4/.internal/core/Base.js");
/* harmony import */ var _utils_List__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/List */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/List.js");
/* harmony import */ var _Paper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Paper */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Paper.js");
/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _utils_Iterator__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/Iterator */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Iterator.js");
/* harmony import */ var _utils_Type__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/* harmony import */ var _utils_Percent__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../utils/Percent */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Percent.js");
/**
 * Contains code and logic for generating radial gradients.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */








/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Radial gradient class.
 */

var RadialGradient =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_7__.__extends)(RadialGradient, _super);
  /**
   * Constructor
   */


  function RadialGradient() {
    var _this = _super.call(this) || this;
    /**
     * List of colors switch definitions in a gradient.
     */


    _this._stops = new _utils_List__WEBPACK_IMPORTED_MODULE_1__.List();
    _this.element = _this.paper.addGroup("radialGradient");
    _this.id = "gradient-" + _Registry__WEBPACK_IMPORTED_MODULE_3__.registry.getUniqueId();

    _this.element.attr({
      "id": _this.id
    });

    _this._disposers.push(_this.element);

    _this.applyTheme();

    return _this;
  }
  /**
   * Draws gradient.
   */


  RadialGradient.prototype.draw = function () {
    var _this = this;

    var gradientElement = this.element;

    if (_utils_Type__WEBPACK_IMPORTED_MODULE_5__.isNumber(this.cx)) {
      var value = this.cx;

      if (value instanceof _utils_Percent__WEBPACK_IMPORTED_MODULE_6__.Percent) {
        value = value.percent + "%";
      }

      gradientElement.attr({
        "cx": value
      });
    }

    if (_utils_Type__WEBPACK_IMPORTED_MODULE_5__.isNumber(this.cy)) {
      var value = this.cy;

      if (value instanceof _utils_Percent__WEBPACK_IMPORTED_MODULE_6__.Percent) {
        value = value.percent + "%";
      }

      gradientElement.attr({
        "cy": value
      });
    }

    if (this.fx) {
      var value = this.fx;

      if (value instanceof _utils_Percent__WEBPACK_IMPORTED_MODULE_6__.Percent) {
        value = value.percent + "%";
      }

      gradientElement.attr({
        "fx": value
      });
    }

    if (this.fy) {
      var value = this.fy;

      if (value instanceof _utils_Percent__WEBPACK_IMPORTED_MODULE_6__.Percent) {
        value = value.percent + "%";
      }

      gradientElement.attr({
        "fy": value
      });
    }

    gradientElement.removeChildNodes();
    _utils_Iterator__WEBPACK_IMPORTED_MODULE_4__.each(_utils_Iterator__WEBPACK_IMPORTED_MODULE_4__.indexed(this._stops.iterator()), function (a) {
      var i = a[0];
      var stop = a[1];
      var offset = stop.offset;

      if (!_utils_Type__WEBPACK_IMPORTED_MODULE_5__.isNumber(offset)) {
        offset = i / (_this._stops.length - 1);
      }

      var gradientStop = _this.paper.add("stop");

      if (_utils_Type__WEBPACK_IMPORTED_MODULE_5__.hasValue(stop.color)) {
        gradientStop.attr({
          "stop-color": stop.color.toString()
        });
      }

      if (_utils_Type__WEBPACK_IMPORTED_MODULE_5__.isNumber(stop.opacity)) {
        gradientStop.attr({
          "stop-opacity": stop.opacity
        });
      }

      if (_utils_Type__WEBPACK_IMPORTED_MODULE_5__.isNumber(offset)) {
        gradientStop.attr({
          "offset": offset
        });
      }

      gradientElement.add(gradientStop);
    });
  };
  /**
   * Adds a color step to the gradient.
   *
   * @param color    Color (hex code or named color)
   * @param opacity  Opacity (value from 0 to 1; 0 completely transaprent, 1 fully opaque)
   * @param offset   Position of color in the gradient (value 0 to 1; 0 meaning start of the gradient and 1 end)
   */


  RadialGradient.prototype.addColor = function (color, opacity, offset) {
    this._stops.push({
      color: color,
      opacity: opacity,
      offset: offset
    });

    this.draw();
  };

  Object.defineProperty(RadialGradient.prototype, "paper", {
    /**
     * @ignore Exclude from docs
     * @return Paper
     */
    get: function get() {
      if (this._paper) {
        return this._paper;
      }

      return (0,_Paper__WEBPACK_IMPORTED_MODULE_2__.getGhostPaper)();
    },

    /**
     * A [[Paper]] instace to use for the gradient.
     *
     * @ignore Exclude from docs
     * @param paper  Paper
     */
    set: function set(paper) {
      if (this._paper != paper) {
        this._paper = paper;
        this.draw();
        paper.appendDef(this.element);
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(RadialGradient.prototype, "cx", {
    get: function get() {
      return this._cx;
    },

    /**
     * Center x coordinate of the gradient, can be set as number or Percent
     *
     * @param point  Center point
     */
    set: function set(value) {
      this._cx = value;
      this.draw();
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(RadialGradient.prototype, "cy", {
    get: function get() {
      return this._cy;
    },

    /**
     * Center y coordinate of the gradient, can be set as number or Percent
     *
     * @param point  Center point
     */
    set: function set(value) {
      this._cy = value;
      this.draw();
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(RadialGradient.prototype, "fx", {
    get: function get() {
      return this._fx;
    },

    /**
     * y coordinate of the focal point of a gradient, can be set in pixels or as Percent
     *
     * @param point  Center point
     */
    set: function set(value) {
      this._fx = value;
      this.draw();
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(RadialGradient.prototype, "fy", {
    get: function get() {
      return this._fy;
    },

    /**
     * y coordinate of the focal point of a gradient, can be set in pixels or as Percent
     *
     * @param point  Center point
     */
    set: function set(value) {
      this._fy = value;
      this.draw();
    },
    enumerable: true,
    configurable: true
  });

  RadialGradient.prototype.copyFrom = function (source) {
    _super.prototype.copyFrom.call(this, source);

    this.stops.copyFrom(source.stops);
    this.cx = source.cx;
    this.cy = source.cy;
    this.fx = source.fx;
    this.fy = source.fy;
  };

  Object.defineProperty(RadialGradient.prototype, "stops", {
    /**
     * A list of color stops in the gradient.
     *
     * @return Stops
     */
    get: function get() {
      return this._stops;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Clears the gradient.
   *
   * @ignore Exclude from docs
   */

  RadialGradient.prototype.clear = function () {
    this._stops.clear();
  };

  return RadialGradient;
}(_Base__WEBPACK_IMPORTED_MODULE_0__.BaseObject);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_Registry__WEBPACK_IMPORTED_MODULE_3__.registry.registeredClasses.RadialGradient = RadialGradient;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/RadialGradientModifier.js":
/*!***************************************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/RadialGradientModifier.js ***!
  \***************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "RadialGradientModifier": () => (/* binding */ RadialGradientModifier)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _RadialGradient__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./RadialGradient */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/RadialGradient.js");
/* harmony import */ var _GradientModifier__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./GradientModifier */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/GradientModifier.js");
/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */




/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * This class can be used to modify radial gradient steps, changing visual
 * properties like lightness, brightness, opacity of each set.
 *
 * It can also set offsets for each gradient step.
 *
 * E.g. if I want to fill a columns in a column series to be a solid fill from
 * top to 80% of height, then gradually fades out, I can use the following
 * gradient modifier as a `fillModifier`:
 *
 * ```TypeScript
 * let fillModifier = new am4core.LinearGradientModifier();
 * fillModifier.opacities = [1, 1, 0];
 * fillModifier.offsets = [0, 0.8, 1];
 * columnSeries.columns.template.fillModifier = fillModifier;
 * ```
 * ```JavaScript
 * var fillModifier = new am4core.LinearGradientModifier();
 * fillModifier.opacities = [1, 1, 0];
 * fillModifier.offsets = [0, 0.8, 1];
 * columnSeries.columns.template.fillModifier = fillModifier;
 * ```
 * ```JSON
 * "series": [{
 *   "type": "ColumnSeries",
 *   "columns": {
 *     "fillModifier": {
 *       "type": "LinearGradientModifier",
 *       "opacities": [1, 1, 0],
 *       "offsets": [0, 0.8, 1]
 *     }
 *   }
 * }]
 * ```
 */

var RadialGradientModifier =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__extends)(RadialGradientModifier, _super);
  /**
   * Constructor.
   */


  function RadialGradientModifier() {
    var _this = _super.call(this) || this;

    _this.className = "RadialGradientModifier";
    _this.gradient = new _RadialGradient__WEBPACK_IMPORTED_MODULE_0__.RadialGradient();

    _this.applyTheme();

    return _this;
  }

  RadialGradientModifier.prototype.copyFrom = function (source) {
    _super.prototype.copyFrom.call(this, source);

    this.gradient = source.gradient.clone();
  };

  return RadialGradientModifier;
}(_GradientModifier__WEBPACK_IMPORTED_MODULE_1__.GradientModifier);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_Registry__WEBPACK_IMPORTED_MODULE_2__.registry.registeredClasses.RadialGradientModifier = RadialGradientModifier;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/RectPattern.js":
/*!****************************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/RectPattern.js ***!
  \****************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "RectPattern": () => (/* binding */ RectPattern)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Pattern__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Pattern */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/Pattern.js");
/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/**
 * Rectangular pattern module.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */



;
/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Rectangular pattern
 */

var RectPattern =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(RectPattern, _super);
  /**
   * Constructor
   */


  function RectPattern() {
    var _this = _super.call(this) || this;

    _this.rectHeight = 1;
    _this.rectWidth = 1;
    _this._rect = _this.paper.add("rect");

    _this.addElement(_this._rect);

    return _this;
  }
  /**
   * Draws the rectangular element.
   */


  RectPattern.prototype.draw = function () {
    _super.prototype.draw.call(this);

    this.properties["rotationX"] = this.width / 2;
    this.properties["rotationY"] = this.height / 2;

    if (this._rect) {
      this._rect.attr({
        "width": this.rectWidth,
        "height": this.rectHeight,
        "x": (this.width - this.rectWidth) / 2,
        "y": (this.height - this.rectHeight) / 2
      });
    }
  };

  Object.defineProperty(RectPattern.prototype, "rectWidth", {
    /**
     * @return Width (px)
     */
    get: function get() {
      return this.properties["rectWidth"];
    },

    /**
     * Rectangle width in pixels.
     *
     * @param value Width (px)
     */
    set: function set(value) {
      this.properties["rectWidth"] = value;
      this.draw();
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(RectPattern.prototype, "rectHeight", {
    /**
     * @return Height (px)
     */
    get: function get() {
      return this.properties["rectHeight"];
    },

    /**
     * Rectangle height in pixels.
     *
     * @param value Height (px)
     */
    set: function set(value) {
      this.properties["rectHeight"] = value;
      this.draw();
    },
    enumerable: true,
    configurable: true
  });
  return RectPattern;
}(_Pattern__WEBPACK_IMPORTED_MODULE_0__.Pattern);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses.RectPattern = RectPattern;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/filters/BlurFilter.js":
/*!*****************************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/rendering/filters/BlurFilter.js ***!
  \*****************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "BlurFilter": () => (/* binding */ BlurFilter)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Filter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Filter */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/filters/Filter.js");
/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/**
 * Module for "Blur" filter.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */



;
/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Creates a "Blur" filter.
 */

var BlurFilter =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(BlurFilter, _super);
  /**
   * Constructor
   */


  function BlurFilter() {
    var _this = _super.call(this) || this;

    _this.className = "BlurFilter"; // Create elements
    // NOTE: we do not need to add each individual element to `_disposers`
    // because `filterPrimitives` has an event handler which automatically adds
    // anything added to it to `_disposers`

    _this.feGaussianBlur = _this.paper.add("feGaussianBlur");

    _this.feGaussianBlur.attr({
      "result": "blurOut",
      "in": "SourceGraphic"
    });

    _this.filterPrimitives.push(_this.feGaussianBlur); // Set default properties


    _this.width = 200;
    _this.height = 200;
    _this.blur = 1.5;

    _this.applyTheme();

    return _this;
  }

  Object.defineProperty(BlurFilter.prototype, "blur", {
    /**
     * @return Blur
     */
    get: function get() {
      return this.properties.blur;
    },

    /**
     * Blur value.
     *
     * The bigger the value, the blurrier the target element will become.
     *
     * @default 1.5
     * @param value Blur
     */
    set: function set(value) {
      this.properties.blur = value;
      this.feGaussianBlur.attr({
        "stdDeviation": value / this.scale
      });
    },
    enumerable: true,
    configurable: true
  });
  return BlurFilter;
}(_Filter__WEBPACK_IMPORTED_MODULE_0__.Filter);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses.BlurFilter = BlurFilter;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/filters/ColorizeFilter.js":
/*!*********************************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/rendering/filters/ColorizeFilter.js ***!
  \*********************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "ColorizeFilter": () => (/* binding */ ColorizeFilter)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Filter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Filter */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/filters/Filter.js");
/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/**
 * Module for "Colorize" filter.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */



;
/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Creates a "Colorize" filter.
 */

var ColorizeFilter =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(ColorizeFilter, _super);
  /**
   * Constructor
   */


  function ColorizeFilter() {
    var _this = _super.call(this) || this;

    _this.className = "ColorizeFilter"; // Create elements
    // NOTE: we do not need to add each individual element to `_disposers`
    // because `filterPrimitives` has an event handler which automatically adds
    // anything added to it to `_disposers`

    _this.feColorMatrix = _this.paper.add("feColorMatrix");

    _this.feColorMatrix.attr({
      "type": "matrix"
    }); //this.feColorMatrix.setAttribute("in", "SourceAlpha");


    _this.filterPrimitives.push(_this.feColorMatrix); // Set default properties


    _this.intensity = 1;

    _this.applyTheme();

    return _this;
  }
  /**
   * (Re)applies colors to the already existing filter by modifying filyer's
   * color matrix element.
   *
   * @ignore Exclude from docs
   */


  ColorizeFilter.prototype.applyFilter = function () {
    var i = this.intensity;
    var ii = 1 - i;
    var r;
    var g;
    var b;
    var color = this.color;

    if (color && color.rgb) {
      r = color.rgb.r / 255 * i;
      g = color.rgb.g / 255 * i;
      b = color.rgb.b / 255 * i;
    } else {
      r = 0;
      g = 0;
      b = 0;
    }

    this.feColorMatrix.attr({
      "values": ii + " 0 0 0 " + r + " 0 " + ii + " 0 0 " + g + " 0 0 " + ii + " 0 " + b + " 0 0 0 1 0"
    });
  };

  Object.defineProperty(ColorizeFilter.prototype, "color", {
    /**
     * @return Color
     */
    get: function get() {
      return this.properties["color"];
    },

    /**
     * Target color to apply to the element.
     *
     * Depending on the `intensity`, all colors of the target element will steer
     * towards this color.
     *
     * E.g. setting to `am4core.color("greener")` will make all colors greener.
     *
     * @param value  Color
     */
    set: function set(value) {
      this.properties["color"] = value;
      this.applyFilter();
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(ColorizeFilter.prototype, "intensity", {
    /**
     * @return Intensity (0-1)
     */
    get: function get() {
      return this.properties.intensity;
    },

    /**
     * Intensity of the color (0-1).
     *
     * The bigger the number the more of a `color` target's colors will become.
     *
     * 0 means the colors will remain as they are.
     * 1 means all colors will become the target `color`.
     *
     * @default 1
     * @param value  Intensity (0-1)
     */
    set: function set(value) {
      this.properties.intensity = value;
      this.applyFilter();
    },
    enumerable: true,
    configurable: true
  });
  return ColorizeFilter;
}(_Filter__WEBPACK_IMPORTED_MODULE_0__.Filter);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses.ColorizeFilter = ColorizeFilter;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/filters/DesaturateFilter.js":
/*!***********************************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/rendering/filters/DesaturateFilter.js ***!
  \***********************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "DesaturateFilter": () => (/* binding */ DesaturateFilter)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Filter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Filter */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/filters/Filter.js");
/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/**
 * Module for "Desaturate" filter.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */



/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Creats a "Desaturate" filter
 */

var DesaturateFilter =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(DesaturateFilter, _super);
  /**
   * Constructor
   */


  function DesaturateFilter() {
    var _this = _super.call(this) || this;

    _this.className = "DesaturateFilter"; // Create elements
    // NOTE: we do not need to add each individual element to `_disposers`
    // because `filterPrimitives` has an event handler which automatically adds
    // anything added to it to `_disposers`

    _this.feColorMatrix = _this.paper.add("feColorMatrix");

    _this.feColorMatrix.attr({
      "type": "saturate"
    });

    _this.filterPrimitives.push(_this.feColorMatrix); // Set default properties


    _this.width = 120;
    _this.height = 120;
    _this.saturation = 0;

    _this.applyTheme();

    return _this;
  }

  Object.defineProperty(DesaturateFilter.prototype, "saturation", {
    /**
     * @return Saturation (0-1)
     */
    get: function get() {
      return this.properties["saturation"];
    },

    /**
     * Saturation.
     *
     * 0 - completely desaturated.
     * 1 - fully saturated (gray).
     *
     * @param value  Saturation (0-1)
     */
    set: function set(value) {
      this.properties["saturation"] = value;
      this.feColorMatrix.attr({
        "values": value.toString()
      });
    },
    enumerable: true,
    configurable: true
  });
  return DesaturateFilter;
}(_Filter__WEBPACK_IMPORTED_MODULE_0__.Filter);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses.DesaturateFilter = DesaturateFilter;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/filters/DropShadowFilter.js":
/*!***********************************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/rendering/filters/DropShadowFilter.js ***!
  \***********************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "DropShadowFilter": () => (/* binding */ DropShadowFilter)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Filter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Filter */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/filters/Filter.js");
/* harmony import */ var _utils_Color__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/Color */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Color.js");
/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/**
 * Module for "Drop Shadow" filter.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */




;
/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Creats a "Drop Shadow" filter.
 */

var DropShadowFilter =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__extends)(DropShadowFilter, _super);
  /**
   * Constructor
   */


  function DropShadowFilter() {
    var _this = _super.call(this) || this;

    _this.className = "DropShadowFilter"; // Create elements
    // NOTE: we do not need to add each individual element to `_disposers`
    // because `filterPrimitives` has an event handler which automatically adds
    // anything added to it to `_disposers`

    _this.color = (0,_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#000");
    _this.feGaussianBlur = _this.paper.add("feGaussianBlur");

    _this.feGaussianBlur.attr({
      "result": "blurOut",
      "in": "SourceGraphic"
    });

    _this.filterPrimitives.push(_this.feGaussianBlur);

    _this.feOffset = _this.paper.add("feOffset");

    _this.feOffset.attr({
      "result": "offsetBlur"
    });

    _this.filterPrimitives.push(_this.feOffset);

    _this.feFlood = _this.paper.add("feFlood");

    _this.feFlood.attr({
      "flood-color": _this.color
    });

    _this.filterPrimitives.push(_this.feFlood);

    _this.feComposite = _this.paper.add("feComposite");

    _this.feComposite.attr({
      "in2": "offsetBlur",
      operator: "in"
    });

    _this.filterPrimitives.push(_this.feComposite);

    _this.feMerge = _this.paper.addGroup("feMerge");

    _this.feMerge.add(_this.paper.add("feMergeNode"));

    _this.feMerge.add(_this.paper.add("feMergeNode").attr({
      "in": "SourceGraphic"
    }));

    _this.filterPrimitives.push(_this.feMerge); // Set default properties


    _this.width = 200;
    _this.height = 200;
    _this.blur = 1.5;
    _this.dx = 3;
    _this.dy = 3;
    _this.opacity = 0.5;

    _this.applyTheme();

    return _this;
  }

  Object.defineProperty(DropShadowFilter.prototype, "color", {
    /**
     * @return Color
     */
    get: function get() {
      return this.properties.color;
    },

    /**
     * Shadow color.
     *
     * @param value  Color
     */
    set: function set(value) {
      this.properties.color = value;

      if (this.feFlood) {
        this.feFlood.attr({
          "flood-color": value
        });
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(DropShadowFilter.prototype, "opacity", {
    /**
     * @return Opacity (0-1)
     */
    get: function get() {
      return this.properties.opacity;
    },

    /**
     * Opacity of the shadow. (0-1)
     *
     * @param value  Opacity (0-1)
     */
    set: function set(value) {
      this.properties.opacity = value;
      this.feFlood.attr({
        "flood-opacity": value
      });
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(DropShadowFilter.prototype, "dx", {
    /**
     * @return Horizontal offset (px)
     */
    get: function get() {
      return this.properties.dx;
    },

    /**
     * Horizontal offset in pixels.
     *
     * @param value  Horizontal offset (px)
     */
    set: function set(value) {
      this.properties.dx = value;
      this.feOffset.attr({
        "dx": value / this.scale
      });
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(DropShadowFilter.prototype, "dy", {
    /**
     * @return Vertical offset (px)
     */
    get: function get() {
      return this.properties.dy;
    },

    /**
     * Vertical offset in pixels.
     *
     * @param value Vertical offset (px)
     */
    set: function set(value) {
      this.properties.dy = value;
      this.feOffset.attr({
        "dy": value / this.scale
      });
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(DropShadowFilter.prototype, "blur", {
    /**
     * @return Blur
     */
    get: function get() {
      return this.properties.blur;
    },

    /**
     * Blur.
     *
     * @param value  Blur
     */
    set: function set(value) {
      this.properties.blur = value;
      this.feGaussianBlur.attr({
        "stdDeviation": value / this.scale
      });
    },
    enumerable: true,
    configurable: true
  });
  /**
   * [updateScale description]
   *
   * @todo Description
   */

  DropShadowFilter.prototype.updateScale = function () {
    this.dx = this.dx;
    this.dy = this.dy;
    this.blur = this.blur;
  };

  return DropShadowFilter;
}(_Filter__WEBPACK_IMPORTED_MODULE_0__.Filter);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_Registry__WEBPACK_IMPORTED_MODULE_2__.registry.registeredClasses.DropShadowFilter = DropShadowFilter;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/filters/Filter.js":
/*!*************************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/rendering/filters/Filter.js ***!
  \*************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Filter": () => (/* binding */ Filter)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Base */ "./node_modules/@amcharts/amcharts4/.internal/core/Base.js");
/* harmony import */ var _Paper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Paper */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Paper.js");
/* harmony import */ var _utils_Animation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils/Animation */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Animation.js");
/* harmony import */ var _utils_List__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/List */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/List.js");
/* harmony import */ var _utils_Object__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/Object */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Object.js");
/* harmony import */ var _utils_Iterator__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils/Iterator */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Iterator.js");
/**
 * This module contains a base class for an SVG filter.
 *
 * Filters can be used to decorate, change and transform just about any DOM
 * element.
 *
 * A Filter works by applying one or more effects (primitives) to SVG element.
 *
 * For more information on how SVG filters work, refer to
 * [this MDN tutorial](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/SVG_Filters_Tutorial).
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */







;
/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Base filter class.
 *
 * This class while can be instantiated will not do anything. It is just a base
 * functionality for any other "real" filters to extend.
 *
 * Filters can be used to decorate, change and transform just about any DOM
 * element.
 *
 * A Filter works by applying one or more effects (primitives) to SVG element.
 *
 * For more information on how SVG filters work, refer to
 * [this MDN tutorial](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/SVG_Filters_Tutorial).
 *
 * @todo Example
 */

var Filter =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_6__.__extends)(Filter, _super);
  /**
   * Constructor
   */


  function Filter() {
    var _this = // Init
    _super.call(this) || this;
    /**
     * A storage for Filter property/value pairs.
     *
     * @ignore Exclude from docs
     * @see {@link FilterProperties}
     */


    _this.properties = {};
    /**
     * Identifies if this object is a "template" and should not be treated as
     * real object that is drawn or actually used in the chart.
     */

    _this.isTemplate = false;
    /**
     * [_scale description]
     *
     * @todo Description
     */

    _this._scale = 1;
    /**
     * [_nonScaling description]
     *
     * @todo Description
     */

    _this._nonScaling = true;
    _this.className = "Filter"; // Create a list to hold primitives (effect elements)

    _this.filterPrimitives = new _utils_List__WEBPACK_IMPORTED_MODULE_3__.List();
    _this.properties.filterUnits = "objectBoundingBox"; // Automatically add added primitives to `_disposers` so they are discarded
    // when Filter object is destroyed (disposed)

    _this.filterPrimitives.events.on("inserted", function (ev) {
      _this._disposers.push(ev.newValue);
    }); // Set default dimensions


    _this.width = 120;
    _this.height = 120; // Apply theme

    _this.applyTheme();

    return _this;
  }
  /**
   * Appends actual filter elements to the filter group.
   *
   * @ignore Exclude from docs
   * @param filterElement An SVG `<group>` element to add filter element to
   */


  Filter.prototype.appendPrimitives = function (filterElement) {
    _utils_Iterator__WEBPACK_IMPORTED_MODULE_5__.each(this.filterPrimitives.iterator(), function (filterPrimitive) {
      filterElement.add(filterPrimitive);
    });
  };
  /**
   * Uses Transitions filter's values from current to target. This is used to
   * smoothly appear filter, rather than it pop into effect.
   *
   * @ignore Exclude from docs
   * @param animationOptions  Animation options
   * @param duration          Duration in milliseconds
   * @param easing            Easing function
   * @return Animation instance
   */


  Filter.prototype.animate = function (animationOptions, duration, easing) {
    var animation = new _utils_Animation__WEBPACK_IMPORTED_MODULE_2__.Animation(this, animationOptions, duration, easing).start();
    return animation;
  };

  Object.defineProperty(Filter.prototype, "width", {
    /**
     * @return Width (%)
     */
    get: function get() {
      return this.properties["width"];
    },

    /**
     * Width of the filter element in percent.
     *
     * If the filter is designed to "bleed out" of the original target element,
     * like for example a shadow, you need this bigger than 100, or the
     * non-fitting parts will be clipped.
     *
     * @default 120
     * @param value Width (px)
     */
    set: function set(value) {
      this.properties["width"] = value;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Filter.prototype, "height", {
    /**
     * @return Height
     */
    get: function get() {
      return this.properties["height"];
    },

    /**
     * Height of the filter element in percent.
     *
     * If the filter is designed to "bleed out" of the original target element,
     * like for example a shadow, you need this bigger than 100, or the
     * non-fitting parts will be clipped.
     *
     * @default 120
     * @param value Height (%)
     */
    set: function set(value) {
      this.properties["height"] = value;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Copies properties from another [[Filter]] object.
   *
   * @param filter Source [[Filter]] object
   */

  Filter.prototype.copyFrom = function (filter) {
    var _this = this;

    _super.prototype.copyFrom.call(this, filter);

    _utils_Object__WEBPACK_IMPORTED_MODULE_4__.each(filter.properties, function (key, value) {
      _this[key] = value;
    });
  };

  Object.defineProperty(Filter.prototype, "paper", {
    /**
     * @return Paper
     */
    get: function get() {
      if (this._paper) {
        return this._paper;
      }

      return (0,_Paper__WEBPACK_IMPORTED_MODULE_1__.getGhostPaper)();
    },

    /**
     * Sets [[Paper]] instance to create filter's elements in.
     *
     * @ignore Exclude from docs
     * @param paper  Paper
     */
    set: function set(paper) {
      if (this._paper != paper) {
        this._paper = paper;
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Filter.prototype, "animations", {
    /**
     * All animations currently in play.
     *
     * @ignore Exclude from docs
     * @return List of animations
     */
    get: function get() {
      if (!this._animations) {
        this._animations = [];

        this._disposers.push(new _utils_Animation__WEBPACK_IMPORTED_MODULE_2__.AnimationDisposer(this._animations));
      }

      return this._animations;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Filter.prototype, "scale", {
    /**
     * @ignore Exclude from docs
     */
    get: function get() {
      return this._scale;
    },

    /**
     * [[Sprite]] uses this method to inform filter about it's scale.
     *
     * @ignore Exclude from docs
     */
    set: function set(value) {
      this._scale = value;
      this.updateScale();
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Updates filter properties which depend on scale.
   *
   * @ignore Exclude from docs
   */

  Filter.prototype.updateScale = function () {// Dummy method for extending classes to override.
  };

  Object.defineProperty(Filter.prototype, "filterUnits", {
    /**
     * @return Filter units
     */
    get: function get() {
      return this.properties.filterUnits;
    },

    /**
     * Which units are used when drawing filter.
     *
     * Use `"userSpaceOnUse"` when applying filters on a perfectly straight line.
     *
     * @since 4.9.17
     * @default objectBoundingBox
     * @param value Filter units
     */
    set: function set(value) {
      this.properties.filterUnits = value;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Filter.prototype, "nonScaling", {
    /**
     * @return Non scaling?
     */
    get: function get() {
      return this._nonScaling;
    },

    /**
     * If a filter is non scaling, it will look the same even if the sprite is
     * scaled, otherwise filter will scale together with a [[Sprite]].
     *
     * @default false
     * @param value  Non scaling?
     */
    set: function set(value) {
      this._nonScaling = value;

      if (!value) {
        this._scale = 1;
      }

      this.updateScale();
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Filter.prototype, "sprite", {
    /**
     * A target element this filter is currently attached to.
     *
     * We need to keep track of it because one filter can be used for just one
     * element, so we have to remove it from the old "parent" when attaching to
     * the new one.
     *
     * @ignore Exclude from docs
     * @param value  Target element
     */
    set: function set(value) {
      this.setSprite(value);
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Sets filter's target element.
   *
   * @ignore Exclude from docs
   * @param value  Element filter is being attached to
   */

  Filter.prototype.setSprite = function (value) {
    if (this._sprite && this._sprite != value) {
      this._sprite.filters.removeValue(this);
    }

    this._sprite = value;
  };

  return Filter;
}(_Base__WEBPACK_IMPORTED_MODULE_0__.BaseObject);



/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/filters/FocusFilter.js":
/*!******************************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/rendering/filters/FocusFilter.js ***!
  \******************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "FocusFilter": () => (/* binding */ FocusFilter)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Filter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Filter */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/filters/Filter.js");
/* harmony import */ var _utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/InterfaceColorSet */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/InterfaceColorSet.js");
/**
 * Module for "Focus" filter.
 */



/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Creates a "Focus" filter.
 *
 * @see {@link https://www.amcharts.com/docs/v4/concepts/accessibility/} more about accessibility
 * @see {@link https://www.amcharts.com/docs/v4/tutorials/changing-appearance-of-focused-items/} cusomizing focus appearance
 */

var FocusFilter =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(FocusFilter, _super);
  /**
   * Constructor
   */


  function FocusFilter() {
    var _this = _super.call(this) || this;

    _this.className = "FocusFilter"; // Create elements
    // NOTE: we do not need to add each individual element to `_disposers`
    // because `filterPrimitives` has an event handler which automatically adds
    // anything added to it to `_disposers`

    _this.feFlood = _this.paper.add("feFlood");

    _this.feFlood.attr({
      "flood-color": new _utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_1__.InterfaceColorSet().getFor("primaryButtonHover"),
      "result": "base"
    });

    _this.filterPrimitives.push(_this.feFlood);

    _this.feMorphology = _this.paper.add("feMorphology");

    _this.feMorphology.attr({
      "result": "bigger",
      "in": "SourceGraphic",
      "operator": "dilate",
      "radius": "2"
    });

    _this.filterPrimitives.push(_this.feMorphology);

    _this.feColorMatrix = _this.paper.add("feColorMatrix");

    _this.feColorMatrix.attr({
      "result": "mask",
      "in": "bigger",
      "type": "matrix",
      "values": "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0"
    });

    _this.filterPrimitives.push(_this.feColorMatrix);

    _this.feComposite = _this.paper.add("feComposite");

    _this.feComposite.attr({
      "result": "drop",
      "in": "base",
      "in2": "mask",
      "operator": "in"
    });

    _this.filterPrimitives.push(_this.feComposite);

    _this.feBlend = _this.paper.add("feBlend");

    _this.feBlend.attr({
      "in": "SourceGraphic",
      "in2": "drop",
      "mode": "normal"
    });

    _this.filterPrimitives.push(_this.feBlend); // Set default properties


    _this.width = 130;
    _this.height = 130;

    _this.applyTheme();

    return _this;
  }

  Object.defineProperty(FocusFilter.prototype, "stroke", {
    /**
     * @return Color
     */
    get: function get() {
      return this.properties["stroke"];
    },

    /**
     * Stroke (outline) color.
     *
     * @param value  Color
     */
    set: function set(value) {
      this.properties["stroke"] = value;
      this.feFlood.attr({
        "flood-color": value
      });
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(FocusFilter.prototype, "strokeWidth", {
    /**
     * @return Outline thickness (px)
     */
    get: function get() {
      return this.properties["strokeWidth"];
    },

    /**
     * Stroke (outline) thickness in pixels.
     *
     * @param value  Outline thickness (px)
     */
    set: function set(value) {
      this.properties["strokeWidth"] = value;
      this.feMorphology.attr({
        "radius": value
      });
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(FocusFilter.prototype, "opacity", {
    /**
     * @return Outline opacity (0-1)
     */
    get: function get() {
      return this.properties["opacity"];
    },

    /**
     * Opacity of the outline. (0-1)
     *
     * @param value  Outline opacity (0-1)
     */
    set: function set(value) {
      this.properties["opacity"] = value;
      this.feColorMatrix.attr({
        "values": "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 " + value + " 0"
      });
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Sets filter's target element.
   *
   * In addition it also disables built-in focus outline on element this
   * filter is applied to.
   *
   * @ignore Exclude from docs
   * @param value  Element filter is being attached to
   */

  FocusFilter.prototype.setSprite = function (value) {
    if (this._sprite && this._sprite != value) {
      this._sprite.group.removeStyle("outline");
    }

    value.group.addStyle({
      "outline": "none"
    });

    _super.prototype.setSprite.call(this, value);
  };

  return FocusFilter;
}(_Filter__WEBPACK_IMPORTED_MODULE_0__.Filter);



/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/filters/LightenFilter.js":
/*!********************************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/rendering/filters/LightenFilter.js ***!
  \********************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "LightenFilter": () => (/* binding */ LightenFilter)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Filter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Filter */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/filters/Filter.js");
/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/**
 * Module for "Lighten" filter.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */



/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Creates a "Lighten" filter.
 */

var LightenFilter =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(LightenFilter, _super);
  /**
   * Constructor
   */


  function LightenFilter() {
    var _this = _super.call(this) || this;

    _this.className = "LightenFilter"; // Create elements
    // NOTE: we do not need to add each individual element to `_disposers`
    // because `filterPrimitives` has an event handler which automatically adds
    // anything added to it to `_disposers`

    _this.feColorMatrix = _this.paper.add("feColorMatrix");

    _this.feColorMatrix.attr({
      "type": "matrix"
    });

    _this.filterPrimitives.push(_this.feColorMatrix); // Set default properties


    _this.lightness = 0;

    _this.applyTheme();

    return _this;
  }

  Object.defineProperty(LightenFilter.prototype, "lightness", {
    /**
     * @return Lightness
     */
    get: function get() {
      return this.properties["lightness"];
    },

    /**
     * Lightness of the target colors.
     *
     * If `lightness` is a positive number, the filter will make all colors
     * lighter.
     *
     * If `lightness` is negative, colors will be darkened.
     *
     * @param value  Lightness
     */
    set: function set(value) {
      this.properties["lightness"] = value;
      var v = value + 1;
      this.feColorMatrix.attr({
        "values": v + " 0 0 0 0 0 " + v + " 0 0 0 0 0 " + v + " 0 0 0 0 0 1 0"
      });
    },
    enumerable: true,
    configurable: true
  });
  return LightenFilter;
}(_Filter__WEBPACK_IMPORTED_MODULE_0__.Filter);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses.LightenFilter = LightenFilter;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Adapter.js":
/*!**************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/utils/Adapter.js ***!
  \**************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Adapter": () => (/* binding */ Adapter),
/* harmony export */   "GlobalAdapter": () => (/* binding */ GlobalAdapter),
/* harmony export */   "globalAdapter": () => (/* binding */ globalAdapter)
/* harmony export */ });
/* harmony import */ var _SortedList__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./SortedList */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/SortedList.js");
/* harmony import */ var _Number__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Number */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Number.js");
/* harmony import */ var _Order__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Order */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Order.js");
/* harmony import */ var _utils_Iterator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/Iterator */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Iterator.js");
/* harmony import */ var _utils_Array__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/Array */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Array.js");
/* harmony import */ var _utils_Type__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/* harmony import */ var _utils_Object__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/Object */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Object.js");
/**
 * An Adapter can be used to apply chained synchronous transformations to any
 * value at runtime.
 *
 * Each type class using Adapters must have `adapters` property and adapter
 * interface defined.
 *
 * Adapters can be used to allow external code to apply transformations to any
 * value at any time.
 *
 * For example we have a Weather class which has a method `now()` which returns
 * current temperature.
 *
 * ```
 * function now() {
 *   // ... calculate temperature
 *   let temp = "Temperature now is " + degrees + "F";
 *   return temp;
 * }
 * ```
 *
 * Now, supposed we want to let other classes to modify the output of the
 * `now()`? We just apply an adapter to the `temp` before it is returned:
 *
 * ```
 * temp = this.adapters.apply("now", {
 *   temp: temp,
 *   degrees: degrees
 * }).temp;
 * ```
 *
 * Some other class might tap onto it by defining an Adapter that calculates
 * the temperature in Celsius:
 *
 * weather.adapters.add("now", (arg) => {
 *   arg.temp += "(" + farenheitToCelsius(arg.degrees) + "C)";
 *   return arh;
 * });
 *
 * Furthermore some time-related class could add time:
 *
 * weather.adapters.add("now", (arg) => {
 *   arg.temp += "; the time now is " + (new Date().toLocaleString());
 *   return arh;
 * });
 *
 * So without adapters we would get output like this:
 *
 * ```
 * Temperature now is 90F
 * ```
 *
 * With adapters applied we now have:
 *
 * ```
 * Temperature now is 90F (32C); the time now is 12/11/2012, 7:00:00 PM
 * ```
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */







/**
 * ============================================================================
 * GLOBAL ADAPTER
 * ============================================================================
 * @hidden
 */

/**
 * A global adapter is an adpater that is attached to a class type rather than
 * specific object instance.
 *
 * @ignore Exclude from docs
 */

var GlobalAdapter =
/** @class */
function () {
  function GlobalAdapter() {
    /**
     * Callback id iterator.
     */
    this._callbackId = 0;
    /**
     * A list of if callbacks (adapters).
     */

    this._callbacks = new _SortedList__WEBPACK_IMPORTED_MODULE_0__.SortedList(function (left, right) {
      return _Order__WEBPACK_IMPORTED_MODULE_2__.or(_Number__WEBPACK_IMPORTED_MODULE_1__.order(left.priority, right.priority), _Number__WEBPACK_IMPORTED_MODULE_1__.order(left.id, right.id));
    });
  }
  /**
   * Adds a global callback which is not specific to any particular object.
   * Whenever an adapter in any object of the specific class type is invoked
   * global adapters will kick in.
   *
   * @param type      Class type
   * @param key       Adapter key
   * @param callback  Callback function
   * @param priority  Priority (higher priority meaning adapter will be applied later)
   * @param scope     Callback function scaope
   */


  GlobalAdapter.prototype.addAll = function (type, key, callback, priority, scope) {
    if (priority === void 0) {
      priority = 0;
    }

    this._callbacks.insert({
      id: ++this._callbackId,
      key: key,
      callback: callback,
      priority: priority,
      scope: scope,
      type: type
    });
  };
  /**
   * Returns if there are adapters for specific type available.
   *
   * @param type  Adapter type
   * @param key   Adapter key
   * @return {boolean}
   */


  GlobalAdapter.prototype.isEnabled = function (type, key) {
    return _utils_Array__WEBPACK_IMPORTED_MODULE_4__.any(this._callbacks.values, function (x) {
      return x.key === key && type instanceof x.type;
    });
  };
  /**
   * Applies global adapters for the object of the specific type.
   *
   * @param type   Class type
   * @param key    Adapter key
   * @param value  Value
   */


  GlobalAdapter.prototype.applyAll = function (type, key, value) {
    // This is needed to improve the performance and reduce garbage collection
    var callbacks = this._callbacks.values;
    var length = callbacks.length;

    if (length == 0) {
      return value;
    } // Cycle through all callbacks and find the ones we need to use


    for (var i = 0; i < length; ++i) {
      var item = callbacks[i];

      if (item.key === key && type instanceof item.type) {
        value = item.callback.call(item.scope, value, type, key);
      }
    }

    return value;
  };

  return GlobalAdapter;
}();


/**
 * A global Adapter for plugins that want to add specific
 * functionality for any chart, not just specific instance.
 *
 * If you want to add an adapter which applies to all instances of the same
 * object type, like, for instance all slices in PieSeries, you can use
 * global adapter.
 *
 * Global adapter is a system-wide instance, accessible via `globalAdapter`.
 *
 * ```TypeScript
 * am4core.globalAdapter.addAll<am4charts.IPieSeriesAdapters, am4charts.PieSeries, "fill">(am4charts.PieSeries, "fill", (value, target, key) => {
 *   return am4core.color("#005500");
 * });
 * ```
 * ```JavaScript
 * am4core.globalAdapter.addAll(am4charts.PieSeries, "fill", (value, target, key) => {
 *   return am4core.color("#005500");
 * });
 * ```
 *
 * @ignore
 */

var globalAdapter = new GlobalAdapter();
/**
 * ============================================================================
 * REGULAR ADAPTER
 * ============================================================================
 * @hidden
 */

/**
 * Adapter allows adding ordered callback functions and associating them with a
 * string-based key. An Adapter user can then easily invoke those callbacks to
 * apply custom functions on its input, output or intermediate values.
 *
 * Custom code and plugins can add their own callbacks to modify and enhance
 * core functionality.
 *
 * See the description of `add()` for an example.
 *
 * Almost any object in amCharts4 has own adapter, accessible with `adapter`
 * property.
 *
 * Any adapters added to it will be applied to that object only.
 *
 * ### Global Adapters
 *
 * If you want to add an adapter which applies to all instances of the same
 * object type, like, for instance all slices in PieSeries, you can use
 * global adapter.
 *
 * Global adapter is a system-wide instance, accessible via `globalAdapter`.
 *
 * ```TypeScript
 * am4core.globalAdapter.addAll<am4charts.IPieSeriesAdapters, am4charts.PieSeries, "fill">(am4charts.PieSeries. "fill", (value, target, key) => {
 *   return am4core.color("#005500");
 * });
 * ```
 * ```JavaScript
 * am4core.globalAdapter.addAll(am4charts.PieSeries. "fill", (value, target, key) => {
 *   return am4core.color("#005500");
 * });
 * ```
 *
 * {@link https://www.amcharts.com/docs/v4/reference/adapter_module/#globalAdapter_property More info}.
 *
 * @important
 */

var Adapter =
/** @class */
function () {
  /**
   * Constructor, sets the object referece this Adapter should be used for.
   *
   * @param c Object
   */
  function Adapter(c) {
    /**
     * Internal counter for callback ids.
     */
    this._callbackId = 0;
    /**
     * A list of adapter callbacks.
     *
     * @param $number.order(left.priority, right.priority) [description]
     * @param $number.order(left.id,       right.id));	}  [description]
     */

    this._callbacks = new _SortedList__WEBPACK_IMPORTED_MODULE_0__.SortedList(function (left, right) {
      return _Order__WEBPACK_IMPORTED_MODULE_2__.or(_Number__WEBPACK_IMPORTED_MODULE_1__.order(left.priority, right.priority), _Number__WEBPACK_IMPORTED_MODULE_1__.order(left.id, right.id));
    });
    this._disabled = {};
    this.object = c; // TODO this exposes the internal events

    this.events = this._callbacks.events;
  }
  /**
   * Adds a callback for a specific key.
   *
   * ```TypeScript
   * // Override fill color value and make all slices green
   * chart.series.template.adapter.add("fill", (value, target, key) => {
   *   return am4core.color("#005500");
   * });
   * ```
   * ```JavaScript
   * // Override fill color value and make all slices green
   * chart.series.template.adapter.add("fill", function(value, target, key) {
   *   return am4core.color("#005500");
   * });
   * ```
   * ```JSON
   * {
   *   // ...
   *   "series": [{
   *     // ...
   *     "adapter": {
   *     	// Override fill color value and make all slices green
   *     	"fill": function(value, target, key) {
   *     	  return am4core.color("#005500");
   *     	}
   *     }
   *   }]
   * }
   * ```
   *
   * The above will call user-defined function (adapter) whenever `fill` value
   * is requested from the Pie series, allowing it to override the default
   * using custom code and any fuzzy logic.
   *
   * There can be any number of adapters set on one property key.
   *
   * In this case adapters will be applied in daisy-chain fashion. The first
   * adapter in queue will make its transformation. The next one will have
   * the output of the first adapter as a starting value, etc.
   *
   * The order of the adapters are determined either by the order they were
   * added in, or their `priority` value.
   *
   * The heigher the `priority`, the later in the game adapter will be applied.
   *
   * @param key       Key
   * @param callback  A callback function
   * @param priority  The higher priority, the more chance the adapter will be applied last
   * @param scope     Scope for the callback function
   */


  Adapter.prototype.add = function (key, callback, priority, scope) {
    if (priority === void 0) {
      priority = 0;
    }

    this._callbacks.insert({
      id: ++this._callbackId,
      key: key,
      callback: callback,
      priority: priority,
      scope: scope
    });
  };
  /**
   * Checks whether specific adapter is already set.
   *
   * @param key       Key
   * @param callback  A callback function
   * @param priority  The higher priority, the more chance the adapter will be applied last
   * @param scope     Scope for the callback function
   * @returns                            Adapter set?
   */


  Adapter.prototype.has = function (key, callback, priority, scope) {
    if (priority === void 0) {
      priority = 0;
    }

    return _utils_Iterator__WEBPACK_IMPORTED_MODULE_3__.contains(this._callbacks.iterator(), function (item) {
      return item.key === key && item.callback === callback && item.priority === priority && item.scope === scope;
    });
  };
  /**
   * Removes adapter callbacks for the specific `key`.
   *
   * If `priority` is specified, only callbacks for that priority are removed.
   *
   * @param key      Key
   * @param priority Priority
   * @todo Implement
   */


  Adapter.prototype.remove = function (key, priority) {
    var _this = this; // It has to make a copy because it removes the elements while iterating
    // TODO inefficient
    // TODO should this re-enable the key ?


    _utils_Array__WEBPACK_IMPORTED_MODULE_4__.each(_utils_Iterator__WEBPACK_IMPORTED_MODULE_3__.toArray(this._callbacks.iterator()), function (item) {
      // TODO test this
      if (item.key === key && (!_utils_Type__WEBPACK_IMPORTED_MODULE_5__.isNumber(priority) || priority === item.priority)) {
        _this._callbacks.remove(item);
      }
    });
  };
  /**
   * Enable applying adapters for a certain key, if it was disabled before by
   * `disableKey()`.
   *
   * @param key Key
   */


  Adapter.prototype.enableKey = function (key) {
    delete this._disabled[key];
  };
  /**
   * Disable applying adapters for a certain key.
   *
   * Optionally, can set how many applies to skip before automatically
   * re-enabling the applying.
   *
   * @param key     Key
   * @param amount  Number of applies to skip
   */


  Adapter.prototype.disableKey = function (key, amount) {
    if (amount === void 0) {
      amount = Infinity;
    }

    this._disabled[key] = amount;
  };

  Adapter.prototype._hasListenersByType = function (key) {
    return _utils_Array__WEBPACK_IMPORTED_MODULE_4__.any(this._callbacks.values, function (x) {
      return x.key === key;
    });
  };
  /**
   * Returns if there are any enabled adapters set for the specific `key`.
   *
   * @returns Are there any adapters for the key?
   */


  Adapter.prototype.isEnabled = function (key) {
    return this._disabled[key] == null && (this._hasListenersByType(key) || globalAdapter.isEnabled(this.object, key));
  };

  Adapter.prototype._shouldDispatch = function (key) {
    var count = this._disabled[key];

    if (!_utils_Type__WEBPACK_IMPORTED_MODULE_5__.isNumber(count)) {
      return true;
    } else {
      if (count <= 1) {
        delete this._disabled[key];
      } else {
        --this._disabled[key];
      }

      return false;
    }
  };
  /**
   * Passes the input value through all the callbacks for the defined `key`.
   *
   * @param key      Key
   * @param value    Input value
   * @param ...rest  Rest of the parameters to be passed into callback
   * @return Output value
   */


  Adapter.prototype.apply = function (key, value) {
    if (this._shouldDispatch(key)) {
      // This is needed to improve the performance and reduce garbage collection
      var callbacks = this._callbacks.values;
      var length_1 = callbacks.length;

      if (length_1 > 0) {
        for (var i = 0; i < length_1; ++i) {
          var item = callbacks[i];

          if (item.key === key) {
            value = item.callback.call(item.scope, value, this.object, key);
          }
        }
      } // Apply global adapters


      value = globalAdapter.applyAll(this.object, key, value);
      return value;
    } else {
      return value;
    }
  };
  /**
   * Returns all adapter keys which are in this adapter.
   *
   * @return Adapter keys
   */


  Adapter.prototype.keys = function () {
    // TODO inefficient
    return _utils_Iterator__WEBPACK_IMPORTED_MODULE_3__.toArray(_utils_Iterator__WEBPACK_IMPORTED_MODULE_3__.map(this._callbacks.iterator(), function (x) {
      return x.key;
    }));
  };
  /**
   * Copies all the adapter callbacks from `source`.
   *
   * @param source  An Adapter to copy items from
   */


  Adapter.prototype.copyFrom = function (source) {
    var _this = this;

    _utils_Iterator__WEBPACK_IMPORTED_MODULE_3__.each(source._callbacks.iterator(), function (x) {
      _this.add(x.key, x.callback, x.priority, x.scope);
    });
    _utils_Object__WEBPACK_IMPORTED_MODULE_6__.each(source._disabled, function (key, val) {
      _this._disabled[key] = val;
    });
  };
  /**
   * Clears all callbacks from this Adapter.
   */


  Adapter.prototype.clear = function () {
    // TODO should this also re-enable all the keys ?
    this._callbacks.clear();
  };

  return Adapter;
}();



/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Animation.js":
/*!****************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/utils/Animation.js ***!
  \****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Animation": () => (/* binding */ Animation),
/* harmony export */   "AnimationDisposer": () => (/* binding */ AnimationDisposer),
/* harmony export */   "animate": () => (/* binding */ animate)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Base */ "./node_modules/@amcharts/amcharts4/.internal/core/Base.js");
/* harmony import */ var _defs_SVGDefaults__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../defs/SVGDefaults */ "./node_modules/@amcharts/amcharts4/.internal/core/defs/SVGDefaults.js");
/* harmony import */ var _utils_Disposer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/Disposer */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Disposer.js");
/* harmony import */ var _utils_Color__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/Color */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Color.js");
/* harmony import */ var _utils_Percent__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/Percent */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Percent.js");
/* harmony import */ var _utils_AsyncPending__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/AsyncPending */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/AsyncPending.js");
/* harmony import */ var _utils_Ease__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/Ease */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Ease.js");
/* harmony import */ var _utils_Colors__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/Colors */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Colors.js");
/* harmony import */ var _utils_Math__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
/* harmony import */ var _utils_Array__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/Array */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Array.js");
/* harmony import */ var _utils_Type__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/* harmony import */ var _System__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../System */ "./node_modules/@amcharts/amcharts4/.internal/core/System.js");
/* harmony import */ var _Options__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../Options */ "./node_modules/@amcharts/amcharts4/.internal/core/Options.js");
/**
 * Animation module.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */














/**
 * Calls a `callback` function for the `duration` of milliseconds.
 *
 * @todo Needed?
 * @deprecated Not used anywhere
 * @ignore Exclude from docs
 * @param duration  Duration (ms)
 * @param callback  Callback function
 * @return Disposer
 */

function animate(duration, callback) {
  var disposed = false; // TODO use performance.now() ?

  var startTime = Date.now();

  function loop(now) {
    if (!disposed) {
      var diff = now - startTime;

      if (diff >= duration) {
        callback(1);
      } else {
        _utils_AsyncPending__WEBPACK_IMPORTED_MODULE_5__.nextFrame(loop);
        callback(diff / duration);
      }
    }
  }

  _utils_AsyncPending__WEBPACK_IMPORTED_MODULE_5__.nextFrame(loop);
  return new _utils_Disposer__WEBPACK_IMPORTED_MODULE_2__.Disposer(function () {
    disposed = true;
  });
}
/**
 * Returns numeric value accoring to progress between start and end values.
 *
 * @param progress  Progress (0-1)
 * @param from
 * @param to
 * @return Value according to progress
 */

function getProgressNumber(progress, from, to) {
  return from + (to - from) * progress;
}
/**
 * Returns [[Percent]] value accoring to progress between start and end
 * values.
 *
 * @param progress  Progress (0-1)
 * @param from
 * @param to
 * @return Value according to progress
 */


function getProgressPercent(progress, from, to) {
  return new _utils_Percent__WEBPACK_IMPORTED_MODULE_4__.Percent(getProgressNumber(progress, from.percent, to.percent));
}
/**
 * Returns color value accoring to progress between start and end values.
 *
 * @param progress  Progress (0-1)
 * @param from
 * @param to
 * @return Color according to progress
 */


function getProgressColor(progress, from, to) {
  var color = new _utils_Color__WEBPACK_IMPORTED_MODULE_3__.Color(_utils_Colors__WEBPACK_IMPORTED_MODULE_7__.interpolate(from.rgb, to.rgb, progress));

  if (from.alpha != to.alpha) {
    color.alpha = from.alpha + (to.alpha - from.alpha) * progress;
  }

  return color;
}
/**
 * [getHybridProperty description]
 *
 * @todo Description
 * @param property [description]
 * @param type [description]
 * @return [description]
 */


function getHybridProperty(property, type) {
  return type + property.charAt(0).toUpperCase() + property.substr(1);
}

var AnimationDisposer =
/** @class */
function () {
  function AnimationDisposer(array) {
    this._disposer = new _utils_Disposer__WEBPACK_IMPORTED_MODULE_2__.Disposer(function () {
      while (array.length !== 0) {
        array[0].dispose();
      }
    });
  }

  AnimationDisposer.prototype.isDisposed = function () {
    return this._disposer.isDisposed();
  };

  AnimationDisposer.prototype.dispose = function () {
    this._disposer.dispose();
  };

  return AnimationDisposer;
}();


/**
 * Animation can be used to transition certain properties on an object that
 * implements [[IAnimatable]] interface.
 *
 * @see {@link IAnimationEvents} for a list of available events
 */

var Animation =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_13__.__extends)(Animation, _super);
  /**
   * Constructor
   *
   * @param object            An object animation should run on
   * @param animationOptions  One or several (array) of animation options
   * @param duration          Duration (ms)
   * @param easing            Easing function
   */


  function Animation(object, animationOptions, duration, easing) {
    var _this = // Init
    _super.call(this) || this;
    /**
     * Duration of the animation in milliseconds.
     */


    _this.duration = 0;
    /**
     * Easing function to use.
     *
     * @see {@link Ease}
     */

    _this.easing = _utils_Ease__WEBPACK_IMPORTED_MODULE_6__.linear;
    /**
     * Contains progress of the current animation: 0 (start) to 1 (end).
     */

    _this.progress = 0;
    /**
     * Indicated how many times animation should loop.
     */

    _this._loop = 0;
    /**
     * Animation is paused.
     */

    _this._pause = false;
    /**
     * Holds reference to timeout for delayed play.
     */

    _this._delayTimeout = null;
    /**
     * Elapsed time in currently playing animation.
     */

    _this._time = 0;
    _this._isFinished = false;
    _this.className = "Animation"; // Override duration if animations disabled system-wide

    if (_Options__WEBPACK_IMPORTED_MODULE_12__.options.animationsEnabled === false) {
      duration = 0;
    } // Set parameters


    _this.object = object;
    _this.animationOptions = _utils_Array__WEBPACK_IMPORTED_MODULE_9__.toArray(animationOptions);
    _this.duration = duration;

    if (easing) {
      _this.easing = easing;
    } // Run check if there are already animations playing on the same properties
    // and stop them - the last animation takes precedence
    //this.stopSameAnimations();

    /*if ($type.hasValue(callback)) {
        // TODO don't use .call
        this.events.on("animationended", callback, object);
    }*/
    // Apply theme


    _this.applyTheme();

    return _this;
  } // TODO verify that this is correct


  Animation.prototype.debug = function () {};
  /**
   * Disposes this object, clears up after itself.
   */


  Animation.prototype.dispose = function () {
    _super.prototype.dispose.call(this);

    this.pause();
  };
  /**
   * Delays animation start by X milliseconds.
   *
   * @param delay  Delay (ms)
   * @return Animation
   */


  Animation.prototype.delay = function (delay) {
    var _this = this; //@todo Maybe not use `bind()`


    if (delay > 0) {
      this.pause(); // This is so that it will get disposed if `this.object` is disposed
      // TODO hacky, figure out a better way

      _utils_Array__WEBPACK_IMPORTED_MODULE_9__.move(this.object.animations, this);
      var id_1 = setTimeout(function () {
        _this._delayTimeout = null;

        _this.start();
      }, delay);
      this._delayTimeout = new _utils_Disposer__WEBPACK_IMPORTED_MODULE_2__.Disposer(function () {
        clearTimeout(id_1);
      });
    }

    return this;
  };

  Animation.prototype._start = function () {
    this._isFinished = false; // Clear delay timeout if there was one

    if (this._delayTimeout) {
      this.removeDispose(this._delayTimeout);
      this._delayTimeout = null;
    } // Run check if there are already animations playing on the same properties
    // and stop them - the last animation takes precedence


    this.stopSameAnimations(); // Reset counters

    this._pause = false; // Register animation

    _utils_Array__WEBPACK_IMPORTED_MODULE_9__.move(_System__WEBPACK_IMPORTED_MODULE_11__.system.animations, this); // Register this animation in object's `animations` list

    _utils_Array__WEBPACK_IMPORTED_MODULE_9__.move(this.object.animations, this);
    _System__WEBPACK_IMPORTED_MODULE_11__.system.requestFrame();
  };
  /**
   * Starts animation.
   *
   * @return Animation
   */


  Animation.prototype.start = function () {
    this._start();

    this._startTime = Date.now();
    this._time = 0;
    this.staticOptions = []; // Process initial property values

    for (var i = this.animationOptions.length - 1; i >= 0; i--) {
      var options_1 = this.animationOptions[i];

      if (!_utils_Type__WEBPACK_IMPORTED_MODULE_10__.hasValue(options_1.from)) {
        if (options_1.childObject) {
          options_1.from = options_1.childObject[options_1.property];
        } else {
          options_1.from = this.object[options_1.property];

          if (!_utils_Type__WEBPACK_IMPORTED_MODULE_10__.hasValue(options_1.from)) {
            options_1.from = _defs_SVGDefaults__WEBPACK_IMPORTED_MODULE_1__.SVGDefaults[options_1.property];
          }
        }
        /*if (!$type.hasValue(options.from)) {
            throw Error("Could not get initial transition value.");
        }*/

      }

      if (options_1.from == options_1.to) {
        // || options.to == (<any>this.object)[options.property]){ this is not good, as dataItem.value is set to final at once, and we animate workingValue
        _utils_Array__WEBPACK_IMPORTED_MODULE_9__.remove(this.animationOptions, options_1);
      } else if (!_utils_Type__WEBPACK_IMPORTED_MODULE_10__.hasValue(options_1.from) || !(options_1.from instanceof _utils_Percent__WEBPACK_IMPORTED_MODULE_4__.Percent) && options_1.to instanceof _utils_Percent__WEBPACK_IMPORTED_MODULE_4__.Percent || options_1.from instanceof _utils_Percent__WEBPACK_IMPORTED_MODULE_4__.Percent && !(options_1.to instanceof _utils_Percent__WEBPACK_IMPORTED_MODULE_4__.Percent)) {
        // Initial value is undefined, treat it as static
        this.staticOptions.push(options_1);
        _utils_Array__WEBPACK_IMPORTED_MODULE_9__.remove(this.animationOptions, options_1);
      } else {
        // Use different update methods for different value types
        if (_utils_Type__WEBPACK_IMPORTED_MODULE_10__.isNumber(options_1.to)) {
          // Numeric value
          options_1.updateMethod = getProgressNumber; // Check if initial value is not Percent

          if (options_1.from instanceof _utils_Percent__WEBPACK_IMPORTED_MODULE_4__.Percent) {
            // It is. Let's convert it to pixel value
            // @todo Check if we can do this in a less hacky way
            var convertedFrom = this.object[getHybridProperty(options_1.property, "pixel")];

            if (!isNaN(convertedFrom)) {
              options_1.from = convertedFrom;
            } else {
              this.staticOptions.push(options_1);
              _utils_Array__WEBPACK_IMPORTED_MODULE_9__.remove(this.animationOptions, options_1);
            }
          } else if (isNaN(options_1.from)) {
            // Static value
            this.staticOptions.push(options_1);
            _utils_Array__WEBPACK_IMPORTED_MODULE_9__.remove(this.animationOptions, options_1);
          }
        } else {
          // Check if maybe we have a color or percent value
          if (options_1.to instanceof _utils_Color__WEBPACK_IMPORTED_MODULE_3__.Color) {
            // Yup - set resolved named color
            //options.from = $colors.stringToColor(<string>options.from);
            if (options_1.from) {
              options_1.updateMethod = getProgressColor;
            } else {
              // Static value
              this.staticOptions.push(options_1);
              _utils_Array__WEBPACK_IMPORTED_MODULE_9__.remove(this.animationOptions, options_1);
            }
          } else if (options_1.to instanceof _utils_Percent__WEBPACK_IMPORTED_MODULE_4__.Percent) {
            // Percent
            options_1.updateMethod = getProgressPercent; // Check if the initial value is maybe in pixels

            if (!isNaN(options_1.from)) {
              // It is. Let's convert it
              // @todo Check if we can do this in a less hacky way
              var convertedFrom = this.object[getHybridProperty(options_1.property, "relative")];

              if (!isNaN(convertedFrom)) {
                options_1.from = (0,_utils_Percent__WEBPACK_IMPORTED_MODULE_4__.percent)(convertedFrom * 100);
              }
            }
          } else {
            // Static value
            this.staticOptions.push(options_1);
            _utils_Array__WEBPACK_IMPORTED_MODULE_9__.remove(this.animationOptions, options_1);
          }
        }
      }
    } // Apply static options (just in case they were reset by previous
    // animation loop)


    this.applyStaticOptions();

    if (this.events.isEnabled("animationstarted")) {
      var event_1 = {
        type: "animationstarted",
        target: this,
        progress: this.progress
      };
      this.events.dispatchImmediately("animationstarted", event_1);
    }

    this.update(); // If duration is 0, just end animation

    if (this.duration === 0) {
      this.end();
    }

    return this;
  };
  /**
   * Sets loop count for the animation. If parameter is not a valid number the
   * animation will keep on looping indefinitely.
   *
   * @param count  Number of times to loop animation
   * @return Animation
   */


  Animation.prototype.loop = function (count) {
    if (!_utils_Type__WEBPACK_IMPORTED_MODULE_10__.isNumber(count)) {
      count = Infinity;
    }

    this._loop = count;
    return this;
  };
  /**
   * Pauses animation.
   *
   * @return Animation
   */


  Animation.prototype.pause = function () {
    this._pause = true;

    if (this._delayTimeout) {
      this.removeDispose(this._delayTimeout);
      this._delayTimeout = null;
    }

    _utils_Array__WEBPACK_IMPORTED_MODULE_9__.remove(_System__WEBPACK_IMPORTED_MODULE_11__.system.animations, this);
    _utils_Array__WEBPACK_IMPORTED_MODULE_9__.remove(this.object.animations, this);
    return this;
  };
  /**
   * Resumes paused animation.
   *
   * @return Animation
   */


  Animation.prototype.resume = function () {
    this._start();

    this._startTime = Date.now() - this._time;
    return this;
  };
  /**
   * Jumps to animation end. If animation is set to loop, this will start
   * another round of animation from start.
   *
   * @return Animation
   */


  Animation.prototype.end = function () {
    // Pause and complete the progress
    if (this._loop == 0) {
      this.pause();
    }

    this.setProgress(1); // Apply static options

    this.applyStaticOptions();

    if (this.events.isEnabled("animationended")) {
      var event_2 = {
        type: "animationended",
        target: this,
        progress: this.progress
      };
      this.events.dispatchImmediately("animationended", event_2);
    } // Check if we should loop


    if (this._loop > 0) {
      this._loop--;
      this.start();
    } else {
      this.stop();
      this._isFinished = true;
    }

    return this;
  };
  /**
   * Stops animation immediately leaving properties in their current values.
   */


  Animation.prototype.kill = function () {
    this.pause();
    this._isFinished = true;
  };
  /**
   * Returns indicator if this animation is finished or not
   *
   * @return Is finished?
   */


  Animation.prototype.isFinished = function () {
    return this._isFinished;
  };
  /**
   * Applies static options that can't be animated.
   */


  Animation.prototype.applyStaticOptions = function () {
    var _this = this;

    _utils_Array__WEBPACK_IMPORTED_MODULE_9__.each(this.staticOptions, function (options) {
      if (options.childObject) {
        options.childObject[options.property] = _this.progress == 1 ? options.to : options.from;
      } else {
        _this.object[options.property] = _this.progress == 1 ? options.to : options.from;
      }
    });
  };
  /**
   * Stops animation.
   *
   * When animation is stopped, the properties of the target object will remain
   * where they were at the moment when `stop()` was called.
   *
   * @param skipEvent  Do not trigger `animationstopped` event
   * @return Animation
   */


  Animation.prototype.stop = function (skipEvent) {
    this.pause();

    if (!skipEvent) {
      if (this.events.isEnabled("animationstopped")) {
        var event_3 = {
          type: "animationstopped",
          target: this,
          progress: this.progress
        };
        this.events.dispatchImmediately("animationstopped", event_3);
      }
    }

    return this;
  };
  /**
   * Sets current progress and updates object's numeric and color values.
   *
   * @param progress Progress (0-1)
   */


  Animation.prototype.setProgress = function (progress) {
    var _this = this;

    this._time = this.duration * progress; // just in case we call this from outside

    _utils_Array__WEBPACK_IMPORTED_MODULE_9__.each(this.animationOptions, function (options) {
      if (options.updateMethod && _utils_Type__WEBPACK_IMPORTED_MODULE_10__.hasValue(options.from)) {
        var value = options.updateMethod(progress, options.from, options.to);

        if (options.childObject) {
          options.childObject[options.property] = value;
        } else {
          _this.object[options.property] = value;
        }
      }
    });
    this.progress = progress;

    if (this.events.isEnabled("animationprogress")) {
      var event_4 = {
        type: "animationprogress",
        target: this,
        progress: this.progress
      };
      this.events.dispatchImmediately("animationprogress", event_4);
    }

    _System__WEBPACK_IMPORTED_MODULE_11__.system.requestFrame();
  };
  /**
   * Tracks and sets progress according to time or frames.
   *
   * @ignore Exclude from docs
   * @return Animation
   */


  Animation.prototype.update = function () {
    if (!this._pause) {
      var progress = void 0;
      this._time = _utils_Math__WEBPACK_IMPORTED_MODULE_8__.fitToRange(Date.now() - this._startTime, 0, this.duration);
      var timeProgress = this._time / this.duration;
      progress = this.easing(timeProgress);

      if (this.duration == 0 || !_utils_Type__WEBPACK_IMPORTED_MODULE_10__.isNumber(progress) || timeProgress >= 1) {
        progress = 1;
      }

      this.setProgress(progress);

      if (_utils_Math__WEBPACK_IMPORTED_MODULE_8__.round(this._time / this.duration, 6) == 1) {
        this.end();
      }
    }

    return this;
  };

  Object.defineProperty(Animation.prototype, "delayed", {
    /**
     * Returns `true` if this animation is delayed.
     *
     * @readonly
     * @return [description]
     */
    get: function get() {
      return this._delayTimeout ? true : false;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Checks other animations currently running on the same object and removes
   * overlapping options from those other animations that are contained in
   * this animation.
   *
   * This is needed to ensure that no two confurent animations step on each
   * other's toes by trying to animate the same property.
   */

  Animation.prototype.stopSameAnimations = function () {
    var _this = this; // stop animation of the same property
    // TODO make this more efficient
    // TODO don't copy the array


    _utils_Array__WEBPACK_IMPORTED_MODULE_9__.each(_utils_Array__WEBPACK_IMPORTED_MODULE_9__.copy(this.object.animations), function (animation) {
      if (animation !== _this && !animation.delayed) {
        var killed_1 = [];
        _utils_Array__WEBPACK_IMPORTED_MODULE_9__.each(_this.animationOptions, function (newOptions) {
          _utils_Array__WEBPACK_IMPORTED_MODULE_9__.each(animation.animationOptions, function (oldOptions) {
            if (newOptions.property == oldOptions.property && newOptions.childObject == oldOptions.childObject) {
              killed_1.push(oldOptions);

              if (animation.animationOptions.length == 0) {
                animation.kill();
              }
            }
          });
        });
        _utils_Array__WEBPACK_IMPORTED_MODULE_9__.each(killed_1, function (oldOptions) {
          _utils_Array__WEBPACK_IMPORTED_MODULE_9__.remove(animation.animationOptions, oldOptions);
        });
      }
    });
  };
  /**
   * Adds easing functions to "function" fields.
   *
   * @param field  Field name
   * @return Assign as function?
   */


  Animation.prototype.asFunction = function (field) {
    return field == "easing" || _super.prototype.asIs.call(this, field);
  };

  return Animation;
}(_Base__WEBPACK_IMPORTED_MODULE_0__.BaseObjectEvents);



/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Array.js":
/*!************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/utils/Array.js ***!
  \************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "add": () => (/* binding */ add),
/* harmony export */   "any": () => (/* binding */ any),
/* harmony export */   "copy": () => (/* binding */ copy),
/* harmony export */   "each": () => (/* binding */ each),
/* harmony export */   "eachContinue": () => (/* binding */ eachContinue),
/* harmony export */   "eachReverse": () => (/* binding */ eachReverse),
/* harmony export */   "find": () => (/* binding */ find),
/* harmony export */   "findIndex": () => (/* binding */ findIndex),
/* harmony export */   "first": () => (/* binding */ first),
/* harmony export */   "getSortedIndex": () => (/* binding */ getSortedIndex),
/* harmony export */   "has": () => (/* binding */ has),
/* harmony export */   "indexOf": () => (/* binding */ indexOf),
/* harmony export */   "insert": () => (/* binding */ insert),
/* harmony export */   "insertIndex": () => (/* binding */ insertIndex),
/* harmony export */   "keepIf": () => (/* binding */ keepIf),
/* harmony export */   "last": () => (/* binding */ last),
/* harmony export */   "map": () => (/* binding */ map),
/* harmony export */   "move": () => (/* binding */ move),
/* harmony export */   "pushAll": () => (/* binding */ pushAll),
/* harmony export */   "remove": () => (/* binding */ remove),
/* harmony export */   "removeIndex": () => (/* binding */ removeIndex),
/* harmony export */   "replace": () => (/* binding */ replace),
/* harmony export */   "setIndex": () => (/* binding */ setIndex),
/* harmony export */   "shiftLeft": () => (/* binding */ shiftLeft),
/* harmony export */   "shuffle": () => (/* binding */ shuffle),
/* harmony export */   "slice": () => (/* binding */ slice),
/* harmony export */   "toArray": () => (/* binding */ toArray)
/* harmony export */ });
/* harmony import */ var _Math__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
/* harmony import */ var _Type__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");


/**
 * ============================================================================
 * UTILITY FUNCTIONS
 * ============================================================================
 * @hidden
 */

/**
 * Searches `array` for `value`.
 *
 * Returns -1 if not found.
 *
 * @param array  Source array
 * @param value  Value to search
 * @returns Index
 */

function indexOf(array, value) {
  var length = array.length;

  for (var i = 0; i < length; ++i) {
    // TODO handle NaN
    if (array[i] === value) {
      return i;
    }
  }

  return -1;
}
/**
 * Calls `test` for each element in `array`.
 *
 * If `test` returns `true` then it immediately returns `true`.
 *
 * If `test` returns `false` for all of the elements in `array` then it returns `false`.
 *
 * @param array  Source array
 * @param test   Function which is called on each element
 * @returns Whether `test` returned true or not
 */

function any(array, test) {
  var length = array.length;

  for (var i = 0; i < length; ++i) {
    if (test(array[i])) {
      return true;
    }
  }

  return false;
}
/**
 * Calls `fn` function for every member of array and returns a new array out
 * of all outputs.
 *
 * @param array  Source array
 * @param fn     Callback function
 * @returns New array
 */

function map(array, fn) {
  var length = array.length;
  var output = new Array(length);

  for (var i = 0; i < length; ++i) {
    output[i] = fn(array[i], i);
  }

  return output;
}
/**
 * Iterates through all items in array and calls `fn` function for each of
 * them.
 *
 * @param array  Source array
 * @param fn     Callback function
 */

function each(array, fn) {
  var length = array.length;

  for (var i = 0; i < length; ++i) {
    fn(array[i], i);
  }
}
/**
 * Iterates through all items in array in reverse order and calls `fn` function for each of
 * them.
 *
 * @param array  Source array
 * @param fn     Callback function
 */

function eachReverse(array, fn) {
  var i = array.length;

  while (i--) {
    fn(array[i], i);
  }
}
/**
 * Iterates through all items in array and calls `fn` function for each of
 * them.
 *
 * If `fn` call evaluates to `false`, further iteration is cancelled.
 *
 * @param array  Source array
 * @param fn     Callback function
 */

function eachContinue(array, fn) {
  var length = array.length;

  for (var i = 0; i < length; ++i) {
    if (!fn(array[i], i)) {
      break;
    }
  }
}
/**
 * Shifts an item at `index` towards beginning of the array.
 *
 * @param array  Source array
 * @param index  Target element index
 */

function shiftLeft(array, index) {
  var length = array.length;

  for (var i = index; i < length; ++i) {
    array[i - index] = array[i];
  }

  array.length = length - index;
}
/**
 * Returns the last item of the array.
 *
 * @param array  Source array
 * @returns Last item
 */

function last(array) {
  var length = array.length;
  return length ? array[length - 1] : undefined;
}
/**
 * Returns the first item of the array.
 *
 * @param array  Source array
 * @returns Last item
 */

function first(array) {
  return array[0];
}
/**
 * Inserts `element` into `array` at `index`.
 *
 * Caps `index` to be between `0` and `array.length`
 *
 * @param array    Source array
 * @param element  Item to insert
 * @param array    Index to insert item at
 */

function insert(array, element, index) {
  //if (array) {
  index = _Math__WEBPACK_IMPORTED_MODULE_0__.fitToRange(index, 0, array.length);
  array.splice(index, 0, element); //}
}
/**
 * Removes all copies of `element` from `array` (if they exist) and then
 * inserts `element` at `index`.
 *
 * @param array    Source array
 * @param element  Item
 * @param array    Index to move item to
 */

function setIndex(array, element, index) {
  remove(array, element);
  insert(array, element, index);
}
/**
 * Pushes all of the elements from `input` into `array`.
 *
 * @param array  Output array
 * @param input  Input array
 */

function pushAll(array, input) {
  var length = input.length;

  for (var i = 0; i < length; ++i) {
    array.push(input[i]);
  }
}
/**
 * Removes `element` from `array`.
 *
 * If there are multiple copies of `element`, they are all removed.
 *
 * @param array    Source array
 * @param element  Item to remove
 */

function remove(array, element) {
  var found = false;
  var index = array.indexOf(element);

  if (index !== -1) {
    found = true;
    array.splice(index, 1);
    var length_1 = array.length;

    while (index < length_1) {
      // TODO handle NaN
      if (array[index] === element) {
        array.splice(index, 1);
        --length_1;
      } else {
        ++index;
      }
    }
  }

  return found;
}
/**
 * Adds an `element` to `array`.
 *
 * If array already contains and item like this, it is removed before adding
 * it again.
 *
 * Optionally `toIndex` can be specified to add element at specific index.
 *
 * @param array    Source array
 * @param element  Item to add
 * @param array    Index to move item to
 */

function move(array, element, toIndex) {
  // @todo this implementation must be the same as the List.moveValue method
  // @todo don't do anything if the desired index is the same as the current index
  var index = indexOf(array, element); // @todo remove all old values rather than only the first ?

  if (index !== -1) {
    removeIndex(array, index);
  }

  if (toIndex == null) {
    array.push(element);
  } else {
    insertIndex(array, toIndex, element);
  }
}
/**
 * Inserts `element` into `array` at `index`.
 *
 * If `index` is not provided, it will insert `element` at the end of `array`.
 *
 * @param array    Source array
 * @param element  Item to add
 * @param array    Index to add item at
 */

function add(array, element, index) {
  // Append to the end if index is not set
  if (!_Type__WEBPACK_IMPORTED_MODULE_1__.isNumber(index)) {
    array.push(element);
  } // Add to the beginning of array if index is 0
  else if (index === 0) {
    array.unshift(element);
  } // Add to indicated place if index is set
  else {
    array.splice(index, 0, element);
  }
}
/**
 * Removes `element` from `array` (if it exists) and then inserts `element` at
 * `index`.
 *
 * If `index` is not provided, it will insert `element` at the end of `array`.
 *
 * @param array    Source array
 * @param element  Item to remove
 * @param array    Index to move item to
 */

function replace(array, element, index) {
  // check if exists
  var ind = array.indexOf(element); // remove if exists

  if (ind !== -1) {
    array.splice(ind, 1);
  } // add to end if index is not set


  if (!_Type__WEBPACK_IMPORTED_MODULE_1__.isNumber(index)) {
    array.push(element);
  } // add to indicated place if index is set
  else {
    array.splice(index, 0, element);
  }
}
/**
 * Wraps `input` in an array, if it isn't already an array.
 *
 * @param input  Source value
 * @return An array
 */

function toArray(input) {
  if (Array.isArray(input)) {
    return input;
  } else {
    return [input];
  }
}
/**
 * Returns `true` if `element` exists in `array`.
 *
 * @param array    Source array
 * @param element  Item to search for
 * @returns Item in array?
 */

function has(array, element) {
  return indexOf(array, element) !== -1;
}
/**
 * Returns a shallow copy of `array`.
 *
 * @param array  Source array
 * @returns Copy of the array
 */

function copy(array) {
  var length = array.length; // It's faster to create the array with a pre-defined length

  var output = new Array(length);

  for (var i = 0; i < length; ++i) {
    // Because the array has a pre-defined length, we have to assign rather than push
    // This is also faster than pushing
    output[i] = array[i];
  }

  return output;
}
/**
 * Returns a copy of `array` which contains all the elements between `start`
 * and `end`. (including `start` and excluding `end`)
 *
 * If `end` is not provided, it defaults to `array.length`.
 *
 * @param array  Source array
 * @param start  Start index
 * @param end    End index
 * @returns Part of the array
 */

function slice(array, start, end) {
  if (end === void 0) {
    end = array.length;
  }

  var output = new Array(end - start);

  for (var i = start; i < end; ++i) {
    output[i - start] = array[i];
  }

  return output;
}
/**
 * Inserts a value into array at specific index.
 *
 * @param array  Source array
 * @param index  Index
 * @param value  Value to insert
 */

function insertIndex(array, index, value) {
  array.splice(index, 0, value);
}
/**
 * Removes a value from array at specific index.
 *
 * @param array  Source array
 * @param index  Index
 */

function removeIndex(array, index) {
  array.splice(index, 1);
}
/**
 * Orders an array using specific `ordering` function and returns index of
 * the `value`.
 *
 * @ignore Exclude from docs
 * @param array     Source array
 * @param ordering  An ordering function
 * @param value     Value to search for
 * @returns Result of the search
 */

function getSortedIndex(array, ordering, value) {
  var start = 0;
  var end = array.length;
  var found = false;

  while (start < end) {
    // TODO is this faster/slower than using Math.floor ?
    var pivot = start + end >> 1;
    var order = ordering(value, array[pivot]); // less

    if (order < 0) {
      end = pivot; // equal
    } else if (order === 0) {
      found = true;
      start = pivot + 1; // more
    } else {
      start = pivot + 1;
    }
  }

  return {
    found: found,
    index: found ? start - 1 : start
  };
}
/**
 * Searches the array using custom function and returns index of the item if
 * found.
 *
 * Will call `matches` function on all items of the array. If return value
 * evaluates to `true`, index is returned.
 *
 * Otherwise returns -1.
 *
 * @param array    Source array
 * @param matches  Search function
 * @returns Index of the item if found
 */

function findIndex(array, matches) {
  var length = array.length;

  for (var i = 0; i < length; ++i) {
    if (matches(array[i], i)) {
      return i;
    }
  }

  return -1;
}
/**
 * Searches the array using custom function and returns item if found.
 *
 * Will call `matches` function on all items of the array. If return value
 * evaluates to `true`, index is returned.
 *
 * Otherwise returns `undefined`.
 *
 * @param array    Source array
 * @param matches  Search function
 * @returns Item if found
 */

function find(array, matches) {
  var index = findIndex(array, matches);

  if (index !== -1) {
    return array[index];
  }
}
/**
 * Iterates through all items in array and calls `fn` function for each of
 * them.
 *
 * @param array  Source array
 * @param fn     Callback function
 */

function shuffle(array) {
  // https://stackoverflow.com/a/2450976/449477
  var currentIndex = array.length,
      temporaryValue,
      randomIndex; // While there remain elements to shuffle...

  while (0 !== currentIndex) {
    // Pick a remaining element...
    randomIndex = Math.floor(Math.random() * currentIndex);
    currentIndex -= 1; // And swap it with the current element.

    temporaryValue = array[currentIndex];
    array[currentIndex] = array[randomIndex];
    array[randomIndex] = temporaryValue;
  }
}
function keepIf(array, keep) {
  var length = array.length;
  var i = 0;

  while (i < length) {
    if (keep(array[i])) {
      ++i;
    } else {
      array.splice(i, 1);
      --length;
    }
  }
}

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/utils/AsyncPending.js":
/*!*******************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/utils/AsyncPending.js ***!
  \*******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "nextFrame": () => (/* binding */ nextFrame),
/* harmony export */   "raf": () => (/* binding */ raf),
/* harmony export */   "readFrame": () => (/* binding */ readFrame),
/* harmony export */   "triggerIdle": () => (/* binding */ triggerIdle),
/* harmony export */   "whenIdle": () => (/* binding */ whenIdle),
/* harmony export */   "writeFrame": () => (/* binding */ writeFrame)
/* harmony export */ });
/* harmony import */ var _Array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Array */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Array.js");
/**
 * A collection of low-level async operation stuff.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */

var pendingFrame = false;
var nextQueue = [];
var readQueue = [];
var writeQueue = [];
var idleQueue = [];
var fps = 1000 / 60;
/**
 * [raf description]
 *
 * @ignore Exclude from docs
 * @todo Description
 */

var raf = typeof requestAnimationFrame === "function" ? function (fn) {
  requestAnimationFrame(fn);
} : function (fn) {
  setTimeout(fn, fps);
};
/**
 * [frameLoop description]
 *
 * @ignore Exclude from docs
 * @todo Description
 */

function frameLoop() {
  var now = Date.now();
  var length = nextQueue.length;

  for (var i = 0; i < length; ++i) {
    nextQueue[i](now);
  }

  _Array__WEBPACK_IMPORTED_MODULE_0__.shiftLeft(nextQueue, length);

  for (var i = 0; i < readQueue.length; ++i) {
    readQueue[i](now);
  }

  readQueue.length = 0;

  for (var i = 0; i < writeQueue.length; ++i) {
    writeQueue[i](now);
  }

  writeQueue.length = 0;

  if (nextQueue.length === 0 && readQueue.length === 0) {
    pendingFrame = false;
  } else {
    raf(frameLoop);
  }
}
/**
 * [pendFrame description]
 *
 * @ignore Exclude from docs
 * @todo Description
 */


function pendFrame() {
  if (!pendingFrame) {
    pendingFrame = true;
    raf(frameLoop);
  }
}
/**
 * [nextFrame description]
 *
 * @ignore Exclude from docs
 * @todo Description
 * @param fn [description]
 */


function nextFrame(fn) {
  nextQueue.push(fn);
  pendFrame();
}
/**
 * [readFrame description]
 *
 * @ignore Exclude from docs
 * @todo Description
 * @param fn [description]
 */

function readFrame(fn) {
  readQueue.push(fn);
  pendFrame();
}
/**
 * [writeFrame description]
 *
 * @ignore Exclude from docs
 * @todo Description
 * @param fn [description]
 */

function writeFrame(fn) {
  writeQueue.push(fn);
  pendFrame();
}
/**
 * [whenIdle description]
 *
 * @ignore Exclude from docs
 * @todo Description
 * @param fn [description]
 */

function whenIdle(fn) {
  idleQueue.push(fn);
}
/**
 * [triggerIdle description]
 *
 * @ignore Exclude from docs
 * @todo Description
 * @todo Maybe don't trigger a callback which was added while in the middle of triggering?
 */

function triggerIdle() {
  var now = Date.now();
  var length = idleQueue.length;

  for (var i = 0; i < length; ++i) {
    idleQueue.shift()(now);
  }
}

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Browser.js":
/*!**************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/utils/Browser.js ***!
  \**************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "isInternetExplorer": () => (/* binding */ isInternetExplorer),
/* harmony export */   "isSafari": () => (/* binding */ isSafari)
/* harmony export */ });
// Also detects iOS
function isSafari() {
  return /apple/i.test(navigator.vendor);
}
function isInternetExplorer() {
  return /MSIE |Trident\//.test(navigator.userAgent);
}

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Cache.js":
/*!************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/utils/Cache.js ***!
  \************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Cache": () => (/* binding */ Cache),
/* harmony export */   "cache": () => (/* binding */ cache)
/* harmony export */ });
/* harmony import */ var _Dictionary__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Dictionary */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Dictionary.js");
/* harmony import */ var _Type__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */


/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Represents object cache.
 *
 * @ignore Exclude from docs
 * @todo Better storage
 * @todo TTL logging
 * @todo Garbage collector
 */

var Cache =
/** @class */
function () {
  function Cache() {
    /**
     * Storage for cache items.
     */
    this._storage = new _Dictionary__WEBPACK_IMPORTED_MODULE_0__.Dictionary();
    /**
     * Default TTL in milliseconds.
     */

    this.ttl = 1000;
  }
  /**
   * Caches or updates cached value, resets TTL.
   *
   * If `ttl` is set to zero, item will never expire.
   *
   * @param owner  An id of the object that owns this cache
   * @param key    Index key
   * @param value  Value
   * @param ttl    TTL of the cache to live in milliseconds
   */


  Cache.prototype.set = function (owner, key, value, ttl) {
    // Create if storage does not exist for this owner
    var ownerStorage = this._storage.insertKeyIfEmpty(owner, function () {
      return new _Dictionary__WEBPACK_IMPORTED_MODULE_0__.Dictionary();
    }); // Create cache item


    var item = {
      "touched": new Date().getTime(),
      "ttl": _Type__WEBPACK_IMPORTED_MODULE_1__.isNumber(ttl) ? ttl : this.ttl,
      "value": value
    }; // Set

    ownerStorage.setKey(key, item);
  };
  /**
   * Rerturns cached item, respecting TTL.
   *
   * @param owner  An id of the object that owns this cache
   * @param key    Index key
   * @param value  Value to return if cache not available
   * @return Value, or `undefined` if not set
   */


  Cache.prototype.get = function (owner, key, value) {
    if (value === void 0) {
      value = undefined;
    } // 		 || ypeof this._storage[owner][key] === "undefined" || this._storage[owner][key].expired === true) {


    if (this._storage.hasKey(owner)) {
      var ownerStorage = this._storage.getKey(owner);

      if (ownerStorage.hasKey(key)) {
        var cacheItem = ownerStorage.getKey(key);

        if (cacheItem.ttl && cacheItem.touched + cacheItem.ttl < new Date().getTime()) {
          cacheItem.expired = true;
        }

        if (cacheItem.expired) {
          ownerStorage.removeKey(key);
          return value;
        }

        return cacheItem.value;
      } else {
        return value;
      }
    } else {
      return value;
    }
  };
  /**
   * Clears cache for specific owner or everything.
   *
   * @param owner Owner to clear cache for
   */


  Cache.prototype.clear = function (owner) {
    if (owner) {
      this._storage.removeKey(owner);
    } else {
      this._storage.clear();
    }
  };

  return Cache;
}();


/**
 * ============================================================================
 * GLOBAL INSTANCE
 * ============================================================================
 * @hidden
 */

/**
 * A global instance of cache. Use this instance to cache any values.
 *
 * @ignore Exclude from docs
 */

var cache = new Cache();

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Color.js":
/*!************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/utils/Color.js ***!
  \************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Color": () => (/* binding */ Color),
/* harmony export */   "castColor": () => (/* binding */ castColor),
/* harmony export */   "color": () => (/* binding */ color),
/* harmony export */   "isColor": () => (/* binding */ isColor),
/* harmony export */   "toColor": () => (/* binding */ toColor)
/* harmony export */ });
/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _Colors__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Colors */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Colors.js");
/* harmony import */ var _Type__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/**
 * This module contains Color object definition
 */



/**
 * Represents a color.
 *
 * `Color` accepts value only in [[iRGB]] object format. To create `Color`
 * object by parsing it from any supported string-based formats, use helper
 * [[color]] function:
 *
 * ```TypeScript
 * am4core.color("#ff0000");
 * am4core.color("#f00");
 * am4core.color("rgb(255, 0, 0)");
 * am4core.color("rgba(255, 0, 0, 0.5)");
 * am4core.color({ r: 255, g: 0, b: 0 });
 * am4core.color("red");
 * ```
 * ```JavaScript
 * am4core.color("#ff0000");
 * am4core.color("#f00");
 * am4core.color("rgb(255, 0, 0)");
 * am4core.color("rgba(255, 0, 0, 0.5)");
 * am4core.color({ r: 255, g: 0, b: 0 });
 * am4core.color("red");
 * ```
 *
 * @see {@link https://www.amcharts.com/docs/v4/concepts/colors/} for color-related info
 */

var Color =
/** @class */
function () {
  /**
   * Constructor
   *
   * @param color Source color
   */
  function Color(color) {
    this._value = color;
  }

  Object.defineProperty(Color.prototype, "rgb", {
    /**
     * Returns [[iRGB]] representation of the color.
     *
     * @return RGB object
     */
    get: function get() {
      return this._value;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Color.prototype, "hex", {
    /**
     * Returns color hex value string, e.g. "#FF0000".
     *
     * @return Hex color code
     */
    get: function get() {
      return this._value ? _Colors__WEBPACK_IMPORTED_MODULE_1__.rgbToHex(this._value) : "none";
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Color.prototype, "rgba", {
    /**
     * Returns an `rgba()` representation of the color, e.g.:
     * `rgba(255, 0, 0, 0.5)`.
     *
     * @return rgba color string
     */
    get: function get() {
      return this._value ? _Colors__WEBPACK_IMPORTED_MODULE_1__.rgbToRGBA(this._value) : "none";
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Color.prototype, "alpha", {
    /**
     * Returns current transparency.
     *
     * @return Alpha (0-1)
     */
    get: function get() {
      if (this._value != null && this._value.a != null) {
        return this._value.a;
      } else {
        return 1;
      }
    },

    /**
     * Set alpha (transparency) of the color.
     *
     * @param value Alpha (0-1)
     */
    set: function set(value) {
      if (this._value) {
        this._value.a = value;
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Color.prototype, "lightColor", {
    /**
     * Returns current light color setting.
     *
     * @return Color
     */
    get: function get() {
      if (!this._lightColor) {
        this._lightColor = new Color({
          r: 255,
          g: 255,
          b: 255
        });
      }

      return this._lightColor;
    },

    /**
     * Sets "light" color. Used when determining contrasting color.
     *
     * @param color Color
     */
    set: function set(color) {
      this._lightColor = color;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Color.prototype, "darkColor", {
    /**
     * Returns current dark color setting.
     *
     * @return Color
     */
    get: function get() {
      if (!this._darkColor) {
        this._darkColor = new Color({
          r: 0,
          g: 0,
          b: 0
        });
      }

      return this._darkColor;
    },

    /**
     * Sets "dark" color. Used when determining contrasting color.
     *
     * @param color Color
     */
    set: function set(color) {
      this._darkColor = color;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Overrides `toString` method so that [[Color]] object can be used as
   * string.
   *
   * @ignore Exclude from docs
   * @return String represantion of color (usable in CSS)
   */

  Color.prototype.toString = function () {
    return this.alpha < 1 ? this.rgba : this.hex;
  };
  /**
   * Returns a new [[Color]] which is percent lighter (positive value),
   * or darker (negative value).
   *
   * Parameter is in the scale of -1 to 1.
   *
   * @param percent  Increase/decrease lightness by X
   * @return New Color
   */


  Color.prototype.lighten = function (percent) {
    return new Color(_Colors__WEBPACK_IMPORTED_MODULE_1__.lighten(this.rgb, percent));
  };
  /**
   * Returns a new [[Color]] which is percent brighter (positive value),
   * or darker (negative value).
   *
   * Parameter is in the scale of -1 to 1.
   *
   * @param percent  Increase/decrease brightness by X
   * @return New Color
   */


  Color.prototype.brighten = function (percent) {
    return new Color(_Colors__WEBPACK_IMPORTED_MODULE_1__.brighten(this.rgb, percent));
  };
  /**
   * Returns a new [[Color]] based on current color with specific saturation
   * applied.
   *
   * `saturation` can be in the range of 0 (fully desaturated) to 1 (fully
   * saturated).
   *
   * @param saturation  Saturation (0-1)
   * @return New (saturated) color
   */


  Color.prototype.saturate = function (saturation) {
    return new Color(_Colors__WEBPACK_IMPORTED_MODULE_1__.saturate(this.rgb, saturation));
  };

  Object.defineProperty(Color.prototype, "alternative", {
    /**
     * Returns a either light or dark color that contrasts specifically with
     * this color.
     *
     * Uses properties `darkColor` (default black) and `lightColor` (default
     * white).
     *
     * Useful when determining which color label should be on a colored
     * background, so that it stands out.
     *
     * @return Contrasting color
     */
    get: function get() {
      if (this.rgb != null) {
        return _Colors__WEBPACK_IMPORTED_MODULE_1__.isLight(this.rgb) ? this.darkColor : this.lightColor;
      } else {
        throw new Error("Color does not exist");
      }
    },
    enumerable: true,
    configurable: true
  });
  return Color;
}();


/**
 * Resolves an input variable to a normal [[iRGB]] color and creates [[Color]]
 * object for it.
 *
 * @param value  Input value
 * @param alpha  Alpha (0-1)
 * @return Color object
 */

function color(value, alpha) {
  if (!_Type__WEBPACK_IMPORTED_MODULE_2__.hasValue(value)) {
    return new Color(undefined);
  }

  if (typeof value == "string") {
    var cacheId = "_color_" + value + "_" + (alpha || "1");
    var cached = _Registry__WEBPACK_IMPORTED_MODULE_0__.registry.getCache(cacheId);

    if (cached) {
      return new Color({
        r: cached.r,
        g: cached.g,
        b: cached.b,
        a: cached.a
      });
    }

    var rgb = _Colors__WEBPACK_IMPORTED_MODULE_1__.rgb(value, alpha);
    _Registry__WEBPACK_IMPORTED_MODULE_0__.registry.setCache(cacheId, rgb);
    return new Color(rgb);
  } // Check if it's already a Color object


  if (value instanceof Color) {
    if (_Type__WEBPACK_IMPORTED_MODULE_2__.hasValue(alpha)) {
      value.alpha = alpha;
    }

    return value;
  } // Not a string or Color instance, it's the iRGB object then


  return new Color(value);
}
/**
 * Checks if supplied argument is instance of [[Color]].
 *
 * @param value  Input value
 * @return Is Color?
 */

function isColor(value) {
  return value instanceof Color;
}
/**
 * Converts any value to [[Color]].
 *
 * @param value  Input value
 * @return Color
 */

function castColor(value) {
  return color(value);
}
/**
 * Converts any value into a [[Color]].
 *
 * @param value  Source value
 * @return Color object
 */

function toColor(value) {
  if (_Type__WEBPACK_IMPORTED_MODULE_2__.hasValue(value) && !isColor(value)) {
    return castColor(value);
  }

  return value;
}

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/utils/ColorSet.js":
/*!***************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/utils/ColorSet.js ***!
  \***************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "ColorSet": () => (/* binding */ ColorSet)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Base */ "./node_modules/@amcharts/amcharts4/.internal/core/Base.js");
/* harmony import */ var _Color__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Color */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Color.js");
/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _Colors__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Colors */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Colors.js");
/* harmony import */ var _Type__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/* harmony import */ var _Utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Utils */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Utils.js");
/* harmony import */ var _Math__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
/**
 * This module contains ColorSet object definition
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */








/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Represents a set of colors. Can also generate colors according to set rules.
 *
 * @important
 * @see {@link https://www.amcharts.com/docs/v4/concepts/colors/} for color-related info
 */

var ColorSet =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_7__.__extends)(ColorSet, _super);
  /**
   * Constructor
   */


  function ColorSet() {
    var _this = _super.call(this) || this;
    /**
     * Holds the list of the colors in this set. (preset or auto-generated)
     */


    _this._list = [];
    /**
     * Current step in a color generator's cycle.
     */

    _this._currentStep = 0;
    /**
     * If set to non-zero value, the ColorSet will start iterating colors from
     * that particular index, not the first color in the list.
     */

    _this._startIndex = 0;
    /**
     * Current pass in the color generator's cycle. Normally a generator would
     * cycle through all available hue range, then repeat it, alternating other
     * color properties, to generate distinctive colors.
     */

    _this._currentPass = 0;
    /**
     * A base color. If there are no colors pre-set in the color list, ColorSet
     * will use this color as a base when generating new ones, applying
     * `stepOptions` and `passOptions` to this base color.
     */

    _this.baseColor = new _Color__WEBPACK_IMPORTED_MODULE_1__.Color({
      r: 103,
      g: 183,
      b: 220
    });
    /**
     * Modifications to apply with each new generated color.
     */

    _this.stepOptions = {};
    /**
     * Modifications to apply on top of `stepOptions` for each "pass" of the
     * color generation.
     *
     * A "pass" is when ColorSet generates `minColors` number of colors.
     */

    _this.passOptions = {
      brighten: -0.2
    };
    /**
     * An index increment to use when iterating through color list.
     *
     * Default is 1, which means returning each and every color.
     *
     * Setting it to a bigger number will make ColorSet `next()` iterator skip
     * some colors.
     *
     * E.g. setting to 2, will return every second color in the list.
     *
     * This is useful, when the color list has colors that are too close each
     * other for contrast.
     *
     * However, having bigger number will mean that `next()` iterator will go
     * through the list quicker, and the generator will kick sooner.
     */

    _this.step = 1;
    /**
     * A number of colors to generate in one "pass".
     *
     * This setting can be automatically overridden, if ColorSet has a list of
     * pre-set colors. In such case ColorSet will generate exactly the same
     * number of colors with each pass as there were colors in original set.
     */

    _this.minColors = 20;
    /**
     * Do not let the "lightness" of generated color to fall below this
     * threshold.
     */

    _this.minLightness = 0.2;
    /**
     * Do not let the "lightness" of generated color to get above this threshold.
     */

    _this.maxLightness = 0.9;
    /**
     * Randomly shuffle generated colors.
     */

    _this.shuffle = false;
    /**
     * When colors are generated, based on `stepOptions`, each generated color
     * gets either lighter or darker.
     *
     * If this is set to `true`, color generator will switch to opposing spectrum
     * when reaching `minLightness` or `maxLightness`.
     *
     * E.g. if we start off with a red color, then gradually generate lighter
     * colors through rose shades, then switch back to dark red and gradually
     * increase the lightness of it until it reaches the starting red.
     *
     * If set to `false` it will stop there and cap lightness at whatever level
     * we hit `minLightness` or `maxLightness`, which may result in a number of
     * the same colors.
     */

    _this.wrap = true;
    /**
     * Re-use same colors in the pre-set list, when ColorSet runs out of colors,
     * rather than start generating new ones.
     */

    _this.reuse = false;
    /**
     * Saturation of colors. This will change saturation of all colors of color
     * set.
     *
     * It is recommended to set this in theme, as changing it at run time won't
     * make the items to redraw and change color.
     */

    _this.saturation = 1;
    _this.className = "ColorSet";

    _this.applyTheme();

    return _this;
  }

  Object.defineProperty(ColorSet.prototype, "list", {
    /**
     * Returns current list of colors.
     *
     * If there are none, a new list of colors is generated, based on various
     * ColorSet settings.
     *
     * @return Color list
     */
    get: function get() {
      if (!this._list) {
        this.generate(this.minColors);
      }

      return this._list;
    },

    /**
     * Sets a list of pre-defined colors to use for the iterator.
     *
     * @param value Color list
     */
    set: function set(value) {
      this._list = value;
      this.reset();
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Gets reusable color.
   *
   * @param   index  Index of color
   * @return         Color
   */

  ColorSet.prototype.getReusableColor = function (index) {
    if (this._list.length == 0) {
      this.generate(1);
      return this.list[0];
    } else {
      var tmpstep = index - Math.floor(index / this._list.length) * this.list.length;
      return this.list[tmpstep];
    }
  };
  /**
   * Returns next color in the list using internal iterator counter.
   *
   * If `step` is set to something other than 1, it may return other color than
   * exact next one in the list.
   *
   * @return Color
   */


  ColorSet.prototype.next = function () {
    var color;

    if (this.list.length <= this._currentStep) {
      if (this.reuse) {
        color = this.getReusableColor(this._currentStep);
      } else {
        this.generate(_Math__WEBPACK_IMPORTED_MODULE_6__.max(this.minColors, this._currentStep + 1));
        color = this.list[this._currentStep];
      }
    } else {
      color = this.list[this._currentStep];
    }

    this._currentStep += this.step;
    return color.saturate(this.saturation);
  };
  /**
   * Returns a color at specific index in the list.
   *
   * @param i  Index
   * @return Color
   */


  ColorSet.prototype.getIndex = function (i) {
    var color;

    if (this.list.length <= i) {
      if (this.reuse) {
        color = this.getReusableColor(i);
      } else {
        this.generate(this.minColors);
        color = this.getIndex(i);
      }
    } else {
      color = this.list[i];
    }

    return color.saturate(this.saturation);
  };
  /**
   * Resets internal iterator.
   *
   * Calling `next()` after this will return the very first color in the color
   * list, even if it was already returned before.
   */


  ColorSet.prototype.reset = function () {
    this._currentStep = this._startIndex;
  };

  Object.defineProperty(ColorSet.prototype, "currentStep", {
    /**
     * @return Step
     */
    get: function get() {
      return this._currentStep;
    },

    /**
     * Sets current color iteration. You can use this property to skip some
     * colors from iteration. E.g. setting it to `10` will skip first ten
     * colors.
     *
     * Please note that the number is zero-based.
     *
     * @param value  Step
     */
    set: function set(value) {
      this._currentStep = value;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(ColorSet.prototype, "startIndex", {
    /**
     * @return Index
     */
    get: function get() {
      return this._startIndex;
    },

    /**
     * If set to non-zero value, the ColorSet will start iterating colors from
     * that particular index, not the first color in the list.
     *
     * @default 0
     * @since 4.4.9
     * @param  value  Index
     */
    set: function set(value) {
      this._startIndex = value;
      this.reset();
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Generates colors based on the various ColorSet settings.
   *
   * @param count Number of colors to generate
   */

  ColorSet.prototype.generate = function (count) {
    // Init
    var curColor = this.currentColor;
    var hsl = _Colors__WEBPACK_IMPORTED_MODULE_3__.rgbToHsl(_Type__WEBPACK_IMPORTED_MODULE_4__.getValue(curColor.rgb));
    var hueStep = _Type__WEBPACK_IMPORTED_MODULE_4__.hasValue(this.stepOptions.hue) ? this.stepOptions.hue : 1 / count;
    var mods = {
      brighten: 0,
      lighten: 0,
      hue: hsl.h,
      lightness: hsl.l,
      saturation: hsl.s
    }; // Generate list of hues, and shuffle them

    var hues = [];
    var startIndex = this.list.length == 0 ? 0 : 1;

    if (this.reuse) {
      for (var i = startIndex; i <= count; i++) {
        hues.push(_Colors__WEBPACK_IMPORTED_MODULE_3__.rgbToHsl(_Type__WEBPACK_IMPORTED_MODULE_4__.getValue(this._list[i].rgb)).h);
      }
    } else {
      for (var i = startIndex; i <= count; i++) {
        var h = hsl.h + hueStep * i;

        if (this.wrap && h > 1) {
          h -= 1;
        }

        hues.push(h);
      }
    } // Shuffle colors randomly


    if (this.shuffle) {
      hues.sort(function (a, b) {
        return Math.random() - 0.5;
      });
    } // Generate colors by rotating hue


    for (var i = 0; i < count; i++) {
      // Update hue
      if (this.reuse) {
        hsl = _Colors__WEBPACK_IMPORTED_MODULE_3__.rgbToHsl(_Type__WEBPACK_IMPORTED_MODULE_4__.getValue(this._list[i].rgb));
      } else {
        hsl.h = hues.shift();
      } // Apply HSL mods


      this.applyStepOptions(hsl, mods, i, this._currentPass); // Convert back to Color

      var c = (0,_Color__WEBPACK_IMPORTED_MODULE_1__.color)(_Colors__WEBPACK_IMPORTED_MODULE_3__.hslToRgb(hsl)); // Apply regular color mods

      var brighten = (this.stepOptions.brighten || 0) * i + (this.passOptions.brighten || 0) * this._currentPass;

      if (brighten != 0) {
        if (this.wrap) {
          brighten = _Utils__WEBPACK_IMPORTED_MODULE_5__.fitNumberRelative(brighten, this.minLightness, this.maxLightness);
        } else {
          brighten = _Utils__WEBPACK_IMPORTED_MODULE_5__.fitNumber(brighten, this.minLightness, this.maxLightness);
        }

        c = c.brighten(brighten);
      }

      var lighten = (this.stepOptions.lighten || 0) * i + (this.passOptions.lighten || 0) * this._currentPass;

      if (lighten != 0) {
        if (this.wrap) {
          lighten = _Utils__WEBPACK_IMPORTED_MODULE_5__.fitNumberRelative(lighten, this.minLightness, this.maxLightness);
        } else {
          lighten = _Utils__WEBPACK_IMPORTED_MODULE_5__.fitNumber(lighten, this.minLightness, this.maxLightness);
        }

        c = c.lighten(lighten);
      }

      this._list.push(c);
    }

    this._currentPass++;
  };

  Object.defineProperty(ColorSet.prototype, "currentColor", {
    /**
     * Returns current last color. It's either the last color in the list of
     * colors, or `baseColor` if list is empty.
     *
     * @return Color
     */
    get: function get() {
      if (this._list.length == 0) {
        return this.baseColor.saturate(this.saturation);
      } else {
        return this._list[this._list.length - 1].saturate(this.saturation);
      }
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Generates modifiers for color, based on what step and pass.
   *
   * @param hsl   Curren HSL value of the color to modify
   * @param base  The modifiers that were before modification to use as a base
   * @param step  Current step
   * @param pass  Current pass
   */

  ColorSet.prototype.applyStepOptions = function (hsl, base, step, pass) {
    // Process lightness
    hsl.l = base.lightness + (this.stepOptions.lightness || 0) * step + (this.passOptions.lightness || 0) * pass;

    if (this.wrap) {
      if (hsl.l > 1) {
        hsl.l = hsl.l - Math.floor(hsl.l);
      } else if (hsl.l < 0) {
        hsl.l = -(hsl.l - Math.floor(hsl.l));
      }

      hsl.l = _Utils__WEBPACK_IMPORTED_MODULE_5__.fitNumberRelative(hsl.l, this.minLightness, this.maxLightness);
    } else {
      if (hsl.l > 1) {
        hsl.l = 1;
      } else if (hsl.l < 0) {
        hsl.l = 0;
      }

      hsl.l = _Utils__WEBPACK_IMPORTED_MODULE_5__.fitNumber(hsl.l, this.minLightness, this.maxLightness);
    }
  };
  /**
   * Processes JSON-based config before it is applied to the object.
   *
   * @ignore Exclude from docs
   * @param config  Config
   */


  ColorSet.prototype.processConfig = function (config) {
    if (config) {
      // Cast colors
      if (_Type__WEBPACK_IMPORTED_MODULE_4__.hasValue(config.list) && _Type__WEBPACK_IMPORTED_MODULE_4__.isArray(config.list)) {
        for (var i = 0, len = config.list.length; i < len; i++) {
          if (!(config.list[i] instanceof _Color__WEBPACK_IMPORTED_MODULE_1__.Color)) {
            config.list[i] = (0,_Color__WEBPACK_IMPORTED_MODULE_1__.color)(config.list[i]);
          }
        }
      }

      if (_Type__WEBPACK_IMPORTED_MODULE_4__.hasValue(config.baseColor) && !(config.baseColor instanceof _Color__WEBPACK_IMPORTED_MODULE_1__.Color)) {
        config.baseColor = (0,_Color__WEBPACK_IMPORTED_MODULE_1__.color)(config.baseColor);
      }
    }

    _super.prototype.processConfig.call(this, config);
  };

  return ColorSet;
}(_Base__WEBPACK_IMPORTED_MODULE_0__.BaseObject);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_Registry__WEBPACK_IMPORTED_MODULE_2__.registry.registeredClasses.ColorSet = ColorSet;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Colors.js":
/*!*************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/utils/Colors.js ***!
  \*************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "brighten": () => (/* binding */ brighten),
/* harmony export */   "getBrightnessStep": () => (/* binding */ getBrightnessStep),
/* harmony export */   "getLightnessStep": () => (/* binding */ getLightnessStep),
/* harmony export */   "hexToRgb": () => (/* binding */ hexToRgb),
/* harmony export */   "hexToRgbWithAlpha": () => (/* binding */ hexToRgbWithAlpha),
/* harmony export */   "hslToRgb": () => (/* binding */ hslToRgb),
/* harmony export */   "hsvToRgb": () => (/* binding */ hsvToRgb),
/* harmony export */   "interpolate": () => (/* binding */ interpolate),
/* harmony export */   "isLight": () => (/* binding */ isLight),
/* harmony export */   "lighten": () => (/* binding */ lighten),
/* harmony export */   "pad2": () => (/* binding */ pad2),
/* harmony export */   "rgb": () => (/* binding */ rgb),
/* harmony export */   "rgbToHex": () => (/* binding */ rgbToHex),
/* harmony export */   "rgbToHsl": () => (/* binding */ rgbToHsl),
/* harmony export */   "rgbToHsv": () => (/* binding */ rgbToHsv),
/* harmony export */   "rgbToRGBA": () => (/* binding */ rgbToRGBA),
/* harmony export */   "rgbaToRgb": () => (/* binding */ rgbaToRgb),
/* harmony export */   "saturate": () => (/* binding */ saturate)
/* harmony export */ });
/* harmony import */ var _Math__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
/* harmony import */ var _Type__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/**
 * A collection of color-related functions
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */


/**
 * Define named colors for easy resolution to RGB.
 */

var namedColors = {
  aliceblue: {
    r: 240,
    g: 248,
    b: 255
  },
  antiquewhite: {
    r: 250,
    g: 235,
    b: 215
  },
  aqua: {
    r: 0,
    g: 255,
    b: 255
  },
  aquamarine: {
    r: 127,
    g: 255,
    b: 212
  },
  azure: {
    r: 240,
    g: 255,
    b: 255
  },
  beige: {
    r: 245,
    g: 245,
    b: 220
  },
  bisque: {
    r: 255,
    g: 228,
    b: 196
  },
  black: {
    r: 0,
    g: 0,
    b: 0
  },
  blanchedalmond: {
    r: 255,
    g: 235,
    b: 205
  },
  blue: {
    r: 0,
    g: 0,
    b: 255
  },
  blueviolet: {
    r: 138,
    g: 43,
    b: 226
  },
  brown: {
    r: 165,
    g: 42,
    b: 42
  },
  burlywood: {
    r: 222,
    g: 184,
    b: 135
  },
  cadetblue: {
    r: 95,
    g: 158,
    b: 160
  },
  chartreuse: {
    r: 127,
    g: 255,
    b: 0
  },
  chocolate: {
    r: 210,
    g: 105,
    b: 30
  },
  coral: {
    r: 255,
    g: 127,
    b: 80
  },
  cornflowerblue: {
    r: 100,
    g: 149,
    b: 237
  },
  cornsilk: {
    r: 255,
    g: 248,
    b: 220
  },
  crimson: {
    r: 220,
    g: 20,
    b: 60
  },
  cyan: {
    r: 0,
    g: 255,
    b: 255
  },
  darkblue: {
    r: 0,
    g: 0,
    b: 139
  },
  darkcyan: {
    r: 0,
    g: 139,
    b: 139
  },
  darkgoldenrod: {
    r: 184,
    g: 134,
    b: 11
  },
  darkgray: {
    r: 169,
    g: 169,
    b: 169
  },
  darkgrey: {
    r: 169,
    g: 169,
    b: 169
  },
  darkgreen: {
    r: 0,
    g: 100,
    b: 0
  },
  darkkhaki: {
    r: 189,
    g: 183,
    b: 107
  },
  darkmagenta: {
    r: 139,
    g: 0,
    b: 139
  },
  darkolivegreen: {
    r: 85,
    g: 107,
    b: 47
  },
  darkorange: {
    r: 255,
    g: 140,
    b: 0
  },
  darkorchid: {
    r: 153,
    g: 50,
    b: 204
  },
  darkred: {
    r: 139,
    g: 0,
    b: 0
  },
  darksalmon: {
    r: 233,
    g: 150,
    b: 122
  },
  darkseagreen: {
    r: 143,
    g: 188,
    b: 143
  },
  darkslateblue: {
    r: 72,
    g: 61,
    b: 139
  },
  darkslategray: {
    r: 47,
    g: 79,
    b: 79
  },
  darkslategrey: {
    r: 47,
    g: 79,
    b: 79
  },
  darkturquoise: {
    r: 0,
    g: 206,
    b: 209
  },
  darkviolet: {
    r: 148,
    g: 0,
    b: 211
  },
  deeppink: {
    r: 255,
    g: 20,
    b: 147
  },
  deepskyblue: {
    r: 0,
    g: 191,
    b: 255
  },
  dimgray: {
    r: 105,
    g: 105,
    b: 105
  },
  dimgrey: {
    r: 105,
    g: 105,
    b: 105
  },
  dodgerblue: {
    r: 30,
    g: 144,
    b: 255
  },
  firebrick: {
    r: 178,
    g: 34,
    b: 34
  },
  floralwhite: {
    r: 255,
    g: 250,
    b: 240
  },
  forestgreen: {
    r: 34,
    g: 139,
    b: 34
  },
  fuchsia: {
    r: 255,
    g: 0,
    b: 255
  },
  gainsboro: {
    r: 220,
    g: 220,
    b: 220
  },
  ghostwhite: {
    r: 248,
    g: 248,
    b: 255
  },
  gold: {
    r: 255,
    g: 215,
    b: 0
  },
  goldenrod: {
    r: 218,
    g: 165,
    b: 32
  },
  gray: {
    r: 128,
    g: 128,
    b: 128
  },
  grey: {
    r: 128,
    g: 128,
    b: 128
  },
  green: {
    r: 0,
    g: 128,
    b: 0
  },
  greenyellow: {
    r: 173,
    g: 255,
    b: 47
  },
  honeydew: {
    r: 240,
    g: 255,
    b: 240
  },
  hotpink: {
    r: 255,
    g: 105,
    b: 180
  },
  indianred: {
    r: 205,
    g: 92,
    b: 92
  },
  indigo: {
    r: 75,
    g: 0,
    b: 130
  },
  ivory: {
    r: 255,
    g: 255,
    b: 240
  },
  khaki: {
    r: 240,
    g: 230,
    b: 140
  },
  lavender: {
    r: 230,
    g: 230,
    b: 250
  },
  lavenderblush: {
    r: 255,
    g: 240,
    b: 245
  },
  lawngreen: {
    r: 124,
    g: 252,
    b: 0
  },
  lemonchiffon: {
    r: 255,
    g: 250,
    b: 205
  },
  lightblue: {
    r: 173,
    g: 216,
    b: 230
  },
  lightcoral: {
    r: 240,
    g: 128,
    b: 128
  },
  lightcyan: {
    r: 224,
    g: 255,
    b: 255
  },
  lightgoldenrodyellow: {
    r: 250,
    g: 250,
    b: 210
  },
  lightgray: {
    r: 211,
    g: 211,
    b: 211
  },
  lightgrey: {
    r: 211,
    g: 211,
    b: 211
  },
  lightgreen: {
    r: 144,
    g: 238,
    b: 144
  },
  lightpink: {
    r: 255,
    g: 182,
    b: 193
  },
  lightsalmon: {
    r: 255,
    g: 160,
    b: 122
  },
  lightseagreen: {
    r: 32,
    g: 178,
    b: 170
  },
  lightskyblue: {
    r: 135,
    g: 206,
    b: 250
  },
  lightslategray: {
    r: 119,
    g: 136,
    b: 153
  },
  lightslategrey: {
    r: 119,
    g: 136,
    b: 153
  },
  lightsteelblue: {
    r: 176,
    g: 196,
    b: 222
  },
  lightyellow: {
    r: 255,
    g: 255,
    b: 224
  },
  lime: {
    r: 0,
    g: 255,
    b: 0
  },
  limegreen: {
    r: 50,
    g: 205,
    b: 50
  },
  linen: {
    r: 250,
    g: 240,
    b: 230
  },
  magenta: {
    r: 255,
    g: 0,
    b: 255
  },
  maroon: {
    r: 128,
    g: 0,
    b: 0
  },
  mediumaquamarine: {
    r: 102,
    g: 205,
    b: 170
  },
  mediumblue: {
    r: 0,
    g: 0,
    b: 205
  },
  mediumorchid: {
    r: 186,
    g: 85,
    b: 211
  },
  mediumpurple: {
    r: 147,
    g: 112,
    b: 219
  },
  mediumseagreen: {
    r: 60,
    g: 179,
    b: 113
  },
  mediumslateblue: {
    r: 123,
    g: 104,
    b: 238
  },
  mediumspringgreen: {
    r: 0,
    g: 250,
    b: 154
  },
  mediumturquoise: {
    r: 72,
    g: 209,
    b: 204
  },
  mediumvioletred: {
    r: 199,
    g: 21,
    b: 133
  },
  midnightblue: {
    r: 25,
    g: 25,
    b: 112
  },
  mintcream: {
    r: 245,
    g: 255,
    b: 250
  },
  mistyrose: {
    r: 255,
    g: 228,
    b: 225
  },
  moccasin: {
    r: 255,
    g: 228,
    b: 181
  },
  navajowhite: {
    r: 255,
    g: 222,
    b: 173
  },
  navy: {
    r: 0,
    g: 0,
    b: 128
  },
  oldlace: {
    r: 253,
    g: 245,
    b: 230
  },
  olive: {
    r: 128,
    g: 128,
    b: 0
  },
  olivedrab: {
    r: 107,
    g: 142,
    b: 35
  },
  orange: {
    r: 255,
    g: 165,
    b: 0
  },
  orangered: {
    r: 255,
    g: 69,
    b: 0
  },
  orchid: {
    r: 218,
    g: 112,
    b: 214
  },
  palegoldenrod: {
    r: 238,
    g: 232,
    b: 170
  },
  palegreen: {
    r: 152,
    g: 251,
    b: 152
  },
  paleturquoise: {
    r: 175,
    g: 238,
    b: 238
  },
  palevioletred: {
    r: 219,
    g: 112,
    b: 147
  },
  papayawhip: {
    r: 255,
    g: 239,
    b: 213
  },
  peachpuff: {
    r: 255,
    g: 218,
    b: 185
  },
  peru: {
    r: 205,
    g: 133,
    b: 63
  },
  pink: {
    r: 255,
    g: 192,
    b: 203
  },
  plum: {
    r: 221,
    g: 160,
    b: 221
  },
  powderblue: {
    r: 176,
    g: 224,
    b: 230
  },
  purple: {
    r: 128,
    g: 0,
    b: 128
  },
  rebeccapurple: {
    r: 102,
    g: 51,
    b: 153
  },
  red: {
    r: 255,
    g: 0,
    b: 0
  },
  rosybrown: {
    r: 188,
    g: 143,
    b: 143
  },
  royalblue: {
    r: 65,
    g: 105,
    b: 225
  },
  saddlebrown: {
    r: 139,
    g: 69,
    b: 19
  },
  salmon: {
    r: 250,
    g: 128,
    b: 114
  },
  sandybrown: {
    r: 244,
    g: 164,
    b: 96
  },
  seagreen: {
    r: 46,
    g: 139,
    b: 87
  },
  seashell: {
    r: 255,
    g: 245,
    b: 238
  },
  sienna: {
    r: 160,
    g: 82,
    b: 45
  },
  silver: {
    r: 192,
    g: 192,
    b: 192
  },
  skyblue: {
    r: 135,
    g: 206,
    b: 235
  },
  slateblue: {
    r: 106,
    g: 90,
    b: 205
  },
  slategray: {
    r: 112,
    g: 128,
    b: 144
  },
  slategrey: {
    r: 112,
    g: 128,
    b: 144
  },
  snow: {
    r: 255,
    g: 250,
    b: 250
  },
  springgreen: {
    r: 0,
    g: 255,
    b: 127
  },
  steelblue: {
    r: 70,
    g: 130,
    b: 180
  },
  tan: {
    r: 210,
    g: 180,
    b: 140
  },
  teal: {
    r: 0,
    g: 128,
    b: 128
  },
  thistle: {
    r: 216,
    g: 191,
    b: 216
  },
  tomato: {
    r: 255,
    g: 99,
    b: 71
  },
  turquoise: {
    r: 64,
    g: 224,
    b: 208
  },
  violet: {
    r: 238,
    g: 130,
    b: 238
  },
  wheat: {
    r: 245,
    g: 222,
    b: 179
  },
  white: {
    r: 255,
    g: 255,
    b: 255
  },
  whitesmoke: {
    r: 245,
    g: 245,
    b: 245
  },
  yellow: {
    r: 255,
    g: 255,
    b: 0
  },
  yellowgreen: {
    r: 154,
    g: 205,
    b: 50
  }
};
/**
 * Tries to resolve a named color into a hex color representation.
 *
 * @ignore Exclude from docs
 * @param value  Color name
 * @return Color
 * @deprecated
 * @hidden
 */

/*export function resolveNamedColor(value: string): Color {
    return (<any>namedColors)[value] ? (<any>namedColors)[value] : undefined;
}*/

/**
 * Converts a proper color hex code (i.e. "#FF5500") or named color (i.e. "red")
 * into an {iRGB} object. If the code is not correctly formatted, an RGB of
 * black is returned.
 *
 * @ignore Exclude from docs
 * @param color  Color code
 * @param alpha  Alpha (0-1)
 * @return RGB
 */

function rgb(color, alpha) {
  // Init return value
  var rgb; // Try resolving color format
  // Named color?

  if (namedColors[color]) {
    rgb = namedColors[color];
  } // Hex code?
  else if (color.charAt(0) === "#") {
    rgb = hexToRgb(color);
  } // rgb() format?
  else if (color.match(/^rgba?\(/)) {
    rgb = rgbaToRgb(color);
  } // Was not able to resolve?


  if (!rgb) {
    rgb = {
      r: 0,
      g: 0,
      b: 0,
      a: 1
    };
  } // Set alpha


  if (_Type__WEBPACK_IMPORTED_MODULE_1__.hasValue(alpha)) {
    rgb.a = alpha;
  }

  return rgb;
}
/**
 * Converts a hex color code (i.e. "#FF5500") to an [[iRGB]] object.
 *
 * @ignore Exclude from docs
 * @param hex  Hex color code
 * @return RGB
 */

function hexToRgb(hex) {
  // Expand shorthand form (e.g. "03F") to full form (e.g. "0033FF")
  var shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
  hex = hex.replace(shorthandRegex, function (m, r, g, b) {
    return r + r + g + g + b + b;
  });
  var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
  return result ? {
    r: parseInt(result[1], 16),
    g: parseInt(result[2], 16),
    b: parseInt(result[3], 16)
  } : hexToRgbWithAlpha(hex);
}
/**
 * Converts a hex color code with alpha (i.e. "#FF5500128") to an [[iRGB]] object.
 *
 * @ignore Exclude from docs
 * @param hex  Hex color code
 * @return RGB
 */

function hexToRgbWithAlpha(hex) {
  // Expand shorthand form (e.g. "03FA") to full form (e.g. "0033FFAA")
  var shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])$/i;
  hex = hex.replace(shorthandRegex, function (m, r, g, b, a) {
    return r + r + g + g + b + b + a + a;
  });
  var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
  return result ? {
    r: parseInt(result[1], 16),
    g: parseInt(result[2], 16),
    b: parseInt(result[3], 16),
    a: parseInt(result[4], 16) / 256
  } : undefined;
}
/**
 * Converts color strings in format like `rgb()` and `rgba()` to [[iRGB]].
 *
 * @ignore Exclude from docs
 * @param color  Color code
 * @return RGB
 */

function rgbaToRgb(color) {
  color = color.replace(/[ ]/g, ""); // Init

  var matches = color.match(/^rgb\(([0-9]*),([0-9]*),([0-9]*)\)/i); // Try rgb() format

  if (matches) {
    matches.push("1");
  } else {
    matches = color.match(/^rgba\(([0-9]*),([0-9]*),([0-9]*),([.0-9]*)\)/i);

    if (!matches) {
      return;
    }
  }

  return {
    r: parseInt(matches[1]),
    g: parseInt(matches[2]),
    b: parseInt(matches[3]),
    a: parseFloat(matches[4])
  };
}
/**
 * Converts an [[iRGB]] object into a hex color code.
 *
 * @ignore Exclude from docs
 * @param rgb  RGB
 * @return Hex color code
 */

function rgbToHex(rgb) {
  return "#" + pad2(rgb.r.toString(16)) + pad2(rgb.g.toString(16)) + pad2(rgb.b.toString(16));
}
/**
 * Converts an [[iRGB]] object into its `rgb()` or `rgba()` representation.
 *
 * @ignore Exclude from docs
 * @param rgb  RGB
 * @return `rgba()` syntax
 */

function rgbToRGBA(rgb) {
  if (_Type__WEBPACK_IMPORTED_MODULE_1__.hasValue(rgb.a) && rgb.a !== 1) {
    return "rgba(" + rgb.r + "," + rgb.g + "," + rgb.b + "," + rgb.a + ")";
  } else {
    return "rgb(" + rgb.r + "," + rgb.g + "," + rgb.b + ")";
  }
}
/**
 * Pads a 1-digit string with a zero.
 *
 * @ignore Exclude from docs
 * @param c  Input string
 * @return Padded string
 */

function pad2(c) {
  return c.length == 1 ? "0" + c : "" + c;
}
/**
 * Returns an intermediate color between two colors based on the relative
 * position. Position needs to be in range between 0 and 1. Zero meaning the
 * resulting color will be closest to the first reference color.
 *
 * @ignore Exclude from docs
 * @param color1   First reference color
 * @param color2   Second reference color
 * @param percent  Relative position (0-1)
 * @return Interpolated color
 */

function interpolate(rgb1, rgb2, percent) {
  percent = _Math__WEBPACK_IMPORTED_MODULE_0__.fitToRange(percent, 0, 1);

  if (rgb1) {
    if (rgb2) {
      return {
        r: rgb1.r + Math.round((rgb2.r - rgb1.r) * percent),
        g: rgb1.g + Math.round((rgb2.g - rgb1.g) * percent),
        b: rgb1.b + Math.round((rgb2.b - rgb1.b) * percent),
        a: (rgb1.a || 1) + Math.round(((rgb2.a || 1) - (rgb1.a || 1)) * percent)
      };
    } else {
      return rgb1;
    }
  } else if (rgb2) {
    return rgb2;
  } else {
    return rgb1;
  }
}
/**
 * Returns a color that is `percent` brighter than the reference color.
 *
 * @ignore Exclude from docs
 * @param color    Reference color
 * @param percent  Brightness percent
 * @return Hex code of the new color
 */

function lighten(rgb, percent) {
  if (rgb) {
    return {
      r: Math.max(0, Math.min(255, rgb.r + getLightnessStep(rgb.r, percent))),
      g: Math.max(0, Math.min(255, rgb.g + getLightnessStep(rgb.g, percent))),
      b: Math.max(0, Math.min(255, rgb.b + getLightnessStep(rgb.b, percent))),
      a: rgb.a
    };
  } else {
    // TODO is this correct ?
    return rgb;
  }
}
;
/**
 * Gets lightness step.
 *
 * @ignore Exclude from docs
 * @param value    Value
 * @param percent  Percent
 * @return Step
 */

function getLightnessStep(value, percent) {
  var base = percent > 0 ? 255 - value : value;
  return Math.round(base * percent);
}
/**
 * Returns a color that is `percent` brighter than the source `color`.
 *
 * @ignore Exclude from docs
 * @param color    Source color
 * @param percent  Brightness percent
 * @return New color
 */

function brighten(rgb, percent) {
  if (rgb) {
    var base = Math.min(Math.max(rgb.r, rgb.g, rgb.b), 230); //let base = Math.max(rgb.r, rgb.g, rgb.b);

    var step = getLightnessStep(base, percent);
    return {
      r: Math.max(0, Math.min(255, Math.round(rgb.r + step))),
      g: Math.max(0, Math.min(255, Math.round(rgb.g + step))),
      b: Math.max(0, Math.min(255, Math.round(rgb.b + step))),
      a: rgb.a
    };
  } else {
    // TODO is this correct ?
    return rgb;
  }
}
;
/**
 * Returns brightness step.
 *
 * @ignore Exclude from docs
 * @param value    Value
 * @param percent  Percent
 * @return Step
 */

function getBrightnessStep(value, percent) {
  var base = 255; //percent > 0 ? 255 - value : value;

  return Math.round(base * percent);
}
/**
 * Returns a new [[iRGB]] object based on `rgb` parameter with specific
 * saturation applied.
 *
 * `saturation` can be in the range of 0 (fully desaturated) to 1 (fully
 * saturated).
 *
 * @ignore Exclude from docs
 * @param color       Base color
 * @param saturation  Saturation (0-1)
 * @return New color
 */

function saturate(rgb, saturation) {
  if (rgb == null || saturation == 1) {
    return rgb;
  }

  var hsl = rgbToHsl(rgb);
  hsl.s = saturation;
  return hslToRgb(hsl);
}
/*
// not used
export function rgbToMatrix(rgb: iRGB): string {
    let r = $type.toText($math.round((rgb.r || 0) / 255, 10));
    let g = $type.toText($math.round((rgb.g || 0) / 255, 10));
    let b = $type.toText($math.round((rgb.b || 0) / 255, 10));
    let a = $type.toText(rgb.a || 1);
    return	      r + " 0 0 0 0" +
                    " 0 " + g + " 0 0 0" +
                    " 0 0 " + b + " 0 0" +
                    " 0 0 0 " + a + " 0";
}
*/

/**
 * The functions below are taken and adapted from Garry Tan's blog post:
 * http://axonflux.com/handy-rgb-to-hsl-and-rgb-to-hsv-color-model-c
 *
 * The further attributions go mjijackson.com, which now seems to be defunct.
 */

/**
 * Converts an HSL color value to RGB. Conversion formula
 * adapted from http://en.wikipedia.org/wiki/HSL_color_space.
 * Assumes h, s, and l are contained in the set [0, 1] and
 * returns r, g, and b in the set [0, 255].
 *
 * Function adapted from:
 * http://axonflux.com/handy-rgb-to-hsl-and-rgb-to-hsv-color-model-c
 *
 * @ignore Exclude from docs
 * @param h       The hue
 * @param s       The saturation
 * @param l       The lightness
 * @return The RGB representation
 */

function hslToRgb(color) {
  var r, g, b;
  var h = color.h;
  var s = color.s;
  var l = color.l;

  if (s == 0) {
    r = g = b = l; // achromatic
  } else {
    var hue2rgb = function hue2rgb(p, q, t) {
      if (t < 0) {
        t += 1;
      }

      if (t > 1) {
        t -= 1;
      }

      if (t < 1 / 6) {
        return p + (q - p) * 6 * t;
      }

      if (t < 1 / 2) {
        return q;
      }

      if (t < 2 / 3) {
        return p + (q - p) * (2 / 3 - t) * 6;
      }

      return p;
    };

    var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
    var p = 2 * l - q;
    r = hue2rgb(p, q, h + 1 / 3);
    g = hue2rgb(p, q, h);
    b = hue2rgb(p, q, h - 1 / 3);
  }

  return {
    r: Math.round(r * 255),
    g: Math.round(g * 255),
    b: Math.round(b * 255)
  };
}
/**
 * Converts an RGB color value to HSL. Conversion formula
 * adapted from http://en.wikipedia.org/wiki/HSL_color_space.
 * Assumes r, g, and b are contained in the set [0, 255] and
 * returns h, s, and l in the set [0, 1].
 *
 * Function adapted from:
 * http://axonflux.com/handy-rgb-to-hsl-and-rgb-to-hsv-color-model-c
 *
 * @ignore Exclude from docs
 * @param r       The red color value
 * @param g       The green color value
 * @param b       The blue color value
 * @return The HSL representation
 */

function rgbToHsl(color) {
  var r = color.r / 255;
  var g = color.g / 255;
  var b = color.b / 255;
  var max = Math.max(r, g, b);
  var min = Math.min(r, g, b);
  var h = 0;
  var s = 0;
  var l = (max + min) / 2;

  if (max === min) {
    h = s = 0; // achromatic
  } else {
    var d = max - min;
    s = l > 0.5 ? d / (2 - max - min) : d / (max + min);

    switch (max) {
      case r:
        h = (g - b) / d + (g < b ? 6 : 0);
        break;

      case g:
        h = (b - r) / d + 2;
        break;

      case b:
        h = (r - g) / d + 4;
        break;
    }

    h /= 6;
  }

  return {
    h: h,
    s: s,
    l: l
  };
}
/**
 * Converts an RGB color value to HSV. Conversion formula
 * adapted from http://en.wikipedia.org/wiki/HSV_color_space.
 * Assumes r, g, and b are contained in the set [0, 255] and
 * returns h, s, and v in the set [0, 1].
 *
 * @ignore Exclude from docs
 * @param   Number  r       The red color value
 * @param   Number  g       The green color value
 * @param   Number  b       The blue color value
 * @return  Array           The HSV representation
 */

function rgbToHsv(color) {
  var r = color.r / 255;
  var g = color.g / 255;
  var b = color.b / 255;
  var max = Math.max(r, g, b),
      min = Math.min(r, g, b);
  var h = 0;
  var s = 0;
  var v = max;
  var d = max - min;
  s = max == 0 ? 0 : d / max;

  if (max == min) {
    h = 0; // achromatic
  } else {
    switch (max) {
      case r:
        h = (g - b) / d + (g < b ? 6 : 0);
        break;

      case g:
        h = (b - r) / d + 2;
        break;

      case b:
        h = (r - g) / d + 4;
        break;
    }

    h /= 6;
  }

  return {
    h: h,
    s: s,
    v: v
  };
}
/**
 * Converts an HSV color value to RGB. Conversion formula
 * adapted from http://en.wikipedia.org/wiki/HSV_color_space.
 * Assumes h, s, and v are contained in the set [0, 1] and
 * returns r, g, and b in the set [0, 255].
 *
 * @ignore Exclude from docs
 * @param   Number  h       The hue
 * @param   Number  s       The saturation
 * @param   Number  v       The value
 * @return  Array           The RGB representation
 */

function hsvToRgb(color) {
  var r = 0;
  var g = 0;
  var b = 0;
  var h = color.h;
  var s = color.s;
  var v = color.v;
  var i = Math.floor(h * 6);
  var f = h * 6 - i;
  var p = v * (1 - s);
  var q = v * (1 - f * s);
  var t = v * (1 - (1 - f) * s);

  switch (i % 6) {
    case 0:
      r = v;
      g = t;
      b = p;
      break;

    case 1:
      r = q;
      g = v;
      b = p;
      break;

    case 2:
      r = p;
      g = v;
      b = t;
      break;

    case 3:
      r = p;
      g = q;
      b = v;
      break;

    case 4:
      r = t;
      g = p;
      b = v;
      break;

    case 5:
      r = v;
      g = p;
      b = q;
      break;
  }

  return {
    r: Math.round(r * 255),
    g: Math.round(g * 255),
    b: Math.round(b * 255)
  };
}
/**
 * Returns `true` if color is "light". Useful indetermining which contrasting
 * color to use for elements over this color. E.g.: you would want to use
 * black text over light background, and vice versa.
 *
 * @ignore Exclude from docs
 * @param color  Source color
 * @return Light?
 */

function isLight(color) {
  return (color.r * 299 + color.g * 587 + color.b * 114) / 1000 >= 128;
}

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/utils/DOM.js":
/*!**********************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/utils/DOM.js ***!
  \**********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "SVGNS": () => (/* binding */ SVGNS),
/* harmony export */   "StyleClass": () => (/* binding */ StyleClass),
/* harmony export */   "StyleRule": () => (/* binding */ StyleRule),
/* harmony export */   "XLINK": () => (/* binding */ XLINK),
/* harmony export */   "XMLNS": () => (/* binding */ XMLNS),
/* harmony export */   "addClass": () => (/* binding */ addClass),
/* harmony export */   "addEventListener": () => (/* binding */ addEventListener),
/* harmony export */   "blur": () => (/* binding */ blur),
/* harmony export */   "contains": () => (/* binding */ contains),
/* harmony export */   "copyAttributes": () => (/* binding */ copyAttributes),
/* harmony export */   "eventTarget": () => (/* binding */ eventTarget),
/* harmony export */   "findFont": () => (/* binding */ findFont),
/* harmony export */   "findFontSize": () => (/* binding */ findFontSize),
/* harmony export */   "fixPixelPerfect": () => (/* binding */ fixPixelPerfect),
/* harmony export */   "focus": () => (/* binding */ focus),
/* harmony export */   "getComputedStyle": () => (/* binding */ getComputedStyle),
/* harmony export */   "getElement": () => (/* binding */ getElement),
/* harmony export */   "getRoot": () => (/* binding */ getRoot),
/* harmony export */   "getShadowRoot": () => (/* binding */ getShadowRoot),
/* harmony export */   "isElement": () => (/* binding */ isElement),
/* harmony export */   "isElementInViewport": () => (/* binding */ isElementInViewport),
/* harmony export */   "isHidden": () => (/* binding */ isHidden),
/* harmony export */   "outerHTML": () => (/* binding */ outerHTML),
/* harmony export */   "ready": () => (/* binding */ ready),
/* harmony export */   "removeClass": () => (/* binding */ removeClass),
/* harmony export */   "setStyle": () => (/* binding */ setStyle)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Disposer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Disposer */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Disposer.js");
/* harmony import */ var _AsyncPending__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AsyncPending */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/AsyncPending.js");
/* harmony import */ var _Options__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Options */ "./node_modules/@amcharts/amcharts4/.internal/core/Options.js");
/* harmony import */ var _Object__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Object */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Object.js");
/* harmony import */ var _Array__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Array */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Array.js");
/* harmony import */ var _Type__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/**
 * A collection of DOM-related functions.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */







/**
 * SVG namespace.
 *
 * @ignore Exclude from docs
 */

var SVGNS = "http://www.w3.org/2000/svg";
/**
 * XML namespace.
 *
 * @ignore Exclude from docs
 */

var XMLNS = "http://www.w3.org/2000/xmlns/";
/**
 * XLINK namespace.
 *
 * @ignore Exclude from docs
 */

var XLINK = "http://www.w3.org/1999/xlink";
/**
 * Function that adds a disposable event listener directly to a DOM element.
 *
 * @ignore Exclude from docs
 * @param dom       A DOM element to add event to
 * @param type      Event type
 * @param listener  Event listener
 * @returns Disposable event
 */

function addEventListener(dom, type, listener, options) {
  //@todo proper type check for options: EventListenerOptions | boolean (TS for some reason gives error on passive parameter)
  //console.log(type, dom);
  dom.addEventListener(type, listener, options || false);
  return new _Disposer__WEBPACK_IMPORTED_MODULE_0__.Disposer(function () {
    dom.removeEventListener(type, listener, options || false);
  });
}
/**
 * Finds and returns an element reference using following logic:
 * * If we pass in an element instance, we just return it back.
 * * If we pass in a string, the function looks for an element with such id.
 * * If no element with such id is found, we grab the first element with a tag name like this.
 *
 * @ignore Exclude from docs
 * @param el  Element definition (reference, or id, or tag name)
 * @return Element reference
 * @todo Review this function as it seems pretty fuzzy and hacky
 */

function getElement(el) {
  if (_Type__WEBPACK_IMPORTED_MODULE_5__.isString(el)) {
    var e = document.getElementById(el);

    if (e == null) {
      e = document.getElementsByClassName(el)[0];
    }

    if (e instanceof HTMLElement) {
      return e;
    }
  } else if (el instanceof HTMLElement) {
    return el;
  }
}
/**
 * Adds a class name to an HTML or SVG element.
 *
 * @ignore Exclude from docs
 * @param element    Element
 * @param className  Class name to add
 */

function addClass(element, className) {
  if (!element) {
    return;
  }

  if (element.classList) {
    var classes = className.split(" ");
    _Array__WEBPACK_IMPORTED_MODULE_4__.each(classes, function (name) {
      element.classList.add(name);
    });
  } else {
    var currentClassName = element.getAttribute("class");

    if (currentClassName) {
      element.setAttribute("class", currentClassName.split(" ").filter(function (item) {
        return item !== className;
      }).join(" ") + " " + className);
    } else {
      element.setAttribute("class", className);
    } //element.className = element.className.replace(new RegExp("^" + className + "| " + className), "") + " " + className;

  }
}
/**
 * Removes a class name from an HTML or SVG element.
 *
 * @ignore Exclude from docs
 * @param element    Element
 * @param className  Class name to add
 */

function removeClass(element, className) {
  if (!element) {
    return;
  }

  if (element.classList) {
    element.classList.remove(className);
  } else {
    var currentClassName = element.getAttribute("class");

    if (currentClassName) {
      element.setAttribute("class", currentClassName.split(" ").filter(function (item) {
        return item !== className;
      }).join(" "));
    } //element.className = element.className.replace(new RegExp("^" + className + "| " + className), "");

  }
}
/**
 * Sets style property on DOM element.
 *
 * @ignore Exclude from docs
 * @todo Still needed?
 */

function setStyle(element, property, value) {
  element.style[property] = value;
}
/**
 * Gets the computed style value for an element.
 *
 * @ignore Exclude from docs
 */

function getComputedStyle(element, property) {
  if (element.currentStyle) {
    return element.currentStyle[property];
  }

  return document.defaultView.getComputedStyle(element, null).getPropertyValue(property);
}
/**
 * Removes focus from any element by shifting focus to body.
 *
 * @ignore Exclude from docs
 */

function blur() {
  if (document.activeElement && document.activeElement != document.body) {
    if (document.activeElement.blur) {
      document.activeElement.blur();
    } else {
      var input = document.createElement("button");
      input.style.position = "fixed";
      input.style.top = "0px";
      input.style.left = "-10000px";
      document.body.appendChild(input);
      input.focus();
      input.blur();
      document.body.removeChild(input);
    }
  }
}
/**
 * Tries to focus the element.
 *
 * @ignore Exlude from docs
 * @param element  Element to focus
 */

function focus(element) {
  if (element instanceof HTMLElement) {
    element.focus();
  } else {
    var input = document.createElement("input");
    var fo = document.createElementNS(SVGNS, "foreignObject");
    fo.appendChild(input);
    element.appendChild(fo);
    input.focus();
    input.disabled = true;
    fo.remove();
  }
  /*if ((<any>element).focus != undefined) {
      (<any>element).focus();
  }
  else if (element instanceof SVGSVGElement) {
      // Not implemented
      // @todo implement focus fallback
  }*/

}
/**
 * Returns markup for the element including the element tag itself.
 * SVG elements do not support `outerHTML` so this functions applies of
 * a workaround which creates a new temporary wrapper, clones element and uses
 * wrapper's `innerHTML`.
 *
 * @ignore Exclude from docs
 * @param element  Element to get full markup for
 * @return Markup
 * @deprecated Not in use anywhere
 */

function outerHTML(element) {
  if (element.outerHTML) {
    return element.outerHTML;
  } else {
    var twrap = document.createElement("div");
    var tnode = element.cloneNode(true);
    twrap.appendChild(tnode);
    var content = twrap.innerHTML;
    return content;
  }
}
/**
 * Checks if element is a valid DOM node.
 *
 * @ignore Exclude from docs
 * @param el  Element
 * @return `true` if element is a valid DOM node
 */

function isElement(el) {
  return el instanceof Object && el && el.nodeType === 1;
}
/**
 * Checks of element `a` contains element `b`.
 *
 * @param a  Aleged ascendant
 * @param b  Aleged descendant
 * @return Contains?
 */

function contains(a, b) {
  var cursor = b;

  while (true) {
    if (a === cursor) {
      return true;
    } else if (cursor.parentNode == null) {
      // TODO better ShadowRoot detection
      if (cursor.host == null) {
        return false;
      } else {
        cursor = cursor.host;
      }
    } else {
      cursor = cursor.parentNode;
    }
  }
}
/**
 * Returns the shadow root of the element or null
 *
 * @param a  Node
 * @return Root
 */

function getShadowRoot(a) {
  var cursor = a;

  while (true) {
    if (cursor.parentNode == null) {
      // TODO better ShadowRoot detection
      if (cursor.host != null) {
        return cursor;
      } else {
        return null;
      }
    } else {
      cursor = cursor.parentNode;
    }
  }
}
/**
 * Returns the root of the element (either the Document or the ShadowRoot)
 *
 * @param a  Node
 * @return Root
 */

function getRoot(a) {
  // TODO replace with Node.prototype.getRootNode
  var owner = a.ownerDocument;
  var cursor = a;

  while (true) {
    if (cursor.parentNode == null) {
      // If the cursor is the document, or it is a ShadowRoot
      // TODO better ShadowRoot detection
      if (cursor === owner || cursor.host != null) {
        return cursor;
      } else {
        return null;
      }
    } else {
      cursor = cursor.parentNode;
    }
  }
}
/**
 * Gets the true target of the Event.
 *
 * This is needed to make events work with the shadow DOM.
 *
 * @param event  Event
 * @return EventTarget
 */

function eventTarget(event) {
  if (typeof event.composedPath === "function") {
    return event.composedPath()[0];
  } else {
    return event.target;
  }
}
/**
 * Copies attributes from one element to another.
 *
 * @ignore Exclude from docs
 * @param source  Element to copy attributes from
 * @param target  Element to copy attributes to
 */

function copyAttributes(source, target) {
  _Array__WEBPACK_IMPORTED_MODULE_4__.each(source.attributes, function (attr) {
    // TODO what if it's null ?
    if (attr.value != null) {
      target.setAttribute(attr.name, attr.value);
    }
  });
}
/**
 * [fixPixelPerfect description]
 *
 * @ignore Exclude from docs
 * @todo Description
 * @param el  Element
 */

function fixPixelPerfect(el) {
  (0,_AsyncPending__WEBPACK_IMPORTED_MODULE_1__.readFrame)(function () {
    // sometimes IE doesn't like this
    // TODO figure out a way to remove this
    try {
      var rect = el.getBoundingClientRect();
      var left_1 = rect.left - Math.round(rect.left);
      var top_1 = rect.top - Math.round(rect.top);

      if (left_1 !== 0) {
        (0,_AsyncPending__WEBPACK_IMPORTED_MODULE_1__.writeFrame)(function () {
          el.style.left = left_1 + "px";
        });
      }

      if (top_1 !== 0) {
        (0,_AsyncPending__WEBPACK_IMPORTED_MODULE_1__.writeFrame)(function () {
          el.style.top = top_1 + "px";
        });
      }
    } catch (e) {}
  });
}
/**
 * [rootStylesheet description]
 *
 * @ignore Exclude from docs
 * @todo Description
 */

var rootStylesheet;
/**
 * [getStylesheet description]
 *
 * @ignore Exclude from docs
 * @todo Description
 * @return [description]
 */

function getStylesheet(element) {
  if (element == null) {
    if (!_Type__WEBPACK_IMPORTED_MODULE_5__.hasValue(rootStylesheet)) {
      // TODO use createElementNS ?
      var e = document.createElement("style");
      e.type = "text/css";

      if (_Options__WEBPACK_IMPORTED_MODULE_2__.options.nonce != "") {
        e.setAttribute("nonce", _Options__WEBPACK_IMPORTED_MODULE_2__.options.nonce);
      }

      document.head.appendChild(e);
      rootStylesheet = e.sheet;
    }

    return rootStylesheet;
  } else {
    // TODO use createElementNS ?
    var e = document.createElement("style");
    e.type = "text/css";

    if (_Options__WEBPACK_IMPORTED_MODULE_2__.options.nonce != "") {
      e.setAttribute("nonce", _Options__WEBPACK_IMPORTED_MODULE_2__.options.nonce);
    }

    element.appendChild(e);
    return e.sheet;
  }
}
/**
 * [makeStylesheet description]
 *
 * @ignore Exclude from docs
 * @todo Description
 * @param selector  [description]
 * @return [description]
 */


function appendStylesheet(root, selector) {
  var index = root.cssRules.length;
  root.insertRule(selector + "{}", index);
  return root.cssRules[index];
}
/**
 * Defines a class for a CSS rule.
 *
 * Can be used to dynamically add CSS to the document.
 */


var StyleRule =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_6__.__extends)(StyleRule, _super);
  /**
   * Constructor.
   *
   * @param selector  CSS selector
   * @param styles    An object of style attribute - value pairs
   */


  function StyleRule(element, selector, styles) {
    var _this = this;

    var root = getStylesheet(element); // TODO test this

    _this = _super.call(this, function () {
      // TODO a bit hacky
      var index = _Array__WEBPACK_IMPORTED_MODULE_4__.indexOf(root.cssRules, _this._rule);

      if (index === -1) {
        throw new Error("Could not dispose StyleRule");
      } else {
        // TODO if it's empty remove it from the DOM ?
        root.deleteRule(index);
      }
    }) || this;
    _this._rule = appendStylesheet(root, selector);
    _Object__WEBPACK_IMPORTED_MODULE_3__.each(styles, function (key, value) {
      _this.setStyle(key, value);
    });
    return _this;
  }

  Object.defineProperty(StyleRule.prototype, "selector", {
    /**
     * @return CSS selector
     */
    get: function get() {
      return this._rule.selectorText;
    },

    /**
     * A CSS selector text.
     *
     * E.g.: `.myClass p`
     *
     * @param selector  CSS selector
     */
    set: function set(selector) {
      this._rule.selectorText = selector;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Sets the same style properties with browser-specific prefixes.
   *
   * @param name   Attribute name
   * @param value  Attribute value
   */

  StyleRule.prototype._setVendorPrefixName = function (name, value) {
    var style = this._rule.style;
    style.setProperty("-webkit-" + name, value, "");
    style.setProperty("-moz-" + name, value, "");
    style.setProperty("-ms-" + name, value, "");
    style.setProperty("-o-" + name, value, "");
    style.setProperty(name, value, "");
  };
  /**
   * Sets a value for specific style attribute.
   *
   * @param name   Attribute
   * @param value  Value
   */


  StyleRule.prototype.setStyle = function (name, value) {
    if (name === "transition") {
      this._setVendorPrefixName(name, value);
    } else {
      this._rule.style.setProperty(name, value, "");
    }
  };

  return StyleRule;
}(_Disposer__WEBPACK_IMPORTED_MODULE_0__.Disposer);


/**
 * An internal counter for unique style ids.
 *
 * @ignore Exclude from docs
 */

var styleId = 0;
/**
 * @ignore Exclude from docs
 * @todo Description
 */

var StyleClass =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_6__.__extends)(StyleClass, _super);
  /**
   * Constructor.
   *
   * @param styles  An object of style attribute - value pairs
   * @param name    Class name
   */


  function StyleClass(element, styles, name) {
    var _this = this;

    var className = !_Type__WEBPACK_IMPORTED_MODULE_5__.hasValue(name) // TODO generate the classname randomly
    ? "__style_" + ++styleId + "__" : name;
    _this = _super.call(this, element, "." + className, styles) || this;
    _this._className = className;
    return _this;
  }

  Object.defineProperty(StyleClass.prototype, "className", {
    /**
     * @return Class name
     */
    get: function get() {
      return this._className;
    },

    /**
     * Class name.
     *
     * @param name  Class name
     */
    set: function set(name) {
      this._className = name;
      this.selector = "." + name;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Converts the whole class to
   * @ignore Exclude from docs
   */

  StyleClass.prototype.toString = function () {
    return this._className;
  };

  return StyleClass;
}(StyleRule);


function ready(f) {
  if (document.readyState !== "loading") {
    f();
  } else {
    var listener_1 = function listener_1() {
      if (document.readyState !== "loading") {
        document.removeEventListener("readystatechange", listener_1);
        f();
      }
    };

    document.addEventListener("readystatechange", listener_1);
  }
}
/**
 * Returns a font fmaily name for the element (directly set or
 * computed/inherited).
 *
 * @ignore Exclude from docs
 * @param element  Element
 * @return Font family
 */

function findFont(element) {
  // Check if element has styles set
  var font = getComputedStyle(element, "font-family");

  if (!font) {
    // Completely transparent. Look for a parent
    var parent_1 = element.parentElement || element.parentNode;

    if (parent_1) {
      return findFont(parent_1);
    } else {
      return undefined;
    }
  } else {
    return font;
  }
}
/**
 * Returns a font fmaily name for the element (directly set or
 * computed/inherited).
 *
 * @ignore Exclude from docs
 * @param element  Element
 * @return Font family
 */

function findFontSize(element) {
  // Check if element has styles set
  var font = getComputedStyle(element, "font-size");

  if (!font) {
    // Completely transparent. Look for a parent
    var parent_2 = element.parentElement || element.parentNode;

    if (parent_2) {
      return findFontSize(parent_2);
    } else {
      return undefined;
    }
  } else {
    return font;
  }
}
/**
 * Checks whether element is not visible, whether directly or via its
 * ascendants.
 *
 * @param   element  Target element
 * @return           Hidden?
 */

function isHidden(element) {
  return element.offsetParent === null;
}
/**
 * Checks wthether element is in the current viewport.
 *
 * @since 2.5.5
 * @param   el Element
 * @return     Within viewport?
 */

function isElementInViewport(el, viewportTarget) {
  // Get position data of the element
  var rect = el.getBoundingClientRect(); // Convert to array

  var targets = _Type__WEBPACK_IMPORTED_MODULE_5__.isArray(viewportTarget) ? viewportTarget : viewportTarget ? [viewportTarget] : []; // Should we measure against specific viewport element?

  if (targets.length) {
    for (var i = 0; i < targets.length; i++) {
      var target = targets[i]; // Check if viewport itself is visible

      if (!isElementInViewport(target)) {
        return false;
      } // Check if element is visible within the viewport


      var viewportRect = target.getBoundingClientRect();

      if (rect.top >= 0 && rect.left >= 0 && rect.top <= viewportRect.top + viewportRect.height && rect.left <= viewportRect.left + viewportRect.width) {
        return true;
      }
    }

    return false;
  }

  return rect.top >= 0 && rect.left >= 0 && rect.top <= (window.innerHeight || document.documentElement.clientHeight) && rect.left <= (window.innerWidth || document.documentElement.clientWidth);
}

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Dictionary.js":
/*!*****************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/utils/Dictionary.js ***!
  \*****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Dictionary": () => (/* binding */ Dictionary),
/* harmony export */   "DictionaryDisposer": () => (/* binding */ DictionaryDisposer),
/* harmony export */   "DictionaryTemplate": () => (/* binding */ DictionaryTemplate)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Disposer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Disposer */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Disposer.js");
/* harmony import */ var _EventDispatcher__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./EventDispatcher */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/EventDispatcher.js");
/* harmony import */ var _Object__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Object */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Object.js");
/* harmony import */ var _Iterator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Iterator */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Iterator.js");
/* harmony import */ var _String__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./String */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/String.js");

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */






/**
 * A disposable dictionary, which when disposed itself will call `dispose()`
 * method on all its items.
 */

var DictionaryDisposer =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__extends)(DictionaryDisposer, _super);

  function DictionaryDisposer(dict) {
    var _this = this;

    var disposer = dict.events.on("removed", function (x) {
      x.oldValue.dispose();
    }, undefined, false);
    _this = _super.call(this, function () {
      disposer.dispose(); // TODO clear the dictionary ?

      _Iterator__WEBPACK_IMPORTED_MODULE_3__.each(dict.iterator(), function (a) {
        var v = a[1];
        v.dispose();
      });
    }) || this;
    return _this;
  }

  return DictionaryDisposer;
}(_Disposer__WEBPACK_IMPORTED_MODULE_0__.Disposer);


/**
 * A Dictionary is collection where values of some type can be mapped to
 * string keys.
 *
 * You might call it an "associative list" or "associative array".
 */

var Dictionary =
/** @class */
function () {
  /**
   * Constructor
   */
  function Dictionary() {
    /**
     * Event dispatcher.
     */
    this.events = new _EventDispatcher__WEBPACK_IMPORTED_MODULE_1__.EventDispatcher();
    this._dictionary = {};
  }
  /**
   * Returns `true` if key exists in Dictionary.
   *
   * @param key  The key to search for
   * @return `true` if key exists, `false` if it doesn't
   */


  Dictionary.prototype.hasKey = function (key) {
    return _Object__WEBPACK_IMPORTED_MODULE_2__.hasKey(this._dictionary, key);
  };
  /**
   * Returns the value for a specific key.
   *
   * @param key  The key to search for
   * @return Value for the key, or `undefined` if it doesn't exist
   */


  Dictionary.prototype.getKey = function (key) {
    return this._dictionary[key];
  };
  /**
   * Inserts value at specific key.
   *
   * Will thrown an exception if the key already exists in the dictionary.
   *
   * @param key    Key
   * @param value  Value
   */


  Dictionary.prototype.insertKey = function (key, value) {
    if (_Object__WEBPACK_IMPORTED_MODULE_2__.hasKey(this._dictionary, key)) {
      throw new Error("Key " + key + " already exists in dictionary");
    } else {
      this._dictionary[key] = value;

      if (this.events.isEnabled("insertKey")) {
        this.events.dispatchImmediately("insertKey", {
          type: "insertKey",
          target: this,
          key: key,
          newValue: value
        });
      }
    }
  };
  /**
   * Adds or updates key/value into dictionary.
   *
   * If the key already exists, the old value will be overwritten.
   *
   * If the new value is exactly the same as the old value (using ===), it won't do anything.
   *
   * @param key    Key
   * @param value  Value
   */


  Dictionary.prototype.setKey = function (key, value) {
    if (_Object__WEBPACK_IMPORTED_MODULE_2__.hasKey(this._dictionary, key)) {
      var oldValue = this._dictionary[key];

      if (oldValue !== value) {
        this._dictionary[key] = value;

        if (this.events.isEnabled("setKey")) {
          this.events.dispatchImmediately("setKey", {
            type: "setKey",
            target: this,
            key: key,
            oldValue: oldValue,
            newValue: value
          });
        }

        if (this.events.isEnabled("removed")) {
          this.events.dispatchImmediately("removed", {
            type: "removed",
            target: this,
            oldValue: oldValue
          });
        }
      }
    } else {
      this._dictionary[key] = value;

      if (this.events.isEnabled("insertKey")) {
        this.events.dispatchImmediately("insertKey", {
          type: "insertKey",
          target: this,
          key: key,
          newValue: value
        });
      }
    }
  };
  /**
   * Updates the value at specific `key` using custom function.
   *
   * Passes in current value into the function, and uses its output as a new
   * value.
   *
   * If the new value is exactly the same as the old value (using ===), it won't do anything.
   *
   * @ignore Exclude from docs
   * @param key  Key
   * @param fn   Function to transform the value
   */


  Dictionary.prototype.updateKey = function (key, fn) {
    if (_Object__WEBPACK_IMPORTED_MODULE_2__.hasKey(this._dictionary, key)) {
      var oldValue = this._dictionary[key];
      var newValue = fn(oldValue);

      if (oldValue !== newValue) {
        this._dictionary[key] = newValue;

        if (this.events.isEnabled("setKey")) {
          this.events.dispatchImmediately("setKey", {
            type: "setKey",
            target: this,
            key: key,
            oldValue: oldValue,
            newValue: newValue
          });
        }

        if (this.events.isEnabled("removed")) {
          this.events.dispatchImmediately("removed", {
            type: "removed",
            target: this,
            oldValue: oldValue
          });
        }
      }
    } else {
      throw new Error("Key " + key + " doesn't exist in dictionary");
    }
  };
  /**
   * Removes value at specific `key` from dictionary.
   *
   * @param key  Key to remove
   */


  Dictionary.prototype.removeKey = function (key) {
    if (_Object__WEBPACK_IMPORTED_MODULE_2__.hasKey(this._dictionary, key)) {
      var oldValue = this._dictionary[key];
      delete this._dictionary[key];

      if (this.events.isEnabled("removeKey")) {
        this.events.dispatchImmediately("removeKey", {
          type: "removeKey",
          target: this,
          key: key,
          oldValue: oldValue
        });
      }

      if (this.events.isEnabled("removed")) {
        this.events.dispatchImmediately("removed", {
          type: "removed",
          target: this,
          oldValue: oldValue
        });
      }
    }
  };
  /**
   * [insertKeyIfEmpty description]
   *
   * @ignore Exclude from docs
   * @todo description
   * @param key      [description]
   * @param ifEmpty  [description]
   * @return [description]
   */


  Dictionary.prototype.insertKeyIfEmpty = function (key, ifEmpty) {
    if (!this.hasKey(key)) {
      this.insertKey(key, ifEmpty());
    }

    return this.getKey(key);
  };
  /**
   * Removes all items from the dictionary.
   */


  Dictionary.prototype.clear = function () {
    var _this = this; // TODO dispatch this after clear


    if (this.events.isEnabled("removed")) {
      _Object__WEBPACK_IMPORTED_MODULE_2__.each(this._dictionary, function (key, value) {
        _this.events.dispatchImmediately("removed", {
          type: "removed",
          target: _this,
          oldValue: value
        });
      });
    }

    this._dictionary = {};

    if (this.events.isEnabled("cleared")) {
      this.events.dispatchImmediately("cleared", {
        type: "cleared",
        target: this
      });
    }
  };
  /**
   * Copies items from another Dictionary.
   *
   * @param source  A Dictionary to copy items from
   */


  Dictionary.prototype.copyFrom = function (source) {
    var _this = this;

    _Iterator__WEBPACK_IMPORTED_MODULE_3__.each(source.iterator(), function (a) {
      // TODO fix this type cast
      _this.setKey(a[0], a[1]);
    });
  };
  /**
   * Returns an interator that can be used to iterate through all items in
   * the dictionary.
   *
   * @return Iterator
   */


  Dictionary.prototype.iterator = function () {
    // @todo fix this type after the Iterator bug is fixed
    // https://github.com/Microsoft/TypeScript/issues/16730
    return _Object__WEBPACK_IMPORTED_MODULE_2__.entries(this._dictionary);
  };
  /**
   * Returns an ES6 iterator for the keys/values of the dictionary.
   */


  Dictionary.prototype[Symbol.iterator] = function () {
    var _a, _b, _i, key;

    return (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__generator)(this, function (_c) {
      switch (_c.label) {
        case 0:
          _a = [];

          for (_b in this._dictionary) {
            _a.push(_b);
          }

          _i = 0;
          _c.label = 1;

        case 1:
          if (!(_i < _a.length)) return [3
          /*break*/
          , 4];
          key = _a[_i];
          if (!_Object__WEBPACK_IMPORTED_MODULE_2__.hasKey(this._dictionary, key)) return [3
          /*break*/
          , 3];
          return [4
          /*yield*/
          , [key, this._dictionary[key]]];

        case 2:
          _c.sent();

          _c.label = 3;

        case 3:
          _i++;
          return [3
          /*break*/
          , 1];

        case 4:
          return [2
          /*return*/
          ];
      }
    });
  };
  /**
   * Calls `f` for each key/value in the dictionary.
   */


  Dictionary.prototype.each = function (f) {
    _Iterator__WEBPACK_IMPORTED_MODULE_3__.each(this.iterator(), function (_a) {
      var _b = (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__read)(_a, 2),
          key = _b[0],
          value = _b[1];

      return f(key, value);
    });
  };
  /**
   * Returns an iterator that can be used to iterate through all items in
   * the dictionary, ordered by key.
   *
   * @ignore Exclude from docs
   * @return Iterator
   */


  Dictionary.prototype.sortedIterator = function () {
    return _Iterator__WEBPACK_IMPORTED_MODULE_3__.sort(this.iterator(), function (x, y) {
      return _String__WEBPACK_IMPORTED_MODULE_4__.order(x[0], y[0]);
    });
  };

  return Dictionary;
}();


/**
 * A version of a [[Dictionary]] that has a "template".
 *
 * A template is an instance of an object, that can be used to create new
 * elements in the list without actually needing to create instances for those.
 *
 * When new element is created in the list, e.g. by calling its `create()`
 * method, an exact copy of the element is created (including properties and
 * other attributes), inserted into the list and returned.
 */

var DictionaryTemplate =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__extends)(DictionaryTemplate, _super);
  /**
   * Constructor
   *
   * @param t Template object
   */


  function DictionaryTemplate(t) {
    var _this = _super.call(this) || this;

    _this.template = t;
    return _this;
  }

  Object.defineProperty(DictionaryTemplate.prototype, "template", {
    /**
     * @return Template object
     */
    get: function get() {
      return this._template;
    },

    /**
     * A "template" object to copy all properties from when creating new list
     * items.
     *
     * @param v  Template object
     */
    set: function set(v) {
      v.isTemplate = true;
      this._template = v;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Copies all elements from other dictionary.
   *
   * @param source  Source dictionary
   */

  DictionaryTemplate.prototype.copyFrom = function (source) {
    var _this = this;

    _Iterator__WEBPACK_IMPORTED_MODULE_3__.each(source.iterator(), function (a) {
      // TODO fix this type cast
      // TODO why does this need to clone ?
      _this.setKey(a[0], a[1].clone());
    });
  };
  /**
   * Instantiates a new object of the specified type, adds it to specified
   * `key` in the dictionary, and returns it.
   *
   * @param make  Item type to use. Will use the default type for the dictionary if not specified.
   * @return      Newly created item
   */


  DictionaryTemplate.prototype.create = function (key) {
    var _this = this;

    return this.insertKeyIfEmpty(key, function () {
      return _this.template.clone();
    });
  };

  return DictionaryTemplate;
}(Dictionary);



/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Disposer.js":
/*!***************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/utils/Disposer.js ***!
  \***************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "CounterDisposer": () => (/* binding */ CounterDisposer),
/* harmony export */   "Disposer": () => (/* binding */ Disposer),
/* harmony export */   "MultiDisposer": () => (/* binding */ MultiDisposer),
/* harmony export */   "MutableValueDisposer": () => (/* binding */ MutableValueDisposer)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Array */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Array.js");
/* harmony import */ var _Type__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */



/**
 * A base class for disposable objects.
 *
 * @ignore Exclude from docs
 */

var Disposer =
/** @class */
function () {
  /**
   * Constructor.
   *
   * @param dispose  Function that disposes object
   */
  function Disposer(dispose) {
    this._disposed = false;
    this._dispose = dispose;
  }
  /**
   * Checks if object is disposed.
   *
   * @return Disposed?
   */


  Disposer.prototype.isDisposed = function () {
    return this._disposed;
  };
  /**
   * Disposes the object.
   */


  Disposer.prototype.dispose = function () {
    if (!this._disposed) {
      this._disposed = true;

      this._dispose();
    }
  };

  return Disposer;
}();


/**
 * A collection of related disposers that can be disposed in one go.
 *
 * @ignore Exclude from docs
 */

var MultiDisposer =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(MultiDisposer, _super);

  function MultiDisposer(disposers) {
    return _super.call(this, function () {
      _Array__WEBPACK_IMPORTED_MODULE_0__.each(disposers, function (x) {
        x.dispose();
      });
    }) || this;
  }

  return MultiDisposer;
}(Disposer);


/**
 * A special kind of Disposer that has attached value set.
 *
 * If a new value is set using `set()` method, the old disposer value is
 * disposed.
 *
 * @ignore Exclude from docs
 * @todo Description
 */

var MutableValueDisposer =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(MutableValueDisposer, _super);
  /**
   * Constructor.
   */


  function MutableValueDisposer() {
    var _this = _super.call(this, function () {
      if (_Type__WEBPACK_IMPORTED_MODULE_1__.hasValue(_this._disposer)) {
        _this._disposer.dispose();

        _this._disposer = undefined;
      }
    }) || this;

    return _this;
  }
  /**
   * Returns current value.
   *
   * @return Value
   */


  MutableValueDisposer.prototype.get = function () {
    return this._value;
  };
  /**
   * Sets value and disposes previous disposer if it was set.
   *
   * @param value     New value
   * @param disposer  Disposer
   */


  MutableValueDisposer.prototype.set = function (value, disposer) {
    if (_Type__WEBPACK_IMPORTED_MODULE_1__.hasValue(this._disposer)) {
      this._disposer.dispose();
    }

    this._disposer = disposer;
    this._value = value;
  };
  /**
   * Resets the disposer value.
   */


  MutableValueDisposer.prototype.reset = function () {
    this.set(undefined, undefined);
  };

  return MutableValueDisposer;
}(Disposer);


/**
 * @ignore Exclude from docs
 * @todo Description
 */

var CounterDisposer =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(CounterDisposer, _super);

  function CounterDisposer() {
    var _this = _super !== null && _super.apply(this, arguments) || this;
    /**
     * [_counter description]
     *
     * @todo Description
     */


    _this._counter = 0;
    return _this;
  }
  /**
   * [increment description]
   *
   * @todo Description
   */


  CounterDisposer.prototype.increment = function () {
    var _this = this; // TODO throw an error if it is disposed


    ++this._counter; // TODO make this more efficient

    return new Disposer(function () {
      --_this._counter;

      if (_this._counter === 0) {
        _this.dispose();
      }
    });
  };

  return CounterDisposer;
}(Disposer);



/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Ease.js":
/*!***********************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/utils/Ease.js ***!
  \***********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "bounceIn": () => (/* binding */ bounceIn),
/* harmony export */   "bounceInOut": () => (/* binding */ bounceInOut),
/* harmony export */   "bounceOut": () => (/* binding */ bounceOut),
/* harmony export */   "circleIn": () => (/* binding */ circleIn),
/* harmony export */   "circleInOut": () => (/* binding */ circleInOut),
/* harmony export */   "circleOut": () => (/* binding */ circleOut),
/* harmony export */   "cubicIn": () => (/* binding */ cubicIn),
/* harmony export */   "cubicInOut": () => (/* binding */ cubicInOut),
/* harmony export */   "cubicOut": () => (/* binding */ cubicOut),
/* harmony export */   "elasticIn": () => (/* binding */ elasticIn),
/* harmony export */   "elasticInOut": () => (/* binding */ elasticInOut),
/* harmony export */   "elasticOut": () => (/* binding */ elasticOut),
/* harmony export */   "expIn": () => (/* binding */ expIn),
/* harmony export */   "expInOut": () => (/* binding */ expInOut),
/* harmony export */   "expOut": () => (/* binding */ expOut),
/* harmony export */   "linear": () => (/* binding */ linear),
/* harmony export */   "polyIn": () => (/* binding */ polyIn),
/* harmony export */   "polyIn3": () => (/* binding */ polyIn3),
/* harmony export */   "polyInOut": () => (/* binding */ polyInOut),
/* harmony export */   "polyInOut3": () => (/* binding */ polyInOut3),
/* harmony export */   "polyOut": () => (/* binding */ polyOut),
/* harmony export */   "polyOut3": () => (/* binding */ polyOut3),
/* harmony export */   "quadIn": () => (/* binding */ quadIn),
/* harmony export */   "quadInOut": () => (/* binding */ quadInOut),
/* harmony export */   "quadOut": () => (/* binding */ quadOut),
/* harmony export */   "sinIn": () => (/* binding */ sinIn),
/* harmony export */   "sinInOut": () => (/* binding */ sinInOut),
/* harmony export */   "sinOut": () => (/* binding */ sinOut)
/* harmony export */ });
/* harmony import */ var _utils_Math__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/**
 * A collection of easing functions
 *
 * Parts of this collection are taken from D3.js library (https://d3js.org/)
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */


/**
 * The functions below are from D3.js library (https://d3js.org/)
 *
 * ----------------------------------------------------------------------------
 * Copyright 2017 Mike Bostock
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * 1. Redistributions of source code must retain the above copyright notice,
 *    this list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form must reproduce the above copyright notice,
 *    this list of conditions and the following disclaimer in the documentation
 *    and/or other materials provided with the distribution.
 *
 * 3. Neither the name of the copyright holder nor the names of its
 *    contributors may be used to endorse or promote products derived from this
 *    software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 * ----------------------------------------------------------------------------
 * @hidden
 */

/**
 * ============================================================================
 * LINEAR FUNCTIONS
 * ============================================================================
 * @hidden
 */

/**
 * Easing function: "linear".
 */

function linear(t) {
  return +t;
}
_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses["ease.linear"] = linear;
/**
 * Easing function: "quadIn".
 */

function quadIn(t) {
  return t * t;
}
_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses["ease.quadIn"] = quadIn;
/**
 * Easing function: "quadOut".
 */

function quadOut(t) {
  return t * (2 - t);
}
_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses["ease.quadOut"] = quadOut;
/**
 * Easing function: "quadInOut".
 */

function quadInOut(t) {
  t *= 2;
  return (t <= 1 ? t * t : --t * (2 - t) + 1) / 2;
}
_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses["ease.quadInOut"] = quadInOut;
/**
 * Easing function: "polyIn".
 */

function polyIn(t, e) {
  return Math.pow(t, e);
}
_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses["ease.polyIn"] = polyIn;
/**
 * Easing function: "polyOut".
 */

function polyOut(t, e) {
  return 1 - Math.pow(1 - t, e);
}
_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses["ease.polyOut"] = polyOut;
/**
 * Easing function: "polyInOut".
 */

function polyInOut(t, e) {
  t *= 2;
  return (t <= 1 ? Math.pow(t, e) : 2 - Math.pow(2 - t, e)) / 2;
}
_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses["ease.polyInOut"] = polyInOut;
/**
 * Easing function: "polyIn3".
 */

function polyIn3(t) {
  return polyIn(t, 3);
}
_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses["ease.polyIn3"] = polyIn3;
/**
 * Easing function: "polyOut3".
 */

function polyOut3(t) {
  return polyOut(t, 3);
}
_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses["ease.polyOut3"] = polyOut3;
/**
 * Easing function: "polyInOut3".
 */

function polyInOut3(t) {
  return polyInOut(t, 3);
}
_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses["ease.polyInOut3"] = polyInOut3;
/**
 * ============================================================================
 * EXPONENTIAL FUNCTIONS
 * ============================================================================
 * @hidden
 */

/**
 * Easing function: "expIn".
 */

function expIn(t) {
  return Math.pow(2, 10 * t - 10);
}
_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses["ease.expIn"] = expIn;
/**
 * Easing function: "expOut".
 */

function expOut(t) {
  return 1 - Math.pow(2, -10 * t);
}
_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses["ease.expOut"] = expOut;
/**
 * Easing function: "expInOut".
 */

function expInOut(t) {
  t *= 2;
  return (t <= 1 ? Math.pow(2, 10 * t - 10) : 2 - Math.pow(2, 10 - 10 * t)) / 2;
}
_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses["ease.expInOut"] = expInOut;
/**
 * ============================================================================
 * SINE FUNCTIONS
 * ============================================================================
 * @hidden
 */

/**
 * Easing function: "sinIn".
 */

function sinIn(t) {
  return 1 - Math.cos(t * _utils_Math__WEBPACK_IMPORTED_MODULE_0__.HALFPI);
}
_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses["ease.sinIn"] = sinIn;
/**
 * Easing function: "sinOut".
 */

function sinOut(t) {
  return Math.sin(t * _utils_Math__WEBPACK_IMPORTED_MODULE_0__.HALFPI);
}
_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses["ease.sinOut"] = sinOut;
/**
 * Easing function: "sinInOut".
 */

function sinInOut(t) {
  return (1 - Math.cos(_utils_Math__WEBPACK_IMPORTED_MODULE_0__.PI * t)) / 2;
}
_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses["ease.sinInOut"] = sinInOut;
/**
 * ============================================================================
 * CUBIC FUNCTIONS
 * ============================================================================
 * @hidden
 */

/**
 * Easing function: "cubicIn".
 */

function cubicIn(t) {
  return t * t * t;
}
_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses["ease.cubicIn"] = cubicIn;
/**
 * Easing function: "cubicOut".
 */

function cubicOut(t) {
  return --t * t * t + 1;
}
_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses["ease.cubicOut"] = cubicOut;
/**
 * Easing function: "cubicInOut".
 */

function cubicInOut(t) {
  t *= 2;
  return (t <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2;
}
_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses["ease.cubicInOut"] = cubicInOut;
/**
 * ============================================================================
 * CIRCLE FUNCTIONS
 * ============================================================================
 * @hidden
 */

/**
 * Easing function: "circleIn".
 */

function circleIn(t) {
  return 1 - Math.sqrt(1 - t * t);
}
_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses["ease.circleIn"] = circleIn;
/**
 * Easing function: "circleOut".
 */

function circleOut(t) {
  return Math.sqrt(1 - --t * t);
}
_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses["ease.circleOut"] = circleOut;
/**
 * Easing function: "circleInOut".
 */

function circleInOut(t) {
  t *= 2;
  return (t <= 1 ? 1 - Math.sqrt(1 - t * t) : Math.sqrt(1 - (t -= 2) * t) + 1) / 2;
}
_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses["ease.circleInOut"] = circleInOut;
/**
 * ============================================================================
 * BOUNCE FUNCTIONS
 * ============================================================================
 * @hidden
 */

var b1 = 4 / 11,
    b2 = 6 / 11,
    b3 = 8 / 11,
    b4 = 3 / 4,
    b5 = 9 / 11,
    b6 = 10 / 11,
    b7 = 15 / 16,
    b8 = 21 / 22,
    b9 = 63 / 64,
    b0 = 1 / b1 / b1;
/**
 * Easing function: "bounceIn".
 */

function bounceIn(t) {
  return 1 - bounceOut(1 - t);
}
_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses["ease.bounceIn"] = bounceIn;
/**
 * Easing function: "bounceOut".
 */

function bounceOut(t) {
  t = +t;
  return t < b1 ? b0 * t * t : t < b3 ? b0 * (t -= b2) * t + b4 : t < b6 ? b0 * (t -= b5) * t + b7 : b0 * (t -= b8) * t + b9;
}
_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses["ease.bounceOut"] = bounceOut;
/**
 * Easing function: "bounceInOut".
 */

function bounceInOut(t) {
  t *= 2;
  return (t <= 1 ? 1 - bounceOut(1 - t) : bounceOut(t - 1) + 1) / 2;
}
_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses["ease.bounceInOut"] = bounceInOut;
/**
 * ============================================================================
 * ELASTIC FUNCTIONS
 * ============================================================================
 * @hidden
 */

var tau = 2 * Math.PI;
var amplitude = 1;
var period = 0.3 / tau;
var s = Math.asin(1 / amplitude) * period;
/**
 * Easing function: "elasticIn".
 *
 * @function elasticIn
 * @param a  Amplitude
 * @param p  period
 */

function elasticIn(t) {
  return amplitude * Math.pow(2, 10 * --t) * Math.sin((s - t) / period);
}
_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses["ease.elasticIn"] = elasticIn;
/**
 * Easing function: "elasticOut".
 *
 * @function elasticOut
 * @param a  Amplitude
 * @param p  period
 */

function elasticOut(t) {
  return 1 - amplitude * Math.pow(2, -10 * (t = +t)) * Math.sin((t + s) / period);
}
_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses["ease.elasticOut"] = elasticOut;
/**
 * Easing function: "elasticInOut".
 *
 * @function elasticInOut
 * @param a  Amplitude
 * @param p  period
 */

function elasticInOut(t) {
  t = t * 2 - 1;
  return (t < 0 ? amplitude * Math.pow(2, 10 * t) * Math.sin((s - t) / period) : 2 - amplitude * Math.pow(2, -10 * t) * Math.sin((s + t) / period)) / 2;
}
_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses["ease.elasticInOut"] = elasticInOut;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/utils/EventDispatcher.js":
/*!**********************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/utils/EventDispatcher.js ***!
  \**********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "EventDispatcher": () => (/* binding */ EventDispatcher),
/* harmony export */   "TargetedEventDispatcher": () => (/* binding */ TargetedEventDispatcher)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Disposer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Disposer */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Disposer.js");
/* harmony import */ var _Array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Array */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Array.js");
/* harmony import */ var _AsyncPending__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./AsyncPending */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/AsyncPending.js");
/* harmony import */ var _Type__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/**
 * Event Dispatcher module is used for registering listeners and dispatching
 * events across amCharts system.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */





/*export interface IEventDispatcher<T> {
    isDisposed(): boolean;
    dispose(): void;
    hasListeners(): boolean;
    enable(): void;
    disable(): void;
    enableType<Key extends keyof T>(type: Key): void;
    disableType<Key extends keyof T>(type: Key, amount?: number): void;
    isEnabled<Key extends keyof T>(type: Key): boolean;
    has<C, Key extends keyof T>(type: Key, callback?: (this: C, event: T[Key]) => void, context?: C): boolean;
    dispatchImmediately<Key extends keyof T>(type: Key, event: T[Key]): void;
    dispatch<Key extends keyof T>(type: Key, event: T[Key]): void;
    onAll<C, Key extends keyof T>(callback: (this: C, type: Key, event: T[Key]) => void, context?: C): IDisposer;
    on<C, Key extends keyof T>(type: Key, callback: (this: C, event: T[Key]) => void, context?: C): IDisposer;
    once<C, Key extends keyof T>(type: Key, callback: (this: C, event: T[Key]) => void, context?: C): IDisposer;
    off<C, Key extends keyof T>(type: Key, callback: (this: C, event: T[Key]) => void, context?: C): void;
    off<C, Key extends keyof T>(type: Key, callback: (this: C, event: T[Key]) => void, context?: C): void;
    copyFrom(source: this): void;
}*/

/**
 * Universal Event Dispatcher.
 *
 * @important
 */

var EventDispatcher =
/** @class */
function () {
  /**
   * Constructor
   */
  function EventDispatcher() {
    this._listeners = [];
    this._killed = [];
    this._disabled = {};
    this._iterating = 0;
    this._enabled = true;
    this._disposed = false;
  }
  /**
   * Returns if this object has been already disposed.
   *
   * @return Disposed?
   */


  EventDispatcher.prototype.isDisposed = function () {
    return this._disposed;
  };
  /**
   * Dispose (destroy) this object.
   */


  EventDispatcher.prototype.dispose = function () {
    if (!this._disposed) {
      this._disposed = true;
      var a = this._listeners;
      this._iterating = 1;
      this._listeners = null;
      this._disabled = null;

      try {
        _Array__WEBPACK_IMPORTED_MODULE_1__.each(a, function (x) {
          x.disposer.dispose();
        });
      } finally {
        this._killed = null;
        this._iterating = null;
      }
    }
  };
  /**
   * Checks if this particular event dispatcher has any listeners set.
   *
   * @return Has listeners?
   */


  EventDispatcher.prototype.hasListeners = function () {
    return this._listeners.length !== 0;
  };
  /**
   * Checks if this particular event dispatcher has any particular listeners set.
   *
   * @return Has particular event listeners?
   */


  EventDispatcher.prototype.hasListenersByType = function (type) {
    return _Array__WEBPACK_IMPORTED_MODULE_1__.any(this._listeners, function (x) {
      return (x.type === null || x.type === type) && !x.killed;
    });
  };
  /**
   * Enable dispatching of events if they were previously disabled by
   * `disable()`.
   */


  EventDispatcher.prototype.enable = function () {
    this._enabled = true;
  };
  /**
   * Disable dispatching of events until re-enabled by `enable()`.
   */


  EventDispatcher.prototype.disable = function () {
    this._enabled = false;
  };
  /**
   * Enable dispatching particular event, if it was disabled before by
   * `disableType()`.
   *
   * @param type Event type
   */


  EventDispatcher.prototype.enableType = function (type) {
    delete this._disabled[type];
  };
  /**
   * Disable dispatching of events for a certain event type.
   *
   * Optionally, can set how many dispatches to skip before automatically
   * re-enabling the dispatching.
   *
   * @param type    Event type
   * @param amount  Number of event dispatches to skip
   */


  EventDispatcher.prototype.disableType = function (type, amount) {
    if (amount === void 0) {
      amount = Infinity;
    }

    this._disabled[type] = amount;
  };
  /**
   * Removes listener from dispatcher.
   *
   * Will throw an exception if such listener does not exists.
   *
   * @param listener Listener to remove
   */


  EventDispatcher.prototype._removeListener = function (listener) {
    if (this._iterating === 0) {
      var index = this._listeners.indexOf(listener);

      if (index === -1) {
        throw new Error("Invalid state: could not remove listener");
      }

      this._listeners.splice(index, 1);
    } else {
      this._killed.push(listener);
    }
  };
  /**
   * Removes existing listener by certain parameters.
   *
   * @param once         Listener's once setting
   * @param type         Listener's type
   * @param callback     Callback function
   * @param context      Callback context
   */


  EventDispatcher.prototype._removeExistingListener = function (once, type, callback, context) {
    if (this._disposed) {
      throw new Error("EventDispatcher is disposed");
    }

    this._eachListener(function (info) {
      if (info.once === once && // TODO is this correct ?
      info.type === type && (callback == null || info.callback === callback) && info.context === context) {
        info.disposer.dispose();
      }
    });
  };
  /**
   * Checks if dispatching for particular event type is enabled.
   *
   * @param type  Event type
   * @return Enabled?
   */


  EventDispatcher.prototype.isEnabled = function (type) {
    if (this._disposed) {
      throw new Error("EventDispatcher is disposed");
    } // TODO is this check correct ?


    return this._enabled && this._listeners.length > 0 && this.hasListenersByType(type) && this._disabled[type] == null;
  };
  /**
   * Checks if there's already a listener with specific parameters.
   *
   * @param type      Listener's type
   * @param callback  Callback function
   * @param context   Callback context
   * @return Has listener?
   */


  EventDispatcher.prototype.has = function (type, callback, context) {
    var index = _Array__WEBPACK_IMPORTED_MODULE_1__.findIndex(this._listeners, function (info) {
      return info.once !== true && // Ignoring "once" listeners
      info.type === type && (callback == null || info.callback === callback) && info.context === context;
    });
    return index !== -1;
  };
  /**
   * Checks whether event of the particular type should be dispatched.
   *
   * @param type  Event type
   * @return Dispatch?
   */


  EventDispatcher.prototype._shouldDispatch = function (type) {
    if (this._disposed) {
      throw new Error("EventDispatcher is disposed");
    }

    var count = this._disabled[type];

    if (!_Type__WEBPACK_IMPORTED_MODULE_3__.isNumber(count)) {
      return this._enabled;
    } else {
      if (count <= 1) {
        delete this._disabled[type];
      } else {
        --this._disabled[type];
      }

      return false;
    }
  };
  /**
   * [_eachListener description]
   *
   * All of this extra code is needed when a listener is removed while iterating
   *
   * @todo Description
   * @param fn [description]
   */


  EventDispatcher.prototype._eachListener = function (fn) {
    var _this = this;

    ++this._iterating;

    try {
      _Array__WEBPACK_IMPORTED_MODULE_1__.each(this._listeners, fn);
    } finally {
      --this._iterating; // TODO should this be inside or outside the finally ?

      if (this._iterating === 0 && this._killed.length !== 0) {
        // Remove killed listeners
        _Array__WEBPACK_IMPORTED_MODULE_1__.each(this._killed, function (killed) {
          _this._removeListener(killed);
        });
        this._killed.length = 0;
      }
    }
  };
  /**
   * Dispatches an event immediately without waiting for next cycle.
   *
   * @param type   Event type
   * @param event  Event object
   * @todo automatically add in type and target properties if they are missing
   */


  EventDispatcher.prototype.dispatchImmediately = function (type, event) {
    if (this._shouldDispatch(type)) {
      // TODO check if it's faster to use an object of listeners rather than a single big array
      // TODO if the function throws, maybe it should keep going ?
      this._eachListener(function (listener) {
        if (!listener.killed && (listener.type === null || listener.type === type)) {
          listener.dispatch(type, event);
        }
      });
    }
  };
  /**
   * Shelves the event to be dispatched within next update cycle.
   *
   * @param type   Event type
   * @param event  Event object
   * @todo automatically add in type and target properties if they are missing
   */


  EventDispatcher.prototype.dispatch = function (type, event) {
    if (this._shouldDispatch(type)) {
      this._eachListener(function (listener) {
        // TODO check if it's faster to use an object of listeners rather than a single big array
        if (!listener.killed && (listener.type === null || listener.type === type)) {
          // TODO if the function throws, maybe it should keep going ?
          // TODO dispatch during the update cycle, rather than using whenIdle
          _AsyncPending__WEBPACK_IMPORTED_MODULE_2__.whenIdle(function () {
            if (!listener.killed) {
              listener.dispatch(type, event);
            }
          });
        }
      });
    }
  };
  /**
   * Creates, catalogs and returns an [[EventListener]].
   *
   * Event listener can be disposed.
   *
   * @param once         Listener's once setting
   * @param type         Listener's type
   * @param callback     Callback function
   * @param context      Callback context
   * @param shouldClone  Whether the listener should be copied when the EventDispatcher is copied
   * @param dispatch
   * @returns An event listener
   */


  EventDispatcher.prototype._on = function (once, type, callback, context, shouldClone, dispatch) {
    var _this = this;

    if (this._disposed) {
      throw new Error("EventDispatcher is disposed");
    }

    this._removeExistingListener(once, type, callback, context);

    var info = {
      type: type,
      callback: callback,
      context: context,
      shouldClone: shouldClone,
      dispatch: dispatch,
      killed: false,
      once: once,
      disposer: new _Disposer__WEBPACK_IMPORTED_MODULE_0__.Disposer(function () {
        info.killed = true;

        _this._removeListener(info);
      })
    };

    this._listeners.push(info);

    return info;
  };
  /**
   * Creates an event listener to be invoked on **any** event.
   *
   * @param callback     Callback function
   * @param context      Callback context
   * @param shouldClone  Whether the listener should be copied when the EventDispatcher is copied
   * @returns A disposable event listener
   * @todo what if `listen` is called on the same function twice ?
   */


  EventDispatcher.prototype.onAll = function (callback, context, shouldClone) {
    if (shouldClone === void 0) {
      shouldClone = true;
    }

    return this._on(false, null, callback, context, shouldClone, function (type, event) {
      return callback.call(context, type, event);
    }).disposer;
  };
  /**
   * Creates an event listener to be invoked on a specific event type.
   *
   * ```TypeScript
   * series.events.on("hidden", (ev) => {
   *   console.log("Series hidden: " + ev.target.name);
   * }, this);
   * ```
   * ```JavaScript
   * series.events.on("hidden", function(ev) {
   *   console.log("Series hidden: " + ev.target.name);
   * }, this);
   * ```
   * ```JSON
   * {
   *   // ...
   *   "series": [{
   *     // ...
   *     "events": {
   *     	"hidden": function(ev) {
   *     	  console.log("Series hidden: " + ev.target.name);
   *     	}
   *     }
   *   }]
   * }
   * ```
   *
   * The above will invoke our custom event handler whenever series we put
   * event on is hidden.
   *
   * @param type         Listener's type
   * @param callback     Callback function
   * @param context      Callback context
   * @param shouldClone  Whether the listener should be copied when the EventDispatcher is copied
   * @returns A disposable event listener
   * @todo what if `listen` is called on the same function twice ?
   */


  EventDispatcher.prototype.on = function (type, callback, context, shouldClone) {
    if (shouldClone === void 0) {
      shouldClone = true;
    }

    return this._on(false, type, callback, context, shouldClone, function (type, event) {
      return callback.call(context, event);
    }).disposer;
  };
  /**
   * Creates an event listener to be invoked on a specific event type once.
   *
   * Once the event listener is invoked, it is automatically disposed.
   *
   * ```TypeScript
   * series.events.on("hidden", (ev) => {
   *   console.log("Series hidden: " + ev.target.name);
   * }, this);
   * ```
   * ```JavaScript
   * series.events.on("hidden", function(ev) {
   *   console.log("Series hidden: " + ev.target.name);
   * }, this);
   * ```
   * ```JSON
   * {
   *   // ...
   *   "series": [{
   *     // ...
   *     "events": {
   *     	"hidden": function(ev) {
   *     	  console.log("Series hidden: " + ev.target.name);
   *     	}
   *     }
   *   }]
   * }
   * ```
   *
   * The above will invoke our custom event handler the first time series we
   * put event on is hidden.
   *
   * @param type         Listener's type
   * @param callback     Callback function
   * @param context      Callback context
   * @param shouldClone  Whether the listener should be copied when the EventDispatcher is copied
   * @returns A disposable event listener
   * @todo what if `listen` is called on the same function twice ?
   */


  EventDispatcher.prototype.once = function (type, callback, context, shouldClone) {
    if (shouldClone === void 0) {
      shouldClone = true;
    }

    var x = this._on(true, type, callback, context, shouldClone, function (type, event) {
      x.disposer.dispose();
      callback.call(context, event);
    }); // TODO maybe this should return a different Disposer ?


    return x.disposer;
  };
  /**
   * Removes the event listener with specific parameters.
   *
   * @param type         Listener's type
   * @param callback     Callback function
   * @param context      Callback context
   */


  EventDispatcher.prototype.off = function (type, callback, context) {
    this._removeExistingListener(false, type, callback, context);
  };
  /**
   * Copies all dispatcher parameters, including listeners, from another event
   * dispatcher.
   *
   * @param source Source event dispatcher
   */


  EventDispatcher.prototype.copyFrom = function (source) {
    var _this = this;

    if (this._disposed) {
      throw new Error("EventDispatcher is disposed");
    }

    if (source === this) {
      throw new Error("Cannot copyFrom the same TargetedEventDispatcher");
    }

    _Array__WEBPACK_IMPORTED_MODULE_1__.each(source._listeners, function (x) {
      // TODO is this correct ?
      if (!x.killed && x.shouldClone) {
        if (x.type === null) {
          _this.onAll(x.callback, x.context);
        } else if (x.once) {
          _this.once(x.type, x.callback, x.context);
        } else {
          _this.on(x.type, x.callback, x.context);
        }
      }
    });
  };

  return EventDispatcher;
}();


/**
 * A version of the [[EventDispatcher]] that dispatches events for a specific
 * target object.
 *
 * @important
 */

var TargetedEventDispatcher =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_4__.__extends)(TargetedEventDispatcher, _super);
  /**
   * Constructor
   *
   * @param target Event dispatcher target
   */


  function TargetedEventDispatcher(target) {
    var _this = _super.call(this) || this;

    _this.target = target;
    return _this;
  }
  /**
   * Copies all dispatcher parameters, including listeners, from another event
   * dispatcher.
   *
   * @param source Source event dispatcher
   */


  TargetedEventDispatcher.prototype.copyFrom = function (source) {
    var _this = this;

    if (this._disposed) {
      throw new Error("EventDispatcher is disposed");
    }

    if (source === this) {
      throw new Error("Cannot copyFrom the same TargetedEventDispatcher");
    }

    _Array__WEBPACK_IMPORTED_MODULE_1__.each(source._listeners, function (x) {
      // TODO very hacky
      if (x.context === source.target) {
        return;
      } // TODO is this correct ?


      if (!x.killed && x.shouldClone) {
        if (x.type === null) {
          _this.onAll(x.callback, x.context);
        } else if (x.once) {
          _this.once(x.type, x.callback, x.context);
        } else {
          _this.on(x.type, x.callback, x.context);
        }
      }
    });
  };

  return TargetedEventDispatcher;
}(EventDispatcher);



/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Instance.js":
/*!***************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/utils/Instance.js ***!
  \***************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "addLicense": () => (/* binding */ addLicense),
/* harmony export */   "addToQueue": () => (/* binding */ addToQueue),
/* harmony export */   "create": () => (/* binding */ create),
/* harmony export */   "createDeferred": () => (/* binding */ createDeferred),
/* harmony export */   "createFromConfig": () => (/* binding */ createFromConfig),
/* harmony export */   "disposeAllCharts": () => (/* binding */ disposeAllCharts),
/* harmony export */   "queueHandler": () => (/* binding */ queueHandler),
/* harmony export */   "removeFromQueue": () => (/* binding */ removeFromQueue),
/* harmony export */   "unuseAllThemes": () => (/* binding */ unuseAllThemes),
/* harmony export */   "unuseTheme": () => (/* binding */ unuseTheme),
/* harmony export */   "useTheme": () => (/* binding */ useTheme),
/* harmony export */   "viewPortHandler": () => (/* binding */ viewPortHandler)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _System__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../System */ "./node_modules/@amcharts/amcharts4/.internal/core/System.js");
/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _Container__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Container */ "./node_modules/@amcharts/amcharts4/.internal/core/Container.js");
/* harmony import */ var _Component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Component */ "./node_modules/@amcharts/amcharts4/.internal/core/Component.js");
/* harmony import */ var _rendering_Paper__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../rendering/Paper */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Paper.js");
/* harmony import */ var _rendering_SVGContainer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../rendering/SVGContainer */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/SVGContainer.js");
/* harmony import */ var _rendering_filters_FocusFilter__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../rendering/filters/FocusFilter */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/filters/FocusFilter.js");
/* harmony import */ var _elements_Preloader__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../elements/Preloader */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Preloader.js");
/* harmony import */ var _elements_AmChartsLogo__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../elements/AmChartsLogo */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/AmChartsLogo.js");
/* harmony import */ var _elements_Tooltip__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../elements/Tooltip */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Tooltip.js");
/* harmony import */ var _utils_Disposer__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../utils/Disposer */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Disposer.js");
/* harmony import */ var _Percent__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Percent */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Percent.js");
/* harmony import */ var _Options__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../Options */ "./node_modules/@amcharts/amcharts4/.internal/core/Options.js");
/* harmony import */ var _Array__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./Array */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Array.js");
/* harmony import */ var _Type__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/* harmony import */ var _DOM__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./DOM */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/DOM.js");
/* harmony import */ var _Utils__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./Utils */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Utils.js");
/* harmony import */ var _Log__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./Log */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Log.js");

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */



















/**
 * ============================================================================
 * INSTANTIATION FUNCTIONS
 * ============================================================================
 * @hidden
 */

/**
 * Creates all HTML and SVG containers needed for the chart instance, as well
 * as the new [[Sprite]] (as specified in `classType` parameter).
 *
 * @param htmlElement  A container to creat elements in
 * @param classType    A class definition of the new element to create
 * @return Newly-created Sprite object
 */

function createChild(htmlElement, classType) {
  var htmlContainer = _DOM__WEBPACK_IMPORTED_MODULE_15__.getElement(htmlElement); // If there's no container available yet, we create a fake one

  var tmpContainer = false;

  if (!htmlContainer) {
    htmlContainer = document.createElement("div");
    htmlContainer.style.width = "200px";
    htmlContainer.style.height = "200px";
    htmlContainer.style.top = "0";
    htmlContainer.style.left = "0";
    htmlContainer.style.visibility = "hidden";
    htmlContainer.style.position = "absolute";
    document.body.appendChild(htmlContainer);
    tmpContainer = true;
  }

  if (htmlContainer) {
    htmlContainer.innerHTML = ""; //htmlContainer.style.overflow = "hidden";

    var svgDiv_1 = new _rendering_SVGContainer__WEBPACK_IMPORTED_MODULE_5__.SVGContainer(htmlContainer);
    var paper = new _rendering_Paper__WEBPACK_IMPORTED_MODULE_4__.Paper(svgDiv_1.SVGContainer, "svg-" + (_rendering_SVGContainer__WEBPACK_IMPORTED_MODULE_5__.svgContainers.length - 1)); // the approach with masks is chosen because overflow:visible is set on SVG element in order tooltips could go outside
    // svg area - this is often needed when working with small charts.
    // main container which holds content container and tooltips container

    var container_1 = new _Container__WEBPACK_IMPORTED_MODULE_2__.Container();
    container_1.htmlContainer = htmlContainer;
    container_1.svgContainer = svgDiv_1;
    container_1.width = (0,_Percent__WEBPACK_IMPORTED_MODULE_11__.percent)(100);
    container_1.height = (0,_Percent__WEBPACK_IMPORTED_MODULE_11__.percent)(100);
    container_1.background.fillOpacity = 0;
    container_1.paper = paper;
    paper.append(container_1.group); // Set up moving to proper element container if it's not yet ready at call time

    if (tmpContainer) {
      _DOM__WEBPACK_IMPORTED_MODULE_15__.ready(function () {
        container_1.moveHtmlContainer(htmlElement);
      });
    } // this is set from parent container, but this one doesn't have, so do it manually.


    container_1.relativeWidth = 1;
    container_1.relativeHeight = 1;
    svgDiv_1.container = container_1; // creating classType instance

    var sprite_1 = container_1.createChild(classType);
    sprite_1.topParent = container_1;
    var uid = sprite_1.uid;
    _Registry__WEBPACK_IMPORTED_MODULE_1__.registry.invalidSprites[uid] = [];
    _Registry__WEBPACK_IMPORTED_MODULE_1__.registry.invalidDatas[uid] = [];
    _Registry__WEBPACK_IMPORTED_MODULE_1__.registry.invalidPositions[uid] = [];
    _Registry__WEBPACK_IMPORTED_MODULE_1__.registry.invalidLayouts[uid] = [];
    container_1.baseId = uid;
    sprite_1.isBaseSprite = true;
    sprite_1.focusFilter = new _rendering_filters_FocusFilter__WEBPACK_IMPORTED_MODULE_6__.FocusFilter();
    _Registry__WEBPACK_IMPORTED_MODULE_1__.registry.baseSprites.push(sprite_1);
    _Registry__WEBPACK_IMPORTED_MODULE_1__.registry.baseSpritesByUid[uid] = sprite_1;
    sprite_1.maskRectangle = {
      x: 0,
      y: 0,
      width: Math.max(svgDiv_1.width || 0, 0),
      height: Math.max(svgDiv_1.height || 0, 0)
    }; // this solves issues with display:none, as all children are measured as 0x0

    container_1.events.on("maxsizechanged", function (event) {
      if (event.previousWidth == 0 || event.previousHeight == 0) {
        container_1.deepInvalidate();
      }

      if (sprite_1.maskRectangle) {
        sprite_1.maskRectangle = {
          x: 0,
          y: 0,
          width: Math.max(svgDiv_1.width || 0, 0),
          height: Math.max(svgDiv_1.height || 0, 0)
        };
      }
    });
    var loopTimer_1 = null; // Checks to see whether the chart was properly disposed or not

    var loop_1 = function loop_1() {
      if (!sprite_1.isDisposed()) {
        if (_DOM__WEBPACK_IMPORTED_MODULE_15__.getRoot(sprite_1.dom) == null) {
          if (_Options__WEBPACK_IMPORTED_MODULE_12__.options.autoDispose) {
            container_1.htmlContainer = undefined;
            svgDiv_1.htmlElement = undefined;
            sprite_1.dispose();
          } else {
            _Log__WEBPACK_IMPORTED_MODULE_17__.warn("Chart was not disposed", sprite_1.uid);
          }

          loopTimer_1 = null;
        } else {
          loopTimer_1 = window.setTimeout(loop_1, 1000);
        }
      } else {
        loopTimer_1 = null;
      }
    };

    loop_1();
    sprite_1.addDisposer(new _utils_Disposer__WEBPACK_IMPORTED_MODULE_10__.Disposer(function () {
      if (loopTimer_1 !== null) {
        clearTimeout(loopTimer_1);
      }

      _Array__WEBPACK_IMPORTED_MODULE_13__.remove(_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.baseSprites, sprite_1);
      _Registry__WEBPACK_IMPORTED_MODULE_1__.registry.baseSpritesByUid[sprite_1.uid] = undefined;
    })); // TODO figure out a better way of doing this

    sprite_1.addDisposer(container_1); // tooltip container

    var tooltipContainer_1 = container_1.createChild(_Container__WEBPACK_IMPORTED_MODULE_2__.Container);
    tooltipContainer_1.topParent = container_1;
    tooltipContainer_1.width = (0,_Percent__WEBPACK_IMPORTED_MODULE_11__.percent)(100);
    tooltipContainer_1.height = (0,_Percent__WEBPACK_IMPORTED_MODULE_11__.percent)(100);
    tooltipContainer_1.isMeasured = false;
    container_1.tooltipContainer = tooltipContainer_1;
    sprite_1.tooltip = new _elements_Tooltip__WEBPACK_IMPORTED_MODULE_9__.Tooltip();
    sprite_1.tooltip.hide(0);
    sprite_1.tooltip.setBounds({
      x: 0,
      y: 0,
      width: tooltipContainer_1.maxWidth,
      height: tooltipContainer_1.maxHeight
    });
    tooltipContainer_1.events.on("maxsizechanged", function () {
      _Type__WEBPACK_IMPORTED_MODULE_14__.getValue(sprite_1.tooltip).setBounds({
        x: 0,
        y: 0,
        width: tooltipContainer_1.maxWidth,
        height: tooltipContainer_1.maxHeight
      });
    }, undefined, false); //@todo: maybe we don't need to create one by default but only on request?

    var preloader_1 = new _elements_Preloader__WEBPACK_IMPORTED_MODULE_7__.Preloader();
    preloader_1.events.on("inited", function () {
      preloader_1.__disabled = true;
    }, undefined, false);
    container_1.preloader = preloader_1; //if (!options.commercialLicense) {

    if (sprite_1 instanceof _Container__WEBPACK_IMPORTED_MODULE_2__.Container && !sprite_1.hasLicense()) {
      var logo_1 = tooltipContainer_1.createChild(_elements_AmChartsLogo__WEBPACK_IMPORTED_MODULE_8__.AmChartsLogo);
      tooltipContainer_1.events.on("maxsizechanged", function (ev) {
        if (tooltipContainer_1.maxWidth <= 100 || tooltipContainer_1.maxHeight <= 50) {
          logo_1.hide();
        } else if (logo_1.isHidden || logo_1.isHiding) {
          logo_1.show();
        }
      }, undefined, false);
      sprite_1.logo = logo_1;
      logo_1.align = "left";
      logo_1.valign = "bottom";
    }

    _Utils__WEBPACK_IMPORTED_MODULE_16__.used(sprite_1.numberFormatter); // need to create one.
    // Set this as an autonomouse instance
    // Controls like Preloader, Export will use this.

    container_1.isStandaloneInstance = true;

    if (_Options__WEBPACK_IMPORTED_MODULE_12__.options.onlyShowOnViewport) {
      if (!_DOM__WEBPACK_IMPORTED_MODULE_15__.isElementInViewport(htmlContainer, _Options__WEBPACK_IMPORTED_MODULE_12__.options.viewportTarget)) {
        sprite_1.__disabled = true;
        sprite_1.tooltipContainer.__disabled = true;
        var disposers = [_DOM__WEBPACK_IMPORTED_MODULE_15__.addEventListener(window, "DOMContentLoaded", function () {
          viewPortHandler(sprite_1);
        }), _DOM__WEBPACK_IMPORTED_MODULE_15__.addEventListener(window, "load", function () {
          viewPortHandler(sprite_1);
        }), _DOM__WEBPACK_IMPORTED_MODULE_15__.addEventListener(window, "resize", function () {
          viewPortHandler(sprite_1);
        }), _DOM__WEBPACK_IMPORTED_MODULE_15__.addEventListener(window, "scroll", function () {
          viewPortHandler(sprite_1);
        })];

        if (_Options__WEBPACK_IMPORTED_MODULE_12__.options.viewportTarget) {
          var targets = _Type__WEBPACK_IMPORTED_MODULE_14__.isArray(_Options__WEBPACK_IMPORTED_MODULE_12__.options.viewportTarget) ? _Options__WEBPACK_IMPORTED_MODULE_12__.options.viewportTarget : _Options__WEBPACK_IMPORTED_MODULE_12__.options.viewportTarget ? [_Options__WEBPACK_IMPORTED_MODULE_12__.options.viewportTarget] : [];

          for (var i = 0; i < targets.length; i++) {
            var target = targets[i];
            disposers.push(_DOM__WEBPACK_IMPORTED_MODULE_15__.addEventListener(target, "resize", function () {
              viewPortHandler(sprite_1);
            }));
            disposers.push(_DOM__WEBPACK_IMPORTED_MODULE_15__.addEventListener(target, "scroll", function () {
              viewPortHandler(sprite_1);
            }));
          }
        }

        var disposer = new _utils_Disposer__WEBPACK_IMPORTED_MODULE_10__.MultiDisposer(disposers);
        sprite_1.addDisposer(disposer);
        sprite_1.vpDisposer = disposer;
      } else if (_Options__WEBPACK_IMPORTED_MODULE_12__.options.queue) {
        addToQueue(sprite_1);
      }
    } else if (_Options__WEBPACK_IMPORTED_MODULE_12__.options.queue) {
      addToQueue(sprite_1);
    }

    return sprite_1;
  } else {
    _System__WEBPACK_IMPORTED_MODULE_0__.system.log("html container not found");
    throw new Error("html container not found");
  }
}
/**
 * Disposes all of the currently active charts.
 */


function disposeAllCharts() {
  while (_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.baseSprites.length !== 0) {
    _Registry__WEBPACK_IMPORTED_MODULE_1__.registry.baseSprites.pop().dispose();
  }
}
function addToQueue(sprite) {
  if (_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.queue.indexOf(sprite) == -1) {
    sprite.__disabled = true;
    sprite.tooltipContainer.__disabled = true;
    sprite.events.disableType("appeared");

    if (_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.queue.length == 0) {
      _Registry__WEBPACK_IMPORTED_MODULE_1__.registry.events.once("exitframe", function () {
        queueHandler(sprite);
      });
      _System__WEBPACK_IMPORTED_MODULE_0__.system.requestFrame();
    }

    sprite.addDisposer(new _utils_Disposer__WEBPACK_IMPORTED_MODULE_10__.Disposer(function () {
      removeFromQueue(sprite);
    }));
    _Registry__WEBPACK_IMPORTED_MODULE_1__.registry.queue.push(sprite);
  }
}
function removeFromQueue(sprite) {
  var index = _Registry__WEBPACK_IMPORTED_MODULE_1__.registry.queue.indexOf(sprite);

  if (index >= 0) {
    _Registry__WEBPACK_IMPORTED_MODULE_1__.registry.queue.splice(_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.queue.indexOf(sprite), 1);
    var nextSprite = _Registry__WEBPACK_IMPORTED_MODULE_1__.registry.queue[index];

    if (nextSprite) {
      queueHandler(nextSprite);
    }
  }
}
/**
 * Checks whether the chart was not initialized fully due to setting
 * of `onlyShowOnViewport`. If it hasn't and is now in the viewport
 * the chart will be initialized.
 *
 * @since 4.9.12
 * @param  sprite  Top-level chart object
 */

function viewPortHandler(sprite) {
  if (sprite.__disabled && _DOM__WEBPACK_IMPORTED_MODULE_15__.isElementInViewport(sprite.htmlContainer, _Options__WEBPACK_IMPORTED_MODULE_12__.options.viewportTarget)) {
    if (sprite.vpDisposer) {
      sprite.vpDisposer.dispose();
    }

    addToQueue(sprite);
  }
}
function queueHandler(sprite) {
  if (sprite && sprite.tooltipContainer) {
    sprite.__disabled = false;
    sprite.tooltipContainer.__disabled = false;
    sprite.events.enableType("appeared");
    sprite.dispatch("removedfromqueue");

    if (sprite.showOnInit) {
      sprite.events.on("appeared", function () {
        removeFromQueue(sprite);
      });
    }

    if (sprite.vpDisposer) {
      sprite.vpDisposer.dispose();
    }

    if (sprite instanceof _Container__WEBPACK_IMPORTED_MODULE_2__.Container) {
      sprite.invalidateLabels();
    }

    if (sprite.tooltipContainer) {
      sprite.tooltipContainer.invalidateLayout();
    }

    if (sprite instanceof _Component__WEBPACK_IMPORTED_MODULE_3__.Component) {
      sprite.invalidateData();
      sprite.reinit();
      sprite.events.once("datavalidated", function () {
        if (sprite.showOnInit) {
          sprite.appear();
        } else {
          removeFromQueue(sprite);
        }
      });
    } else {
      sprite.reinit();
      sprite.events.once("inited", function () {
        removeFromQueue(sprite);
      });

      if (sprite.showOnInit) {
        sprite.appear();
      }
    }
  }
}
/**
 * A shortcut to creating a chart instance.
 *
 * The first argument is either a reference to or an id of a DOM element to be
 * used as a container for the chart.
 *
 * The second argument is the type reference of the chart type. (for plain
 * JavaScript users this can also be a string indicating chart type)
 *
 * ```TypeScript
 * let chart = am4core.create("chartdiv", am4charts.PieChart);
 * ```
 * ```JavaScript
 * // Can pass in chart type reference like this:
 * var chart = am4core.create("chartdiv", am4charts.PieChart);
 *
 * // ... or chart class type as a string:
 * var chart = am4core.create("chartdiv", "PieChart");
 * ```
 *
 * @param htmlElement  Reference or id of the target container element
 * @param classType    Class type of the target chart type
 * @return Chart instance
 */

function create(htmlElement, classType) {
  // This is a nasty hack for the benefit of vanilla JS users, who do not
  // enjoy benefits of type-check anyway.
  // We're allowing passing in a name of the class rather than type reference
  // itself.
  var classError;

  if (_Type__WEBPACK_IMPORTED_MODULE_14__.isString(classType)) {
    if (_Type__WEBPACK_IMPORTED_MODULE_14__.hasValue(_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses[classType])) {
      classType = _Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses[classType];
    } else {
      classType = _Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses.Container;
      classError = new Error("Class [" + classType + "] is not loaded.");
    }
  } // Create the chart


  var chart = createChild(htmlElement, classType); // Error?

  if (classError) {
    chart.raiseCriticalError(classError);
  }

  return chart;
}
/**
 * A shortcut to creating a chart from a config object.
 *
 * Example:
 *
 * ```TypeScript
 * let chart am4core.createFromConfig({ ... }, "chartdiv", am4charts.XYChart );
 * ```
 * ```JavaScript
 * var chart am4core.createFromConfig({ ... }, "chartdiv", "XYChart" );
 * ```
 *
 * If `chartType` parameter is not supplied it must be set in a config object,
 * via reference to chart type, e.g.:
 *
 * ```TypeScript
 * {
 *   "type": am4charts.XYChart,
 *   // ...
 * }
 * ```
 * ```JavaScript
 * {
 *   "type": am4charts.XYChart,
 *   // ...
 * }
 * ```
 *
 * Or via string: (if you are using JavaScript)
 *
 * ```TypeScript
 * {
 *   "type": "XYChart",
 *   // ...
 * }
 * ```
 * ```JavaScript
 * {
 *   "type": "XYChart",
 *   // ...
 * }
 * ```
 *
 * A `container` can either be a reference to an HTML container to put chart
 * in, or it's unique id.
 *
 * If `container` is not specified, it must be included in the config object:
 *
 * ```TypeScript
 * {
 *   "type": "XYChart",
 *   "container": "chartdiv",
 *   // ...
 * }
 * ```
 * ```JavaScript
 * {
 *   "type": "XYChart",
 *   "container": "chartdiv",
 *   // ...
 * }
 * ```
 *
 * @param config       Config object in property/value pairs
 * @param htmlElement  Container reference or ID
 * @param objectType   Chart type
 * @return A newly created chart instance
 * @todo Throw exception if type is not correct
 */

function createFromConfig(config, htmlElement, classType) {
  // Extract chart type from config if necessary
  if (!_Type__WEBPACK_IMPORTED_MODULE_14__.hasValue(classType)) {
    classType = config.type;
    delete config.type;
  } // Extract element from config if necessary


  if (!_Type__WEBPACK_IMPORTED_MODULE_14__.hasValue(htmlElement)) {
    htmlElement = config.container;
    delete config.container;
  } // Check if we need to extract actual type reference


  var finalType;
  var classError;

  if (_Type__WEBPACK_IMPORTED_MODULE_14__.isString(classType) && _Type__WEBPACK_IMPORTED_MODULE_14__.hasValue(_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses[classType])) {
    finalType = _Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses[classType];
  } else if (typeof classType !== "function") {
    finalType = _Container__WEBPACK_IMPORTED_MODULE_2__.Container;
    classError = new Error("Class [" + classType + "] is not loaded.");
  } else {
    finalType = classType;
  } // Create the chart


  var chart = createChild(htmlElement, finalType); // Set config

  if (classError) {
    chart.raiseCriticalError(classError);
  } else {
    chart.config = config;
  }

  return chart;
}
/**
 * Useful in creating real queues form mult-chart creation.
 *
 * Accepts a reference to a function which crates and returns actual chart
 * object.
 *
 * It returns a `Promise` which you can use to catch chart instance once it's
 * created.
 *
 * ```TypeScript
 * am4core.createDeferred(function(div) {
 *   // Create first chart
 *   let chart = am4core.create(div, am4charts.XYChart);
 *   // ...
 *   return chart;
 * }, "chartdiv1").then(chart) {
 *   // `chart` variable holds an instance of the chart
 *   console.log("Chart ready", chart);
 * }
 *
 * am4core.createDeferred(function(div) {
 *   // Create second chart
 *   let chart = am4core.create(div, am4charts.PieChart);
 *   // ...
 *   return chart;
 * }, "chartdiv2").then(chart) {
 *   // `chart` variable holds an instance of the chart
 *   console.log("Chart ready", chart);
 * }
 * ```
 * ```JavaScript
 * am4core.createDeferred(function(div) {
 *   // Create first chart
 *   var chart = am4core.create(div, am4charts.XYChart);
 *   // ...
 *   return chart;
 * }, "chartdiv1").then(chart) {
 *   // `chart` variable holds an instance of the chart
 *   console.log("Chart ready", chart);
 * }
 *
 * am4core.createDeferred(function(div) {
 *   // Create second chart
 *   var chart = am4core.create(div, am4charts.PieChart);
 *   // ...
 *   return chart;
 * }, "chartdiv2").then(chart) {
 *   // `chart` variable holds an instance of the chart
 *   console.log("Chart ready", chart);
 * }
 * ```
 *
 * @see {@link https://www.amcharts.com/docs/v4/concepts/performance/#Deferred_daisy_chained_instantiation} for more information
 * @since 4.10.0
 * @param  callback  Callback function that creates chart
 * @param  scope     Scope to call callback in
 * @param  ...rest   Parameters to pass into callback
 * @return           Promise with chart instance
 */

function createDeferred(callback, scope) {
  var rest = [];

  for (var _i = 2; _i < arguments.length; _i++) {
    rest[_i - 2] = arguments[_i];
  }

  return new Promise(function (resolve, reject) {
    _Registry__WEBPACK_IMPORTED_MODULE_1__.registry.deferred.push({
      scope: scope,
      callback: callback,
      args: rest,
      resolve: resolve
    });

    if (_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.deferred.length == 1) {
      processNextDeferred();
    }
  });
}

function processNextDeferred() {
  var _a;

  var next = _Registry__WEBPACK_IMPORTED_MODULE_1__.registry.deferred[0];

  if (next) {
    var sprite_2 = (_a = next.callback).call.apply(_a, (0,tslib__WEBPACK_IMPORTED_MODULE_18__.__spread)([next.scope], next.args));

    sprite_2.events.on("ready", function () {
      next.resolve(sprite_2);
      _Registry__WEBPACK_IMPORTED_MODULE_1__.registry.deferred.shift();

      if (_Options__WEBPACK_IMPORTED_MODULE_12__.options.deferredDelay) {
        setTimeout(processNextDeferred, _Options__WEBPACK_IMPORTED_MODULE_12__.options.deferredDelay);
      } else {
        processNextDeferred();
      }
    });
  }
}
/**
 * Applies a theme to System, and subsequently all chart instances created
 * from that point forward.
 *
 * amCharts supports multiple themes. Calling `useTheme` multiple times will
 * make the System apply multiple themes, rather than overwrite previously
 * set one.
 *
 * This enables combining features from multiple themes on the same chart.
 * E.g.:
 *
 * ```TypeScript
 * am4core.useTheme(am4themes.material);
 * am4core.useTheme(am4themes.animated);
 * ```
 * ```JavaScript
 * am4core.useTheme(am4themes.material);
 * am4core.useTheme(am4themes.animated);
 * ```
 *
 * The above will apply both the Material color and animation options to all
 * charts created.
 *
 * @param value  A reference to a theme
 */


function useTheme(value) {
  if (_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.themes.indexOf(value) === -1) {
    _Registry__WEBPACK_IMPORTED_MODULE_1__.registry.themes.push(value);
  }
}
/**
 * Removes a theme from "active themes" list, so it won't get applied to any
 * charts created subsequently.
 *
 * @param value  A reference to a theme
 */

function unuseTheme(value) {
  _Array__WEBPACK_IMPORTED_MODULE_13__.remove(_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.themes, value);
}
/**
 * Removes all "active" themes. Any charts created subsequently will not have
 * any theme applied to them.
 */

function unuseAllThemes() {
  _Registry__WEBPACK_IMPORTED_MODULE_1__.registry.themes = [];
}
/**
 * Adds a license, e.g.:
 *
 * ```TypeScript
 * am4core.addLicense("xxxxxxxx");
 * ```
 * ```JavaScript
 * am4core.addLicense("xxxxxxxx");
 * ```
 *
 * Multiple licenses can be added to cover for multiple products.
 *
 * @since 4.5.16
 * @param  license  License key
 */

function addLicense(license) {
  _Options__WEBPACK_IMPORTED_MODULE_12__.options.licenses.push(license);
}

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/utils/InterfaceColorSet.js":
/*!************************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/utils/InterfaceColorSet.js ***!
  \************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "InterfaceColorSet": () => (/* binding */ InterfaceColorSet)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Base */ "./node_modules/@amcharts/amcharts4/.internal/core/Base.js");
/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _Color__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Color */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Color.js");
/**
 * This module contains a version of ColorSet that can (and should) be used for
 * coloring UI elements.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */




/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * This module contains a version of ColorSet that can (and should) be used for
 * coloring UI elements.
 *
 * The main difference from the basic [[ColorSet]] is that instead of sequenced
 * colors, it uses a concept of named colors.
 *
 * This way, every element in the UI can extract an exact color theme author
 * meant for the specific purpose, like strokes, backgrounds, etc.
 *
 * @see {@link https://www.amcharts.com/docs/v4/concepts/colors/} for color-related info
 */

var InterfaceColorSet =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__extends)(InterfaceColorSet, _super);
  /**
   * Constructor
   */


  function InterfaceColorSet() {
    var _this = _super.call(this) || this;
    /**
     * Maps the list of purposes (like "stroke") to an index of color of the
     * color set.
     */


    _this._purposes = {
      stroke: (0,_Color__WEBPACK_IMPORTED_MODULE_2__.color)("#e5e5e5"),
      fill: (0,_Color__WEBPACK_IMPORTED_MODULE_2__.color)("#f3f3f3"),
      primaryButton: (0,_Color__WEBPACK_IMPORTED_MODULE_2__.color)("#6794dc"),
      primaryButtonHover: (0,_Color__WEBPACK_IMPORTED_MODULE_2__.color)("#6771dc"),
      primaryButtonDown: (0,_Color__WEBPACK_IMPORTED_MODULE_2__.color)("#68dc75"),
      primaryButtonActive: (0,_Color__WEBPACK_IMPORTED_MODULE_2__.color)("#68dc75"),
      primaryButtonText: (0,_Color__WEBPACK_IMPORTED_MODULE_2__.color)("#FFFFFF"),
      primaryButtonStroke: (0,_Color__WEBPACK_IMPORTED_MODULE_2__.color)("#FFFFFF"),
      secondaryButton: (0,_Color__WEBPACK_IMPORTED_MODULE_2__.color)("#d9d9d9"),
      secondaryButtonHover: (0,_Color__WEBPACK_IMPORTED_MODULE_2__.color)("#d9d9d9").brighten(-0.25),
      secondaryButtonDown: (0,_Color__WEBPACK_IMPORTED_MODULE_2__.color)("#d9d9d9").brighten(-0.35),
      secondaryButtonActive: (0,_Color__WEBPACK_IMPORTED_MODULE_2__.color)("#d9d9d9").brighten(0.35),
      secondaryButtonText: (0,_Color__WEBPACK_IMPORTED_MODULE_2__.color)("#000000"),
      secondaryButtonStroke: (0,_Color__WEBPACK_IMPORTED_MODULE_2__.color)("#FFFFFF"),
      grid: (0,_Color__WEBPACK_IMPORTED_MODULE_2__.color)("#000000"),
      background: (0,_Color__WEBPACK_IMPORTED_MODULE_2__.color)("#ffffff"),
      alternativeBackground: (0,_Color__WEBPACK_IMPORTED_MODULE_2__.color)("#000000"),
      text: (0,_Color__WEBPACK_IMPORTED_MODULE_2__.color)("#000000"),
      alternativeText: (0,_Color__WEBPACK_IMPORTED_MODULE_2__.color)("#FFFFFF"),
      disabledBackground: (0,_Color__WEBPACK_IMPORTED_MODULE_2__.color)("#999999"),
      positive: (0,_Color__WEBPACK_IMPORTED_MODULE_2__.color)("#67dc75"),
      negative: (0,_Color__WEBPACK_IMPORTED_MODULE_2__.color)("#dc6788")
    };
    _this.className = "InterfaceColorSet";

    _this.applyTheme();

    return _this;
  }

  InterfaceColorSet.prototype.debug = function () {};
  /**
   * Returns a color to be used for the specific purpose.
   *
   * ```TypeScript
   * let uicolors = new am4core.InterfaceColorSet();
   * console.log(uicolors.getFor("stroke"));
   * ```
   * ```JavaScript
   * var uicolors = new am4core.InterfaceColorSet();
   * console.log(uicolors.getFor("stroke"));
   * ```
   *
   * @param purpose  Color use purpuse
   * @return Color
   */


  InterfaceColorSet.prototype.getFor = function (purpose) {
    return this._purposes[purpose];
  };
  /**
   * Sets color to be used for the specific purpose.
   *
   * @param purpose  Color use purpose
   * @param color    Color
   */


  InterfaceColorSet.prototype.setFor = function (purpose, color) {
    this._purposes[purpose] = color;
  };

  return InterfaceColorSet;
}(_Base__WEBPACK_IMPORTED_MODULE_0__.BaseObject);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses.InterfaceColorSet = InterfaceColorSet;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Iterator.js":
/*!***************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/utils/Iterator.js ***!
  \***************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "ListIterator": () => (/* binding */ ListIterator),
/* harmony export */   "concat": () => (/* binding */ concat),
/* harmony export */   "contains": () => (/* binding */ contains),
/* harmony export */   "each": () => (/* binding */ each),
/* harmony export */   "eachContinue": () => (/* binding */ eachContinue),
/* harmony export */   "filter": () => (/* binding */ filter),
/* harmony export */   "find": () => (/* binding */ find),
/* harmony export */   "findIndex": () => (/* binding */ findIndex),
/* harmony export */   "findMap": () => (/* binding */ findMap),
/* harmony export */   "flatten": () => (/* binding */ flatten),
/* harmony export */   "foldl": () => (/* binding */ foldl),
/* harmony export */   "fromArray": () => (/* binding */ fromArray),
/* harmony export */   "indexed": () => (/* binding */ indexed),
/* harmony export */   "join": () => (/* binding */ join),
/* harmony export */   "length": () => (/* binding */ length),
/* harmony export */   "map": () => (/* binding */ map),
/* harmony export */   "max": () => (/* binding */ max),
/* harmony export */   "min": () => (/* binding */ min),
/* harmony export */   "sort": () => (/* binding */ sort),
/* harmony export */   "toArray": () => (/* binding */ toArray)
/* harmony export */ });
/* harmony import */ var _Array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Array */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Array.js");

/**
 * @ignore Exclude from docs
 * @todo Description
 */

function fromArray(array) {
  return function (push) {
    var length = array.length;

    for (var i = 0; i < length; ++i) {
      if (!push(array[i])) {
        break;
      }
    }
  };
}
/**
 * @ignore Exclude from docs
 * @todo Description
 */

function length(iter) {
  var sum = 0;
  iter(function (_) {
    ++sum;
    return true;
  });
  return sum;
}
/**
 * @ignore Exclude from docs
 * @todo Description
 */

function toArray(iter) {
  var output = [];
  iter(function (value) {
    output.push(value);
    return true;
  });
  return output;
}
/**
 * [iter description]
 *
 * @ignore Exclude from docs
 * @todo Description
 */

function eachContinue(iter, fn) {
  iter(fn);
}
/**
 * [iter description]
 *
 * @ignore Exclude from docs
 * @todo Description
 */

function each(iter, fn) {
  iter(function (value) {
    fn(value);
    return true;
  });
}
/**
 * [iter description]
 *
 * @ignore Exclude from docs
 * @todo Description
 */

function sort(iter, fn) {
  return fromArray(toArray(iter).sort(fn));
}
/**
 * [A description]
 *
 * @ignore Exclude from docs
 * @todo Description
 */

function map(iter, fn) {
  return function (push) {
    return iter(function (value) {
      return push(fn(value));
    });
  };
}
/**
 * [iter description]
 *
 * @ignore Exclude from docs
 * @todo Description
 */

function filter(iter, fn) {
  return function (push) {
    return iter(function (value) {
      if (fn(value)) {
        return push(value);
      } else {
        return true;
      }
    });
  };
}
/**
 * @ignore Exclude from docs
 * @todo Description
 */

function concat() {
  var args = [];

  for (var _i = 0; _i < arguments.length; _i++) {
    args[_i] = arguments[_i];
  }

  return function (push) {
    var go = true;

    var push2 = function push2(value) {
      return go = push(value);
    };

    var length = args.length;

    for (var i = 0; i < length; ++i) {
      args[i](push2);

      if (!go) {
        break;
      }
    }
  };
}
/**
 * @ignore Exclude from docs
 * @todo Description
 */

function flatten(iter) {
  return function (push) {
    var go = true;

    var push2 = function push2(value) {
      return go = push(value);
    };

    iter(function (value) {
      value(push2);
      return go;
    });
  };
}
/**
 * [number description]
 *
 * @ignore Exclude from docs
 * @todo Description
 */

function indexed(iter) {
  return function (push) {
    var index = 0;
    iter(function (value) {
      return push([index++, value]);
    });
  };
}
/**
 * [iter description]
 *
 * @ignore Exclude from docs
 * @todo Description
 */

function findIndex(iter, matches) {
  var found = false;
  var i = 0;
  iter(function (value) {
    if (matches(value)) {
      found = true;
      return false;
    } else {
      ++i;
      return true;
    }
  });
  return found ? i : -1;
}
/**
 * [iter description]
 *
 * @ignore Exclude from docs
 * @todo Description
 */

function find(iter, matches) {
  var output;
  iter(function (value) {
    if (matches(value)) {
      output = value;
      return false;
    } else {
      return true;
    }
  });
  return output;
}
/**
 * [A description]
 *
 * @ignore Exclude from docs
 * @todo Description
 */

function findMap(iter, matches) {
  var output;
  iter(function (value) {
    var v = matches(value);

    if (v !== null) {
      output = v;
      return false;
    } else {
      return true;
    }
  });
  return output;
}
/**
 * [iter description]
 *
 * @ignore Exclude from docs
 * @todo Description
 */

function contains(iter, matches) {
  var output = false;
  iter(function (value) {
    if (matches(value)) {
      output = true;
      return false;
    } else {
      return true;
    }
  });
  return output;
}
/**
 * [A description]
 *
 * @ignore Exclude from docs
 * @todo Description
 */

function foldl(iter, init, fn) {
  iter(function (value) {
    init = fn(init, value);
    return true;
  });
  return init;
}
/**
 * [min2 description]
 *
 * @ignore Exclude from docs
 * @todo Description
 * @param left [description]
 * @param right [description]
 * @return [description]
 */

function min2(left, right) {
  if (left == null || right < left) {
    return right;
  } else {
    return left;
  }
}
/**
 * [min description]
 *
 * @ignore Exclude from docs
 * @todo Verify that this works correctly
 * @todo Description
 * @param a [description]
 * @return [description]
 */


function min(a) {
  return foldl(a, null, min2);
}
/**
 * [max2 description]
 *
 * @ignore Exclude from docs
 * @todo Description
 * @param left [description]
 * @param right [description]
 * @return [description]
 */

function max2(left, right) {
  if (left == null || right > left) {
    return right;
  } else {
    return left;
  }
}
/**
 * [max description]
 *
 * @ignore Exclude from docs
 * @todo Verify that this works correctly
 * @todo Description
 * @param a [description]
 * @return [description]
 */


function max(a) {
  return foldl(a, null, max2);
}
/**
 * [join description]
 *
 * @ignore Exclude from docs
 * @todo Description
 * @param iter [description]
 * @param separator [description]
 * @return [description]
 */

function join(iter, separator) {
  if (separator === void 0) {
    separator = "";
  }

  var first = true;
  var init = "";
  iter(function (value) {
    if (first) {
      first = false;
    } else {
      init += separator;
    }

    init += value;
    return true;
  });
  return init;
}
/**
 * @ignore Exclude from docs
 * @todo Description
 */

var ListIterator =
/** @class */
function () {
  /**
   * Constructor
   *
   * @param list [description]
   * @param create [description]
   */
  function ListIterator(list, create) {
    // flag specifies if iterator should create new list item if it is reqested for a nextItem but there is no more left in the list
    this.createNewItems = false;
    this.list = list;
    this._create = create;
    this.reset();
  }

  ListIterator.prototype.reset = function () {
    this._listCopy = toArray(this.list.iterator());
  };

  ListIterator.prototype.clear = function () {
    this._listCopy.length = 0;
  };

  ListIterator.prototype.getFirst = function () {
    return this.returnItem(0);
  };

  ListIterator.prototype.getLast = function () {
    return this.returnItem(this._listCopy.length - 1);
  };

  ListIterator.prototype.find = function (fn) {
    var index = _Array__WEBPACK_IMPORTED_MODULE_0__.findIndex(this._listCopy, fn);

    if (index !== -1) {
      var item = this._listCopy[index]; // TODO use removeIndex instead ?

      _Array__WEBPACK_IMPORTED_MODULE_0__.remove(this._listCopy, item);
      return item;
    } else {
      return this.getLast();
    }
  };

  ListIterator.prototype.removeItem = function (item) {
    return _Array__WEBPACK_IMPORTED_MODULE_0__.remove(this._listCopy, item);
  };

  ListIterator.prototype.returnItem = function (index) {
    if (index >= 0 && index < this._listCopy.length) {
      var item = this._listCopy[index]; // TODO use removeIndex instead ?

      _Array__WEBPACK_IMPORTED_MODULE_0__.remove(this._listCopy, item);
      return item;
    } else if (this.createNewItems) {
      return this._create();
    }
  };

  ListIterator.prototype.iterator = function () {
    return fromArray(this._listCopy);
  };

  return ListIterator;
}();



/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Keyboard.js":
/*!***************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/utils/Keyboard.js ***!
  \***************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Keyboard": () => (/* binding */ Keyboard),
/* harmony export */   "keyboard": () => (/* binding */ keyboard)
/* harmony export */ });
/* harmony import */ var _Type__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/**
 * A collection of keyboard-related utilities accessible via `keyboard`
 * instance.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */

/**
 * A class that represents collection of keyboard-related utilities.
 *
 * Do not instantiate this class directly, but rather use `keyboard` variable.
 */

var Keyboard =
/** @class */
function () {
  function Keyboard() {}
  /**
   * Returns a named key based on information contained in the event or
   * "other".
   *
   * @param ev  A keyboard event
   * @return Keyboard named key
   */


  Keyboard.prototype.getEventKey = function (ev) {
    // Get the key code
    var code = ev.keyCode || ev.which,
        key; // Map to internal key

    switch (code) {
      case 38:
        key = "up";
        break;

      case 40:
        key = "down";
        break;

      case 37:
        key = "left";
        break;

      case 39:
        key = "right";
        break;

      case 13:
        key = "enter";
        break;

      case 27:
        key = "esc";
        break;

      case 36:
        key = "home";
        break;

      case 35:
        key = "end";
        break;

      case 9:
        key = "tab";
        break;

      case 17:
        key = "ctrl";
        break;

      case 18:
        key = "alt";
        break;

      case 16:
        key = "shift";
        break;

      case 32:
        key = "space";
        break;

      case 36:
        key = "home";
        break;

      case 35:
        key = "end";
        break;

      case 33:
        key = "pgup";
        break;

      case 34:
        key = "pgdn";
        break;

      case 45:
        key = "ins";
        break;

      case 46:
        key = "del";
        break;

      case 107:
        key = "plus";
        break;

      case 109:
        key = "minus";
        break;

      default:
        key = "other";
        break;
    }

    return key;
  };
  /**
   * Checks if event key is one or more of the selected named keys.
   *
   * @param ev   Keyboard event
   * @param key  Named key or array of keys
   * @return Is event key one of the list?
   */


  Keyboard.prototype.isKey = function (ev, key) {
    var eventKey = this.getEventKey(ev);

    if (_Type__WEBPACK_IMPORTED_MODULE_0__.isString(key)) {
      key = [key];
    }

    return key.indexOf(eventKey) !== -1;
  };
  /**
   * Returns `true` if shift key was presset at the moment of the event.
   *
   * @param ev  Event object
   * @return Was shift pressed?
   */


  Keyboard.prototype.shiftKey = function (ev) {
    return ev.shiftKey;
  };
  /**
   * Returns `true` if ctrl key was presset at the moment of the event.
   *
   * @param ev  Event object
   * @return Was ctrl pressed?
   */


  Keyboard.prototype.ctrlKey = function (ev) {
    return ev.ctrlKey;
  };
  /**
   * Returns `true` if alt key was presset at the moment of the event
   * @param ev  Event object
   * @return Was alt pressed?
   */


  Keyboard.prototype.altKey = function (ev) {
    return ev.altKey;
  };
  /**
   * Returns `true` if meta key was presset at the moment of the event
   * @param ev  Event object
   * @return Was meta pressed?
   */


  Keyboard.prototype.metaKey = function (ev) {
    return ev.metaKey;
  };

  return Keyboard;
}();


/**
 * A single [[Keyboard]] instance to be reused across all elements so that
 * they don't need to instantiate their own.
 *
 * @ignore Exclude from docs
 */

var keyboard = new Keyboard();

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Language.js":
/*!***************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/utils/Language.js ***!
  \***************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Language": () => (/* binding */ Language)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Base */ "./node_modules/@amcharts/amcharts4/.internal/core/Base.js");
/* harmony import */ var _Adapter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Adapter */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Adapter.js");
/* harmony import */ var _Array__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Array */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Array.js");
/* harmony import */ var _Type__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/* harmony import */ var _lang_en__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../lang/en */ "./node_modules/@amcharts/amcharts4/lang/en.js");
/* harmony import */ var _Options__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Options */ "./node_modules/@amcharts/amcharts4/.internal/core/Options.js");
/**
 * Language module contains everything related to language-specific operations:
 * * Translating prompts
 * * Translating functions
 * * Date format localizations
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */







;
;
/**
 * Handles all language-related tasks, like loading and storing translations,
 * translating prompts, lists of prompts and even functions.
 *
 * Almost every object in amCharts4 universe will have a `language` property,
 * which can be accessed for prompt translation.
 *
 * @see {@link ILanguageAdapters} for a list of available Adapters
 * @todo Make prompt keys case-insensitive
 * @important
 */

var Language =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_6__.__extends)(Language, _super);
  /**
   * Constructor
   */


  function Language() {
    var _this = _super.call(this) || this;
    /**
     * Adapter.
     */


    _this.adapter = new _Adapter__WEBPACK_IMPORTED_MODULE_1__.Adapter(_this);
    /**
     * Current locale.
     */

    _this._locale = _lang_en__WEBPACK_IMPORTED_MODULE_4__["default"];
    /**
     * Default locale. A locale to fall back to if none is specified, or
     * if there's no translation for the prompt for the current language.
     */

    _this._defaultLocale = _lang_en__WEBPACK_IMPORTED_MODULE_4__["default"];
    _this.className = "Language"; // Set default language if necessary

    if (_Type__WEBPACK_IMPORTED_MODULE_3__.hasValue(_Options__WEBPACK_IMPORTED_MODULE_5__.options.defaultLocale)) {
      _this.locale = _Options__WEBPACK_IMPORTED_MODULE_5__.options.defaultLocale;
    }

    _this.applyTheme();

    return _this;
  }
  /**
   * Returns locale that is currently used.
   *
   * @param locale  Force locale. Will use current language if not set.
   * @return Locale
   */


  Language.prototype.getLocale = function (locale) {
    if (locale == null) {
      locale = this._locale;
    }

    return this.adapter.apply("locale", {
      locale: locale
    }).locale;
  };
  /**
   * Returns the translation of the string.
   *
   * If the translation is empty, it will return untranslated prompt.
   *
   * Third parameter and up are strings that can be used to replace "%X"
   * placeholders in prompt.
   *
   * E.g.:
   *
   * ```TypeScript
   * // Results in "This is a first translation test"
   * chart.language.translate("This is a %1 translation %2", null, "first", "test");
   * ```
   * ```JavaScriptScript
   * // Results in "This is a first translation test"
   * chart.language.translate("This is a %1 translation %2", null, "first", "test");
   * ```
   *
   * @param  prompt   A string to translate
   * @param  locale   Force translation into specific locale, e.g. fr_FR
   * @param  rest     Parameters to replace in string
   * @return          Translation
   */


  Language.prototype.translate = function (prompt, locale) {
    var rest = [];

    for (var _i = 2; _i < arguments.length; _i++) {
      rest[_i - 2] = arguments[_i];
    } // Get langauge


    locale = this.getLocale(locale); // Init translation

    var translation = prompt; // Get translations for the locale

    var translations = this.getTranslations(locale);
    var value = translations[prompt]; // Try to look for the translation

    if (value === null) {
      translation = "";
    } else if (_Type__WEBPACK_IMPORTED_MODULE_3__.hasValue(value)) {
      // It might be an empty string
      if (value) {
        translation = value;
      }
    } else if (locale !== this._defaultLocale) {
      // Try to look in default language
      return this.translate.apply(this, (0,tslib__WEBPACK_IMPORTED_MODULE_6__.__spread)([prompt, this._defaultLocale], rest));
    } // Replace %1, %2, etc params


    if (rest.length) {
      for (var len = rest.length, i = 0; i < len; ++i) {
        translation = translation.split("%" + (i + 1)).join(rest[i]);
      }
    } // Return the translation


    return this.adapter.apply("translate", {
      translation: translation,
      locale: locale
    }).translation;
  };
  /**
   * Non-type-checked translation.
   *
   * Can be used by plugins and other code that may have their own non-standard
   * translation prompts.
   *
   * @since 4.5.5
   * @param  prompt   A string to translate
   * @param  locale   Force translation into specific locale, e.g. fr_FR
   * @param  rest     Parameters to replace in string
   * @return          Translation
   */


  Language.prototype.translateAny = function (prompt, locale) {
    var rest = [];

    for (var _i = 2; _i < arguments.length; _i++) {
      rest[_i - 2] = arguments[_i];
    }

    return this.translate.apply(this, (0,tslib__WEBPACK_IMPORTED_MODULE_6__.__spread)([prompt, locale], rest));
  };
  /**
   * Sets a prompt translation.
   *
   * @since 4.9.35
   * @param  prompt       Prompt in English
   * @param  translation  Translation
   * @param  locale       Locale
   */


  Language.prototype.setTranslationAny = function (prompt, translation, locale) {
    var localeTarget = locale || this.locale;
    localeTarget[prompt] = translation;
  };
  /**
   * Translates prompt.
   *
   * If translation is empty, it will return empty string, which is a different
   * behavior than that of regular `translate`.
   *
   * @param prompt   A string to translate
   * @param locale   Force translation into specific locale, e.g. fr_FR
   * @param ...rest  Parameters to replace in string
   * @return Translation
   */


  Language.prototype.translateEmpty = function (prompt, locale) {
    var rest = [];

    for (var _i = 2; _i < arguments.length; _i++) {
      rest[_i - 2] = arguments[_i];
    }

    var translation = this.translate.apply(this, (0,tslib__WEBPACK_IMPORTED_MODULE_6__.__spread)([prompt, locale], rest));
    return translation == prompt ? "" : translation;
  };
  /**
   * Translates a function.
   *
   * This method will return a function reference, but will not run it. It's
   * up to the caller script to run the function.
   *
   * @param prompt  A function id to translate
   * @param locale  Force translation into specific locale. e.g. fr_FR
   * @return A language-specific version of the function
   * @todo Apply adapter
   */


  Language.prototype.translateFunc = function (prompt, locale) {
    // Get langauge
    locale = this.getLocale(locale); // Get translations for the locale

    var translations = this.getTranslations(locale);
    var value = translations[prompt]; // Try to look for the translation

    if (value != null) {
      return value;
    } // Try to look in default language


    if (locale !== this._defaultLocale) {
      return this.translateFunc(prompt, this._defaultLocale);
    } // Fail - return empty function


    return function () {
      return "";
    };
  };
  /**
   * Translates a list of prompts in one go.
   *
   * @param list    An array of strings to translate
   * @param locale  Force translation into specific locale. e.g. fr_FR
   * @return An array of translated strings in the same order as source list
   */


  Language.prototype.translateAll = function (list, locale) {
    var _this = this; // Translate all items in the list


    if (!this.isDefault()) {
      return _Array__WEBPACK_IMPORTED_MODULE_2__.map(list, function (x) {
        return _this.translate(x, locale);
      });
    } else {
      return list;
    }
  };
  /**
   * Returns `true` if the currently selected locale is a default locale.
   *
   * @return `true` if locale is default; `false` if it is not.
   */


  Language.prototype.isDefault = function () {
    return this._defaultLocale === this._locale;
  };

  Object.defineProperty(Language.prototype, "locale", {
    /**
     * @return Locale definition
     */
    get: function get() {
      return this._locale;
    },

    /**
     * Current locale.
     *
     * @param value  Locale definition (translations)
     */
    set: function set(value) {
      if (this._locale != value) {
        this._locale = value;

        if (this.events.isEnabled("localechanged")) {
          var event_1 = {
            type: "localechanged",
            locale: value,
            target: this
          };
          this.events.dispatchImmediately("localechanged", event_1);
        }
      }
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Returns translations for a given locale.
   *
   * @ignore
   * @deprecated
   * @param locale  Locale
   * @return Translations
   */

  Language.prototype.getTranslations = function (locale) {
    return this.adapter.apply("translations", {
      translations: locale,
      locale: locale
    }).translations;
  };

  return Language;
}(_Base__WEBPACK_IMPORTED_MODULE_0__.BaseObjectEvents);



/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/utils/List.js":
/*!***********************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/utils/List.js ***!
  \***********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "IndexedIterable": () => (/* binding */ IndexedIterable),
/* harmony export */   "List": () => (/* binding */ List),
/* harmony export */   "ListDisposer": () => (/* binding */ ListDisposer),
/* harmony export */   "ListGrouper": () => (/* binding */ ListGrouper),
/* harmony export */   "ListTemplate": () => (/* binding */ ListTemplate)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Disposer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Disposer */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Disposer.js");
/* harmony import */ var _EventDispatcher__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./EventDispatcher */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/EventDispatcher.js");
/* harmony import */ var _Array__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Array */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Array.js");
/* harmony import */ var _Iterator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Iterator */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Iterator.js");





/**
 * @todo Description
 */

var IndexedIterable =
/** @class */
function () {
  /**
   * Constructor.
   *
   * @param array  List items
   * @param start  Start index
   * @param end    End index
   */
  function IndexedIterable(array, start, end) {
    this._array = array;
    this._start = start;
    this._end = end;
  }
  /**
   * Returns a list item iterator.
   *
   * @return Iterator
   */


  IndexedIterable.prototype.iterator = function () {
    var _this = this;

    return function (push) {
      if (_this._start !== _this._end) {
        if (_this._start < _this._end) {
          for (var i = _this._start; i < _this._end; ++i) {
            if (!push(_this._array[i])) {
              break;
            }
          }
        } else {
          for (var i = _this._start - 1; i >= _this._end; --i) {
            if (!push(_this._array[i])) {
              break;
            }
          }
        }
      }
    };
  };
  /**
   * Returns an interable list sorted backwards than current list.
   *
   * @return List
   */


  IndexedIterable.prototype.backwards = function () {
    return new IndexedIterable(this._array, this._end, this._start);
  };
  /**
   * Returns a new list consisting only of specific range of items between
   * `start` and `end` indexes.
   *
   * @param start  Start index
   * @param end    End index
   * @return List
   */


  IndexedIterable.prototype.range = function (start, end) {
    if (start <= end) {
      if (this._start === this._end) {
        return this;
      } else if (this._start < this._end) {
        var diff = end - start;
        start = Math.max(this._start + start, this._start);
        end = Math.min(start + diff, this._end);
        return new IndexedIterable(this._array, start, end);
      } else {
        var diff = end - start;
        start = Math.max(this._start - start, this._end);
        end = Math.max(start - diff, this._end);
        return new IndexedIterable(this._array, start, end);
      }
    } else {
      throw new Error("Start index must be lower than end index");
    }
  };

  return IndexedIterable;
}();


/**
 * ListGrouper organizes [[List]] items into groups.
 *
 * @ignore Exclude from docs
 */

var ListGrouper =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_4__.__extends)(ListGrouper, _super);
  /**
   * Constructor.
   */


  function ListGrouper(list, getKey, sort) {
    var _this = _super.call(this, [list.events.on("inserted", function (x) {
      var value = x.newValue;

      var key = _this._getKey(value);

      var index = 0;
      _Iterator__WEBPACK_IMPORTED_MODULE_3__.eachContinue(list.iterator(), function (x) {
        if (x === value) {
          return false;
        } else if (_this._getKey(x) === key) {
          ++index;
        }

        return true;
      });

      _this._insert(value, key, index);
    }, undefined, false), list.events.on("removed", function (x) {
      _this._remove(x.oldValue);
    }, undefined, false)]) || this;
    /**
     * Grouping keys.
     */


    _this._keys = [];
    /**
     * List item groups.
     */

    _this._groups = {};
    _this._getKey = getKey;
    _this._sort = sort;
    _Iterator__WEBPACK_IMPORTED_MODULE_3__.each(list.iterator(), function (x) {
      _this._insert(x, getKey(x));
    });
    return _this;
  }
  /**
   * Inserts an item (`x`) to a specific group (`key`) and specific `index`.
   *
   * @param x      Item
   * @param key    Group name
   * @param index  Index
   */


  ListGrouper.prototype._insert = function (x, key, index) {
    if (this._groups[key] == null) {
      this._groups[key] = []; // TODO code duplication with SortedList

      var _a = _Array__WEBPACK_IMPORTED_MODULE_2__.getSortedIndex(this._keys, this._sort, key),
          found = _a.found,
          index_1 = _a.index;

      if (found) {
        throw new Error("Key already exists: " + key);
      } else {
        _Array__WEBPACK_IMPORTED_MODULE_2__.insertIndex(this._keys, index_1, key);
      }
    }

    if (index == null) {
      this._groups[key].push(x);
    } else {
      _Array__WEBPACK_IMPORTED_MODULE_2__.insertIndex(this._groups[key], index, x);
    }
  };
  /**
   * Removes an item from the list.
   *
   * @param x Item to remove
   */


  ListGrouper.prototype._remove = function (x) {
    var key = this._getKey(x);

    var values = this._groups[key];

    if (values != null) {
      _Array__WEBPACK_IMPORTED_MODULE_2__.remove(values, x);

      if (values.length === 0) {
        delete this._groups[key];

        var _a = _Array__WEBPACK_IMPORTED_MODULE_2__.getSortedIndex(this._keys, this._sort, key),
            found = _a.found,
            index = _a.index;

        if (found) {
          _Array__WEBPACK_IMPORTED_MODULE_2__.removeIndex(this._keys, index);
        } else {
          throw new Error("Key doesn't exist: " + key);
        }
      }
    }
  };
  /**
   * Returns an iterator for the list.
   *
   * The iterator will iterate through all items in all groups.
   *
   * @return Iterator
   */


  ListGrouper.prototype.iterator = function () {
    var _this = this;

    return _Iterator__WEBPACK_IMPORTED_MODULE_3__.flatten(_Iterator__WEBPACK_IMPORTED_MODULE_3__.map(_Iterator__WEBPACK_IMPORTED_MODULE_3__.fromArray(this._keys), function (key) {
      return _Iterator__WEBPACK_IMPORTED_MODULE_3__.fromArray(_this._groups[key]);
    }));
  };

  return ListGrouper;
}(_Disposer__WEBPACK_IMPORTED_MODULE_0__.MultiDisposer);


/**
 * A disposable list, which when disposed itself will call `dispose()` method
 * on all its items.
 */

var ListDisposer =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_4__.__extends)(ListDisposer, _super);

  function ListDisposer(list, disposeOnRemove) {
    if (disposeOnRemove === void 0) {
      disposeOnRemove = true;
    }

    var _this = this;

    if (disposeOnRemove) {
      var disposer_1 = list.events.on("removed", function (x) {
        x.oldValue.dispose();
      }, undefined, false);
      _this = _super.call(this, function () {
        disposer_1.dispose(); // TODO clear the list ?

        _Iterator__WEBPACK_IMPORTED_MODULE_3__.each(list.iterator(), function (x) {
          x.dispose();
        });
      }) || this;
    } else {
      _this = _super.call(this, function () {
        // TODO clear the list ?
        _Iterator__WEBPACK_IMPORTED_MODULE_3__.each(list.iterator(), function (x) {
          x.dispose();
        });
      }) || this;
    }

    return _this;
  }

  return ListDisposer;
}(_Disposer__WEBPACK_IMPORTED_MODULE_0__.Disposer);


/**
 * Checks if specific index fits into length.
 *
 * @param index  Index
 * @param len    Length
 */

function checkBounds(index, len) {
  if (!(index >= 0 && index < len)) {
    throw new Error("Index out of bounds: " + index);
  }
}
/**
 * A List class is used to hold a number of indexed items of the same type.
 */


var List =
/** @class */
function () {
  /**
   * Constructor
   *
   * @param initial  Inital list of values to add to list
   */
  function List(initial) {
    if (initial === void 0) {
      initial = [];
    }
    /**
     * Event dispatcher.
     */


    this.events = new _EventDispatcher__WEBPACK_IMPORTED_MODULE_1__.EventDispatcher();
    this._values = initial;
  }

  Object.defineProperty(List.prototype, "values", {
    /**
     * An array of values in the list.
     *
     * Do not use this property to add values. Rather use dedicated methods, like
     * `push()`, `removeIndex()`, etc.
     *
     * @readonly
     * @return List values
     */
    get: function get() {
      return this._values;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Checks if list contains specific item reference.
   *
   * @param item  Item to search for
   * @return `true` if found, `false` if not found
   */

  List.prototype.contains = function (value) {
    return this._values.indexOf(value) !== -1;
  };
  /**
   * Removes specific item from the list.
   *
   * @param item An item to remove
   */


  List.prototype.removeValue = function (value) {
    var i = 0;
    var length = this._values.length;

    while (i < length) {
      // TODO handle NaN
      if (this._values[i] === value) {
        this.removeIndex(i);
        --length;
      } else {
        ++i;
      }
    }
  };
  /**
   * Searches the list for specific item and returns its index.
   *
   * @param item  An item to search for
   * @return Index or -1 if not found
   */


  List.prototype.indexOf = function (value) {
    return _Array__WEBPACK_IMPORTED_MODULE_2__.indexOf(this._values, value);
  };

  Object.defineProperty(List.prototype, "length", {
    /**
     * Number of items in list.
     *
     * @readonly
     * @return Number of items
     */
    get: function get() {
      return this._values.length;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Checks if there's a value at specific index.
   *
   * @param index  Index
   * @return Value exists?
   */

  List.prototype.hasIndex = function (index) {
    return index >= 0 && index < this._values.length;
  };
  /**
   * Returns an item at specified index.
   *
   * @param index  Index
   * @return List item
   */


  List.prototype.getIndex = function (index) {
    return this._values[index];
  };
  /**
   * Sets value at specific index.
   *
   * If there's already a value at the index, it is overwritten.
   *
   * @param index  Index
   * @param value  New value
   * @return New value
   */


  List.prototype.setIndex = function (index, value) {
    checkBounds(index, this._values.length);
    var oldValue = this._values[index]; // Do nothing if the old value and the new value are the same

    if (oldValue !== value) {
      this._values[index] = value;

      if (this.events.isEnabled("setIndex")) {
        this.events.dispatchImmediately("setIndex", {
          type: "setIndex",
          target: this,
          index: index,
          oldValue: oldValue,
          newValue: value
        });
      }

      if (this.events.isEnabled("removed")) {
        this.events.dispatchImmediately("removed", {
          type: "removed",
          target: this,
          oldValue: oldValue
        });
      }

      if (this.events.isEnabled("inserted")) {
        this.events.dispatchImmediately("inserted", {
          type: "inserted",
          target: this,
          newValue: value
        });
      }
    }

    return oldValue;
  };
  /**
   * Adds an item to the list at a specific index, which pushes all the other
   * items further down the list.
   *
   * @param index Index
   * @param item  An item to add
   */


  List.prototype.insertIndex = function (index, value) {
    checkBounds(index, this._values.length + 1);
    _Array__WEBPACK_IMPORTED_MODULE_2__.insertIndex(this._values, index, value);

    if (this.events.isEnabled("insertIndex")) {
      this.events.dispatchImmediately("insertIndex", {
        type: "insertIndex",
        target: this,
        index: index,
        newValue: value
      });
    }

    if (this.events.isEnabled("inserted")) {
      this.events.dispatchImmediately("inserted", {
        type: "inserted",
        target: this,
        newValue: value
      });
    }
  };
  /**
   * [_sortQuicksort description]
   *
   * @todo Description
   * @param low    [description]
   * @param high   [description]
   * @param order  [description]
   */


  List.prototype._sortQuicksort = function (low, high, order) {
    if (low < high) {
      var p = this._sortPartition(low, high, order);

      this._sortQuicksort(low, p, order);

      this._sortQuicksort(p + 1, high, order);
    }
  };
  /**
   * [_sortPartition description]
   *
   * @todo Description
   * @param low    [description]
   * @param high   [description]
   * @param order  [description]
   * @return [description]
   */


  List.prototype._sortPartition = function (low, high, order) {
    var values = this._values;
    var pivot = values[low];
    var i = low - 1;
    var j = high + 1;

    for (;;) {
      do {
        ++i;
      } while (order(values[i], pivot) < 0);

      do {
        --j;
      } while (order(values[j], pivot) > 0);

      if (i >= j) {
        return j;
      } else {
        this.swap(i, j);
      }
    }
  };
  /**
   * Reorders list items according to specific ordering function.
   *
   * @param order  Ordering function
   */


  List.prototype.sort = function (order) {
    // https://en.wikipedia.org/wiki/Quicksort#Hoare_partition_scheme
    // @todo faster implementation of this
    // @todo test this
    this._sortQuicksort(0, this._values.length - 1, order);
  };
  /**
   * Swaps indexes of two items in the list.
   *
   * @param a  Item 1
   * @param b  Item 2
   */


  List.prototype.swap = function (a, b) {
    var len = this._values.length;
    checkBounds(a, len);
    checkBounds(b, len);

    if (a !== b) {
      var value_a = this._values[a];
      var value_b = this._values[b];
      this._values[a] = value_b;

      if (this.events.isEnabled("setIndex")) {
        this.events.dispatchImmediately("setIndex", {
          type: "setIndex",
          target: this,
          index: a,
          oldValue: value_a,
          newValue: value_b
        });
      }

      this._values[b] = value_a;

      if (this.events.isEnabled("setIndex")) {
        this.events.dispatchImmediately("setIndex", {
          type: "setIndex",
          target: this,
          index: b,
          oldValue: value_b,
          newValue: value_a
        });
      }
    }
  };
  /**
   * Removes a value at specific index.
   *
   * @param index  Index of value to remove
   * @return Removed value
   */


  List.prototype.removeIndex = function (index) {
    checkBounds(index, this._values.length);
    var oldValue = this._values[index];
    _Array__WEBPACK_IMPORTED_MODULE_2__.removeIndex(this._values, index);

    if (this.events.isEnabled("removeIndex")) {
      this.events.dispatchImmediately("removeIndex", {
        type: "removeIndex",
        target: this,
        index: index,
        oldValue: oldValue
      });
    }

    if (this.events.isEnabled("removed")) {
      this.events.dispatchImmediately("removed", {
        type: "removed",
        target: this,
        oldValue: oldValue
      });
    }

    return oldValue;
  };
  /**
   * Moves an item to a specific index within the list.
   *
   * If the index is not specified it will move the item to the end of the
   * list.
   *
   * @param value  Item to move
   * @param index  Index to place item at
   */


  List.prototype.moveValue = function (value, toIndex) {
    // TODO don't do anything if the desired index is the same as the current index
    var index = this.indexOf(value); // TODO remove all old values rather than only the first ?

    if (index !== -1) {
      var oldValue = this._values[index];
      _Array__WEBPACK_IMPORTED_MODULE_2__.removeIndex(this._values, index);

      if (this.events.isEnabled("removeIndex")) {
        this.events.dispatchImmediately("removeIndex", {
          type: "removeIndex",
          target: this,
          index: index,
          oldValue: oldValue
        });
      }
    }

    if (toIndex == null) {
      toIndex = this._values.length;

      this._values.push(value);
    } else {
      _Array__WEBPACK_IMPORTED_MODULE_2__.insertIndex(this._values, toIndex, value);
    }

    if (this.events.isEnabled("insertIndex")) {
      this.events.dispatchImmediately("insertIndex", {
        type: "insertIndex",
        target: this,
        index: toIndex,
        newValue: value
      });
    }

    if (index === -1) {
      if (this.events.isEnabled("inserted")) {
        this.events.dispatchImmediately("inserted", {
          type: "inserted",
          target: this,
          newValue: value
        });
      }
    }
  };
  /**
   * Adds an item to the end of the list.
   *
   * @param item  An item to add
   */


  List.prototype.push = function (value) {
    var index = this._values.push(value) - 1;

    if (this.events.isEnabled("insertIndex")) {
      this.events.dispatchImmediately("insertIndex", {
        type: "insertIndex",
        target: this,
        index: index,
        newValue: value
      });
    }

    if (this.events.isEnabled("inserted")) {
      this.events.dispatchImmediately("inserted", {
        type: "inserted",
        target: this,
        newValue: value
      });
    }

    return value;
  };
  /**
   * Adds an item as a first item in the list.
   *
   * @param item  An item to add
   */


  List.prototype.unshift = function (value) {
    this.insertIndex(0, value);
  };
  /**
   * Adds multiple items to the list.
   *
   * @param items  An Array of items to add
   */


  List.prototype.pushAll = function (values) {
    var _this = this;

    _Array__WEBPACK_IMPORTED_MODULE_2__.each(values, function (value) {
      _this.push(value);
    });
  };
  /**
   * Copies and adds items from abother list.
   *
   * @param source  A list top copy items from
   */


  List.prototype.copyFrom = function (source) {
    this.pushAll(source._values);
  };
  /**
   * Returns the last item from the list, and removes it.
   *
   * @return Item
   */


  List.prototype.pop = function () {
    var index = this._values.length - 1;
    return index < 0 ? undefined : this.removeIndex(this._values.length - 1);
  };
  /**
   * Returns the first item from the list, and removes it.
   *
   * @return Item
   */


  List.prototype.shift = function () {
    return this._values.length ? this.removeIndex(0) : undefined;
  };
  /**
   * Sets multiple items to the list.
   *
   * All current items are removed.
   *
   * @param newArray  New items
   */


  List.prototype.setAll = function (newArray) {
    var _this = this; // @tod if a value exists in both the new and old arrays, don't send remove/insert events


    var oldArray = _Array__WEBPACK_IMPORTED_MODULE_2__.copy(this._values);
    this._values.length = 0;
    _Array__WEBPACK_IMPORTED_MODULE_2__.each(newArray, function (value) {
      _this._values.push(value);
    });

    if (this.events.isEnabled("setAll")) {
      this.events.dispatchImmediately("setAll", {
        type: "setAll",
        target: this,
        oldArray: oldArray,
        newArray: this._values // TODO make a copy ?

      });
    }

    if (this.events.isEnabled("removed")) {
      _Array__WEBPACK_IMPORTED_MODULE_2__.each(oldArray, function (x) {
        _this.events.dispatchImmediately("removed", {
          type: "removed",
          target: _this,
          oldValue: x
        });
      });
    }

    if (this.events.isEnabled("inserted")) {
      _Array__WEBPACK_IMPORTED_MODULE_2__.each(this._values, function (x) {
        _this.events.dispatchImmediately("inserted", {
          type: "inserted",
          target: _this,
          newValue: x
        });
      });
    }
  };
  /**
   * Removes all items from the list.
   */


  List.prototype.clear = function () {
    this.setAll([]);
  };
  /**
   * Returns a list iterator.
   *
   * @return Iterator
   */


  List.prototype.iterator = function () {
    return _Iterator__WEBPACK_IMPORTED_MODULE_3__.fromArray(this._values);
  };
  /**
   * Returns an ES6 iterator for the list.
   */


  List.prototype[Symbol.iterator] = function () {
    var length, i;
    return (0,tslib__WEBPACK_IMPORTED_MODULE_4__.__generator)(this, function (_a) {
      switch (_a.label) {
        case 0:
          length = this._values.length;
          i = 0;
          _a.label = 1;

        case 1:
          if (!(i < length)) return [3
          /*break*/
          , 4];
          return [4
          /*yield*/
          , this._values[i]];

        case 2:
          _a.sent();

          _a.label = 3;

        case 3:
          ++i;
          return [3
          /*break*/
          , 1];

        case 4:
          return [2
          /*return*/
          ];
      }
    });
  };
  /**
   * Calls `f` for each element in the list.
   *
   * `f` should have at least one parameter defined which will get a current
   * item, with optional second argument - index.
   */


  List.prototype.each = function (f) {
    _Array__WEBPACK_IMPORTED_MODULE_2__.each(this._values, f);
  };
  /**
   * Returns a specific range of list items, which can be iterated.
   *
   * @ignore Exclude from docs
   * @todo Code duplication with IndexedIterable
   * @param start  Start index
   * @param end    End index
   * @return Range
   */


  List.prototype.range = function (start, end) {
    if (start <= end) {
      var diff = end - start;
      start = Math.max(start, 0);
      end = Math.min(start + diff, this._values.length);
      return new IndexedIterable(this._values, start, end);
    } else {
      throw new Error("Start index must be lower than end index");
    }
  };
  /**
   * Returns an iterator that has list items sorted backwards.
   *
   * @ignore Exclude from docs
   * @return List
   */


  List.prototype.backwards = function () {
    return new IndexedIterable(this._values, this._values.length, 0);
  };

  return List;
}();


/**
 * A version of a [[List]] that has a "template".
 *
 * A template is an instance of an object, that can be used to create new
 * elements in the list without actually needing to create instances for those.
 *
 * When new element is created in the list, e.g. by calling its `create()`
 * method, an exact copy of the element is created (including properties and
 * other attributes), inserted into the list and returned.
 */

var ListTemplate =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_4__.__extends)(ListTemplate, _super);
  /**
   * Constructor
   *
   * @param t Template object
   */


  function ListTemplate(t) {
    var _this = _super.call(this) || this;

    _this.template = t;
    return _this;
  }

  Object.defineProperty(ListTemplate.prototype, "template", {
    /**
     * @return Template object
     */
    get: function get() {
      return this._template;
    },

    /**
     * A "template" object to copy all properties from when creating new list
     * items.
     *
     * @param v  Template object
     */
    set: function set(v) {
      v.isTemplate = true;
      this._template = v;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Copies all elements from other list.
   *
   * @param source  Source list
   */

  ListTemplate.prototype.copyFrom = function (source) {
    var _this = this;

    _Iterator__WEBPACK_IMPORTED_MODULE_3__.each(source.iterator(), function (value) {
      _this.push(value.clone());
    });
  };

  ListTemplate.prototype.create = function (make) {
    var clone = make != null ? new make() : this.template.clone();
    this.push(clone);
    return clone;
  };
  /**
   * Creates an exact clone of the list, including its items and template.
   *
   * @return New list
   */


  ListTemplate.prototype.clone = function () {
    var out = new ListTemplate(this.template);
    var values = this.values;
    var length = values.length;

    for (var i = 0; i < length; ++i) {
      out.push(values[i].clone());
    }

    return out;
  };

  return ListTemplate;
}(List);



/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Log.js":
/*!**********************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/utils/Log.js ***!
  \**********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "log": () => (/* binding */ log),
/* harmony export */   "warn": () => (/* binding */ warn)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Options__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Options */ "./node_modules/@amcharts/amcharts4/.internal/core/Options.js");


/**
 * Outputs string to console if `verbose` is `true`.
 */

function log() {
  var messages = [];

  for (var _i = 0; _i < arguments.length; _i++) {
    messages[_i] = arguments[_i];
  }

  if (_Options__WEBPACK_IMPORTED_MODULE_0__.options.verbose) {
    if (console) {
      console.log.apply(console, (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__spread)(messages));
    }
  }
}
/**
 * Outputs a warning to the console.
 */

function warn() {
  var messages = [];

  for (var _i = 0; _i < arguments.length; _i++) {
    messages[_i] = arguments[_i];
  }

  if (!_Options__WEBPACK_IMPORTED_MODULE_0__.options.suppressWarnings) {
    if (console) {
      console.warn.apply(console, (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__spread)(messages));
    }
  }
}

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js":
/*!***********************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js ***!
  \***********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "DEGREES": () => (/* binding */ DEGREES),
/* harmony export */   "HALFPI": () => (/* binding */ HALFPI),
/* harmony export */   "PI": () => (/* binding */ PI),
/* harmony export */   "RADIANS": () => (/* binding */ RADIANS),
/* harmony export */   "adjustTension": () => (/* binding */ adjustTension),
/* harmony export */   "ceil": () => (/* binding */ ceil),
/* harmony export */   "closest": () => (/* binding */ closest),
/* harmony export */   "cos": () => (/* binding */ cos),
/* harmony export */   "fitAngleToRange": () => (/* binding */ fitAngleToRange),
/* harmony export */   "fitToRange": () => (/* binding */ fitToRange),
/* harmony export */   "getAngle": () => (/* binding */ getAngle),
/* harmony export */   "getArcPoint": () => (/* binding */ getArcPoint),
/* harmony export */   "getArcRect": () => (/* binding */ getArcRect),
/* harmony export */   "getBBox": () => (/* binding */ getBBox),
/* harmony export */   "getCenterShift": () => (/* binding */ getCenterShift),
/* harmony export */   "getCommonRectangle": () => (/* binding */ getCommonRectangle),
/* harmony export */   "getCubicControlPointA": () => (/* binding */ getCubicControlPointA),
/* harmony export */   "getCubicControlPointB": () => (/* binding */ getCubicControlPointB),
/* harmony export */   "getCubicCurveDistance": () => (/* binding */ getCubicCurveDistance),
/* harmony export */   "getDistance": () => (/* binding */ getDistance),
/* harmony export */   "getHorizontalDistance": () => (/* binding */ getHorizontalDistance),
/* harmony export */   "getLineIntersection": () => (/* binding */ getLineIntersection),
/* harmony export */   "getMidPoint": () => (/* binding */ getMidPoint),
/* harmony export */   "getPointOnCubicCurve": () => (/* binding */ getPointOnCubicCurve),
/* harmony export */   "getPointOnQuadraticCurve": () => (/* binding */ getPointOnQuadraticCurve),
/* harmony export */   "getRotation": () => (/* binding */ getRotation),
/* harmony export */   "getScale": () => (/* binding */ getScale),
/* harmony export */   "getVerticalDistance": () => (/* binding */ getVerticalDistance),
/* harmony export */   "intersect": () => (/* binding */ intersect),
/* harmony export */   "intersection": () => (/* binding */ intersection),
/* harmony export */   "invertRange": () => (/* binding */ invertRange),
/* harmony export */   "isInRectangle": () => (/* binding */ isInRectangle),
/* harmony export */   "max": () => (/* binding */ max),
/* harmony export */   "min": () => (/* binding */ min),
/* harmony export */   "normalizeAngle": () => (/* binding */ normalizeAngle),
/* harmony export */   "round": () => (/* binding */ round),
/* harmony export */   "sin": () => (/* binding */ sin),
/* harmony export */   "stretch": () => (/* binding */ stretch),
/* harmony export */   "tan": () => (/* binding */ tan),
/* harmony export */   "toNumberRange": () => (/* binding */ toNumberRange)
/* harmony export */ });
/* harmony import */ var _Type__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/**
 * A collection of Math-related functions
 *
 * @todo Comment trigonometric functions?
 */

/**
 * ============================================================================
 * CONSTANTS
 * ============================================================================
 * @hidden
 */

var PI = Math.PI;
var HALFPI = PI / 2;
var RADIANS = PI / 180;
var DEGREES = 180 / PI;
/**
 * Converts any value and fits it into a specific value range.
 *
 * @param value  Source value
 * @param min    Minimum allowable value
 * @param max    Maximum allowable value
 * @return Number
 */

function toNumberRange(value, min, max) {
  if (_Type__WEBPACK_IMPORTED_MODULE_0__.hasValue(value)) {
    value = _Type__WEBPACK_IMPORTED_MODULE_0__.toNumber(value);
    return fitToRange(value, min, max);
  }

  return value;
}
/**
 * Rounds the numeric value to whole number or specific precision of set.
 *
 * @param value      Value
 * @param precision  Precision (number of decimal points)
 * @param floor  In case value ends with 0.5 and precision is 0, we might need to floor the value instead of ceiling it.
 * @return Rounded value
 */

function round(value, precision, floor) {
  if (!_Type__WEBPACK_IMPORTED_MODULE_0__.isNumber(precision) || precision <= 0) {
    var rounded = Math.round(value);

    if (floor) {
      if (rounded - value == 0.5) {
        rounded--;
      }
    }

    return rounded;
  } else {
    var d = Math.pow(10, precision);
    return Math.round(value * d) / d;
  }
}
/**
 * Ceils the numeric value to whole number or specific precision of set.
 *
 * @param value      Value
 * @param precision  Precision (number of decimal points)
 * @return Rounded value
 */

function ceil(value, precision) {
  if (!_Type__WEBPACK_IMPORTED_MODULE_0__.isNumber(precision) || precision <= 0) {
    return Math.ceil(value);
  } else {
    var d = Math.pow(10, precision);
    return Math.ceil(value * d) / d;
  }
}
/**
 * Stretches `t` so that it will always be between `from` and `to`.
 *
 * @param t     Number from 0 to 1
 * @param from  Lowest possible value
 * @param to    Highest possible value
 * @return Adjusted value
 */

function stretch(t, from, to) {
  return t * (to - from) + from;
}
/**
 * Adjust numeric value so it fits to specific value range.
 *
 * @param value     Value
 * @param minValue  Lowest possible value
 * @param maxValue  Highest possible value
 * @return Adjusted value
 */

function fitToRange(value, minValue, maxValue) {
  if (_Type__WEBPACK_IMPORTED_MODULE_0__.isNumber(minValue)) {
    if (_Type__WEBPACK_IMPORTED_MODULE_0__.isNumber(maxValue) && maxValue < minValue) {
      var temp = maxValue;
      maxValue = minValue;
      minValue = temp;
    }

    if (value < minValue) {
      value = minValue;
    }
  }

  if (_Type__WEBPACK_IMPORTED_MODULE_0__.isNumber(maxValue)) {
    if (value > maxValue) {
      value = maxValue;
    }
  }

  return value;
}
/**
 * Returns sine of a number.
 *
 * @param value  Value
 * @return Sine
 */

function sin(value) {
  return round(Math.sin(RADIANS * value), 10);
}
/**
 * Returns tan of a number.
 *
 * @param value  Value
 * @return Sine
 */

function tan(value) {
  return round(Math.tan(RADIANS * value), 10);
}
/**
 * Returns cosine of a number.
 *
 * @param value  Value
 * @return Cosine
 */

function cos(value) {
  return round(Math.cos(RADIANS * value), 10);
}
function max(left, right) {
  if (_Type__WEBPACK_IMPORTED_MODULE_0__.isNumber(left)) {
    if (_Type__WEBPACK_IMPORTED_MODULE_0__.isNumber(right)) {
      if (right > left) {
        return right;
      } else {
        return left;
      }
    } else {
      return left;
    }
  } else if (_Type__WEBPACK_IMPORTED_MODULE_0__.isNumber(right)) {
    return right;
  } else {
    return null;
  }
}
function min(left, right) {
  if (_Type__WEBPACK_IMPORTED_MODULE_0__.isNumber(left)) {
    if (_Type__WEBPACK_IMPORTED_MODULE_0__.isNumber(right)) {
      if (right < left) {
        return right;
      } else {
        return left;
      }
    } else {
      return left;
    }
  } else if (_Type__WEBPACK_IMPORTED_MODULE_0__.isNumber(right)) {
    return right;
  } else {
    return null;
  }
}
/**
 * Returns the closest value from the array of values to the reference value.
 *
 * @param values  Array of values
 * @param value   Reference value
 * @return Closes value from the array
 */

function closest(values, referenceValue) {
  return values.reduce(function (prev, curr) {
    return Math.abs(curr - referenceValue) < Math.abs(prev - referenceValue) ? curr : prev;
  });
}
/**
 * Checks whether two ranges of values intersect.
 *
 * @param range1  Range 1
 * @param range2  Range 2
 * @return Any intersecting numbers?
 */

function intersect(range1, range2) {
  var start1 = _Type__WEBPACK_IMPORTED_MODULE_0__.getValue(range1.start);
  var start2 = _Type__WEBPACK_IMPORTED_MODULE_0__.getValue(range2.start);
  var end1 = _Type__WEBPACK_IMPORTED_MODULE_0__.getValue(range1.end);
  var end2 = _Type__WEBPACK_IMPORTED_MODULE_0__.getValue(range2.end);
  return Math.max(start1, start2) <= Math.min(end1, end2);
}
/**
 * Inverts the range of values.
 *
 * @param range  Range
 */

function invertRange(range) {
  var start = _Type__WEBPACK_IMPORTED_MODULE_0__.getValue(range.start);
  var end = _Type__WEBPACK_IMPORTED_MODULE_0__.getValue(range.end);
  return {
    start: 1 - end,
    end: 1 - start
  };
}
/**
 * Returns an intersection range between two ranges of values.
 *
 * @param range1  Range 1
 * @param range2  Range 2
 * @return Intersecting value range
 */

function intersection(range1, range2) {
  var start1 = _Type__WEBPACK_IMPORTED_MODULE_0__.getValue(range1.start);
  var start2 = _Type__WEBPACK_IMPORTED_MODULE_0__.getValue(range2.start);
  var end1 = _Type__WEBPACK_IMPORTED_MODULE_0__.getValue(range1.end);
  var end2 = _Type__WEBPACK_IMPORTED_MODULE_0__.getValue(range2.end);
  var startMax = Math.max(start1, start2);
  var endMin = Math.min(end1, end2);

  if (endMin < startMax) {
    return undefined;
  } else {
    return {
      start: startMax,
      end: endMin
    };
  }
}
/**
 * Returns pixel "distance" between two points.
 *
 * If second point is not specified, distance from {x:0, y:0} point is
 * calculated.
 *
 * @param point1  Point 1
 * @param point2  Point 2
 * @return Distance in relative pixels
 */

function getDistance(point1, point2) {
  if (!point1) {
    return 0;
  }

  if (!point2) {
    point2 = {
      x: 0,
      y: 0
    };
  }

  return Math.sqrt(Math.pow(Math.abs(point1.x - point2.x), 2) + Math.pow(Math.abs(point1.y - point2.y), 2));
}
/**
 * Returns pixel "horizontal distance" between two points.
 *
 * If second point is not specified, distance from {x:0, y:0} point is
 * calculated.
 *
 * @param point1  Point 1
 * @param point2  Point 2
 * @return Distance in relative pixels
 */

function getHorizontalDistance(point1, point2) {
  if (!point1) {
    return 0;
  }

  if (!point2) {
    point2 = {
      x: 0,
      y: 0
    };
  }

  return Math.abs(point1.x - point2.x);
}
/**
 * Returns pixel "vertical distance" between two points.
 *
 * If second point is not specified, distance from {x:0, y:0} point is
 * calculated.
 *
 * @param point1  Point 1
 * @param point2  Point 2
 * @return Distance in relative pixels
 */

function getVerticalDistance(point1, point2) {
  if (!point1) {
    return 0;
  }

  if (!point2) {
    point2 = {
      x: 0,
      y: 0
    };
  }

  return Math.abs(point1.y - point2.y);
}
/**
 * Returns approximate pixel "distance" between two points of cubic curve
 *
 * If second point is not specified, distance from {x:0, y:0} point is
 * calculated.
 *
 * @param point1  Point 1
 * @param point2  Point 2
 * @param controlPointA  Control Point 1
 * @param controlPointB  Control Point 2
 * @param stepCount  number of steps (the more, the more accurate result)
 * @return Distance in relative pixels
 */

function getCubicCurveDistance(point1, point2, controlPointA, controlPointB, stepCount) {
  if (!point1) {
    return 0;
  }

  if (!point2) {
    point2 = {
      x: 0,
      y: 0
    };
  }

  var distance = 0;
  var prevPoint = point1;

  if (stepCount > 0) {
    for (var s = 0; s <= stepCount; s++) {
      var point = getPointOnCubicCurve(point1, point2, controlPointA, controlPointB, s / stepCount);
      distance += getDistance(prevPoint, point);
      prevPoint = point;
    }
  }

  return distance;
}
/**
 * Returns scale based on original and end position of the two points.
 *
 * @param point1       Current position of point 1
 * @param startPoint1  Start position of point 1
 * @param point2       Current position of point 1
 * @param startPoint2  Start position of point 2
 * @return Scale        Calculated scale
 */

function getScale(point1, startPoint1, point2, startPoint2) {
  var initialDistance = getDistance(startPoint1, startPoint2);
  var currentDistance = getDistance(point1, point2);
  return Math.abs(currentDistance / initialDistance);
}
/**
 * Returns an exact mid point between two points.
 *
 * @param point1     Position of point 1
 * @param point2     Position of point 2
 * @return Mid point  Position of mid-point
 */

function getMidPoint(point1, point2, position) {
  if (!_Type__WEBPACK_IMPORTED_MODULE_0__.isNumber(position)) {
    position = 0.5;
  }

  return {
    "x": point1.x + (point2.x - point1.x) * position,
    "y": point1.y + (point2.y - point1.y) * position
  };
}
/**
 * Returns difference in angles between starting and ending position of two
 * vectors.
 *
 * @param point1       Current position of point 1
 * @param startPoint1  Start position of point 1
 * @param point2       Current position of point 1
 * @param startPoint2  Start position of point 2
 * @return Angle difference in degrees
 */

function getRotation(point1, startPoint1, point2, startPoint2) {
  // Get start and end angles
  var startAngle = getAngle(startPoint1, startPoint2);
  var angle = getAngle(point1, point2); // Calculate angle

  var diff = startAngle - angle;

  if (diff < 0) {
    diff += 360;
  }

  return diff;
}
/**
 * Calculates angle of the vector based on two or one point.
 *
 * @param point1  Point 1
 * @param point2  Point 2
 * @return Angle in degrees
 */

function getAngle(point1, point2) {
  if (!point2) {
    point2 = {
      x: point1.x * 2,
      y: point1.y * 2
    };
  }

  var diffX = point2.x - point1.x;
  var diffY = point2.y - point1.y;
  var angle = Math.atan2(diffY, diffX) * DEGREES;

  if (angle < 0) {
    angle += 360;
  }

  return normalizeAngle(angle);
}
/**
 * Returns the shift in coordinates of the center when item is rotated, moved
 * and scaled at the same time.
 *
 * @param center       Current center
 * @param point1       Frst reference point
 * @param startPoint1  Original position of the first reference point
 * @param point2       Second reference point
 * @param startPoint2  Original position of the first reference point
 * @return Shift in center point coordinates
 */

function getCenterShift(center, point1, startPoint1, point2, startPoint2) {
  // Get angle
  var angle = getRotation(point1, startPoint1, point2, startPoint2) - 90;

  if (angle < 0) {
    angle += 360;
  } // Get distance between new position


  var distance = getDistance(point1, point2); // Calculate new X

  var x = Math.cos(angle) / distance + point1.x;
  var y = Math.cos(angle) / distance + point1.y;
  var shift = {
    "x": x - center.x,
    "y": y - center.y
  };
  return shift;
}
/**
 * Converts an array of points into a bounding box rectangle.
 *
 * Array can contain any number of points.
 *
 * @param points  Points
 * @return Bounding box rectangle
 */

function getBBox(points) {
  if (points) {
    var length_1 = points.length;

    if (length_1 !== 0) {
      var left = void 0;
      var right = void 0;
      var top_1;
      var bottom = void 0;

      for (var i = 0; i < length_1; i++) {
        var point = points[i];

        if (!_Type__WEBPACK_IMPORTED_MODULE_0__.isNumber(right) || point.x > right) {
          right = point.x;
        }

        if (!_Type__WEBPACK_IMPORTED_MODULE_0__.isNumber(left) || point.x < left) {
          left = point.x;
        }

        if (!_Type__WEBPACK_IMPORTED_MODULE_0__.isNumber(top_1) || point.y < top_1) {
          top_1 = point.y;
        }

        if (!_Type__WEBPACK_IMPORTED_MODULE_0__.isNumber(bottom) || point.y > bottom) {
          bottom = point.y;
        }
      }

      return {
        x: left,
        y: top_1,
        width: right - left,
        height: bottom - top_1
      };
    }
  }

  return {
    x: 0,
    y: 0,
    width: 0,
    height: 0
  };
}
/**
 * Returns a [[IRectangle]] object representing a common rectangle that fits
 * all passed in rectangles in it.
 *
 * @param rectangles  An array of rectangles
 * @return Common rectangle
 */

function getCommonRectangle(rectangles) {
  var length = rectangles.length;

  if (length !== 0) {
    var minX = void 0;
    var minY = void 0;
    var maxX = void 0;
    var maxY = void 0;

    for (var i = 0; i < length; i++) {
      var rectangle = rectangles[i];
      minX = min(rectangle.x, minX);
      minY = min(rectangle.y, minY);
      maxX = max(rectangle.x + rectangle.width, maxX);
      maxY = max(rectangle.y + rectangle.height, maxY);
    }

    return {
      x: minX,
      y: minY,
      width: maxX - minX,
      height: maxY - minY
    };
  }
}
/**
 * [getPointOnQuadraticCurve description]
 *
 * @ignore Exclude from docs
 * @todo Description
 * @param pointA        [description]
 * @param pointB        [description]
 * @param controlPoint  [description]
 * @param position      [description]
 * @return [description]
 */

function getPointOnQuadraticCurve(pointA, pointB, controlPoint, position) {
  var x = (1 - position) * (1 - position) * pointA.x + 2 * (1 - position) * position * controlPoint.x + position * position * pointB.x;
  var y = (1 - position) * (1 - position) * pointA.y + 2 * (1 - position) * position * controlPoint.y + position * position * pointB.y;
  return {
    x: x,
    y: y
  };
}
/**
 * [getPointOnCubicCurve description]
 *
 * @ignore Exclude from docs
 * @todo Description
 * @param pointA         [description]
 * @param pointB         [description]
 * @param controlPointA  [description]
 * @param controlPointB  [description]
 * @param position       [description]
 * @return [description]
 */

function getPointOnCubicCurve(pointA, pointB, controlPointA, controlPointB, position) {
  var point = {
    x: 0,
    y: 0
  };
  var mt1 = 1 - position;
  var mt2 = mt1 * mt1;
  var mt3 = mt2 * mt1;
  point.x = pointA.x * mt3 + controlPointA.x * 3 * mt2 * position + controlPointB.x * 3 * mt1 * position * position + pointB.x * position * position * position;
  point.y = pointA.y * mt3 + controlPointA.y * 3 * mt2 * position + controlPointB.y * 3 * mt1 * position * position + pointB.y * position * position * position;
  return point;
}
/**
 * [getCubicControlPointA description]
 *
 * @ignore Exclude from docs
 * @todo Description
 * @param p0        [description]
 * @param p1        [description]
 * @param p2        [description]
 * @param p3        [description]
 * @param tensionX  [description]
 * @param tensionY  [description]
 * @return [description]
 */

function getCubicControlPointA(p0, p1, p2, p3, tensionX, tensionY) {
  tensionX = adjustTension(tensionX);
  tensionY = adjustTension(tensionY);
  return {
    x: (-p0.x + p1.x / tensionX + p2.x) * tensionX,
    y: (-p0.y + p1.y / tensionY + p2.y) * tensionY
  };
}
/**
 * [getCubicControlPointB description]
 *
 * @ignore Exclude from docs
 * @todo Description
 * @param p0        [description]
 * @param p1        [description]
 * @param p2        [description]
 * @param p3        [description]
 * @param tensionX  [description]
 * @param tensionY  [description]
 * @return [description]
 */

function getCubicControlPointB(p0, p1, p2, p3, tensionX, tensionY) {
  tensionX = adjustTension(tensionX);
  tensionY = adjustTension(tensionY);
  return {
    x: (p1.x + p2.x / tensionX - p3.x) * tensionX,
    y: (p1.y + p2.y / tensionY - p3.y) * tensionY
  };
}
/**
 * [adjustTension description]
 *
 * @ignore Exclude from docs
 * @todo Description
 * @param tension  [description]
 * @return [description]
 */

function adjustTension(tension) {
  return 1 - tension + 0.00001;
}
/**
 * [normalizeAngle description]
 *
 * @ignore Exclude from docs
 * @todo Description
 * @param value  [description]
 * @return [description]
 */

function normalizeAngle(value) {
  if (value == 360) {
    return 360;
  }

  return value % 360;
}
/**
 * [normalizeAngleToRange description]
 *
 * @ignore Exclude from docs
 * @todo Description
 * @todo review this with various angles, can be tested on radar chart with custom start/end angles
 * @param value       [description]
 * @param startAngle  [description]
 * @param endAngle    [description]
 * @return [description]
 */

function fitAngleToRange(value, startAngle, endAngle) {
  if (startAngle > endAngle) {
    var temp = startAngle;
    startAngle = endAngle;
    endAngle = temp;
  }

  value = normalizeAngle(value);
  var count = (startAngle - normalizeAngle(startAngle)) / 360;

  if (value < startAngle) {
    value += 360 * (count + 1);
  }

  var maxEnd = startAngle + (endAngle - startAngle) / 2 + 180;
  var maxStart = startAngle + (endAngle - startAngle) / 2 - 180;

  if (value > endAngle) {
    if (value - 360 > startAngle) {
      value -= 360;
    } else {
      if (value < maxEnd) {
        value = endAngle;
      } else {
        value = startAngle;
      }
    }
  }

  if (value < startAngle) {
    if (value > maxStart) {
      value = startAngle;
    } else {
      value = endAngle;
    }
  }

  return value;
}
/**
 * Returns [[IRectangle]] of an arc in relative values, assuming that the
 * center is at the circle center.
 *
 * Used to find out max radius of an arc.
 *
 * @ignore Exclude from docs
 * @param startAngle  Start angle
 * @param endAngle    End angle
 * @param radius    	 Relative radius
 * @return Rectangle
 */

function getArcRect(startAngle, endAngle, radius) {
  var minX = Number.MAX_VALUE;
  var minY = Number.MAX_VALUE;
  var maxX = -Number.MAX_VALUE;
  var maxY = -Number.MAX_VALUE;
  var bpoints = [];

  if (!_Type__WEBPACK_IMPORTED_MODULE_0__.isNumber(radius)) {
    radius = 1;
  }

  bpoints.push(getArcPoint(radius, startAngle));
  bpoints.push(getArcPoint(radius, endAngle));
  var fromAngle = Math.min(Math.floor(startAngle / 90) * 90, Math.floor(endAngle / 90) * 90);
  var toAngle = Math.max(Math.ceil(startAngle / 90) * 90, Math.ceil(endAngle / 90) * 90);

  for (var angle = fromAngle; angle <= toAngle; angle += 90) {
    if (angle >= startAngle && angle <= endAngle) {
      bpoints.push(getArcPoint(radius, angle));
    }
  }

  for (var i = 0; i < bpoints.length; i++) {
    var pt = bpoints[i];

    if (pt.x < minX) {
      minX = pt.x;
    }

    if (pt.y < minY) {
      minY = pt.y;
    }

    if (pt.x > maxX) {
      maxX = pt.x;
    }

    if (pt.y > maxY) {
      maxY = pt.y;
    }
  }

  return {
    x: minX,
    y: minY,
    width: maxX - minX,
    height: maxY - minY
  };
}
/**
 * Returns point on arc
 *
 * @param center point
 * @param radius
 * @param arc
 * @return {boolean}
 */

function getArcPoint(radius, arc) {
  return {
    x: radius * cos(arc),
    y: radius * sin(arc)
  };
}
/**
 * Returns true if a point is within rectangle
 *
 * @param point
 * @param rectangle
 * @return {boolean}
 */

function isInRectangle(point, rectangle) {
  if (point.x >= rectangle.x && point.x <= rectangle.x + rectangle.width && point.y >= rectangle.y && point.y <= rectangle.y + rectangle.height) {
    return true;
  }

  return false;
}
function getLineIntersection(pointA1, pointA2, pointB1, pointB2) {
  var x = ((pointA1.x * pointA2.y - pointA2.x * pointA1.y) * (pointB1.x - pointB2.x) - (pointA1.x - pointA2.x) * (pointB1.x * pointB2.y - pointB1.y * pointB2.x)) / ((pointA1.x - pointA2.x) * (pointB1.y - pointB2.y) - (pointA1.y - pointA2.y) * (pointB1.x - pointB2.x));
  var y = ((pointA1.x * pointA2.y - pointA2.x * pointA1.y) * (pointB1.y - pointB2.y) - (pointA1.y - pointA2.y) * (pointB1.x * pointB2.y - pointB1.y * pointB2.x)) / ((pointA1.x - pointA2.x) * (pointB1.y - pointB2.y) - (pointA1.y - pointA2.y) * (pointB1.x - pointB2.x));
  return {
    x: x,
    y: y
  };
}

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Morpher.js":
/*!**************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/utils/Morpher.js ***!
  \**************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Morpher": () => (/* binding */ Morpher)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Base */ "./node_modules/@amcharts/amcharts4/.internal/core/Base.js");
/* harmony import */ var _utils_Animation__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/Animation */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Animation.js");
/* harmony import */ var _utils_Math__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
/* harmony import */ var _utils_Ease__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/Ease */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Ease.js");
/* harmony import */ var _utils_Type__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/**
 * Morpher module contains functionality that allows morphing one polygon to
 * another.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */






/**
 * Morpher can be used to morph one polygon to some other polygon.
 */

var Morpher =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__extends)(Morpher, _super);
  /**
   * Constructor.
   *
   * @param morphable An object to morph
   */


  function Morpher(morphable) {
    var _this = _super.call(this) || this;
    /**
     * A storage for measurements.
     */


    _this._bboxes = [];
    /**
     * Duration of the morphing animation in milliseconds.
     */

    _this.morphDuration = 800;
    /**
     * An easing function to use for morphing animation.
     *
     * @see {@link Ease}
     */

    _this.morphEasing = _utils_Ease__WEBPACK_IMPORTED_MODULE_3__.cubicOut;
    /**
     * If set to `true`, all separate parts of the multi-part polygon will
     * morph into a single circle or polygon when using built-in methods
     * `morphToCircle()` or `morphToPolygon()`.
     *
     * Otherwise each separate part of polygon will morph to individual target
     * circle or polgyon.
     */

    _this.morphToSingle = true;
    /**
     * A ratio to scale morphed object in relation to the source object.
     */

    _this.scaleRatio = 1;
    _this.className = "Morpher";
    _this.morphable = morphable;

    _this.applyTheme();

    return _this;
  }
  /**
   * Morphs a polygon to another polygon.
   *
   * @param toPoints  Corner points of the target shape
   * @param duration  Duration in milliseconds
   * @param easing    Easing function
   * @return Animation
   */


  Morpher.prototype.morphToPolygon = function (toPoints, duration, easing) {
    var points = this.morphable.currentPoints;

    if (points && toPoints) {
      this.sortPoints(points);
      this.sortPoints(toPoints);
      this._morphFromPointsReal = [];
      this._morphToPointsReal = [];

      if (!_utils_Type__WEBPACK_IMPORTED_MODULE_4__.hasValue(duration)) {
        duration = this.morphDuration;
      }

      if (!_utils_Type__WEBPACK_IMPORTED_MODULE_4__.hasValue(easing)) {
        easing = this.morphEasing;
      }

      this._morphFromPointsReal = this.normalizePoints(toPoints, points);
      this._morphToPointsReal = this.normalizePoints(points, toPoints);
      this.morphable.currentPoints = this._morphFromPointsReal;
      var animation = new _utils_Animation__WEBPACK_IMPORTED_MODULE_1__.Animation(this, {
        property: "morphProgress",
        from: 0,
        to: 1
      }, duration, easing);

      this._disposers.push(animation);

      animation.start();
      return animation;
    }
  };
  /**
   * [normalizePoints description]
   *
   * @ignore Exclude from docs
   * @todo Description
   * @param pointsA  Point A
   * @param pointsB  Point B
   * @return Normalized points
   */


  Morpher.prototype.normalizePoints = function (pointsA, pointsB) {
    for (var i = 0, len = pointsA.length; i < len; i++) {
      var surfaceA = pointsA[i][0];
      var holeA = pointsA[i][1];
      var bboxA = _utils_Type__WEBPACK_IMPORTED_MODULE_4__.getValue(_utils_Math__WEBPACK_IMPORTED_MODULE_2__.getBBox(surfaceA));
      var middleX = bboxA.x + bboxA.width;
      var middleY = bboxA.y + bboxA.height; // check if we have the same in PointsB

      if (!pointsB[i]) {
        pointsB[i] = [];
      } // check if we have surface in pointsB


      if (surfaceA && !pointsB[i][0]) {
        pointsB[i][0] = [{
          x: middleX,
          y: middleY
        }, {
          x: middleX,
          y: middleY
        }];
      }

      if (pointsB[i][0]) {
        pointsB[i][0] = this.addPoints(pointsB[i][0], surfaceA.length);
        var distance = Infinity;
        var splitAt = 0;

        for (var a = 0; a < pointsB[i][0].length; a++) {
          var newDistance = _utils_Math__WEBPACK_IMPORTED_MODULE_2__.getDistance(pointsB[i][0][a], surfaceA[0]);

          if (newDistance < distance) {
            splitAt = a;
            distance = newDistance;
          }
        }

        var partA = pointsB[i][0].slice(0, splitAt);
        var partB = pointsB[i][0].slice(splitAt);
        pointsB[i][0] = partB.concat(partA);
      }

      if (holeA) {
        if (!pointsB[i][1]) {
          pointsB[i][1] = [{
            x: middleX,
            y: middleY
          }, {
            x: middleX,
            y: middleY
          }];
        }

        pointsB[i][1] = this.addPoints(pointsB[i][1], holeA.length);
      }
    }

    return pointsB;
  };
  /**
   * [sortPoints description]
   *
   * @ignore Exclude from doc
   * @todo Description
   * @param points  [description]
   * @return                        common bbox of points
   */


  Morpher.prototype.sortPoints = function (points) {
    points.sort(function (a, b) {
      var bbox1 = _utils_Type__WEBPACK_IMPORTED_MODULE_4__.getValue(_utils_Math__WEBPACK_IMPORTED_MODULE_2__.getBBox(a[0]));
      var bbox2 = _utils_Type__WEBPACK_IMPORTED_MODULE_4__.getValue(_utils_Math__WEBPACK_IMPORTED_MODULE_2__.getBBox(b[0]));

      if (bbox1.width * bbox1.height > bbox2.width * bbox2.height) {
        return -1;
      } else {
        return 1;
      }
    });
    var bboxes = [];

    for (var i = 0, len = points.length; i < len; i++) {
      var surface = points[i][0];

      if (surface) {
        bboxes.push(_utils_Type__WEBPACK_IMPORTED_MODULE_4__.getValue(_utils_Math__WEBPACK_IMPORTED_MODULE_2__.getBBox(surface)));
      }
    }

    return _utils_Math__WEBPACK_IMPORTED_MODULE_2__.getCommonRectangle(bboxes);
  };
  /**
   * Morphs polygon to a circle (it is actually a polygon which makes a circle).
   *
   * @param radius    Target circle radius (px)
   * @param duration  Duration (ms)
   * @param easing    Easing function
   * @return Animation
   */


  Morpher.prototype.morphToCircle = function (radius, duration, easing) {
    var points = this.morphable.points;
    var commonBBox = this.sortPoints(points);
    this._morphFromPointsReal = [];
    this._morphToPointsReal = [];

    if (!_utils_Type__WEBPACK_IMPORTED_MODULE_4__.hasValue(duration)) {
      duration = this.morphDuration;
    }

    if (!_utils_Type__WEBPACK_IMPORTED_MODULE_4__.hasValue(easing)) {
      easing = this.morphEasing;
    } // surface


    for (var i = 0, len = points.length; i < len; i++) {
      var surface = points[i][0];
      var hole = points[i][1];
      this._morphFromPointsReal[i] = [];
      this._morphToPointsReal[i] = [];

      if (surface) {
        var toPoints = surface;
        var fromPoints = surface;
        var bbox = _utils_Type__WEBPACK_IMPORTED_MODULE_4__.getValue(_utils_Math__WEBPACK_IMPORTED_MODULE_2__.getBBox(fromPoints)); // this._bboxes[i];

        if (this.morphToSingle) {
          bbox = _utils_Type__WEBPACK_IMPORTED_MODULE_4__.getValue(commonBBox);
        }

        var middleX = bbox.x + bbox.width / 2;
        var middleY = bbox.y + bbox.height / 2;
        var realRadius = radius;

        if (!_utils_Type__WEBPACK_IMPORTED_MODULE_4__.isNumber(realRadius)) {
          realRadius = Math.min(bbox.width / 2, bbox.height / 2);
        }

        toPoints = []; // find angle for the first point

        var startAngle = _utils_Math__WEBPACK_IMPORTED_MODULE_2__.getAngle({
          x: middleX,
          y: middleY
        }, surface[0]);
        var count = 100;

        if (surface.length > count) {
          count = surface.length;
        }

        fromPoints = this.addPoints(surface, count);
        count = fromPoints.length; // add Points might increase number a bit

        var angle = 360 / (count - 1);

        for (var a = 0; a < count; a++) {
          var realAngle = angle * a + startAngle;
          var pointOnCircle = {
            x: middleX + realRadius * _utils_Math__WEBPACK_IMPORTED_MODULE_2__.cos(realAngle),
            y: middleY + realRadius * _utils_Math__WEBPACK_IMPORTED_MODULE_2__.sin(realAngle)
          };
          toPoints[a] = pointOnCircle;
        }

        if (hole && hole.length > 0) {
          for (var i_1 = 0, hlen = hole.length; i_1 < hlen; i_1++) {
            toPoints.push({
              x: middleX,
              y: middleY
            });
          }
        }

        this._morphFromPointsReal[i][0] = fromPoints;
        this._morphToPointsReal[i][0] = toPoints;
      }
    }

    this.morphable.currentPoints = this._morphFromPointsReal;
    var animation = new _utils_Animation__WEBPACK_IMPORTED_MODULE_1__.Animation(this, {
      property: "morphProgress",
      from: 0,
      to: 1
    }, duration, easing);

    this._disposers.push(animation);

    animation.start();
    return animation;
  };
  /**
   * [addPoints description]
   *
   * @ignore Exclude from doc
   * @todo Description
   * @param points         [description]
   * @param mustHaveCount  [description]
   * @return [description]
   */


  Morpher.prototype.addPoints = function (points, mustHaveCount) {
    var addToSegmentCount = Math.round(mustHaveCount / points.length);
    var newPoints = [];

    for (var i = 0, len = points.length; i < len; i++) {
      var point0 = points[i];
      var point1 = void 0;

      if (i == points.length - 1) {
        point1 = points[0];
      } else {
        point1 = points[i + 1];
      }

      newPoints.push(point0);

      for (var p = 1; p < addToSegmentCount; p++) {
        var percent = p / addToSegmentCount;
        var extraPoint = {
          x: point0.x + (point1.x - point0.x) * percent,
          y: point0.y + (point1.y - point0.y) * percent
        };
        newPoints.push(extraPoint);
      } // stop adding in case we already added more than left in original


      if (newPoints.length + points.length - i == mustHaveCount) {
        addToSegmentCount = 0;
      }
    }

    if (newPoints.length < mustHaveCount && points.length > 0) {
      var lastPoint = points[points.length - 1];

      for (var p = newPoints.length; p < mustHaveCount; p++) {
        // add same as last
        newPoints.push({
          x: lastPoint.x,
          y: lastPoint.y
        });
      }
    }

    return newPoints;
  };
  /**
   * Morphs polygon into a rectangular polygon.
   *
   * @param width     Width of the target rectangle (px)
   * @param height    Height of the target rectangle (px)
   * @param duration  Duration (ms)
   * @param easing    Easing function
   * @return Animation
   */


  Morpher.prototype.morphToRectangle = function (width, height, duration, easing) {
    var points = this.morphable.points;
    this.sortPoints(points);
    this._morphFromPointsReal = [];
    this._morphToPointsReal = [];

    if (!_utils_Type__WEBPACK_IMPORTED_MODULE_4__.hasValue(duration)) {
      duration = this.morphDuration;
    }

    if (!_utils_Type__WEBPACK_IMPORTED_MODULE_4__.hasValue(easing)) {
      easing = this.morphEasing;
    } //		let biggestBBox: IRectangle = this._bboxes[this._biggestIndex];
    // surface


    for (var i = 0, len = points.length; i < len; i++) {
      var surface = points[i][0];
      var hole = points[i][1];
      this._morphFromPointsReal[i] = [];
      this._morphToPointsReal[i] = [];

      if (surface) {
        var toPoints = surface;
        var fromPoints = surface;
        var bbox = this._bboxes[i]; // we only work with first area. TODO: maybe we should find the biggest one?

        if (this.morphToSingle) {//if (i != this._biggestIndex) {
          //	bbox = { x: biggestBBox.x + biggestBBox.width / 2, y: biggestBBox.y + biggestBBox.height / 2, width: 0, height: 0 };
          //}
        }

        var x = bbox.x;
        var y = bbox.y;
        var realWidth = width;
        var realHeight = height;

        if (!_utils_Type__WEBPACK_IMPORTED_MODULE_4__.isNumber(realWidth)) {
          realWidth = bbox.width;
        }

        if (!_utils_Type__WEBPACK_IMPORTED_MODULE_4__.isNumber(realHeight)) {
          realHeight = bbox.height;
        }

        toPoints = [{
          x: x,
          y: y
        }, {
          x: x + realWidth,
          y: y
        }, {
          x: x + realWidth,
          y: y + realHeight
        }, {
          x: x,
          y: y + realHeight
        }];
        toPoints = this.addPoints(toPoints, surface.length); // if polygon has less points then count, add

        if (surface.length < 4) {
          for (var i_2 = surface.length; i_2 < 4; i_2++) {
            toPoints.push({
              x: surface[i_2].x,
              y: surface[i_2].y
            });
          }
        }

        if (hole && hole.length > 0) {
          var middleX = bbox.x + bbox.width / 2;
          var middleY = bbox.y + bbox.height / 2;

          for (var i_3 = 0, hlen = hole.length; i_3 < hlen; i_3++) {
            toPoints.push({
              x: middleX,
              y: middleY
            });
          }
        }

        this._morphFromPointsReal[i][0] = fromPoints;
        this._morphToPointsReal[i][0] = toPoints;
      }
    }

    this.morphable.currentPoints = this._morphFromPointsReal;
    var animation = new _utils_Animation__WEBPACK_IMPORTED_MODULE_1__.Animation(this, {
      property: "morphProgress",
      from: 0,
      to: 1
    }, duration, easing);

    this._disposers.push(animation);

    animation.start();
    return animation;
  };

  Object.defineProperty(Morpher.prototype, "morphProgress", {
    /**
     * Returns the progress of morph transition.
     *
     * @return Progress (0-1)
     */
    get: function get() {
      return this._morphProgress;
    },

    /**
     * Progress of the morph transition.
     *
     * Setting this will also trigger actual transformation.
     *
     * @param value  Progress (0-1)
     */
    set: function set(value) {
      this._morphProgress = value;
      var currentPoints = [];

      if (value != null) {
        var fromPoints = this._morphFromPointsReal;
        var toPoints = this._morphToPointsReal;

        if (fromPoints != null && toPoints != null) {
          for (var i = 0, len = fromPoints.length; i < len; i++) {
            var currentArea = [];
            currentPoints.push(currentArea);
            var surfaceFrom = fromPoints[i][0];
            var holeFrom = fromPoints[i][1];
            var surfaceTo = toPoints[i][0];
            var holeTo = toPoints[i][1];

            if (surfaceFrom && surfaceFrom.length > 0 && surfaceTo && surfaceTo.length > 0) {
              var currentSurface = [];

              for (var i_4 = 0, slen = surfaceFrom.length; i_4 < slen; i_4++) {
                var point0 = surfaceFrom[i_4];
                var point1 = surfaceTo[i_4];
                var currentPoint = {
                  x: point0.x + (point1.x * this.scaleRatio - point0.x) * value,
                  y: point0.y + (point1.y * this.scaleRatio - point0.y) * value
                };
                currentSurface.push(currentPoint);
              }

              currentArea[0] = currentSurface;
            }

            if (holeFrom && holeFrom.length > 0 && holeTo && holeTo.length > 0) {
              var currentHole = [];

              for (var i_5 = 0, hlen = holeFrom.length; i_5 < hlen; i_5++) {
                var point0 = holeFrom[i_5];
                var point1 = holeTo[i_5];
                var currentPoint = {
                  x: point0.x + (point1.x * this.scaleRatio - point0.x) * value,
                  y: point0.y + (point1.y * this.scaleRatio - point0.y) * value
                };
                currentHole.push(currentPoint);
              }

              currentArea[1] = currentHole;
            }
          }
        }
      }

      this.morphable.currentPoints = currentPoints;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Restores the polygon to its original appearance.
   *
   * @param duration  Duration (ms)
   * @param easing    Easing function
   * @return Animation
   */

  Morpher.prototype.morphBack = function (duration, easing) {
    this._morphToPointsReal = this._morphFromPointsReal;
    this._morphFromPointsReal = this.morphable.currentPoints;

    if (!_utils_Type__WEBPACK_IMPORTED_MODULE_4__.hasValue(duration)) {
      duration = this.morphDuration;
    }

    if (!_utils_Type__WEBPACK_IMPORTED_MODULE_4__.hasValue(easing)) {
      easing = this.morphEasing;
    }

    var animation = new _utils_Animation__WEBPACK_IMPORTED_MODULE_1__.Animation(this, {
      property: "morphProgress",
      from: 0,
      to: 1
    }, duration, easing);

    this._disposers.push(animation);

    animation.start();
    return animation;
  };

  Object.defineProperty(Morpher.prototype, "animations", {
    /**
     * Returns a list of morph animations currently being played.
     *
     * @return List of animations
     */
    get: function get() {
      if (!this._animations) {
        this._animations = [];

        this._disposers.push(new _utils_Animation__WEBPACK_IMPORTED_MODULE_1__.AnimationDisposer(this._animations));
      }

      return this._animations;
    },
    enumerable: true,
    configurable: true
  });
  return Morpher;
}(_Base__WEBPACK_IMPORTED_MODULE_0__.BaseObject);



/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Net.js":
/*!**********************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/utils/Net.js ***!
  \**********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "load": () => (/* binding */ load),
/* harmony export */   "readBlob": () => (/* binding */ readBlob)
/* harmony export */ });
/* harmony import */ var _Type__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/**
 * A collection of network-related functions
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */

/**
 * Loads an external file via its URL.
 *
 * Please note that this is an asynchronous function.
 *
 * It will not return the result, but rather a `Promise`.
 *
 * You can use the `await` notion, or `then()`.
 *
 * ```TypeScript
 * // Using await
 * let response = await Net.load( "http://www.my.com/data.json" );
 * console.log( response.response );
 *
 * // Using then()
 * Net.load( "http://www.my.com/data.json" ).then( ( response ) => {
 *   console.log( response.response );
 * } );
 * ```
 * ```JavaScript
 * // Using then()
 * Net.load( "http://www.my.com/data.json" ).then( function( response ) {
 *   console.log( response.response );
 * } );
 * ```
 *
 * @async
 * @param url      URL for the file to load
 * @param target   A target element that is requesting the net load
 * @param options  Request options
 * @return Result (Promise)
 */

function load(url, target, options) {
  return new Promise(function (success, error) {
    // Is return type Blob?
    var isBlob = _Type__WEBPACK_IMPORTED_MODULE_0__.hasValue(options) && options.responseType == "blob"; // Create request and set up handlers

    var xhr = new XMLHttpRequest();

    xhr.onload = function () {
      if (xhr.status === 200) {
        var response = void 0;
        var blob_1;

        if (isBlob) {
          blob_1 = xhr.response;
          readBlob(blob_1).then(function (response) {
            var output = {
              xhr: xhr,
              error: false,
              response: response,
              blob: blob_1,
              type: xhr.getResponseHeader("Content-Type"),
              target: target
            };
            success(output);
          });
          return;
        } else {
          response = xhr.responseText || xhr.response;
        }

        var output = {
          xhr: xhr,
          error: false,
          response: response,
          blob: blob_1,
          type: xhr.getResponseHeader("Content-Type"),
          target: target
        };
        success(output);
      } else {
        error({
          xhr: xhr,
          error: true,
          type: xhr.getResponseHeader("Content-Type"),
          target: target
        });
      }
    };

    xhr.onerror = function () {
      error({
        xhr: xhr,
        error: true,
        type: xhr.getResponseHeader("Content-Type"),
        target: target
      });
    }; // Open request


    xhr.open("GET", url, true);

    if (options && options.withCredentials) {
      xhr.withCredentials = true;
    } // Process options


    if (_Type__WEBPACK_IMPORTED_MODULE_0__.hasValue(options)) {
      if (_Type__WEBPACK_IMPORTED_MODULE_0__.hasValue(options.requestHeaders)) {
        for (var i = 0; i < options.requestHeaders.length; i++) {
          var header = options.requestHeaders[i];
          xhr.setRequestHeader(header.key, header.value);
        }
      }

      if (_Type__WEBPACK_IMPORTED_MODULE_0__.hasValue(options.responseType)) {
        xhr.responseType = options.responseType;
      }
    } // Send request


    xhr.send();
  });
}
/**
 * Returns textual representation of a Blob object.
 *
 * @param   blob  Target blob
 * @return        Text promise
 */

function readBlob(blob) {
  return new Promise(function (success, error) {
    var reader = new FileReader();

    reader.onload = function (event) {
      success(reader.result);
    };

    reader.onerror = function (e) {
      error(e);
    };

    reader.readAsText(blob);
  });
}

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Number.js":
/*!*************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/utils/Number.js ***!
  \*************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "order": () => (/* binding */ order)
/* harmony export */ });
/**
 * ============================================================================
 * COMPARING FUNCTIONS
 * ============================================================================
 * @hidden
 */

/**
 * Comparing function used for ordering.
 *
 * @ignore Exclude from docs
 * @param a  Number 1
 * @param b  Number 2
 * @return Result
 */
function order(a, b) {
  if (a === b) {
    return 0;
  } else if (a < b) {
    return -1;
  } else {
    return 1;
  }
}

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Object.js":
/*!*************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/utils/Object.js ***!
  \*************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "clone": () => (/* binding */ clone),
/* harmony export */   "copy": () => (/* binding */ copy),
/* harmony export */   "copyAllProperties": () => (/* binding */ copyAllProperties),
/* harmony export */   "copyProperties": () => (/* binding */ copyProperties),
/* harmony export */   "each": () => (/* binding */ each),
/* harmony export */   "eachContinue": () => (/* binding */ eachContinue),
/* harmony export */   "eachOrdered": () => (/* binding */ eachOrdered),
/* harmony export */   "entries": () => (/* binding */ entries),
/* harmony export */   "forceCopyProperties": () => (/* binding */ forceCopyProperties),
/* harmony export */   "getKey": () => (/* binding */ getKey),
/* harmony export */   "hasKey": () => (/* binding */ hasKey),
/* harmony export */   "keys": () => (/* binding */ keys),
/* harmony export */   "keysOrdered": () => (/* binding */ keysOrdered),
/* harmony export */   "merge": () => (/* binding */ merge),
/* harmony export */   "softCopyProperties": () => (/* binding */ softCopyProperties)
/* harmony export */ });
/* harmony import */ var _Array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Array */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Array.js");
/* harmony import */ var _Type__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */


/**
 * ============================================================================
 * UTILITY FUNCTIONS
 * ============================================================================
 * @hidden
 */

/**
 * Returns an iterator for all entries in object.
 *
 * Can be used to safely iterate through all properties of the object.
 *
 * @param object  Source object
 * @returns Iterator
 */

function entries(object) {
  return function (push) {
    // TODO make this more efficient ?
    for (var key in object) {
      if (hasKey(object, key)) {
        if (!push([key, object[key]])) {
          break;
        }
      }
    }
  };
}
/**
 * Returns an array of object's property names.
 *
 * @param object  Source object
 * @returns Object property names
 */

function keys(object) {
  var output = [];

  for (var key in object) {
    if (hasKey(object, key)) {
      output.push(key);
    }
  }

  return output;
}
/**
 * Returns an array of object's property names ordered using specific ordering
 * function.
 *
 * @param object  Source object
 * @param order   Ordering function
 * @returns Object property names
 */

function keysOrdered(object, order) {
  return keys(object).sort(order);
}
/**
 * Checks if `object` has a specific `key`.
 *
 * @param object  Source object
 * @param key     Property name
 * @returns Has key?
 */

function hasKey(object, key) {
  return {}.hasOwnProperty.call(object, key);
}
/**
 * Returns value of the specific `key`.
 *
 * @param object  Source object
 * @param key     Property name
 * @returns Key value
 */

function getKey(object, key) {
  return object[key];
}
/**
 * Iterates through all properties of the object calling `fn` for each of them.
 *
 * If return value of the function evaluates to `false` further iteration is
 * cancelled.
 *
 * @param object  Source object
 * @param fn      Callback function
 */

function eachContinue(object, fn) {
  for (var key in object) {
    if (hasKey(object, key)) {
      if (!fn(key, object[key])) {
        break;
      }
    }
  }
}
/**
 * Iterates through all properties of the object calling `fn` for each of them.
 *
 * @param object  Source object
 * @param fn      Callback function
 */

function each(object, fn) {
  eachContinue(object, function (key, value) {
    fn(key, value);
    return true;
  });
}
/**
 * Orders object properties using custom `ord` function and iterates through
 * them calling `fn` for each of them.
 *
 * @param object  Source object
 * @param fn      Callback function
 * @param order   Ordering function
 */

function eachOrdered(object, fn, ord) {
  _Array__WEBPACK_IMPORTED_MODULE_0__.each(keysOrdered(object, ord), function (key) {
    fn(key, object[key]);
  });
}
/**
 * Returns a copy of the object.
 *
 * @param object  Source object
 * @returns Copy of the object
 */

function copy(object) {
  return Object.assign({}, object);
}
/**
 * Merges two objects and returns a new object that contains properties from
 * both source objects.
 *
 * @param object1  Source object #1
 * @param object2  Source object #2
 * @returns Combined object
 */

function merge(object1, object2) {
  return Object.assign({}, object1, object2);
}
/**
 * Returns object clone.
 *
 * @param object  Source object
 * @returns       Clone
 */

function clone(object) {
  return JSON.parse(JSON.stringify(object));
}
/**
 * Copies a list of properties from one object to another.
 *
 * Will not copy empty properties.
 *
 * @param source  Source object
 * @param target    Target object
 * @param keys  List of keys to copy
 */

function copyProperties(source, target, keys) {
  _Array__WEBPACK_IMPORTED_MODULE_0__.each(keys, function (key) {
    if (_Type__WEBPACK_IMPORTED_MODULE_1__.hasValue(source[key])) {
      target[key] = source[key];
    }
  });
}
/**
 * Copies a list of properties from one object to another only if target does't have value of the property set.
 *
 * Will not copy empty properties.
 *
 * @param source  Source object
 * @param target    Target object
 * @param keys  List of keys to copy
 */

function softCopyProperties(source, target, keys) {
  _Array__WEBPACK_IMPORTED_MODULE_0__.each(keys, function (key) {
    if (_Type__WEBPACK_IMPORTED_MODULE_1__.hasValue(source[key]) && !_Type__WEBPACK_IMPORTED_MODULE_1__.hasValue(target[key])) {
      target[key] = source[key];
    }
  });
}
/**
 * Copies a list of properties from one object to another.
 *
 * Will copy empty properties.
 *
 * @param source  Source object
 * @param target    Target object
 * @param keys  List of keys to copy
 */

function forceCopyProperties(source, target, keys) {
  _Array__WEBPACK_IMPORTED_MODULE_0__.each(keys, function (key) {
    target[key] = source[key];
  });
}
/**
 * Copies all properties from one object to another.
 *
 * @param from  Source object
 * @param to    Target object
 */

function copyAllProperties(from, to) {
  copyProperties(from, to, keys(from));
}

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Order.js":
/*!************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/utils/Order.js ***!
  \************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "or": () => (/* binding */ or),
/* harmony export */   "reverse": () => (/* binding */ reverse)
/* harmony export */ });
/**
 * A collection of functions for ordering.
 */

/**
 * [reverse description]
 *
 * @ignore Exclude from docs
 * @todo Description
 * @param a  [description]
 * @return [description]
 */
function reverse(a) {
  switch (a) {
    case 0:
      return 0;

    case -1:
      return 1;

    case 1:
      return -1;
  }
}
/**
 * [or description]
 *
 * @ignore Exclude from docs
 * @todo Description
 * @param a  Item 1
 * @param b  Item 2
 * @return [description]
 */

function or(a, b) {
  if (a === 0) {
    return b;
  } else {
    return a;
  }
}

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/utils/PatternSet.js":
/*!*****************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/utils/PatternSet.js ***!
  \*****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "PatternSet": () => (/* binding */ PatternSet)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Base */ "./node_modules/@amcharts/amcharts4/.internal/core/Base.js");
/* harmony import */ var _Color__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Color */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Color.js");
/* harmony import */ var _InterfaceColorSet__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./InterfaceColorSet */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/InterfaceColorSet.js");
/* harmony import */ var _rendering_fills_LinePattern__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../rendering/fills/LinePattern */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/LinePattern.js");
/* harmony import */ var _rendering_fills_RectPattern__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../rendering/fills/RectPattern */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/RectPattern.js");
/* harmony import */ var _rendering_fills_CirclePattern__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../rendering/fills/CirclePattern */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/CirclePattern.js");
/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/**
 * This module contains PatternSet object definition
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */








/**
 * ============================================================================
 * REQUISITES
 * ============================================================================
 * @hidden
 */

/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Defines an interable list of distinctive patterns that can be used in
 * conjunction to colors to generate various fill patterns.
 *
 * @important
 * @since 4.7.5
 * @see {@link https://www.amcharts.com/docs/v4/concepts/colors/} for color-related info
 */

var PatternSet =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_7__.__extends)(PatternSet, _super);
  /**
   * Constructor
   */


  function PatternSet() {
    var _this = _super.call(this) || this;
    /**
     * Holds the list of the colors in this set. (preset or auto-generated)
     */


    _this._list = [];
    /**
     * Current step.
     */

    _this._currentStep = 0;
    /**
     * If set to non-zero value, the PatternSet will start iterating patterns from
     * that particular index, not the first pattern in the list.
     */

    _this._startIndex = 0;
    /**
     * Current pass in cycle. Once all patterns in the list are iterated,
     * iteration restarts from beginning and currentPass is incremented.
     */

    _this._currentPass = 0;
    /**
     * A base color. If there are no colors pre-set in the color list, ColorSet
     * will use this color as a base when generating new ones, applying
     * `stepOptions` and `passOptions` to this base color.
     */

    _this.baseColor = new _Color__WEBPACK_IMPORTED_MODULE_1__.Color({
      r: 103,
      g: 183,
      b: 220
    });
    _this.className = "PatternSet"; // Set base color to be used for pattern elements

    var interfaceColors = new _InterfaceColorSet__WEBPACK_IMPORTED_MODULE_2__.InterfaceColorSet(); // Set default patterns

    _this.list = [_this.getLinePattern(1000, 45, 1, 6), _this.getRectPattern(10, 0, 4), _this.getLinePattern(1000, -45, 1, 6), _this.getCirclePattern(11, 2, true), _this.getLinePattern(6, 90, 1), _this.getRectPattern(12, 45, 6, true), _this.getLinePattern(6, 0, 1), _this.getRectPattern(7, 0, 4), _this.getLinePattern(1000, 45, 2, 3, "4,2"), _this.getCirclePattern(9, 3, false), _this.getLinePattern(1000, -45, 2, 3, "4,2"), _this.getRectPattern(10, 45, Math.sqrt(50)), _this.getLinePattern(1000, -45, 2, 1), _this.getRectPattern(10, 0, 9), _this.getLinePattern(1000, 45, 2, 1), _this.getLinePattern(1000, 0, 3, 1), _this.getRectPattern(10, 45, 10), _this.getLinePattern(1000, 90, 3, 1)];
    _this.baseColor = interfaceColors.getFor("stroke");

    _this.applyTheme();

    return _this;
  }

  PatternSet.prototype.getLinePattern = function (size, rotation, thickness, gap, strokeDashArray) {
    var pattern = new _rendering_fills_LinePattern__WEBPACK_IMPORTED_MODULE_3__.LinePattern();
    pattern.width = size;
    pattern.height = size;
    pattern.stroke = this.baseColor;
    pattern.gap = gap;
    pattern.strokeDasharray = strokeDashArray;
    pattern.strokeWidth = thickness;
    pattern.rotation = rotation;
    return pattern;
  };

  PatternSet.prototype.getRectPattern = function (size, rotation, thickness, outline) {
    var pattern = new _rendering_fills_RectPattern__WEBPACK_IMPORTED_MODULE_4__.RectPattern();
    pattern.width = size;
    pattern.height = size;
    pattern.rectWidth = thickness;
    pattern.rectHeight = thickness;

    if (outline) {
      pattern.stroke = this.baseColor;
      pattern.strokeWidth = 1;
      pattern.fillOpacity = 0;
    } else {
      pattern.fill = this.baseColor;
      pattern.strokeWidth = 0;
    }

    if (rotation != 0) {
      pattern.shapeRendering = "auto";
    }

    pattern.rotation = rotation;
    return pattern;
  };

  PatternSet.prototype.getCirclePattern = function (size, radius, outline) {
    var pattern = new _rendering_fills_CirclePattern__WEBPACK_IMPORTED_MODULE_5__.CirclePattern();
    pattern.width = size;
    pattern.height = size;
    pattern.shapeRendering = "auto";
    pattern.radius = radius;

    if (outline) {
      pattern.stroke = this.baseColor;
      pattern.strokeWidth = 1;
      pattern.fillOpacity = 0;
    } else {
      pattern.fill = this.baseColor;
      pattern.strokeWidth = 0;
    }

    return pattern;
  };

  Object.defineProperty(PatternSet.prototype, "list", {
    /**
     * @return Pattern list
     */
    get: function get() {
      return this._list;
    },

    /**
     * List of pre-defined patterns to be used in set.
     *
     * @param value Pattern list
     */
    set: function set(value) {
      this._list = value;
      this.reset();
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Returns the next pattern in list.
   *
   * @return Pattern
   */

  PatternSet.prototype.next = function () {
    var pattern = this.getIndex(this.currentStep);
    this._currentStep++;
    return pattern;
  };
  /**
   * Returns a color at specific index in the list.
   *
   * @param  i  Index
   * @return Pattern
   */


  PatternSet.prototype.getIndex = function (i) {
    var pattern;

    while (this.list.length <= i) {
      this.generatePatterns();
    }

    pattern = this.list[i];
    return pattern.clone();
  };
  /**
   * Generates a new set of patterns.
   */


  PatternSet.prototype.generatePatterns = function () {
    var count = this.list.length / (this._currentPass + 1);
    this._currentPass++;

    for (var i = 0; i < count; i++) {
      this.list.push(this.list[i].clone());
    }
  };
  /**
   * Resets internal iterator.
   *
   * Calling `next()` after this will return the very first color in the color
   * list, even if it was already returned before.
   */


  PatternSet.prototype.reset = function () {
    this._currentStep = this._startIndex;
  };

  Object.defineProperty(PatternSet.prototype, "currentStep", {
    /**
     * @return Step
     */
    get: function get() {
      return this._currentStep;
    },

    /**
     * Sets current color iteration. You can use this property to skip some
     * colors from iteration. E.g. setting it to `10` will skip first ten
     * colors.
     *
     * Please note that the number is zero-based.
     *
     * @param value  Step
     */
    set: function set(value) {
      this._currentStep = value;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(PatternSet.prototype, "startIndex", {
    /**
     * @return Index
     */
    get: function get() {
      return this._startIndex;
    },

    /**
     * If set to non-zero value, the ColorSet will start iterating colors from
     * that particular index, not the first color in the list.
     *
     * @default 0
     * @param  value  Index
     */
    set: function set(value) {
      this._startIndex = value;
      this.reset();
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Processes JSON-based config before it is applied to the object.
   *
   * @ignore Exclude from docs
   * @param config  Config
   */

  PatternSet.prototype.processConfig = function (config) {
    // if (config) {
    // 	// Set up axis ranges
    // 	if ($type.hasValue(config.list) && $type.isArray(config.list)) {
    // 		for (let i = 0, len = config.list.length; i < len; i++) {
    // 			if (!(config.list[i] instanceof Color)) {
    // 				config.list[i] = color(config.list[i]);
    // 			}
    // 		}
    // 	}
    // }
    _super.prototype.processConfig.call(this, config);
  };

  return PatternSet;
}(_Base__WEBPACK_IMPORTED_MODULE_0__.BaseObject);


/**
 * Register class in system, so that it can be instantiated using its name from
 * anywhere.
 *
 * @ignore
 */

_Registry__WEBPACK_IMPORTED_MODULE_6__.registry.registeredClasses.PatternSet = PatternSet;

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Percent.js":
/*!**************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/utils/Percent.js ***!
  \**************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Percent": () => (/* binding */ Percent),
/* harmony export */   "isPercent": () => (/* binding */ isPercent),
/* harmony export */   "percent": () => (/* binding */ percent)
/* harmony export */ });
/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Represents a relative value (percent).
 *
 * The Percent object, can be instantiated using two ways:
 *
 * * Via `new Percent(X)`.
 * * Via `am4core.percent(X)`.
 *
 * `Percent` type objects can be used in a number of dual-measuring or
 * positioning properties, like `width`. E.g.:
 *
 * ```TypeScript
 * chart.paddingRight = new Percent(10);
 * // or
 * chart.paddingRight = am4core.percent(10);
 * ```
 * ```JavaScript
 * chart.paddingRight = new Percent(10);
 * // or
 * chart.paddingRight = am4core.percent(10);
 * ```
 * ```JSON
 * {
 *   // ...
 *   "paddingRight": "10%"
 * }
 * ```
 */
var Percent =
/** @class */
function () {
  /**
   * Constructor.
   *
   * @param percent  Percent value
   */
  function Percent(percent) {
    this._value = percent;
  }

  Object.defineProperty(Percent.prototype, "value", {
    /**
     * Relative value.
     *
     * E.g. 100% is 1, 50% is 0.5, etc.
     *
     * This is useful to apply transformations to other values. E.g.:
     *
     * ```TypeScript
     * let value = 256;
     * let percent = new am4core.Percent(50);
     * console.log(value * percent.value); // outputs 128
     * ```
     * ```JavaScript
     * var value = 256;
     * var percent = new am4core.Percent(50);
     * console.log(value * percent.value); // outputs 128
     * ```
     *
     * Alternatively, you can use `am4core.percent()` helper function:
     *
     * ```TypeScript
     * let value = 256;
     * let percent = am4core.percent(50);
     * console.log(value * percent.value); // outputs 128
     * ```
     * ```JavaScript
     * var value = 256;
     * var percent = am4core.percent(50);
     * console.log(value * percent.value); // outputs 128
     * ```
     *
     * @readonly
     * @return Relative value
     */
    get: function get() {
      return this._value / 100;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Percent.prototype, "percent", {
    /**
     * Value in percent.
     *
     * @return Percent
     */
    get: function get() {
      return this._value;
    },
    enumerable: true,
    configurable: true
  });

  Percent.prototype.toString = function () {
    return "" + this._value + "%";
  };

  return Percent;
}();


/**
 * Converts numeric percent value to a proper [[Percent]] object.
 *
 * ```TypeScript
 * pieSeries.radius = am4core.percent(80);
 * ```
 * ```JavaScript
 * pieSeries.radius = am4core.percent(80);
 * ```
 *
 * @param value  Percent
 * @return Percent object
 */

function percent(value) {
  return new Percent(value);
}
/**
 * Checks if value is a [[Percent]] object.
 *
 * @ignore Exclude from docs
 * @param value  Input value
 * @return Is percent?
 */

function isPercent(value) {
  return value instanceof Percent;
}

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Plugin.js":
/*!*************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/utils/Plugin.js ***!
  \*************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Plugin": () => (/* binding */ Plugin)
/* harmony export */ });
/**
 * A plugin base class.
 */

/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * This is a base class that provides core functionality for plugins.
 *
 * The easiest way to start off with a new plugin is to extend this class.
 *
 * It will provide all the mandatory functionality, such as disposers.
 *
 * @since 4.2.2
 */
var Plugin =
/** @class */
function () {
  /**
   * Constructor
   */
  function Plugin() {
    /**
     * Is this object disposed?
     */
    this._disposed = false;
    /**
     * List of IDisposer which will be disposed when the BaseObject is disposed.
     *
     * @ignore Exclude from docs
     */

    this._disposers = []; // Nothing to do here
  }
  /**
   * Decorates series with required events and adapters used to hijack its
   * data.
   */


  Plugin.prototype.init = function () {// Does nothing
    // Override it
  };
  /**
   * Returns if this element is already disposed.
   *
   * @return Is disposed?
   */


  Plugin.prototype.isDisposed = function () {
    return this._disposed;
  };
  /**
   * Disposes this object and related stuff.
   */


  Plugin.prototype.dispose = function () {
    if (!this._disposed) {
      this._disposed = true;
      var a = this._disposers;
      this._disposers = null;

      while (a.length !== 0) {
        var disposer = a.shift();
        disposer.dispose();
      }
    }
  };

  return Plugin;
}();



/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/utils/ResizeSensor.js":
/*!*******************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/utils/ResizeSensor.js ***!
  \*******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "ResizeSensor": () => (/* binding */ ResizeSensor)
/* harmony export */ });
/* harmony import */ var _Array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Array */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Array.js");
/* harmony import */ var _Log__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Log */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Log.js");



var Native =
/** @class */
function () {
  function Native() {
    var _this = this;

    this._targets = [];
    this._observer = new ResizeObserver(function (entries) {
      _Array__WEBPACK_IMPORTED_MODULE_0__.each(entries, function (entry) {
        _Array__WEBPACK_IMPORTED_MODULE_0__.each(_this._targets, function (x) {
          if (x.target === entry.target) {
            x.callback();
          }
        });
      });
    });
  }

  Native.prototype.addTarget = function (target, callback) {
    this._observer.observe(target, {
      box: "content-box"
    });

    this._targets.push({
      target: target,
      callback: callback
    });
  };

  Native.prototype.removeTarget = function (target) {
    this._observer.unobserve(target);

    _Array__WEBPACK_IMPORTED_MODULE_0__.keepIf(this._targets, function (x) {
      return x.target !== target;
    });
  };

  return Native;
}();

var Raf =
/** @class */
function () {
  function Raf() {
    this._targets = [];
  }

  Raf.prototype.addTarget = function (target, callback) {
    var _this = this;

    if (this._targets.length === 0) {
      var lastTime_1 = null;

      var loop_1 = function loop_1() {
        var currentTime = Date.now();

        if (lastTime_1 === null || currentTime > lastTime_1 + Raf.delay) {
          lastTime_1 = currentTime;
          _Array__WEBPACK_IMPORTED_MODULE_0__.each(_this._targets, function (x) {
            var newSize = x.target.getBoundingClientRect();

            if (newSize.width !== x.size.width || newSize.height !== x.size.height) {
              x.size = newSize;
              x.callback();
            }
          });
        }

        _this._timer = requestAnimationFrame(loop_1);
      };

      this._timer = requestAnimationFrame(loop_1);
    }

    var size = target.getBoundingClientRect();

    this._targets.push({
      target: target,
      callback: callback,
      size: size
    });
  };

  Raf.prototype.removeTarget = function (target) {
    _Array__WEBPACK_IMPORTED_MODULE_0__.keepIf(this._targets, function (x) {
      return x.target !== target;
    });

    if (this._targets.length === 0) {
      cancelAnimationFrame(this._timer);
    }
  };

  Raf.delay = 200;
  return Raf;
}();

var observer = null;

function makeSensor() {
  if (observer === null) {
    if (typeof ResizeObserver !== "undefined") {
      observer = new Native();
    } else {
      observer = new Raf();
    }
  }

  return observer;
}

var ResizeSensor =
/** @class */
function () {
  function ResizeSensor(element, callback) {
    this._disposed = false;
    this._sensor = makeSensor();
    this._element = element;

    this._sensor.addTarget(element, callback);
  }

  ResizeSensor.prototype.isDisposed = function () {
    return this._disposed;
  };

  ResizeSensor.prototype.dispose = function () {
    if (!this._disposed) {
      this._disposed = true;

      this._sensor.removeTarget(this._element);
    }
  };

  Object.defineProperty(ResizeSensor.prototype, "sensor", {
    get: function get() {
      return this._sensor;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Deprecated: do not use.
   *
   * @ignore Exclude from docs
   */

  ResizeSensor.prototype.reset = function () {
    _Log__WEBPACK_IMPORTED_MODULE_1__.warn("resizeSensor.reset() is no longer needed and can be removed");
  };

  return ResizeSensor;
}();



/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Responsive.js":
/*!*****************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/utils/Responsive.js ***!
  \*****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Responsive": () => (/* binding */ Responsive),
/* harmony export */   "ResponsiveBreakpoints": () => (/* binding */ ResponsiveBreakpoints),
/* harmony export */   "defaultRules": () => (/* binding */ defaultRules)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Base */ "./node_modules/@amcharts/amcharts4/.internal/core/Base.js");
/* harmony import */ var _utils_List__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/List */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/List.js");
/* harmony import */ var _utils_Adapter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/Adapter */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Adapter.js");
/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _utils_Iterator__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/Iterator */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Iterator.js");
/* harmony import */ var _utils_Array__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/Array */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Array.js");
/* harmony import */ var _utils_Type__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/* harmony import */ var _utils_Object__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/Object */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Object.js");
/**
 * Responsive functionality module.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */









/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */

/**
 * Responsive is responsible for overriding certain properties when conditions
 * are met.
 *
 * This class is used to dynamically apply and change certain chart properties
 * based on the current values of properties.
 *
 * Mainly, this is used with [[Sprite]]'s dimensional properties, like
 * `pixelWidth` and `pixelHeight`. However, it can be used to dynamically
 * change any property, based on any other property's value.
 *
 * A default responsive rules are disabled.
 *
 * To enable, set `enabled = false`. E.g.:
 *
 * ```TypeScript
 * chart.responsive.enabled = true;
 * ```
 * ```JavaScript
 * chart.responsive.enabled = true;
 * ```
 *
 * @see {@link IResponsiveEvents} for a list of available events
 * @see {@link IResponsiveAdapters} for a list of available Adapters
 * @todo Add default rules
 * @todo Watch for rule modification
 * @important
 */

var Responsive =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_8__.__extends)(Responsive, _super);
  /**
   * Constructor
   */


  function Responsive() {
    var _this = // Init
    _super.call(this) || this;
    /**
     * Holds a list of responsive rules organized by object type.
     */


    _this._rules = new _utils_List__WEBPACK_IMPORTED_MODULE_1__.List();
    /**
     * Holds the list of the default responsive rules.
     * @deprecated
     */
    //protected _defaultRules = new List<IResponsiveRule>();

    /**
     * Holds the list of currently applied rules.
     */

    _this._appliedRules = {};
    /**
     * Used to keep track of objects that have rules applied at the moment.
     */

    _this._appliedTargets = [];
    /**
     * Use default rules in addition to the user-defined ones?
     */

    _this._useDefault = true;
    /**
     * Adapter.
     */

    _this.adapter = new _utils_Adapter__WEBPACK_IMPORTED_MODULE_2__.Adapter(_this);
    /**
     * Indicates of responsive rules application is enabled.
     */

    _this._enabled = false;
    /**
     * Holds disposers for all events added by this class.
     */

    _this._responsiveDisposers = [];
    /**
     * Collection of objects and state ids that do not have any properties set.
     */

    _this._noStates = [];
    _this.className = "Responsive"; // Set up rules list events

    _this.rules.events.on("inserted", function () {
      _this.checkRules();
    }, true);

    _this.rules.events.on("removed", function () {
      _this.checkRules();
    }, true);

    _this._disposers.push(_this.rules.events); // Apply theme


    _this.applyTheme();

    return _this;
  }

  Object.defineProperty(Responsive.prototype, "component", {
    /**
     * @return Target object
     */
    get: function get() {
      return this._component;
    },

    /**
     * A target object that responsive rules will need to be applied to.
     *
     * @param value  Target object
     */
    set: function set(value) {
      var _this = this; // Check if it's the same


      if (value == this._component) {
        return;
      } // Check if we already have a set up component and remove its events


      this.disposeResponsiveHandlers(); // Set

      this._component = value; // Set up resize monitoring events

      this._responsiveDisposers.push(_utils_Type__WEBPACK_IMPORTED_MODULE_6__.getValue(this.component).events.on("sizechanged", function () {
        _this.checkRules();
      }, this));

      this._responsiveDisposers.push(_utils_Type__WEBPACK_IMPORTED_MODULE_6__.getValue(this.component).events.once("datavalidated", function () {
        if (_this._component.isReady()) {
          _this.checkRules(true);
        }
      }, this)); // Enable resoponsive


      this.enabled = true;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Responsive.prototype, "enabled", {
    /**
     * @return Apply responsive rules?
     */
    get: function get() {
      return this.adapter.apply("enabled", this._enabled);
    },

    /**
     * Should responsive rules be checked against and applied?
     *
     * @default false
     * @param value  Apply responsive rules?
     */
    set: function set(value) {
      if (this._enabled != value) {
        this._enabled = value; // Run `applyRules` so that any currently applied rules can be reset

        this.applyRules();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Responsive.prototype, "useDefault", {
    /**
     * @return Use default rules?
     */
    get: function get() {
      return this.adapter.apply("useDefault", this._useDefault);
    },

    /**
     * Should default responsive rules be applied in addition to user-defined
     * ones.
     *
     * User-defined rules will take precedence over default rules whenever they
     * produce conflicting settings.
     *
     * @default true
     * @param value  Use default rules?
     */
    set: function set(value) {
      if (this._useDefault != value) {
        this._useDefault = value; // Run `applyRules` so that any currently applied rules can be reset

        this.applyRules();
      }
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Responsive.prototype, "rules", {
    /**
     * @return User-defined rules
     */
    get: function get() {
      return this.adapter.apply("rules", this._rules);
    },

    /**
     * User-defined responsive rules.
     *
     * User-defined rules will take precedence over default rules whenever they
     * produce conflicting settings.
     *
     * Use `allRules` to get all applicable rules including default and
     * user-defined ones.
     *
     * @param value  User-defined rules
     */
    set: function set(value) {
      this._rules = value;
      this._enabled = true;
      this.applyRules();
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Responsive.prototype, "defaultRules", {
    /**
     * Default responsive rules.
     *
     * @readonly
     * @return List of responsive rules
     */
    get: function get() {
      return this.adapter.apply("defaultRules", defaultRules);
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(Responsive.prototype, "allRules", {
    /**
     * Returns all rules: default rules (if not disabled) combined with
     * user-defined ones.
     *
     * @readonly
     * @return List of all applicable rules
     */
    get: function get() {
      // Create empty list
      var rules = new _utils_List__WEBPACK_IMPORTED_MODULE_1__.List(); // Add default rules if not disabled
      // A code, requesting `allRules` must ensure loading of default rules
      // by calling `loadDefaultRules()`

      if (this.useDefault) {
        rules.copyFrom(this.defaultRules);
      } // Add user-defined ones


      rules.copyFrom(this.rules);
      return this.adapter.apply("allRules", rules);
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Checks if rule by the particular id currently applied.
   *
   * @param ruleId  Rule ID
   * @return Is currently applied?
   */

  Responsive.prototype.isApplied = function (ruleId) {
    var rule = this._appliedRules[ruleId];
    return _utils_Type__WEBPACK_IMPORTED_MODULE_6__.hasValue(rule) ? rule : false;
  };
  /**
   * Checks which responsive rules currently satisfy their conditions and
   * should be applied, or unapplied.
   *
   * @ignore Exclude from docs
   */


  Responsive.prototype.checkRules = function (force) {
    var _this = this;

    if (force === void 0) {
      force = false;
    } // Check if there are any rules


    var rules = this.allRules;

    if (!rules || rules.length == 0) {
      return;
    } // Init a list of rules to be applied


    var rulesChanged = false;
    var component = _utils_Type__WEBPACK_IMPORTED_MODULE_6__.getValue(this.component); // Do not perform rule application of target has no size

    if (component.pixelWidth == 0 || component.pixelHeight == 0) {
      return;
    } // Check which rules match


    _utils_Iterator__WEBPACK_IMPORTED_MODULE_4__.each(rules.iterator(), function (rule) {
      // Check if rule has an id
      if (!rule.id) {
        rule.id = _Registry__WEBPACK_IMPORTED_MODULE_3__.registry.getUniqueId();
      } // Init indicator if this rule should be applied


      var apply = rule.relevant(component); // Let's check if this rule needs to be applied

      if (apply && !_this.isApplied(rule.id) || !apply && _this.isApplied(rule.id)) {
        rulesChanged = true;
      }

      _this._appliedRules[rule.id] = apply;
    });

    if (force) {
      rulesChanged = true;
    } // Check if we need to re-apply the rules


    if (rulesChanged) {
      if (!this.component.isReady()) {
        // The chart is not yet ready (built)
        // We will hide the chart and delay application of rules
        // until "ready" event kicks in
        //component.hide(0);
        component.hidden = true;
        component.events.once("ready", function (ev) {
          ev.target.show(0);

          _this._applyRules();
        });
        return;
      }

      this.dispatchImmediately("ruleschanged");

      this._applyRules();
    }
  };

  Responsive.prototype._applyRules = function () {
    var _this = this;

    if (this._timeout) {
      this._timeout.dispose();
    }

    this._timeout = this.setTimeout(function () {
      _this.applyRules();
    }, 10);
  };
  /**
   * Applies current rules to the object.
   *
   * @ignore Exclude from docs
   * @param target Target object
   * @todo Better type check
   */


  Responsive.prototype.applyRules = function (target) {
    var _this = this; // If no target supplied, we assume the top-level element


    var newTarget = _utils_Type__WEBPACK_IMPORTED_MODULE_6__.hasValue(target) ? target : _utils_Type__WEBPACK_IMPORTED_MODULE_6__.getValue(this.component); // Check each rule

    var defaultStateApplied = false;

    if (this.enabled) {
      var isApplied_1 = false;
      _utils_Iterator__WEBPACK_IMPORTED_MODULE_4__.each(this.allRules.iterator(), function (rule) {
        // Get relevant state
        var state = _this.getState(rule, newTarget); // If there's a state, it means it needs to be applied


        if (state) {
          // Check if default state was already applied to this element.
          // We don't want to go resetting default states to ALL element,
          // if they don't have responsive states.
          if (!defaultStateApplied) {
            // Nope, reset states (instantly).
            if (_utils_Array__WEBPACK_IMPORTED_MODULE_5__.indexOf(_this._appliedTargets, newTarget.uid) !== -1) {
              // But only if this element has any rules applied, otherwise no
              // point in setting current state
              newTarget.setState(_this.getDefaultState(newTarget), 0);
            }

            defaultStateApplied = true;
          } // Is this rule currently applied?


          if (_this.isApplied(_utils_Type__WEBPACK_IMPORTED_MODULE_6__.getValue(rule.id))) {
            // Yes. Apply the responsive state
            state.transitionDuration = 0;

            _this.setTargetState(newTarget, state);

            _this.dispatchImmediately("ruleapplied", {
              rule: rule
            });

            isApplied_1 = true;
          }
        }
      });

      if (isApplied_1) {
        _utils_Array__WEBPACK_IMPORTED_MODULE_5__.replace(this._appliedTargets, newTarget.uid);
      } else {
        _utils_Array__WEBPACK_IMPORTED_MODULE_5__.remove(this._appliedTargets, newTarget.uid);
      }
    } // Apply rules to the children


    if (newTarget.children) {
      _utils_Iterator__WEBPACK_IMPORTED_MODULE_4__.each(newTarget.children.iterator(), function (child) {
        _this.applyRules(child);
      });
    }
  };
  /**
   * Returns a relative state for the rule/target, or `undefined` if no state is
   * needed.
   *
   * @param rule    [description]
   * @param target  [description]
   * @return [description]
   */


  Responsive.prototype.getState = function (rule, target) {
    var stateId = "responsive-" + rule.id;
    var tmpId = target.uid + "_" + stateId;

    if (_utils_Array__WEBPACK_IMPORTED_MODULE_5__.indexOf(this._noStates, tmpId) !== -1) {
      return;
    } else if (!target.states.hasKey(stateId)) {
      var state = rule.state(target, stateId);

      if (!state) {
        this._noStates.push(tmpId);
      }

      return state;
    } else {
      return target.states.getKey(stateId);
    }
  };
  /**
   * Creates and returns default responsive rule for the target.
   *
   * This rule will be used to "reset" to non-responsive values.
   * @param   target  Target Sprite
   * @return          State
   */


  Responsive.prototype.getDefaultState = function (target) {
    if (target.states.hasKey("responsive-default")) {
      return target.states.getKey("responsive-default");
    }

    return target.states.create("responsive-default");
  };
  /**
   * Sets state on the target element and updates default state with the
   * overwritten values if needed.
   *
   * @param  target  Target
   * @param  state   State
   */


  Responsive.prototype.setTargetState = function (target, state) {
    var _this = this; // Update default state


    var defaultState = this.getDefaultState(target);
    _utils_Object__WEBPACK_IMPORTED_MODULE_7__.each(state.properties, function (key, val) {
      if (!_utils_Type__WEBPACK_IMPORTED_MODULE_6__.hasValue(defaultState.properties[key])) {
        defaultState.properties[key] = _this.getValue(target, key);
      }
    });
    target.setState(state);
  };
  /**
   * Gets a value from an element.
   *
   * @ignore Exclude from docs
   * @param target    Target object
   * @param property  Property
   * @return Property value
   */


  Responsive.prototype.getValue = function (target, property) {
    // This is a bit hacky, first we check if the property exist.
    // If it doesn't we try accessing target's property directly
    var value = target.getPropertyValue(property);

    if (!_utils_Type__WEBPACK_IMPORTED_MODULE_6__.hasValue(value) && _utils_Type__WEBPACK_IMPORTED_MODULE_6__.hasValue(target[property])) {
      value = target[property];
    }

    return value;
  };
  /**
   * Disposes the object.
   */


  Responsive.prototype.dispose = function () {
    this.disposeResponsiveHandlers();

    _super.prototype.dispose.call(this);
  };
  /**
   * Disposes all event handlers.
   */


  Responsive.prototype.disposeResponsiveHandlers = function () {
    var disposer = this._responsiveDisposers.pop();

    while (disposer) {
      disposer.dispose();
      disposer = this._responsiveDisposers.pop();
    }
  };

  return Responsive;
}(_Base__WEBPACK_IMPORTED_MODULE_0__.BaseObjectEvents);


/**
 * [defaultRules description]
 *
 * @todo description
 */

var defaultRules = new _utils_List__WEBPACK_IMPORTED_MODULE_1__.List();
defaultRules.events.on("inserted", function (ev) {
  ev.newValue.id = _Registry__WEBPACK_IMPORTED_MODULE_3__.registry.getUniqueId();
});
/**
 *
 * @todo description
 */

var ResponsiveBreakpoints =
/** @class */
function () {
  function ResponsiveBreakpoints() {} // Breakpoint functions (for use in `relevant` clause of the responsive rules)


  ResponsiveBreakpoints.widthXXS = function (container) {
    return container.pixelWidth <= ResponsiveBreakpoints.XXS;
  };

  ResponsiveBreakpoints.widthXS = function (container) {
    return container.pixelWidth <= ResponsiveBreakpoints.XS;
  };

  ResponsiveBreakpoints.widthS = function (container) {
    return container.pixelWidth <= ResponsiveBreakpoints.S;
  };

  ResponsiveBreakpoints.widthM = function (container) {
    return container.pixelWidth <= ResponsiveBreakpoints.M;
  };

  ResponsiveBreakpoints.widthL = function (container) {
    return container.pixelWidth <= ResponsiveBreakpoints.L;
  };

  ResponsiveBreakpoints.widthXL = function (container) {
    return container.pixelWidth <= ResponsiveBreakpoints.XL;
  };

  ResponsiveBreakpoints.widthXXL = function (container) {
    return container.pixelWidth <= ResponsiveBreakpoints.XXL;
  };

  ResponsiveBreakpoints.heightXXS = function (container) {
    return container.pixelHeight <= ResponsiveBreakpoints.XXS;
  };

  ResponsiveBreakpoints.heightXS = function (container) {
    return container.pixelHeight <= ResponsiveBreakpoints.XS;
  };

  ResponsiveBreakpoints.heightS = function (container) {
    return container.pixelHeight <= ResponsiveBreakpoints.S;
  };

  ResponsiveBreakpoints.heightM = function (container) {
    return container.pixelHeight <= ResponsiveBreakpoints.M;
  };

  ResponsiveBreakpoints.heightL = function (container) {
    return container.pixelHeight <= ResponsiveBreakpoints.L;
  };

  ResponsiveBreakpoints.heightXL = function (container) {
    return container.pixelHeight <= ResponsiveBreakpoints.XL;
  };

  ResponsiveBreakpoints.heightXXL = function (container) {
    return container.pixelHeight <= ResponsiveBreakpoints.XXL;
  };

  ResponsiveBreakpoints.isXXS = function (container) {
    return container.pixelWidth <= ResponsiveBreakpoints.XXS && container.pixelHeight <= ResponsiveBreakpoints.XXS;
  };

  ResponsiveBreakpoints.isXS = function (container) {
    return container.pixelWidth <= ResponsiveBreakpoints.XS && container.pixelHeight <= ResponsiveBreakpoints.XS;
  };

  ResponsiveBreakpoints.isS = function (container) {
    return container.pixelWidth <= ResponsiveBreakpoints.S && container.pixelHeight <= ResponsiveBreakpoints.S;
  };

  ResponsiveBreakpoints.isM = function (container) {
    return container.pixelWidth <= ResponsiveBreakpoints.M && container.pixelHeight <= ResponsiveBreakpoints.M;
  };

  ResponsiveBreakpoints.isL = function (container) {
    return container.pixelWidth <= ResponsiveBreakpoints.L && container.pixelHeight <= ResponsiveBreakpoints.L;
  };

  ResponsiveBreakpoints.isXL = function (container) {
    return container.pixelWidth <= ResponsiveBreakpoints.XL && container.pixelHeight <= ResponsiveBreakpoints.XL;
  };

  ResponsiveBreakpoints.isXXL = function (container) {
    return container.pixelWidth <= ResponsiveBreakpoints.XXL && container.pixelHeight <= ResponsiveBreakpoints.XXL;
  };

  ResponsiveBreakpoints.maybeXXS = function (container) {
    return container.pixelWidth <= ResponsiveBreakpoints.XXS || container.pixelHeight <= ResponsiveBreakpoints.XXS;
  };

  ResponsiveBreakpoints.maybeXS = function (container) {
    return container.pixelWidth <= ResponsiveBreakpoints.XS || container.pixelHeight <= ResponsiveBreakpoints.XS;
  };

  ResponsiveBreakpoints.maybeS = function (container) {
    return container.pixelWidth <= ResponsiveBreakpoints.S || container.pixelHeight <= ResponsiveBreakpoints.S;
  };

  ResponsiveBreakpoints.maybeM = function (container) {
    return container.pixelWidth <= ResponsiveBreakpoints.M || container.pixelHeight <= ResponsiveBreakpoints.M;
  };

  ResponsiveBreakpoints.maybeL = function (container) {
    return container.pixelWidth <= ResponsiveBreakpoints.L || container.pixelHeight <= ResponsiveBreakpoints.L;
  };

  ResponsiveBreakpoints.maybeXL = function (container) {
    return container.pixelWidth <= ResponsiveBreakpoints.XL || container.pixelHeight <= ResponsiveBreakpoints.XL;
  };

  ResponsiveBreakpoints.maybeXXL = function (container) {
    return container.pixelWidth <= ResponsiveBreakpoints.XXL || container.pixelHeight <= ResponsiveBreakpoints.XXL;
  }; // Named pixel breakpoints


  ResponsiveBreakpoints.XXS = 100;
  ResponsiveBreakpoints.XS = 200;
  ResponsiveBreakpoints.S = 300;
  ResponsiveBreakpoints.M = 400;
  ResponsiveBreakpoints.L = 600;
  ResponsiveBreakpoints.XL = 800;
  ResponsiveBreakpoints.XXL = 1000;
  return ResponsiveBreakpoints;
}();



/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/utils/SortedList.js":
/*!*****************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/utils/SortedList.js ***!
  \*****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "OrderedList": () => (/* binding */ OrderedList),
/* harmony export */   "OrderedListTemplate": () => (/* binding */ OrderedListTemplate),
/* harmony export */   "SortedList": () => (/* binding */ SortedList),
/* harmony export */   "SortedListTemplate": () => (/* binding */ SortedListTemplate)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _EventDispatcher__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./EventDispatcher */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/EventDispatcher.js");
/* harmony import */ var _Array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Array */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Array.js");
/* harmony import */ var _Iterator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Iterator */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Iterator.js");
/* harmony import */ var _Type__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */





/**
 * Ordered list contains values of any type in an indexed array.
 */

var OrderedList =
/** @class */
function () {
  /**
   * Constructor
   *
   * @param initial  Inital list of values to add to list
   */
  function OrderedList(initial) {
    /**
     * Holds list values.
     */
    this._values = [];
    /**
     * Event dispatcher.
     */

    this.events = new _EventDispatcher__WEBPACK_IMPORTED_MODULE_0__.EventDispatcher();

    if (initial != null) {
      this.setAll(initial);
    }
  }

  Object.defineProperty(OrderedList.prototype, "values", {
    /**
     * All items of the list.
     *
     * Do not modify the list directly. Rather use `insert()` and `remove()`
     * methods.
     *
     * @return List values
     */
    get: function get() {
      return this._values;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Inserts a value into list item array.
   *
   * @param value  Value
   */

  OrderedList.prototype._insert = function (value) {
    this._values.push(value);

    return this._values.length - 1;
  };

  Object.defineProperty(OrderedList.prototype, "length", {
    /**
     * Number of items in the list.
     *
     * @readonly
     * @return Length
     */
    get: function get() {
      return this._values.length;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Returns the index of the specific `value`.
   *
   * -1 if not found.
   *
   * @param value  Value
   * @return Index
   */

  OrderedList.prototype.indexOf = function (value) {
    return _Array__WEBPACK_IMPORTED_MODULE_1__.indexOf(this._values, value);
  };
  /**
   * Checks if list contains the `value`.
   *
   * @param value  Value
   * @return In the list?
   */


  OrderedList.prototype.contains = function (value) {
    return this.indexOf(value) !== -1;
  };
  /**
   * Returns an item at specific `index`.
   *
   * @param index  Index
   * @return Item
   */


  OrderedList.prototype.getIndex = function (index) {
    return this._values[index];
  };

  Object.defineProperty(OrderedList.prototype, "first", {
    /**
     * First item in the list.
     *
     * @return Item
     */
    get: function get() {
      return this._values[0];
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(OrderedList.prototype, "last", {
    /**
     * Last item in the list.
     *
     * @return Item
     */
    get: function get() {
      return this._values[this._values.length - 1];
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Inserts a value into list.
   *
   * @param value  Value
   */

  OrderedList.prototype.insert = function (value) {
    var index = this._insert(value);

    if (this.events.isEnabled("inserted")) {
      this.events.dispatchImmediately("inserted", {
        type: "inserted",
        target: this,
        index: index,
        newValue: value
      });
    }
  };
  /**
   * Removes an item with the `value` from the list.
   *
   * @param value  Value
   */


  OrderedList.prototype.remove = function (value) {
    var index = this.indexOf(value);

    if (index !== -1) {
      var oldValue = this._values[index];
      _Array__WEBPACK_IMPORTED_MODULE_1__.removeIndex(this._values, index);

      if (this.events.isEnabled("removed")) {
        this.events.dispatchImmediately("removed", {
          type: "removed",
          target: this,
          index: index,
          oldValue: oldValue
        });
      }
    }
  };
  /**
   * Sets multiple items to the list.
   *
   * All current items are removed.
   *
   * @param newArray  New items
   */


  OrderedList.prototype.setAll = function (newArray) {
    var _this = this;

    _Array__WEBPACK_IMPORTED_MODULE_1__.eachReverse(this._values, function (x, i) {
      _this._values.pop();

      if (_this.events.isEnabled("removed")) {
        _this.events.dispatchImmediately("removed", {
          type: "removed",
          target: _this,
          index: i,
          oldValue: x
        });
      }
    });
    _Array__WEBPACK_IMPORTED_MODULE_1__.each(newArray, function (value) {
      _this.insert(value);
    });
  };
  /**
   * Removes all items from the list.
   */


  OrderedList.prototype.clear = function () {
    this.setAll([]);
  };
  /**
   * Returns part of the list between `start` and `end` indexes, as a new
   * [[OrderedList]].
   *
   * @param start  Start index
   * @param end    End index
   * @return Items in range
   */


  OrderedList.prototype.slice = function (start, end) {
    var out = new OrderedList();
    out._values = this._values.slice(start, end);
    return out;
  };
  /**
   * Finds a closest available index to the `value` in specified direction.
   *
   * @ignore exclude from docs
   * @param value      value to search for
   * @param fn         A callback function that returns value of the item
   * @param direction  Direciton
   * @return Index
   */


  OrderedList.prototype.findClosestIndex = function (value, fn, direction) {
    if (direction === void 0) {
      direction = "any";
    } // Init temporary values


    var closestIndex = -1;
    var closestValue;
    var closestDifference;
    var i = 0;
    _Iterator__WEBPACK_IMPORTED_MODULE_2__.eachContinue(this.iterator(), function (element) {
      var item = fn(element); // Calc difference

      if (direction === "any") {
        // Exact match?
        if (item === value) {
          // Found exact value - don't bother searching further
          closestIndex = i;
          return false;
        }

        var difference = Math.abs(value - item);

        if (!_Type__WEBPACK_IMPORTED_MODULE_3__.hasValue(closestDifference) || closestDifference > difference) {
          closestIndex = i;
          closestValue = item;
          closestDifference = difference;
        }
      } else if (direction === "left" && item < value) {
        if (!_Type__WEBPACK_IMPORTED_MODULE_3__.hasValue(closestValue) || closestValue < item) {
          closestIndex = i;
          closestValue = item;
        }
      } else if (direction === "right" && item >= value) {
        if (!_Type__WEBPACK_IMPORTED_MODULE_3__.hasValue(closestValue) || closestValue >= item) {
          closestIndex = i;
          closestValue = item;
        }
      }

      ++i;
      return true;
    }); // Found nothing?

    if (closestIndex === -1) {
      if (direction === "left") {
        // Use First one
        closestIndex = 0;
      } else if (direction === "right") {
        // Use last item
        closestIndex = this.length - 1;
      }
    }

    return closestIndex;
  };
  /**
   * Returns a list iterator.
   *
   * @return Iterator
   */


  OrderedList.prototype.iterator = function () {
    return _Iterator__WEBPACK_IMPORTED_MODULE_2__.fromArray(this._values);
  };
  /**
   * Returns an ES6 iterator for the list.
   */


  OrderedList.prototype[Symbol.iterator] = function () {
    var length, i;
    return (0,tslib__WEBPACK_IMPORTED_MODULE_4__.__generator)(this, function (_a) {
      switch (_a.label) {
        case 0:
          length = this._values.length;
          i = 0;
          _a.label = 1;

        case 1:
          if (!(i < length)) return [3
          /*break*/
          , 4];
          return [4
          /*yield*/
          , this._values[i]];

        case 2:
          _a.sent();

          _a.label = 3;

        case 3:
          ++i;
          return [3
          /*break*/
          , 1];

        case 4:
          return [2
          /*return*/
          ];
      }
    });
  };
  /**
   * Calls `f` for each element in the list.
   */


  OrderedList.prototype.each = function (f) {
    _Array__WEBPACK_IMPORTED_MODULE_1__.each(this._values, f);
  };

  return OrderedList;
}();


/**
 * A list where all items are ordered according to specific ordering function,
 * which is passed in via constructor parameter, when creating an instance of
 * [[SortedList]].
 */

var SortedList =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_4__.__extends)(SortedList, _super);
  /**
   * Constructor.
   *
   * @param sort  Ordering function
   */


  function SortedList(sort) {
    var _this = _super.call(this) || this;

    _this._ordering = sort;
    return _this;
  }
  /**
   * Inserts item into the list.
   *
   * @param value  Item
   */


  SortedList.prototype._insert = function (value) {
    var index = _Array__WEBPACK_IMPORTED_MODULE_1__.getSortedIndex(this._values, this._ordering, value).index;
    _Array__WEBPACK_IMPORTED_MODULE_1__.insertIndex(this._values, index, value);
    return index;
  };
  /**
   * Returns index of the item in list if found.
   *
   * -1 if item is not in the list.
   *
   * @param value  Item to search for
   * @return Index
   */


  SortedList.prototype.indexOf = function (value) {
    var _a = _Array__WEBPACK_IMPORTED_MODULE_1__.getSortedIndex(this._values, this._ordering, value),
        found = _a.found,
        index = _a.index;

    if (found) {
      return index;
    } else {
      return -1;
    }
  };
  /**
   * [udpate description]
   *
   * @ignore Exclude from docs
   * @todo Description
   * @param value [description]
   */


  SortedList.prototype.update = function (value) {
    // @todo test this
    var index = _Array__WEBPACK_IMPORTED_MODULE_1__.indexOf(this._values, value); // @todo throw an error if it doesn't exist ?

    if (index !== -1) {
      var last = this._values.length - 1; // Check if the current ordering is correct

      if (!((index === 0 || this._ordering(this._values[index - 1], value) < 0) && (index === last || this._ordering(value, this._values[index + 1]) < 0))) {
        // TODO send remove/insert/move events
        _Array__WEBPACK_IMPORTED_MODULE_1__.removeIndex(this._values, index);

        this._insert(value);
      }
    }
  };

  return SortedList;
}(OrderedList);


/**
 * A version of a [[OrderedList]] that has a "template".
 *
 * A template is an instance of an object, that can be used to create new
 * elements in the list without actually needing to create instances for those.
 *
 * When new element is created in the list, e.g. by calling its `create()`
 * method, an exact copy of the element is created (including properties and
 * other attributes), inserted into the list and returned.
 */

var OrderedListTemplate =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_4__.__extends)(OrderedListTemplate, _super);
  /**
   * Constructor
   *
   * @param t Template object
   */


  function OrderedListTemplate(t) {
    var _this = _super.call(this) || this;

    _this.template = t;
    return _this;
  }

  Object.defineProperty(OrderedListTemplate.prototype, "template", {
    /**
     * @return Template object
     */
    get: function get() {
      return this._template;
    },

    /**
     * A "template" object to copy all properties from when creating new list
     * items.
     *
     * @param v  Template object
     */
    set: function set(v) {
      v.isTemplate = true;
      this._template = v;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Copies all elements from other list.
   *
   * @param source  Source list
   */

  OrderedListTemplate.prototype.copyFrom = function (source) {
    var _this = this;

    _Iterator__WEBPACK_IMPORTED_MODULE_2__.each(source.iterator(), function (value) {
      _this.insert(value.clone());
    });
  };
  /**
   * Returns part of the list, starting at `start` and ending at `end` indexes,
   * as a new [[OrderedListTemplate]].
   *
   * @param start  Start index
   * @param end    End index
   * @return New list
   */


  OrderedListTemplate.prototype.slice = function (start, end) {
    var out = new OrderedListTemplate(this.template);
    out._values = this._values.slice(start, end);
    return out;
  };

  OrderedListTemplate.prototype.create = function (make) {
    var clone = make != null ? new make() : this.template.clone();
    this.insert(clone);
    return clone;
  };

  return OrderedListTemplate;
}(OrderedList);


/**
 * A version of a [[SortedList]] that has a "template".
 *
 * A template is an instance of an object, that can be used to create new
 * elements in the list without actually needing to create instances for those.
 *
 * When new element is created in the list, e.g. by calling its `create()`
 * method, an exact copy of the element is created (including properties and
 * other attributes), inserted into the list and returned.
 */

var SortedListTemplate =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_4__.__extends)(SortedListTemplate, _super);
  /**
   * Constructor
   *
   * @param t     Template object
   * @param sort  Ordering function
   */


  function SortedListTemplate(t, sort) {
    var _this = _super.call(this, sort) || this;

    _this.template = t;
    return _this;
  }

  Object.defineProperty(SortedListTemplate.prototype, "template", {
    /**
     * @return Template object
     */
    get: function get() {
      return this._template;
    },

    /**
     * A "template" object to copy all properties from when creating new list
     * items.
     *
     * @param v  Template object
     */
    set: function set(v) {
      v.isTemplate = true;
      this._template = v;
    },
    enumerable: true,
    configurable: true
  });
  /**
   * Copies all elements from other list.
   *
   * @param source  Source list
   */

  SortedListTemplate.prototype.copyFrom = function (source) {
    var _this = this;

    _Iterator__WEBPACK_IMPORTED_MODULE_2__.each(source.iterator(), function (value) {
      _this.insert(value.clone());
    });
  };

  SortedListTemplate.prototype.create = function (make) {
    var clone = make != null ? new make() : this.template.clone();
    this.insert(clone);
    return clone;
  };

  return SortedListTemplate;
}(SortedList);



/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/utils/String.js":
/*!*************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/utils/String.js ***!
  \*************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "order": () => (/* binding */ order),
/* harmony export */   "random": () => (/* binding */ random),
/* harmony export */   "repeat": () => (/* binding */ repeat)
/* harmony export */ });
/**
 * ============================================================================
 * COMPARING FUNCTIONS
 * ============================================================================
 * @hidden
 */

/**
 * Comparing function used for ordering.
 *
 * @ignore Exclude from docs
 * @todo Use localeCompare
 * @param a  Item 1
 * @param b  Item 2
 * @return Result
 */
function order(a, b) {
  if (a === b) {
    return 0;
  } else if (a < b) {
    return -1;
  } else {
    return 1;
  }
}
/**
 * ============================================================================
 * OTHER FUNCTIONS
 * ============================================================================
 * @hidden
 */

/**
 * Repeats a `string` number of times as set in `amount`.
 *
 * @ignore Exclude from docs
 * @todo Make this faster
 * @param string  Source string
 * @param amount  Number of times to repeat string
 * @return New string
 */

function repeat(string, amount) {
  return new Array(amount + 1).join(string);
}
/**
 * Generates a random string `characters` length.
 *
 * @param chars  Number of characters
 * @return Random string
 */

function random(chars) {
  var res = "";
  var choice = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";

  for (var i = 0; i < chars; i++) {
    res += choice.charAt(Math.floor(Math.random() * choice.length));
  }

  return res;
}

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Strings.js":
/*!**************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/utils/Strings.js ***!
  \**************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "DATE": () => (/* binding */ DATE),
/* harmony export */   "DURATION": () => (/* binding */ DURATION),
/* harmony export */   "NUMBER": () => (/* binding */ NUMBER),
/* harmony export */   "PLACEHOLDER": () => (/* binding */ PLACEHOLDER),
/* harmony export */   "PLACEHOLDER2": () => (/* binding */ PLACEHOLDER2),
/* harmony export */   "PX": () => (/* binding */ PX),
/* harmony export */   "STRING": () => (/* binding */ STRING)
/* harmony export */ });
/**
 * A collection of String-based constants.
 * @hidden
 * @ignore Exclude from docs
 */

/**
 * @ignore Exclude from docs
 */
var PX = "px";
/**
 * @ignore Exclude from docs
 */

var STRING = "string";
/**
 * @ignore Exclude from docs
 */

var NUMBER = "number";
/**
 * @ignore Exclude from docs
 */

var DATE = "date";
/**
 * @ignore Exclude from docs
 */

var DURATION = "duration";
/**
 * @ignore Exclude from docs
 */

var PLACEHOLDER = "__§§§__";
/**
 * @ignore Exclude from docs
 */

var PLACEHOLDER2 = "__§§§§__";

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Time.js":
/*!***********************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/utils/Time.js ***!
  \***********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "add": () => (/* binding */ add),
/* harmony export */   "checkChange": () => (/* binding */ checkChange),
/* harmony export */   "copy": () => (/* binding */ copy),
/* harmony export */   "getDuration": () => (/* binding */ getDuration),
/* harmony export */   "getNextUnit": () => (/* binding */ getNextUnit),
/* harmony export */   "getTime": () => (/* binding */ getTime),
/* harmony export */   "getTimezoneMinutes": () => (/* binding */ getTimezoneMinutes),
/* harmony export */   "now": () => (/* binding */ now),
/* harmony export */   "round": () => (/* binding */ round),
/* harmony export */   "setTimezone": () => (/* binding */ setTimezone),
/* harmony export */   "timeUnitDurations": () => (/* binding */ timeUnitDurations)
/* harmony export */ });
/* harmony import */ var _utils_Type__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");

/**
 * Maps time period names to their numeric representations in milliseconds.
 *
 * @ignore Exclude from docs
 */

var timeUnitDurations = {
  millisecond: 1,
  second: 1000,
  minute: 60000,
  hour: 3600000,
  day: 86400000,
  week: 604800000,
  month: 2592000000,
  year: 31536000000
};
/**
 * Returns the next time unit that goes after source `unit`.
 *
 * E.g. "hour" is the next unit after "minute", etc.
 *
 * @ignore Exclude from docs
 * @param unit  Source time unit
 * @return Next time unit
 */

function getNextUnit(unit) {
  switch (unit) {
    case "year":
      return;

    case "month":
      return "year";

    case "week":
      return "month";

    case "day":
      return "month";
    // not a mistake

    case "hour":
      return "day";

    case "minute":
      return "hour";

    case "second":
      return "minute";

    case "millisecond":
      return "second";
  }
}
/**
 * Returns number of milliseconds in the `count` of time `unit`.
 *
 * Available units: "millisecond", "second", "minute", "hour", "day", "week",
 * "month", and "year".
 *
 * @ignore Exclude from docs
 * @param unit   Time unit
 * @param count  Number of units
 * @return Milliseconds
 */

function getDuration(unit, count) {
  if (!_utils_Type__WEBPACK_IMPORTED_MODULE_0__.hasValue(count)) {
    count = 1;
  }

  return timeUnitDurations[unit] * count;
}
/**
 * Returns current `Date` object.
 *
 * @return Current date
 */

function now() {
  return new Date();
}
/**
 * Returns current timestamp.
 *
 * @return Current timestamp
 */

function getTime() {
  return now().getTime();
}
/**
 * Returns a copy of the `Date` object.
 *
 * @ignore Exclude from docs
 * @param date  Source date
 * @return Copy
 */

function copy(date) {
  return new Date(date.getTime()); // todo: check if this is ok. new Date(date) used to strip milliseconds on FF in v3
}
/**
 * Checks if the `unit` part of two `Date` objects do not match. Two dates
 * represent a "range" of time, rather the same time date.
 *
 * @ignore Exclude from docs
 * @param dateOne  Date 1
 * @param dateTwo  Date 2
 * @param unit     Time unit to check
 * @return Range?
 */

function checkChange(dateOne, dateTwo, unit, utc) {
  dateOne = new Date(dateOne.getTime());
  dateTwo = new Date(dateTwo.getTime());
  var timeZoneOffset1 = 0;
  var timeZoneOffset2 = 0;

  if (!utc && unit != "millisecond") {
    timeZoneOffset1 = dateOne.getTimezoneOffset();
    dateOne.setUTCMinutes(dateOne.getUTCMinutes() - timeZoneOffset1);
    timeZoneOffset2 = dateTwo.getTimezoneOffset();
    dateTwo.setUTCMinutes(dateTwo.getUTCMinutes() - timeZoneOffset2);
  }

  var changed = false;

  switch (unit) {
    case "year":
      if (dateOne.getUTCFullYear() != dateTwo.getUTCFullYear()) {
        changed = true;
      }

      break;

    case "month":
      if (dateOne.getUTCFullYear() != dateTwo.getUTCFullYear()) {
        changed = true;
      } else if (dateOne.getUTCMonth() != dateTwo.getUTCMonth()) {
        changed = true;
      }

      break;

    case "day":
      if (dateOne.getUTCMonth() != dateTwo.getUTCMonth()) {
        changed = true;
      } else if (dateOne.getUTCDate() != dateTwo.getUTCDate()) {
        changed = true;
      }

      break;

    case "hour":
      if (dateOne.getUTCHours() != dateTwo.getUTCHours()) {
        changed = true;
      }

      break;

    case "minute":
      if (dateOne.getUTCMinutes() != dateTwo.getUTCMinutes()) {
        changed = true;
      }

      break;

    case "second":
      if (dateOne.getUTCSeconds() != dateTwo.getUTCSeconds()) {
        changed = true;
      }

      break;

    case "millisecond":
      if (dateOne.getTime() != dateTwo.getTime()) {
        changed = true;
      }

      break;
  }

  if (changed) {
    return true;
  }

  var nextUnit = getNextUnit(unit);

  if (nextUnit) {
    dateOne.setUTCMinutes(dateOne.getUTCMinutes() + timeZoneOffset1);
    dateTwo.setUTCMinutes(dateTwo.getUTCMinutes() + timeZoneOffset2);
    return checkChange(dateOne, dateTwo, nextUnit, utc);
  } else {
    return false;
  }
}
/**
 * Adds `count` of time `unit` to the source date. Returns a modified `Date` object.
 *
 * @ignore Exclude from docs
 * @param date   Source date
 * @param unit   Time unit
 * @param count  Number of units to add
 * @return Modified date
 */

function add(date, unit, count, utc) {
  var timeZoneOffset = 0;

  if (!utc && unit != "millisecond") {
    timeZoneOffset = date.getTimezoneOffset();
    date.setUTCMinutes(date.getUTCMinutes() - timeZoneOffset);
  }

  switch (unit) {
    case "day":
      var day = date.getUTCDate();
      date.setUTCDate(day + count);
      break;

    case "second":
      var seconds = date.getUTCSeconds();
      date.setUTCSeconds(seconds + count);
      break;

    case "millisecond":
      var milliseconds = date.getUTCMilliseconds();
      date.setUTCMilliseconds(milliseconds + count);
      break;

    case "hour":
      var hours = date.getUTCHours();
      date.setUTCHours(hours + count);
      break;

    case "minute":
      var minutes = date.getUTCMinutes();
      date.setUTCMinutes(minutes + count);
      break;

    case "year":
      var year = date.getUTCFullYear();
      date.setUTCFullYear(year + count);
      break;

    case "month":
      var month = date.getUTCMonth();
      date.setUTCMonth(month + count);
      break;

    case "week":
      var wday = date.getUTCDate();
      date.setUTCDate(wday + count * 7);
      break;
  }

  if (!utc && unit != "millisecond") {
    date.setUTCMinutes(date.getUTCMinutes() + timeZoneOffset);

    if (unit == "day" || unit == "week" || unit == "month" || unit == "year") {
      var newTimeZoneOffset = date.getTimezoneOffset();

      if (newTimeZoneOffset != timeZoneOffset) {
        var diff = newTimeZoneOffset - timeZoneOffset;
        date.setUTCMinutes(date.getUTCMinutes() + diff); // solves issues if newe time falls back to old time zone

        if (date.getTimezoneOffset() != newTimeZoneOffset) {
          date.setUTCMinutes(date.getUTCMinutes() - diff);
        }
      }
    }
  }

  return date;
}
/**
 * "Rounds" the date to specific time unit.
 *
 * @ignore Exclude from docs
 * @param date             Source date
 * @param unit             Time unit
 * @param count            Number of units to round to
 * @param firstDateOfWeek  First day of week
 * @param roundMinutes     Minutes to round to (some timezones use non-whole hour)
 * @param timezone         Use specific named timezone when rounding
 * @return New date
 */

function round(date, unit, count, firstDateOfWeek, utc, firstDate, roundMinutes, timezone) {
  if (roundMinutes === void 0) {
    roundMinutes = 0;
  }

  if (!_utils_Type__WEBPACK_IMPORTED_MODULE_0__.isNumber(count)) {
    count = 1;
  }

  var timeZoneOffset = 0;

  if (timezone && ["day", "month", "week", "year"].indexOf(unit) != -1) {
    date = setTimezone(date, timezone);
  }

  if (!utc && unit != "millisecond") {
    timeZoneOffset = date.getTimezoneOffset();
    date.setUTCMinutes(date.getUTCMinutes() - timeZoneOffset);
  }

  switch (unit) {
    case "day":
      var day = date.getUTCDate();

      if (count > 1) {
        //	day = Math.floor(day / count) * count;
        if (firstDate) {
          firstDate = round(firstDate, "day", 1);
          var difference = date.getTime() - firstDate.getTime();
          var unitCount = Math.floor(difference / getDuration("day") / count);
          var duration = getDuration("day", unitCount * count);
          date.setTime(firstDate.getTime() + duration - timeZoneOffset * getDuration("minute"));
        }
      } else {
        date.setUTCDate(day);
      }

      date.setUTCHours(0, 0, 0, 0);
      break;

    case "second":
      var seconds = date.getUTCSeconds();

      if (count > 1) {
        seconds = Math.floor(seconds / count) * count;
      }

      date.setUTCSeconds(seconds, 0);
      break;

    case "millisecond":
      if (count == 1) {
        return date; // much better for perf!
      }

      var milliseconds = date.getUTCMilliseconds();
      milliseconds = Math.floor(milliseconds / count) * count;
      date.setUTCMilliseconds(milliseconds);
      break;

    case "hour":
      var hours = date.getUTCHours();

      if (count > 1) {
        hours = Math.floor(hours / count) * count;
      }

      date.setUTCHours(hours, roundMinutes, 0, 0);
      break;

    case "minute":
      var minutes = date.getUTCMinutes();
      milliseconds = date.getUTCMilliseconds();

      if (count > 1) {
        minutes = Math.floor(minutes / count) * count;
      }

      date.setUTCMinutes(minutes, 0, 0);
      break;

    case "month":
      var month = date.getUTCMonth();

      if (count > 1) {
        month = Math.floor(month / count) * count;
      }

      date.setUTCMonth(month, 1);
      date.setUTCHours(0, roundMinutes, 0, 0);
      break;

    case "year":
      var year = date.getUTCFullYear();

      if (count > 1) {
        year = Math.floor(year / count) * count;
      }

      date.setUTCFullYear(year, 0, 1);
      date.setUTCHours(0, roundMinutes, 0, 0); //let nonUTCDateY = new Date(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds());
      //timeZoneOffset = nonUTCDateY.getTimezoneOffset();

      break;

    case "week":
      var wday = date.getUTCDate();
      var weekDay = date.getUTCDay();

      if (!_utils_Type__WEBPACK_IMPORTED_MODULE_0__.isNumber(firstDateOfWeek)) {
        firstDateOfWeek = 1;
      } // todo: rounding when count is not 1


      if (weekDay >= firstDateOfWeek) {
        wday = wday - weekDay + firstDateOfWeek;
      } else {
        wday = wday - (7 + weekDay) + firstDateOfWeek;
      }

      date.setUTCDate(wday);
      date.setUTCHours(0, roundMinutes, 0, 0);
      break;
  }

  if (!utc && unit != "millisecond") {
    date.setUTCMinutes(date.getUTCMinutes() + timeZoneOffset);

    if (unit == "day" || unit == "week" || unit == "month" || unit == "year") {
      var newTimeZoneOffset = date.getTimezoneOffset();

      if (newTimeZoneOffset != timeZoneOffset) {
        var diff = newTimeZoneOffset - timeZoneOffset;
        date.setUTCMinutes(date.getUTCMinutes() + diff);
      }
    }
  }

  return date;
}
/**
 * Returns a new `Date` object which corresponds to the source date in a
 * specific timezone.
 *
 * @since 4.10.1
 * @param   date      Source date
 * @param   timezone  Timezone identifier
 * @return            Recalculated new Date
 */

function setTimezone(date, timezone) {
  var d = new Date(date.toLocaleString("en-US", {
    timeZone: timezone
  }));
  return d;
}
/**
 * Returns minute fraction of the set timezone.
 *
 * @since 4.10.12
 * @param  timezone  Timezone identifier
 * @return           Minutes
 */

function getTimezoneMinutes(timezone) {
  var d = new Date();
  d.setHours(0, 0, 0, 0);
  var d2 = setTimezone(d, timezone);
  return d2.getMinutes();
}

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js":
/*!***********************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js ***!
  \***********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "castNumber": () => (/* binding */ castNumber),
/* harmony export */   "castString": () => (/* binding */ castString),
/* harmony export */   "checkArray": () => (/* binding */ checkArray),
/* harmony export */   "checkBoolean": () => (/* binding */ checkBoolean),
/* harmony export */   "checkDate": () => (/* binding */ checkDate),
/* harmony export */   "checkNumber": () => (/* binding */ checkNumber),
/* harmony export */   "checkObject": () => (/* binding */ checkObject),
/* harmony export */   "checkString": () => (/* binding */ checkString),
/* harmony export */   "getDefault": () => (/* binding */ getDefault),
/* harmony export */   "getType": () => (/* binding */ getType),
/* harmony export */   "getValue": () => (/* binding */ getValue),
/* harmony export */   "getValueDefault": () => (/* binding */ getValueDefault),
/* harmony export */   "hasValue": () => (/* binding */ hasValue),
/* harmony export */   "isArray": () => (/* binding */ isArray),
/* harmony export */   "isDate": () => (/* binding */ isDate),
/* harmony export */   "isNaN": () => (/* binding */ isNaN),
/* harmony export */   "isNumber": () => (/* binding */ isNumber),
/* harmony export */   "isObject": () => (/* binding */ isObject),
/* harmony export */   "isString": () => (/* binding */ isString),
/* harmony export */   "toBoolean": () => (/* binding */ toBoolean),
/* harmony export */   "toNumber": () => (/* binding */ toNumber),
/* harmony export */   "toNumberOrPercent": () => (/* binding */ toNumberOrPercent),
/* harmony export */   "toText": () => (/* binding */ toText)
/* harmony export */ });
/* harmony import */ var _Percent__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Percent */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Percent.js");
/**
 * A collection of utility functions for various type checks and conversion
 * @todo Review unused functions for removal
 * @hidden
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */

/**
 * ============================================================================
 * TYPE CHECK
 * ============================================================================
 * @hidden
 */

/**
 * Returns `true` if value is not a number (NaN).
 *
 * @param value Input value
 * @return Is NaN?
 * @deprecated Is not used anywhere. JS built-in isNaN is used everywhere. Maybe we don't need this, or if we do, then we should use it everywhere
 */

function isNaN(value) {
  return Number(value) !== value;
}
/**
 * Returns a type of the value.
 *
 * @param value  Input value
 * @return Type of the value
 */

function getType(value) {
  return {}.toString.call(value);
}
/**
 * Returns a default value if the passed in value is empty.
 *
 * @param value     Input value
 * @param optional  Default value
 * @return Value or default value whichever is available
 * @deprecated Not used anywhere
 */

function getDefault(value, optional) {
  return value || optional;
}
/**
 * Checks if the passed in value is a string.
 *
 * @param value  Value
 * @return Is string?
 * @throws {Error}
 * @deprecated Not used anywhere
 */

function checkString(value) {
  if (typeof value === "string") {
    return true;
  } else {
    throw new Error("Expected a string but got " + getType(value));
  }
}
/**
 * Checks if the passed in value is a boolean.
 *
 * @param value  Value
 * @return Is boolean?
 * @throws {Error}
 * @deprecated Not used anywhere
 */

function checkBoolean(value) {
  if (typeof value === "boolean") {
    return true;
  } else {
    throw new Error("Expected a boolean but got " + getType(value));
  }
}
/**
 * Checks if the passed in value is a number.
 *
 * @param value  Value
 * @return Is number?
 * @throws {Error}
 */

function checkNumber(value) {
  if (typeof value === "number") {
    if (isNaN(value)) {
      throw new Error("Expected a number but got NaN");
    }
  } else {
    throw new Error("Expected a number but got " + getType(value));
  }

  return true;
}
/**
 * Checks if the passed in value is an object.
 *
 * @param value  Value
 * @return Is object?
 * @throws {Error}
 * @todo Is the input type correct?
 * @deprecated Not used anywhere
 */

function checkObject(value) {
  var t = getType(value);

  if (t === "[object Object]") {
    return true;
  } else {
    throw new Error("Expected an object but got " + t);
  }
}
/**
 * Checks if the passed in value is an array.
 *
 * @param value  Value
 * @return Is array?
 * @throws {Error}
 * @deprecated Not used anywhere
 */

function checkArray(value) {
  if (Array.isArray(value)) {
    return true;
  } else {
    throw new Error("Expected an array but got " + getType(value));
  }
}
/**
 * Checks if the passed in value is a Date object.
 *
 * @param value  Value
 * @return Is Date object?
 * @throws {Error}
 * @deprecated Not used anywhere
 */

function checkDate(value) {
  var t = getType(value);

  if (t === "[object Date]") {
    return true;
  } else {
    throw new Error("Expected a date but got " + t);
  }
}
/**
 * ============================================================================
 * TYPE CASTING
 * ============================================================================
 * @hidden
 */

/**
 * Casts string or a number into string.
 *
 * @param value  Input
 * @return String value
 * @deprecated Not used anywhere
 */

function castString(value) {
  if (typeof value === "string") {
    return value;
  } else if (typeof value === "number") {
    return "" + value;
  } else {
    throw new Error("Expected a string or number but got " + getType(value));
  }
}
/**
 * Casts string or a number into a number.
 *
 * @param value   Input value
 * @return Number  value
 * @throws {Error}
 */

function castNumber(value) {
  if (typeof value === "string") {
    var number = +value;

    if (isNaN(number)) {
      throw new Error("Cannot cast string " + JSON.stringify(value) + " to a number");
    } else {
      return number;
    }
  } else if (typeof value === "number") {
    if (isNaN(value)) {
      throw new Error("Expected a number but got NaN");
    } else {
      return value;
    }
  } else {
    var t = getType(value);

    if (t === "[object Date]") {
      return value.getTime();
    } else {
      throw new Error("Expected a string, number, or date but got " + t);
    }
  }
}
/**
 * Casts number, string or Date into a Date object.
 *
 * @param value  Input value
 * @return Date object
 * @deprecated Not used anywhere
 * @throws {Error}
 * @hidden
 * @deprecated
 */

/*export function castDate(value: string | number | Date, formatter?: DateFormatter): Date {
    if (typeof value === "string") {
        if (formatter) {
            return formatter.parse(value);
        }
        return new Date(value);

    } else if (typeof value === "number") {
        return new Date(value);

    } else {
        const t = getType(value);

        if (t === "[object Date]") {
            return value;

        } else {
            throw new Error("Expected a string, number, or date but got " + t);
        }
    }
}*/

/**
 * ============================================================================
 * QUICK CONVERSION
 * ============================================================================
 * @hidden
 */

/**
 * Converts any value into `boolean`.
 *
 * @param value  Source value
 * @return `true` or `false`
 */

function toBoolean(value) {
  return value ? true : false;
}
/**
 * Converts any value into a `number`.
 *
 * @param value  Source value
 * @return Number representation of value
 */

function toNumber(value) {
  if (hasValue(value) && !isNumber(value)) {
    var converted = Number(value);

    if (isNaN(converted) && isString(value) && value != "") {
      return toNumber(value.replace(/[^0-9.\-]+/g, ''));
    }

    return converted;
  }

  return value;
}
/**
 * Converts any value into a string (text).
 *
 * @param value  Source value
 * @return String representation of the input
 */

function toText(value) {
  if (hasValue(value) && !isString(value)) {
    if (isNumber(value)) {
      return castString(value);
    } else if (isObject(value)) {
      return value.toString();
    }
  }

  return value;
}
/**
 * Converts any value to a number or [[Percent]].
 *
 * If the parameter is a string and contains "%", it will
 * convert it into a [[Percent]].
 *
 * Otherwise, it will convert into a number.
 *
 * @param value  Number or percent
 * @return Percent object
 */

function toNumberOrPercent(value) {
  if (!hasValue(value) || isNumber(value) || (0,_Percent__WEBPACK_IMPORTED_MODULE_0__.isPercent)(value)) {
    return value;
  }

  if (isString(value) && value.indexOf("%") != -1) {
    return (0,_Percent__WEBPACK_IMPORTED_MODULE_0__.percent)(toNumber(value));
  }

  return toNumber(value);
}
/**
 * Checks if a variable has a value.
 *
 * @param a  Input value
 * @returns                        Has value?
 */

function hasValue(a) {
  return a != null;
}
/**
 * Returns a value or throws an {Error} exception if the variable has not
 * value.
 *
 * @param a  Input value
 * @returns                        Value
 */

function getValue(a) {
  if (hasValue(a)) {
    return a;
  } else {
    throw new Error("Value doesn't exist");
  }
}
/**
 * Returns a value, or returns the default value if it doesn't have a value.
 *
 * @param a  Input value
 * @returns                        Value
 */

function getValueDefault(a, defaultValue) {
  if (hasValue(a)) {
    return a;
  } else {
    return defaultValue;
  }
}
/**
 * ============================================================================
 * TYPE CHECK
 * ============================================================================
 * @hidden
 */

/**
 * Checks if parameter is `Date`.
 *
 * @param value  Input value
 * @return Is Date?
 */

function isDate(value) {
  return getType(value) === "[object Date]";
}
/**
 * Checks if parameter is `string`.
 *
 * @param value  Input value
 * @return Is string?
 */

function isString(value) {
  return typeof value === "string";
}
/**
 * Checks if parameter is `number`.
 *
 * @param value  Input value
 * @return Is number?
 */

function isNumber(value) {
  return typeof value === "number" && Number(value) == value;
}
/**
 * Checks if parameter is `object`.
 *
 * @param value  Input value
 * @return Is object?
 */

function isObject(value) {
  return typeof value === "object" && value != null;
}
/**
 * Checks if parameter is `Array`.
 *
 * @param value  Input value
 * @return Is Array?
 */

function isArray(value) {
  return Array.isArray(value);
}

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Utils.js":
/*!************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/utils/Utils.js ***!
  \************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "anyToDate": () => (/* binding */ anyToDate),
/* harmony export */   "anyToNumber": () => (/* binding */ anyToNumber),
/* harmony export */   "camelToDashed": () => (/* binding */ camelToDashed),
/* harmony export */   "capitalize": () => (/* binding */ capitalize),
/* harmony export */   "cleanFormat": () => (/* binding */ cleanFormat),
/* harmony export */   "copy": () => (/* binding */ copy),
/* harmony export */   "copyProperties": () => (/* binding */ copyProperties),
/* harmony export */   "decimalPlaces": () => (/* binding */ decimalPlaces),
/* harmony export */   "documentPointToSprite": () => (/* binding */ documentPointToSprite),
/* harmony export */   "documentPointToSvg": () => (/* binding */ documentPointToSvg),
/* harmony export */   "escapeForRgex": () => (/* binding */ escapeForRgex),
/* harmony export */   "fitNumber": () => (/* binding */ fitNumber),
/* harmony export */   "fitNumberRelative": () => (/* binding */ fitNumberRelative),
/* harmony export */   "get12Hours": () => (/* binding */ get12Hours),
/* harmony export */   "getBaseURI": () => (/* binding */ getBaseURI),
/* harmony export */   "getDayFromWeek": () => (/* binding */ getDayFromWeek),
/* harmony export */   "getFormat": () => (/* binding */ getFormat),
/* harmony export */   "getMonthWeek": () => (/* binding */ getMonthWeek),
/* harmony export */   "getPixelRatio": () => (/* binding */ getPixelRatio),
/* harmony export */   "getTimeZone": () => (/* binding */ getTimeZone),
/* harmony export */   "getWeek": () => (/* binding */ getWeek),
/* harmony export */   "getYearDay": () => (/* binding */ getYearDay),
/* harmony export */   "height": () => (/* binding */ height),
/* harmony export */   "isIE": () => (/* binding */ isIE),
/* harmony export */   "isNotEmpty": () => (/* binding */ isNotEmpty),
/* harmony export */   "joinUrl": () => (/* binding */ joinUrl),
/* harmony export */   "ltrim": () => (/* binding */ ltrim),
/* harmony export */   "numberToString": () => (/* binding */ numberToString),
/* harmony export */   "padString": () => (/* binding */ padString),
/* harmony export */   "parseUrl": () => (/* binding */ parseUrl),
/* harmony export */   "plainText": () => (/* binding */ plainText),
/* harmony export */   "random": () => (/* binding */ random),
/* harmony export */   "relativeRadiusToValue": () => (/* binding */ relativeRadiusToValue),
/* harmony export */   "relativeToValue": () => (/* binding */ relativeToValue),
/* harmony export */   "reverseString": () => (/* binding */ reverseString),
/* harmony export */   "rtrim": () => (/* binding */ rtrim),
/* harmony export */   "serializeUrl": () => (/* binding */ serializeUrl),
/* harmony export */   "softCopyProperties": () => (/* binding */ softCopyProperties),
/* harmony export */   "splitTextByCharCount": () => (/* binding */ splitTextByCharCount),
/* harmony export */   "spritePointToDocument": () => (/* binding */ spritePointToDocument),
/* harmony export */   "spritePointToSprite": () => (/* binding */ spritePointToSprite),
/* harmony export */   "spritePointToSvg": () => (/* binding */ spritePointToSvg),
/* harmony export */   "spriteRectToSvg": () => (/* binding */ spriteRectToSvg),
/* harmony export */   "stringify": () => (/* binding */ stringify),
/* harmony export */   "stripHash": () => (/* binding */ stripHash),
/* harmony export */   "stripTags": () => (/* binding */ stripTags),
/* harmony export */   "svgPointToDocument": () => (/* binding */ svgPointToDocument),
/* harmony export */   "svgPointToSprite": () => (/* binding */ svgPointToSprite),
/* harmony export */   "svgRectToSprite": () => (/* binding */ svgRectToSprite),
/* harmony export */   "trim": () => (/* binding */ trim),
/* harmony export */   "truncateWithEllipsis": () => (/* binding */ truncateWithEllipsis),
/* harmony export */   "unquote": () => (/* binding */ unquote),
/* harmony export */   "used": () => (/* binding */ used),
/* harmony export */   "valueToRelative": () => (/* binding */ valueToRelative),
/* harmony export */   "width": () => (/* binding */ width)
/* harmony export */ });
/* harmony import */ var _Percent__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Percent */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Percent.js");
/* harmony import */ var _Browser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Browser */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Browser.js");
/* harmony import */ var _utils_Math__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
/* harmony import */ var _utils_Type__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/* harmony import */ var _String__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./String */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/String.js");
/* harmony import */ var _Strings__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Strings */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Strings.js");
/* harmony import */ var _Object__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Object */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Object.js");
/* harmony import */ var _Array__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Array */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Array.js");
/**
 * A collection of universal utility functions.
 */








/**
 * ============================================================================
 * MISC FUNCTIONS
 * ============================================================================
 * @hidden
 */

/**
 * Marks a value as being used (e.g. because the value has side effects).
 */

function used(value) {}
/**
 * Copies all properties of one object to the other, omitting undefined.
 *
 * @param fromObject  Source object
 * @param toObject    Target object
 * @return Updated target object
 * @todo Maybe consolidate with utils.copy?
 */

function copyProperties(source, target) {
  _Object__WEBPACK_IMPORTED_MODULE_6__.each(source, function (key, value) {
    // only if value is set
    if (_utils_Type__WEBPACK_IMPORTED_MODULE_3__.hasValue(value)) {
      target[key] = value;
    }
  });
  return target;
}
/**
 * Removes target from url
 */

function stripHash(url) {
  return /^[^#]*/.exec(url)[0];
}
function getBaseURI() {
  var url = "#"; // Needed until https://bugs.webkit.org/show_bug.cgi?id=189499 is fixed

  if ((0,_Browser__WEBPACK_IMPORTED_MODULE_1__.isSafari)()) {
    var baseURI = document.baseURI;

    if (baseURI) {
      baseURI = stripHash(baseURI);
      var loc = stripHash(location.href);

      if (baseURI !== loc) {
        url = loc + url;
      }
    }
  }

  return url;
}
/**
 * Copies all properties of one object to the other, omitting undefined, but only if property in target object doesn't have a value set.
 *
 * @param fromObject  Source object
 * @param toObject    Target object
 * @return Updated target object
 * @todo Maybe consolidate with utils.copy?
 */

function softCopyProperties(source, target) {
  _Object__WEBPACK_IMPORTED_MODULE_6__.each(source, function (key, value) {
    // only if value is set
    if (_utils_Type__WEBPACK_IMPORTED_MODULE_3__.hasValue(value) && !_utils_Type__WEBPACK_IMPORTED_MODULE_3__.hasValue(target[key])) {
      target[key] = value;
    }
  });
  return target;
}
/**
 * Copies all properties of one object to the other.
 *
 * @param source     Source object
 * @param recipient  Target object
 * @return Updated target object
 */

function copy(source, target) {
  _Object__WEBPACK_IMPORTED_MODULE_6__.each(source, function (key, value) {
    target[key] = value;
  });
  return target;
}
/**
 * Checks if value is not empty (undefined or zero-length string).
 *
 * @param value  Value to check
 * @return `true` if value is not "empty"
 */

function isNotEmpty(value) {
  return _utils_Type__WEBPACK_IMPORTED_MODULE_3__.hasValue(value) && value.toString() !== "";
}
/**
 * [relativeToValue description]
 *
 * @ignore Exclude from docs
 * @todo Description
 * @param percent  [description]
 * @param full     [description]
 * @return [description]
 */

function relativeToValue(percent, full) {
  if (_utils_Type__WEBPACK_IMPORTED_MODULE_3__.isNumber(percent)) {
    return percent;
  } else if (percent != null && _utils_Type__WEBPACK_IMPORTED_MODULE_3__.isNumber(percent.value) && _utils_Type__WEBPACK_IMPORTED_MODULE_3__.isNumber(full)) {
    return full * percent.value;
  } else {
    return 0;
  }
}
/**
 * [relativeRadiusToValue description]
 *
 * Differs from relativeToValue so that if a value is negative, it subtracts
 * it from full value.
 *
 * @ignore Exclude from docs
 * @todo Description
 * @param percent             [description]
 * @param full                [description]
 * @param subtractIfNegative  [description]
 * @return [description]
 */

function relativeRadiusToValue(percent, full, subtractIfNegative) {
  var value;

  if (_utils_Type__WEBPACK_IMPORTED_MODULE_3__.isNumber(percent)) {
    value = percent;

    if (value < 0) {
      if (subtractIfNegative) {
        value = full + value;
      } else {
        value = full - value;
      }
    }
  } else if (percent != null && _utils_Type__WEBPACK_IMPORTED_MODULE_3__.isNumber(percent.value)) {
    value = full * percent.value;
  }

  return value;
}
/**
 * [valueToRelative description]
 *
 * @ignore Exclude from docs
 * @todo Description
 * @param value  [description]
 * @param full   [description]
 * @return [description]
 */

function valueToRelative(value, full) {
  if (value instanceof _Percent__WEBPACK_IMPORTED_MODULE_0__.Percent) {
    return value.value;
  } else {
    return value / full;
  }
}
/**
 * Returns pixel ratio of the current screen (used on retina displays).
 *
 * @return Pixel ratio
 */

function getPixelRatio() {
  var ratio = window.devicePixelRatio || 1;
  return ratio;
}
/**
 * ============================================================================
 * STRING FORMATTING FUNCTIONS
 * ============================================================================
 * @hidden
 */

/**
 * Converts camelCased text to dashed version:
 * ("thisIsString" > "this-is-string")
 *
 * @param str  Input
 * @return Output
 */

function camelToDashed(str) {
  return str.replace(/\W+/g, '-').replace(/([a-z\d])([A-Z])/g, '$1-$2').toLowerCase();
}
/**
 * Converts tring to uppercase.
 *
 * @param str  String to convert
 * @return uppercased string
 * @todo Maybe make it better
 */

function capitalize(str) {
  var arr = str.split("");
  arr[0] = arr[0].toUpperCase();
  return arr.join("");
}
/**
 * Converts any value into its string representation.
 *
 * @param value  Value
 * @return String represantation of the value
 */

function stringify(value) {
  return JSON.stringify(value);
}
/**
 * Escapes string so it can safely be used in a Regex.
 *
 * @param value  Unsescaped string
 * @return Escaped string
 */

function escapeForRgex(value) {
  return value.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
}
/**
 * Splits the text into multiple lines, respecting maximum character count.
 * Prioretizes splitting on spaces and punctuation. Falls back on splitting
 * mid-word if there's no other option.
 *
 * @param text      Text
 * @param maxChars  Maximum number of characters per line
 * @return An array of split text
 */

function splitTextByCharCount(text, maxChars, fullWords, rtl, fullWordFallback) {
  // Maybe the text fits?
  if (text.length <= maxChars) {
    return [text];
  } // Init result


  var res = []; // Split by words or by charts

  if (fullWords) {
    // Split by words first
    // Split by spacing
    var currentIndex = -1; //let tmpText = text.replace(/([,;:!?\\\/\.]+[\s]+|[\s])/g, $strings.PLACEHOLDER + "$1" + $strings.PLACEHOLDER);

    var tmpText = text.replace(/([,;:!?\\\/]+|[\s])/g, _Strings__WEBPACK_IMPORTED_MODULE_5__.PLACEHOLDER + "$1" + _Strings__WEBPACK_IMPORTED_MODULE_5__.PLACEHOLDER);
    var words = tmpText.split(_Strings__WEBPACK_IMPORTED_MODULE_5__.PLACEHOLDER); // Glue end-of-word punctuation to the word itself

    for (var i = 1; i < words.length; i++) {
      var word = words[i];

      if ((word == "." || word == ",") && words[i - 1].match(/[\w]+$/)) {
        words[i - 1] += word;
        words[i] = "";
      }
    } // Process each word


    for (var i = 0; i < words.length; i++) {
      // Get word and symbol count
      var word = words[i];
      var wordLength = word.length; // Ignore empty words

      if (wordLength === 0) {
        continue;
      } // Check word length


      if (wordLength > maxChars && (fullWords !== true || fullWordFallback != false)) {
        //if (wordLength > maxChars) {
        // A single word is longer than allowed symbol count
        // Break it up
        if (rtl) {
          word = reverseString(word);
        }

        var parts = word.match(new RegExp(".{1," + maxChars + "}", "g")); // TODO is this correct ?

        if (parts) {
          if (rtl) {
            for (var x = 0; x < parts.length; x++) {
              parts[x] = reverseString(parts[x]);
            } //parts.reverse();

          }

          res = res.concat(parts);
        }
      } else {
        // Init current line
        if (currentIndex === -1) {
          res.push("");
          currentIndex = 0;
        } // Check if we need to break into another line


        if (res[currentIndex].length + wordLength + 1 > maxChars && res[currentIndex] !== "") {
          res.push("");
          currentIndex++;
        } // Add word


        res[currentIndex] += word;
      } // Update index


      currentIndex = res.length - 1;
    }
  } else {
    // Splitting by anywhere (living la vida facil)
    var parts = text.match(new RegExp(".{1," + maxChars + "}", "g"));

    if (parts) {
      if (rtl) {
        for (var x = 0; x < parts.length; x++) {
          parts[x] = reverseString(parts[x]);
        }
      }

      res = parts;
    }
  } // Do we have only one word that does not fit?
  // Since fullWords is set and we can't split the word, we end up with empty
  // set.


  if (res.length == 1 && fullWords && fullWordFallback && res[0].length > maxChars) {
    res = [];
  }

  return res;
}
/**
 * Truncates the text to certain character count.
 *
 * Will add ellipsis if the string is truncated. Optionally, can truncate on
 * full words only.
 *
 * For RTL support, pass in the fifth parameter as `true`.
 *
 * @param text       Input text
 * @param maxChars   Maximum character count of output
 * @param ellipsis   Ellipsis string, i.e. "..."
 * @param fullWords  If `true`, will not break mid-word, unless there's a single word and it does not with into `maxChars`
 * @param rtl        Is this an RTL text?
 * @return Truncated text
 */

function truncateWithEllipsis(text, maxChars, ellipsis, fullWords, rtl) {
  if (text.length <= maxChars) {
    return text;
  } // Calc max chars


  maxChars -= ellipsis.length;

  if (maxChars < 1) {
    maxChars = 1; //ellipsis = "";
  } // Get lines


  var lines = splitTextByCharCount(text, maxChars, fullWords, rtl); // Use first line

  return (lines[0] || "") + ellipsis;
}
/**
 * Removes whitespace from beginning and end of the string.
 *
 * @param str  Input
 * @return Output
 */

function trim(str) {
  return str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
}
;
/**
 * Removes whitespace from end of the string.
 *
 * @param str  Input
 * @return Output
 */

function rtrim(str) {
  return str.replace(/[\s\uFEFF\xA0]+$/g, "");
}
;
/**
 * Removes whitespace from beginning of the string.
 *
 * @param str  Input
 * @return Output
 */

function ltrim(str) {
  return str.replace(/^[\s\uFEFF\xA0]+/g, "");
}
;
/**
 * Reverses string.
 *
 * @param str  Input
 * @return Output
 */

function reverseString(str) {
  return str.split("").reverse().join("");
}
/**
 * Removes quotes from the string.
 *
 * @param str  Input
 * @return Output
 */

function unquote(str) {
  var res = str.trim();
  res = str.replace(/^'(.*)'$/, "$1");

  if (res == str) {
    res = str.replace(/^"(.*)"$/, "$1");
  }

  return res;
}
/**
 * Pads a string with additional characters to certain length.
 *
 * @param value  A numeric value
 * @param len    Result string length in characters
 * @param char   A character to use for padding
 * @return Padded value as string
 */

function padString(value, len, char) {
  if (len === void 0) {
    len = 0;
  }

  if (char === void 0) {
    char = "0";
  }

  if (typeof value !== "string") {
    value = value.toString();
  }

  return len > value.length ? Array(len - value.length + 1).join(char) + value : value;
}
/**
 * Tries to determine format type.
 *
 * @ignore Exclude from docs
 * @param format  Format string
 * @return Format type ("string" | "number" | "date" | "duration")
 */

function getFormat(format) {
  // Undefined?
  if (typeof format === "undefined") {
    return _Strings__WEBPACK_IMPORTED_MODULE_5__.STRING;
  } // Cleanup and lowercase format


  format = format.toLowerCase().replace(/^\[[^\]]*\]/, ""); // Remove style tags

  format = format.replace(/\[[^\]]+\]/, ""); // Trim

  format = format.trim(); // Check for any explicit format hints (i.e. /Date)

  var hints = format.match(/\/(date|number|duration)$/);

  if (hints) {
    return hints[1];
  } // Check for explicit hints


  if (format === _Strings__WEBPACK_IMPORTED_MODULE_5__.NUMBER) {
    return _Strings__WEBPACK_IMPORTED_MODULE_5__.NUMBER;
  }

  if (format === _Strings__WEBPACK_IMPORTED_MODULE_5__.DATE) {
    return _Strings__WEBPACK_IMPORTED_MODULE_5__.DATE;
  }

  if (format === _Strings__WEBPACK_IMPORTED_MODULE_5__.DURATION) {
    return _Strings__WEBPACK_IMPORTED_MODULE_5__.DURATION;
  } // Detect number formatting symbols


  if (format.match(/[#0]/)) {
    return _Strings__WEBPACK_IMPORTED_MODULE_5__.NUMBER;
  } // Detect date formatting symbols


  if (format.match(/[ymwdhnsqaxkzgtei]/)) {
    return _Strings__WEBPACK_IMPORTED_MODULE_5__.DATE;
  } // Nothing? Let's display as string


  return _Strings__WEBPACK_IMPORTED_MODULE_5__.STRING;
}
/**
 * Cleans up format:
 * * Strips out formatter hints
 *
 * @ignore Exclude from docs
 * @param format  Format
 * @return Cleaned format
 */

function cleanFormat(format) {
  return format.replace(/\/(date|number|duration)$/i, "");
}
/**
 * Strips all tags from the string.
 *
 * @param text  Source string
 * @return String without tags
 */

function stripTags(text) {
  return text ? text.replace(/<[^>]*>/g, "") : text;
}
/**
 * Removes new lines and tags from a string.
 *
 * @param text  String to conver
 * @return Converted string
 */

function plainText(text) {
  return text ? stripTags(("" + text).replace(/[\n\r]+/g, ". ")) : text;
}
/**
 * ============================================================================
 * TYPE CONVERSION FUNCTIONS
 * ============================================================================
 * @hidden
 */

/**
 * Converts numeric value into string. Deals with large or small numbers that
 * would otherwise use exponents.
 *
 * @param value  Numeric value
 * @return Numeric value as string
 */

function numberToString(value) {
  // TODO handle Infinity and -Infinity
  if (_utils_Type__WEBPACK_IMPORTED_MODULE_3__.isNaN(value)) {
    return "NaN";
  }

  if (value === Infinity) {
    return "Infinity";
  }

  if (value === -Infinity) {
    return "-Infinity";
  } // Negative 0


  if (value === 0 && 1 / value === -Infinity) {
    return "-0";
  } // Preserve negative and deal with absoute values


  var negative = value < 0;
  value = Math.abs(value); // TODO test this

  var parsed = _utils_Type__WEBPACK_IMPORTED_MODULE_3__.getValue(/^([0-9]+)(?:\.([0-9]+))?(?:e[\+\-]([0-9]+))?$/.exec("" + value));
  var digits = parsed[1];
  var decimals = parsed[2] || "";
  var res; // Leave the nummber as it is if it does not use exponents

  if (parsed[3] == null) {
    res = decimals === "" ? digits : digits + "." + decimals;
  } else {
    var exponent = +parsed[3]; // Deal with decimals

    if (value < 1) {
      var zeros = exponent - 1;
      res = "0." + _String__WEBPACK_IMPORTED_MODULE_4__.repeat("0", zeros) + digits + decimals; // Deal with integers
    } else {
      var zeros = exponent - decimals.length;

      if (zeros === 0) {
        res = digits + decimals;
      } else if (zeros < 0) {
        res = digits + decimals.slice(0, zeros) + "." + decimals.slice(zeros);
      } else {
        res = digits + decimals + _String__WEBPACK_IMPORTED_MODULE_4__.repeat("0", zeros);
      }
    }
  }

  return negative ? "-" + res : res;
}
/**
 * Converts anything to Date object.
 *
 * @param value  A value of any type
 * @return Date object representing a value
 */

function anyToDate(value) {
  if (_utils_Type__WEBPACK_IMPORTED_MODULE_3__.isDate(value)) {
    // TODO maybe don't create a new Date ?
    var date = new Date(value); // This is needed because IE does not copy over milliseconds

    date.setMilliseconds(value.getMilliseconds());
    return date;
  } else if (_utils_Type__WEBPACK_IMPORTED_MODULE_3__.isNumber(value)) {
    return new Date(value);
  } else {
    // Try converting to number (assuming timestamp)
    var num = Number(value);

    if (!_utils_Type__WEBPACK_IMPORTED_MODULE_3__.isNumber(num)) {
      return new Date(value);
    } else {
      return new Date(num);
    }
  }
}
/**
 * Tries converting any value to a number.
 *
 * @param value  Source value
 * @return Number
 */

function anyToNumber(value) {
  if (_utils_Type__WEBPACK_IMPORTED_MODULE_3__.isDate(value)) {
    return value.getTime();
  } else if (_utils_Type__WEBPACK_IMPORTED_MODULE_3__.isNumber(value)) {
    return value;
  } else if (_utils_Type__WEBPACK_IMPORTED_MODULE_3__.isString(value)) {
    // Try converting to number (assuming timestamp)
    var num = Number(value);

    if (!_utils_Type__WEBPACK_IMPORTED_MODULE_3__.isNumber(num)) {
      // Failing
      return undefined;
    } else {
      return num;
    }
  }
}
/**
 * ============================================================================
 * DATE-RELATED FUNCTIONS
 * ============================================================================
 * @hidden
 */

/**
 * Returns a year day.
 *
 * @param date  Date
 * @param utc   Assume UTC dates?
 * @return Year day
 * @todo Account for UTC
 */

function getYearDay(date, utc) {
  if (utc === void 0) {
    utc = false;
  }

  var start = new Date(date.getFullYear(), 0, 0);
  var diff = date.getTime() - start.getTime() + (start.getTimezoneOffset() - date.getTimezoneOffset()) * 60 * 1000;
  var oneDay = 1000 * 60 * 60 * 24;
  return Math.floor(diff / oneDay);
}
/**
 * Returns week number for a given date.
 *
 * @param date  Date
 * @param utc   Assume UTC dates?
 * @return Week number
 * @todo Account for UTC
 */

function getWeek(date, _utc) {
  if (_utc === void 0) {
    _utc = false;
  }

  var d = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()));
  var day = d.getUTCDay() || 7;
  d.setUTCDate(d.getUTCDate() + 4 - day);
  var firstDay = new Date(Date.UTC(d.getUTCFullYear(), 0, 1));
  return Math.ceil(((d.getTime() - firstDay.getTime()) / 86400000 + 1) / 7);
}
/**
 * Returns a week number in the month.
 *
 * @param date  Source Date
 * @param utc   Assume UTC dates?
 * @return Week number in month
 */

function getMonthWeek(date, utc) {
  if (utc === void 0) {
    utc = false;
  }

  var firstWeek = getWeek(new Date(date.getFullYear(), date.getMonth(), 1), utc);
  var currentWeek = getWeek(date, utc);

  if (currentWeek == 1) {
    currentWeek = 53;
  }

  return currentWeek - firstWeek + 1;
}
/**
 * Returns a year day out of the given week number.
 *
 * @param week     Week
 * @param year     Year
 * @param weekday  Weekday
 * @param utc      Assume UTC dates
 * @return Day in a year
 */

function getDayFromWeek(week, year, weekday, utc) {
  if (weekday === void 0) {
    weekday = 1;
  }

  if (utc === void 0) {
    utc = false;
  }

  var date = new Date(year, 0, 4, 0, 0, 0, 0);

  if (utc) {
    date.setUTCFullYear(year);
  }

  var day = week * 7 + weekday - ((date.getDay() || 7) + 3);
  return day;
}
/**
 * Returns 12-hour representation out of the 24-hour hours.
 *
 * @param hours  24-hour number
 * @return 12-hour number
 */

function get12Hours(hours, base) {
  if (hours > 12) {
    hours -= 12;
  } else if (hours === 0) {
    hours = 12;
  }

  return _utils_Type__WEBPACK_IMPORTED_MODULE_3__.hasValue(base) ? hours + (base - 1) : hours;
}
/**
 * Returns a string name of the tome zone.
 *
 * @param date     Date object
 * @param long     Should return long ("Pacific Standard Time") or short abbreviation ("PST")
 * @param savings  Include information if it's in daylight savings mode
 * @param utc      Assume UTC dates
 * @return Time zone name
 */

function getTimeZone(date, long, savings, utc) {
  if (long === void 0) {
    long = false;
  }

  if (savings === void 0) {
    savings = false;
  }

  if (utc === void 0) {
    utc = false;
  }

  if (utc) {
    return long ? "Coordinated Universal Time" : "UTC";
  }

  var wotz = date.toLocaleString("UTC");
  var wtz = date.toLocaleString("UTC", {
    timeZoneName: long ? "long" : "short"
  }).substr(wotz.length); //wtz = wtz.replace(/[+-]+[0-9]+$/, "");

  if (savings === false) {
    wtz = wtz.replace(/ (standard|daylight|summer|winter) /i, " ");
  }

  return wtz;
}
/**
 * ============================================================================
 * NUMBER-RELATED FUNCTIONS
 * ============================================================================
 * @hidden
 */

/**
 * Returns a random number between `from` and `to`.
 *
 * @param from  From number
 * @param to    To number
 * @return Random number
 */

function random(from, to) {
  return Math.floor(Math.random() * (to - from)) + from;
}
/**
 * Fits the number into specific `min` and `max` bounds.
 *
 * @param value  Input value
 * @param min    Minimum value
 * @param max    Maximum value
 * @return Possibly adjusted value
 */

function fitNumber(value, min, max) {
  if (value > max) {
    return max;
  } else if (value < min) {
    return min;
  }

  return value;
}
/**
 * Fits the number into specific `min` and `max` bounds.
 *
 * If the value is does not fit withing specified range, it "wraps" around the
 * values.
 *
 * For example, if we have input value 10 with min set at 1 and max set at 8,
 * the value will not fit. The remainder that does not fit (2) will be added
 * to `min`, resulting in 3.
 *
 * The output of regular `fitNumber()` would return 8 instead.
 *
 * @param value  Input value
 * @param min    Minimum value
 * @param max    Maximum value
 * @return Possibly adjusted value
 */

function fitNumberRelative(value, min, max) {
  var gap = max - min;

  if (value > max) {
    value = min + (value - gap * Math.floor(value / gap));
  } else if (value < min) {
    value = min + (value - gap * Math.floor(value / gap));
  }

  return value;
}
/**
 * ============================================================================
 * SPRITE-RELATED FUNCTIONS
 * ============================================================================
 * @hidden
 */

/**
 * Converts SVG element coordinates to coordinates within specific [[Sprite]].
 *
 * @param point   SVG coordinates
 * @param sprite  Sprite
 * @return Sprite coordinates
 */

function svgPointToSprite(point, sprite) {
  var x = point.x;
  var y = point.y;
  var sprites = [];

  if (sprite) {
    while (_utils_Type__WEBPACK_IMPORTED_MODULE_3__.hasValue(sprite.parent)) {
      sprites.push(sprite);
      sprite = sprite.parent;
    }

    sprites.reverse();

    for (var i = 0; i < sprites.length; i++) {
      var sprite_1 = sprites[i];
      var angle = sprite_1.rotation;
      var relativeX = x - sprite_1.pixelX - sprite_1.ex;
      var relativeY = y - sprite_1.pixelY - sprite_1.ey;

      if (sprite_1.dx) {
        x -= sprite_1.dx;
      }

      if (sprite_1.dy) {
        y -= sprite_1.dy;
      }

      var scale = sprite_1.scale; // this handles nonscaling

      if (sprite_1.group) {
        scale = sprite_1.group.scale;
      }

      x = (_utils_Math__WEBPACK_IMPORTED_MODULE_2__.cos(-angle) * relativeX - _utils_Math__WEBPACK_IMPORTED_MODULE_2__.sin(-angle) * relativeY) / scale - sprite_1.pixelPaddingLeft;
      y = (_utils_Math__WEBPACK_IMPORTED_MODULE_2__.cos(-angle) * relativeY + _utils_Math__WEBPACK_IMPORTED_MODULE_2__.sin(-angle) * relativeX) / scale - sprite_1.pixelPaddingTop;
    }
  }

  return {
    x: x,
    y: y
  };
}
/**
 * Converts coordinates within [[Sprite]] to coordinates relative to the whole
 * SVG element.
 *
 * @param point   Sprite coordinates
 * @param sprite  Sprite
 * @return SVG coordinates
 */

function spritePointToSvg(point, sprite) {
  var x = point.x;
  var y = point.y;

  if (sprite) {
    while (_utils_Type__WEBPACK_IMPORTED_MODULE_3__.hasValue(sprite.parent)) {
      var angle = sprite.rotation;
      x += sprite.pixelPaddingLeft + sprite.ex;
      y += sprite.pixelPaddingTop + sprite.ey;
      var scale = sprite.scale; // this handles nonscaling

      if (sprite.group) {
        scale = sprite.group.scale;
      }

      var relativeX = sprite.pixelX + (x * _utils_Math__WEBPACK_IMPORTED_MODULE_2__.cos(angle) - y * _utils_Math__WEBPACK_IMPORTED_MODULE_2__.sin(angle)) * scale;
      var relativeY = sprite.pixelY + (x * _utils_Math__WEBPACK_IMPORTED_MODULE_2__.sin(angle) + y * _utils_Math__WEBPACK_IMPORTED_MODULE_2__.cos(angle)) * scale;

      if (sprite.dx) {
        relativeX += sprite.dx;
      }

      if (sprite.dy) {
        relativeY += sprite.dy;
      }

      x = relativeX;
      y = relativeY;
      sprite = sprite.parent;
    }
  }

  return {
    x: x,
    y: y
  };
}
/**
 * Converts coordinates of one sprite to another.
 *
 * @param point   Sprite coordinates
 * @param sprite  Sprite
 * @param toSprite  Sprite
 * @return converted coordinates
 */

function spritePointToSprite(point, sprite, toSprite) {
  return svgPointToSprite(spritePointToSvg(point, sprite), toSprite);
}
/**
 * Converts a rectangle expressed in SVG element coordinates to coordinates
 * within specific [[Sprite]].
 *
 * @param rect    SVG rectangle
 * @param sprite  Sprite
 * @return Sprite rectangle
 */

function svgRectToSprite(rect, sprite) {
  var p1 = svgPointToSprite(rect, sprite);
  var p2 = svgPointToSprite({
    x: rect.x + rect.width,
    y: rect.y + rect.height
  }, sprite);
  return {
    x: p1.x,
    y: p1.y,
    width: p2.x - p1.x,
    height: p2.y - p1.y
  };
}
/**
 * Converts a rectangle expressed in [[Sprite]] coordinates to SVG coordinates.
 *
 * @param rect    Sprite rectangle
 * @param sprite  Sprite
 * @return SVG rectangle
 */

function spriteRectToSvg(rect, sprite) {
  var p1 = spritePointToSvg(rect, sprite);
  var p2 = spritePointToSvg({
    x: rect.x + rect.width,
    y: rect.y + rect.height
  }, sprite);
  return {
    x: p1.x,
    y: p1.y,
    width: p2.x - p1.x,
    height: p2.y - p1.y
  };
}
/**
 * Converts global document-wide coordinates to coordinates within SVG element.
 *
 * @param point         Global coordinates
 * @param svgContainer  SVG element
 * @return SVG coordinates
 */

function documentPointToSvg(point, svgContainer, cssScale) {
  try {
    var bbox = svgContainer.getBoundingClientRect();

    if (!_utils_Type__WEBPACK_IMPORTED_MODULE_3__.isNumber(cssScale)) {
      cssScale = 1;
    }

    return {
      "x": (point.x - bbox.left) / cssScale,
      "y": (point.y - bbox.top) / cssScale
    };
  } catch (e) {
    return point;
  }
}
/**
 * Converts SVG coordinates to global document-wide coordinates.
 *
 * @param point         SVG coordinates
 * @param svgContainer  SVG element
 * @return Global coordinates
 */

function svgPointToDocument(point, svgContainer) {
  try {
    var bbox = svgContainer.getBoundingClientRect();
    return {
      "x": point.x + bbox.left,
      "y": point.y + bbox.top
    };
  } catch (e) {
    return point;
  }
}
/**
 * Converts document-wide global coordinates to coordinates within specific
 * [[Sprite]].
 *
 * @param point   Global coordinates
 * @param sprite  Sprite
 * @return Sprite coordinates
 */

function documentPointToSprite(point, sprite) {
  if (sprite && sprite.htmlContainer) {
    var svgPoint = documentPointToSvg(point, _utils_Type__WEBPACK_IMPORTED_MODULE_3__.getValue(sprite.htmlContainer), sprite.svgContainer.cssScale);
    return svgPointToSprite(svgPoint, sprite);
  } else {
    return point;
  }
}
/**
 * Converts coordinates within [[Sprite]] to global document coordinates.
 *
 * @param point   Sprite coordinates
 * @param sprite  Sprite
 * @return Global coordinates
 */

function spritePointToDocument(point, sprite) {
  if (sprite && sprite.htmlContainer) {
    var svgPoint = spritePointToSvg(point, sprite);
    return svgPointToDocument(svgPoint, _utils_Type__WEBPACK_IMPORTED_MODULE_3__.getValue(sprite.htmlContainer));
  } else {
    return point;
  }
}
/**
 * ============================================================================
 * DEPRECATED FUNCTIONS
 * @todo Review and remove
 * ============================================================================
 * @hidden
 */

/**
 * Returns element's width.
 *
 * @ignore Exclude from docs
 * @param element  Element
 * @return Width (px)
 * @deprecated Not used anywhere
 */

function width(element) {
  var cs = getComputedStyle(element);
  var paddingX = parseFloat(cs.paddingLeft) + parseFloat(cs.paddingRight);
  var borderX = parseFloat(cs.borderLeftWidth) + parseFloat(cs.borderRightWidth);
  return element.clientWidth - paddingX - borderX;
}
/**
 * Returns element's height.
 *
 * @ignore Exclude from docs
 * @param element  Element
 * @return Height (px)
 * @deprecated Not used anywhere
 */

function height(element) {
  var cs = getComputedStyle(element);
  var paddingY = parseFloat(cs.paddingTop) + parseFloat(cs.paddingBottom);
  var borderY = parseFloat(cs.borderTopWidth) + parseFloat(cs.borderBottomWidth);
  return element.clientHeight - paddingY - borderY;
}
/**
 * Returns number of decimals
 *
 * @ignore Exclude from docs
 * @param number  Input number
 * @return Number of decimals
 */

function decimalPlaces(number) {
  var match = ('' + number).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);

  if (!match) {
    return 0;
  }

  return Math.max(0, (match[1] ? match[1].length : 0) - (match[2] ? +match[2] : 0));
}
var urlRegexp = /^([a-zA-Z][a-zA-Z0-9\+\.\-]*:)?(?:(\/\/)([^\@]+\@)?([^\/\?\#\:]*)(\:[0-9]+)?)?([^\?\#]*)(\?[^\#]*)?(\#.*)?$/;
/**
 * Parses a URL
 *
 * @ignore Exclude from docs
 */
// TODO test this

function parseUrl(url) {
  var match = urlRegexp.exec(url);
  return {
    protocol: match && match[1] || "",
    separator: match && match[2] || "",
    authority: match && match[3] || "",
    domain: match && match[4] || "",
    port: match && match[5] || "",
    path: match && match[6] || "",
    query: match && match[7] || "",
    hash: match && match[8] || ""
  };
}
/**
 * Serializes a Url into a string
 *
 * @ignore Exclude from docs
 */

function serializeUrl(url) {
  return url.protocol + url.separator + url.authority + url.domain + url.port + url.path + url.query + url.hash;
}
/**
 * Checks whether a Url is relative or not
 *
 * @ignore Exclude from docs
 */
// TODO is this correct ?

function isRelativeUrl(url) {
  return url.protocol === "" && url.separator === "" && url.authority === "" && url.domain === "" && url.port === "";
}
/**
 * Joins together two URLs, resolving relative URLs correctly
 *
 * @ignore Exclude from docs
 */
// TODO test this


function joinUrl(left, right) {
  var parsedLeft = parseUrl(left);
  var parsedRight = parseUrl(right);

  if (isRelativeUrl(parsedLeft)) {
    throw new Error("Left URL is not absolute");
  }

  if (isRelativeUrl(parsedRight)) {
    // TODO is this correct ?
    if (parsedRight.path !== "") {
      if (parsedRight.path[0] === "/") {
        parsedLeft.path = parsedRight.path; // TODO is this correct ?
      } else {
        var leftPath = parsedLeft.path.split(/\//);
        var rightPath = parsedRight.path.split(/\//); // TODO is this correct ?

        if (leftPath.length === 0) {
          if (rightPath.length !== 0) {
            leftPath.push("");
          }
        } else if (leftPath.length > 1) {
          leftPath.pop();
        }

        _Array__WEBPACK_IMPORTED_MODULE_7__.pushAll(leftPath, rightPath);
        parsedLeft.path = leftPath.join("/");

        if (parsedLeft.path !== "" && parsedLeft.path[0] !== "/") {
          throw new Error("URL path must start with /");
        }
      }
    } // TODO is this correct ?


    parsedLeft.query = parsedRight.query;
    parsedLeft.hash = parsedRight.hash;
    return serializeUrl(parsedLeft);
  } else {
    return serializeUrl(parsedRight);
  }
}
/**
 * Detects MSIE.
 *
 * @return Is IE?
 */

function isIE() {
  return !!window.MSInputMethodContext && !!document.documentMode;
}

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Validatable.js":
/*!******************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/core/utils/Validatable.js ***!
  \******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Validatable": () => (/* binding */ Validatable)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Base */ "./node_modules/@amcharts/amcharts4/.internal/core/Base.js");
/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/**
 * This module defines a [[Validatable]] class which can be used by all
 * non-[[Sprite]] classes to use system beats to revalidate themselves.
 */

/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */



/**
 * This module defines a [[Validatable]] class which can be used by all
 * non-[[Sprite]] classes to use system update cycle to revalidate themselves.
 *
 * @ignore Exclude from docs
 */

var Validatable =
/** @class */
function (_super) {
  (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(Validatable, _super);

  function Validatable() {
    var _this = _super !== null && _super.apply(this, arguments) || this;
    /**
     * Is invalid and should be revalidated?
     */


    _this._validateDisposer = null;
    return _this;
  }
  /**
   * Invalidates the element, so that it can re-validate/redraw itself in the
   * next cycle.
   *
   * @ignore Exclude from docs
   */


  Validatable.prototype.invalidate = function () {
    if (this._validateDisposer === null) {
      this._validateDisposer = _Registry__WEBPACK_IMPORTED_MODULE_1__.registry.events.on("exitframe", this.validate, this);
    }
  };
  /**
   * Validates itself.
   *
   * Most probably the extending class will have an overriding `validate()`
   * method which will do actual work, as well as call this method using
   * `super.validate()`.
   *
   * @ignore Exclude from docs
   */


  Validatable.prototype.validate = function () {
    if (this._validateDisposer !== null) {
      this._validateDisposer.dispose();

      this._validateDisposer = null;
    }
  };

  Validatable.prototype.dispose = function () {
    if (this._validateDisposer !== null) {
      this._validateDisposer.dispose();

      this._validateDisposer = null;
    }

    _super.prototype.dispose.call(this);
  };

  return Validatable;
}(_Base__WEBPACK_IMPORTED_MODULE_0__.BaseObjectEvents);



/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/themes/animated.js":
/*!***********************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/themes/animated.js ***!
  \***********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");


var theme = function theme(object) {
  if ((0,_core_Registry__WEBPACK_IMPORTED_MODULE_0__.is)(object, "SpriteState")) {
    object.transitionDuration = 400;
  }

  if ((0,_core_Registry__WEBPACK_IMPORTED_MODULE_0__.is)(object, "Component")) {
    object.rangeChangeDuration = 500;
    object.interpolationDuration = 500;
    object.sequencedInterpolation = false;

    if ((0,_core_Registry__WEBPACK_IMPORTED_MODULE_0__.is)(object, "SankeyDiagram")) {
      object.sequencedInterpolation = true;
    }

    if ((0,_core_Registry__WEBPACK_IMPORTED_MODULE_0__.is)(object, "FunnelSeries")) {
      object.sequencedInterpolation = true;
    }
  }

  if ((0,_core_Registry__WEBPACK_IMPORTED_MODULE_0__.is)(object, "Chart")) {
    object.defaultState.transitionDuration = 2000;
    object.hiddenState.transitionDuration = 1000;
  }

  if ((0,_core_Registry__WEBPACK_IMPORTED_MODULE_0__.is)(object, "Tooltip")) {
    object.animationDuration = 400;
    object.defaultState.transitionDuration = 400;
    object.hiddenState.transitionDuration = 400;
  }

  if ((0,_core_Registry__WEBPACK_IMPORTED_MODULE_0__.is)(object, "Scrollbar")) {
    object.animationDuration = 500;
  }

  if ((0,_core_Registry__WEBPACK_IMPORTED_MODULE_0__.is)(object, "Series")) {
    object.defaultState.transitionDuration = 1000;
    object.hiddenState.transitionDuration = 700;
    object.hiddenState.properties.opacity = 1;
    object.showOnInit = true;
  }

  if ((0,_core_Registry__WEBPACK_IMPORTED_MODULE_0__.is)(object, "MapSeries")) {
    object.hiddenState.properties.opacity = 0;
  }

  if ((0,_core_Registry__WEBPACK_IMPORTED_MODULE_0__.is)(object, "PercentSeries")) {
    object.hiddenState.properties.opacity = 0;
  }

  if ((0,_core_Registry__WEBPACK_IMPORTED_MODULE_0__.is)(object, "FunnelSlice")) {
    object.defaultState.transitionDuration = 800;
    object.hiddenState.transitionDuration = 1000;
    object.hiddenState.properties.opacity = 1;
  }

  if ((0,_core_Registry__WEBPACK_IMPORTED_MODULE_0__.is)(object, "Slice")) {
    object.defaultState.transitionDuration = 700;
    object.hiddenState.transitionDuration = 1000;
    object.hiddenState.properties.opacity = 1;
  }

  if ((0,_core_Registry__WEBPACK_IMPORTED_MODULE_0__.is)(object, "Preloader")) {
    object.hiddenState.transitionDuration = 2000;
  }

  if ((0,_core_Registry__WEBPACK_IMPORTED_MODULE_0__.is)(object, "Column")) {
    object.defaultState.transitionDuration = 700;
    object.hiddenState.transitionDuration = 1000;
    object.hiddenState.properties.opacity = 1;
  }

  if ((0,_core_Registry__WEBPACK_IMPORTED_MODULE_0__.is)(object, "Column3D")) {
    object.hiddenState.properties.opacity = 0;
  }
};

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (theme);

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/themes/dark.js":
/*!*******************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/themes/dark.js ***!
  \*******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_utils_Color__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/utils/Color */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Color.js");



var theme = function theme(object) {
  if ((0,_core_Registry__WEBPACK_IMPORTED_MODULE_0__.is)(object, "InterfaceColorSet")) {
    object.setFor("stroke", (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#000000"));
    object.setFor("fill", (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#2b2b2b"));
    object.setFor("primaryButton", (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#6794dc").lighten(-0.2));
    object.setFor("primaryButtonHover", (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#6771dc").lighten(-0.2));
    object.setFor("primaryButtonDown", (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#68dc75").lighten(-0.2));
    object.setFor("primaryButtonActive", (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#68dc75").lighten(-0.2));
    object.setFor("primaryButtonText", (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#FFFFFF"));
    object.setFor("primaryButtonStroke", (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#6794dc"));
    object.setFor("secondaryButton", (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#3b3b3b"));
    object.setFor("secondaryButtonHover", (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#3b3b3b").lighten(0.1));
    object.setFor("secondaryButtonDown", (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#3b3b3b").lighten(0.15));
    object.setFor("secondaryButtonActive", (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#3b3b3b").lighten(0.15));
    object.setFor("secondaryButtonText", (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#bbbbbb"));
    object.setFor("secondaryButtonStroke", (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#3b3b3b").lighten(-0.2));
    object.setFor("grid", (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#bbbbbb"));
    object.setFor("background", (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#000000"));
    object.setFor("alternativeBackground", (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#ffffff"));
    object.setFor("text", (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#ffffff"));
    object.setFor("alternativeText", (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#000000"));
    object.setFor("disabledBackground", (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#bbbbbb"));
  }

  if ((0,_core_Registry__WEBPACK_IMPORTED_MODULE_0__.is)(object, "Scrollbar")) {
    object.background.fillOpacity = 0.4;
    object.thumb.background.fillOpacity = 0.5;
  }
};

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (theme);

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/themes/dataviz.js":
/*!**********************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/themes/dataviz.js ***!
  \**********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_utils_Color__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/utils/Color */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Color.js");
/**
 * A color scheme inspired by {@link https://datavizproject.com/}
 */



var theme = function theme(object) {
  if ((0,_core_Registry__WEBPACK_IMPORTED_MODULE_0__.is)(object, "ColorSet")) {
    object.list = [(0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#283250"), (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#902c2d"), (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#d5433d"), (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#f05440")];
    object.reuse = false;
    object.stepOptions = {
      lightness: 0.05,
      hue: 0
    };
    object.passOptions = {};
  }
};

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (theme);

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/themes/frozen.js":
/*!*********************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/themes/frozen.js ***!
  \*********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_utils_Color__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/utils/Color */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Color.js");
/**
 * Color set from Frozen movie borrowed from https://twitter.com/CINEMAPALETTES
 */



var theme = function theme(object) {
  if ((0,_core_Registry__WEBPACK_IMPORTED_MODULE_0__.is)(object, "ColorSet")) {
    object.list = [(0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#bec4f8"), (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#a5abee"), (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#6a6dde"), (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#4d42cf"), (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#713e8d"), (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#a160a0"), (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#eb6eb0"), (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#f597bb"), (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#fbb8c9"), (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#f8d4d8")];
    object.minLightness = 0.2;
    object.maxLightness = 0.7;
    object.reuse = true;
  }
};

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (theme);

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/themes/kelly.js":
/*!********************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/themes/kelly.js ***!
  \********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_utils_Color__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/utils/Color */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Color.js");
/**
 * Kelly's colors is a set of 22 highly contrasting colors.
 *
 * More info:
 * {@link https://i.kinja-img.com/gawker-media/image/upload/1015680494325093012.JPG}
 * {@link https://eleanormaclure.files.wordpress.com/2011/03/colour-coding.pdf}
 */



var theme = function theme(object) {
  if ((0,_core_Registry__WEBPACK_IMPORTED_MODULE_0__.is)(object, "ColorSet")) {
    object.list = [(0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#F3C300"), (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#875692"), (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#F38400"), (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#A1CAF1"), (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#BE0032"), (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#C2B280"), (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#848482"), (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#008856"), (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#E68FAC"), (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#0067A5"), (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#F99379"), (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#604E97"), (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#F6A600"), (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#B3446C"), (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#DCD300"), (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#882D17"), (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#8DB600"), (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#654522"), (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#E25822"), (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#2B3D26"), (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#F2F3F4"), (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#222222")];
    object.minLightness = 0.2;
    object.maxLightness = 0.7;
    object.reuse = true;
  }
};

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (theme);

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/themes/material.js":
/*!***********************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/themes/material.js ***!
  \***********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_utils_Color__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/utils/Color */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Color.js");



var theme = function theme(object) {
  if ((0,_core_Registry__WEBPACK_IMPORTED_MODULE_0__.is)(object, "ColorSet")) {
    object.list = [(0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#F44336"), (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#E91E63"), (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#9C27B0"), (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#673AB7"), (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#3F51B5"), (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#2196F3"), (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#03A9F4"), (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#00BCD4"), (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#009688"), (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#4CAF50"), (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#8BC34A"), (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#CDDC39"), (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#FFEB3B"), (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#FFC107"), (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#FF9800"), (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#FF5722"), (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#795548"), (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#9E9E9E"), (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#607D8B")];
    object.minLightness = 0.2;
    object.maxLightness = 0.7;
    object.reuse = true;
  }

  if ((0,_core_Registry__WEBPACK_IMPORTED_MODULE_0__.is)(object, "ResizeButton")) {
    object.background.cornerRadiusTopLeft = 20;
    object.background.cornerRadiusTopRight = 20;
    object.background.cornerRadiusBottomLeft = 20;
    object.background.cornerRadiusBottomRight = 20;
  }

  if ((0,_core_Registry__WEBPACK_IMPORTED_MODULE_0__.is)(object, "Tooltip")) {
    object.animationDuration = 800;
  }
};

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (theme);

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/themes/microchart.js":
/*!*************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/themes/microchart.js ***!
  \*************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");


var theme = function theme(object) {
  if ((0,_core_Registry__WEBPACK_IMPORTED_MODULE_0__.is)(object, "Sprite")) {
    object.showSystemTooltip = false;
  }

  if ((0,_core_Registry__WEBPACK_IMPORTED_MODULE_0__.is)(object, "Chart")) {
    object.padding(0, 0, 0, 0);
  }

  if ((0,_core_Registry__WEBPACK_IMPORTED_MODULE_0__.is)(object, "Scrollbar")) {
    object.startGrip.disabled = true;
    object.endGrip.disabled = true;
  }

  if ((0,_core_Registry__WEBPACK_IMPORTED_MODULE_0__.is)(object, "AxisLabel") || (0,_core_Registry__WEBPACK_IMPORTED_MODULE_0__.is)(object, "AxisLine") || (0,_core_Registry__WEBPACK_IMPORTED_MODULE_0__.is)(object, "Grid")) {
    object.disabled = true;
  }

  if ((0,_core_Registry__WEBPACK_IMPORTED_MODULE_0__.is)(object, "Axis")) {
    object.cursorTooltipEnabled = false;
  }

  if ((0,_core_Registry__WEBPACK_IMPORTED_MODULE_0__.is)(object, "PercentSeries")) {
    object.labels.template.disabled = true;
    object.ticks.template.disabled = true;
  }

  if ((0,_core_Registry__WEBPACK_IMPORTED_MODULE_0__.is)(object, "ZoomOutButton")) {
    object.padding(1, 1, 1, 1);
  }

  if ((0,_core_Registry__WEBPACK_IMPORTED_MODULE_0__.is)(object, "Container")) {
    if (object.minHeight) {
      object.minHeight = undefined;
    }

    if (object.minWidth) {
      object.minWidth = undefined;
    }
  }
};

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (theme);

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/themes/moonrisekingdom.js":
/*!******************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/themes/moonrisekingdom.js ***!
  \******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_utils_Color__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/utils/Color */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Color.js");
/**
 * Color set from Moonrise kingdom movie borrowed from https://twitter.com/CINEMAPALETTES
 */



var theme = function theme(object) {
  if ((0,_core_Registry__WEBPACK_IMPORTED_MODULE_0__.is)(object, "ColorSet")) {
    object.list = [(0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#3a1302"), (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#601205"), (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#8a2b0d"), (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#c75e24"), (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#c79f59"), (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#a4956a"), (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#868569"), (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#756f61"), (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#586160"), (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#617983")];
    object.minLightness = 0.2;
    object.maxLightness = 0.7;
    object.reuse = true;
  }
};

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (theme);

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/themes/patterns.js":
/*!***********************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/themes/patterns.js ***!
  \***********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_utils_PatternSet__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/utils/PatternSet */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/PatternSet.js");
/* harmony import */ var _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../core/utils/InterfaceColorSet */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/InterfaceColorSet.js");




var theme = function theme(object) {
  // Create PatternSet
  if ((0,_core_Registry__WEBPACK_IMPORTED_MODULE_0__.is)(object, "XYChart") || (0,_core_Registry__WEBPACK_IMPORTED_MODULE_0__.is)(object, "PercentSeries")) {
    object.patterns = new _core_utils_PatternSet__WEBPACK_IMPORTED_MODULE_1__.PatternSet();
  } // Set up compatible series


  if ((0,_core_Registry__WEBPACK_IMPORTED_MODULE_0__.is)(object, "XYSeries") || (0,_core_Registry__WEBPACK_IMPORTED_MODULE_0__.is)(object, "PercentSeries")) {
    // Set up fill for series' tooltip
    if (object.tooltip) {
      var ic = new _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_2__.InterfaceColorSet();
      object.tooltip.getFillFromObject = false;
      object.tooltip.fill = ic.getFor("alternativeBackground");
      object.tooltip.label.fill = ic.getFor("text");
      object.tooltip.background.stroke = ic.getFor("alternativeBackground");
    }
  }

  if ((0,_core_Registry__WEBPACK_IMPORTED_MODULE_0__.is)(object, "Pattern")) {
    object.backgroundOpacity = 1;
  }
};

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (theme);

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/.internal/themes/spiritedaway.js":
/*!***************************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/.internal/themes/spiritedaway.js ***!
  \***************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _core_utils_Color__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/utils/Color */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Color.js");
/**
 * Color set from Spirited away movie borrowed from https://twitter.com/CINEMAPALETTES
 */



var theme = function theme(object) {
  if ((0,_core_Registry__WEBPACK_IMPORTED_MODULE_0__.is)(object, "ColorSet")) {
    object.list = [(0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#65738e"), (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#766c91"), (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#78566f"), (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#523b58"), (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#813b3d"), (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#bc5e52"), (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#ee8b78"), (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#f9c885"), (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#eba05c"), (0,_core_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)("#9b5134")];
    object.minLightness = 0.2;
    object.maxLightness = 0.7;
    object.reuse = true;
  }
};

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (theme);

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/charts.js":
/*!****************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/charts.js ***!
  \****************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Axis": () => (/* reexport safe */ _internal_charts_axes_Axis__WEBPACK_IMPORTED_MODULE_36__.Axis),
/* harmony export */   "AxisBreak": () => (/* reexport safe */ _internal_charts_axes_AxisBreak__WEBPACK_IMPORTED_MODULE_43__.AxisBreak),
/* harmony export */   "AxisBullet": () => (/* reexport safe */ _internal_charts_axes_AxisBullet__WEBPACK_IMPORTED_MODULE_44__.AxisBullet),
/* harmony export */   "AxisDataItem": () => (/* reexport safe */ _internal_charts_axes_Axis__WEBPACK_IMPORTED_MODULE_36__.AxisDataItem),
/* harmony export */   "AxisFill": () => (/* reexport safe */ _internal_charts_axes_AxisFill__WEBPACK_IMPORTED_MODULE_41__.AxisFill),
/* harmony export */   "AxisFillCircular": () => (/* reexport safe */ _internal_charts_axes_AxisFillCircular__WEBPACK_IMPORTED_MODULE_57__.AxisFillCircular),
/* harmony export */   "AxisLabel": () => (/* reexport safe */ _internal_charts_axes_AxisLabel__WEBPACK_IMPORTED_MODULE_39__.AxisLabel),
/* harmony export */   "AxisLabelCircular": () => (/* reexport safe */ _internal_charts_axes_AxisLabelCircular__WEBPACK_IMPORTED_MODULE_55__.AxisLabelCircular),
/* harmony export */   "AxisLine": () => (/* reexport safe */ _internal_charts_axes_AxisLine__WEBPACK_IMPORTED_MODULE_40__.AxisLine),
/* harmony export */   "AxisRenderer": () => (/* reexport safe */ _internal_charts_axes_AxisRenderer__WEBPACK_IMPORTED_MODULE_42__.AxisRenderer),
/* harmony export */   "AxisRendererCircular": () => (/* reexport safe */ _internal_charts_axes_AxisRendererCircular__WEBPACK_IMPORTED_MODULE_56__.AxisRendererCircular),
/* harmony export */   "AxisRendererRadial": () => (/* reexport safe */ _internal_charts_axes_AxisRendererRadial__WEBPACK_IMPORTED_MODULE_54__.AxisRendererRadial),
/* harmony export */   "AxisRendererX": () => (/* reexport safe */ _internal_charts_axes_AxisRendererX__WEBPACK_IMPORTED_MODULE_52__.AxisRendererX),
/* harmony export */   "AxisRendererX3D": () => (/* reexport safe */ _internal_charts_axes_AxisRendererX3D__WEBPACK_IMPORTED_MODULE_59__.AxisRendererX3D),
/* harmony export */   "AxisRendererY": () => (/* reexport safe */ _internal_charts_axes_AxisRendererY__WEBPACK_IMPORTED_MODULE_53__.AxisRendererY),
/* harmony export */   "AxisRendererY3D": () => (/* reexport safe */ _internal_charts_axes_AxisRendererY3D__WEBPACK_IMPORTED_MODULE_60__.AxisRendererY3D),
/* harmony export */   "AxisTick": () => (/* reexport safe */ _internal_charts_axes_AxisTick__WEBPACK_IMPORTED_MODULE_38__.AxisTick),
/* harmony export */   "Bullet": () => (/* reexport safe */ _internal_charts_elements_Bullet__WEBPACK_IMPORTED_MODULE_62__.Bullet),
/* harmony export */   "Candlestick": () => (/* reexport safe */ _internal_charts_elements_Candlestick__WEBPACK_IMPORTED_MODULE_76__.Candlestick),
/* harmony export */   "CandlestickSeries": () => (/* reexport safe */ _internal_charts_series_CandlestickSeries__WEBPACK_IMPORTED_MODULE_19__.CandlestickSeries),
/* harmony export */   "CandlestickSeriesDataItem": () => (/* reexport safe */ _internal_charts_series_CandlestickSeries__WEBPACK_IMPORTED_MODULE_19__.CandlestickSeriesDataItem),
/* harmony export */   "CategoryAxis": () => (/* reexport safe */ _internal_charts_axes_CategoryAxis__WEBPACK_IMPORTED_MODULE_46__.CategoryAxis),
/* harmony export */   "CategoryAxisBreak": () => (/* reexport safe */ _internal_charts_axes_CategoryAxisBreak__WEBPACK_IMPORTED_MODULE_47__.CategoryAxisBreak),
/* harmony export */   "CategoryAxisDataItem": () => (/* reexport safe */ _internal_charts_axes_CategoryAxis__WEBPACK_IMPORTED_MODULE_46__.CategoryAxisDataItem),
/* harmony export */   "Chart": () => (/* reexport safe */ _internal_charts_Chart__WEBPACK_IMPORTED_MODULE_12__.Chart),
/* harmony export */   "ChartDataItem": () => (/* reexport safe */ _internal_charts_Chart__WEBPACK_IMPORTED_MODULE_12__.ChartDataItem),
/* harmony export */   "ChordDiagram": () => (/* reexport safe */ _internal_charts_types_ChordDiagram__WEBPACK_IMPORTED_MODULE_9__.ChordDiagram),
/* harmony export */   "ChordDiagramDataItem": () => (/* reexport safe */ _internal_charts_types_ChordDiagram__WEBPACK_IMPORTED_MODULE_9__.ChordDiagramDataItem),
/* harmony export */   "ChordLink": () => (/* reexport safe */ _internal_charts_elements_ChordLink__WEBPACK_IMPORTED_MODULE_73__.ChordLink),
/* harmony export */   "ChordNode": () => (/* reexport safe */ _internal_charts_elements_ChordNode__WEBPACK_IMPORTED_MODULE_72__.ChordNode),
/* harmony export */   "CircleBullet": () => (/* reexport safe */ _internal_charts_elements_CircleBullet__WEBPACK_IMPORTED_MODULE_64__.CircleBullet),
/* harmony export */   "ClockHand": () => (/* reexport safe */ _internal_charts_elements_ClockHand__WEBPACK_IMPORTED_MODULE_67__.ClockHand),
/* harmony export */   "Column": () => (/* reexport safe */ _internal_charts_elements_Column__WEBPACK_IMPORTED_MODULE_75__.Column),
/* harmony export */   "Column3D": () => (/* reexport safe */ _internal_charts_elements_Column3D__WEBPACK_IMPORTED_MODULE_79__.Column3D),
/* harmony export */   "ColumnSeries": () => (/* reexport safe */ _internal_charts_series_ColumnSeries__WEBPACK_IMPORTED_MODULE_21__.ColumnSeries),
/* harmony export */   "ColumnSeries3D": () => (/* reexport safe */ _internal_charts_series_ColumnSeries3D__WEBPACK_IMPORTED_MODULE_33__.ColumnSeries3D),
/* harmony export */   "ColumnSeries3DDataItem": () => (/* reexport safe */ _internal_charts_series_ColumnSeries3D__WEBPACK_IMPORTED_MODULE_33__.ColumnSeries3DDataItem),
/* harmony export */   "ColumnSeriesDataItem": () => (/* reexport safe */ _internal_charts_series_ColumnSeries__WEBPACK_IMPORTED_MODULE_21__.ColumnSeriesDataItem),
/* harmony export */   "ConeColumn": () => (/* reexport safe */ _internal_charts_elements_ConeColumn__WEBPACK_IMPORTED_MODULE_80__.ConeColumn),
/* harmony export */   "ConeSeries": () => (/* reexport safe */ _internal_charts_series_ConeSeries__WEBPACK_IMPORTED_MODULE_34__.ConeSeries),
/* harmony export */   "ConeSeriesDataItem": () => (/* reexport safe */ _internal_charts_series_ConeSeries__WEBPACK_IMPORTED_MODULE_34__.ConeSeriesDataItem),
/* harmony export */   "Cursor": () => (/* reexport safe */ _internal_charts_cursors_Cursor__WEBPACK_IMPORTED_MODULE_83__.Cursor),
/* harmony export */   "CurvedColumn": () => (/* reexport safe */ _internal_charts_elements_CurvedColumn__WEBPACK_IMPORTED_MODULE_81__.CurvedColumn),
/* harmony export */   "CurvedColumnSeries": () => (/* reexport safe */ _internal_charts_series_CurvedColumnSeries__WEBPACK_IMPORTED_MODULE_35__.CurvedColumnSeries),
/* harmony export */   "CurvedColumnSeriesDataItem": () => (/* reexport safe */ _internal_charts_series_CurvedColumnSeries__WEBPACK_IMPORTED_MODULE_35__.CurvedColumnSeriesDataItem),
/* harmony export */   "DateAxis": () => (/* reexport safe */ _internal_charts_axes_DateAxis__WEBPACK_IMPORTED_MODULE_48__.DateAxis),
/* harmony export */   "DateAxisBreak": () => (/* reexport safe */ _internal_charts_axes_DateAxisBreak__WEBPACK_IMPORTED_MODULE_50__.DateAxisBreak),
/* harmony export */   "DateAxisDataItem": () => (/* reexport safe */ _internal_charts_axes_DateAxis__WEBPACK_IMPORTED_MODULE_48__.DateAxisDataItem),
/* harmony export */   "DurationAxis": () => (/* reexport safe */ _internal_charts_axes_DurationAxis__WEBPACK_IMPORTED_MODULE_49__.DurationAxis),
/* harmony export */   "DurationAxisDataItem": () => (/* reexport safe */ _internal_charts_axes_DurationAxis__WEBPACK_IMPORTED_MODULE_49__.DurationAxisDataItem),
/* harmony export */   "ErrorBullet": () => (/* reexport safe */ _internal_charts_elements_ErrorBullet__WEBPACK_IMPORTED_MODULE_65__.ErrorBullet),
/* harmony export */   "FlowDiagram": () => (/* reexport safe */ _internal_charts_types_FlowDiagram__WEBPACK_IMPORTED_MODULE_7__.FlowDiagram),
/* harmony export */   "FlowDiagramDataItem": () => (/* reexport safe */ _internal_charts_types_FlowDiagram__WEBPACK_IMPORTED_MODULE_7__.FlowDiagramDataItem),
/* harmony export */   "FlowDiagramLink": () => (/* reexport safe */ _internal_charts_elements_FlowDiagramLink__WEBPACK_IMPORTED_MODULE_69__.FlowDiagramLink),
/* harmony export */   "FlowDiagramNode": () => (/* reexport safe */ _internal_charts_elements_FlowDiagramNode__WEBPACK_IMPORTED_MODULE_68__.FlowDiagramNode),
/* harmony export */   "FunnelSeries": () => (/* reexport safe */ _internal_charts_series_FunnelSeries__WEBPACK_IMPORTED_MODULE_26__.FunnelSeries),
/* harmony export */   "FunnelSeriesDataItem": () => (/* reexport safe */ _internal_charts_series_FunnelSeries__WEBPACK_IMPORTED_MODULE_26__.FunnelSeriesDataItem),
/* harmony export */   "FunnelSlice": () => (/* reexport safe */ _internal_charts_elements_FunnelSlice__WEBPACK_IMPORTED_MODULE_30__.FunnelSlice),
/* harmony export */   "GaugeChart": () => (/* reexport safe */ _internal_charts_types_GaugeChart__WEBPACK_IMPORTED_MODULE_0__.GaugeChart),
/* harmony export */   "GaugeChartDataItem": () => (/* reexport safe */ _internal_charts_types_GaugeChart__WEBPACK_IMPORTED_MODULE_0__.GaugeChartDataItem),
/* harmony export */   "Grid": () => (/* reexport safe */ _internal_charts_axes_Grid__WEBPACK_IMPORTED_MODULE_37__.Grid),
/* harmony export */   "GridCircular": () => (/* reexport safe */ _internal_charts_axes_GridCircular__WEBPACK_IMPORTED_MODULE_58__.GridCircular),
/* harmony export */   "HeatLegend": () => (/* reexport safe */ _internal_charts_elements_HeatLegend__WEBPACK_IMPORTED_MODULE_14__.HeatLegend),
/* harmony export */   "LabelBullet": () => (/* reexport safe */ _internal_charts_elements_LabelBullet__WEBPACK_IMPORTED_MODULE_63__.LabelBullet),
/* harmony export */   "Legend": () => (/* reexport safe */ _internal_charts_Legend__WEBPACK_IMPORTED_MODULE_13__.Legend),
/* harmony export */   "LegendDataItem": () => (/* reexport safe */ _internal_charts_Legend__WEBPACK_IMPORTED_MODULE_13__.LegendDataItem),
/* harmony export */   "LegendSettings": () => (/* reexport safe */ _internal_charts_Legend__WEBPACK_IMPORTED_MODULE_13__.LegendSettings),
/* harmony export */   "LineSeries": () => (/* reexport safe */ _internal_charts_series_LineSeries__WEBPACK_IMPORTED_MODULE_17__.LineSeries),
/* harmony export */   "LineSeriesDataItem": () => (/* reexport safe */ _internal_charts_series_LineSeries__WEBPACK_IMPORTED_MODULE_17__.LineSeriesDataItem),
/* harmony export */   "LineSeriesSegment": () => (/* reexport safe */ _internal_charts_series_LineSeriesSegment__WEBPACK_IMPORTED_MODULE_18__.LineSeriesSegment),
/* harmony export */   "NavigationBar": () => (/* reexport safe */ _internal_charts_elements_NavigationBar__WEBPACK_IMPORTED_MODULE_74__.NavigationBar),
/* harmony export */   "NavigationBarDataItem": () => (/* reexport safe */ _internal_charts_elements_NavigationBar__WEBPACK_IMPORTED_MODULE_74__.NavigationBarDataItem),
/* harmony export */   "OHLC": () => (/* reexport safe */ _internal_charts_elements_OHLC__WEBPACK_IMPORTED_MODULE_77__.OHLC),
/* harmony export */   "OHLCSeries": () => (/* reexport safe */ _internal_charts_series_OHLCSeries__WEBPACK_IMPORTED_MODULE_20__.OHLCSeries),
/* harmony export */   "OHLCSeriesDataItem": () => (/* reexport safe */ _internal_charts_series_OHLCSeries__WEBPACK_IMPORTED_MODULE_20__.OHLCSeriesDataItem),
/* harmony export */   "PictorialStackedSeries": () => (/* reexport safe */ _internal_charts_series_PictorialStackedSeries__WEBPACK_IMPORTED_MODULE_28__.PictorialStackedSeries),
/* harmony export */   "PictorialStackedSeriesDataItem": () => (/* reexport safe */ _internal_charts_series_PictorialStackedSeries__WEBPACK_IMPORTED_MODULE_28__.PictorialStackedSeriesDataItem),
/* harmony export */   "PieChart": () => (/* reexport safe */ _internal_charts_types_PieChart__WEBPACK_IMPORTED_MODULE_5__.PieChart),
/* harmony export */   "PieChart3D": () => (/* reexport safe */ _internal_charts_types_PieChart3D__WEBPACK_IMPORTED_MODULE_4__.PieChart3D),
/* harmony export */   "PieChart3DDataItem": () => (/* reexport safe */ _internal_charts_types_PieChart3D__WEBPACK_IMPORTED_MODULE_4__.PieChart3DDataItem),
/* harmony export */   "PieChartDataItem": () => (/* reexport safe */ _internal_charts_types_PieChart__WEBPACK_IMPORTED_MODULE_5__.PieChartDataItem),
/* harmony export */   "PieSeries": () => (/* reexport safe */ _internal_charts_series_PieSeries__WEBPACK_IMPORTED_MODULE_25__.PieSeries),
/* harmony export */   "PieSeries3D": () => (/* reexport safe */ _internal_charts_series_PieSeries3D__WEBPACK_IMPORTED_MODULE_31__.PieSeries3D),
/* harmony export */   "PieSeries3DDataItem": () => (/* reexport safe */ _internal_charts_series_PieSeries3D__WEBPACK_IMPORTED_MODULE_31__.PieSeries3DDataItem),
/* harmony export */   "PieSeriesDataItem": () => (/* reexport safe */ _internal_charts_series_PieSeries__WEBPACK_IMPORTED_MODULE_25__.PieSeriesDataItem),
/* harmony export */   "PieTick": () => (/* reexport safe */ _internal_charts_elements_PieTick__WEBPACK_IMPORTED_MODULE_29__.PieTick),
/* harmony export */   "PyramidSeries": () => (/* reexport safe */ _internal_charts_series_PyramidSeries__WEBPACK_IMPORTED_MODULE_27__.PyramidSeries),
/* harmony export */   "PyramidSeriesDataItem": () => (/* reexport safe */ _internal_charts_series_PyramidSeries__WEBPACK_IMPORTED_MODULE_27__.PyramidSeriesDataItem),
/* harmony export */   "RadarChart": () => (/* reexport safe */ _internal_charts_types_RadarChart__WEBPACK_IMPORTED_MODULE_1__.RadarChart),
/* harmony export */   "RadarChartDataItem": () => (/* reexport safe */ _internal_charts_types_RadarChart__WEBPACK_IMPORTED_MODULE_1__.RadarChartDataItem),
/* harmony export */   "RadarColumn": () => (/* reexport safe */ _internal_charts_elements_RadarColumn__WEBPACK_IMPORTED_MODULE_78__.RadarColumn),
/* harmony export */   "RadarColumnSeries": () => (/* reexport safe */ _internal_charts_series_RadarColumnSeries__WEBPACK_IMPORTED_MODULE_24__.RadarColumnSeries),
/* harmony export */   "RadarColumnSeriesDataItem": () => (/* reexport safe */ _internal_charts_series_RadarColumnSeries__WEBPACK_IMPORTED_MODULE_24__.RadarColumnSeriesDataItem),
/* harmony export */   "RadarCursor": () => (/* reexport safe */ _internal_charts_cursors_RadarCursor__WEBPACK_IMPORTED_MODULE_84__.RadarCursor),
/* harmony export */   "RadarSeries": () => (/* reexport safe */ _internal_charts_series_RadarSeries__WEBPACK_IMPORTED_MODULE_23__.RadarSeries),
/* harmony export */   "RadarSeriesDataItem": () => (/* reexport safe */ _internal_charts_series_RadarSeries__WEBPACK_IMPORTED_MODULE_23__.RadarSeriesDataItem),
/* harmony export */   "SankeyDiagram": () => (/* reexport safe */ _internal_charts_types_SankeyDiagram__WEBPACK_IMPORTED_MODULE_8__.SankeyDiagram),
/* harmony export */   "SankeyDiagramDataItem": () => (/* reexport safe */ _internal_charts_types_SankeyDiagram__WEBPACK_IMPORTED_MODULE_8__.SankeyDiagramDataItem),
/* harmony export */   "SankeyLink": () => (/* reexport safe */ _internal_charts_elements_SankeyLink__WEBPACK_IMPORTED_MODULE_71__.SankeyLink),
/* harmony export */   "SankeyNode": () => (/* reexport safe */ _internal_charts_elements_SankeyNode__WEBPACK_IMPORTED_MODULE_70__.SankeyNode),
/* harmony export */   "SerialChart": () => (/* reexport safe */ _internal_charts_types_SerialChart__WEBPACK_IMPORTED_MODULE_3__.SerialChart),
/* harmony export */   "SerialChartDataItem": () => (/* reexport safe */ _internal_charts_types_SerialChart__WEBPACK_IMPORTED_MODULE_3__.SerialChartDataItem),
/* harmony export */   "Series": () => (/* reexport safe */ _internal_charts_series_Series__WEBPACK_IMPORTED_MODULE_15__.Series),
/* harmony export */   "SeriesDataItem": () => (/* reexport safe */ _internal_charts_series_Series__WEBPACK_IMPORTED_MODULE_15__.SeriesDataItem),
/* harmony export */   "SlicedChart": () => (/* reexport safe */ _internal_charts_types_SlicedChart__WEBPACK_IMPORTED_MODULE_6__.SlicedChart),
/* harmony export */   "SlicedChartDataItem": () => (/* reexport safe */ _internal_charts_types_SlicedChart__WEBPACK_IMPORTED_MODULE_6__.SlicedChartDataItem),
/* harmony export */   "StepLineSeries": () => (/* reexport safe */ _internal_charts_series_StepLineSeries__WEBPACK_IMPORTED_MODULE_22__.StepLineSeries),
/* harmony export */   "StepLineSeriesDataItem": () => (/* reexport safe */ _internal_charts_series_StepLineSeries__WEBPACK_IMPORTED_MODULE_22__.StepLineSeriesDataItem),
/* harmony export */   "Tick": () => (/* reexport safe */ _internal_charts_elements_Tick__WEBPACK_IMPORTED_MODULE_61__.Tick),
/* harmony export */   "TreeMap": () => (/* reexport safe */ _internal_charts_types_TreeMap__WEBPACK_IMPORTED_MODULE_10__.TreeMap),
/* harmony export */   "TreeMapDataItem": () => (/* reexport safe */ _internal_charts_types_TreeMap__WEBPACK_IMPORTED_MODULE_10__.TreeMapDataItem),
/* harmony export */   "TreeMapSeries": () => (/* reexport safe */ _internal_charts_series_TreeMapSeries__WEBPACK_IMPORTED_MODULE_32__.TreeMapSeries),
/* harmony export */   "TreeMapSeriesDataItem": () => (/* reexport safe */ _internal_charts_series_TreeMapSeries__WEBPACK_IMPORTED_MODULE_32__.TreeMapSeriesDataItem),
/* harmony export */   "ValueAxis": () => (/* reexport safe */ _internal_charts_axes_ValueAxis__WEBPACK_IMPORTED_MODULE_45__.ValueAxis),
/* harmony export */   "ValueAxisBreak": () => (/* reexport safe */ _internal_charts_axes_ValueAxisBreak__WEBPACK_IMPORTED_MODULE_51__.ValueAxisBreak),
/* harmony export */   "ValueAxisDataItem": () => (/* reexport safe */ _internal_charts_axes_ValueAxis__WEBPACK_IMPORTED_MODULE_45__.ValueAxisDataItem),
/* harmony export */   "XYChart": () => (/* reexport safe */ _internal_charts_types_XYChart__WEBPACK_IMPORTED_MODULE_2__.XYChart),
/* harmony export */   "XYChart3D": () => (/* reexport safe */ _internal_charts_types_XYChart3D__WEBPACK_IMPORTED_MODULE_11__.XYChart3D),
/* harmony export */   "XYChart3DDataItem": () => (/* reexport safe */ _internal_charts_types_XYChart3D__WEBPACK_IMPORTED_MODULE_11__.XYChart3DDataItem),
/* harmony export */   "XYChartDataItem": () => (/* reexport safe */ _internal_charts_types_XYChart__WEBPACK_IMPORTED_MODULE_2__.XYChartDataItem),
/* harmony export */   "XYChartScrollbar": () => (/* reexport safe */ _internal_charts_elements_XYChartScrollbar__WEBPACK_IMPORTED_MODULE_66__.XYChartScrollbar),
/* harmony export */   "XYCursor": () => (/* reexport safe */ _internal_charts_cursors_XYCursor__WEBPACK_IMPORTED_MODULE_82__.XYCursor),
/* harmony export */   "XYSeries": () => (/* reexport safe */ _internal_charts_series_XYSeries__WEBPACK_IMPORTED_MODULE_16__.XYSeries),
/* harmony export */   "XYSeriesDataItem": () => (/* reexport safe */ _internal_charts_series_XYSeries__WEBPACK_IMPORTED_MODULE_16__.XYSeriesDataItem)
/* harmony export */ });
/* harmony import */ var _internal_charts_types_GaugeChart__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./.internal/charts/types/GaugeChart */ "./node_modules/@amcharts/amcharts4/.internal/charts/types/GaugeChart.js");
/* harmony import */ var _internal_charts_types_RadarChart__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./.internal/charts/types/RadarChart */ "./node_modules/@amcharts/amcharts4/.internal/charts/types/RadarChart.js");
/* harmony import */ var _internal_charts_types_XYChart__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./.internal/charts/types/XYChart */ "./node_modules/@amcharts/amcharts4/.internal/charts/types/XYChart.js");
/* harmony import */ var _internal_charts_types_SerialChart__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./.internal/charts/types/SerialChart */ "./node_modules/@amcharts/amcharts4/.internal/charts/types/SerialChart.js");
/* harmony import */ var _internal_charts_types_PieChart3D__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./.internal/charts/types/PieChart3D */ "./node_modules/@amcharts/amcharts4/.internal/charts/types/PieChart3D.js");
/* harmony import */ var _internal_charts_types_PieChart__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./.internal/charts/types/PieChart */ "./node_modules/@amcharts/amcharts4/.internal/charts/types/PieChart.js");
/* harmony import */ var _internal_charts_types_SlicedChart__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./.internal/charts/types/SlicedChart */ "./node_modules/@amcharts/amcharts4/.internal/charts/types/SlicedChart.js");
/* harmony import */ var _internal_charts_types_FlowDiagram__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./.internal/charts/types/FlowDiagram */ "./node_modules/@amcharts/amcharts4/.internal/charts/types/FlowDiagram.js");
/* harmony import */ var _internal_charts_types_SankeyDiagram__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./.internal/charts/types/SankeyDiagram */ "./node_modules/@amcharts/amcharts4/.internal/charts/types/SankeyDiagram.js");
/* harmony import */ var _internal_charts_types_ChordDiagram__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./.internal/charts/types/ChordDiagram */ "./node_modules/@amcharts/amcharts4/.internal/charts/types/ChordDiagram.js");
/* harmony import */ var _internal_charts_types_TreeMap__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./.internal/charts/types/TreeMap */ "./node_modules/@amcharts/amcharts4/.internal/charts/types/TreeMap.js");
/* harmony import */ var _internal_charts_types_XYChart3D__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./.internal/charts/types/XYChart3D */ "./node_modules/@amcharts/amcharts4/.internal/charts/types/XYChart3D.js");
/* harmony import */ var _internal_charts_Chart__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./.internal/charts/Chart */ "./node_modules/@amcharts/amcharts4/.internal/charts/Chart.js");
/* harmony import */ var _internal_charts_Legend__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./.internal/charts/Legend */ "./node_modules/@amcharts/amcharts4/.internal/charts/Legend.js");
/* harmony import */ var _internal_charts_elements_HeatLegend__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./.internal/charts/elements/HeatLegend */ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/HeatLegend.js");
/* harmony import */ var _internal_charts_series_Series__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./.internal/charts/series/Series */ "./node_modules/@amcharts/amcharts4/.internal/charts/series/Series.js");
/* harmony import */ var _internal_charts_series_XYSeries__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./.internal/charts/series/XYSeries */ "./node_modules/@amcharts/amcharts4/.internal/charts/series/XYSeries.js");
/* harmony import */ var _internal_charts_series_LineSeries__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./.internal/charts/series/LineSeries */ "./node_modules/@amcharts/amcharts4/.internal/charts/series/LineSeries.js");
/* harmony import */ var _internal_charts_series_LineSeriesSegment__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./.internal/charts/series/LineSeriesSegment */ "./node_modules/@amcharts/amcharts4/.internal/charts/series/LineSeriesSegment.js");
/* harmony import */ var _internal_charts_series_CandlestickSeries__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./.internal/charts/series/CandlestickSeries */ "./node_modules/@amcharts/amcharts4/.internal/charts/series/CandlestickSeries.js");
/* harmony import */ var _internal_charts_series_OHLCSeries__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./.internal/charts/series/OHLCSeries */ "./node_modules/@amcharts/amcharts4/.internal/charts/series/OHLCSeries.js");
/* harmony import */ var _internal_charts_series_ColumnSeries__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./.internal/charts/series/ColumnSeries */ "./node_modules/@amcharts/amcharts4/.internal/charts/series/ColumnSeries.js");
/* harmony import */ var _internal_charts_series_StepLineSeries__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./.internal/charts/series/StepLineSeries */ "./node_modules/@amcharts/amcharts4/.internal/charts/series/StepLineSeries.js");
/* harmony import */ var _internal_charts_series_RadarSeries__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./.internal/charts/series/RadarSeries */ "./node_modules/@amcharts/amcharts4/.internal/charts/series/RadarSeries.js");
/* harmony import */ var _internal_charts_series_RadarColumnSeries__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./.internal/charts/series/RadarColumnSeries */ "./node_modules/@amcharts/amcharts4/.internal/charts/series/RadarColumnSeries.js");
/* harmony import */ var _internal_charts_series_PieSeries__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./.internal/charts/series/PieSeries */ "./node_modules/@amcharts/amcharts4/.internal/charts/series/PieSeries.js");
/* harmony import */ var _internal_charts_series_FunnelSeries__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./.internal/charts/series/FunnelSeries */ "./node_modules/@amcharts/amcharts4/.internal/charts/series/FunnelSeries.js");
/* harmony import */ var _internal_charts_series_PyramidSeries__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./.internal/charts/series/PyramidSeries */ "./node_modules/@amcharts/amcharts4/.internal/charts/series/PyramidSeries.js");
/* harmony import */ var _internal_charts_series_PictorialStackedSeries__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./.internal/charts/series/PictorialStackedSeries */ "./node_modules/@amcharts/amcharts4/.internal/charts/series/PictorialStackedSeries.js");
/* harmony import */ var _internal_charts_elements_PieTick__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./.internal/charts/elements/PieTick */ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/PieTick.js");
/* harmony import */ var _internal_charts_elements_FunnelSlice__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./.internal/charts/elements/FunnelSlice */ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/FunnelSlice.js");
/* harmony import */ var _internal_charts_series_PieSeries3D__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./.internal/charts/series/PieSeries3D */ "./node_modules/@amcharts/amcharts4/.internal/charts/series/PieSeries3D.js");
/* harmony import */ var _internal_charts_series_TreeMapSeries__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./.internal/charts/series/TreeMapSeries */ "./node_modules/@amcharts/amcharts4/.internal/charts/series/TreeMapSeries.js");
/* harmony import */ var _internal_charts_series_ColumnSeries3D__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./.internal/charts/series/ColumnSeries3D */ "./node_modules/@amcharts/amcharts4/.internal/charts/series/ColumnSeries3D.js");
/* harmony import */ var _internal_charts_series_ConeSeries__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./.internal/charts/series/ConeSeries */ "./node_modules/@amcharts/amcharts4/.internal/charts/series/ConeSeries.js");
/* harmony import */ var _internal_charts_series_CurvedColumnSeries__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./.internal/charts/series/CurvedColumnSeries */ "./node_modules/@amcharts/amcharts4/.internal/charts/series/CurvedColumnSeries.js");
/* harmony import */ var _internal_charts_axes_Axis__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./.internal/charts/axes/Axis */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/Axis.js");
/* harmony import */ var _internal_charts_axes_Grid__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./.internal/charts/axes/Grid */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/Grid.js");
/* harmony import */ var _internal_charts_axes_AxisTick__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./.internal/charts/axes/AxisTick */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisTick.js");
/* harmony import */ var _internal_charts_axes_AxisLabel__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./.internal/charts/axes/AxisLabel */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisLabel.js");
/* harmony import */ var _internal_charts_axes_AxisLine__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./.internal/charts/axes/AxisLine */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisLine.js");
/* harmony import */ var _internal_charts_axes_AxisFill__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./.internal/charts/axes/AxisFill */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisFill.js");
/* harmony import */ var _internal_charts_axes_AxisRenderer__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./.internal/charts/axes/AxisRenderer */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisRenderer.js");
/* harmony import */ var _internal_charts_axes_AxisBreak__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ./.internal/charts/axes/AxisBreak */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisBreak.js");
/* harmony import */ var _internal_charts_axes_AxisBullet__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ./.internal/charts/axes/AxisBullet */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisBullet.js");
/* harmony import */ var _internal_charts_axes_ValueAxis__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ./.internal/charts/axes/ValueAxis */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/ValueAxis.js");
/* harmony import */ var _internal_charts_axes_CategoryAxis__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ./.internal/charts/axes/CategoryAxis */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/CategoryAxis.js");
/* harmony import */ var _internal_charts_axes_CategoryAxisBreak__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ./.internal/charts/axes/CategoryAxisBreak */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/CategoryAxisBreak.js");
/* harmony import */ var _internal_charts_axes_DateAxis__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ./.internal/charts/axes/DateAxis */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/DateAxis.js");
/* harmony import */ var _internal_charts_axes_DurationAxis__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! ./.internal/charts/axes/DurationAxis */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/DurationAxis.js");
/* harmony import */ var _internal_charts_axes_DateAxisBreak__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! ./.internal/charts/axes/DateAxisBreak */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/DateAxisBreak.js");
/* harmony import */ var _internal_charts_axes_ValueAxisBreak__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! ./.internal/charts/axes/ValueAxisBreak */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/ValueAxisBreak.js");
/* harmony import */ var _internal_charts_axes_AxisRendererX__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(/*! ./.internal/charts/axes/AxisRendererX */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisRendererX.js");
/* harmony import */ var _internal_charts_axes_AxisRendererY__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(/*! ./.internal/charts/axes/AxisRendererY */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisRendererY.js");
/* harmony import */ var _internal_charts_axes_AxisRendererRadial__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(/*! ./.internal/charts/axes/AxisRendererRadial */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisRendererRadial.js");
/* harmony import */ var _internal_charts_axes_AxisLabelCircular__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(/*! ./.internal/charts/axes/AxisLabelCircular */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisLabelCircular.js");
/* harmony import */ var _internal_charts_axes_AxisRendererCircular__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(/*! ./.internal/charts/axes/AxisRendererCircular */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisRendererCircular.js");
/* harmony import */ var _internal_charts_axes_AxisFillCircular__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(/*! ./.internal/charts/axes/AxisFillCircular */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisFillCircular.js");
/* harmony import */ var _internal_charts_axes_GridCircular__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(/*! ./.internal/charts/axes/GridCircular */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/GridCircular.js");
/* harmony import */ var _internal_charts_axes_AxisRendererX3D__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(/*! ./.internal/charts/axes/AxisRendererX3D */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisRendererX3D.js");
/* harmony import */ var _internal_charts_axes_AxisRendererY3D__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(/*! ./.internal/charts/axes/AxisRendererY3D */ "./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisRendererY3D.js");
/* harmony import */ var _internal_charts_elements_Tick__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(/*! ./.internal/charts/elements/Tick */ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/Tick.js");
/* harmony import */ var _internal_charts_elements_Bullet__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(/*! ./.internal/charts/elements/Bullet */ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/Bullet.js");
/* harmony import */ var _internal_charts_elements_LabelBullet__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(/*! ./.internal/charts/elements/LabelBullet */ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/LabelBullet.js");
/* harmony import */ var _internal_charts_elements_CircleBullet__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(/*! ./.internal/charts/elements/CircleBullet */ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/CircleBullet.js");
/* harmony import */ var _internal_charts_elements_ErrorBullet__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(/*! ./.internal/charts/elements/ErrorBullet */ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/ErrorBullet.js");
/* harmony import */ var _internal_charts_elements_XYChartScrollbar__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(/*! ./.internal/charts/elements/XYChartScrollbar */ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/XYChartScrollbar.js");
/* harmony import */ var _internal_charts_elements_ClockHand__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__(/*! ./.internal/charts/elements/ClockHand */ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/ClockHand.js");
/* harmony import */ var _internal_charts_elements_FlowDiagramNode__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__(/*! ./.internal/charts/elements/FlowDiagramNode */ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/FlowDiagramNode.js");
/* harmony import */ var _internal_charts_elements_FlowDiagramLink__WEBPACK_IMPORTED_MODULE_69__ = __webpack_require__(/*! ./.internal/charts/elements/FlowDiagramLink */ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/FlowDiagramLink.js");
/* harmony import */ var _internal_charts_elements_SankeyNode__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__(/*! ./.internal/charts/elements/SankeyNode */ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/SankeyNode.js");
/* harmony import */ var _internal_charts_elements_SankeyLink__WEBPACK_IMPORTED_MODULE_71__ = __webpack_require__(/*! ./.internal/charts/elements/SankeyLink */ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/SankeyLink.js");
/* harmony import */ var _internal_charts_elements_ChordNode__WEBPACK_IMPORTED_MODULE_72__ = __webpack_require__(/*! ./.internal/charts/elements/ChordNode */ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/ChordNode.js");
/* harmony import */ var _internal_charts_elements_ChordLink__WEBPACK_IMPORTED_MODULE_73__ = __webpack_require__(/*! ./.internal/charts/elements/ChordLink */ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/ChordLink.js");
/* harmony import */ var _internal_charts_elements_NavigationBar__WEBPACK_IMPORTED_MODULE_74__ = __webpack_require__(/*! ./.internal/charts/elements/NavigationBar */ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/NavigationBar.js");
/* harmony import */ var _internal_charts_elements_Column__WEBPACK_IMPORTED_MODULE_75__ = __webpack_require__(/*! ./.internal/charts/elements/Column */ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/Column.js");
/* harmony import */ var _internal_charts_elements_Candlestick__WEBPACK_IMPORTED_MODULE_76__ = __webpack_require__(/*! ./.internal/charts/elements/Candlestick */ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/Candlestick.js");
/* harmony import */ var _internal_charts_elements_OHLC__WEBPACK_IMPORTED_MODULE_77__ = __webpack_require__(/*! ./.internal/charts/elements/OHLC */ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/OHLC.js");
/* harmony import */ var _internal_charts_elements_RadarColumn__WEBPACK_IMPORTED_MODULE_78__ = __webpack_require__(/*! ./.internal/charts/elements/RadarColumn */ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/RadarColumn.js");
/* harmony import */ var _internal_charts_elements_Column3D__WEBPACK_IMPORTED_MODULE_79__ = __webpack_require__(/*! ./.internal/charts/elements/Column3D */ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/Column3D.js");
/* harmony import */ var _internal_charts_elements_ConeColumn__WEBPACK_IMPORTED_MODULE_80__ = __webpack_require__(/*! ./.internal/charts/elements/ConeColumn */ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/ConeColumn.js");
/* harmony import */ var _internal_charts_elements_CurvedColumn__WEBPACK_IMPORTED_MODULE_81__ = __webpack_require__(/*! ./.internal/charts/elements/CurvedColumn */ "./node_modules/@amcharts/amcharts4/.internal/charts/elements/CurvedColumn.js");
/* harmony import */ var _internal_charts_cursors_XYCursor__WEBPACK_IMPORTED_MODULE_82__ = __webpack_require__(/*! ./.internal/charts/cursors/XYCursor */ "./node_modules/@amcharts/amcharts4/.internal/charts/cursors/XYCursor.js");
/* harmony import */ var _internal_charts_cursors_Cursor__WEBPACK_IMPORTED_MODULE_83__ = __webpack_require__(/*! ./.internal/charts/cursors/Cursor */ "./node_modules/@amcharts/amcharts4/.internal/charts/cursors/Cursor.js");
/* harmony import */ var _internal_charts_cursors_RadarCursor__WEBPACK_IMPORTED_MODULE_84__ = __webpack_require__(/*! ./.internal/charts/cursors/RadarCursor */ "./node_modules/@amcharts/amcharts4/.internal/charts/cursors/RadarCursor.js");
/**
 * Module: gauge
 */

/**
 * Elements: types
 */












/**
 * Elements: charts
 */




/**
 * Elements: series
 */






















/**
 * Elements: axes
 */


























/**
 * Elements: elements
 */






















/**
 * Elements: cursors
 */





/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/core.js":
/*!**************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/core.js ***!
  \**************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "AMElement": () => (/* reexport safe */ _internal_core_rendering_AMElement__WEBPACK_IMPORTED_MODULE_63__.AMElement),
/* harmony export */   "Adapter": () => (/* reexport safe */ _internal_core_utils_Adapter__WEBPACK_IMPORTED_MODULE_84__.Adapter),
/* harmony export */   "Animation": () => (/* reexport safe */ _internal_core_utils_Animation__WEBPACK_IMPORTED_MODULE_85__.Animation),
/* harmony export */   "BaseObject": () => (/* reexport safe */ _internal_core_Base__WEBPACK_IMPORTED_MODULE_1__.BaseObject),
/* harmony export */   "BaseObjectEvents": () => (/* reexport safe */ _internal_core_Base__WEBPACK_IMPORTED_MODULE_1__.BaseObjectEvents),
/* harmony export */   "Basis": () => (/* reexport safe */ _internal_core_rendering_Smoothing__WEBPACK_IMPORTED_MODULE_66__.Basis),
/* harmony export */   "BlurFilter": () => (/* reexport safe */ _internal_core_rendering_filters_BlurFilter__WEBPACK_IMPORTED_MODULE_80__.BlurFilter),
/* harmony export */   "Button": () => (/* reexport safe */ _internal_core_elements_Button__WEBPACK_IMPORTED_MODULE_16__.Button),
/* harmony export */   "CSVParser": () => (/* reexport safe */ _internal_core_data_CSVParser__WEBPACK_IMPORTED_MODULE_10__.CSVParser),
/* harmony export */   "Cache": () => (/* reexport safe */ _internal_core_utils_Cache__WEBPACK_IMPORTED_MODULE_87__.Cache),
/* harmony export */   "Circle": () => (/* reexport safe */ _internal_core_elements_Circle__WEBPACK_IMPORTED_MODULE_17__.Circle),
/* harmony export */   "CirclePattern": () => (/* reexport safe */ _internal_core_rendering_fills_CirclePattern__WEBPACK_IMPORTED_MODULE_73__.CirclePattern),
/* harmony export */   "CloseButton": () => (/* reexport safe */ _internal_core_elements_CloseButton__WEBPACK_IMPORTED_MODULE_33__.CloseButton),
/* harmony export */   "Color": () => (/* reexport safe */ _internal_core_utils_Color__WEBPACK_IMPORTED_MODULE_88__.Color),
/* harmony export */   "ColorModifier": () => (/* reexport safe */ _internal_core_rendering_fills_ColorModifier__WEBPACK_IMPORTED_MODULE_68__.ColorModifier),
/* harmony export */   "ColorSet": () => (/* reexport safe */ _internal_core_utils_ColorSet__WEBPACK_IMPORTED_MODULE_89__.ColorSet),
/* harmony export */   "ColorizeFilter": () => (/* reexport safe */ _internal_core_rendering_filters_ColorizeFilter__WEBPACK_IMPORTED_MODULE_77__.ColorizeFilter),
/* harmony export */   "Component": () => (/* reexport safe */ _internal_core_Component__WEBPACK_IMPORTED_MODULE_2__.Component),
/* harmony export */   "Cone": () => (/* reexport safe */ _internal_core_elements_3d_Cone__WEBPACK_IMPORTED_MODULE_48__.Cone),
/* harmony export */   "Container": () => (/* reexport safe */ _internal_core_Container__WEBPACK_IMPORTED_MODULE_3__.Container),
/* harmony export */   "CounterDisposer": () => (/* reexport safe */ _internal_core_utils_Disposer__WEBPACK_IMPORTED_MODULE_93__.CounterDisposer),
/* harmony export */   "DATE": () => (/* reexport safe */ _internal_core_utils_Strings__WEBPACK_IMPORTED_MODULE_106__.DATE),
/* harmony export */   "DURATION": () => (/* reexport safe */ _internal_core_utils_Strings__WEBPACK_IMPORTED_MODULE_106__.DURATION),
/* harmony export */   "DataItem": () => (/* reexport safe */ _internal_core_DataItem__WEBPACK_IMPORTED_MODULE_4__.DataItem),
/* harmony export */   "DataLoader": () => (/* reexport safe */ _internal_core_data_DataLoader__WEBPACK_IMPORTED_MODULE_11__.DataLoader),
/* harmony export */   "DataParser": () => (/* reexport safe */ _internal_core_data_DataParser__WEBPACK_IMPORTED_MODULE_12__.DataParser),
/* harmony export */   "DataSource": () => (/* reexport safe */ _internal_core_data_DataSource__WEBPACK_IMPORTED_MODULE_13__.DataSource),
/* harmony export */   "DateFormatter": () => (/* reexport safe */ _internal_core_formatters_DateFormatter__WEBPACK_IMPORTED_MODULE_53__.DateFormatter),
/* harmony export */   "DesaturateFilter": () => (/* reexport safe */ _internal_core_rendering_filters_DesaturateFilter__WEBPACK_IMPORTED_MODULE_78__.DesaturateFilter),
/* harmony export */   "Dictionary": () => (/* reexport safe */ _internal_core_utils_Dictionary__WEBPACK_IMPORTED_MODULE_92__.Dictionary),
/* harmony export */   "DictionaryDisposer": () => (/* reexport safe */ _internal_core_utils_Dictionary__WEBPACK_IMPORTED_MODULE_92__.DictionaryDisposer),
/* harmony export */   "DictionaryTemplate": () => (/* reexport safe */ _internal_core_utils_Dictionary__WEBPACK_IMPORTED_MODULE_92__.DictionaryTemplate),
/* harmony export */   "Disposer": () => (/* reexport safe */ _internal_core_utils_Disposer__WEBPACK_IMPORTED_MODULE_93__.Disposer),
/* harmony export */   "DropShadowFilter": () => (/* reexport safe */ _internal_core_rendering_filters_DropShadowFilter__WEBPACK_IMPORTED_MODULE_79__.DropShadowFilter),
/* harmony export */   "DurationFormatter": () => (/* reexport safe */ _internal_core_formatters_DurationFormatter__WEBPACK_IMPORTED_MODULE_54__.DurationFormatter),
/* harmony export */   "Ellipse": () => (/* reexport safe */ _internal_core_elements_Ellipse__WEBPACK_IMPORTED_MODULE_18__.Ellipse),
/* harmony export */   "EventDispatcher": () => (/* reexport safe */ _internal_core_utils_EventDispatcher__WEBPACK_IMPORTED_MODULE_95__.EventDispatcher),
/* harmony export */   "Export": () => (/* reexport safe */ _internal_core_export_Export__WEBPACK_IMPORTED_MODULE_51__.Export),
/* harmony export */   "ExportMenu": () => (/* reexport safe */ _internal_core_export_ExportMenu__WEBPACK_IMPORTED_MODULE_52__.ExportMenu),
/* harmony export */   "Filter": () => (/* reexport safe */ _internal_core_rendering_filters_Filter__WEBPACK_IMPORTED_MODULE_81__.Filter),
/* harmony export */   "FocusFilter": () => (/* reexport safe */ _internal_core_rendering_filters_FocusFilter__WEBPACK_IMPORTED_MODULE_82__.FocusFilter),
/* harmony export */   "GlobalAdapter": () => (/* reexport safe */ _internal_core_utils_Adapter__WEBPACK_IMPORTED_MODULE_84__.GlobalAdapter),
/* harmony export */   "Group": () => (/* reexport safe */ _internal_core_rendering_Group__WEBPACK_IMPORTED_MODULE_64__.Group),
/* harmony export */   "Image": () => (/* reexport safe */ _internal_core_elements_Image__WEBPACK_IMPORTED_MODULE_19__.Image),
/* harmony export */   "IndexedIterable": () => (/* reexport safe */ _internal_core_utils_List__WEBPACK_IMPORTED_MODULE_99__.IndexedIterable),
/* harmony export */   "Inertia": () => (/* reexport safe */ _internal_core_interaction_Inertia__WEBPACK_IMPORTED_MODULE_57__.Inertia),
/* harmony export */   "Interaction": () => (/* reexport safe */ _internal_core_interaction_Interaction__WEBPACK_IMPORTED_MODULE_58__.Interaction),
/* harmony export */   "InteractionKeyboardObject": () => (/* reexport safe */ _internal_core_interaction_InteractionKeyboardObject__WEBPACK_IMPORTED_MODULE_59__.InteractionKeyboardObject),
/* harmony export */   "InteractionObject": () => (/* reexport safe */ _internal_core_interaction_InteractionObject__WEBPACK_IMPORTED_MODULE_60__.InteractionObject),
/* harmony export */   "InteractionObjectEventDispatcher": () => (/* reexport safe */ _internal_core_interaction_InteractionObjectEvents__WEBPACK_IMPORTED_MODULE_61__.InteractionObjectEventDispatcher),
/* harmony export */   "InterfaceColorSet": () => (/* reexport safe */ _internal_core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_91__.InterfaceColorSet),
/* harmony export */   "JSONParser": () => (/* reexport safe */ _internal_core_data_JSONParser__WEBPACK_IMPORTED_MODULE_14__.JSONParser),
/* harmony export */   "Keyboard": () => (/* reexport safe */ _internal_core_utils_Keyboard__WEBPACK_IMPORTED_MODULE_97__.Keyboard),
/* harmony export */   "Label": () => (/* reexport safe */ _internal_core_elements_Label__WEBPACK_IMPORTED_MODULE_20__.Label),
/* harmony export */   "Language": () => (/* reexport safe */ _internal_core_utils_Language__WEBPACK_IMPORTED_MODULE_98__.Language),
/* harmony export */   "LightenFilter": () => (/* reexport safe */ _internal_core_rendering_filters_LightenFilter__WEBPACK_IMPORTED_MODULE_83__.LightenFilter),
/* harmony export */   "Line": () => (/* reexport safe */ _internal_core_elements_Line__WEBPACK_IMPORTED_MODULE_21__.Line),
/* harmony export */   "LinePattern": () => (/* reexport safe */ _internal_core_rendering_fills_LinePattern__WEBPACK_IMPORTED_MODULE_72__.LinePattern),
/* harmony export */   "LinearGradient": () => (/* reexport safe */ _internal_core_rendering_fills_LinearGradient__WEBPACK_IMPORTED_MODULE_69__.LinearGradient),
/* harmony export */   "LinearGradientModifier": () => (/* reexport safe */ _internal_core_rendering_fills_LinearGradientModifier__WEBPACK_IMPORTED_MODULE_70__.LinearGradientModifier),
/* harmony export */   "List": () => (/* reexport safe */ _internal_core_utils_List__WEBPACK_IMPORTED_MODULE_99__.List),
/* harmony export */   "ListDisposer": () => (/* reexport safe */ _internal_core_utils_List__WEBPACK_IMPORTED_MODULE_99__.ListDisposer),
/* harmony export */   "ListGrouper": () => (/* reexport safe */ _internal_core_utils_List__WEBPACK_IMPORTED_MODULE_99__.ListGrouper),
/* harmony export */   "ListIterator": () => (/* reexport safe */ _internal_core_utils_Iterator__WEBPACK_IMPORTED_MODULE_96__.ListIterator),
/* harmony export */   "ListTemplate": () => (/* reexport safe */ _internal_core_utils_List__WEBPACK_IMPORTED_MODULE_99__.ListTemplate),
/* harmony export */   "Modal": () => (/* reexport safe */ _internal_core_elements_Modal__WEBPACK_IMPORTED_MODULE_23__.Modal),
/* harmony export */   "Morpher": () => (/* reexport safe */ _internal_core_utils_Morpher__WEBPACK_IMPORTED_MODULE_100__.Morpher),
/* harmony export */   "MouseCursorStyle": () => (/* reexport safe */ _internal_core_interaction_Mouse__WEBPACK_IMPORTED_MODULE_62__.MouseCursorStyle),
/* harmony export */   "MultiDisposer": () => (/* reexport safe */ _internal_core_utils_Disposer__WEBPACK_IMPORTED_MODULE_93__.MultiDisposer),
/* harmony export */   "MutableValueDisposer": () => (/* reexport safe */ _internal_core_utils_Disposer__WEBPACK_IMPORTED_MODULE_93__.MutableValueDisposer),
/* harmony export */   "NUMBER": () => (/* reexport safe */ _internal_core_utils_Strings__WEBPACK_IMPORTED_MODULE_106__.NUMBER),
/* harmony export */   "NumberFormatter": () => (/* reexport safe */ _internal_core_formatters_NumberFormatter__WEBPACK_IMPORTED_MODULE_55__.NumberFormatter),
/* harmony export */   "OrderedList": () => (/* reexport safe */ _internal_core_utils_SortedList__WEBPACK_IMPORTED_MODULE_105__.OrderedList),
/* harmony export */   "OrderedListTemplate": () => (/* reexport safe */ _internal_core_utils_SortedList__WEBPACK_IMPORTED_MODULE_105__.OrderedListTemplate),
/* harmony export */   "PLACEHOLDER": () => (/* reexport safe */ _internal_core_utils_Strings__WEBPACK_IMPORTED_MODULE_106__.PLACEHOLDER),
/* harmony export */   "PLACEHOLDER2": () => (/* reexport safe */ _internal_core_utils_Strings__WEBPACK_IMPORTED_MODULE_106__.PLACEHOLDER2),
/* harmony export */   "PX": () => (/* reexport safe */ _internal_core_utils_Strings__WEBPACK_IMPORTED_MODULE_106__.PX),
/* harmony export */   "Paper": () => (/* reexport safe */ _internal_core_rendering_Paper__WEBPACK_IMPORTED_MODULE_65__.Paper),
/* harmony export */   "Pattern": () => (/* reexport safe */ _internal_core_rendering_fills_Pattern__WEBPACK_IMPORTED_MODULE_74__.Pattern),
/* harmony export */   "PatternSet": () => (/* reexport safe */ _internal_core_utils_PatternSet__WEBPACK_IMPORTED_MODULE_90__.PatternSet),
/* harmony export */   "Percent": () => (/* reexport safe */ _internal_core_utils_Percent__WEBPACK_IMPORTED_MODULE_102__.Percent),
/* harmony export */   "PlayButton": () => (/* reexport safe */ _internal_core_elements_PlayButton__WEBPACK_IMPORTED_MODULE_47__.PlayButton),
/* harmony export */   "Plugin": () => (/* reexport safe */ _internal_core_utils_Plugin__WEBPACK_IMPORTED_MODULE_103__.Plugin),
/* harmony export */   "PointedRectangle": () => (/* reexport safe */ _internal_core_elements_PointedRectangle__WEBPACK_IMPORTED_MODULE_24__.PointedRectangle),
/* harmony export */   "PointedShape": () => (/* reexport safe */ _internal_core_elements_PointedShape__WEBPACK_IMPORTED_MODULE_25__.PointedShape),
/* harmony export */   "Polyarc": () => (/* reexport safe */ _internal_core_elements_Polyarc__WEBPACK_IMPORTED_MODULE_26__.Polyarc),
/* harmony export */   "Polygon": () => (/* reexport safe */ _internal_core_elements_Polygon__WEBPACK_IMPORTED_MODULE_27__.Polygon),
/* harmony export */   "Polyline": () => (/* reexport safe */ _internal_core_elements_Polyline__WEBPACK_IMPORTED_MODULE_28__.Polyline),
/* harmony export */   "Polyspline": () => (/* reexport safe */ _internal_core_elements_Polyspline__WEBPACK_IMPORTED_MODULE_29__.Polyspline),
/* harmony export */   "Popup": () => (/* reexport safe */ _internal_core_elements_Popup__WEBPACK_IMPORTED_MODULE_22__.Popup),
/* harmony export */   "Preloader": () => (/* reexport safe */ _internal_core_elements_Preloader__WEBPACK_IMPORTED_MODULE_30__.Preloader),
/* harmony export */   "RadialGradient": () => (/* reexport safe */ _internal_core_rendering_fills_RadialGradient__WEBPACK_IMPORTED_MODULE_75__.RadialGradient),
/* harmony export */   "RadialGradientModifier": () => (/* reexport safe */ _internal_core_rendering_fills_RadialGradientModifier__WEBPACK_IMPORTED_MODULE_71__.RadialGradientModifier),
/* harmony export */   "RectPattern": () => (/* reexport safe */ _internal_core_rendering_fills_RectPattern__WEBPACK_IMPORTED_MODULE_76__.RectPattern),
/* harmony export */   "Rectangle": () => (/* reexport safe */ _internal_core_elements_Rectangle__WEBPACK_IMPORTED_MODULE_31__.Rectangle),
/* harmony export */   "Rectangle3D": () => (/* reexport safe */ _internal_core_elements_3d_Rectangle3D__WEBPACK_IMPORTED_MODULE_49__.Rectangle3D),
/* harmony export */   "Registry": () => (/* reexport safe */ _internal_core_Registry__WEBPACK_IMPORTED_MODULE_8__.Registry),
/* harmony export */   "ResizeButton": () => (/* reexport safe */ _internal_core_elements_ResizeButton__WEBPACK_IMPORTED_MODULE_32__.ResizeButton),
/* harmony export */   "Responsive": () => (/* reexport safe */ _internal_core_utils_Responsive__WEBPACK_IMPORTED_MODULE_104__.Responsive),
/* harmony export */   "ResponsiveBreakpoints": () => (/* reexport safe */ _internal_core_utils_Responsive__WEBPACK_IMPORTED_MODULE_104__.ResponsiveBreakpoints),
/* harmony export */   "RoundedRectangle": () => (/* reexport safe */ _internal_core_elements_RoundedRectangle__WEBPACK_IMPORTED_MODULE_35__.RoundedRectangle),
/* harmony export */   "STRING": () => (/* reexport safe */ _internal_core_utils_Strings__WEBPACK_IMPORTED_MODULE_106__.STRING),
/* harmony export */   "SVGContainer": () => (/* reexport safe */ _internal_core_rendering_SVGContainer__WEBPACK_IMPORTED_MODULE_67__.SVGContainer),
/* harmony export */   "SVGDefaults": () => (/* reexport safe */ _internal_core_defs_SVGDefaults__WEBPACK_IMPORTED_MODULE_15__.SVGDefaults),
/* harmony export */   "Scrollbar": () => (/* reexport safe */ _internal_core_elements_Scrollbar__WEBPACK_IMPORTED_MODULE_36__.Scrollbar),
/* harmony export */   "Slice": () => (/* reexport safe */ _internal_core_elements_Slice__WEBPACK_IMPORTED_MODULE_38__.Slice),
/* harmony export */   "Slice3D": () => (/* reexport safe */ _internal_core_elements_3d_Slice3D__WEBPACK_IMPORTED_MODULE_50__.Slice3D),
/* harmony export */   "Slider": () => (/* reexport safe */ _internal_core_elements_Slider__WEBPACK_IMPORTED_MODULE_37__.Slider),
/* harmony export */   "SortedList": () => (/* reexport safe */ _internal_core_utils_SortedList__WEBPACK_IMPORTED_MODULE_105__.SortedList),
/* harmony export */   "SortedListTemplate": () => (/* reexport safe */ _internal_core_utils_SortedList__WEBPACK_IMPORTED_MODULE_105__.SortedListTemplate),
/* harmony export */   "Sprite": () => (/* reexport safe */ _internal_core_Sprite__WEBPACK_IMPORTED_MODULE_5__.Sprite),
/* harmony export */   "SpriteEventDispatcher": () => (/* reexport safe */ _internal_core_SpriteEvents__WEBPACK_IMPORTED_MODULE_6__.SpriteEventDispatcher),
/* harmony export */   "SpriteState": () => (/* reexport safe */ _internal_core_SpriteState__WEBPACK_IMPORTED_MODULE_7__.SpriteState),
/* harmony export */   "StyleClass": () => (/* reexport safe */ _internal_core_utils_DOM__WEBPACK_IMPORTED_MODULE_94__.StyleClass),
/* harmony export */   "StyleRule": () => (/* reexport safe */ _internal_core_utils_DOM__WEBPACK_IMPORTED_MODULE_94__.StyleRule),
/* harmony export */   "SwitchButton": () => (/* reexport safe */ _internal_core_elements_SwitchButton__WEBPACK_IMPORTED_MODULE_34__.SwitchButton),
/* harmony export */   "System": () => (/* reexport safe */ _internal_core_System__WEBPACK_IMPORTED_MODULE_0__.System),
/* harmony export */   "TargetedEventDispatcher": () => (/* reexport safe */ _internal_core_utils_EventDispatcher__WEBPACK_IMPORTED_MODULE_95__.TargetedEventDispatcher),
/* harmony export */   "Tension": () => (/* reexport safe */ _internal_core_rendering_Smoothing__WEBPACK_IMPORTED_MODULE_66__.Tension),
/* harmony export */   "TextFormatter": () => (/* reexport safe */ _internal_core_formatters_TextFormatter__WEBPACK_IMPORTED_MODULE_56__.TextFormatter),
/* harmony export */   "TextLink": () => (/* reexport safe */ _internal_core_elements_TextLink__WEBPACK_IMPORTED_MODULE_39__.TextLink),
/* harmony export */   "Tooltip": () => (/* reexport safe */ _internal_core_elements_Tooltip__WEBPACK_IMPORTED_MODULE_40__.Tooltip),
/* harmony export */   "Trapezoid": () => (/* reexport safe */ _internal_core_elements_Trapezoid__WEBPACK_IMPORTED_MODULE_41__.Trapezoid),
/* harmony export */   "Triangle": () => (/* reexport safe */ _internal_core_elements_Triangle__WEBPACK_IMPORTED_MODULE_42__.Triangle),
/* harmony export */   "Validatable": () => (/* reexport safe */ _internal_core_utils_Validatable__WEBPACK_IMPORTED_MODULE_108__.Validatable),
/* harmony export */   "WavedCircle": () => (/* reexport safe */ _internal_core_elements_WavedCircle__WEBPACK_IMPORTED_MODULE_43__.WavedCircle),
/* harmony export */   "WavedLine": () => (/* reexport safe */ _internal_core_elements_WavedLine__WEBPACK_IMPORTED_MODULE_44__.WavedLine),
/* harmony export */   "WavedRectangle": () => (/* reexport safe */ _internal_core_elements_WavedRectangle__WEBPACK_IMPORTED_MODULE_45__.WavedRectangle),
/* harmony export */   "ZoomOutButton": () => (/* reexport safe */ _internal_core_elements_ZoomOutButton__WEBPACK_IMPORTED_MODULE_46__.ZoomOutButton),
/* harmony export */   "addClass": () => (/* reexport safe */ _internal_core_utils_DOM__WEBPACK_IMPORTED_MODULE_94__.addClass),
/* harmony export */   "addLicense": () => (/* reexport safe */ _internal_core_utils_Instance__WEBPACK_IMPORTED_MODULE_120__.addLicense),
/* harmony export */   "animate": () => (/* reexport safe */ _internal_core_utils_Animation__WEBPACK_IMPORTED_MODULE_85__.animate),
/* harmony export */   "array": () => (/* reexport module object */ _internal_core_utils_Array__WEBPACK_IMPORTED_MODULE_113__),
/* harmony export */   "blur": () => (/* reexport safe */ _internal_core_utils_DOM__WEBPACK_IMPORTED_MODULE_94__.blur),
/* harmony export */   "cache": () => (/* reexport safe */ _internal_core_utils_Cache__WEBPACK_IMPORTED_MODULE_87__.cache),
/* harmony export */   "castColor": () => (/* reexport safe */ _internal_core_utils_Color__WEBPACK_IMPORTED_MODULE_88__.castColor),
/* harmony export */   "castNumber": () => (/* reexport safe */ _internal_core_utils_Type__WEBPACK_IMPORTED_MODULE_107__.castNumber),
/* harmony export */   "castString": () => (/* reexport safe */ _internal_core_utils_Type__WEBPACK_IMPORTED_MODULE_107__.castString),
/* harmony export */   "checkBoolean": () => (/* reexport safe */ _internal_core_utils_Type__WEBPACK_IMPORTED_MODULE_107__.checkBoolean),
/* harmony export */   "checkNumber": () => (/* reexport safe */ _internal_core_utils_Type__WEBPACK_IMPORTED_MODULE_107__.checkNumber),
/* harmony export */   "checkObject": () => (/* reexport safe */ _internal_core_utils_Type__WEBPACK_IMPORTED_MODULE_107__.checkObject),
/* harmony export */   "checkString": () => (/* reexport safe */ _internal_core_utils_Type__WEBPACK_IMPORTED_MODULE_107__.checkString),
/* harmony export */   "color": () => (/* reexport safe */ _internal_core_utils_Color__WEBPACK_IMPORTED_MODULE_88__.color),
/* harmony export */   "colors": () => (/* reexport module object */ _internal_core_utils_Colors__WEBPACK_IMPORTED_MODULE_110__),
/* harmony export */   "copyAttributes": () => (/* reexport safe */ _internal_core_utils_DOM__WEBPACK_IMPORTED_MODULE_94__.copyAttributes),
/* harmony export */   "create": () => (/* reexport safe */ _internal_core_utils_Instance__WEBPACK_IMPORTED_MODULE_120__.create),
/* harmony export */   "createDeferred": () => (/* reexport safe */ _internal_core_utils_Instance__WEBPACK_IMPORTED_MODULE_120__.createDeferred),
/* harmony export */   "createFromConfig": () => (/* reexport safe */ _internal_core_utils_Instance__WEBPACK_IMPORTED_MODULE_120__.createFromConfig),
/* harmony export */   "dataLoader": () => (/* reexport safe */ _internal_core_data_DataLoader__WEBPACK_IMPORTED_MODULE_11__.dataLoader),
/* harmony export */   "defaultRules": () => (/* reexport safe */ _internal_core_utils_Responsive__WEBPACK_IMPORTED_MODULE_104__.defaultRules),
/* harmony export */   "disposeAllCharts": () => (/* reexport safe */ _internal_core_utils_Instance__WEBPACK_IMPORTED_MODULE_120__.disposeAllCharts),
/* harmony export */   "ease": () => (/* reexport module object */ _internal_core_utils_Ease__WEBPACK_IMPORTED_MODULE_111__),
/* harmony export */   "fixPixelPerfect": () => (/* reexport safe */ _internal_core_utils_DOM__WEBPACK_IMPORTED_MODULE_94__.fixPixelPerfect),
/* harmony export */   "focus": () => (/* reexport safe */ _internal_core_utils_DOM__WEBPACK_IMPORTED_MODULE_94__.focus),
/* harmony export */   "getElement": () => (/* reexport safe */ _internal_core_utils_DOM__WEBPACK_IMPORTED_MODULE_94__.getElement),
/* harmony export */   "getInteraction": () => (/* reexport safe */ _internal_core_interaction_Interaction__WEBPACK_IMPORTED_MODULE_58__.getInteraction),
/* harmony export */   "getTextFormatter": () => (/* reexport safe */ _internal_core_formatters_TextFormatter__WEBPACK_IMPORTED_MODULE_56__.getTextFormatter),
/* harmony export */   "globalAdapter": () => (/* reexport safe */ _internal_core_utils_Adapter__WEBPACK_IMPORTED_MODULE_84__.globalAdapter),
/* harmony export */   "is": () => (/* reexport safe */ _internal_core_Registry__WEBPACK_IMPORTED_MODULE_8__.is),
/* harmony export */   "isArray": () => (/* reexport safe */ _internal_core_utils_Type__WEBPACK_IMPORTED_MODULE_107__.isArray),
/* harmony export */   "isColor": () => (/* reexport safe */ _internal_core_utils_Color__WEBPACK_IMPORTED_MODULE_88__.isColor),
/* harmony export */   "isElement": () => (/* reexport safe */ _internal_core_utils_DOM__WEBPACK_IMPORTED_MODULE_94__.isElement),
/* harmony export */   "isNaN": () => (/* reexport safe */ _internal_core_utils_Type__WEBPACK_IMPORTED_MODULE_107__.isNaN),
/* harmony export */   "isNumber": () => (/* reexport safe */ _internal_core_utils_Type__WEBPACK_IMPORTED_MODULE_107__.isNumber),
/* harmony export */   "isObject": () => (/* reexport safe */ _internal_core_utils_Type__WEBPACK_IMPORTED_MODULE_107__.isObject),
/* harmony export */   "isPercent": () => (/* reexport safe */ _internal_core_utils_Percent__WEBPACK_IMPORTED_MODULE_102__.isPercent),
/* harmony export */   "isString": () => (/* reexport safe */ _internal_core_utils_Type__WEBPACK_IMPORTED_MODULE_107__.isString),
/* harmony export */   "iter": () => (/* reexport module object */ _internal_core_utils_Iterator__WEBPACK_IMPORTED_MODULE_96__),
/* harmony export */   "join": () => (/* reexport safe */ _internal_core_utils_Iterator__WEBPACK_IMPORTED_MODULE_96__.join),
/* harmony export */   "keyboard": () => (/* reexport safe */ _internal_core_utils_Keyboard__WEBPACK_IMPORTED_MODULE_97__.keyboard),
/* harmony export */   "math": () => (/* reexport module object */ _internal_core_utils_Math__WEBPACK_IMPORTED_MODULE_112__),
/* harmony export */   "max": () => (/* reexport safe */ _internal_core_utils_Iterator__WEBPACK_IMPORTED_MODULE_96__.max),
/* harmony export */   "min": () => (/* reexport safe */ _internal_core_utils_Iterator__WEBPACK_IMPORTED_MODULE_96__.min),
/* harmony export */   "net": () => (/* reexport module object */ _internal_core_utils_Net__WEBPACK_IMPORTED_MODULE_119__),
/* harmony export */   "nextFrame": () => (/* reexport safe */ _internal_core_utils_AsyncPending__WEBPACK_IMPORTED_MODULE_86__.nextFrame),
/* harmony export */   "number": () => (/* reexport module object */ _internal_core_utils_Number__WEBPACK_IMPORTED_MODULE_114__),
/* harmony export */   "object": () => (/* reexport module object */ _internal_core_utils_Object__WEBPACK_IMPORTED_MODULE_115__),
/* harmony export */   "options": () => (/* reexport safe */ _internal_core_Options__WEBPACK_IMPORTED_MODULE_9__.options),
/* harmony export */   "or": () => (/* reexport safe */ _internal_core_utils_Order__WEBPACK_IMPORTED_MODULE_101__.or),
/* harmony export */   "outerHTML": () => (/* reexport safe */ _internal_core_utils_DOM__WEBPACK_IMPORTED_MODULE_94__.outerHTML),
/* harmony export */   "path": () => (/* reexport module object */ _internal_core_rendering_Path__WEBPACK_IMPORTED_MODULE_109__),
/* harmony export */   "percent": () => (/* reexport safe */ _internal_core_utils_Percent__WEBPACK_IMPORTED_MODULE_102__.percent),
/* harmony export */   "readFrame": () => (/* reexport safe */ _internal_core_utils_AsyncPending__WEBPACK_IMPORTED_MODULE_86__.readFrame),
/* harmony export */   "ready": () => (/* reexport safe */ _internal_core_utils_DOM__WEBPACK_IMPORTED_MODULE_94__.ready),
/* harmony export */   "registry": () => (/* reexport safe */ _internal_core_Registry__WEBPACK_IMPORTED_MODULE_8__.registry),
/* harmony export */   "removeClass": () => (/* reexport safe */ _internal_core_utils_DOM__WEBPACK_IMPORTED_MODULE_94__.removeClass),
/* harmony export */   "reverse": () => (/* reexport safe */ _internal_core_utils_Order__WEBPACK_IMPORTED_MODULE_101__.reverse),
/* harmony export */   "string": () => (/* reexport module object */ _internal_core_utils_String__WEBPACK_IMPORTED_MODULE_116__),
/* harmony export */   "system": () => (/* reexport safe */ _internal_core_System__WEBPACK_IMPORTED_MODULE_0__.system),
/* harmony export */   "time": () => (/* reexport module object */ _internal_core_utils_Time__WEBPACK_IMPORTED_MODULE_117__),
/* harmony export */   "triggerIdle": () => (/* reexport safe */ _internal_core_utils_AsyncPending__WEBPACK_IMPORTED_MODULE_86__.triggerIdle),
/* harmony export */   "type": () => (/* reexport module object */ _internal_core_utils_Type__WEBPACK_IMPORTED_MODULE_107__),
/* harmony export */   "unuseAllThemes": () => (/* reexport safe */ _internal_core_utils_Instance__WEBPACK_IMPORTED_MODULE_120__.unuseAllThemes),
/* harmony export */   "unuseTheme": () => (/* reexport safe */ _internal_core_utils_Instance__WEBPACK_IMPORTED_MODULE_120__.unuseTheme),
/* harmony export */   "useTheme": () => (/* reexport safe */ _internal_core_utils_Instance__WEBPACK_IMPORTED_MODULE_120__.useTheme),
/* harmony export */   "utils": () => (/* reexport module object */ _internal_core_utils_Utils__WEBPACK_IMPORTED_MODULE_118__),
/* harmony export */   "viewPortHandler": () => (/* reexport safe */ _internal_core_utils_Instance__WEBPACK_IMPORTED_MODULE_120__.viewPortHandler),
/* harmony export */   "whenIdle": () => (/* reexport safe */ _internal_core_utils_AsyncPending__WEBPACK_IMPORTED_MODULE_86__.whenIdle),
/* harmony export */   "writeFrame": () => (/* reexport safe */ _internal_core_utils_AsyncPending__WEBPACK_IMPORTED_MODULE_86__.writeFrame)
/* harmony export */ });
/* harmony import */ var _internal_core_System__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./.internal/core/System */ "./node_modules/@amcharts/amcharts4/.internal/core/System.js");
/* harmony import */ var _internal_core_Base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./.internal/core/Base */ "./node_modules/@amcharts/amcharts4/.internal/core/Base.js");
/* harmony import */ var _internal_core_Component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./.internal/core/Component */ "./node_modules/@amcharts/amcharts4/.internal/core/Component.js");
/* harmony import */ var _internal_core_Container__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./.internal/core/Container */ "./node_modules/@amcharts/amcharts4/.internal/core/Container.js");
/* harmony import */ var _internal_core_DataItem__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./.internal/core/DataItem */ "./node_modules/@amcharts/amcharts4/.internal/core/DataItem.js");
/* harmony import */ var _internal_core_Sprite__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./.internal/core/Sprite */ "./node_modules/@amcharts/amcharts4/.internal/core/Sprite.js");
/* harmony import */ var _internal_core_SpriteEvents__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./.internal/core/SpriteEvents */ "./node_modules/@amcharts/amcharts4/.internal/core/SpriteEvents.js");
/* harmony import */ var _internal_core_SpriteState__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./.internal/core/SpriteState */ "./node_modules/@amcharts/amcharts4/.internal/core/SpriteState.js");
/* harmony import */ var _internal_core_Registry__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./.internal/core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
/* harmony import */ var _internal_core_Options__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./.internal/core/Options */ "./node_modules/@amcharts/amcharts4/.internal/core/Options.js");
/* harmony import */ var _internal_core_data_CSVParser__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./.internal/core/data/CSVParser */ "./node_modules/@amcharts/amcharts4/.internal/core/data/CSVParser.js");
/* harmony import */ var _internal_core_data_DataLoader__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./.internal/core/data/DataLoader */ "./node_modules/@amcharts/amcharts4/.internal/core/data/DataLoader.js");
/* harmony import */ var _internal_core_data_DataParser__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./.internal/core/data/DataParser */ "./node_modules/@amcharts/amcharts4/.internal/core/data/DataParser.js");
/* harmony import */ var _internal_core_data_DataSource__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./.internal/core/data/DataSource */ "./node_modules/@amcharts/amcharts4/.internal/core/data/DataSource.js");
/* harmony import */ var _internal_core_data_JSONParser__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./.internal/core/data/JSONParser */ "./node_modules/@amcharts/amcharts4/.internal/core/data/JSONParser.js");
/* harmony import */ var _internal_core_defs_SVGDefaults__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./.internal/core/defs/SVGDefaults */ "./node_modules/@amcharts/amcharts4/.internal/core/defs/SVGDefaults.js");
/* harmony import */ var _internal_core_elements_Button__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./.internal/core/elements/Button */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Button.js");
/* harmony import */ var _internal_core_elements_Circle__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./.internal/core/elements/Circle */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Circle.js");
/* harmony import */ var _internal_core_elements_Ellipse__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./.internal/core/elements/Ellipse */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Ellipse.js");
/* harmony import */ var _internal_core_elements_Image__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./.internal/core/elements/Image */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Image.js");
/* harmony import */ var _internal_core_elements_Label__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./.internal/core/elements/Label */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Label.js");
/* harmony import */ var _internal_core_elements_Line__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./.internal/core/elements/Line */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Line.js");
/* harmony import */ var _internal_core_elements_Popup__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./.internal/core/elements/Popup */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Popup.js");
/* harmony import */ var _internal_core_elements_Modal__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./.internal/core/elements/Modal */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Modal.js");
/* harmony import */ var _internal_core_elements_PointedRectangle__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./.internal/core/elements/PointedRectangle */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/PointedRectangle.js");
/* harmony import */ var _internal_core_elements_PointedShape__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./.internal/core/elements/PointedShape */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/PointedShape.js");
/* harmony import */ var _internal_core_elements_Polyarc__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./.internal/core/elements/Polyarc */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Polyarc.js");
/* harmony import */ var _internal_core_elements_Polygon__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./.internal/core/elements/Polygon */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Polygon.js");
/* harmony import */ var _internal_core_elements_Polyline__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./.internal/core/elements/Polyline */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Polyline.js");
/* harmony import */ var _internal_core_elements_Polyspline__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./.internal/core/elements/Polyspline */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Polyspline.js");
/* harmony import */ var _internal_core_elements_Preloader__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./.internal/core/elements/Preloader */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Preloader.js");
/* harmony import */ var _internal_core_elements_Rectangle__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./.internal/core/elements/Rectangle */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Rectangle.js");
/* harmony import */ var _internal_core_elements_ResizeButton__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./.internal/core/elements/ResizeButton */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/ResizeButton.js");
/* harmony import */ var _internal_core_elements_CloseButton__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./.internal/core/elements/CloseButton */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/CloseButton.js");
/* harmony import */ var _internal_core_elements_SwitchButton__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./.internal/core/elements/SwitchButton */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/SwitchButton.js");
/* harmony import */ var _internal_core_elements_RoundedRectangle__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./.internal/core/elements/RoundedRectangle */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/RoundedRectangle.js");
/* harmony import */ var _internal_core_elements_Scrollbar__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./.internal/core/elements/Scrollbar */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Scrollbar.js");
/* harmony import */ var _internal_core_elements_Slider__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./.internal/core/elements/Slider */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Slider.js");
/* harmony import */ var _internal_core_elements_Slice__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./.internal/core/elements/Slice */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Slice.js");
/* harmony import */ var _internal_core_elements_TextLink__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./.internal/core/elements/TextLink */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/TextLink.js");
/* harmony import */ var _internal_core_elements_Tooltip__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./.internal/core/elements/Tooltip */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Tooltip.js");
/* harmony import */ var _internal_core_elements_Trapezoid__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./.internal/core/elements/Trapezoid */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Trapezoid.js");
/* harmony import */ var _internal_core_elements_Triangle__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./.internal/core/elements/Triangle */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Triangle.js");
/* harmony import */ var _internal_core_elements_WavedCircle__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ./.internal/core/elements/WavedCircle */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/WavedCircle.js");
/* harmony import */ var _internal_core_elements_WavedLine__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ./.internal/core/elements/WavedLine */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/WavedLine.js");
/* harmony import */ var _internal_core_elements_WavedRectangle__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ./.internal/core/elements/WavedRectangle */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/WavedRectangle.js");
/* harmony import */ var _internal_core_elements_ZoomOutButton__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ./.internal/core/elements/ZoomOutButton */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/ZoomOutButton.js");
/* harmony import */ var _internal_core_elements_PlayButton__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ./.internal/core/elements/PlayButton */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/PlayButton.js");
/* harmony import */ var _internal_core_elements_3d_Cone__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ./.internal/core/elements/3d/Cone */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/3d/Cone.js");
/* harmony import */ var _internal_core_elements_3d_Rectangle3D__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! ./.internal/core/elements/3d/Rectangle3D */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/3d/Rectangle3D.js");
/* harmony import */ var _internal_core_elements_3d_Slice3D__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! ./.internal/core/elements/3d/Slice3D */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/3d/Slice3D.js");
/* harmony import */ var _internal_core_export_Export__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! ./.internal/core/export/Export */ "./node_modules/@amcharts/amcharts4/.internal/core/export/Export.js");
/* harmony import */ var _internal_core_export_ExportMenu__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(/*! ./.internal/core/export/ExportMenu */ "./node_modules/@amcharts/amcharts4/.internal/core/export/ExportMenu.js");
/* harmony import */ var _internal_core_formatters_DateFormatter__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(/*! ./.internal/core/formatters/DateFormatter */ "./node_modules/@amcharts/amcharts4/.internal/core/formatters/DateFormatter.js");
/* harmony import */ var _internal_core_formatters_DurationFormatter__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(/*! ./.internal/core/formatters/DurationFormatter */ "./node_modules/@amcharts/amcharts4/.internal/core/formatters/DurationFormatter.js");
/* harmony import */ var _internal_core_formatters_NumberFormatter__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(/*! ./.internal/core/formatters/NumberFormatter */ "./node_modules/@amcharts/amcharts4/.internal/core/formatters/NumberFormatter.js");
/* harmony import */ var _internal_core_formatters_TextFormatter__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(/*! ./.internal/core/formatters/TextFormatter */ "./node_modules/@amcharts/amcharts4/.internal/core/formatters/TextFormatter.js");
/* harmony import */ var _internal_core_interaction_Inertia__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(/*! ./.internal/core/interaction/Inertia */ "./node_modules/@amcharts/amcharts4/.internal/core/interaction/Inertia.js");
/* harmony import */ var _internal_core_interaction_Interaction__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(/*! ./.internal/core/interaction/Interaction */ "./node_modules/@amcharts/amcharts4/.internal/core/interaction/Interaction.js");
/* harmony import */ var _internal_core_interaction_InteractionKeyboardObject__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(/*! ./.internal/core/interaction/InteractionKeyboardObject */ "./node_modules/@amcharts/amcharts4/.internal/core/interaction/InteractionKeyboardObject.js");
/* harmony import */ var _internal_core_interaction_InteractionObject__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(/*! ./.internal/core/interaction/InteractionObject */ "./node_modules/@amcharts/amcharts4/.internal/core/interaction/InteractionObject.js");
/* harmony import */ var _internal_core_interaction_InteractionObjectEvents__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(/*! ./.internal/core/interaction/InteractionObjectEvents */ "./node_modules/@amcharts/amcharts4/.internal/core/interaction/InteractionObjectEvents.js");
/* harmony import */ var _internal_core_interaction_Mouse__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(/*! ./.internal/core/interaction/Mouse */ "./node_modules/@amcharts/amcharts4/.internal/core/interaction/Mouse.js");
/* harmony import */ var _internal_core_rendering_AMElement__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(/*! ./.internal/core/rendering/AMElement */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/AMElement.js");
/* harmony import */ var _internal_core_rendering_Group__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(/*! ./.internal/core/rendering/Group */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Group.js");
/* harmony import */ var _internal_core_rendering_Paper__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(/*! ./.internal/core/rendering/Paper */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Paper.js");
/* harmony import */ var _internal_core_rendering_Smoothing__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(/*! ./.internal/core/rendering/Smoothing */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Smoothing.js");
/* harmony import */ var _internal_core_rendering_SVGContainer__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__(/*! ./.internal/core/rendering/SVGContainer */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/SVGContainer.js");
/* harmony import */ var _internal_core_rendering_fills_ColorModifier__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__(/*! ./.internal/core/rendering/fills/ColorModifier */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/ColorModifier.js");
/* harmony import */ var _internal_core_rendering_fills_LinearGradient__WEBPACK_IMPORTED_MODULE_69__ = __webpack_require__(/*! ./.internal/core/rendering/fills/LinearGradient */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/LinearGradient.js");
/* harmony import */ var _internal_core_rendering_fills_LinearGradientModifier__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__(/*! ./.internal/core/rendering/fills/LinearGradientModifier */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/LinearGradientModifier.js");
/* harmony import */ var _internal_core_rendering_fills_RadialGradientModifier__WEBPACK_IMPORTED_MODULE_71__ = __webpack_require__(/*! ./.internal/core/rendering/fills/RadialGradientModifier */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/RadialGradientModifier.js");
/* harmony import */ var _internal_core_rendering_fills_LinePattern__WEBPACK_IMPORTED_MODULE_72__ = __webpack_require__(/*! ./.internal/core/rendering/fills/LinePattern */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/LinePattern.js");
/* harmony import */ var _internal_core_rendering_fills_CirclePattern__WEBPACK_IMPORTED_MODULE_73__ = __webpack_require__(/*! ./.internal/core/rendering/fills/CirclePattern */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/CirclePattern.js");
/* harmony import */ var _internal_core_rendering_fills_Pattern__WEBPACK_IMPORTED_MODULE_74__ = __webpack_require__(/*! ./.internal/core/rendering/fills/Pattern */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/Pattern.js");
/* harmony import */ var _internal_core_rendering_fills_RadialGradient__WEBPACK_IMPORTED_MODULE_75__ = __webpack_require__(/*! ./.internal/core/rendering/fills/RadialGradient */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/RadialGradient.js");
/* harmony import */ var _internal_core_rendering_fills_RectPattern__WEBPACK_IMPORTED_MODULE_76__ = __webpack_require__(/*! ./.internal/core/rendering/fills/RectPattern */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/RectPattern.js");
/* harmony import */ var _internal_core_rendering_filters_ColorizeFilter__WEBPACK_IMPORTED_MODULE_77__ = __webpack_require__(/*! ./.internal/core/rendering/filters/ColorizeFilter */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/filters/ColorizeFilter.js");
/* harmony import */ var _internal_core_rendering_filters_DesaturateFilter__WEBPACK_IMPORTED_MODULE_78__ = __webpack_require__(/*! ./.internal/core/rendering/filters/DesaturateFilter */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/filters/DesaturateFilter.js");
/* harmony import */ var _internal_core_rendering_filters_DropShadowFilter__WEBPACK_IMPORTED_MODULE_79__ = __webpack_require__(/*! ./.internal/core/rendering/filters/DropShadowFilter */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/filters/DropShadowFilter.js");
/* harmony import */ var _internal_core_rendering_filters_BlurFilter__WEBPACK_IMPORTED_MODULE_80__ = __webpack_require__(/*! ./.internal/core/rendering/filters/BlurFilter */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/filters/BlurFilter.js");
/* harmony import */ var _internal_core_rendering_filters_Filter__WEBPACK_IMPORTED_MODULE_81__ = __webpack_require__(/*! ./.internal/core/rendering/filters/Filter */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/filters/Filter.js");
/* harmony import */ var _internal_core_rendering_filters_FocusFilter__WEBPACK_IMPORTED_MODULE_82__ = __webpack_require__(/*! ./.internal/core/rendering/filters/FocusFilter */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/filters/FocusFilter.js");
/* harmony import */ var _internal_core_rendering_filters_LightenFilter__WEBPACK_IMPORTED_MODULE_83__ = __webpack_require__(/*! ./.internal/core/rendering/filters/LightenFilter */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/filters/LightenFilter.js");
/* harmony import */ var _internal_core_utils_Adapter__WEBPACK_IMPORTED_MODULE_84__ = __webpack_require__(/*! ./.internal/core/utils/Adapter */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Adapter.js");
/* harmony import */ var _internal_core_utils_Animation__WEBPACK_IMPORTED_MODULE_85__ = __webpack_require__(/*! ./.internal/core/utils/Animation */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Animation.js");
/* harmony import */ var _internal_core_utils_AsyncPending__WEBPACK_IMPORTED_MODULE_86__ = __webpack_require__(/*! ./.internal/core/utils/AsyncPending */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/AsyncPending.js");
/* harmony import */ var _internal_core_utils_Cache__WEBPACK_IMPORTED_MODULE_87__ = __webpack_require__(/*! ./.internal/core/utils/Cache */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Cache.js");
/* harmony import */ var _internal_core_utils_Color__WEBPACK_IMPORTED_MODULE_88__ = __webpack_require__(/*! ./.internal/core/utils/Color */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Color.js");
/* harmony import */ var _internal_core_utils_ColorSet__WEBPACK_IMPORTED_MODULE_89__ = __webpack_require__(/*! ./.internal/core/utils/ColorSet */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/ColorSet.js");
/* harmony import */ var _internal_core_utils_PatternSet__WEBPACK_IMPORTED_MODULE_90__ = __webpack_require__(/*! ./.internal/core/utils/PatternSet */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/PatternSet.js");
/* harmony import */ var _internal_core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_91__ = __webpack_require__(/*! ./.internal/core/utils/InterfaceColorSet */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/InterfaceColorSet.js");
/* harmony import */ var _internal_core_utils_Dictionary__WEBPACK_IMPORTED_MODULE_92__ = __webpack_require__(/*! ./.internal/core/utils/Dictionary */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Dictionary.js");
/* harmony import */ var _internal_core_utils_Disposer__WEBPACK_IMPORTED_MODULE_93__ = __webpack_require__(/*! ./.internal/core/utils/Disposer */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Disposer.js");
/* harmony import */ var _internal_core_utils_DOM__WEBPACK_IMPORTED_MODULE_94__ = __webpack_require__(/*! ./.internal/core/utils/DOM */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/DOM.js");
/* harmony import */ var _internal_core_utils_EventDispatcher__WEBPACK_IMPORTED_MODULE_95__ = __webpack_require__(/*! ./.internal/core/utils/EventDispatcher */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/EventDispatcher.js");
/* harmony import */ var _internal_core_utils_Iterator__WEBPACK_IMPORTED_MODULE_96__ = __webpack_require__(/*! ./.internal/core/utils/Iterator */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Iterator.js");
/* harmony import */ var _internal_core_utils_Keyboard__WEBPACK_IMPORTED_MODULE_97__ = __webpack_require__(/*! ./.internal/core/utils/Keyboard */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Keyboard.js");
/* harmony import */ var _internal_core_utils_Language__WEBPACK_IMPORTED_MODULE_98__ = __webpack_require__(/*! ./.internal/core/utils/Language */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Language.js");
/* harmony import */ var _internal_core_utils_List__WEBPACK_IMPORTED_MODULE_99__ = __webpack_require__(/*! ./.internal/core/utils/List */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/List.js");
/* harmony import */ var _internal_core_utils_Morpher__WEBPACK_IMPORTED_MODULE_100__ = __webpack_require__(/*! ./.internal/core/utils/Morpher */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Morpher.js");
/* harmony import */ var _internal_core_utils_Order__WEBPACK_IMPORTED_MODULE_101__ = __webpack_require__(/*! ./.internal/core/utils/Order */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Order.js");
/* harmony import */ var _internal_core_utils_Percent__WEBPACK_IMPORTED_MODULE_102__ = __webpack_require__(/*! ./.internal/core/utils/Percent */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Percent.js");
/* harmony import */ var _internal_core_utils_Plugin__WEBPACK_IMPORTED_MODULE_103__ = __webpack_require__(/*! ./.internal/core/utils/Plugin */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Plugin.js");
/* harmony import */ var _internal_core_utils_Responsive__WEBPACK_IMPORTED_MODULE_104__ = __webpack_require__(/*! ./.internal/core/utils/Responsive */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Responsive.js");
/* harmony import */ var _internal_core_utils_SortedList__WEBPACK_IMPORTED_MODULE_105__ = __webpack_require__(/*! ./.internal/core/utils/SortedList */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/SortedList.js");
/* harmony import */ var _internal_core_utils_Strings__WEBPACK_IMPORTED_MODULE_106__ = __webpack_require__(/*! ./.internal/core/utils/Strings */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Strings.js");
/* harmony import */ var _internal_core_utils_Type__WEBPACK_IMPORTED_MODULE_107__ = __webpack_require__(/*! ./.internal/core/utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
/* harmony import */ var _internal_core_utils_Validatable__WEBPACK_IMPORTED_MODULE_108__ = __webpack_require__(/*! ./.internal/core/utils/Validatable */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Validatable.js");
/* harmony import */ var _internal_core_rendering_Path__WEBPACK_IMPORTED_MODULE_109__ = __webpack_require__(/*! ./.internal/core/rendering/Path */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Path.js");
/* harmony import */ var _internal_core_utils_Colors__WEBPACK_IMPORTED_MODULE_110__ = __webpack_require__(/*! ./.internal/core/utils/Colors */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Colors.js");
/* harmony import */ var _internal_core_utils_Ease__WEBPACK_IMPORTED_MODULE_111__ = __webpack_require__(/*! ./.internal/core/utils/Ease */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Ease.js");
/* harmony import */ var _internal_core_utils_Math__WEBPACK_IMPORTED_MODULE_112__ = __webpack_require__(/*! ./.internal/core/utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
/* harmony import */ var _internal_core_utils_Array__WEBPACK_IMPORTED_MODULE_113__ = __webpack_require__(/*! ./.internal/core/utils/Array */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Array.js");
/* harmony import */ var _internal_core_utils_Number__WEBPACK_IMPORTED_MODULE_114__ = __webpack_require__(/*! ./.internal/core/utils/Number */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Number.js");
/* harmony import */ var _internal_core_utils_Object__WEBPACK_IMPORTED_MODULE_115__ = __webpack_require__(/*! ./.internal/core/utils/Object */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Object.js");
/* harmony import */ var _internal_core_utils_String__WEBPACK_IMPORTED_MODULE_116__ = __webpack_require__(/*! ./.internal/core/utils/String */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/String.js");
/* harmony import */ var _internal_core_utils_Time__WEBPACK_IMPORTED_MODULE_117__ = __webpack_require__(/*! ./.internal/core/utils/Time */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Time.js");
/* harmony import */ var _internal_core_utils_Utils__WEBPACK_IMPORTED_MODULE_118__ = __webpack_require__(/*! ./.internal/core/utils/Utils */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Utils.js");
/* harmony import */ var _internal_core_utils_Net__WEBPACK_IMPORTED_MODULE_119__ = __webpack_require__(/*! ./.internal/core/utils/Net */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Net.js");
/* harmony import */ var _internal_core_utils_Instance__WEBPACK_IMPORTED_MODULE_120__ = __webpack_require__(/*! ./.internal/core/utils/Instance */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Instance.js");
/**
 * This module houses all core/framework functionality and is required for
 * all charting components to work
 */

/**
 * Elements: core
 */










/**
 * Elements: data
 */







/**
 * Elements: elements
 */

































/**
 * Elements: 3d
 */




/**
 * Elements: export
 */



/**
 * Elements: formatters
 */





/**
 * Elements: interaction
 */







/**
 * Elements: rendering
 */






/**
 * Elements: fills
 */










/**
 * Elements: filters
 */








/**
 * Elements: utils
 */


























/**
 * Functions: rendering
 */



/**
 * Functions: utils
 */




























/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/lang/en.js":
/*!*****************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/lang/en.js ***!
  \*****************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/**
 * amCharts 4 locale
 *
 * Locale: en
 * Language: International English
 * Author: Martynas Majeris
 *
 * Follow instructions in [on this page](https://www.amcharts.com/docs/v4/tutorials/creating-translations/) to make corrections or add new translations.
 *
 * ---
 * Edit but leave the header section above this line. You can remove any
 * subsequent comment sections.
 * ---
 *
 * Use this file as a template to create translations. Leave the key part in
 * English intact. Fill the value with a translation.
 *
 * Empty string means no translation, so default "International English"
 * will be used.
 *
 * If you need the translation to literally be an empty string, use `null`
 * instead.
 *
 * IMPORTANT:
 * When translating make good effort to keep the translation length
 * at least the same chartcount as the English, especially for short prompts.
 *
 * Having significantly longer prompts may distort the actual charts.
 *
 * NOTE:
 * Some prompts - like months or weekdays - come in two versions: full and
 * shortened.
 *
 * If there's no official shortened version of these in your language, and it
 * would not be possible to invent such short versions that don't seem weird
 * to native speakers of that language, fill those with the same as full
 * version.
 *
 * PLACEHOLDERS:
 * Some prompts have placeholders like "%1". Those will be replaced by actual
 * values during translation and should be retained in the translated prompts.
 *
 * Placeholder positions may be changed to better suit structure of the
 * sentence.
 *
 * For example "From %1 to %2", when actually used will replace "%1" with an
 * actual value representing range start, and "%2" will be replaced by end
 * value.
 *
 * E.g. in a Scrollbar for Value axis "From %1 to %2" will become
 * "From 100 to 200". You may translate "From" and "to", as well as re-arrange
 * the order of the prompt itself, but make sure the "%1" and "%2" remain, in
 * places where they will make sense.
 *
 * Save the file as language_LOCALE, i.e. `en_GB.ts`, `fr_FR.ts`, etc.
 */
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
  // Number formatting options.
  // 
  // Please check with the local standards which separator is accepted to be
  // used for separating decimals, and which for thousands.
  "_decimalSeparator": ".",
  "_thousandSeparator": ",",
  // Position of the percent sign in numbers
  "_percentPrefix": null,
  "_percentSuffix": "%",
  // Suffixes for numbers
  // When formatting numbers, big or small numers might be reformatted to
  // shorter version, by applying a suffix.
  // 
  // For example, 1000000 might become "1m".
  // Or 1024 might become "1KB" if we're formatting byte numbers.
  // 
  // This section defines such suffixes for all such cases.
  "_big_number_suffix_3": "k",
  "_big_number_suffix_6": "M",
  "_big_number_suffix_9": "G",
  "_big_number_suffix_12": "T",
  "_big_number_suffix_15": "P",
  "_big_number_suffix_18": "E",
  "_big_number_suffix_21": "Z",
  "_big_number_suffix_24": "Y",
  "_small_number_suffix_3": "m",
  "_small_number_suffix_6": "μ",
  "_small_number_suffix_9": "n",
  "_small_number_suffix_12": "p",
  "_small_number_suffix_15": "f",
  "_small_number_suffix_18": "a",
  "_small_number_suffix_21": "z",
  "_small_number_suffix_24": "y",
  "_byte_suffix_B": "B",
  "_byte_suffix_KB": "KB",
  "_byte_suffix_MB": "MB",
  "_byte_suffix_GB": "GB",
  "_byte_suffix_TB": "TB",
  "_byte_suffix_PB": "PB",
  // Default date formats for various periods.
  // 
  // This should reflect official or de facto formatting universally accepted
  // in the country translation is being made for
  // Available format codes here:
  // https://www.amcharts.com/docs/v4/concepts/formatters/formatting-date-time/#Format_codes
  // 
  // This will be used when formatting date/time for particular granularity,
  // e.g. "_date_hour" will be shown whenever we need to show time as hours.
  // 
  // "date" is used as in default date format when showing standalone dates.
  "_date": "yyyy-MM-dd",
  "_date_millisecond": "mm:ss SSS",
  "_date_second": "HH:mm:ss",
  "_date_minute": "HH:mm",
  "_date_hour": "HH:mm",
  "_date_day": "MMM dd",
  "_date_week": "ww",
  "_date_month": "MMM",
  "_date_year": "yyyy",
  // Default duration formats for various base units.
  // 
  // This will be used by DurationFormatter to format numeric values into
  // duration.
  // 
  // Notice how each duration unit comes in several versions. This is to ensure
  // that each base unit is shown correctly.
  // 
  // For example, if we have baseUnit set to "second", meaning our duration is
  // in seconds.
  // 
  // If we pass in `50` to formatter, it will know that we have just 50 seconds
  // (less than a minute) so it will use format in `"_duration_second"` ("ss"),
  // and the formatted result will be in like `"50"`.
  // 
  // If we pass in `70`, which is more than a minute, the formatter will switch
  // to `"_duration_second_minute"` ("mm:ss"), resulting in "01:10" formatted
  // text.
  // 
  // Available codes here:
  // https://www.amcharts.com/docs/v4/concepts/formatters/formatting-duration/#Available_Codes
  "_duration_millisecond": "SSS",
  "_duration_millisecond_second": "ss.SSS",
  "_duration_millisecond_minute": "mm:ss SSS",
  "_duration_millisecond_hour": "hh:mm:ss SSS",
  "_duration_millisecond_day": "d'd' mm:ss SSS",
  "_duration_millisecond_week": "d'd' mm:ss SSS",
  "_duration_millisecond_month": "M'm' dd'd' mm:ss SSS",
  "_duration_millisecond_year": "y'y' MM'm' dd'd' mm:ss SSS",
  "_duration_second": "ss",
  "_duration_second_minute": "mm:ss",
  "_duration_second_hour": "hh:mm:ss",
  "_duration_second_day": "d'd' hh:mm:ss",
  "_duration_second_week": "d'd' hh:mm:ss",
  "_duration_second_month": "M'm' dd'd' hh:mm:ss",
  "_duration_second_year": "y'y' MM'm' dd'd' hh:mm:ss",
  "_duration_minute": "mm",
  "_duration_minute_hour": "hh:mm",
  "_duration_minute_day": "d'd' hh:mm",
  "_duration_minute_week": "d'd' hh:mm",
  "_duration_minute_month": "M'm' dd'd' hh:mm",
  "_duration_minute_year": "y'y' MM'm' dd'd' hh:mm",
  "_duration_hour": "hh'h'",
  "_duration_hour_day": "d'd' hh'h'",
  "_duration_hour_week": "d'd' hh'h'",
  "_duration_hour_month": "M'm' dd'd' hh'h'",
  "_duration_hour_year": "y'y' MM'm' dd'd' hh'h'",
  "_duration_day": "d'd'",
  "_duration_day_week": "d'd'",
  "_duration_day_month": "M'm' dd'd'",
  "_duration_day_year": "y'y' MM'm' dd'd'",
  "_duration_week": "w'w'",
  "_duration_week_month": "w'w'",
  "_duration_week_year": "w'w'",
  "_duration_month": "M'm'",
  "_duration_month_year": "y'y' MM'm'",
  "_duration_year": "y'y'",
  // Era translations
  "_era_ad": "AD",
  "_era_bc": "BC",
  // Day part, used in 12-hour formats, e.g. 5 P.M.
  // Please note that these come in 3 variants:
  // * one letter (e.g. "A")
  // * two letters (e.g. "AM")
  // * two letters with dots (e.g. "A.M.")
  // 
  // All three need to to be translated even if they are all the same. Some
  // users might use one, some the other.
  "A": "",
  "P": "",
  "AM": "",
  "PM": "",
  "A.M.": "",
  "P.M.": "",
  // Date-related stuff.
  // 
  // When translating months, if there's a difference, use the form which is
  // best for a full date, e.g. as you would use it in "2018 January 1".
  // 
  // Note that May is listed twice. This is because in English May is the same
  // in both long and short forms, while in other languages it may not be the
  // case. Translate "May" to full word, while "May(short)" to shortened
  // version.
  // 
  // Should month names and weekdays be capitalized or not?
  // 
  // Rule of thumb is this: if the names should always be capitalized,
  // regardless of name position within date ("January", "21st January 2018",
  // etc.) use capitalized names. Otherwise enter all lowercase.
  // 
  // The date formatter will automatically capitalize names if they are the
  // first (or only) word in resulting date.
  "January": "",
  "February": "",
  "March": "",
  "April": "",
  "May": "",
  "June": "",
  "July": "",
  "August": "",
  "September": "",
  "October": "",
  "November": "",
  "December": "",
  "Jan": "",
  "Feb": "",
  "Mar": "",
  "Apr": "",
  "May(short)": "May",
  "Jun": "",
  "Jul": "",
  "Aug": "",
  "Sep": "",
  "Oct": "",
  "Nov": "",
  "Dec": "",
  // Weekdays.
  "Sunday": "",
  "Monday": "",
  "Tuesday": "",
  "Wednesday": "",
  "Thursday": "",
  "Friday": "",
  "Saturday": "",
  "Sun": "",
  "Mon": "",
  "Tue": "",
  "Wed": "",
  "Thu": "",
  "Fri": "",
  "Sat": "",
  // Date ordinal function.
  // 
  // This is used when adding number ordinal when formatting days in dates.
  // 
  // E.g. "January 1st", "February 2nd".
  // 
  // The function accepts day number, and returns a string to be added to the
  // day, like in default English translation, if we pass in 2, we will receive
  // "nd" back.
  "_dateOrd": function _dateOrd(day) {
    var res = "th";

    if (day < 11 || day > 13) {
      switch (day % 10) {
        case 1:
          res = "st";
          break;

        case 2:
          res = "nd";
          break;

        case 3:
          res = "rd";
          break;
      }
    }

    return res;
  },
  // Various chart controls.
  // Shown as a tooltip on zoom out button.
  "Zoom Out": "",
  // Timeline buttons
  "Play": "",
  "Stop": "",
  // Chart's Legend screen reader title.
  "Legend": "",
  // Legend's item screen reader indicator.
  "Click, tap or press ENTER to toggle": "",
  // Shown when the chart is busy loading something.
  "Loading": "",
  // Shown as the first button in the breadcrumb navigation, e.g.:
  // Home > First level > ...
  "Home": "",
  // Chart types.
  // Those are used as default screen reader titles for the main chart element
  // unless developer has set some more descriptive title.
  "Chart": "",
  "Serial chart": "",
  "X/Y chart": "",
  "Pie chart": "",
  "Gauge chart": "",
  "Radar chart": "",
  "Sankey diagram": "",
  "Flow diagram": "",
  "Chord diagram": "",
  "TreeMap chart": "",
  "Force directed tree": "",
  "Sliced chart": "",
  // Series types.
  // Used to name series by type for screen readers if they do not have their
  // name set.
  "Series": "",
  "Candlestick Series": "",
  "OHLC Series": "",
  "Column Series": "",
  "Line Series": "",
  "Pie Slice Series": "",
  "Funnel Series": "",
  "Pyramid Series": "",
  "X/Y Series": "",
  // Map-related stuff.
  "Map": "",
  "Press ENTER to zoom in": "",
  "Press ENTER to zoom out": "",
  "Use arrow keys to zoom in and out": "",
  "Use plus and minus keys on your keyboard to zoom in and out": "",
  // Export-related stuff.
  // These prompts are used in Export menu labels.
  // 
  // "Export" is the top-level menu item.
  // 
  // "Image", "Data", "Print" as second-level indicating type of export
  // operation.
  // 
  // Leave actual format untranslated, unless you absolutely know that they
  // would convey more meaning in some other way.
  "Export": "",
  "Image": "",
  "Data": "",
  "Print": "",
  "Press ENTER or use arrow keys to navigate": "",
  "Click, tap or press ENTER to open": "",
  "Click, tap or press ENTER to print.": "",
  "Click, tap or press ENTER to export as %1.": "",
  'To save the image, right-click this link and choose "Save picture as..."': "",
  'To save the image, right-click thumbnail on the left and choose "Save picture as..."': "",
  "(Press ESC to close this message)": "",
  "Image Export Complete": "",
  "Export operation took longer than expected. Something might have gone wrong.": "",
  "Saved from": "",
  "PNG": "",
  "JPG": "",
  "GIF": "",
  "SVG": "",
  "PDF": "",
  "JSON": "",
  "CSV": "",
  "XLSX": "",
  // Scrollbar-related stuff.
  // 
  // Scrollbar is a control which can zoom and pan the axes on the chart.
  // 
  // Each scrollbar has two grips: left or right (for horizontal scrollbar) or
  // upper and lower (for vertical one).
  // 
  // Prompts change in relation to whether Scrollbar is vertical or horizontal.
  // 
  // The final section is used to indicate the current range of selection.
  "Use TAB to select grip buttons or left and right arrows to change selection": "",
  "Use left and right arrows to move selection": "",
  "Use left and right arrows to move left selection": "",
  "Use left and right arrows to move right selection": "",
  "Use TAB select grip buttons or up and down arrows to change selection": "",
  "Use up and down arrows to move selection": "",
  "Use up and down arrows to move lower selection": "",
  "Use up and down arrows to move upper selection": "",
  "From %1 to %2": "",
  "From %1": "",
  "To %1": "",
  // Data loader-related.
  "No parser available for file: %1": "",
  "Error parsing file: %1": "",
  "Unable to load file: %1": "",
  "Invalid date": "",
  // Common actions
  "Close": "",
  "Minimize": ""
});

/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/themes/animated.js":
/*!*************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/themes/animated.js ***!
  \*************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* reexport safe */ _internal_themes_animated__WEBPACK_IMPORTED_MODULE_0__["default"])
/* harmony export */ });
/* harmony import */ var _internal_themes_animated__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../.internal/themes/animated */ "./node_modules/@amcharts/amcharts4/.internal/themes/animated.js");


/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/themes/dark.js":
/*!*********************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/themes/dark.js ***!
  \*********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* reexport safe */ _internal_themes_dark__WEBPACK_IMPORTED_MODULE_0__["default"])
/* harmony export */ });
/* harmony import */ var _internal_themes_dark__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../.internal/themes/dark */ "./node_modules/@amcharts/amcharts4/.internal/themes/dark.js");


/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/themes/dataviz.js":
/*!************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/themes/dataviz.js ***!
  \************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* reexport safe */ _internal_themes_dataviz__WEBPACK_IMPORTED_MODULE_0__["default"])
/* harmony export */ });
/* harmony import */ var _internal_themes_dataviz__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../.internal/themes/dataviz */ "./node_modules/@amcharts/amcharts4/.internal/themes/dataviz.js");


/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/themes/frozen.js":
/*!***********************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/themes/frozen.js ***!
  \***********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* reexport safe */ _internal_themes_frozen__WEBPACK_IMPORTED_MODULE_0__["default"])
/* harmony export */ });
/* harmony import */ var _internal_themes_frozen__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../.internal/themes/frozen */ "./node_modules/@amcharts/amcharts4/.internal/themes/frozen.js");


/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/themes/kelly.js":
/*!**********************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/themes/kelly.js ***!
  \**********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* reexport safe */ _internal_themes_kelly__WEBPACK_IMPORTED_MODULE_0__["default"])
/* harmony export */ });
/* harmony import */ var _internal_themes_kelly__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../.internal/themes/kelly */ "./node_modules/@amcharts/amcharts4/.internal/themes/kelly.js");


/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/themes/material.js":
/*!*************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/themes/material.js ***!
  \*************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* reexport safe */ _internal_themes_material__WEBPACK_IMPORTED_MODULE_0__["default"])
/* harmony export */ });
/* harmony import */ var _internal_themes_material__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../.internal/themes/material */ "./node_modules/@amcharts/amcharts4/.internal/themes/material.js");


/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/themes/microchart.js":
/*!***************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/themes/microchart.js ***!
  \***************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* reexport safe */ _internal_themes_microchart__WEBPACK_IMPORTED_MODULE_0__["default"])
/* harmony export */ });
/* harmony import */ var _internal_themes_microchart__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../.internal/themes/microchart */ "./node_modules/@amcharts/amcharts4/.internal/themes/microchart.js");


/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/themes/moonrisekingdom.js":
/*!********************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/themes/moonrisekingdom.js ***!
  \********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* reexport safe */ _internal_themes_moonrisekingdom__WEBPACK_IMPORTED_MODULE_0__["default"])
/* harmony export */ });
/* harmony import */ var _internal_themes_moonrisekingdom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../.internal/themes/moonrisekingdom */ "./node_modules/@amcharts/amcharts4/.internal/themes/moonrisekingdom.js");


/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/themes/patterns.js":
/*!*************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/themes/patterns.js ***!
  \*************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* reexport safe */ _internal_themes_patterns__WEBPACK_IMPORTED_MODULE_0__["default"])
/* harmony export */ });
/* harmony import */ var _internal_themes_patterns__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../.internal/themes/patterns */ "./node_modules/@amcharts/amcharts4/.internal/themes/patterns.js");


/***/ }),

/***/ "./node_modules/@amcharts/amcharts4/themes/spiritedaway.js":
/*!*****************************************************************!*\
  !*** ./node_modules/@amcharts/amcharts4/themes/spiritedaway.js ***!
  \*****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* reexport safe */ _internal_themes_spiritedaway__WEBPACK_IMPORTED_MODULE_0__["default"])
/* harmony export */ });
/* harmony import */ var _internal_themes_spiritedaway__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../.internal/themes/spiritedaway */ "./node_modules/@amcharts/amcharts4/.internal/themes/spiritedaway.js");


/***/ }),

/***/ "./node_modules/regression/dist/regression.js":
/*!****************************************************!*\
  !*** ./node_modules/regression/dist/regression.js ***!
  \****************************************************/
/***/ (function(module, exports) {

var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) {
  if (true) {
    !(__WEBPACK_AMD_DEFINE_ARRAY__ = [module], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
		__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
		(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
		__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  } else { var mod; }
})(this, function (module) {
  'use strict';

  function _defineProperty(obj, key, value) {
    if (key in obj) {
      Object.defineProperty(obj, key, {
        value: value,
        enumerable: true,
        configurable: true,
        writable: true
      });
    } else {
      obj[key] = value;
    }

    return obj;
  }

  var _extends = Object.assign || function (target) {
    for (var i = 1; i < arguments.length; i++) {
      var source = arguments[i];

      for (var key in source) {
        if (Object.prototype.hasOwnProperty.call(source, key)) {
          target[key] = source[key];
        }
      }
    }

    return target;
  };

  function _toConsumableArray(arr) {
    if (Array.isArray(arr)) {
      for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {
        arr2[i] = arr[i];
      }

      return arr2;
    } else {
      return Array.from(arr);
    }
  }

  var DEFAULT_OPTIONS = {
    order: 2,
    precision: 2,
    period: null
  };
  /**
  * Determine the coefficient of determination (r^2) of a fit from the observations
  * and predictions.
  *
  * @param {Array<Array<number>>} data - Pairs of observed x-y values
  * @param {Array<Array<number>>} results - Pairs of observed predicted x-y values
  *
  * @return {number} - The r^2 value, or NaN if one cannot be calculated.
  */

  function determinationCoefficient(data, results) {
    var predictions = [];
    var observations = [];
    data.forEach(function (d, i) {
      if (d[1] !== null) {
        observations.push(d);
        predictions.push(results[i]);
      }
    });
    var sum = observations.reduce(function (a, observation) {
      return a + observation[1];
    }, 0);
    var mean = sum / observations.length;
    var ssyy = observations.reduce(function (a, observation) {
      var difference = observation[1] - mean;
      return a + difference * difference;
    }, 0);
    var sse = observations.reduce(function (accum, observation, index) {
      var prediction = predictions[index];
      var residual = observation[1] - prediction[1];
      return accum + residual * residual;
    }, 0);
    return 1 - sse / ssyy;
  }
  /**
  * Determine the solution of a system of linear equations A * x = b using
  * Gaussian elimination.
  *
  * @param {Array<Array<number>>} input - A 2-d matrix of data in row-major form [ A | b ]
  * @param {number} order - How many degrees to solve for
  *
  * @return {Array<number>} - Vector of normalized solution coefficients matrix (x)
  */


  function gaussianElimination(input, order) {
    var matrix = input;
    var n = input.length - 1;
    var coefficients = [order];

    for (var i = 0; i < n; i++) {
      var maxrow = i;

      for (var j = i + 1; j < n; j++) {
        if (Math.abs(matrix[i][j]) > Math.abs(matrix[i][maxrow])) {
          maxrow = j;
        }
      }

      for (var k = i; k < n + 1; k++) {
        var tmp = matrix[k][i];
        matrix[k][i] = matrix[k][maxrow];
        matrix[k][maxrow] = tmp;
      }

      for (var _j = i + 1; _j < n; _j++) {
        for (var _k = n; _k >= i; _k--) {
          matrix[_k][_j] -= matrix[_k][i] * matrix[i][_j] / matrix[i][i];
        }
      }
    }

    for (var _j2 = n - 1; _j2 >= 0; _j2--) {
      var total = 0;

      for (var _k2 = _j2 + 1; _k2 < n; _k2++) {
        total += matrix[_k2][_j2] * coefficients[_k2];
      }

      coefficients[_j2] = (matrix[n][_j2] - total) / matrix[_j2][_j2];
    }

    return coefficients;
  }
  /**
  * Round a number to a precision, specificed in number of decimal places
  *
  * @param {number} number - The number to round
  * @param {number} precision - The number of decimal places to round to:
  *                             > 0 means decimals, < 0 means powers of 10
  *
  *
  * @return {numbr} - The number, rounded
  */


  function round(number, precision) {
    var factor = Math.pow(10, precision);
    return Math.round(number * factor) / factor;
  }
  /**
  * The set of all fitting methods
  *
  * @namespace
  */


  var methods = {
    linear: function linear(data, options) {
      var sum = [0, 0, 0, 0, 0];
      var len = 0;

      for (var n = 0; n < data.length; n++) {
        if (data[n][1] !== null) {
          len++;
          sum[0] += data[n][0];
          sum[1] += data[n][1];
          sum[2] += data[n][0] * data[n][0];
          sum[3] += data[n][0] * data[n][1];
          sum[4] += data[n][1] * data[n][1];
        }
      }

      var run = len * sum[2] - sum[0] * sum[0];
      var rise = len * sum[3] - sum[0] * sum[1];
      var gradient = run === 0 ? 0 : round(rise / run, options.precision);
      var intercept = round(sum[1] / len - gradient * sum[0] / len, options.precision);

      var predict = function predict(x) {
        return [round(x, options.precision), round(gradient * x + intercept, options.precision)];
      };

      var points = data.map(function (point) {
        return predict(point[0]);
      });
      return {
        points: points,
        predict: predict,
        equation: [gradient, intercept],
        r2: round(determinationCoefficient(data, points), options.precision),
        string: intercept === 0 ? 'y = ' + gradient + 'x' : 'y = ' + gradient + 'x + ' + intercept
      };
    },
    exponential: function exponential(data, options) {
      var sum = [0, 0, 0, 0, 0, 0];

      for (var n = 0; n < data.length; n++) {
        if (data[n][1] !== null) {
          sum[0] += data[n][0];
          sum[1] += data[n][1];
          sum[2] += data[n][0] * data[n][0] * data[n][1];
          sum[3] += data[n][1] * Math.log(data[n][1]);
          sum[4] += data[n][0] * data[n][1] * Math.log(data[n][1]);
          sum[5] += data[n][0] * data[n][1];
        }
      }

      var denominator = sum[1] * sum[2] - sum[5] * sum[5];
      var a = Math.exp((sum[2] * sum[3] - sum[5] * sum[4]) / denominator);
      var b = (sum[1] * sum[4] - sum[5] * sum[3]) / denominator;
      var coeffA = round(a, options.precision);
      var coeffB = round(b, options.precision);

      var predict = function predict(x) {
        return [round(x, options.precision), round(coeffA * Math.exp(coeffB * x), options.precision)];
      };

      var points = data.map(function (point) {
        return predict(point[0]);
      });
      return {
        points: points,
        predict: predict,
        equation: [coeffA, coeffB],
        string: 'y = ' + coeffA + 'e^(' + coeffB + 'x)',
        r2: round(determinationCoefficient(data, points), options.precision)
      };
    },
    logarithmic: function logarithmic(data, options) {
      var sum = [0, 0, 0, 0];
      var len = data.length;

      for (var n = 0; n < len; n++) {
        if (data[n][1] !== null) {
          sum[0] += Math.log(data[n][0]);
          sum[1] += data[n][1] * Math.log(data[n][0]);
          sum[2] += data[n][1];
          sum[3] += Math.pow(Math.log(data[n][0]), 2);
        }
      }

      var a = (len * sum[1] - sum[2] * sum[0]) / (len * sum[3] - sum[0] * sum[0]);
      var coeffB = round(a, options.precision);
      var coeffA = round((sum[2] - coeffB * sum[0]) / len, options.precision);

      var predict = function predict(x) {
        return [round(x, options.precision), round(round(coeffA + coeffB * Math.log(x), options.precision), options.precision)];
      };

      var points = data.map(function (point) {
        return predict(point[0]);
      });
      return {
        points: points,
        predict: predict,
        equation: [coeffA, coeffB],
        string: 'y = ' + coeffA + ' + ' + coeffB + ' ln(x)',
        r2: round(determinationCoefficient(data, points), options.precision)
      };
    },
    power: function power(data, options) {
      var sum = [0, 0, 0, 0, 0];
      var len = data.length;

      for (var n = 0; n < len; n++) {
        if (data[n][1] !== null) {
          sum[0] += Math.log(data[n][0]);
          sum[1] += Math.log(data[n][1]) * Math.log(data[n][0]);
          sum[2] += Math.log(data[n][1]);
          sum[3] += Math.pow(Math.log(data[n][0]), 2);
        }
      }

      var b = (len * sum[1] - sum[0] * sum[2]) / (len * sum[3] - Math.pow(sum[0], 2));
      var a = (sum[2] - b * sum[0]) / len;
      var coeffA = round(Math.exp(a), options.precision);
      var coeffB = round(b, options.precision);

      var predict = function predict(x) {
        return [round(x, options.precision), round(round(coeffA * Math.pow(x, coeffB), options.precision), options.precision)];
      };

      var points = data.map(function (point) {
        return predict(point[0]);
      });
      return {
        points: points,
        predict: predict,
        equation: [coeffA, coeffB],
        string: 'y = ' + coeffA + 'x^' + coeffB,
        r2: round(determinationCoefficient(data, points), options.precision)
      };
    },
    polynomial: function polynomial(data, options) {
      var lhs = [];
      var rhs = [];
      var a = 0;
      var b = 0;
      var len = data.length;
      var k = options.order + 1;

      for (var i = 0; i < k; i++) {
        for (var l = 0; l < len; l++) {
          if (data[l][1] !== null) {
            a += Math.pow(data[l][0], i) * data[l][1];
          }
        }

        lhs.push(a);
        a = 0;
        var c = [];

        for (var j = 0; j < k; j++) {
          for (var _l = 0; _l < len; _l++) {
            if (data[_l][1] !== null) {
              b += Math.pow(data[_l][0], i + j);
            }
          }

          c.push(b);
          b = 0;
        }

        rhs.push(c);
      }

      rhs.push(lhs);
      var coefficients = gaussianElimination(rhs, k).map(function (v) {
        return round(v, options.precision);
      });

      var predict = function predict(x) {
        return [round(x, options.precision), round(coefficients.reduce(function (sum, coeff, power) {
          return sum + coeff * Math.pow(x, power);
        }, 0), options.precision)];
      };

      var points = data.map(function (point) {
        return predict(point[0]);
      });
      var string = 'y = ';

      for (var _i = coefficients.length - 1; _i >= 0; _i--) {
        if (_i > 1) {
          string += coefficients[_i] + 'x^' + _i + ' + ';
        } else if (_i === 1) {
          string += coefficients[_i] + 'x + ';
        } else {
          string += coefficients[_i];
        }
      }

      return {
        string: string,
        points: points,
        predict: predict,
        equation: [].concat(_toConsumableArray(coefficients)).reverse(),
        r2: round(determinationCoefficient(data, points), options.precision)
      };
    }
  };

  function createWrapper() {
    var reduce = function reduce(accumulator, name) {
      return _extends({
        _round: round
      }, accumulator, _defineProperty({}, name, function (data, supplied) {
        return methods[name](data, _extends({}, DEFAULT_OPTIONS, supplied));
      }));
    };

    return Object.keys(methods).reduce(reduce, {});
  }

  module.exports = createWrapper();
});

/***/ }),

/***/ "./node_modules/tslib/tslib.es6.js":
/*!*****************************************!*\
  !*** ./node_modules/tslib/tslib.es6.js ***!
  \*****************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "__assign": () => (/* binding */ _assign),
/* harmony export */   "__asyncDelegator": () => (/* binding */ __asyncDelegator),
/* harmony export */   "__asyncGenerator": () => (/* binding */ __asyncGenerator),
/* harmony export */   "__asyncValues": () => (/* binding */ __asyncValues),
/* harmony export */   "__await": () => (/* binding */ __await),
/* harmony export */   "__awaiter": () => (/* binding */ __awaiter),
/* harmony export */   "__classPrivateFieldGet": () => (/* binding */ __classPrivateFieldGet),
/* harmony export */   "__classPrivateFieldSet": () => (/* binding */ __classPrivateFieldSet),
/* harmony export */   "__createBinding": () => (/* binding */ __createBinding),
/* harmony export */   "__decorate": () => (/* binding */ __decorate),
/* harmony export */   "__exportStar": () => (/* binding */ __exportStar),
/* harmony export */   "__extends": () => (/* binding */ __extends),
/* harmony export */   "__generator": () => (/* binding */ __generator),
/* harmony export */   "__importDefault": () => (/* binding */ __importDefault),
/* harmony export */   "__importStar": () => (/* binding */ __importStar),
/* harmony export */   "__makeTemplateObject": () => (/* binding */ __makeTemplateObject),
/* harmony export */   "__metadata": () => (/* binding */ __metadata),
/* harmony export */   "__param": () => (/* binding */ __param),
/* harmony export */   "__read": () => (/* binding */ __read),
/* harmony export */   "__rest": () => (/* binding */ __rest),
/* harmony export */   "__spread": () => (/* binding */ __spread),
/* harmony export */   "__spreadArray": () => (/* binding */ __spreadArray),
/* harmony export */   "__spreadArrays": () => (/* binding */ __spreadArrays),
/* harmony export */   "__values": () => (/* binding */ __values)
/* harmony export */ });
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */

/* global Reflect, Promise */
var _extendStatics = function extendStatics(d, b) {
  _extendStatics = Object.setPrototypeOf || {
    __proto__: []
  } instanceof Array && function (d, b) {
    d.__proto__ = b;
  } || function (d, b) {
    for (var p in b) {
      if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
    }
  };

  return _extendStatics(d, b);
};

function __extends(d, b) {
  if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");

  _extendStatics(d, b);

  function __() {
    this.constructor = d;
  }

  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
}

var _assign = function __assign() {
  _assign = Object.assign || function __assign(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
      s = arguments[i];

      for (var p in s) {
        if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
      }
    }

    return t;
  };

  return _assign.apply(this, arguments);
};


function __rest(s, e) {
  var t = {};

  for (var p in s) {
    if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  }

  if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
    if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  }
  return t;
}
function __decorate(decorators, target, key, desc) {
  var c = arguments.length,
      r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
      d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) {
    if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  }
  return c > 3 && r && Object.defineProperty(target, key, r), r;
}
function __param(paramIndex, decorator) {
  return function (target, key) {
    decorator(target, key, paramIndex);
  };
}
function __metadata(metadataKey, metadataValue) {
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
}
function __awaiter(thisArg, _arguments, P, generator) {
  function adopt(value) {
    return value instanceof P ? value : new P(function (resolve) {
      resolve(value);
    });
  }

  return new (P || (P = Promise))(function (resolve, reject) {
    function fulfilled(value) {
      try {
        step(generator.next(value));
      } catch (e) {
        reject(e);
      }
    }

    function rejected(value) {
      try {
        step(generator["throw"](value));
      } catch (e) {
        reject(e);
      }
    }

    function step(result) {
      result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
    }

    step((generator = generator.apply(thisArg, _arguments || [])).next());
  });
}
function __generator(thisArg, body) {
  var _ = {
    label: 0,
    sent: function sent() {
      if (t[0] & 1) throw t[1];
      return t[1];
    },
    trys: [],
    ops: []
  },
      f,
      y,
      t,
      g;
  return g = {
    next: verb(0),
    "throw": verb(1),
    "return": verb(2)
  }, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
    return this;
  }), g;

  function verb(n) {
    return function (v) {
      return step([n, v]);
    };
  }

  function step(op) {
    if (f) throw new TypeError("Generator is already executing.");

    while (_) {
      try {
        if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
        if (y = 0, t) op = [op[0] & 2, t.value];

        switch (op[0]) {
          case 0:
          case 1:
            t = op;
            break;

          case 4:
            _.label++;
            return {
              value: op[1],
              done: false
            };

          case 5:
            _.label++;
            y = op[1];
            op = [0];
            continue;

          case 7:
            op = _.ops.pop();

            _.trys.pop();

            continue;

          default:
            if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
              _ = 0;
              continue;
            }

            if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
              _.label = op[1];
              break;
            }

            if (op[0] === 6 && _.label < t[1]) {
              _.label = t[1];
              t = op;
              break;
            }

            if (t && _.label < t[2]) {
              _.label = t[2];

              _.ops.push(op);

              break;
            }

            if (t[2]) _.ops.pop();

            _.trys.pop();

            continue;
        }

        op = body.call(thisArg, _);
      } catch (e) {
        op = [6, e];
        y = 0;
      } finally {
        f = t = 0;
      }
    }

    if (op[0] & 5) throw op[1];
    return {
      value: op[0] ? op[1] : void 0,
      done: true
    };
  }
}
var __createBinding = Object.create ? function (o, m, k, k2) {
  if (k2 === undefined) k2 = k;
  Object.defineProperty(o, k2, {
    enumerable: true,
    get: function get() {
      return m[k];
    }
  });
} : function (o, m, k, k2) {
  if (k2 === undefined) k2 = k;
  o[k2] = m[k];
};
function __exportStar(m, o) {
  for (var p in m) {
    if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
  }
}
function __values(o) {
  var s = typeof Symbol === "function" && Symbol.iterator,
      m = s && o[s],
      i = 0;
  if (m) return m.call(o);
  if (o && typeof o.length === "number") return {
    next: function next() {
      if (o && i >= o.length) o = void 0;
      return {
        value: o && o[i++],
        done: !o
      };
    }
  };
  throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
}
function __read(o, n) {
  var m = typeof Symbol === "function" && o[Symbol.iterator];
  if (!m) return o;
  var i = m.call(o),
      r,
      ar = [],
      e;

  try {
    while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
      ar.push(r.value);
    }
  } catch (error) {
    e = {
      error: error
    };
  } finally {
    try {
      if (r && !r.done && (m = i["return"])) m.call(i);
    } finally {
      if (e) throw e.error;
    }
  }

  return ar;
}
/** @deprecated */

function __spread() {
  for (var ar = [], i = 0; i < arguments.length; i++) {
    ar = ar.concat(__read(arguments[i]));
  }

  return ar;
}
/** @deprecated */

function __spreadArrays() {
  for (var s = 0, i = 0, il = arguments.length; i < il; i++) {
    s += arguments[i].length;
  }

  for (var r = Array(s), k = 0, i = 0; i < il; i++) {
    for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) {
      r[k] = a[j];
    }
  }

  return r;
}
function __spreadArray(to, from, pack) {
  if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
    if (ar || !(i in from)) {
      if (!ar) ar = Array.prototype.slice.call(from, 0, i);
      ar[i] = from[i];
    }
  }
  return to.concat(ar || Array.prototype.slice.call(from));
}
function __await(v) {
  return this instanceof __await ? (this.v = v, this) : new __await(v);
}
function __asyncGenerator(thisArg, _arguments, generator) {
  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
  var g = generator.apply(thisArg, _arguments || []),
      i,
      q = [];
  return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () {
    return this;
  }, i;

  function verb(n) {
    if (g[n]) i[n] = function (v) {
      return new Promise(function (a, b) {
        q.push([n, v, a, b]) > 1 || resume(n, v);
      });
    };
  }

  function resume(n, v) {
    try {
      step(g[n](v));
    } catch (e) {
      settle(q[0][3], e);
    }
  }

  function step(r) {
    r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);
  }

  function fulfill(value) {
    resume("next", value);
  }

  function reject(value) {
    resume("throw", value);
  }

  function settle(f, v) {
    if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]);
  }
}
function __asyncDelegator(o) {
  var i, p;
  return i = {}, verb("next"), verb("throw", function (e) {
    throw e;
  }), verb("return"), i[Symbol.iterator] = function () {
    return this;
  }, i;

  function verb(n, f) {
    i[n] = o[n] ? function (v) {
      return (p = !p) ? {
        value: __await(o[n](v)),
        done: n === "return"
      } : f ? f(v) : v;
    } : f;
  }
}
function __asyncValues(o) {
  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
  var m = o[Symbol.asyncIterator],
      i;
  return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () {
    return this;
  }, i);

  function verb(n) {
    i[n] = o[n] && function (v) {
      return new Promise(function (resolve, reject) {
        v = o[n](v), settle(resolve, reject, v.done, v.value);
      });
    };
  }

  function settle(resolve, reject, d, v) {
    Promise.resolve(v).then(function (v) {
      resolve({
        value: v,
        done: d
      });
    }, reject);
  }
}
function __makeTemplateObject(cooked, raw) {
  if (Object.defineProperty) {
    Object.defineProperty(cooked, "raw", {
      value: raw
    });
  } else {
    cooked.raw = raw;
  }

  return cooked;
}
;

var __setModuleDefault = Object.create ? function (o, v) {
  Object.defineProperty(o, "default", {
    enumerable: true,
    value: v
  });
} : function (o, v) {
  o["default"] = v;
};

function __importStar(mod) {
  if (mod && mod.__esModule) return mod;
  var result = {};
  if (mod != null) for (var k in mod) {
    if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
  }

  __setModuleDefault(result, mod);

  return result;
}
function __importDefault(mod) {
  return mod && mod.__esModule ? mod : {
    default: mod
  };
}
function __classPrivateFieldGet(receiver, state, kind, f) {
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
}
function __classPrivateFieldSet(receiver, state, value, kind, f) {
  if (kind === "m") throw new TypeError("Private method is not writable");
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
  return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
}

/***/ }),

/***/ "./srcjs/utils/index.js":
/*!******************************!*\
  !*** ./srcjs/utils/index.js ***!
  \******************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Image": () => (/* binding */ Image),
/* harmony export */   "Shape": () => (/* binding */ Shape),
/* harmony export */   "Tooltip": () => (/* binding */ Tooltip),
/* harmony export */   "createAxis": () => (/* binding */ createAxis),
/* harmony export */   "createCategoryAxis": () => (/* binding */ createCategoryAxis),
/* harmony export */   "createGridLines": () => (/* binding */ createGridLines),
/* harmony export */   "exportMenuItems": () => (/* binding */ exportMenuItems),
/* harmony export */   "fontSizeToPixels": () => (/* binding */ fontSizeToPixels),
/* harmony export */   "isLightColor": () => (/* binding */ isLightColor),
/* harmony export */   "makeButton": () => (/* binding */ makeButton),
/* harmony export */   "onAxisZoomed": () => (/* binding */ onAxisZoomed),
/* harmony export */   "subset": () => (/* binding */ subset),
/* harmony export */   "toDate": () => (/* binding */ toDate),
/* harmony export */   "toUTCtime": () => (/* binding */ toUTCtime)
/* harmony export */ });
/* jshint esversion: 6 */
var toUTCtime = function toUTCtime(string) {
  var ymd = string.split("-");
  return Date.UTC(ymd[0], ymd[1] - 1, ymd[2]);
};
var toDate = function toDate(string) {
  return new Date(toUTCtime(string));
};
var subset = function subset(data, keys) {
  return keys.reduce((a, b) => (a[b] = data[b], a), {});
};
var isLightColor = function isLightColor(color) {
  // color is given in HEX
  var r, g, b;
  color = +("0x" + color.slice(1).replace(color.length < 5 && /./g, '$&$&'));
  r = color >> 16;
  g = color >> 8 & 255;
  b = color & 255; // HSP (Highly Sensitive Poo) equation from http://alienryderflex.com/hsp.html

  var hsp = Math.sqrt(0.299 * (r * r) + 0.587 * (g * g) + 0.114 * (b * b)); // Using the HSP value, determine whether the color is light or dark

  return hsp > 127.5;
};
var Tooltip = function Tooltip(am4core, chart, index, tooltipStyle) {
  var tooltip = new am4core.Tooltip();
  tooltip.getFillFromObject = tooltipStyle.auto;
  tooltip.background.fill = tooltipStyle.backgroundColor || chart.colors.getIndex(index);
  tooltip.background.fillOpacity = tooltipStyle.backgroundOpacity || 0.6;
  tooltip.autoTextColor = tooltipStyle.auto || !tooltipStyle.textColor;
  tooltip.label.fill = tooltipStyle.textColor || (isLightColor(am4core.color(tooltip.background.fill).hex) ? 'black' : 'white');
  tooltip.label.textAlign = tooltipStyle.textAlign;
  tooltip.background.stroke = tooltipStyle.borderColor || am4core.color(tooltip.background.fill).lighten(-0.5);
  tooltip.background.strokeWidth = tooltipStyle.borderWidth;
  tooltip.scale = tooltipStyle.scale || 1;
  tooltip.background.filters.clear(); // remove tooltip shadow

  tooltip.background.pointerLength = tooltipStyle.pointerLength;
  return tooltip;
};
var Shape = function Shape(am4core, chart, index, bullet, shapeConfig) {
  var shape;

  switch (shapeConfig.shape) {
    case "triangle":
      shape = bullet.createChild(am4core.Triangle);
      shape.direction = shapeConfig.direction;
      shape.width = shapeConfig.width;
      shape.height = shapeConfig.height;
      shape.rotation = shapeConfig.rotation;
      break;

    case "circle":
      shape = bullet.createChild(am4core.Circle);
      shape.radius = shapeConfig.radius;
      break;

    case "rectangle":
      shape = bullet.createChild(am4core.RoundedRectangle);
      shape.width = shapeConfig.width;
      shape.height = shapeConfig.height;
      shape.rotation = shapeConfig.rotation;
      shape.cornerRadiusBottomLeft = shapeConfig.cornerRadius;
      shape.cornerRadiusTopLeft = shapeConfig.cornerRadius;
      shape.cornerRadiusBottomRight = shapeConfig.cornerRadius;
      shape.cornerRadiusTopRight = shapeConfig.cornerRadius;
      break;
  }

  shape.horizontalCenter = "middle";
  shape.verticalCenter = "middle";
  shape.fill = shapeConfig.color || chart.colors.getIndex(index);
  shape.fillOpacity = typeof shapeConfig.opacity === "number" ? shapeConfig.opacity : 1;
  shape.strokeWidth = shapeConfig.strokeWidth;
  shape.stroke = shapeConfig.strokeColor || chart.colors.getIndex(index).lighten(-0.5);
  shape.strokeOpacity = typeof shapeConfig.strokeOpacity === "number" ? shapeConfig.strokeOpacity : 1;

  if (shapeConfig.colorAdapter) {
    try {
      var test = shapeConfig.colorAdapter(null, {
        dataItem: {
          valueX: 0,
          valueY: 0
        }
      });
    } catch (err) {
      console.error("Error detected in color adapter: ", err.message);
      chart.dispose();
      throw err.name;
    }

    shape.adapter.add("fill", shapeConfig.colorAdapter);
  }

  if (shapeConfig.strokeColorAdapter) {
    try {
      var _test = shapeConfig.strokeColorAdapter(null, {
        dataItem: {
          valueX: 0,
          valueY: 0
        }
      });
    } catch (err) {
      console.error("Error detected in strokeColor adapter: ", err.message);
      chart.dispose();
      throw err.name;
    }

    shape.adapter.add("stroke", shapeConfig.strokeColorAdapter);
  }

  if (shapeConfig.image) {
    var image = bullet.createChild(am4core.Image);
    image.width = shapeConfig.image.width;
    image.height = shapeConfig.image.height;
    image.horizontalCenter = "middle";
    image.verticalCenter = "middle";

    if (shapeConfig.image.href.match(/^inData:/)) {
      var href = shapeConfig.image.href.split(":")[1];
      image.propertyFields.href = href;
    } else {
      image.href = shapeConfig.image.href;
    }
  }

  return shape;
};
var createGridLines = function createGridLines(Axis, breaks, lineconfig, labelsconfig, theme, isDate) {
  /*    if(labelsconfig && labelsconfig.formatter) {
        let formatter = labelsconfig.formatter;
        if(isDate) {
          Axis.dateFormats.setKey("day", formatter.day[0]);
          if(formatter.day[1]) {
            Axis.periodChangeDateFormats.setKey("day", formatter.day[1]);
          }
          Axis.dateFormats.setKey("week", formatter.week[0]);
          if(formatter.week[1]) {
            Axis.periodChangeDateFormats.setKey("week", formatter.week[1]);
          }
          Axis.dateFormats.setKey("month", formatter.month[0]);
          if(formatter.month[1]) {
            Axis.periodChangeDateFormats.setKey("month", formatter.month[1]);
          }
        } else {
          Axis.numberFormatter = new am4core.NumberFormatter();
          Axis.numberFormatter.numberFormat = formatter;
          Axis.adjustLabelPrecision = false;
        }
      } */
  //let formatter = labelsconfig.formatter;
  //    let isArray = Array.isArray(values);
  //    console.log(values);
  //    let length = isArray ? values.length : Object.keys(values).length;
  Axis.axisRanges.template.grid.location = 0.5;
  Axis.axisRanges.template.label.location = 0.5;

  if (!lineconfig) {
    Axis.axisRanges.template.grid.disabled = true;
  }

  for (var i = 0; i < breaks.value.length; ++i) {
    var range = Axis.axisRanges.create();
    /*        range.component.dateFormats.setKey("day", formatter.day[0]);
            if(formatter.day[1]) {
              range.component.periodChangeDateFormats.setKey("day", formatter.day[1]);
            }
            range.component.dateFormats.setKey("week", formatter.week[0]);
            if(formatter.week[1]) {
              range.component.periodChangeDateFormats.setKey("week", formatter.week[1]);
            }
            range.component.dateFormats.setKey("month", formatter.month[0]);
            if(formatter.month[1]) {
              range.component.periodChangeDateFormats.setKey("month", formatter.month[1]);
            } */

    if (isDate) {
      range.value = toDate(breaks.value[i]);
      range.label.text = breaks.label[i] || "{date}"; //range.label.location = 0.5;
      //range.grid.location = 0.5;
    } else {
      range.value = breaks.value[i];
      range.label.text = breaks.label[i] || "{value}";
    }
    /*      if(isDate) {
            if(isArray) {
              range.date = toDate(values[i]);
              range.label.text = "{date}";
            } else {
              let entry = Object.entries(values)[i];
              console.log(entry);
              range.date = toDate(entry[1]);
              range.label.text = entry[0];
            }
          } else {
            if(isArray) {
              range.value = values[i];
              range.label.text = "{value}";
            } else {
              let entry = Object.entries(values)[i];
              range.value = entry[1];
              range.label.text = entry[0];
            }
          } */
    //range.xx = Axis.formatLabel(values[i]);
    //console.log(range);


    if (lineconfig) {
      range.grid.stroke = lineconfig.color || (theme === "dark" ? "#ffffff" : "#000000");
      range.grid.strokeWidth = lineconfig.width || 1;
      range.grid.strokeOpacity = lineconfig.opacity || 0.2;

      if (lineconfig.dash) {
        range.grid.strokeDasharray = lineconfig.dash;
      }
    }

    if (labelsconfig) {
      range.label.fontSize = labelsconfig.fontSize || 17;
      range.label.rotation = labelsconfig.rotation || 0;
      range.label.fill = labelsconfig.color || (theme === "dark" ? "#ffffff" : "#000000");
    }
  }
  /*    setTimeout(function() {
      for(let i = 0; i < values.length; ++i) {
        let range = Axis.axisRanges.getIndex(i);
        range.xx = Axis.getPositionLabel(Axis.valueToPosition(values[i]));
        range.label.text = "{date}";
      }
      }, 500); */

};
var createAxis = function createAxis(XY, am4charts, am4core, chart, axisSettings, min, max, isDate, theme, cursor, xValue) {
  var Axis, Formatter;

  if (axisSettings.labels) {
    Formatter = axisSettings.labels.formatter;
  }

  if (isDate) {
    switch (XY) {
      case "X":
        Axis = chart.xAxes.push(new am4charts.DateAxis());
        Axis.dataFields.dateX = xValue;
        break;

      case "Y":
        Axis = chart.yAxes.push(new am4charts.DateAxis());
        break;
    }

    if (Formatter) {
      Axis.dateFormats.setKey("day", Formatter.day[0]);

      if (Formatter.day[1]) {
        Axis.periodChangeDateFormats.setKey("day", Formatter.day[1]);
      }

      Axis.dateFormats.setKey("week", Formatter.week[0]);

      if (Formatter.week[1]) {
        Axis.periodChangeDateFormats.setKey("week", Formatter.week[1]);
      }

      Axis.dateFormats.setKey("month", Formatter.month[0]);

      if (Formatter.month[1]) {
        Axis.periodChangeDateFormats.setKey("month", Formatter.month[1]);
      }
    }
  } else {
    switch (XY) {
      case "X":
        Axis = chart.xAxes.push(new am4charts.ValueAxis());
        Axis.dataFields.valueX = xValue;
        break;

      case "Y":
        Axis = chart.yAxes.push(new am4charts.ValueAxis());
        break;
    }

    if (Formatter) {
      Axis.numberFormatter = new am4core.NumberFormatter();
      Axis.numberFormatter.numberFormat = Formatter;
      Axis.adjustLabelPrecision = false;
    }
  }

  Axis.renderer.minWidth = 60;

  if (axisSettings) {
    switch (XY) {
      case "X":
        Axis.paddingBottom = axisSettings.adjust || 0;
        break;

      case "Y":
        Axis.paddingRight = axisSettings.adjust || 0;
        break;
    }
  }

  Axis.strictMinMax = true;
  Axis.min = min;
  Axis.max = max;

  if (axisSettings && axisSettings.title && axisSettings.title.text !== "") {
    Axis.title.text = axisSettings.title.text;
    Axis.title.fontWeight = axisSettings.title.fontWeight || "bold";
    Axis.title.fontSize = axisSettings.title.fontSize || 20;
    Axis.title.fontFamily = axisSettings.title.fontFamily;
    Axis.title.fill = axisSettings.title.color || (theme === "dark" ? "#ffffff" : "#000000");
  }

  var BreaksType;

  if (axisSettings.breaks) {
    BreaksType = typeof axisSettings.breaks === "number" ? "interval" : Array.isArray(axisSettings.breaks) ? "timeInterval" : "breaks";
  }

  if (axisSettings.gridLines) {
    if (BreaksType === "interval") Axis.renderer.minGridDistance = axisSettings.breaks;
    Axis.renderer.grid.template.stroke = axisSettings.gridLines.color || (theme === "dark" ? "#ffffff" : "#000000");
    Axis.renderer.grid.template.strokeOpacity = typeof axisSettings.gridLines.opacity === "number" ? axisSettings.gridLines.opacity : 0.2;
    Axis.renderer.grid.template.strokeWidth = typeof axisSettings.gridLines.width === "number" ? axisSettings.gridLines.width : 1;

    if (axisSettings.gridLines.dash) {
      Axis.renderer.grid.template.strokeDasharray = axisSettings.gridLines.dash;
    }
  } else {
    Axis.renderer.grid.template.disabled = true;
  }

  if (BreaksType === "breaks") {
    Axis.renderer.grid.template.disabled = true;
    Axis.renderer.labels.template.disabled = true;

    if (isDate) {
      Axis.renderer.minGridDistance = 10;
      Axis.startLocation = 0.5; // ??

      Axis.endLocation = 0.5; // ??
    }

    createGridLines(Axis, axisSettings.breaks, axisSettings.gridLines, axisSettings.labels, theme, isDate);
  } else {
    if (BreaksType === "timeInterval") {
      Axis.gridIntervals.setAll(axisSettings.breaks);
      Axis.renderer.grid.template.location = 0.5;
      Axis.renderer.labels.template.location = 0.5;
      Axis.startLocation = 0.5; // ??

      Axis.endLocation = 0.5; // ??
    }

    if (axisSettings.labels) {
      var axisSettingsLabels = Axis.renderer.labels.template;
      axisSettingsLabels.fontSize = axisSettings.labels.fontSize || 17;
      axisSettingsLabels.rotation = axisSettings.labels.rotation || 0;

      if (XY === "x" && axisSettingsLabels.rotation !== 0) {
        axisSettingsLabels.horizontalCenter = "right";
      }

      axisSettingsLabels.fill = axisSettings.labels.color || (theme === "dark" ? "#ffffff" : "#000000");
    } else {
      Axis.renderer.labels.template.disabled = true;
    }
  }

  if (XY === "X") {
    if (cursor && (cursor === true || !cursor.axes || ["x", "xy"].indexOf(cursor.axes)) > -1) {
      if (cursor.tooltip) Axis.tooltip = Tooltip(am4core, chart, 0, cursor.tooltip);
      if (cursor.extraTooltipPrecision) Axis.extraTooltipPrecision = cursor.extraTooltipPrecision.x;
      if (cursor.renderer && cursor.renderer.x) Axis.adapter.add("getTooltipText", cursor.renderer.x);
      if (cursor.dateFormat) Axis.tooltipDateFormat = cursor.dateFormat;
    } else {
      Axis.cursorTooltipEnabled = false;
    }
  } else {
    if (cursor && (cursor === true || !cursor.axes || ["y", "xy"].indexOf(cursor.axes)) > -1) {
      if (cursor.tooltip) Axis.tooltip = Tooltip(am4core, chart, 0, cursor.tooltip);
      if (cursor.extraTooltipPrecision) Axis.extraTooltipPrecision = cursor.extraTooltipPrecision.y;
      if (cursor.renderer && cursor.renderer.y) Axis.adapter.add("getTooltipText", cursor.renderer.y);
      if (cursor.dateFormat) Axis.tooltipDateFormat = cursor.dateFormat;
    } else {
      Axis.cursorTooltipEnabled = false;
    }
  }

  return Axis;
};
var createCategoryAxis = function createCategoryAxis(XY, am4charts, chart, category, axisSettings, cellWidth, theme) {
  var categoryAxis;

  switch (XY) {
    case "X":
      categoryAxis = chart.xAxes.push(new am4charts.CategoryAxis());
      categoryAxis.paddingBottom = axisSettings.adjust || 0;
      break;

    case "Y":
      categoryAxis = chart.yAxes.push(new am4charts.CategoryAxis());
      categoryAxis.paddingRight = axisSettings.adjust || 0;
      break;
  }

  categoryAxis.dataFields.category = category;
  categoryAxis.renderer.minGridDistance = 15;
  categoryAxis.renderer.cellStartLocation = 1 - cellWidth / 100;
  categoryAxis.renderer.cellEndLocation = cellWidth / 100;
  categoryAxis.cursorTooltipEnabled = false;

  if (axisSettings.title && axisSettings.title.text !== "") {
    categoryAxis.title.text = axisSettings.title.text || category;
    categoryAxis.title.fontWeight = axisSettings.title.fontWeight || "bold";
    categoryAxis.title.fontSize = axisSettings.title.fontSize || 20;
    categoryAxis.title.fontFamily = axisSettings.title.fontFamily;
    categoryAxis.title.fill = axisSettings.title.color || (theme === "dark" ? "#ffffff" : "#000000");
  }

  if (axisSettings.labels) {
    var axisLabels = categoryAxis.renderer.labels.template;
    axisLabels.fontSize = axisSettings.labels.fontSize || 17;
    axisLabels.fontWeight = axisSettings.labels.fontWeight || "normal";
    axisLabels.fontFamily = axisSettings.labels.fontFamily;
    axisLabels.rotation = axisSettings.labels.rotation || 0;

    if (axisLabels.rotation !== 0) {
      axisLabels.horizontalCenter = "right";
    }

    axisLabels.fill = axisSettings.labels.color || (theme === "dark" ? "#ffffff" : "#000000");
  }

  if (axisSettings.gridLines) {
    var axisGrid = categoryAxis.renderer.grid.template;
    axisGrid.location = 0.5;
    axisGrid.stroke = axisSettings.gridLines.color || (theme === "dark" ? "#ffffff" : "#000000");
    axisGrid.strokeOpacity = typeof axisSettings.gridLines.opacity === "number" ? axisSettings.gridLines.opacity : 0.2;
    axisGrid.strokeWidth = typeof axisSettings.gridLines.width === "number" ? axisSettings.gridLines.width : 1;
    if (axisSettings.gridLines.dash) axisGrid.strokeDasharray = axisSettings.gridLines.dash;
  } else {
    categoryAxis.renderer.grid.template.disabled = true;
  }

  return categoryAxis;
};
var Image = function Image(am4core, chart, settings) {
  var img = settings.image;
  img.position = settings.position;
  img.hjust = settings.hjust;
  img.vjust = settings.vjust;
  var image = chart.topParent.children.getIndex(1).createChild(am4core.Image); // same as: chart.logo.parent.createChild(am4core.Image);

  image.layout = "absolute";
  image.width = img.width || 60;
  image.height = img.height || 60;
  image.fillOpacity = img.opacity || 1;
  img.position = img.position || "bottomleft";

  switch (img.position) {
    case "bottomleft":
      chart.logo.dispose();
      image.x = 0;
      image.y = chart.pixelHeight - image.height;
      break;

    case "bottomright":
      image.x = chart.pixelWidth - image.width;
      image.y = chart.pixelHeight - image.height;
      break;

    case "topleft":
      image.x = 0;
      image.y = 0;
      break;

    case "topright":
      image.x = chart.pixelWidth - image.width;
      image.y = 0;
      break;
  }

  image.dx = img.hjust || 0;
  image.dy = img.vjust || 0;
  image.href = img.href;
};
var exportMenuItems = [{
  "label": "Export",
  "menu": [{
    "label": "Image",
    "menu": [{
      "type": "png",
      "label": "PNG"
    }, {
      "type": "jpg",
      "label": "JPG"
    }, {
      "type": "svg",
      "label": "SVG"
    }]
  }, {
    "label": "Data",
    "menu": [{
      "type": "json",
      "label": "JSON"
    }, {
      "type": "csv",
      "label": "CSV"
    }, {
      "type": "html",
      "label": "HTML"
    }]
  }, {
    "label": "Print",
    "type": "print"
  }]
}];
var makeButton = function makeButton(Button, settings) {
  Button.label.text = settings.label.text;
  Button.label.fill = settings.label.color || Button.label.fill;
  Button.label.fontSize = settings.label.fontSize;
  Button.label.fontWeight = settings.label.fontWeight;
  Button.label.fontFamily = settings.label.fontFamily;
  Button.background.fill = settings.color || Button.background.fill;
  setTimeout(function () {
    Button.dy = -Button.parent.innerHeight * (settings.position || 0.9);
  }, 0);
  Button.padding(5, 5, 5, 5);
  Button.align = "right";
  Button.marginRight = settings.marginRight;
};
var fontSizeToPixels = function fontSizeToPixels(referenceFontSize, fontSize) {
  // referenceFontSize: number (pixels)
  // fontSize: string (size in px or em)
  var value = parseFloat(fontSize);
  var unit = fontSize.split(value)[1];

  if (unit === "px") {
    return value;
  } else {
    return referenceFontSize * value;
  }
};
var onAxisZoomed = function onAxisZoomed(event) {
  event.target.series.each(function (s) {
    s.bulletsContainer.children.each(function (b) {
      b.dispatch("positionchanged");
    });
  });
};

/***/ }),

/***/ "../../canvg/index.js":
/*!***************************************!*\
  !*** external "../../canvg/index.js" ***!
  \***************************************/
/***/ ((module) => {

"use strict";
module.exports = require("../../canvg/index.js");

/***/ }),

/***/ "../../pdfmake/vfs_fonts":
/*!******************************************!*\
  !*** external "../../pdfmake/vfs_fonts" ***!
  \******************************************/
/***/ ((module) => {

"use strict";
module.exports = require("../../pdfmake/vfs_fonts");

/***/ }),

/***/ "pdfmake/build/pdfmake.js":
/*!*******************************************!*\
  !*** external "pdfmake/build/pdfmake.js" ***!
  \*******************************************/
/***/ ((module) => {

"use strict";
module.exports = require("pdfmake/build/pdfmake.js");

/***/ }),

/***/ "xlsx/dist/xlsx.core.min.js":
/*!*********************************************!*\
  !*** external "xlsx/dist/xlsx.core.min.js" ***!
  \*********************************************/
/***/ ((module) => {

"use strict";
module.exports = require("xlsx/dist/xlsx.core.min.js");

/***/ }),

/***/ "reactR":
/*!********************************!*\
  !*** external "window.reactR" ***!
  \********************************/
/***/ ((module) => {

"use strict";
module.exports = window.reactR;

/***/ })

/******/ 	});
/************************************************************************/
/******/ 	// The module cache
/******/ 	var __webpack_module_cache__ = {};
/******/ 	
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/ 		// Check if module is in cache
/******/ 		var cachedModule = __webpack_module_cache__[moduleId];
/******/ 		if (cachedModule !== undefined) {
/******/ 			return cachedModule.exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = __webpack_module_cache__[moduleId] = {
/******/ 			// no module.id needed
/******/ 			// no module.loaded needed
/******/ 			exports: {}
/******/ 		};
/******/ 	
/******/ 		// Execute the module function
/******/ 		__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/ 	
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/ 	
/************************************************************************/
/******/ 	/* webpack/runtime/compat get default export */
/******/ 	(() => {
/******/ 		// getDefaultExport function for compatibility with non-harmony modules
/******/ 		__webpack_require__.n = (module) => {
/******/ 			var getter = module && module.__esModule ?
/******/ 				() => (module['default']) :
/******/ 				() => (module);
/******/ 			__webpack_require__.d(getter, { a: getter });
/******/ 			return getter;
/******/ 		};
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/create fake namespace object */
/******/ 	(() => {
/******/ 		var getProto = Object.getPrototypeOf ? (obj) => (Object.getPrototypeOf(obj)) : (obj) => (obj.__proto__);
/******/ 		var leafPrototypes;
/******/ 		// create a fake namespace object
/******/ 		// mode & 1: value is a module id, require it
/******/ 		// mode & 2: merge all properties of value into the ns
/******/ 		// mode & 4: return value when already ns object
/******/ 		// mode & 16: return value when it's Promise-like
/******/ 		// mode & 8|1: behave like require
/******/ 		__webpack_require__.t = function(value, mode) {
/******/ 			if(mode & 1) value = this(value);
/******/ 			if(mode & 8) return value;
/******/ 			if(typeof value === 'object' && value) {
/******/ 				if((mode & 4) && value.__esModule) return value;
/******/ 				if((mode & 16) && typeof value.then === 'function') return value;
/******/ 			}
/******/ 			var ns = Object.create(null);
/******/ 			__webpack_require__.r(ns);
/******/ 			var def = {};
/******/ 			leafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];
/******/ 			for(var current = mode & 2 && value; typeof current == 'object' && !~leafPrototypes.indexOf(current); current = getProto(current)) {
/******/ 				Object.getOwnPropertyNames(current).forEach((key) => (def[key] = () => (value[key])));
/******/ 			}
/******/ 			def['default'] = () => (value);
/******/ 			__webpack_require__.d(ns, def);
/******/ 			return ns;
/******/ 		};
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/define property getters */
/******/ 	(() => {
/******/ 		// define getter functions for harmony exports
/******/ 		__webpack_require__.d = (exports, definition) => {
/******/ 			for(var key in definition) {
/******/ 				if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ 					Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ 				}
/******/ 			}
/******/ 		};
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/hasOwnProperty shorthand */
/******/ 	(() => {
/******/ 		__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/make namespace object */
/******/ 	(() => {
/******/ 		// define __esModule on exports
/******/ 		__webpack_require__.r = (exports) => {
/******/ 			if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ 				Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ 			}
/******/ 			Object.defineProperty(exports, '__esModule', { value: true });
/******/ 		};
/******/ 	})();
/******/ 	
/************************************************************************/
var __webpack_exports__ = {};
// This entry need to be wrapped in an IIFE because it need to be in strict mode.
(() => {
"use strict";
/*!****************************!*\
  !*** ./srcjs/amChart4.jsx ***!
  \****************************/
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var reactR__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! reactR */ "reactR");
/* harmony import */ var reactR__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(reactR__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @amcharts/amcharts4/core */ "./node_modules/@amcharts/amcharts4/core.js");
/* harmony import */ var _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @amcharts/amcharts4/charts */ "./node_modules/@amcharts/amcharts4/charts.js");
/* harmony import */ var _amcharts_amcharts4_themes_animated__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @amcharts/amcharts4/themes/animated */ "./node_modules/@amcharts/amcharts4/themes/animated.js");
/* harmony import */ var _amcharts_amcharts4_themes_dark__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @amcharts/amcharts4/themes/dark */ "./node_modules/@amcharts/amcharts4/themes/dark.js");
/* harmony import */ var _amcharts_amcharts4_themes_dataviz__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @amcharts/amcharts4/themes/dataviz */ "./node_modules/@amcharts/amcharts4/themes/dataviz.js");
/* harmony import */ var _amcharts_amcharts4_themes_frozen__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @amcharts/amcharts4/themes/frozen */ "./node_modules/@amcharts/amcharts4/themes/frozen.js");
/* harmony import */ var _amcharts_amcharts4_themes_kelly__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @amcharts/amcharts4/themes/kelly */ "./node_modules/@amcharts/amcharts4/themes/kelly.js");
/* harmony import */ var _amcharts_amcharts4_themes_material__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @amcharts/amcharts4/themes/material */ "./node_modules/@amcharts/amcharts4/themes/material.js");
/* harmony import */ var _amcharts_amcharts4_themes_microchart__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @amcharts/amcharts4/themes/microchart */ "./node_modules/@amcharts/amcharts4/themes/microchart.js");
/* harmony import */ var _amcharts_amcharts4_themes_moonrisekingdom__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @amcharts/amcharts4/themes/moonrisekingdom */ "./node_modules/@amcharts/amcharts4/themes/moonrisekingdom.js");
/* harmony import */ var _amcharts_amcharts4_themes_patterns__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @amcharts/amcharts4/themes/patterns */ "./node_modules/@amcharts/amcharts4/themes/patterns.js");
/* harmony import */ var _amcharts_amcharts4_themes_spiritedaway__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @amcharts/amcharts4/themes/spiritedaway */ "./node_modules/@amcharts/amcharts4/themes/spiritedaway.js");
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./utils */ "./srcjs/utils/index.js");
/* harmony import */ var regression__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! regression */ "./node_modules/regression/dist/regression.js");
/* harmony import */ var regression__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(regression__WEBPACK_IMPORTED_MODULE_14__);
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }

function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }

function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

// jshint ignore: start















_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.options.queue = true; //am4core.options.onlyShowOnViewport = true;
//am4core.useTheme(am4themes_animated);

/* COMPONENT: VERTICAL BAR CHART */

class AmBarChart extends React.PureComponent {
  constructor(props) {
    super(props);
    this.style = this.style.bind(this);
    this.BarChart = this.BarChart.bind(this);
  }

  style() {
    if (window.Shiny && !window.FlexDashboard) {
      return {
        width: "100%",
        height: "100%"
      };
    } else {
      return {
        width: this.props.width,
        height: this.props.height
      };
    }
  }

  BarChart() {
    var theme = this.props.theme,
        animated = this.props.animated,
        threeD = this.props.threeD,
        chartLegend = this.props.legend,
        category = this.props.category,
        categories = this.props.data[category],
        values = this.props.values,
        minValue = this.props.minValue,
        maxValue = this.props.maxValue,
        hline = this.props.hline,
        data = HTMLWidgets.dataframeToD3(this.props.data),
        dataCopy = HTMLWidgets.dataframeToD3(_utils__WEBPACK_IMPORTED_MODULE_13__.subset(this.props.data, [category].concat(values))),
        data2 = this.props.data2 ? HTMLWidgets.dataframeToD3(_utils__WEBPACK_IMPORTED_MODULE_13__.subset(this.props.data2, values)) : null,
        valueNames = this.props.valueNames,
        showValues = this.props.showValues,
        cellWidth = this.props.cellWidth,
        columnWidth = this.props.columnWidth,
        xAxis = this.props.xAxis,
        yAxis = this.props.yAxis,
        draggable = this.props.draggable,
        tooltips = this.props.tooltip,
        valueFormatter = this.props.valueFormatter,
        columnStyles = this.props.columnStyle,
        bulletsStyle = this.props.bullets,
        alwaysShowBullets = this.props.alwaysShowBullets,
        cursor = this.props.cursor,
        chartId = this.props.chartId,
        shinyId = this.props.shinyId;

    if (window.Shiny) {
      if (shinyId === undefined) {
        shinyId = $(document.getElementById(chartId)).parent().attr("id");
      }

      Shiny.setInputValue(shinyId + ":rAmCharts4.dataframe", dataCopy);
    }

    if (animated) {
      _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_animated__WEBPACK_IMPORTED_MODULE_3__["default"]);
    }

    switch (theme) {
      case "dark":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_dark__WEBPACK_IMPORTED_MODULE_4__["default"]);
        break;

      case "dataviz":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_dataviz__WEBPACK_IMPORTED_MODULE_5__["default"]);
        break;

      case "frozen":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_frozen__WEBPACK_IMPORTED_MODULE_6__["default"]);
        break;

      case "kelly":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_kelly__WEBPACK_IMPORTED_MODULE_7__["default"]);
        break;

      case "material":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_material__WEBPACK_IMPORTED_MODULE_8__["default"]);
        break;

      case "microchart":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_microchart__WEBPACK_IMPORTED_MODULE_9__["default"]);
        break;

      case "moonrisekingdom":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_moonrisekingdom__WEBPACK_IMPORTED_MODULE_10__["default"]);
        break;

      case "patterns":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_patterns__WEBPACK_IMPORTED_MODULE_11__["default"]);
        break;

      case "spiritedaway":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_spiritedaway__WEBPACK_IMPORTED_MODULE_12__["default"]);
        break;
    }

    var chart;

    if (threeD) {
      chart = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.create(this.props.chartId, _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.XYChart3D);
    } else {
      chart = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.create(this.props.chartId, _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.XYChart);
    }

    chart.data = data;
    chart.hiddenState.properties.opacity = 0; // this makes initial fade in effect

    chart.padding(50, 40, 0, 10);
    chart.maskBullets = false; // allow bullets to go out of plot area

    var chartBackgroundColor = this.props.backgroundColor || chart.background.fill;
    chart.background.fill = chartBackgroundColor;
    /* ~~~~\  Enable export  /~~~~ */

    if (this.props.export) {
      chart.exporting.menu = new _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.ExportMenu();
      chart.exporting.menu.items = _utils__WEBPACK_IMPORTED_MODULE_13__.exportMenuItems;
    }
    /* 		 ~~~~\  title  /~~~~ 
        let chartTitle = this.props.chartTitle;
        if(chartTitle) {
          //let title = chart.plotContainer.createChild(am4core.Label);
          let title = chart.titles.create();
          title.text = chartTitle.text;
          title.fill =
            chartTitle.color || (theme === "dark" ? "#ffffff" : "#000000");
          title.fontSize = chartTitle.fontSize || 22;
          title.fontWeight = "bold";
          title.fontFamily = "Tahoma";
          //title.y = this.props.scrollbarX ? -56 : -42;
          //title.x = -45;
          //title.horizontalCenter = "left";
          //title.zIndex = 100;
          //title.fillOpacity = 1;
        }
     */

    /* ~~~~\  title  /~~~~ */


    var chartTitle = this.props.chartTitle;

    if (chartTitle) {
      var title = chart.titles.create();
      title.text = chartTitle.text.text;
      title.fill = chartTitle.text.color || (theme === "dark" ? "#ffffff" : "#000000");
      title.fontSize = chartTitle.text.fontSize || 22;
      title.fontWeight = chartTitle.text.fontWeight || "bold";
      title.fontFamily = chartTitle.text.fontFamily;
      title.align = chartTitle.align || "left";
      title.dy = -30;
    }
    /* ~~~~\  caption  /~~~~ */


    var chartCaption = this.props.caption;

    if (chartCaption) {
      var caption = chart.chartContainer.createChild(_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.Label);
      caption.text = chartCaption.text.text;
      caption.fill = chartCaption.text.color || (theme === "dark" ? "#ffffff" : "#000000");
      caption.fontSize = chartCaption.text.fontSize;
      caption.fontWeight = chartCaption.text.fontWeight;
      caption.fontFamily = chartCaption.text.fontFamily;
      caption.align = chartCaption.align || "right";
    }
    /* ~~~~\  image  /~~~~ */


    if (this.props.image) {
      _utils__WEBPACK_IMPORTED_MODULE_13__.Image(_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__, chart, this.props.image);
    }
    /* ~~~~\  scrollbars  /~~~~ */


    if (this.props.scrollbarX) {
      chart.scrollbarX = new _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.Scrollbar();
    }

    if (this.props.scrollbarY) {
      chart.scrollbarY = new _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.Scrollbar();
    }
    /* ~~~~\  button  /~~~~ */


    if (this.props.button) {
      var Button = chart.chartContainer.createChild(_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.Button);
      _utils__WEBPACK_IMPORTED_MODULE_13__.makeButton(Button, this.props.button);
      Button.events.on("hit", function () {
        for (var r = 0; r < data.length; ++r) {
          for (var v = 0; v < values.length; ++v) {
            chart.data[r][values[v]] = data2[r][values[v]];
          }
        }

        chart.invalidateRawData();

        if (window.Shiny) {
          Shiny.setInputValue(shinyId + ":rAmCharts4.dataframe", chart.data);
          Shiny.setInputValue(shinyId + "_change", null);
        }
      });
    }
    /* ~~~~\  Shiny message handler for bar chart  /~~~~ */


    if (window.Shiny) {
      Shiny.addCustomMessageHandler(shinyId + "bar", function (newdata) {
        /*if(!am4core.isObject(newdata)) { useless, there's a check in R
          return null;
        }*/
        var tail = " is missing in the data you supplied!"; // check that the received data has the 'category' column

        if (!newdata.hasOwnProperty(category)) {
          console.warn("updateAmBarChart: column \"".concat(category, "\"") + tail);
          return null;
        } // check that the received data has the necessary categories


        var ok = true,
            i = 0;

        while (ok && i < categories.length) {
          ok = newdata[category].indexOf(categories[i]) > -1;

          if (!ok) {
            console.warn("updateAmBarChart: category \"".concat(categories[i], "\"") + tail);
          }

          i++;
        }

        if (!ok) {
          return null;
        } // check that the received data has the necessary 'values' columns


        i = 0;

        while (ok && i < values.length) {
          ok = newdata.hasOwnProperty(values[i]);

          if (!ok) {
            console.warn("updateAmBarChart: column \"".concat(values[i], "\"") + tail);
          }

          i++;
        }

        if (!ok) {
          return null;
        } // update chart data


        var tnewdata = HTMLWidgets.dataframeToD3(newdata);

        for (var r = 0; r < data.length; ++r) {
          for (var v = 0; v < values.length; ++v) {
            chart.data[r][values[v]] = tnewdata[r][values[v]];
          }
        }

        chart.invalidateRawData();
        Shiny.setInputValue(shinyId + ":rAmCharts4.dataframe", tnewdata);
        Shiny.setInputValue(shinyId + "_change", null);
      });
    }
    /* ~~~~\  category axis  /~~~~ */


    var categoryAxis = chart.xAxes.push(new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.CategoryAxis());
    categoryAxis.paddingBottom = xAxis.adjust || 0;
    categoryAxis.renderer.grid.template.location = 0;
    categoryAxis.renderer.cellStartLocation = 1 - cellWidth / 100;
    categoryAxis.renderer.cellEndLocation = cellWidth / 100;

    if (xAxis && xAxis.title && xAxis.title.text !== "") {
      categoryAxis.title.text = xAxis.title.text || category;
      categoryAxis.title.fontWeight = "bold";
      categoryAxis.title.fontSize = xAxis.title.fontSize || 20;
      categoryAxis.title.fill = xAxis.title.color || (theme === "dark" ? "#ffffff" : "#000000");
    }

    var xAxisLabels = categoryAxis.renderer.labels.template;
    xAxisLabels.fontSize = xAxis.labels.fontSize || 17;
    xAxisLabels.rotation = xAxis.labels.rotation || 0;

    if (xAxisLabels.rotation !== 0) {
      xAxisLabels.horizontalCenter = "right";
    }

    xAxisLabels.fill = xAxis.labels.color || (theme === "dark" ? "#ffffff" : "#000000");
    categoryAxis.dataFields.category = category;
    categoryAxis.renderer.grid.template.disabled = true;
    categoryAxis.renderer.minGridDistance = 50;
    categoryAxis.cursorTooltipEnabled = false;
    categoryAxis.events.on("startchanged", _utils__WEBPACK_IMPORTED_MODULE_13__.onAxisZoomed);
    categoryAxis.events.on("endchanged", _utils__WEBPACK_IMPORTED_MODULE_13__.onAxisZoomed);
    /* ~~~~\  value axis  /~~~~ */

    var valueAxis = _utils__WEBPACK_IMPORTED_MODULE_13__.createAxis("Y", _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__, _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__, chart, yAxis, minValue, maxValue, false, theme, cursor);
    /*		let valueAxis = chart.yAxes.push(new am4charts.ValueAxis());
        valueAxis.paddingRight = yAxis.adjust || 0;
        if(yAxis.title && yAxis.title.text !== "") {
          valueAxis.title.text = yAxis.title.text;
          valueAxis.title.fontWeight = "bold";
          valueAxis.title.fontSize = yAxis.title.fontSize || 20;
          valueAxis.title.fill =
            yAxis.title.color || (theme === "dark" ? "#ffffff" : "#000000");
        }
        if(yAxis.labels && yAxis.labels.formatter) {
          valueAxis.numberFormatter = new am4core.NumberFormatter();
          valueAxis.numberFormatter.numberFormat = yAxis.labels.formatter;
          valueAxis.adjustLabelPrecision = false;
        }
        if(yAxis.gridLines && !yAxis.breaks) {
          valueAxis.renderer.grid.template.stroke =
            yAxis.gridLines.color || (theme === "dark" ? "#ffffff" : "#000000");
          valueAxis.renderer.grid.template.strokeOpacity = 
            yAxis.gridLines.opacity || 0.2;
          valueAxis.renderer.grid.template.strokeWidth = 
            yAxis.gridLines.width || 1;
          if(yAxis.gridLines.dash) {
            valueAxis.renderer.grid.template.strokeDasharray = 
              yAxis.gridLines.dash;
          }
        } else {
          valueAxis.renderer.grid.template.disabled = true;
        }
        if(yAxis.breaks) {
          valueAxis.renderer.labels.template.disabled = true;
          utils.createGridLines(
            am4core, valueAxis, yAxis.breaks, yAxis.gridLines, yAxis.labels, theme
          );
        } else {
          let yAxisLabels = valueAxis.renderer.labels.template;
          yAxisLabels.fontSize = yAxis.labels.fontSize || 17;
          yAxisLabels.rotation = yAxis.labels.rotation || 0;
          yAxisLabels.fill =
            yAxis.labels.color || (theme === "dark" ? "#ffffff" : "#000000");  
        }
        // we set fixed min/max and strictMinMax to true, as otherwise value axis will adjust min/max while dragging and it won't look smooth
        valueAxis.strictMinMax = true;
        valueAxis.min = this.props.minValue;
        valueAxis.max = this.props.maxValue;
        valueAxis.renderer.minWidth = 60;
        if(cursor) {
          if(cursor.tooltip)
            valueAxis.tooltip = utils.Tooltip(am4core, chart, 0, cursor.tooltip);
          if(cursor.extraTooltipPrecision)
            valueAxis.extraTooltipPrecision = cursor.extraTooltipPrecision;
          if(cursor.renderer)
            valueAxis.adapter.add("getTooltipText", cursor.renderer);
        } else {
          valueAxis.cursorTooltipEnabled = false;
        }
        */

    /* ~~~~\  horizontal line  /~~~~ */

    if (hline) {
      var range = valueAxis.axisRanges.create();
      range.value = hline.value;
      range.grid.stroke = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.color(hline.line.color);
      range.grid.strokeWidth = hline.line.width;
      range.grid.strokeOpacity = hline.line.opacity;
      range.grid.strokeDasharray = hline.line.dash;
    }
    /* ~~~~\  cursor  /~~~~ */


    if (cursor) {
      chart.cursor = new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.XYCursor();
      chart.cursor.yAxis = valueAxis;
      chart.cursor.lineX.disabled = true;
    }
    /* ~~~~\  legend  /~~~~ */


    if (chartLegend) {
      chart.legend = new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.Legend();
      var legendPosition = chartLegend.position || "bottom";
      chart.legend.position = legendPosition;

      if (legendPosition === "bottom" || legendPosition === "top") {
        chart.legend.maxHeight = chartLegend.maxHeight;
        chart.legend.scrollable = chartLegend.scrollable;
      } else {
        chart.legend.maxWidth = chartLegend.maxWidth;
      }

      chart.legend.useDefaultMarker = false;
      var markerTemplate = chart.legend.markers.template;
      markerTemplate.width = chartLegend.itemsWidth || 20;
      markerTemplate.height = chartLegend.itemsHeight || 20; // markerTemplate.strokeWidth = 1;
      // markerTemplate.strokeOpacity = 1;

      chart.legend.itemContainers.template.events.on("over", function (ev) {
        ev.target.dataItem.dataContext.columns.each(function (x) {
          x.column.isHover = true;
        });
      });
      chart.legend.itemContainers.template.events.on("out", function (ev) {
        ev.target.dataItem.dataContext.columns.each(function (x) {
          x.column.isHover = false;
        });
      });
    }
    /* ~~~~\  function handling the drag event  /~~~~ */


    function handleDrag(event) {
      var dataItem = event.target.dataItem; // convert coordinate to value

      var value = valueAxis.yToValue(event.target.pixelY); // set new value

      dataItem.valueY = value; // make column hover

      dataItem.column.isHover = true; // hide tooltip not to interrupt

      dataItem.column.hideTooltip(0); // make bullet hovered (as it might hide if mouse moves away)

      event.target.isHover = true;
    }
    /* 
      trigger the "positionchanged" event on bullets when a resizing occurs, 
      otherwise bullets are unresponsive  
    */


    chart.events.on("sizechanged", event => {
      event.target.series.each(function (s) {
        s.bulletsContainer.children.each(function (b) {
          b.dispatchImmediately("positionchanged");
        });
      });
    });
    values.forEach(function (value, index) {
      var series;

      if (threeD) {
        series = chart.series.push(new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.ColumnSeries3D());
      } else {
        series = chart.series.push(new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.ColumnSeries());
      }

      series.dataFields.categoryX = category;
      series.dataFields.valueY = value;
      series.name = valueNames[value];
      series.sequencedInterpolation = true;
      series.defaultState.interpolationDuration = 1500;
      /* ~~~~\  value label  /~~~~ */

      var valueLabel;

      if (showValues) {
        valueLabel = new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.LabelBullet();
        series.bullets.push(valueLabel);
        valueLabel.label.text = "{valueY.value.formatNumber('" + valueFormatter + "')}";
        valueLabel.label.hideOversized = true;
        valueLabel.label.truncate = false;
        valueLabel.strokeOpacity = 0;
        valueLabel.adapter.add("dy", (x, target) => {
          if (target.dataItem.valueY > 0) {
            return -10;
          } else {
            return 10;
          }
        });
      }
      /* ~~~~\  bullet  /~~~~ */


      var bullet;
      var columnStyle = columnStyles[value],
          color = columnStyle.color || chart.colors.getIndex(index),
          strokeColor = columnStyle.strokeColor || _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.color(columnStyle.color).lighten(-0.5);

      if (alwaysShowBullets || draggable[value]) {
        bullet = series.bullets.create();

        if (!alwaysShowBullets) {
          bullet.opacity = 0; // initially invisible

          bullet.defaultState.properties.opacity = 0;
        } // add sprite to bullet


        var shapeConfig = bulletsStyle[value];

        if (!shapeConfig.color) {
          shapeConfig.color = color;
        }

        if (!shapeConfig.strokeColor) {
          shapeConfig.strokeColor = strokeColor;
        }

        var shape = _utils__WEBPACK_IMPORTED_MODULE_13__.Shape(_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__, chart, index, bullet, shapeConfig);
      }

      if (draggable[value]) {
        // resize cursor when over
        bullet.cursorOverStyle = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.MouseCursorStyle.verticalResize;
        bullet.draggable = true; // create bullet hover state

        var hoverState = bullet.states.create("hover");
        hoverState.properties.opacity = 1; // visible when hovered
        // while dragging

        bullet.events.on("drag", event => {
          handleDrag(event);
        }); // on dragging stop

        bullet.events.on("dragstop", event => {
          handleDrag(event);
          var dataItem = event.target.dataItem;
          dataItem.column.isHover = false;
          event.target.isHover = false;
          dataCopy[dataItem.index][value] = dataItem.values.valueY.value;

          if (window.Shiny) {
            Shiny.setInputValue(shinyId + ":rAmCharts4.dataframe", dataCopy);
            Shiny.setInputValue(shinyId + "_change", {
              index: dataItem.index + 1,
              category: dataItem.categoryX,
              field: value,
              value: dataItem.values.valueY.value
            });
          }
        });
      }
      /* ~~~~\  column template  /~~~~ */


      var columnTemplate = series.columns.template;
      columnTemplate.width = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.percent(columnWidth);
      columnTemplate.fill = color;

      if (columnStyle.colorAdapter) {
        // columnTemplate.adapter.add("fill", (x, target) => {
        //   let item = target.dataItem;
        //   let value = item.valueY;
        //   //
        //   let colors = ["red", "green", "blue", "yellow", "crimson", "fuchsia"];
        //   let color = colors[index];
        //   //
        //   return color;
        // });
        columnTemplate.adapter.add("fill", columnStyle.colorAdapter);

        if (!columnStyle.strokeColor && !columnStyle.strokeColorAdapter) {
          columnTemplate.adapter.add("stroke", (x, target) => {
            var color = columnStyle.colorAdapter(x, target);
            return _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.color(color).lighten(-0.5);
          });
        }
      }

      columnTemplate.stroke = strokeColor;

      if (columnStyle.strokeColorAdapter) {
        columnTemplate.adapter.add("stroke", columnStyle.strokeColorAdapter);
      }

      columnTemplate.strokeOpacity = 1;
      columnTemplate.column.fillOpacity = columnStyle.opacity || (threeD ? 1 : 0.8);
      columnTemplate.column.strokeWidth = columnStyle.strokeWidth || 4;
      /* ~~~~\  tooltip  /~~~~ */

      if (tooltips) {
        columnTemplate.tooltipText = tooltips[value].text;
        var tooltip = _utils__WEBPACK_IMPORTED_MODULE_13__.Tooltip(_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__, chart, index, tooltips[value]);
        tooltip.pointerOrientation = "vertical";
        tooltip.dy = 0;
        tooltip.adapter.add("rotation", (x, target) => {
          if (target.dataItem) {
            if (target.dataItem.valueY >= 0) {
              return 0;
            } else {
              return 180;
            }
          } else {
            return x;
          }
        });
        tooltip.label.adapter.add("verticalCenter", (x, target) => {
          if (target.dataItem) {
            if (target.dataItem.valueY >= 0) {
              return "none";
            } else {
              return "bottom";
            }
          } else {
            return x;
          }
        });
        tooltip.label.adapter.add("rotation", (x, target) => {
          if (target.dataItem) {
            if (target.dataItem.valueY >= 0) {
              return 0;
            } else {
              return 180;
            }
          } else {
            return x;
          }
        });
        columnTemplate.tooltip = tooltip;
        columnTemplate.adapter.add("tooltipY", (x, target) => {
          if (target.dataItem.valueY > 0) {
            return 0;
          } else {
            return -valueAxis.valueToPoint(maxValue - target.dataItem.valueY).y;
          }
        });
      }

      var cr = columnStyle.cornerRadius || 8;
      columnTemplate.column.adapter.add("cornerRadiusTopRight", (x, target) => {
        if (target.dataItem.valueY > 0) {
          return target.isHover ? 2 * cr : cr;
        } else {
          return 0;
        }
      });
      columnTemplate.column.adapter.add("cornerRadiusBottomRight", (x, target) => {
        if (target.dataItem.valueY > 0) {
          return 0;
        } else {
          return target.isHover ? 2 * cr : cr;
        }
      });
      columnTemplate.column.adapter.add("cornerRadiusTopLeft", (x, target) => {
        if (target.dataItem.valueY > 0) {
          return target.isHover ? 2 * cr : cr;
        } else {
          return 0;
        }
      });
      columnTemplate.column.adapter.add("cornerRadiusBottomLeft", (x, target) => {
        if (target.dataItem.valueY > 0) {
          return 0;
        } else {
          return target.isHover ? 2 * cr : cr;
        }
      }); // columns hover state

      var columnHoverState = columnTemplate.column.states.create("hover"); // you can change any property on hover state and it will be animated

      columnHoverState.properties.fillOpacity = 1;
      columnHoverState.properties.strokeWidth = columnStyle.strokeWidth + 2;

      if (tooltips && showValues) {
        // hide label when hovered because the tooltip is shown
        columnTemplate.events.on("over", event => {
          var dataItem = event.target.dataItem;
          var itemLabelBullet = dataItem.bullets.getKey(valueLabel.uid);
          itemLabelBullet.fillOpacity = 0;
        }); // show label when mouse is out

        columnTemplate.events.on("out", event => {
          var dataItem = event.target.dataItem;
          var itemLabelBullet = dataItem.bullets.getKey(valueLabel.uid);
          itemLabelBullet.fillOpacity = 1;
        });
      }

      if (draggable[value]) {
        // start dragging bullet even if we hit on column not just a bullet, this will make it more friendly for touch devices
        columnTemplate.events.on("down", event => {
          var dataItem = event.target.dataItem;
          var itemBullet = dataItem.bullets.getKey(bullet.uid);
          itemBullet.dragStart(event.pointer);
        }); // when columns position changes, adjust minX/maxX of bullets so that we could only dragg vertically

        columnTemplate.events.on("positionchanged", event => {
          var dataItem = event.target.dataItem;

          if (dataItem.bullets) {
            //console.log('dataItem.bullets', dataItem.bullets);
            //console.log('bullet.uid', bullet.uid);
            var itemBullet = dataItem.bullets.getKey(bullet.uid);
            var column = dataItem.column;
            itemBullet.minX = column.pixelX + column.pixelWidth / 2;
            itemBullet.maxX = itemBullet.minX;
            itemBullet.minY = 0;
            itemBullet.maxY = chart.seriesContainer.pixelHeight;
          }
        });
      }
    });
    return chart;
  }

  componentDidMount() {
    this.chart = this.BarChart();
  }

  componentDidUpdate() {
    if (this.chart) {
      this.chart.dispose();
    }

    this.chart = this.BarChart();
  }

  componentWillUnmount() {
    if (this.chart) {
      this.chart.dispose();
    }
  }

  render() {
    return /*#__PURE__*/React.createElement("div", {
      key: this.props.chartId,
      id: this.props.chartId,
      style: this.style()
    });
  }

}
/* COMPONENT: HORIZONTAL BAR CHART */


class AmHorizontalBarChart extends React.PureComponent {
  constructor(props) {
    super(props);
    this.style = this.style.bind(this);
    this.HorizontalBarChart = this.HorizontalBarChart.bind(this);
  }

  style() {
    if (window.Shiny && !window.FlexDashboard) {
      return {
        width: "100%",
        height: "100%"
      };
    } else {
      return {
        width: this.props.width,
        height: this.props.height
      };
    }
  }

  HorizontalBarChart() {
    var theme = this.props.theme,
        animated = this.props.animated,
        threeD = this.props.threeD,
        chartLegend = this.props.legend,
        category = this.props.category,
        categories = this.props.data[category],
        values = this.props.values,
        vline = this.props.vline,
        data = HTMLWidgets.dataframeToD3(this.props.data),
        dataCopy = HTMLWidgets.dataframeToD3(_utils__WEBPACK_IMPORTED_MODULE_13__.subset(this.props.data, [category].concat(values))),
        data2 = this.props.data2 ? HTMLWidgets.dataframeToD3(_utils__WEBPACK_IMPORTED_MODULE_13__.subset(this.props.data2, values)) : null,
        valueNames = this.props.valueNames,
        showValues = this.props.showValues,
        minValue = this.props.minValue,
        maxValue = this.props.maxValue,
        cellWidth = this.props.cellWidth,
        columnWidth = this.props.columnWidth,
        xAxis = this.props.xAxis,
        yAxis = this.props.yAxis,
        cursor = this.props.cursor,
        draggable = this.props.draggable,
        tooltips = this.props.tooltip,
        valueFormatter = this.props.valueFormatter,
        columnStyles = this.props.columnStyle,
        bulletsStyle = this.props.bullets,
        alwaysShowBullets = this.props.alwaysShowBullets,
        chartId = this.props.chartId,
        shinyId = this.props.shinyId;

    if (window.Shiny) {
      if (shinyId === undefined) {
        shinyId = $(document.getElementById(chartId)).parent().attr("id");
      }

      Shiny.setInputValue(shinyId + ":rAmCharts4.dataframe", dataCopy);
    }

    if (animated) {
      _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_animated__WEBPACK_IMPORTED_MODULE_3__["default"]);
    }

    switch (theme) {
      case "dark":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_dark__WEBPACK_IMPORTED_MODULE_4__["default"]);
        break;

      case "dataviz":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_dataviz__WEBPACK_IMPORTED_MODULE_5__["default"]);
        break;

      case "frozen":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_frozen__WEBPACK_IMPORTED_MODULE_6__["default"]);
        break;

      case "kelly":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_kelly__WEBPACK_IMPORTED_MODULE_7__["default"]);
        break;

      case "material":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_material__WEBPACK_IMPORTED_MODULE_8__["default"]);
        break;

      case "microchart":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_microchart__WEBPACK_IMPORTED_MODULE_9__["default"]);
        break;

      case "moonrisekingdom":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_moonrisekingdom__WEBPACK_IMPORTED_MODULE_10__["default"]);
        break;

      case "patterns":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_patterns__WEBPACK_IMPORTED_MODULE_11__["default"]);
        break;

      case "spiritedaway":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_spiritedaway__WEBPACK_IMPORTED_MODULE_12__["default"]);
        break;
    }

    var chart;

    if (threeD) {
      chart = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.create(this.props.chartId, _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.XYChart3D);
    } else {
      chart = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.create(this.props.chartId, _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.XYChart);
    }

    chart.data = data;
    chart.hiddenState.properties.opacity = 0; // this makes initial fade in effect

    chart.padding(50, 40, 0, 10);
    chart.maskBullets = false; // allow bullets to go out of plot area

    var chartBackgroundColor = this.props.backgroundColor || chart.background.fill;
    chart.background.fill = chartBackgroundColor;
    /* ~~~~\  Enable export  /~~~~ */

    if (this.props.export) {
      chart.exporting.menu = new _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.ExportMenu();
      chart.exporting.menu.items = _utils__WEBPACK_IMPORTED_MODULE_13__.exportMenuItems;
    }
    /* ~~~~\  title  /~~~~ */


    var chartTitle = this.props.chartTitle;

    if (chartTitle) {
      var title = chart.titles.create();
      title.text = chartTitle.text.text;
      title.fill = chartTitle.text.color || (theme === "dark" ? "#ffffff" : "#000000");
      title.fontSize = chartTitle.text.fontSize || 22;
      title.fontWeight = chartTitle.text.fontWeight || "bold";
      title.fontFamily = chartTitle.text.fontFamily;
      title.align = chartTitle.align || "left";
      title.dy = -30;
    }
    /* ~~~~\  caption  /~~~~ */


    var chartCaption = this.props.caption;

    if (chartCaption) {
      var caption = chart.chartContainer.createChild(_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.Label);
      caption.text = chartCaption.text.text;
      caption.fill = chartCaption.text.color || (theme === "dark" ? "#ffffff" : "#000000");
      caption.fontSize = chartCaption.text.fontSize;
      caption.fontWeight = chartCaption.text.fontWeight;
      caption.fontFamily = chartCaption.text.fontFamily;
      caption.align = chartCaption.align || "right";
    }
    /* ~~~~\  image  /~~~~ */


    if (this.props.image) {
      _utils__WEBPACK_IMPORTED_MODULE_13__.Image(_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__, chart, this.props.image);
    }
    /* ~~~~\  scrollbars  /~~~~ */


    if (this.props.scrollbarX) {
      chart.scrollbarX = new _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.Scrollbar();
    }

    if (this.props.scrollbarY) {
      chart.scrollbarY = new _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.Scrollbar();
    }
    /* ~~~~\  button  /~~~~ */


    if (this.props.button) {
      var Button = chart.chartContainer.createChild(_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.Button);
      _utils__WEBPACK_IMPORTED_MODULE_13__.makeButton(Button, this.props.button);
      Button.events.on("hit", function () {
        for (var r = 0; r < data.length; ++r) {
          for (var v = 0; v < values.length; ++v) {
            chart.data[r][values[v]] = data2[r][values[v]];
          }
        }

        chart.invalidateRawData();

        if (window.Shiny) {
          Shiny.setInputValue(shinyId + ":rAmCharts4.dataframe", chart.data);
          Shiny.setInputValue(shinyId + "_change", null);
        }
      });
    }
    /* ~~~~\  Shiny message handler for horizontal bar chart  /~~~~ */


    if (window.Shiny) {
      Shiny.addCustomMessageHandler(shinyId + "bar", function (newdata) {
        var tail = " is missing in the data you supplied!"; // check that the received data has the 'category' column

        if (!newdata.hasOwnProperty(category)) {
          console.warn("updateAmBarChart: column \"".concat(category, "\"") + tail);
          return null;
        } // check that the received data has the necessary categories


        var ok = true,
            i = 0;

        while (ok && i < categories.length) {
          ok = newdata[category].indexOf(categories[i]) > -1;

          if (!ok) {
            console.warn("updateAmBarChart: category \"".concat(categories[i], "\"") + tail);
          }

          i++;
        }

        if (!ok) {
          return null;
        } // check that the received data has the necessary 'values' columns


        i = 0;

        while (ok && i < values.length) {
          ok = newdata.hasOwnProperty(values[i]);

          if (!ok) {
            console.warn("updateAmBarChart: column \"".concat(values[i], "\"") + tail);
          }

          i++;
        }

        if (!ok) {
          return null;
        } // update chart data


        var tnewdata = HTMLWidgets.dataframeToD3(newdata);

        for (var r = 0; r < data.length; ++r) {
          for (var v = 0; v < values.length; ++v) {
            chart.data[r][values[v]] = tnewdata[r][values[v]];
          }
        }

        chart.invalidateRawData();
        Shiny.setInputValue(shinyId + ":rAmCharts4.dataframe", tnewdata);
        Shiny.setInputValue(shinyId + "_change", null);
      });
    }
    /* ~~~~\  category axis  /~~~~ */


    var categoryAxis = chart.yAxes.push(new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.CategoryAxis());
    categoryAxis.paddingRight = yAxis.adjust || 0;
    categoryAxis.renderer.inversed = true;
    categoryAxis.renderer.grid.template.location = 0;
    categoryAxis.renderer.cellStartLocation = 1 - cellWidth / 100;
    categoryAxis.renderer.cellEndLocation = cellWidth / 100;

    if (yAxis && yAxis.title && yAxis.title.text !== "") {
      categoryAxis.title.text = yAxis.title.text || category;
      categoryAxis.title.fontWeight = "bold";
      categoryAxis.title.fontSize = yAxis.title.fontSize || 20;
      categoryAxis.title.fill = yAxis.title.color || (theme === "dark" ? "#ffffff" : "#000000");
    }

    var yAxisLabels = categoryAxis.renderer.labels.template;
    yAxisLabels.fontSize = yAxis.labels.fontSize || 17;
    yAxisLabels.rotation = yAxis.labels.rotation || 0;
    yAxisLabels.fill = yAxis.labels.color || (theme === "dark" ? "#ffffff" : "#000000");
    categoryAxis.dataFields.category = category;
    categoryAxis.renderer.grid.template.disabled = true;
    categoryAxis.renderer.minGridDistance = 50; //		categoryAxis.numberFormatter.numberFormat = valueFormatter;

    categoryAxis.cursorTooltipEnabled = false;
    categoryAxis.events.on("startchanged", _utils__WEBPACK_IMPORTED_MODULE_13__.onAxisZoomed);
    categoryAxis.events.on("endchanged", _utils__WEBPACK_IMPORTED_MODULE_13__.onAxisZoomed);
    /* ~~~~\  value axis  /~~~~ */

    var valueAxis = _utils__WEBPACK_IMPORTED_MODULE_13__.createAxis("X", _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__, _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__, chart, xAxis, minValue, maxValue, false, theme, cursor);
    /* ~~~~\  vertical line  /~~~~ */

    if (vline) {
      var range = valueAxis.axisRanges.create();
      range.value = vline.value;
      range.grid.stroke = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.color(vline.line.color);
      range.grid.strokeWidth = vline.line.width;
      range.grid.strokeOpacity = vline.line.opacity;
      range.grid.strokeDasharray = vline.line.dash;
    }
    /* ~~~~\  cursor  /~~~~ */


    if (cursor) {
      chart.cursor = new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.XYCursor();
      chart.cursor.xAxis = valueAxis;
      chart.cursor.lineY.disabled = true;
    }
    /* ~~~~\  legend  /~~~~ */


    if (chartLegend) {
      chart.legend = new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.Legend();
      var legendPosition = chartLegend.position || "bottom";
      chart.legend.position = legendPosition;

      if (legendPosition === "bottom" || legendPosition === "top") {
        chart.legend.maxHeight = chartLegend.maxHeight;
        chart.legend.scrollable = chartLegend.scrollable;
      } else {
        chart.legend.maxWidth = chartLegend.maxWidth;
      }

      chart.legend.useDefaultMarker = false;
      var markerTemplate = chart.legend.markers.template;
      markerTemplate.width = chartLegend.itemsWidth || 20;
      markerTemplate.height = chartLegend.itemsHeight || 20; //markerTemplate.strokeWidth = 1;
      //markerTemplate.strokeOpacity = 1;

      chart.legend.itemContainers.template.events.on("over", function (ev) {
        ev.target.dataItem.dataContext.columns.each(function (x) {
          x.column.isHover = true;
        });
      });
      chart.legend.itemContainers.template.events.on("out", function (ev) {
        ev.target.dataItem.dataContext.columns.each(function (x) {
          x.column.isHover = false;
        });
      }); //      markerTemplate.stroke = am4core.color("#000000"); no effect
    }
    /* ~~~~\  function handling the drag event  /~~~~ */


    function handleDrag(event) {
      var dataItem = event.target.dataItem; // convert coordinate to value

      var value = valueAxis.xToValue(event.target.pixelX); // set new value

      dataItem.valueX = value; // make column hover

      dataItem.column.isHover = true; // hide tooltip not to interrupt

      dataItem.column.hideTooltip(0); // make bullet hovered (as it might hide if mouse moves away)

      event.target.isHover = true;
    }
    /* 
      trigger the "positionchanged" event on bullets when a resizing occurs, 
      otherwise bullets are unresponsive  
    */


    chart.events.on("sizechanged", event => {
      event.target.series.each(function (s) {
        s.bulletsContainer.children.each(function (b) {
          b.dispatchImmediately("positionchanged");
        });
      });
    });
    values.forEach(function (value, index) {
      var series;

      if (threeD) {
        series = chart.series.push(new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.ColumnSeries3D());
      } else {
        series = chart.series.push(new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.ColumnSeries());
      }

      series.dataFields.categoryY = category;
      series.dataFields.valueX = value;
      series.name = valueNames[value];
      series.sequencedInterpolation = true;
      series.defaultState.interpolationDuration = 1500;
      /* ~~~~\  value label  /~~~~ */

      var valueLabel;

      if (showValues) {
        valueLabel = new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.LabelBullet();
        series.bullets.push(valueLabel);
        valueLabel.label.text = "{valueX.value.formatNumber('" + valueFormatter + "')}";
        valueLabel.label.hideOversized = true;
        valueLabel.label.truncate = false;
        valueLabel.strokeOpacity = 0;
        valueLabel.adapter.add("dx", (x, target) => {
          if (target.dataItem.valueX > 0) {
            return -10;
          } else {
            return 10;
          }
        });
        valueLabel.label.adapter.add("horizontalCenter", (x, target) => {
          if (target.dataItem.valueX > 0) {
            return "left";
          } else {
            return "right";
          }
        });
        valueLabel.label.adapter.add("dx", (x, target) => {
          if (target.dataItem.valueX > 0) {
            return 13;
          } else {
            return -13;
          }
        });
      }
      /* ~~~~\  bullet  /~~~~ */


      var bullet;
      var columnStyle = columnStyles[value];

      if (alwaysShowBullets || draggable[value]) {
        bullet = series.bullets.create();

        if (!alwaysShowBullets) {
          bullet.opacity = 0; // initially invisible

          bullet.defaultState.properties.opacity = 0;
        } // add sprite to bullet


        var shapeConfig = bulletsStyle[value];

        if (!shapeConfig.color) {
          shapeConfig.color = columnStyle.color;
        }

        if (!shapeConfig.strokeColor) {
          shapeConfig.strokeColor = columnStyle.strokeColor;
        }

        var shape = _utils__WEBPACK_IMPORTED_MODULE_13__.Shape(_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__, chart, index, bullet, shapeConfig);
      }

      if (draggable[value]) {
        // resize cursor when over
        bullet.cursorOverStyle = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.MouseCursorStyle.horizontalResize;
        bullet.draggable = true; // create bullet hover state

        var hoverState = bullet.states.create("hover");
        hoverState.properties.opacity = 1; // visible when hovered
        // while dragging

        bullet.events.on("drag", event => {
          handleDrag(event);
        }); // on dragging stop

        bullet.events.on("dragstop", event => {
          handleDrag(event);
          var dataItem = event.target.dataItem;
          dataItem.column.isHover = false;
          event.target.isHover = false;
          dataCopy[dataItem.index][value] = dataItem.values.valueX.value;

          if (window.Shiny) {
            Shiny.setInputValue(shinyId + ":rAmCharts4.dataframe", dataCopy);
            Shiny.setInputValue(shinyId + "_change", {
              index: dataItem.index + 1,
              category: dataItem.categoryY,
              field: value,
              value: dataItem.values.valueX.value
            });
          }
        });
      }
      /* ~~~~\  column template  /~~~~ */


      var columnTemplate = series.columns.template;
      columnTemplate.height = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.percent(columnWidth);
      columnTemplate.fill = columnStyle.color || chart.colors.getIndex(index);
      columnTemplate.stroke = columnStyle.strokeColor || _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.color(columnTemplate.fill).lighten(-0.5);
      columnTemplate.strokeOpacity = 1;
      columnTemplate.column.fillOpacity = columnStyle.opacity || (threeD ? 1 : 0.8);
      columnTemplate.column.strokeWidth = columnStyle.strokeWidth;
      /* ~~~~\  tooltip  /~~~~ */

      if (tooltips) {
        columnTemplate.tooltipText = tooltips[value].text;
        var tooltip = _utils__WEBPACK_IMPORTED_MODULE_13__.Tooltip(_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__, chart, index, tooltips[value]);
        tooltip.pointerOrientation = "horizontal";
        tooltip.dx = 0;
        tooltip.rotation = 180;
        tooltip.label.verticalCenter = "bottom";
        tooltip.label.rotation = 180;
        /*      tooltip.adapter.add("rotation", (x, target) => {
                  if(target.dataItem.valueY >= 0) {
                    return 0;
                  } else {
                    return 180;
                  }
                });
                tooltip.label.adapter.add("verticalCenter", (x, target) => {
                  if(target.dataItem.valueY >= 0) {
                    return "none";
                  } else {
                    return "bottom";
                  }
                });
                tooltip.label.adapter.add("rotation", (x, target) => {
                  if(target.dataItem.valueY >= 0) {
                    return 0;
                  } else {
                    return 180;
                  }
                });
                */

        columnTemplate.tooltip = tooltip;
        columnTemplate.adapter.add("tooltipX", (x, target) => {
          if (target.dataItem.valueX > 0) {
            return valueAxis.valueToPoint(target.dataItem.valueX + minValue).x;
          } else {
            return 0;
          }
        });
      }

      var cr = columnStyle.cornerRadius || 8;
      columnTemplate.column.adapter.add("cornerRadiusTopRight", (x, target) => {
        if (target.dataItem.valueX > 0) {
          return target.isHover ? 2 * cr : cr;
        } else {
          return 0;
        }
      });
      columnTemplate.column.adapter.add("cornerRadiusBottomRight", (x, target) => {
        if (target.dataItem.valueX > 0) {
          return target.isHover ? 2 * cr : cr;
        } else {
          return 0;
        }
      });
      columnTemplate.column.adapter.add("cornerRadiusTopLeft", (x, target) => {
        if (target.dataItem.valueX > 0) {
          return 0;
        } else {
          return target.isHover ? 2 * cr : cr;
        }
      });
      columnTemplate.column.adapter.add("cornerRadiusBottomLeft", (x, target) => {
        if (target.dataItem.valueX > 0) {
          return 0;
        } else {
          return target.isHover ? 2 * cr : cr;
        }
      }); // columns hover state

      var columnHoverState = columnTemplate.column.states.create("hover"); // you can change any property on hover state and it will be animated

      columnHoverState.properties.fillOpacity = 1;
      columnHoverState.properties.strokeWidth = columnStyle.strokeWidth + 2;

      if (tooltips && showValues) {
        // hide label when hovered because the tooltip is shown
        columnTemplate.events.on("over", event => {
          var dataItem = event.target.dataItem;
          var itemLabelBullet = dataItem.bullets.getKey(valueLabel.uid);
          itemLabelBullet.fillOpacity = 0;
        }); // show label when mouse is out

        columnTemplate.events.on("out", event => {
          var dataItem = event.target.dataItem;
          var itemLabelBullet = dataItem.bullets.getKey(valueLabel.uid);
          itemLabelBullet.fillOpacity = 1;
        });
      }

      if (draggable[value]) {
        // start dragging bullet even if we hit on column not just a bullet, this will make it more friendly for touch devices
        columnTemplate.events.on("down", event => {
          var dataItem = event.target.dataItem;
          var itemBullet = dataItem.bullets.getKey(bullet.uid);
          itemBullet.dragStart(event.pointer);
        }); // when columns position changes, adjust minX/maxX of bullets so that we could only dragg horizontally

        columnTemplate.events.on("positionchanged", event => {
          var dataItem = event.target.dataItem;

          if (dataItem.bullets !== undefined) {
            var itemBullet = dataItem.bullets.getKey(bullet.uid);
            var column = dataItem.column;
            itemBullet.minY = column.pixelY + column.pixelHeight / 2;
            itemBullet.maxY = itemBullet.minY;
            itemBullet.minX = 0;
            itemBullet.maxX = chart.seriesContainer.pixelWidth;
          }
        });
      }
    });
    return chart;
  }

  componentDidMount() {
    this.chart = this.HorizontalBarChart();
  }

  componentDidUpdate() {
    if (this.chart) {
      this.chart.dispose();
    }

    this.chart = this.HorizontalBarChart();
  }

  componentWillUnmount() {
    if (this.chart) {
      this.chart.dispose();
    }
  }

  render() {
    return /*#__PURE__*/React.createElement("div", {
      key: this.props.chartId,
      id: this.props.chartId,
      style: this.style()
    });
  }

}
/* COMPONENT: LINE CHART */


class AmLineChart extends React.PureComponent {
  constructor(props) {
    super(props);
    this.style = this.style.bind(this);
    this.toggleHover = this.toggleHover.bind(this);
    this.LineChart = this.LineChart.bind(this);
  }

  style() {
    if (window.Shiny && !window.FlexDashboard) {
      return {
        width: "100%",
        height: "100%"
      };
    } else {
      return {
        width: this.props.width,
        height: this.props.height
      };
    }
  }

  toggleHover(series, over) {
    series.segments.each(function (segment) {
      segment.isHover = over;
    });
  }

  LineChart() {
    var theme = this.props.theme,
        animated = this.props.animated,
        chartLegend = this.props.legend,
        xValue = this.props.xValue,
        yValues = this.props.yValues,
        data = this.props.data,
        data2 = this.props.data2 ? HTMLWidgets.dataframeToD3(_utils__WEBPACK_IMPORTED_MODULE_13__.subset(this.props.data2, [xValue].concat(yValues))) : null,
        hline = this.props.hline,
        vline = this.props.vline,
        trendData0 = this.props.trendData,
        trendStyles = this.props.trendStyle,
        trendJS = this.props.trendJS,
        ribbonStyles = this.props.ribbonStyle,
        yValueNames = this.props.yValueNames,
        isDate = this.props.isDate,
        minX = isDate ? _utils__WEBPACK_IMPORTED_MODULE_13__.toUTCtime(this.props.minX) : this.props.minX,
        maxX = isDate ? _utils__WEBPACK_IMPORTED_MODULE_13__.toUTCtime(this.props.maxX) : this.props.maxX,
        minY = this.props.minY,
        maxY = this.props.maxY,
        xAxis = this.props.xAxis,
        yAxis = this.props.yAxis,
        draggable = this.props.draggable,
        tooltips = this.props.tooltip,
        bulletsStyle = this.props.bullets,
        alwaysShowBullets = this.props.alwaysShowBullets,
        lineStyles = this.props.lineStyle,
        cursor = this.props.cursor,
        zoomButtons = this.props.zoomButtons,
        chartId = this.props.chartId,
        shinyId = this.props.shinyId;

    if (isDate) {
      data[xValue] = data[xValue].map(_utils__WEBPACK_IMPORTED_MODULE_13__.toDate);

      if (trendData0) {
        for (var key in trendData0) {
          trendData0[key].x = trendData0[key].x.map(_utils__WEBPACK_IMPORTED_MODULE_13__.toDate);
        }
      }
    }

    data = HTMLWidgets.dataframeToD3(data); //let dataCopy = data.map(row => ({...row}));

    var dataCopy = data.map(row => _utils__WEBPACK_IMPORTED_MODULE_13__.subset(_objectSpread({}, row), [xValue].concat(yValues)));
    var trendData = trendData0 ? Object.assign({}, ...Object.keys(trendData0).map(k => ({
      [k]: HTMLWidgets.dataframeToD3(trendData0[k])
    }))) : null;

    if (window.Shiny) {
      if (shinyId === undefined) {
        shinyId = $(document.getElementById(chartId)).parent().attr("id");
      }

      if (isDate) {
        Shiny.setInputValue(shinyId + ":rAmCharts4.dataframeWithDate", {
          data: dataCopy,
          date: xValue
        });
      } else {
        Shiny.setInputValue(shinyId + ":rAmCharts4.dataframe", dataCopy);
      }
    }

    if (animated) {
      _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_animated__WEBPACK_IMPORTED_MODULE_3__["default"]);
    }

    switch (theme) {
      case "dark":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_dark__WEBPACK_IMPORTED_MODULE_4__["default"]);
        break;

      case "dataviz":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_dataviz__WEBPACK_IMPORTED_MODULE_5__["default"]);
        break;

      case "frozen":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_frozen__WEBPACK_IMPORTED_MODULE_6__["default"]);
        break;

      case "kelly":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_kelly__WEBPACK_IMPORTED_MODULE_7__["default"]);
        break;

      case "material":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_material__WEBPACK_IMPORTED_MODULE_8__["default"]);
        break;

      case "microchart":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_microchart__WEBPACK_IMPORTED_MODULE_9__["default"]);
        break;

      case "moonrisekingdom":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_moonrisekingdom__WEBPACK_IMPORTED_MODULE_10__["default"]);
        break;

      case "patterns":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_patterns__WEBPACK_IMPORTED_MODULE_11__["default"]);
        break;

      case "spiritedaway":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_spiritedaway__WEBPACK_IMPORTED_MODULE_12__["default"]);
        break;
    }

    var chart = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.create(this.props.chartId, _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.XYChart);
    chart.responsive.enabled = true;
    chart.data = data;
    chart.hiddenState.properties.opacity = 0; // this makes initial fade in effect

    chart.padding(50, 40, 0, 10);
    chart.maskBullets = false; // allow bullets to go out of plot area

    var chartBackgroundColor = this.props.backgroundColor || chart.background.fill;
    chart.background.fill = chartBackgroundColor;
    /* ~~~~\  Enable export  /~~~~ */

    if (this.props.export) {
      chart.exporting.menu = new _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.ExportMenu();
      chart.exporting.menu.items = _utils__WEBPACK_IMPORTED_MODULE_13__.exportMenuItems;
    }
    /* ~~~~\  title  /~~~~ */


    var chartTitle = this.props.chartTitle;

    if (chartTitle) {
      var title = chart.titles.create();
      title.text = chartTitle.text.text;
      title.fill = chartTitle.text.color || (theme === "dark" ? "#ffffff" : "#000000");
      title.fontSize = chartTitle.text.fontSize || 22;
      title.fontWeight = chartTitle.text.fontWeight || "bold";
      title.fontFamily = chartTitle.text.fontFamily;
      title.align = chartTitle.align || "left";
      title.dy = -30;
    }
    /* ~~~~\  caption  /~~~~ */


    var chartCaption = this.props.caption;

    if (chartCaption) {
      var caption = chart.chartContainer.createChild(_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.Label);
      caption.text = chartCaption.text.text;
      caption.fill = chartCaption.text.color || (theme === "dark" ? "#ffffff" : "#000000");
      caption.fontSize = chartCaption.text.fontSize;
      caption.fontWeight = chartCaption.text.fontWeight;
      caption.fontFamily = chartCaption.text.fontFamily;
      caption.align = chartCaption.align || "right";
    }
    /* ~~~~\  image  /~~~~ */


    if (this.props.image) {
      _utils__WEBPACK_IMPORTED_MODULE_13__.Image(_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__, chart, this.props.image);
    }
    /* ~~~~\  scrollbars  /~~~~ */


    if (this.props.scrollbarX) {
      chart.scrollbarX = new _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.Scrollbar();
    }

    if (this.props.scrollbarY) {
      chart.scrollbarY = new _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.Scrollbar();
    }
    /* ~~~~\  button  /~~~~ */


    if (this.props.button) {
      var Button = chart.chartContainer.createChild(_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.Button);
      _utils__WEBPACK_IMPORTED_MODULE_13__.makeButton(Button, this.props.button);
      Button.events.on("hit", function () {
        for (var r = 0; r < data.length; ++r) {
          for (var v = 0; v < yValues.length; ++v) {
            chart.data[r][yValues[v]] = data2[r][yValues[v]];
          }
        }

        chart.invalidateRawData();

        if (window.Shiny) {
          if (isDate) {
            Shiny.setInputValue(shinyId + ":rAmCharts4.dataframeWithDate", {
              data: chart.data,
              date: xValue
            });
            Shiny.setInputValue(shinyId + "_change", null);
          } else {
            Shiny.setInputValue(shinyId + ":rAmCharts4.dataframe", chart.data);
            Shiny.setInputValue(shinyId + "_change", null);
          }
        }

        if (trendJS) {
          var seriesNames = chart.series.values.map(function (x) {
            return x.name;
          });
          yValues.forEach(function (value, index) {
            if (trendJS[value]) {
              var thisSeriesName = yValueNames[value],
                  trendSeriesName = thisSeriesName + "_trend",
                  trendSeriesIndex = seriesNames.indexOf(trendSeriesName),
                  trendSeries = chart.series.values[trendSeriesIndex],
                  trendSeriesData = trendSeries.data,
                  regData = data2.map(function (row) {
                return [row[xValue], row[value]];
              }),
                  fit = regression__WEBPACK_IMPORTED_MODULE_14___default().polynomial(regData, {
                order: trendJS[value],
                precision: 15
              }),
                  regressionLine = trendSeriesData.map(function (row) {
                var xy = fit.predict(row.x);
                return {
                  x: xy[0],
                  y: xy[1]
                };
              });
              regressionLine.forEach(function (point, i) {
                trendSeriesData[i] = point;
              });
              trendSeries.invalidateData();
              var ribbonSeriesName = thisSeriesName + "_ribbon",
                  ribbonSeriesIndex = seriesNames.indexOf(ribbonSeriesName);

              if (ribbonSeriesIndex > -1) {
                var ribbonSeries = chart.series.values[ribbonSeriesIndex],
                    ribbonSeriesData = ribbonSeries.data,
                    y = data2.map(function (row) {
                  return row[value];
                }),
                    yhat = fit.points.map(function (point) {
                  return point[1];
                }),
                    ssq = 0;

                for (var i = 0; i < y.length; ++i) {
                  ssq += (y[i] - yhat[i]) * (y[i] - yhat[i]);
                }

                var sigma = Math.sqrt(ssq / (y.length - 1 - trendJS[value]));

                for (var _i = 0; _i < ribbonSeriesData.length; ++_i) {
                  var _yhat = trendSeriesData[_i].y,
                      delta = sigma * ribbonSeriesData[_i].seFactor;
                  ribbonSeriesData[_i].lwr = _yhat - delta;
                  ribbonSeriesData[_i].upr = _yhat + delta;
                }

                ribbonSeries.invalidateData();
              }
            }
          });
        }
      });
    }
    /* ~~~~\  x-axis  /~~~~ */


    var XAxis = _utils__WEBPACK_IMPORTED_MODULE_13__.createAxis("X", _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__, _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__, chart, xAxis, minX, maxX, isDate, theme, cursor, xValue);
    XAxis.events.on("startchanged", _utils__WEBPACK_IMPORTED_MODULE_13__.onAxisZoomed);
    XAxis.events.on("endchanged", _utils__WEBPACK_IMPORTED_MODULE_13__.onAxisZoomed);
    /*
        let XAxis, Xformatter;
        if(xAxis.labels && xAxis.labels.formatter) {
          Xformatter = xAxis.labels.formatter;
        }
        if(isDate) {
          XAxis = chart.xAxes.push(new am4charts.DateAxis());
          XAxis.dataFields.dateX = xValue;
          if(Xformatter) {
            XAxis.dateFormats.setKey("day", Xformatter.day[0]);
            if(Xformatter.day[1]) {
              XAxis.periodChangeDateFormats.setKey("day", Xformatter.day[1]);
            }
            XAxis.dateFormats.setKey("week", Xformatter.week[0]);
            if(Xformatter.week[1]) {
              XAxis.periodChangeDateFormats.setKey("week", Xformatter.week[1]);
            }
            XAxis.dateFormats.setKey("month", Xformatter.month[0]);
            if(Xformatter.month[1]) {
              XAxis.periodChangeDateFormats.setKey("month", Xformatter.month[1]);
            }
          }
        } else {
          XAxis = chart.xAxes.push(new am4charts.ValueAxis());
          XAxis.dataFields.valueX = xValue;
          if(Xformatter) {
            XAxis.numberFormatter = new am4core.NumberFormatter();
            XAxis.numberFormatter.numberFormat = Xformatter;
            XAxis.adjustLabelPrecision = false;
          }
        }
        if(xAxis) {
          XAxis.paddingBottom = xAxis.adjust || 0;
        }
        XAxis.strictMinMax = true;
        XAxis.min = minX;
        XAxis.max = maxX;
        if(xAxis && xAxis.title && xAxis.title.text !== "") {
          XAxis.title.text = xAxis.title.text || xValue;
          XAxis.title.fontWeight = "bold";
          XAxis.title.fontSize = xAxis.title.fontSize || 20;
          XAxis.title.fill =
            xAxis.title.color || (theme === "dark" ? "#ffffff" : "#000000");
        }
    
        let xBreaksType; 
        if(xAxis.breaks) { 
          xBreaksType = 
            typeof xAxis.breaks === "number" ? "interval" : 
            (Array.isArray(xAxis.breaks) ? "timeInterval" : 
            "breaks");
        }
    
        if(xAxis.gridLines) {
          if(xBreaksType === "interval")
            XAxis.renderer.minGridDistance = xAxis.breaks;
          XAxis.renderer.grid.template.stroke =
            xAxis.gridLines.color || (theme === "dark" ? "#ffffff" : "#000000");
          XAxis.renderer.grid.template.strokeOpacity = 
            xAxis.gridLines.opacity || 0.2;
          XAxis.renderer.grid.template.strokeWidth = 
            xAxis.gridLines.width || 1;
          if(xAxis.gridLines.dash) {
            XAxis.renderer.grid.template.strokeDasharray = 
              xAxis.gridLines.dash;
          }
        } else {
          XAxis.renderer.grid.template.disabled = true;
        }
        if(xBreaksType === "breaks") {
          XAxis.renderer.grid.template.disabled = true;
          XAxis.renderer.labels.template.disabled = true;
          if(isDate) {
            XAxis.renderer.minGridDistance = 10;
            XAxis.startLocation = 0.5; // ??
            XAxis.endLocation = 0.5; // ??
          }
          utils.createGridLines(
            am4core, XAxis, xAxis.breaks, xAxis.gridLines, 
            xAxis.labels, theme, isDate
          );
        } else {
          if(xBreaksType === "timeInterval") {
            XAxis.gridIntervals.setAll(xAxis.breaks);
            XAxis.renderer.grid.template.location = 0.5;
            XAxis.renderer.labels.template.location = 0.5;
            XAxis.startLocation = 0.5; // ??
            XAxis.endLocation = 0.5; // ??
          }
          let xAxisLabels = XAxis.renderer.labels.template;
          xAxisLabels.fontSize = xAxis.labels.fontSize || 17;
          xAxisLabels.rotation = xAxis.labels.rotation || 0;
          if(xAxisLabels.rotation !== 0) {
            xAxisLabels.horizontalCenter = "right";
          }
          xAxisLabels.fill =
            xAxis.labels.color || (theme === "dark" ? "#ffffff" : "#000000");
        }
        if(cursor &&
          (cursor === true || !cursor.axes || ["x","xy"].indexOf(cursor.axes)) > -1)
        {
          if(cursor.tooltip)
            XAxis.tooltip = utils.Tooltip(am4core, chart, 0, cursor.tooltip);
          if(cursor.extraTooltipPrecision)
            XAxis.extraTooltipPrecision = cursor.extraTooltipPrecision.x;
          if(cursor.renderer && cursor.renderer.x)
            XAxis.adapter.add("getTooltipText", cursor.renderer.x);
          if(cursor.dateFormat)
            XAxis.tooltipDateFormat = cursor.dateFormat;
        } else {
          XAxis.cursorTooltipEnabled = false;
        }
    */

    /* ~~~~\  y-axis  /~~~~ */

    var YAxis = _utils__WEBPACK_IMPORTED_MODULE_13__.createAxis("Y", _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__, _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__, chart, yAxis, minY, maxY, false, theme, cursor);
    /*		let YAxis = chart.yAxes.push(new am4charts.ValueAxis());
        if(yAxis) {
          YAxis.paddingRight = yAxis.adjust || 0;
        }
        YAxis.renderer.grid.template.stroke =
          gridLines.color || (theme === "dark" ? "#ffffff" : "#000000");
        YAxis.renderer.grid.template.strokeOpacity = gridLines.opacity || 0.15;
        YAxis.renderer.grid.template.strokeWidth = gridLines.width || 1;
        if(yAxis && yAxis.title && yAxis.title.text !== "") {
          YAxis.title.text = yAxis.title.text;
          YAxis.title.fontWeight = "bold";
          YAxis.title.fontSize = yAxis.title.fontSize || 20;
          YAxis.title.fill =
            yAxis.title.color || (theme === "dark" ? "#ffffff" : "#000000");
        }
        if(yAxis.labels) {
          let yAxisLabels = YAxis.renderer.labels.template;
          if(yAxis.labels.formatter) {
            YAxis.numberFormatter = new am4core.NumberFormatter();
            YAxis.numberFormatter.numberFormat = yAxis.labels.formatter;
            YAxis.adjustLabelPrecision = false;
          }
          yAxisLabels.fontSize = yAxis.labels.fontSize || 17;
          yAxisLabels.rotation = yAxis.labels.rotation || 0;
          yAxisLabels.fill =
            yAxis.labels.color || (theme === "dark" ? "#ffffff" : "#000000");
        } else {
          YAxis.renderer.labels.template.disabled = true;
        }
        // we set fixed min/max and strictMinMax to true, as otherwise value axis will adjust min/max while dragging and it won't look smooth
        YAxis.strictMinMax = true;
        YAxis.min = minY;
        YAxis.max = maxY;
        YAxis.renderer.minWidth = 60;
        */

    if (cursor && (cursor === true || !cursor.axes || ["y", "xy"].indexOf(cursor.axes)) > -1) {
      if (cursor.tooltip) YAxis.tooltip = _utils__WEBPACK_IMPORTED_MODULE_13__.Tooltip(_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__, chart, 0, cursor.tooltip);
      if (cursor.extraTooltipPrecision) YAxis.extraTooltipPrecision = cursor.extraTooltipPrecision.y;
      if (cursor.renderer && cursor.renderer.y) YAxis.adapter.add("getTooltipText", cursor.renderer.y);
    } else {
      YAxis.cursorTooltipEnabled = false;
    }
    /* ~~~~\  horizontal line  /~~~~ */


    if (hline) {
      var range = YAxis.axisRanges.create();
      range.value = hline.value;
      range.grid.stroke = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.color(hline.line.color);
      range.grid.strokeWidth = hline.line.width;
      range.grid.strokeOpacity = hline.line.opacity;
      range.grid.strokeDasharray = hline.line.dash;
    }
    /* ~~~~\  vertical line  /~~~~ */


    if (vline) {
      var _range = XAxis.axisRanges.create();

      _range.value = vline.value;
      _range.grid.stroke = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.color(vline.line.color);
      _range.grid.strokeWidth = vline.line.width;
      _range.grid.strokeOpacity = vline.line.opacity;
      _range.grid.strokeDasharray = vline.line.dash;
    }
    /* ~~~~\  cursor  /~~~~ */


    if (cursor) {
      chart.cursor = new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.XYCursor();

      switch (cursor.axes) {
        case "x":
          chart.cursor.xAxis = XAxis;
          chart.cursor.lineY.disabled = true;
          break;

        case "y":
          chart.cursor.yAxis = YAxis;
          chart.cursor.lineX.disabled = true;
          break;

        case "xy":
          chart.cursor.xAxis = XAxis;
          chart.cursor.yAxis = YAxis;
          break;

        default:
          chart.cursor.xAxis = XAxis;
          chart.cursor.yAxis = YAxis;
      }
    }
    /* ~~~~\  legend  /~~~~ */


    if (chartLegend) {
      chart.legend = new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.Legend();
      var legendPosition = chartLegend.position || "bottom";
      chart.legend.position = legendPosition;

      if (legendPosition === "bottom" || legendPosition === "top") {
        chart.legend.maxHeight = chartLegend.maxHeight;
        chart.legend.scrollable = chartLegend.scrollable;
      } else {
        chart.legend.maxWidth = chartLegend.maxWidth;
      }

      chart.legend.useDefaultMarker = false;
      var markerTemplate = chart.legend.markers.template;
      markerTemplate.width = chartLegend.itemsWidth || 30;
      markerTemplate.height = chartLegend.itemsHeight || 20;
      var toggleHover = this.toggleHover;
      chart.legend.itemContainers.template.events.on("over", function (ev) {
        toggleHover(ev.target.dataItem.dataContext, true);
      });
      chart.legend.itemContainers.template.events.on("out", function (ev) {
        toggleHover(ev.target.dataItem.dataContext, false);
      });
    }
    /* ~~~~\  function handling the drag event  /~~~~ */


    function handleDrag(event) {
      var dataItem = event.target.dataItem; //console.log("dataItem", dataItem);
      // convert coordinate to value

      var value = YAxis.yToValue(event.target.pixelY); // set new value

      dataItem.valueY = value; // make line hover

      dataItem.segment.isHover = true; // hide tooltip not to interrupt

      dataItem.segment.hideTooltip(0); // make bullet hovered (as it might hide if mouse moves away)

      event.target.isHover = true;
    }
    /* ~~~~\  function handling the dragstop event  /~~~~ */


    function handleDragStop(event, value) {
      handleDrag(event);
      var dataItem = event.target.dataItem;
      dataItem.component.isHover = false; // XXXX

      event.target.isHover = false;
      dataCopy[dataItem.index][value] = dataItem.values.valueY.value;

      if (trendJS && trendJS[value]) {
        var newvalue = YAxis.yToValue(event.target.pixelY),
            seriesNames = chart.series.values.map(function (x) {
          return x.name;
        }),
            thisSeriesName = dataItem.component.name,
            thisSeriesData = dataItem.component.dataProvider.data,
            thisSeriesDataCopy = thisSeriesData.map(row => _objectSpread({}, row));
        thisSeriesDataCopy[dataItem.index][value] = newvalue;
        thisSeriesData[dataItem.index][value] = newvalue;
        var trendSeriesName = thisSeriesName + "_trend",
            trendSeriesIndex = seriesNames.indexOf(trendSeriesName),
            trendSeries = chart.series.values[trendSeriesIndex],
            trendSeriesData = trendSeries.data,
            regData = thisSeriesDataCopy.map(function (row) {
          return [row[xValue], row[value]];
        }),
            fit = regression__WEBPACK_IMPORTED_MODULE_14___default().polynomial(regData, {
          order: trendJS[value],
          precision: 15
        }),
            regressionLine = trendSeriesData.map(function (row) {
          var xy = fit.predict(row.x);
          return {
            x: xy[0],
            y: xy[1]
          };
        });
        regressionLine.forEach(function (point, i) {
          trendSeriesData[i] = point;
        });
        trendSeries.invalidateData();
        var ribbonSeriesName = thisSeriesName + "_ribbon",
            ribbonSeriesIndex = seriesNames.indexOf(ribbonSeriesName);

        if (ribbonSeriesIndex > -1) {
          var ribbonSeries = chart.series.values[ribbonSeriesIndex],
              ribbonSeriesData = ribbonSeries.data,
              y = thisSeriesDataCopy.map(function (row) {
            return row[value];
          }),
              yhat = fit.points.map(function (point) {
            return point[1];
          }),
              ssq = 0;

          for (var i = 0; i < y.length; ++i) {
            ssq += (y[i] - yhat[i]) * (y[i] - yhat[i]);
          }

          var sigma = Math.sqrt(ssq / (y.length - 1 - trendJS[value]));

          for (var _i2 = 0; _i2 < ribbonSeriesData.length; ++_i2) {
            var _yhat2 = trendSeriesData[_i2].y,
                delta = sigma * ribbonSeriesData[_i2].seFactor;
            ribbonSeriesData[_i2].lwr = _yhat2 - delta;
            ribbonSeriesData[_i2].upr = _yhat2 + delta;
          }

          ribbonSeries.invalidateData();
        }
      }

      if (window.Shiny) {
        if (isDate) {
          Shiny.setInputValue(shinyId + ":rAmCharts4.dataframeWithDate", {
            data: dataCopy,
            date: xValue
          });
          Shiny.setInputValue(shinyId + "_change:rAmCharts4.lineChange", {
            index: dataItem.index + 1,
            x: dataItem.dateX,
            variable: value,
            y: dataItem.values.valueY.value
          });
        } else {
          Shiny.setInputValue(shinyId + ":rAmCharts4.dataframe", dataCopy);
          Shiny.setInputValue(shinyId + "_change", {
            index: dataItem.index + 1,
            x: dataItem.values.valueX.value,
            variable: value,
            y: dataItem.values.valueY.value
          });
        }
      }
    }
    /* 
      trigger the "positionchanged" event on bullets when a resizing occurs, 
      otherwise bullets are unresponsive  
    */


    chart.events.on("sizechanged", event => {
      event.target.series.each(function (s) {
        s.bulletsContainer.children.each(function (b) {
          b.dispatchImmediately("positionchanged");
        });
      });
    });
    /* ~~~~\  zoom buttons  /~~~~ */

    if (zoomButtons) {
      var buttonContainer = chart.plotContainer.createChild(_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.Container);
      buttonContainer.shouldClone = false;
      buttonContainer.align = zoomButtons.halign;
      buttonContainer.valign = zoomButtons.valign;
      buttonContainer.zIndex = Number.MAX_SAFE_INTEGER;
      buttonContainer.marginTop = zoomButtons.marginTop;

      if (zoomButtons.valign === "top") {
        buttonContainer.marginTop = zoomButtons.marginV;
      } else {
        buttonContainer.marginBottom = zoomButtons.marginV;
      }

      if (zoomButtons.halign === "left") {
        buttonContainer.marginLeft = zoomButtons.marginH;
      } else {
        buttonContainer.marginRight = zoomButtons.marginH;
      }

      buttonContainer.layout = "horizontal";
      var zoomInButton = buttonContainer.createChild(_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.Button);
      zoomInButton.label.text = "+";
      zoomInButton.events.on("hit", function (ev) {
        var diff = XAxis.maxZoomed - XAxis.minZoomed;
        var delta = diff * zoomButtons.zoomFactor;

        if (isDate) {
          XAxis.zoomToDates(new Date(XAxis.minZoomed + delta), new Date(XAxis.maxZoomed - delta));
        } else {
          XAxis.zoomToValues(XAxis.minZoomed + delta, XAxis.maxZoomed - delta);
        }
      });
      var zoomOutButton = buttonContainer.createChild(_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.Button);
      zoomOutButton.label.text = "-";
      zoomOutButton.events.on("hit", function (ev) {
        var diff = XAxis.maxZoomed - XAxis.minZoomed;
        var delta = diff * zoomButtons.zoomFactor;

        if (isDate) {
          XAxis.zoomToDates(new Date(XAxis.minZoomed - delta), new Date(XAxis.maxZoomed + delta));
        } else {
          XAxis.zoomToValues(XAxis.minZoomed - delta, XAxis.maxZoomed + delta);
        }
      });
    }
    /* ~~~~\                         /~~~~ */


    yValues.forEach(function (value, index) {
      var lineStyle = lineStyles[value];
      var series = chart.series.push(new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.LineSeries());

      if (isDate) {
        series.dataFields.dateX = xValue;
      } else {
        series.dataFields.valueX = xValue;
      }

      series.dataFields.valueY = value;
      series.name = yValueNames[value];
      series.sequencedInterpolation = true;
      series.defaultState.interpolationDuration = 1500;
      series.tensionX = lineStyle.tensionX || 1;
      series.tensionY = lineStyle.tensionY || 1;
      /* ~~~~\  value label  /~~~~ */

      /*    let valueLabel = new am4charts.LabelBullet();
            series.bullets.push(valueLabel);
            valueLabel.label.text =
              "{valueY.value.formatNumber('" + valueFormatter + "')}";
            valueLabel.label.hideOversized = true;
            valueLabel.label.truncate = false;
            valueLabel.strokeOpacity = 0;
            valueLabel.adapter.add("dy", (x, target) => {
              if(target.dataItem.valueY > 0) {
                return -10;
              } else {
                return 10;
              }
            });
            */

      /* ~~~~\  bullet  /~~~~ */

      var bullet = series.bullets.push(new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.Bullet());
      var shape = _utils__WEBPACK_IMPORTED_MODULE_13__.Shape(_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__, chart, index, bullet, bulletsStyle[value]);

      if (!alwaysShowBullets) {
        shape.opacity = 0; // initially invisible

        shape.defaultState.properties.opacity = 0;
      }

      if (tooltips) {
        /* ~~~~\  tooltip  /~~~~ */
        bullet.tooltipText = tooltips[value].text;
        var tooltip = _utils__WEBPACK_IMPORTED_MODULE_13__.Tooltip(_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__, chart, index, tooltips[value]);
        tooltip.pointerOrientation = "vertical";
        tooltip.dy = 0;
        tooltip.adapter.add("rotation", (x, target) => {
          if (target.dataItem) {
            if (target.dataItem.valueY >= 0) {
              return 0;
            } else {
              return 180;
            }
          } else {
            return x;
          }
        });
        tooltip.label.adapter.add("verticalCenter", (x, target) => {
          if (target.dataItem) {
            if (target.dataItem.valueY >= 0) {
              return "none";
            } else {
              return "bottom";
            }
          } else {
            return x;
          }
        });
        tooltip.label.adapter.add("rotation", (x, target) => {
          if (target.dataItem) {
            if (target.dataItem.valueY >= 0) {
              return 0;
            } else {
              return 180;
            }
          } else {
            return x;
          }
        });
        bullet.tooltip = tooltip; // hide label when hovered because the tooltip is shown
        // XXX y'a pas de label

        /*      bullet.events.on("over", event => {
                  let dataItem = event.target.dataItem;
                  console.log("dataItem bullet on over", dataItem);
                  let itemLabelBullet = dataItem.bullets.getKey(valueLabel.uid);
                  itemLabelBullet.fillOpacity = 0;
                });
                // show label when mouse is out
                bullet.events.on("out", event => {
                  let dataItem = event.target.dataItem;
                  let itemLabelBullet = dataItem.bullets.getKey(valueLabel.uid);
                  itemLabelBullet.fillOpacity = 1;
                });
                */
      } // create bullet hover state


      var hoverState = shape.states.create("hover");
      hoverState.properties.strokeWidth = shape.strokeWidth + 3;
      hoverState.properties.opacity = 1; // visible when hovered

      if (draggable[value]) {
        bullet.draggable = true; // resize cursor when over

        bullet.cursorOverStyle = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.MouseCursorStyle.verticalResize; // while dragging

        bullet.events.on("drag", event => {
          handleDrag(event);
        }); // on dragging stop

        bullet.events.on("dragstop", event => {
          handleDragStop(event, value);
        }); // start dragging bullet even if we hit on column not just a bullet, this will make it more friendly for touch devices

        bullet.events.on("down", event => {
          var dataItem = event.target.dataItem;
          var itemBullet = dataItem.bullets.getKey(bullet.uid);
          itemBullet.dragStart(event.pointer);
        }); // when line position changes, adjust minX/maxX of bullets so that we could only dragg vertically

        bullet.events.on("positionchanged", event => {
          var dataItem = event.target.dataItem;

          if (dataItem.bullets) {
            var itemBullet = dataItem.bullets.getKey(bullet.uid);
            var point = dataItem.point;
            itemBullet.minX = point.x;
            itemBullet.maxX = itemBullet.minX;
            itemBullet.minY = 0;
            itemBullet.maxY = chart.seriesContainer.pixelHeight;
          }
        });
      }
      /* ~~~~\  line template  /~~~~ */


      var lineTemplate = series.segments.template;
      lineTemplate.interactionsEnabled = true;
      series.strokeWidth = lineStyle.width || 3;
      series.stroke = lineStyle.color || chart.colors.getIndex(index).saturate(0.7);
      if (lineStyle.dash) series.strokeDasharray = lineStyle.dash; // line hover state

      var lineHoverState = lineTemplate.states.create("hover"); // you can change any property on hover state and it will be animated

      lineHoverState.properties.fillOpacity = 1;
      lineHoverState.properties.strokeWidth = series.strokeWidth + 2;
      /* ~~~~\ trend line /~~~~ */

      if (trendData && trendData[value]) {
        var trend = chart.series.push(new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.LineSeries());
        trend.zIndex = 10000;
        trend.name = yValueNames[value] + "_trend";
        trend.hiddenInLegend = true;
        trend.data = trendData[value];

        if (isDate) {
          trend.dataFields.dateX = "x";
        } else {
          trend.dataFields.valueX = "x";
        }

        trend.dataFields.valueY = "y";
        trend.sequencedInterpolation = true;
        trend.defaultState.interpolationDuration = 1500;
        var trendStyle = trendStyles[value];
        trend.strokeWidth = trendStyle.width || 3;
        trend.stroke = trendStyle.color || chart.colors.getIndex(index).saturate(0.7);
        if (trendStyle.dash) trend.strokeDasharray = trendStyle.dash;
        trend.tensionX = trendStyle.tensionX || 0.8;
        trend.tensionY = trendStyle.tensionY || 0.8;
        /* ~~~~\ ribbon /~~~~ */

        if (trendData[value][0].hasOwnProperty("lwr")) {
          var ribbon = chart.series.push(new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.LineSeries());
          ribbon.name = yValueNames[value] + "_ribbon";
          ribbon.hiddenInLegend = true;
          ribbon.data = trendData[value].map(row => _objectSpread({}, row));

          if (isDate) {
            ribbon.dataFields.dateX = "x";
          } else {
            ribbon.dataFields.valueX = "x";
          }

          ribbon.dataFields.valueY = "lwr";
          ribbon.dataFields.openValueY = "upr";
          ribbon.sequencedInterpolation = true;
          ribbon.defaultState.interpolationDuration = 1500;
          var ribbonStyle = ribbonStyles[value];
          ribbon.fill = ribbonStyle.color || trend.stroke.lighten(0.4);
          ribbon.fillOpacity = ribbonStyle.opacity || 0.3;
          ribbon.strokeWidth = 0;
          ribbon.tensionX = ribbonStyle.tensionX || 0.8;
          ribbon.tensionY = ribbonStyle.tensionY || 0.8;
        }
      }
    });
    /* end of forEach */

    return chart;
  }

  componentDidMount() {
    this.chart = this.LineChart();
  }

  componentDidUpdate() {
    if (this.chart) {
      this.chart.dispose();
    }

    this.chart = this.LineChart();
  }

  componentWillUnmount() {
    if (this.chart) {
      this.chart.dispose();
    }
  }

  render() {
    return /*#__PURE__*/React.createElement("div", {
      key: this.props.chartId,
      id: this.props.chartId,
      style: this.style()
    });
  }

}
/* COMPONENT: SCATTER CHART */


class AmScatterChart extends React.PureComponent {
  constructor(props) {
    super(props);
    this.style = this.style.bind(this);
    this.ScatterChart = this.ScatterChart.bind(this);
  }

  style() {
    if (window.Shiny && !window.FlexDashboard) {
      return {
        width: "100%",
        height: "100%"
      };
    } else {
      return {
        width: this.props.width,
        height: this.props.height
      };
    }
  }

  ScatterChart() {
    var theme = this.props.theme,
        animated = this.props.animated,
        chartLegend = this.props.legend,
        xValue = this.props.xValue,
        yValues = this.props.yValues,
        data = this.props.data,
        data2 = this.props.data2 ? HTMLWidgets.dataframeToD3(_utils__WEBPACK_IMPORTED_MODULE_13__.subset(this.props.data2, [xValue].concat(yValues))) : null,
        hline = this.props.hline,
        vline = this.props.vline,
        trendData0 = this.props.trendData,
        trendStyles = this.props.trendStyle,
        trendJS = this.props.trendJS,
        ribbonStyles = this.props.ribbonStyle,
        yValueNames = this.props.yValueNames,
        isDate = this.props.isDate,
        minX = isDate ? _utils__WEBPACK_IMPORTED_MODULE_13__.toDate(this.props.minX).getTime() : this.props.minX,
        maxX = isDate ? _utils__WEBPACK_IMPORTED_MODULE_13__.toDate(this.props.maxX).getTime() : this.props.maxX,
        minY = this.props.minY,
        maxY = this.props.maxY,
        xAxis = this.props.xAxis,
        yAxis = this.props.yAxis,
        tooltips = this.props.tooltip,
        gridLines = this.props.gridLines,
        draggable = this.props.draggable,
        pointsStyle = this.props.pointsStyle,
        cursor = this.props.cursor,
        zoomButtons = this.props.zoomButtons,
        chartId = this.props.chartId,
        shinyId = this.props.shinyId;

    if (isDate) {
      data[xValue] = data[xValue].map(_utils__WEBPACK_IMPORTED_MODULE_13__.toDate);

      if (trendData0) {
        for (var key in trendData0) {
          trendData0[key].x = trendData0[key].x.map(_utils__WEBPACK_IMPORTED_MODULE_13__.toDate);
        }
      }
    }

    data = HTMLWidgets.dataframeToD3(data);
    var dataCopy = data.map(row => _utils__WEBPACK_IMPORTED_MODULE_13__.subset(_objectSpread({}, row), [xValue].concat(yValues)));
    var trendData = trendData0 ? Object.assign({}, ...Object.keys(trendData0).map(k => ({
      [k]: HTMLWidgets.dataframeToD3(trendData0[k])
    }))) : null;

    if (window.Shiny) {
      if (shinyId === undefined) {
        shinyId = $(document.getElementById(chartId)).parent().attr("id");
      }

      if (isDate) {
        Shiny.setInputValue(shinyId + ":rAmCharts4.dataframeWithDate", {
          data: dataCopy,
          date: xValue
        });
      } else {
        Shiny.setInputValue(shinyId + ":rAmCharts4.dataframe", dataCopy);
      }
    }

    if (animated) {
      _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_animated__WEBPACK_IMPORTED_MODULE_3__["default"]);
    }

    switch (theme) {
      case "dark":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_dark__WEBPACK_IMPORTED_MODULE_4__["default"]);
        break;

      case "dataviz":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_dataviz__WEBPACK_IMPORTED_MODULE_5__["default"]);
        break;

      case "frozen":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_frozen__WEBPACK_IMPORTED_MODULE_6__["default"]);
        break;

      case "kelly":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_kelly__WEBPACK_IMPORTED_MODULE_7__["default"]);
        break;

      case "material":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_material__WEBPACK_IMPORTED_MODULE_8__["default"]);
        break;

      case "microchart":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_microchart__WEBPACK_IMPORTED_MODULE_9__["default"]);
        break;

      case "moonrisekingdom":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_moonrisekingdom__WEBPACK_IMPORTED_MODULE_10__["default"]);
        break;

      case "patterns":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_patterns__WEBPACK_IMPORTED_MODULE_11__["default"]);
        break;

      case "spiritedaway":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_spiritedaway__WEBPACK_IMPORTED_MODULE_12__["default"]);
        break;
    }

    var chart = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.create(this.props.chartId, _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.XYChart);
    chart.data = data;
    chart.hiddenState.properties.opacity = 0; // this makes initial fade in effect

    chart.padding(50, 40, 0, 10);
    chart.maskBullets = false; // allow bullets to go out of plot area

    var chartBackgroundColor = this.props.backgroundColor || chart.background.fill;
    chart.background.fill = chartBackgroundColor;
    /* ~~~~\  Enable export  /~~~~ */

    if (this.props.export) {
      chart.exporting.menu = new _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.ExportMenu();
      chart.exporting.menu.items = _utils__WEBPACK_IMPORTED_MODULE_13__.exportMenuItems;
    }
    /* ~~~~\  title  /~~~~ */


    var chartTitle = this.props.chartTitle;

    if (chartTitle) {
      var title = chart.titles.create();
      title.text = chartTitle.text.text;
      title.fill = chartTitle.text.color || (theme === "dark" ? "#ffffff" : "#000000");
      title.fontSize = chartTitle.text.fontSize || 22;
      title.fontWeight = chartTitle.text.fontWeight || "bold";
      title.fontFamily = chartTitle.text.fontFamily;
      title.align = chartTitle.align || "left";
      title.dy = -30;
    }
    /* ~~~~\  caption  /~~~~ */


    var chartCaption = this.props.caption;

    if (chartCaption) {
      var caption = chart.chartContainer.createChild(_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.Label);
      caption.text = chartCaption.text.text;
      caption.fill = chartCaption.text.color || (theme === "dark" ? "#ffffff" : "#000000");
      caption.fontSize = chartCaption.text.fontSize;
      caption.fontWeight = chartCaption.text.fontWeight;
      caption.fontFamily = chartCaption.text.fontFamily;
      caption.align = chartCaption.align || "right";
    }
    /* ~~~~\  image  /~~~~ */


    if (this.props.image) {
      _utils__WEBPACK_IMPORTED_MODULE_13__.Image(_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__, chart, this.props.image);
    }
    /* ~~~~\  scrollbars  /~~~~ */


    if (this.props.scrollbarX) {
      chart.scrollbarX = new _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.Scrollbar();
    }

    if (this.props.scrollbarY) {
      chart.scrollbarY = new _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.Scrollbar();
    }
    /* ~~~~\  button  /~~~~ */


    if (this.props.button) {
      var Button = chart.chartContainer.createChild(_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.Button);
      _utils__WEBPACK_IMPORTED_MODULE_13__.makeButton(Button, this.props.button);
      Button.events.on("hit", function () {
        for (var r = 0; r < data.length; ++r) {
          for (var v = 0; v < yValues.length; ++v) {
            chart.data[r][yValues[v]] = data2[r][yValues[v]];
          }
        }

        chart.invalidateRawData();

        if (trendJS) {
          var seriesNames = chart.series.values.map(function (x) {
            return x.name;
          });
          yValues.forEach(function (value, index) {
            if (trendJS[value]) {
              var thisSeriesName = yValueNames[value],
                  trendSeriesName = thisSeriesName + "_trend",
                  trendSeriesIndex = seriesNames.indexOf(trendSeriesName),
                  trendSeries = chart.series.values[trendSeriesIndex],
                  trendSeriesData = trendSeries.data,
                  regData = data2.map(function (row) {
                return [row[xValue], row[value]];
              }),
                  fit = regression__WEBPACK_IMPORTED_MODULE_14___default().polynomial(regData, {
                order: trendJS[value],
                precision: 15
              }),
                  regressionLine = trendSeriesData.map(function (row) {
                var xy = fit.predict(row.x);
                return {
                  x: xy[0],
                  y: xy[1]
                };
              });
              regressionLine.forEach(function (point, i) {
                trendSeriesData[i] = point;
              });
              trendSeries.invalidateData();
              var ribbonSeriesName = thisSeriesName + "_ribbon",
                  ribbonSeriesIndex = seriesNames.indexOf(ribbonSeriesName);

              if (ribbonSeriesIndex > -1) {
                var ribbonSeries = chart.series.values[ribbonSeriesIndex],
                    ribbonSeriesData = ribbonSeries.data,
                    y = data2.map(function (row) {
                  return row[value];
                }),
                    yhat = fit.points.map(function (point) {
                  return point[1];
                }),
                    ssq = 0;

                for (var i = 0; i < y.length; ++i) {
                  ssq += (y[i] - yhat[i]) * (y[i] - yhat[i]);
                }

                var sigma = Math.sqrt(ssq / (y.length - 1 - trendJS[value]));

                for (var _i3 = 0; _i3 < ribbonSeriesData.length; ++_i3) {
                  var _yhat3 = trendSeriesData[_i3].y,
                      delta = sigma * ribbonSeriesData[_i3].seFactor;
                  ribbonSeriesData[_i3].lwr = _yhat3 - delta;
                  ribbonSeriesData[_i3].upr = _yhat3 + delta;
                }

                ribbonSeries.invalidateData();
              }
            }
          });
        }

        if (window.Shiny) {
          if (isDate) {
            Shiny.setInputValue(shinyId + ":rAmCharts4.dataframeWithDate", {
              data: chart.data,
              date: xValue
            });
            Shiny.setInputValue(shinyId + "_change", null);
          } else {
            Shiny.setInputValue(shinyId + ":rAmCharts4.dataframe", chart.data);
            Shiny.setInputValue(shinyId + "_change", null);
          }
        }
      });
    }
    /* ~~~~\  x-axis  /~~~~ */


    var XAxis = _utils__WEBPACK_IMPORTED_MODULE_13__.createAxis("X", _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__, _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__, chart, xAxis, minX, maxX, isDate, theme, cursor, xValue);
    XAxis.events.on("startchanged", _utils__WEBPACK_IMPORTED_MODULE_13__.onAxisZoomed);
    XAxis.events.on("endchanged", _utils__WEBPACK_IMPORTED_MODULE_13__.onAxisZoomed);
    /* ~~~~\  y-axis  /~~~~ */

    var YAxis = _utils__WEBPACK_IMPORTED_MODULE_13__.createAxis("Y", _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__, _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__, chart, yAxis, minY, maxY, false, theme, cursor);
    /* ~~~~\  horizontal line  /~~~~ */

    if (hline) {
      var range = YAxis.axisRanges.create();
      range.value = hline.value;
      range.grid.stroke = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.color(hline.line.color);
      range.grid.strokeWidth = hline.line.width;
      range.grid.strokeOpacity = hline.line.opacity;
      range.grid.strokeDasharray = hline.line.dash;
    }
    /* ~~~~\  vertical line  /~~~~ */


    if (vline) {
      var _range2 = XAxis.axisRanges.create();

      _range2.value = vline.value;
      _range2.grid.stroke = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.color(vline.line.color);
      _range2.grid.strokeWidth = vline.line.width;
      _range2.grid.strokeOpacity = vline.line.opacity;
      _range2.grid.strokeDasharray = vline.line.dash;
    }
    /* ~~~~\  cursor  /~~~~ */


    if (cursor) {
      chart.cursor = new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.XYCursor();

      switch (cursor.axes) {
        case "x":
          chart.cursor.xAxis = XAxis;
          chart.cursor.lineY.disabled = true;
          break;

        case "y":
          chart.cursor.yAxis = YAxis;
          chart.cursor.lineX.disabled = true;
          break;

        case "xy":
          chart.cursor.xAxis = XAxis;
          chart.cursor.yAxis = YAxis;
          break;

        default:
          chart.cursor.xAxis = XAxis;
          chart.cursor.yAxis = YAxis;
      }
    }
    /* ~~~~\  legend  /~~~~ */


    if (chartLegend) {
      chart.legend = new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.Legend();
      var legendPosition = chartLegend.position || "bottom";
      chart.legend.position = legendPosition;

      if (legendPosition === "bottom" || legendPosition === "top") {
        chart.legend.maxHeight = chartLegend.maxHeight;
        chart.legend.scrollable = chartLegend.scrollable;
      } else {
        chart.legend.maxWidth = chartLegend.maxWidth;
      }

      chart.legend.useDefaultMarker = false;
      var markerTemplate = chart.legend.markers.template;
      markerTemplate.width = chartLegend.itemsWidth || 20;
      markerTemplate.height = chartLegend.itemsHeight || 20;
      chart.legend.itemContainers.template.events.on("over", function (ev) {
        ev.target.dataItem.dataContext.bulletsContainer.children.each(function (bullet) {
          bullet.children.each(function (c) {
            c.isHover = true;
          });
        });
      });
      chart.legend.itemContainers.template.events.on("out", function (ev) {
        ev.target.dataItem.dataContext.bulletsContainer.children.each(function (bullet) {
          bullet.children.each(function (c) {
            c.isHover = false;
          });
        });
      });
    }
    /* ~~~~\  function handling the drag event  /~~~~ */


    function handleDrag(event) {
      var dataItem = event.target.dataItem; // convert coordinate to value

      var value = YAxis.yToValue(event.target.pixelY); // set new value

      dataItem.valueY = value; // make line hover

      dataItem.segment.isHover = true; // hide tooltip not to interrupt

      dataItem.segment.hideTooltip(0); // make bullet hovered (as it might hide if mouse moves away)

      event.target.isHover = true;
    }
    /* ~~~~\  function handling the dragstop event  /~~~~ */


    function handleDragStop(event, value) {
      handleDrag(event);
      var dataItem = event.target.dataItem;
      dataItem.component.isHover = false; // XXXX

      event.target.isHover = false;
      dataCopy[dataItem.index][value] = dataItem.values.valueY.value;

      if (trendJS && trendJS[value]) {
        var newvalue = YAxis.yToValue(event.target.pixelY),
            seriesNames = chart.series.values.map(function (x) {
          return x.name;
        }),
            thisSeriesName = dataItem.component.name,
            thisSeriesData = dataItem.component.dataProvider.data,
            thisSeriesDataCopy = thisSeriesData.map(row => _objectSpread({}, row));
        thisSeriesDataCopy[dataItem.index][value] = newvalue;
        thisSeriesData[dataItem.index][value] = newvalue;
        var trendSeriesName = thisSeriesName + "_trend",
            trendSeriesIndex = seriesNames.indexOf(trendSeriesName),
            trendSeries = chart.series.values[trendSeriesIndex],
            trendSeriesData = trendSeries.data,
            regData = thisSeriesDataCopy.map(function (row) {
          return [row[xValue], row[value]];
        }),
            fit = regression__WEBPACK_IMPORTED_MODULE_14___default().polynomial(regData, {
          order: trendJS[value],
          precision: 15
        }),
            regressionLine = trendSeriesData.map(function (row) {
          var xy = fit.predict(row.x);
          return {
            x: xy[0],
            y: xy[1]
          };
        });
        regressionLine.forEach(function (point, i) {
          trendSeriesData[i] = point;
        });
        trendSeries.invalidateData();
        var ribbonSeriesName = thisSeriesName + "_ribbon",
            ribbonSeriesIndex = seriesNames.indexOf(ribbonSeriesName);

        if (ribbonSeriesIndex > -1) {
          var ribbonSeries = chart.series.values[ribbonSeriesIndex],
              ribbonSeriesData = ribbonSeries.data,
              y = thisSeriesDataCopy.map(function (row) {
            return row[value];
          }),
              yhat = fit.points.map(function (point) {
            return point[1];
          }),
              ssq = 0;

          for (var i = 0; i < y.length; ++i) {
            ssq += (y[i] - yhat[i]) * (y[i] - yhat[i]);
          }

          var sigma = Math.sqrt(ssq / (y.length - 1 - trendJS[value]));

          for (var _i4 = 0; _i4 < ribbonSeriesData.length; ++_i4) {
            var _yhat4 = trendSeriesData[_i4].y,
                delta = sigma * ribbonSeriesData[_i4].seFactor;
            ribbonSeriesData[_i4].lwr = _yhat4 - delta;
            ribbonSeriesData[_i4].upr = _yhat4 + delta;
          }

          ribbonSeries.invalidateData();
        }
      }

      if (window.Shiny) {
        if (isDate) {
          Shiny.setInputValue(shinyId + ":rAmCharts4.dataframeWithDate", {
            data: dataCopy,
            date: xValue
          });
          Shiny.setInputValue(shinyId + "_change:rAmCharts4.lineChange", {
            index: dataItem.index + 1,
            x: dataItem.dateX,
            variable: value,
            y: dataItem.values.valueY.value
          });
        } else {
          Shiny.setInputValue(shinyId + ":rAmCharts4.dataframe", dataCopy);
          Shiny.setInputValue(shinyId + "_change", {
            index: dataItem.index + 1,
            x: dataItem.values.valueX.value,
            variable: value,
            y: dataItem.values.valueY.value
          });
        }
      }
    }
    /* 
      trigger the "positionchanged" event on bullets when a resizing occurs, 
      otherwise bullets are unresponsive  
    */


    chart.events.on("sizechanged", event => {
      event.target.series.each(function (s) {
        s.bulletsContainer.children.each(function (b) {
          b.dispatchImmediately("positionchanged");
        });
      });
    });
    /* ~~~~\  zoom buttons  /~~~~ */

    if (zoomButtons) {
      var buttonContainer = chart.plotContainer.createChild(_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.Container);
      buttonContainer.shouldClone = false;
      buttonContainer.align = zoomButtons.halign;
      buttonContainer.valign = zoomButtons.valign;
      buttonContainer.zIndex = Number.MAX_SAFE_INTEGER;
      buttonContainer.marginTop = zoomButtons.marginTop;

      if (zoomButtons.valign === "top") {
        buttonContainer.marginTop = zoomButtons.marginV;
      } else {
        buttonContainer.marginBottom = zoomButtons.marginV;
      }

      if (zoomButtons.halign === "left") {
        buttonContainer.marginLeft = zoomButtons.marginH;
      } else {
        buttonContainer.marginRight = zoomButtons.marginH;
      }

      buttonContainer.layout = "horizontal";
      var zoomInButton = buttonContainer.createChild(_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.Button);
      zoomInButton.label.text = "+";
      zoomInButton.events.on("hit", function (ev) {
        var diff = XAxis.maxZoomed - XAxis.minZoomed;
        var delta = diff * zoomButtons.zoomFactor;

        if (isDate) {
          XAxis.zoomToDates(new Date(XAxis.minZoomed + delta), new Date(XAxis.maxZoomed - delta));
        } else {
          XAxis.zoomToValues(XAxis.minZoomed + delta, XAxis.maxZoomed - delta);
        }
      });
      var zoomOutButton = buttonContainer.createChild(_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.Button);
      zoomOutButton.label.text = "-";
      zoomOutButton.events.on("hit", function (ev) {
        var diff = XAxis.maxZoomed - XAxis.minZoomed;
        var delta = diff * zoomButtons.zoomFactor;

        if (isDate) {
          XAxis.zoomToDates(new Date(XAxis.minZoomed - delta), new Date(XAxis.maxZoomed + delta));
        } else {
          XAxis.zoomToValues(XAxis.minZoomed - delta, XAxis.maxZoomed + delta);
        }
      });
    }
    /* ~~~~\                         /~~~~ */


    yValues.forEach(function (value, index) {
      var series = chart.series.push(new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.LineSeries());
      series.bulletsContainer.parent = chart.seriesContainer;
      series.strokeOpacity = 0;
      series.zIndex = -1;

      if (isDate) {
        series.dataFields.dateX = xValue;
      } else {
        series.dataFields.valueX = xValue;
      }

      series.dataFields.valueY = value;
      series.name = yValueNames[value];
      series.sequencedInterpolation = true;
      series.defaultState.interpolationDuration = 1500;
      /* ~~~~\  value label  /~~~~ */

      /*    let valueLabel = new am4charts.LabelBullet();
            series.bullets.push(valueLabel);
            valueLabel.label.text =
              "{valueY.value.formatNumber('" + valueFormatter + "')}";
            valueLabel.label.hideOversized = true;
            valueLabel.label.truncate = false;
            valueLabel.strokeOpacity = 0;
            valueLabel.adapter.add("dy", (x, target) => {
              if(target.dataItem.valueY > 0) {
                return -10;
              } else {
                return 10;
              }
            });
            */

      /* ~~~~\  bullet  /~~~~ */

      var bullet = series.bullets.push(new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.Bullet());
      var shape = _utils__WEBPACK_IMPORTED_MODULE_13__.Shape(_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__, chart, index, bullet, pointsStyle[value]);
      shape.zIndex = -1;

      if (tooltips) {
        /* ~~~~\  tooltip  /~~~~ */
        bullet.tooltipText = tooltips[value].text;
        var tooltip = _utils__WEBPACK_IMPORTED_MODULE_13__.Tooltip(_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__, chart, index, tooltips[value]);
        tooltip.pointerOrientation = "vertical";
        tooltip.dy = 0;
        tooltip.adapter.add("rotation", (x, target) => {
          if (target.dataItem) {
            if (target.dataItem.valueY >= 0) {
              return 0;
            } else {
              return 180;
            }
          } else {
            return x;
          }
        });
        tooltip.label.adapter.add("verticalCenter", (x, target) => {
          if (target.dataItem) {
            if (target.dataItem.valueY >= 0) {
              return "none";
            } else {
              return "bottom";
            }
          } else {
            return x;
          }
        });
        tooltip.label.adapter.add("rotation", (x, target) => {
          if (target.dataItem) {
            if (target.dataItem.valueY >= 0) {
              return 0;
            } else {
              return 180;
            }
          } else {
            return x;
          }
        });
        bullet.tooltip = tooltip; // hide label when hovered because the tooltip is shown
        // XXX y'a pas de label

        /*      bullet.events.on("over", event => {
                  let dataItem = event.target.dataItem;
                  console.log("dataItem bullet on over", dataItem);
                  let itemLabelBullet = dataItem.bullets.getKey(valueLabel.uid);
                  itemLabelBullet.fillOpacity = 0;
                });
                // show label when mouse is out
                bullet.events.on("out", event => {
                  let dataItem = event.target.dataItem;
                  let itemLabelBullet = dataItem.bullets.getKey(valueLabel.uid);
                  itemLabelBullet.fillOpacity = 1;
                });
                */
      } // create bullet hover state


      var hoverState = shape.states.create("hover");
      hoverState.properties.strokeWidth = shape.strokeWidth + 3;

      if (draggable[value]) {
        bullet.draggable = true; // resize cursor when over

        bullet.cursorOverStyle = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.MouseCursorStyle.verticalResize; // while dragging

        bullet.events.on("drag", event => {
          handleDrag(event);
        }); // on dragging stop

        bullet.events.on("dragstop", event => {
          handleDragStop(event, value);
        }); // start dragging bullet even if we hit on column not just a bullet, this will make it more friendly for touch devices

        bullet.events.on("down", event => {
          var dataItem = event.target.dataItem;
          var itemBullet = dataItem.bullets.getKey(bullet.uid);
          itemBullet.dragStart(event.pointer);
        }); // when point position changes, adjust minX/maxX of bullets so that we could only dragg vertically

        bullet.events.on("positionchanged", event => {
          var dataItem = event.target.dataItem;

          if (dataItem.bullets) {
            var itemBullet = dataItem.bullets.getKey(bullet.uid);
            var point = dataItem.point;
            itemBullet.minX = point.x;
            itemBullet.maxX = itemBullet.minX;
            itemBullet.minY = 0;
            itemBullet.maxY = chart.seriesContainer.pixelHeight;
          }
        });
      }
      /* ~~~~\ trend line /~~~~ */


      if (trendData && trendData[value]) {
        var trend = chart.series.push(new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.LineSeries());
        trend.zIndex = 10000;
        trend.name = yValueNames[value] + "_trend";
        trend.hiddenInLegend = true;
        trend.data = trendData[value];

        if (isDate) {
          trend.dataFields.dateX = "x";
        } else {
          trend.dataFields.valueX = "x";
        }

        trend.dataFields.valueY = "y";
        trend.sequencedInterpolation = true;
        trend.defaultState.interpolationDuration = 1500;
        var trendStyle = trendStyles[value];
        trend.strokeWidth = trendStyle.width || 3;
        trend.stroke = trendStyle.color || chart.colors.getIndex(index).saturate(0.7);
        if (trendStyle.dash) trend.strokeDasharray = trendStyle.dash;
        trend.tensionX = trendStyle.tensionX || 0.8;
        trend.tensionY = trendStyle.tensionY || 0.8;
        /* ~~~~\ ribbon /~~~~ */

        if (trendData[value][0].hasOwnProperty("lwr")) {
          var ribbon = chart.series.push(new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.LineSeries());
          ribbon.name = yValueNames[value] + "_ribbon";
          ribbon.hiddenInLegend = true;
          ribbon.data = trendData[value].map(row => _objectSpread({}, row));

          if (isDate) {
            ribbon.dataFields.dateX = "x";
          } else {
            ribbon.dataFields.valueX = "x";
          }

          ribbon.dataFields.valueY = "lwr";
          ribbon.dataFields.openValueY = "upr";
          ribbon.sequencedInterpolation = true;
          ribbon.defaultState.interpolationDuration = 1500;
          /*  attempt animation upr line        
                    let ribbon2 = chart.series.push(new am4charts.LineSeries());
                    ribbon2.name = yValueNames[value] + "_ribbon2";
                    ribbon2.hiddenInLegend = true;
                    ribbon2.data = ribbon.data;
                    if(isDate) {
                      ribbon2.dataFields.dateX = "x";
                    } else {
                      ribbon2.dataFields.valueX = "x";
                    }
                    ribbon2.dataFields.valueY = "upr";
                    ribbon2.sequencedInterpolation = true;
                    ribbon2.defaultState.interpolationDuration = 1000; */

          var ribbonStyle = ribbonStyles[value];
          ribbon.fill = ribbonStyle.color || trend.stroke.lighten(0.4);
          ribbon.fillOpacity = ribbonStyle.opacity || 0.3;
          ribbon.strokeWidth = 0;
          ribbon.tensionX = ribbonStyle.tensionX || 0.8;
          ribbon.tensionY = ribbonStyle.tensionY || 0.8;
        }
      }
    });
    /* end of forEach */

    return chart;
  }

  componentDidMount() {
    this.chart = this.ScatterChart();
  }

  componentDidUpdate() {
    if (this.chart) {
      this.chart.dispose();
    }

    this.chart = this.ScatterChart();
  }

  componentWillUnmount() {
    if (this.chart) {
      this.chart.dispose();
    }
  }

  render() {
    return /*#__PURE__*/React.createElement("div", {
      key: this.props.chartId,
      id: this.props.chartId,
      style: this.style()
    });
  }

}
/* COMPONENT: RANGE AREA CHART */


class AmRangeAreaChart extends React.PureComponent {
  constructor(props) {
    super(props);
    this.style = this.style.bind(this);
    this.toggleHover = this.toggleHover.bind(this);
    this.RangeAreaChart = this.RangeAreaChart.bind(this);
  }

  style() {
    if (window.Shiny && !window.FlexDashboard) {
      return {
        width: "100%",
        height: "100%"
      };
    } else {
      return {
        width: this.props.width,
        height: this.props.height
      };
    }
  }

  toggleHover(series, over) {
    var event = over ? "over" : "out";
    series.segments.template.dispatchImmediately(event);
    series.wasHover = over;
  }

  RangeAreaChart() {
    var theme = this.props.theme,
        animated = this.props.animated,
        chartLegend = this.props.legend,
        xValue = this.props.xValue,
        yValues = this.props.yValues,
        hline = this.props.hline,
        vline = this.props.vline,
        data = this.props.data,
        data2 = this.props.data2 ? HTMLWidgets.dataframeToD3(_utils__WEBPACK_IMPORTED_MODULE_13__.subset(this.props.data2, yValues.flat())) : null,
        yValueNames = this.props.yValueNames,
        isDate = this.props.isDate,
        minX = isDate ? _utils__WEBPACK_IMPORTED_MODULE_13__.toUTCtime(this.props.minX) : this.props.minX,
        maxX = isDate ? _utils__WEBPACK_IMPORTED_MODULE_13__.toUTCtime(this.props.maxX) : this.props.maxX,
        minY = this.props.minY,
        maxY = this.props.maxY,
        xAxis = this.props.xAxis,
        yAxis = this.props.yAxis,
        gridLines = this.props.gridLines,
        draggable = this.props.draggable,
        tooltips = this.props.tooltip,
        bulletsStyle = this.props.bullets,
        alwaysShowBullets = this.props.alwaysShowBullets,
        lineStyles = this.props.lineStyle,
        areas = this.props.areas,
        cursor = this.props.cursor,
        chartId = this.props.chartId,
        shinyId = this.props.shinyId;

    if (isDate) {
      data[xValue] = data[xValue].map(_utils__WEBPACK_IMPORTED_MODULE_13__.toDate);
    }

    data = HTMLWidgets.dataframeToD3(data);
    var dataCopy = data.map(row => _utils__WEBPACK_IMPORTED_MODULE_13__.subset(_objectSpread({}, row), [xValue].concat(yValues.flat())));

    if (window.Shiny) {
      if (shinyId === undefined) {
        shinyId = $(document.getElementById(chartId)).parent().attr("id");
      }

      if (isDate) {
        Shiny.setInputValue(shinyId + ":rAmCharts4.dataframeWithDate", {
          data: dataCopy,
          date: xValue
        });
      } else {
        Shiny.setInputValue(shinyId + ":rAmCharts4.dataframe", dataCopy);
      }
    }

    if (animated) {
      _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_animated__WEBPACK_IMPORTED_MODULE_3__["default"]);
    }

    switch (theme) {
      case "dark":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_dark__WEBPACK_IMPORTED_MODULE_4__["default"]);
        break;

      case "dataviz":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_dataviz__WEBPACK_IMPORTED_MODULE_5__["default"]);
        break;

      case "frozen":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_frozen__WEBPACK_IMPORTED_MODULE_6__["default"]);
        break;

      case "kelly":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_kelly__WEBPACK_IMPORTED_MODULE_7__["default"]);
        break;

      case "material":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_material__WEBPACK_IMPORTED_MODULE_8__["default"]);
        break;

      case "microchart":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_microchart__WEBPACK_IMPORTED_MODULE_9__["default"]);
        break;

      case "moonrisekingdom":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_moonrisekingdom__WEBPACK_IMPORTED_MODULE_10__["default"]);
        break;

      case "patterns":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_patterns__WEBPACK_IMPORTED_MODULE_11__["default"]);
        break;

      case "spiritedaway":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_spiritedaway__WEBPACK_IMPORTED_MODULE_12__["default"]);
        break;
    }

    var chart = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.create(this.props.chartId, _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.XYChart);
    chart.data = data;
    chart.hiddenState.properties.opacity = 0; // this makes initial fade in effect

    chart.padding(50, 40, 0, 10);
    chart.maskBullets = false; // allow bullets to go out of plot area

    var chartBackgroundColor = this.props.backgroundColor || chart.background.fill;
    chart.background.fill = chartBackgroundColor;
    var allSeries = chart.series.values;
    /* ~~~~\  Enable export  /~~~~ */

    if (this.props.export) {
      chart.exporting.menu = new _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.ExportMenu();
      chart.exporting.menu.items = _utils__WEBPACK_IMPORTED_MODULE_13__.exportMenuItems;
    }
    /* 		 ~~~~\  title  /~~~~ 
        let chartTitle = this.props.chartTitle;
        //let container;
        if(chartTitle) {
          //let title = chart.plotContainer.createChild(am4core.Label);
          //container = chart.plotContainer.createChild(am4core.Container);
          //container.y = this.props.scrollbarX ? -56 : -42;
          //container.x = -45;
          //container.horizontalCenter = "left";
          //let title = container.createChild(am4core.Label);
          let title = chart.titles.create();
          title.text = chartTitle.text;
          title.fill =
            chartTitle.color || (theme === "dark" ? "#ffffff" : "#000000");
          title.fontSize = chartTitle.fontSize || 22;
          title.fontWeight = "bold";
          title.fontFamily = "Tahoma";
          // title.y = this.props.scrollbarX ? -56 : -42;
          // title.x = -45;
          // title.horizontalCenter = "left";
          // title.zIndex = 100;
          // title.fillOpacity = 1;
        }
     */

    /* ~~~~\  title  /~~~~ */


    var chartTitle = this.props.chartTitle;

    if (chartTitle) {
      var title = chart.titles.create();
      title.text = chartTitle.text.text;
      title.fill = chartTitle.text.color || (theme === "dark" ? "#ffffff" : "#000000");
      title.fontSize = chartTitle.text.fontSize || 22;
      title.fontWeight = chartTitle.text.fontWeight || "bold";
      title.fontFamily = chartTitle.text.fontFamily;
      title.align = chartTitle.align || "left";
      title.dy = -30;
    }
    /* ~~~~\  caption  /~~~~ */


    var chartCaption = this.props.caption;

    if (chartCaption) {
      var caption = chart.chartContainer.createChild(_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.Label);
      caption.text = chartCaption.text.text;
      caption.fill = chartCaption.text.color || (theme === "dark" ? "#ffffff" : "#000000");
      caption.fontSize = chartCaption.text.fontSize;
      caption.fontWeight = chartCaption.text.fontWeight;
      caption.fontFamily = chartCaption.text.fontFamily;
      caption.align = chartCaption.align || "right";
    }
    /* ~~~~\  image  /~~~~ */


    if (this.props.image) {
      //let image = chart.chartContainer.createChild(am4core.Image);
      //let image = container.createChild(am4core.Image);
      var img = this.props.image.image;
      img.position = this.props.image.position;
      img.hjust = this.props.image.hjust;
      img.vjust = this.props.image.vjust;
      var image = chart.topParent.children.getIndex(1).createChild(_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.Image); // same as: chart.logo.parent.createChild(am4core.Image);

      image.layout = "absolute";
      image.width = img.width || 60;
      image.height = img.height || 60;
      image.fillOpacity = img.opacity || 1;
      img.position = img.position || "bottomleft";

      switch (img.position) {
        case "bottomleft":
          chart.logo.dispose();
          image.x = 0;
          image.y = chart.pixelHeight - image.height;
          break;

        case "bottomright":
          image.x = chart.pixelWidth - image.width;
          image.y = chart.pixelHeight - image.height;
          break;

        case "topleft":
          image.x = 0;
          image.y = 0;
          break;

        case "topright":
          image.x = chart.pixelWidth - image.width;
          image.y = 0;
          break;
      }

      image.dx = img.hjust || 0;
      image.dy = img.vjust || 0; //      image.verticalCenter = "top";
      //      image.horizontalCenter = "left";
      //      image.align = img.align || "right";

      image.href = img.href; //      image.dx = image.width;
    }
    /* ~~~~\  scrollbars  /~~~~ */


    if (this.props.scrollbarX) {
      chart.scrollbarX = new _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.Scrollbar();
    }

    if (this.props.scrollbarY) {
      chart.scrollbarY = new _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.Scrollbar();
    }
    /* ~~~~\  button  /~~~~ */


    if (this.props.button) {
      var Button = chart.chartContainer.createChild(_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.Button);
      _utils__WEBPACK_IMPORTED_MODULE_13__.makeButton(Button, this.props.button);
      Button.events.on("hit", function () {
        for (var r = 0; r < data.length; ++r) {
          for (var v = 0; v < yValues.length; ++v) {
            chart.data[r][yValues[v][0]] = data2[r][yValues[v][0]];
            chart.data[r][yValues[v][1]] = data2[r][yValues[v][1]];
          }
        }

        chart.invalidateRawData();

        if (window.Shiny) {
          if (isDate) {
            Shiny.setInputValue(shinyId + ":rAmCharts4.dataframeWithDate", {
              data: chart.data,
              date: xValue
            });
            Shiny.setInputValue(shinyId + "_change", null);
          } else {
            Shiny.setInputValue(shinyId + ":rAmCharts4.dataframe", chart.data);
            Shiny.setInputValue(shinyId + "_change", null);
          }
        }
      });
    }
    /* ~~~~\  x-axis  /~~~~ */


    var XAxis = _utils__WEBPACK_IMPORTED_MODULE_13__.createAxis("X", _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__, _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__, chart, xAxis, minX, maxX, isDate, theme, cursor, xValue);
    XAxis.events.on("startchanged", _utils__WEBPACK_IMPORTED_MODULE_13__.onAxisZoomed);
    XAxis.events.on("endchanged", _utils__WEBPACK_IMPORTED_MODULE_13__.onAxisZoomed);
    /* ~~~~\  y-axis  /~~~~ */

    var YAxis = _utils__WEBPACK_IMPORTED_MODULE_13__.createAxis("Y", _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__, _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__, chart, yAxis, minY, maxY, false, theme, cursor);
    /* ~~~~\  vertical line  /~~~~ */

    if (vline) {
      var range = XAxis.axisRanges.create();
      range.value = vline.value;
      range.grid.stroke = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.color(vline.line.color);
      range.grid.strokeWidth = vline.line.width;
      range.grid.strokeOpacity = vline.line.opacity;
      range.grid.strokeDasharray = vline.line.dash;
    }
    /* ~~~~\  horizontal line  /~~~~ */


    if (hline) {
      var _range3 = YAxis.axisRanges.create();

      _range3.value = hline.value;
      _range3.grid.stroke = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.color(hline.line.color);
      _range3.grid.strokeWidth = hline.line.width;
      _range3.grid.strokeOpacity = hline.line.opacity;
      _range3.grid.strokeDasharray = hline.line.dash;
    }
    /* ~~~~\  cursor  /~~~~ */


    if (cursor) {
      chart.cursor = new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.XYCursor();

      switch (cursor.axes) {
        case "x":
          chart.cursor.xAxis = XAxis;
          chart.cursor.lineY.disabled = true;
          break;

        case "y":
          chart.cursor.yAxis = YAxis;
          chart.cursor.lineX.disabled = true;
          break;

        case "xy":
          chart.cursor.xAxis = XAxis;
          chart.cursor.yAxis = YAxis;
          break;

        default:
          chart.cursor.xAxis = XAxis;
          chart.cursor.yAxis = YAxis;
      }
    }
    /* ~~~~\  legend  /~~~~ */


    if (chartLegend) {
      var legend = new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.Legend();
      var legendPosition = chartLegend.position || "bottom";
      legend.position = legendPosition;

      if (legendPosition === "bottom" || legendPosition === "top") {
        legend.maxHeight = chartLegend.maxHeight;
        legend.scrollable = chartLegend.scrollable;
      } else {
        legend.maxWidth = chartLegend.maxWidth;
      }

      legend.useDefaultMarker = false;
      legend.events.on("dataitemsvalidated", function (ev) {
        ev.target.markers.values.forEach(function (container, index) {
          var children = container.children.values.map(function (child) {
            return child.className;
          }),
              bullet = children.indexOf("Bullet");
          if (bullet > -1) container.children.values[bullet].dispose();

          if (JSON.stringify(children) !== '["Line","Rectangle","Line"]') {
            var y2series = allSeries[2 * index + 1];
            var line = new _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.Line();
            line.stroke = y2series.stroke;
            line.valign = "bottom";
            line.x2 = 40; // it is the width given below

            line.strokeWidth = y2series.strokeWidth;
            line.strokeOpacity = y2series.strokeOpacity; //let l = chart.legend.markers.template.createChild(am4core.Line);
            //chart.legend.markers.values[0].children.push(line);

            line.parent = container; //console.log("l", l);
          }
        });
      });
      var markerTemplate = legend.markers.template;
      markerTemplate.width = chartLegend.itemsWidth || 35;
      markerTemplate.height = chartLegend.itemsHeight || 20; //markerTemplate.strokeWidth = 1;
      //markerTemplate.strokeOpacity = 1;

      var toggleHover = this.toggleHover;
      legend.itemContainers.template.events.on("over", function (ev) {
        var thisSeries = ev.target.dataItem.dataContext;
        if (thisSeries.visible) toggleHover(thisSeries, true); //        let seriesNames = allSeries.map(function(x){return x.name}),
        //          y2name = yValueNames[thisSeries.dataFields.openValueY],
        //          y2series = allSeries[seriesNames.indexOf(y2name)];
        //        toggleHover(y2series, true);
      });
      legend.itemContainers.template.events.on("out", function (ev) {
        var thisSeries = ev.target.dataItem.dataContext;
        if (thisSeries.visible && thisSeries.wasHover) toggleHover(thisSeries, false); //        let seriesNames = allSeries.map(function(x){return x.name}),
        //          y2name = yValueNames[thisSeries.dataFields.openValueY],
        //          y2series = allSeries[seriesNames.indexOf(y2name)];
        //        toggleHover(y2series, false);
      });
      legend.itemContainers.template.events.on("hit", function (ev) {
        var thisSeries = ev.target.dataItem.dataContext;
        var seriesNames = allSeries.map(function (x) {
          return x.name;
        }),
            y2name = yValueNames[thisSeries.dataFields.openValueY],
            y2series = allSeries[seriesNames.indexOf(y2name)];
        toggleHover(thisSeries, !y2series.visible);

        if (y2series.visible) {
          y2series.hide(500);
        } else {
          y2series.show(500);
        }
      });
      chart.legend = legend;
    }
    /* ~~~~\  function handling the drag event  /~~~~ */


    function handleDrag(event) {
      var dataItem = event.target.dataItem; // convert coordinate to value

      var value = YAxis.yToValue(event.target.pixelY); // set new value

      dataItem.valueY = value; // make line hover

      dataItem.segment.isHover = true; // hide tooltip not to interrupt

      dataItem.segment.hideTooltip(0); // make bullet hovered (as it might hide if mouse moves away)

      event.target.isHover = true;
    }
    /* ~~~~\  function handling the dragstop event  /~~~~ */


    function handleDragStop(event, value) {
      handleDrag(event);
      var dataItem = event.target.dataItem;
      dataItem.component.isHover = false; // XXXX

      event.target.isHover = false;
      dataCopy[dataItem.index][value] = dataItem.values.valueY.value;

      if (window.Shiny) {
        if (isDate) {
          Shiny.setInputValue(shinyId + ":rAmCharts4.dataframeWithDate", {
            data: dataCopy,
            date: xValue
          });
          Shiny.setInputValue(shinyId + "_change:rAmCharts4.lineChange", {
            index: dataItem.index + 1,
            x: dataItem.dateX,
            variable: value,
            y: dataItem.values.valueY.value
          });
        } else {
          Shiny.setInputValue(shinyId + ":rAmCharts4.dataframe", dataCopy);
          Shiny.setInputValue(shinyId + "_change", {
            index: dataItem.index + 1,
            x: dataItem.values.valueX.value,
            variable: value,
            y: dataItem.values.valueY.value
          });
        }
      }
    }
    /* 
      trigger the "positionchanged" event on bullets when a resizing occurs, 
      otherwise bullets are unresponsive  
    */


    chart.events.on("sizechanged", event => {
      event.target.series.each(function (s) {
        s.bulletsContainer.children.each(function (b) {
          b.dispatchImmediately("positionchanged");
        });
      });
    });
    yValues.forEach(function (y1y2, index) {
      var y1 = y1y2[0],
          y2 = y1y2[1];
      var lineStyle1 = lineStyles[y1];
      var lineStyle2 = lineStyles[y2];
      var series1 = chart.series.push(new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.LineSeries()),
          series2 = chart.series.push(new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.LineSeries());
      series2.hiddenInLegend = true;

      if (isDate) {
        series1.dataFields.dateX = xValue;
        series2.dataFields.dateX = xValue;
      } else {
        series1.dataFields.valueX = xValue;
        series2.dataFields.valueX = xValue;
      }

      series1.dataFields.valueY = y1;
      series2.dataFields.valueY = y2;
      series1.name = areas[index].name;
      series2.name = yValueNames[y2];
      series1.dataFields.openValueY = y2;
      series2.dataFields.openValueY = y1; //series1.tooltipText = "yyyyy";// "y1: {openValueY} y2: {valueY}";

      series1.fill = areas[index].color || chart.colors.getIndex(index); //series2.fill = series1.fill;

      series1.fillOpacity = areas[index].opacity; //series2.fillOpacity = series1.fillOpacity;
      //series2.zIndex = -1;

      series1.sequencedInterpolation = true;
      series2.sequencedInterpolation = true;
      series1.defaultState.interpolationDuration = 1000;
      series2.defaultState.interpolationDuration = 1500;
      series1.tensionX = lineStyle1.tensionX || 1;
      series1.tensionY = lineStyle1.tensionY || 1;
      series2.tensionX = lineStyle2.tensionX || 1;
      series2.tensionY = lineStyle2.tensionY || 1;
      /* ~~~~\  bullet  /~~~~ */

      var bullet1 = series1.bullets.push(new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.Bullet()),
          shape1 = _utils__WEBPACK_IMPORTED_MODULE_13__.Shape(_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__, chart, index, bullet1, bulletsStyle[y1]);
      var bullet2 = series2.bullets.push(new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.Bullet()),
          shape2 = _utils__WEBPACK_IMPORTED_MODULE_13__.Shape(_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__, chart, index, bullet2, bulletsStyle[y2]);

      if (!alwaysShowBullets) {
        shape1.opacity = 0; // initially invisible

        shape1.defaultState.properties.opacity = 0;
        shape2.opacity = 0; // initially invisible

        shape2.defaultState.properties.opacity = 0;
      }

      if (tooltips) {
        /* ~~~~\  tooltip  /~~~~ */
        bullet1.tooltipText = tooltips[y1].text;
        var tooltip1 = _utils__WEBPACK_IMPORTED_MODULE_13__.Tooltip(_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__, chart, index, tooltips[y1]);
        bullet2.tooltipText = tooltips[y2].text;
        var tooltip2 = _utils__WEBPACK_IMPORTED_MODULE_13__.Tooltip(_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__, chart, index, tooltips[y2]);
        tooltip1.pointerOrientation = "vertical";
        tooltip1.dy = 0;
        tooltip2.pointerOrientation = "vertical";
        tooltip2.dy = 0;
        tooltip1.adapter.add("rotation", (x, target) => {
          if (target.dataItem) {
            if (target.dataItem.valueY >= 0) {
              return 0;
            } else {
              return 180;
            }
          } else {
            return x;
          }
        });
        tooltip1.label.adapter.add("verticalCenter", (x, target) => {
          if (target.dataItem) {
            if (target.dataItem.valueY >= 0) {
              return "none";
            } else {
              return "bottom";
            }
          } else {
            return x;
          }
        });
        tooltip1.label.adapter.add("rotation", (x, target) => {
          if (target.dataItem) {
            if (target.dataItem.valueY >= 0) {
              return 0;
            } else {
              return 180;
            }
          } else {
            return x;
          }
        });
        tooltip2.adapter.add("rotation", (x, target) => {
          if (target.dataItem) {
            if (target.dataItem.valueY >= 0) {
              return 0;
            } else {
              return 180;
            }
          } else {
            return x;
          }
        });
        tooltip2.label.adapter.add("verticalCenter", (x, target) => {
          if (target.dataItem) {
            if (target.dataItem.valueY >= 0) {
              return "none";
            } else {
              return "bottom";
            }
          } else {
            return x;
          }
        });
        tooltip2.label.adapter.add("rotation", (x, target) => {
          if (target.dataItem) {
            if (target.dataItem.valueY >= 0) {
              return 0;
            } else {
              return 180;
            }
          } else {
            return x;
          }
        });
        bullet1.tooltip = tooltip1;
        bullet2.tooltip = tooltip2; // hide label when hovered because the tooltip is shown
        // XXX y'a pas de label

        /*bullet.events.on("over", event => {
            let dataItem = event.target.dataItem;
            console.log("dataItem bullet on over", dataItem);
            let itemLabelBullet = dataItem.bullets.getKey(valueLabel.uid);
            itemLabelBullet.fillOpacity = 0;
          });
          // show label when mouse is out
          bullet.events.on("out", event => {
            let dataItem = event.target.dataItem;
            let itemLabelBullet = dataItem.bullets.getKey(valueLabel.uid);
            itemLabelBullet.fillOpacity = 1;
          });*/
      } // create bullet hover state


      var hoverState1 = shape1.states.create("hover");
      hoverState1.properties.strokeWidth = shape1.strokeWidth + 3;
      hoverState1.properties.opacity = 1; // visible when hovered

      var hoverState2 = shape2.states.create("hover");
      hoverState2.properties.strokeWidth = shape2.strokeWidth + 3;
      hoverState2.properties.opacity = 1; // visible when hovered

      if (draggable[y1]) {
        bullet1.draggable = true; // resize cursor when over

        bullet1.cursorOverStyle = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.MouseCursorStyle.verticalResize; // while dragging

        bullet1.events.on("drag", event => {
          handleDrag(event);
        }); // on dragging stop

        bullet1.events.on("dragstop", event => {
          handleDragStop(event, y1);
        }); // start dragging bullet even if we hit on column not just a bullet, this will make it more friendly for touch devices

        bullet1.events.on("down", event => {
          var dataItem = event.target.dataItem;
          var itemBullet = dataItem.bullets.getKey(bullet1.uid);
          itemBullet.dragStart(event.pointer);
        }); // when line position changes, adjust minX/maxX of bullets so that we could only dragg vertically

        bullet1.events.on("positionchanged", event => {
          var dataItem = event.target.dataItem; //console.log("dataItem", dataItem);

          if (dataItem.bullets) {
            var itemBullet = dataItem.bullets.getKey(bullet1.uid);
            var point = dataItem.point;
            itemBullet.minX = point.x;
            itemBullet.maxX = itemBullet.minX;
            itemBullet.minY = 0;
            itemBullet.maxY = chart.seriesContainer.pixelHeight;
          }
        });
      }

      if (draggable[y2]) {
        bullet2.draggable = true; // resize cursor when over

        bullet2.cursorOverStyle = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.MouseCursorStyle.verticalResize; // while dragging

        bullet2.events.on("drag", event => {
          handleDrag(event);
          var dataItem = event.target.dataItem;
          series1.dataItems.values[dataItem.index].openValueY = dataItem.valueY;
        }); // on dragging stop

        bullet2.events.on("dragstop", event => {
          handleDragStop(event, y2);
        }); // start dragging bullet even if we hit on column not just a bullet, this will make it more friendly for touch devices

        bullet2.events.on("down", event => {
          var dataItem = event.target.dataItem;
          var itemBullet = dataItem.bullets.getKey(bullet2.uid);
          itemBullet.dragStart(event.pointer);
        }); // when line position changes, adjust minX/maxX of bullets so that we could only dragg vertically

        bullet2.events.on("positionchanged", event => {
          var dataItem = event.target.dataItem; //console.log("dataItem", dataItem);

          if (dataItem.bullets) {
            var itemBullet = dataItem.bullets.getKey(bullet2.uid);
            var point = dataItem.point;
            itemBullet.minX = point.x;
            itemBullet.maxX = itemBullet.minX;
            itemBullet.minY = 0;
            itemBullet.maxY = chart.seriesContainer.pixelHeight;
          }
        });
      }
      /* ~~~~\  line template  /~~~~ */


      var lineTemplate1 = series1.segments.template,
          lineTemplate2 = series2.segments.template; //      lineTemplate1.tooltipText = "{valueY}";
      //      lineTemplate2.tooltipText = "y2: {valueY}";

      lineTemplate1.interactionsEnabled = true;
      lineTemplate2.interactionsEnabled = true;
      series1.strokeWidth = lineStyle1.width || 3;
      series2.strokeWidth = lineStyle2.width || 3;
      series1.stroke = lineStyle1.color || chart.colors.getIndex(index).saturate(0.7);
      series2.stroke = lineStyle2.color || chart.colors.getIndex(index).saturate(0.7);
      if (lineStyle1.dash) series1.strokeDasharray = lineStyle1.dash;
      if (lineStyle2.dash) series2.strokeDasharray = lineStyle2.dash;
      /*      // line hover state
            let lineHoverState1 = lineTemplate1.states.create("hover"),
              lineHoverState2 = lineTemplate2.states.create("hover");
      */
      // you can change any property on hover state and it will be animated

      /* let pattern = new am4core.LinePattern();
      pattern.width = 10;
      pattern.height = 10;
      pattern.stroke = "white";// am4core.color("red").lighten(0.5);
      pattern.strokeWidth = 2;
      pattern.rotation = 45;
      pattern.backgroundFill = areas[index].color;
      pattern.backgroundOpacity = areas[index].opacity;
      console.log("ppatern", pattern);
      lineHoverState1.properties.fill = pattern;
      */

      /*      lineHoverState1.properties.fill = series1.fill.lighten(0.25);
            lineHoverState1.properties.strokeWidth = series1.strokeWidth + 2;
            lineHoverState2.properties.strokeWidth = series2.strokeWidth + 2;
      */

      lineTemplate1.events.on("over", event => {
        //        let seriesNames = allChartSeries.map(function(x){return x.name}),
        //          y2series = allChartSeries[seriesNames.indexOf(yValueNames[y2])];
        series1.strokeWidth = series1.strokeWidth + 2;
        series1.fill = series1.fill.lighten(0.25);
        series2.strokeWidth = series2.strokeWidth + 2;
      });
      lineTemplate1.events.on("out", event => {
        series1.strokeWidth = series1.strokeWidth - 2;
        series1.fill = areas[index].color || chart.colors.getIndex(index);
        series2.strokeWidth = series2.strokeWidth - 2;
      });
      lineTemplate2.events.on("over", event => {
        //        let seriesNames = allChartSeries.map(function(x){return x.name}),
        //          y1series = allChartSeries[seriesNames.indexOf(areas[index].name)];
        series1.strokeWidth = series1.strokeWidth + 2;
        series1.fill = series1.fill.lighten(0.25); //lineHoverState1.properties.fill;

        series2.strokeWidth = series2.strokeWidth + 2;
      });
      lineTemplate2.events.on("out", event => {
        series1.strokeWidth = series1.strokeWidth - 2;
        series1.fill = areas[index].color || chart.colors.getIndex(index);
        series2.strokeWidth = series2.strokeWidth - 2;
      });
    });
    /* end of forEach */

    return chart;
  }

  componentDidMount() {
    this.chart = this.RangeAreaChart();
  }

  componentDidUpdate() {
    if (this.chart) {
      this.chart.dispose();
    }

    this.chart = this.RangeAreaChart();
  }

  componentWillUnmount() {
    if (this.chart) {
      this.chart.dispose();
    }
  }

  render() {
    return /*#__PURE__*/React.createElement("div", {
      key: this.props.chartId,
      id: this.props.chartId,
      style: this.style()
    });
  }

}
/* COMPONENT: RADIAL BAR CHART */


class AmRadialBarChart extends React.PureComponent {
  constructor(props) {
    super(props);
    this.style = this.style.bind(this);
    this.RadialBarChart = this.RadialBarChart.bind(this);
  }

  style() {
    if (window.Shiny && !window.FlexDashboard) {
      return {
        width: "100%",
        height: "100%"
      };
    } else {
      return {
        width: this.props.width,
        height: this.props.height
      };
    }
  }

  RadialBarChart() {
    var theme = this.props.theme,
        animated = this.props.animated,
        chartLegend = this.props.legend,
        category = this.props.category,
        categories = this.props.data[category],
        values = this.props.values,
        minValue = this.props.minValue,
        maxValue = this.props.maxValue,
        data = HTMLWidgets.dataframeToD3(this.props.data),
        dataCopy = HTMLWidgets.dataframeToD3(_utils__WEBPACK_IMPORTED_MODULE_13__.subset(this.props.data, [category].concat(values))),
        data2 = this.props.data2 ? HTMLWidgets.dataframeToD3(_utils__WEBPACK_IMPORTED_MODULE_13__.subset(this.props.data2, values)) : null,
        valueNames = this.props.valueNames,
        showValues = this.props.showValues,
        cellWidth = this.props.cellWidth,
        columnWidth = this.props.columnWidth,
        xAxis = this.props.xAxis,
        yAxis = this.props.yAxis,
        draggable = this.props.draggable,
        tooltips = this.props.tooltip,
        valueFormatter = this.props.valueFormatter,
        columnStyles = this.props.columnStyle,
        bulletsStyle = this.props.bullets,
        alwaysShowBullets = this.props.alwaysShowBullets,
        cursor = this.props.cursor,
        chartId = this.props.chartId,
        shinyId = this.props.shinyId;

    if (window.Shiny) {
      if (shinyId === undefined) {
        shinyId = $(document.getElementById(chartId)).parent().attr("id");
      }

      Shiny.setInputValue(shinyId + ":rAmCharts4.dataframe", dataCopy);
    }

    if (animated) {
      _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_animated__WEBPACK_IMPORTED_MODULE_3__["default"]);
    }

    switch (theme) {
      case "dark":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_dark__WEBPACK_IMPORTED_MODULE_4__["default"]);
        break;

      case "dataviz":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_dataviz__WEBPACK_IMPORTED_MODULE_5__["default"]);
        break;

      case "frozen":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_frozen__WEBPACK_IMPORTED_MODULE_6__["default"]);
        break;

      case "kelly":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_kelly__WEBPACK_IMPORTED_MODULE_7__["default"]);
        break;

      case "material":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_material__WEBPACK_IMPORTED_MODULE_8__["default"]);
        break;

      case "microchart":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_microchart__WEBPACK_IMPORTED_MODULE_9__["default"]);
        break;

      case "moonrisekingdom":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_moonrisekingdom__WEBPACK_IMPORTED_MODULE_10__["default"]);
        break;

      case "patterns":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_patterns__WEBPACK_IMPORTED_MODULE_11__["default"]);
        break;

      case "spiritedaway":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_spiritedaway__WEBPACK_IMPORTED_MODULE_12__["default"]);
        break;
    }

    var chart = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.create(this.props.chartId, _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.RadarChart);
    chart.radius = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.percent(100);
    chart.innerRadius = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.percent(this.props.innerRadius);
    chart.data = data;
    chart.hiddenState.properties.opacity = 0; // this makes initial fade in effect

    if (this.props.chartTitle) {
      chart.padding(50, 10, 10, 10);
    } else {
      chart.padding(10, 10, 10, 10);
    }

    chart.maskBullets = false; // allow bullets to go out of plot area

    var chartBackgroundColor = this.props.backgroundColor || chart.background.fill;
    chart.background.fill = chartBackgroundColor;
    /* ~~~~\  Enable export  /~~~~ */

    if (this.props.export) {
      chart.exporting.menu = new _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.ExportMenu();
      chart.exporting.menu.items = _utils__WEBPACK_IMPORTED_MODULE_13__.exportMenuItems;
    }
    /* ~~~~\  title  /~~~~ */


    var chartTitle = this.props.chartTitle;

    if (chartTitle) {
      var title = chart.titles.create();
      title.dy = -30;
      title.text = chartTitle.text.text;
      title.fill = chartTitle.text.color || (theme === "dark" ? "#ffffff" : "#000000");
      title.fontSize = chartTitle.text.fontSize || 22;
      title.fontWeight = chartTitle.text.fontWeight || "bold";
      title.fontFamily = chartTitle.text.fontFamily;
      title.align = chartTitle.align || "left";
    }
    /* ~~~~\  caption  /~~~~ */


    var chartCaption = this.props.caption;

    if (chartCaption) {
      var caption = chart.chartContainer.createChild(_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.Label);
      caption.text = chartCaption.text.text;
      caption.fill = chartCaption.text.color || (theme === "dark" ? "#ffffff" : "#000000");
      caption.fontSize = chartCaption.text.fontSize;
      caption.fontWeight = chartCaption.text.fontWeight;
      caption.fontFamily = chartCaption.text.fontFamily;
      caption.align = chartCaption.align || "right";
    }
    /* ~~~~\  image  /~~~~ */


    if (this.props.image) {
      _utils__WEBPACK_IMPORTED_MODULE_13__.Image(_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__, chart, this.props.image);
    }
    /* ~~~~\  scrollbars  /~~~~ */


    if (this.props.scrollbarX) {
      chart.scrollbarX = new _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.Scrollbar();
    }

    if (this.props.scrollbarY) {
      chart.scrollbarY = new _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.Scrollbar();
    }
    /* ~~~~\  button  /~~~~ */


    if (this.props.button) {
      var Button = chart.chartContainer.createChild(_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.Button);
      _utils__WEBPACK_IMPORTED_MODULE_13__.makeButton(Button, this.props.button);
      Button.events.on("hit", function () {
        for (var r = 0; r < data.length; ++r) {
          for (var v = 0; v < values.length; ++v) {
            chart.data[r][values[v]] = data2[r][values[v]];
          }
        }

        chart.invalidateRawData();

        if (window.Shiny) {
          Shiny.setInputValue(shinyId + ":rAmCharts4.dataframe", chart.data);
          Shiny.setInputValue(shinyId + "_change", null);
        }
      });
    }
    /* ~~~~\  Shiny message handler for radial bar chart  /~~~~ */


    if (window.Shiny) {
      Shiny.addCustomMessageHandler(shinyId + "bar", function (newdata) {
        var tail = " is missing in the data you supplied!"; // check that the received data has the 'category' column

        if (!newdata.hasOwnProperty(category)) {
          console.warn("updateAmBarChart: column \"".concat(category, "\"") + tail);
          return null;
        } // check that the received data has the necessary categories


        var ok = true,
            i = 0;

        while (ok && i < categories.length) {
          ok = newdata[category].indexOf(categories[i]) > -1;

          if (!ok) {
            console.warn("updateAmBarChart: category \"".concat(categories[i], "\"") + tail);
          }

          i++;
        }

        if (!ok) {
          return null;
        } // check that the received data has the necessary 'values' columns


        i = 0;

        while (ok && i < values.length) {
          ok = newdata.hasOwnProperty(values[i]);

          if (!ok) {
            console.warn("updateAmBarChart: column \"".concat(values[i], "\"") + tail);
          }

          i++;
        }

        if (!ok) {
          return null;
        } // update chart data


        var tnewdata = HTMLWidgets.dataframeToD3(newdata);

        for (var r = 0; r < data.length; ++r) {
          for (var v = 0; v < values.length; ++v) {
            chart.data[r][values[v]] = tnewdata[r][values[v]];
          }
        }

        chart.invalidateRawData();
        Shiny.setInputValue(shinyId + ":rAmCharts4.dataframe", tnewdata);
        Shiny.setInputValue(shinyId + "_change", null);
      });
    }
    /* ~~~~\  category axis  /~~~~ */


    var categoryAxis = chart.xAxes.push(new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.CategoryAxis());
    categoryAxis.paddingBottom = xAxis.adjust || 0;
    categoryAxis.renderer.grid.template.location = 0;
    categoryAxis.renderer.cellStartLocation = 1 - cellWidth / 100;
    categoryAxis.renderer.cellEndLocation = cellWidth / 100;

    if (xAxis && xAxis.title && xAxis.title.text !== "") {
      categoryAxis.title.text = xAxis.title.text || category;
      categoryAxis.title.fontWeight = "bold";
      categoryAxis.title.fontSize = xAxis.title.fontSize || 20;
      categoryAxis.title.fill = xAxis.title.color || (theme === "dark" ? "#ffffff" : "#000000");
    }

    if (xAxis.labels) {
      var xAxisLabels = categoryAxis.renderer.labels.template;
      xAxisLabels.location = 0.5;
      if (typeof xAxis.labels.radius === "number") xAxisLabels.radius = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.percent(xAxis.labels.radius);
      if (typeof xAxis.labels.relativeRotation === "number") xAxisLabels.relativeRotation = xAxis.labels.relativeRotation;
      xAxisLabels.fontSize = xAxis.labels.fontSize || 14;
      xAxisLabels.fill = xAxis.labels.color || (theme === "dark" ? "#ffffff" : "#000000");
    } else {
      categoryAxis.renderer.labels.template.disabled = true;
    }

    categoryAxis.dataFields.category = category; //categoryAxis.renderer.grid.template.disabled = true;
    //categoryAxis.renderer.minGridDistance = 50;

    categoryAxis.cursorTooltipEnabled = false;
    /* ~~~~\  value axis  /~~~~ */

    var valueAxis = _utils__WEBPACK_IMPORTED_MODULE_13__.createAxis("Y", _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__, _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__, chart, yAxis, minValue, maxValue, false, theme, cursor);
    /* ~~~~\ cursor /~~~~ */

    if (cursor) {
      chart.cursor = new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.XYCursor();
      chart.cursor.yAxis = valueAxis;
      chart.cursor.lineX.disabled = true;
    }
    /* ~~~~\  legend  /~~~~ */


    if (chartLegend) {
      chart.legend = new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.Legend();
      var legendPosition = chartLegend.position || "bottom";
      chart.legend.position = legendPosition;

      if (legendPosition === "bottom" || legendPosition === "top") {
        chart.legend.maxHeight = chartLegend.maxHeight;
        chart.legend.scrollable = chartLegend.scrollable;
      } else {
        chart.legend.maxWidth = chartLegend.maxWidth;
      }

      chart.legend.useDefaultMarker = false;
      var markerTemplate = chart.legend.markers.template;
      markerTemplate.width = chartLegend.itemsWidth || 20;
      markerTemplate.height = chartLegend.itemsHeight || 20;
      chart.legend.itemContainers.template.events.on("over", function (ev) {
        ev.target.dataItem.dataContext.columns.each(function (x) {
          x.column.isHover = true;
        });
      });
      chart.legend.itemContainers.template.events.on("out", function (ev) {
        ev.target.dataItem.dataContext.columns.each(function (x) {
          x.column.isHover = false;
        });
      });
    }
    /* ~~~~\  function handling the drag event  /~~~~ */


    function handleDrag(event) {
      var dataItem = event.target.dataItem; //console.log(event.target);

      var position = valueAxis.pointToPosition({
        x: event.target.pixelX,
        y: event.target.pixelY
      }),
          value = valueAxis.positionToValue(position); // convert coordinate to value
      //			let value = valueAxis.yToValue(event.target.pixelY);
      // set new value

      dataItem.valueY = maxValue - value; // should I use minValue as well?
      // make column hover

      dataItem.column.isHover = true; // hide tooltip not to interrupt

      dataItem.column.hideTooltip(0); // make bullet hovered (as it might hide if mouse moves away)

      event.target.isHover = true;
    }
    /* 
      trigger the "positionchanged" event on bullets when a resizing occurs, 
      otherwise bullets are unresponsive  
    */


    chart.events.on("sizechanged", event => {
      event.target.series.each(function (s) {
        s.bulletsContainer.children.each(function (b) {
          b.dispatchImmediately("positionchanged");
        });
      });
    });
    values.forEach(function (value, index) {
      var series = chart.series.push(new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.RadarColumnSeries());
      series.dataFields.categoryX = category;
      series.dataFields.valueY = value;
      series.name = valueNames[value];
      series.sequencedInterpolation = true;
      series.defaultState.interpolationDuration = 1500;
      /* ~~~~\  value label  /~~~~ */

      var valueLabel;

      if (showValues) {
        valueLabel = new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.LabelBullet();
        series.bullets.push(valueLabel);
        valueLabel.label.text = "{valueY.value.formatNumber('" + valueFormatter + "')}";
        valueLabel.label.hideOversized = true;
        valueLabel.label.truncate = false;
        valueLabel.strokeOpacity = 0;
        valueLabel.adapter.add("dy", (x, target) => {
          if (target.dataItem.valueY > 0) {
            return -10;
          } else {
            return 10;
          }
        });
      }
      /* ~~~~\  bullet  /~~~~ */


      var bullet;
      var columnStyle = columnStyles[value],
          color = columnStyle.color || chart.colors.getIndex(index),
          strokeColor = columnStyle.strokeColor || _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.color(columnStyle.color).lighten(-0.5);

      if (alwaysShowBullets || draggable[value]) {
        bullet = series.bullets.create();

        if (!alwaysShowBullets) {
          bullet.opacity = 0; // initially invisible

          bullet.defaultState.properties.opacity = 0;
        } // add sprite to bullet


        var shapeConfig = bulletsStyle[value];

        if (!shapeConfig.color) {
          shapeConfig.color = color;
        }

        if (!shapeConfig.strokeColor) {
          shapeConfig.strokeColor = strokeColor;
        }

        var shape = _utils__WEBPACK_IMPORTED_MODULE_13__.Shape(_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__, chart, index, bullet, shapeConfig);
      }

      if (draggable[value]) {
        // cursor when over
        bullet.cursorOverStyle = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.MouseCursorStyle.pointer;
        bullet.draggable = true; // create bullet hover state

        var hoverState = bullet.states.create("hover");
        hoverState.properties.opacity = 1; // visible when hovered
        // while dragging

        bullet.events.on("drag", event => {
          handleDrag(event);
        }); // on dragging stop

        bullet.events.on("dragstop", event => {
          handleDrag(event);
          var dataItem = event.target.dataItem;
          dataItem.column.isHover = false;
          event.target.isHover = false;
          dataCopy[dataItem.index][value] = dataItem.values.valueY.value;

          if (window.Shiny) {
            Shiny.setInputValue(shinyId + ":rAmCharts4.dataframe", dataCopy);
            Shiny.setInputValue(shinyId + "_change", {
              index: dataItem.index + 1,
              category: dataItem.categoryX,
              field: value,
              value: dataItem.values.valueY.value
            });
          }
        });
      }
      /* ~~~~\  column template  /~~~~ */


      var columnTemplate = series.columns.template;
      columnTemplate.width = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.percent(columnWidth);
      columnTemplate.fill = color;

      if (columnStyle.colorAdapter) {
        columnTemplate.adapter.add("fill", columnStyle.colorAdapter);

        if (!columnStyle.strokeColor && !columnStyle.strokeColorAdapter) {
          columnTemplate.adapter.add("stroke", (x, target) => {
            var color = columnStyle.colorAdapter(x, target);
            return _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.color(color).lighten(-0.5);
          });
        }
      }

      columnTemplate.stroke = strokeColor;

      if (columnStyle.strokeColorAdapter) {
        columnTemplate.adapter.add("stroke", columnStyle.strokeColorAdapter);
      }

      columnTemplate.strokeOpacity = 1;
      columnTemplate.radarColumn.fillOpacity = columnStyle.opacity || 0.8;
      columnTemplate.radarColumn.strokeWidth = typeof columnStyle.strokeWidth === "number" ? columnStyle.strokeWidth : 4;
      /* ~~~~\  tooltip  /~~~~ */

      if (tooltips) {
        columnTemplate.tooltipText = tooltips[value].text;
        var tooltip = _utils__WEBPACK_IMPORTED_MODULE_13__.Tooltip(_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__, chart, index, tooltips[value]);
        tooltip.pointerOrientation = "vertical";
        tooltip.dy = 0;
        tooltip.adapter.add("rotation", (x, target) => {
          if (target.dataItem) {
            if (target.dataItem.valueY >= 0) {
              return 0;
            } else {
              return 180;
            }
          } else {
            return x;
          }
        });
        tooltip.label.adapter.add("verticalCenter", (x, target) => {
          if (target.dataItem) {
            if (target.dataItem.valueY >= 0) {
              return "none";
            } else {
              return "bottom";
            }
          } else {
            return x;
          }
        });
        tooltip.label.adapter.add("rotation", (x, target) => {
          if (target.dataItem) {
            if (target.dataItem.valueY >= 0) {
              return 0;
            } else {
              return 180;
            }
          } else {
            return x;
          }
        });
        columnTemplate.tooltip = tooltip;
        columnTemplate.adapter.add("tooltipY", (x, target) => {
          if (target.dataItem.valueY > 0) {
            return 0;
          } else {
            return -valueAxis.valueToPoint(maxValue - target.dataItem.valueY).y;
          }
        });
      }

      var cr = columnStyle.cornerRadius || 8;
      columnTemplate.radarColumn.adapter.add("cornerRadius", (x, target) => {
        if (target.dataItem.valueY > 0) {
          return target.isHover ? 2 * cr : cr;
        } else {
          return 0;
        }
      });
      columnTemplate.radarColumn.innerCornerRadius = 0; // columns hover state

      var columnHoverState = columnTemplate.radarColumn.states.create("hover"); // you can change any property on hover state and it will be animated

      columnHoverState.properties.fillOpacity = 1;
      columnHoverState.properties.strokeWidth = columnStyle.strokeWidth + 2;

      if (tooltips && showValues) {
        // hide label when hovered because the tooltip is shown
        columnTemplate.events.on("over", event => {
          var dataItem = event.target.dataItem;
          var itemLabelBullet = dataItem.bullets.getKey(valueLabel.uid);
          itemLabelBullet.fillOpacity = 0;
        }); // show label when mouse is out

        columnTemplate.events.on("out", event => {
          var dataItem = event.target.dataItem;
          var itemLabelBullet = dataItem.bullets.getKey(valueLabel.uid);
          itemLabelBullet.fillOpacity = 1;
        });
      }

      if (draggable[value]) {
        // start dragging bullet even if we hit on column not just a bullet, this will make it more friendly for touch devices
        columnTemplate.events.on("down", event => {
          var dataItem = event.target.dataItem;
          var itemBullet = dataItem.bullets.getKey(bullet.uid);
          itemBullet.dragStart(event.pointer);
        }); // when columns position changes, adjust minX/maxX of bullets so that we could only dragg vertically

        columnTemplate.events.on("positionchanged", event => {
          var dataItem = event.target.dataItem;

          if (dataItem.bullets) {
            var itemBullet = dataItem.bullets.getKey(bullet.uid);
            var column = dataItem.column;
            itemBullet.minX = column.pixelX + column.pixelWidth / 2;
            itemBullet.maxX = itemBullet.minX;
            itemBullet.minY = 0;
            itemBullet.maxY = chart.seriesContainer.pixelHeight;
          }
        });
      }
    });
    return chart;
  }

  componentDidMount() {
    this.chart = this.RadialBarChart();
  }

  componentDidUpdate() {
    if (this.chart) {
      this.chart.dispose();
    }

    this.chart = this.RadialBarChart();
  }

  componentWillUnmount() {
    if (this.chart) {
      this.chart.dispose();
    }
  }

  render() {
    return /*#__PURE__*/React.createElement("div", {
      key: this.props.chartId,
      id: this.props.chartId,
      style: this.style()
    });
  }

}
/* COMPONENT: DUMBBELL CHART */


class AmDumbbellChart extends React.PureComponent {
  constructor(props) {
    super(props);
    this.style = this.style.bind(this);
    this.DumbbellChart = this.DumbbellChart.bind(this);
  }

  style() {
    if (window.Shiny && !window.FlexDashboard) {
      return {
        width: "100%",
        height: "100%"
      };
    } else {
      return {
        width: this.props.width,
        height: this.props.height
      };
    }
  }

  DumbbellChart() {
    var theme = this.props.theme,
        animated = this.props.animated,
        chartLegend = this.props.legend,
        category = this.props.category,
        values = this.props.values,
        minValue = this.props.minValue,
        maxValue = this.props.maxValue,
        data = HTMLWidgets.dataframeToD3(this.props.data),
        dataCopy = HTMLWidgets.dataframeToD3(_utils__WEBPACK_IMPORTED_MODULE_13__.subset(this.props.data, [category].concat(values.flat()))),
        data2 = this.props.data2 ? HTMLWidgets.dataframeToD3(_utils__WEBPACK_IMPORTED_MODULE_13__.subset(this.props.data2, values.flat())) : null,
        valueNames = this.props.valueNames,
        seriesNames = this.props.seriesNames,
        hline = this.props.hline,
        xAxis = this.props.xAxis,
        yAxis = this.props.yAxis,
        draggable = this.props.draggable,
        tooltips = this.props.tooltip,
        valueFormatter = this.props.valueFormatter,
        segmentsStyles = this.props.segmentsStyle,
        bulletsStyle = this.props.bullets,
        cursor = this.props.cursor,
        chartId = this.props.chartId,
        shinyId = this.props.shinyId;

    if (window.Shiny) {
      if (shinyId === undefined) {
        shinyId = $(document.getElementById(chartId)).parent().attr("id");
      }

      Shiny.setInputValue(shinyId + ":rAmCharts4.dataframe", dataCopy);
    }

    if (animated) {
      _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_animated__WEBPACK_IMPORTED_MODULE_3__["default"]);
    }

    switch (theme) {
      case "dark":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_dark__WEBPACK_IMPORTED_MODULE_4__["default"]);
        break;

      case "dataviz":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_dataviz__WEBPACK_IMPORTED_MODULE_5__["default"]);
        break;

      case "frozen":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_frozen__WEBPACK_IMPORTED_MODULE_6__["default"]);
        break;

      case "kelly":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_kelly__WEBPACK_IMPORTED_MODULE_7__["default"]);
        break;

      case "material":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_material__WEBPACK_IMPORTED_MODULE_8__["default"]);
        break;

      case "microchart":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_microchart__WEBPACK_IMPORTED_MODULE_9__["default"]);
        break;

      case "moonrisekingdom":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_moonrisekingdom__WEBPACK_IMPORTED_MODULE_10__["default"]);
        break;

      case "patterns":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_patterns__WEBPACK_IMPORTED_MODULE_11__["default"]);
        break;

      case "spiritedaway":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_spiritedaway__WEBPACK_IMPORTED_MODULE_12__["default"]);
        break;
    }

    var chart;
    chart = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.create(this.props.chartId, _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.XYChart);
    chart.data = data;
    chart.hiddenState.properties.opacity = 0; // this makes initial fade in effect

    chart.padding(50, 40, 0, 10);
    chart.maskBullets = false; // allow bullets to go out of plot area

    var chartBackgroundColor = this.props.backgroundColor || chart.background.fill;
    chart.background.fill = chartBackgroundColor;
    /* ~~~~\  Enable export  /~~~~ */

    if (this.props.export) {
      chart.exporting.menu = new _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.ExportMenu();
      chart.exporting.menu.items = _utils__WEBPACK_IMPORTED_MODULE_13__.exportMenuItems;
    }
    /* ~~~~\  title  /~~~~ */


    var chartTitle = this.props.chartTitle;

    if (chartTitle) {
      var title = chart.titles.create();
      title.text = chartTitle.text.text;
      title.fill = chartTitle.text.color || (theme === "dark" ? "#ffffff" : "#000000");
      title.fontSize = chartTitle.text.fontSize || 22;
      title.fontWeight = chartTitle.text.fontWeight || "bold";
      title.fontFamily = chartTitle.text.fontFamily;
      title.align = chartTitle.align || "left";
      title.dy = -30;
    }
    /* ~~~~\  caption  /~~~~ */


    var chartCaption = this.props.caption;

    if (chartCaption) {
      var caption = chart.chartContainer.createChild(_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.Label);
      caption.text = chartCaption.text.text;
      caption.fill = chartCaption.text.color || (theme === "dark" ? "#ffffff" : "#000000");
      caption.fontSize = chartCaption.text.fontSize;
      caption.fontWeight = chartCaption.text.fontWeight;
      caption.fontFamily = chartCaption.text.fontFamily;
      caption.align = chartCaption.align || "right";
    }
    /* ~~~~\  image  /~~~~ */


    if (this.props.image) {
      _utils__WEBPACK_IMPORTED_MODULE_13__.Image(_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__, chart, this.props.image);
    }
    /* ~~~~\  scrollbars  /~~~~ */


    if (this.props.scrollbarX) {
      chart.scrollbarX = new _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.Scrollbar();
    }

    if (this.props.scrollbarY) {
      chart.scrollbarY = new _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.Scrollbar();
    }
    /* ~~~~\  button  /~~~~ */


    if (this.props.button) {
      var Button = chart.chartContainer.createChild(_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.Button);
      _utils__WEBPACK_IMPORTED_MODULE_13__.makeButton(Button, this.props.button);
      Button.events.on("hit", function () {
        for (var r = 0; r < data.length; ++r) {
          for (var v = 0; v < values.length; ++v) {
            chart.data[r][values[v][0]] = data2[r][values[v][0]];
            chart.data[r][values[v][1]] = data2[r][values[v][1]];
          }
        }

        chart.invalidateRawData();

        if (window.Shiny) {
          Shiny.setInputValue(shinyId + ":rAmCharts4.dataframe", chart.data);
          Shiny.setInputValue(shinyId + "_change", null);
        }
      });
    }
    /* ~~~~\  category axis  /~~~~ */


    var categoryAxis = _utils__WEBPACK_IMPORTED_MODULE_13__.createCategoryAxis("X", _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__, chart, category, xAxis, 80, theme);
    categoryAxis.events.on("startchanged", _utils__WEBPACK_IMPORTED_MODULE_13__.onAxisZoomed);
    categoryAxis.events.on("endchanged", _utils__WEBPACK_IMPORTED_MODULE_13__.onAxisZoomed);
    /*		let categoryAxis = chart.xAxes.push(new am4charts.CategoryAxis());
        categoryAxis.paddingBottom = xAxis.adjust || 0;
        categoryAxis.renderer.grid.template.location = 0;
        categoryAxis.renderer.cellStartLocation = 1 - 80/100;
        categoryAxis.renderer.cellEndLocation = 80/100;
        if(xAxis && xAxis.title && xAxis.title.text !== "") {
          categoryAxis.title.text = xAxis.title.text || category;
          categoryAxis.title.fontWeight = xAxis.title.fontWeight || "bold";
          categoryAxis.title.fontSize = xAxis.title.fontSize || 20;
          categoryAxis.title.fontFamily = xAxis.title.fontFamily;
          categoryAxis.title.fill =
            xAxis.title.color || (theme === "dark" ? "#ffffff" : "#000000");
        }
        let xAxisLabels = categoryAxis.renderer.labels.template;
        xAxisLabels.fontSize = xAxis.labels.fontSize || 17;
        xAxisLabels.rotation = xAxis.labels.rotation || 0;
        if(xAxisLabels.rotation !== 0) {
          xAxisLabels.horizontalCenter = "right";
        }
        xAxisLabels.fill =
          xAxis.labels.color || (theme === "dark" ? "#ffffff" : "#000000");
        categoryAxis.dataFields.category = category;
        categoryAxis.renderer.grid.template.disabled = true;
        categoryAxis.renderer.minGridDistance = 50;
        categoryAxis.cursorTooltipEnabled = false; 
    */

    /* ~~~~\  value axis  /~~~~ */

    var valueAxis = _utils__WEBPACK_IMPORTED_MODULE_13__.createAxis("Y", _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__, _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__, chart, yAxis, minValue, maxValue, false, theme, cursor);
    /* ~~~~\  horizontal line  /~~~~ */

    if (hline) {
      var range = valueAxis.axisRanges.create();
      range.value = hline.value;
      range.grid.stroke = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.color(hline.line.color);
      range.grid.strokeWidth = hline.line.width;
      range.grid.strokeOpacity = hline.line.opacity;
      range.grid.strokeDasharray = hline.line.dash;
    }
    /* ~~~~\  cursor  /~~~~ */


    if (cursor) {
      chart.cursor = new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.XYCursor();
      chart.cursor.yAxis = valueAxis;
      chart.cursor.lineX.disabled = true;
    }
    /* ~~~~\  legend  /~~~~ */


    if (chartLegend) {
      chart.legend = new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.Legend();
      var legendPosition = chartLegend.position || "bottom";
      chart.legend.position = legendPosition;

      if (legendPosition === "bottom" || legendPosition === "top") {
        chart.legend.maxHeight = chartLegend.maxHeight;
        chart.legend.scrollable = chartLegend.scrollable;
      } else {
        chart.legend.maxWidth = chartLegend.maxWidth;
      }

      chart.legend.useDefaultMarker = false;
      var markerTemplate = chart.legend.markers.template;
      markerTemplate.width = chartLegend.itemsWidth || 20;
      markerTemplate.height = chartLegend.itemsHeight || 20;
      chart.legend.itemContainers.template.events.on("over", function (ev) {
        var dataItem = ev.target.dataItem;
        dataItem.dataContext.columns.each(function (x) {
          x.column.isHover = true;
        });
        var columns = dataItem.dataContext.columns,
            ncols = columns.length;

        var _loop = function _loop(i) {
          var bullets = columns.getIndex(i).column.dataItem.bullets;
          bullets.each(function (bid) {
            bullets.getKey(bid).children.getIndex(0).isHover = true;
          });
        };

        for (var i = 0; i < ncols; ++i) {
          _loop(i);
        }
      });
      chart.legend.itemContainers.template.events.on("out", function (ev) {
        var dataItem = ev.target.dataItem;
        dataItem.dataContext.columns.each(function (x) {
          x.column.isHover = false;
        });
        var columns = dataItem.dataContext.columns,
            ncols = columns.length;

        var _loop2 = function _loop2(i) {
          var bullets = columns.getIndex(i).column.dataItem.bullets;
          bullets.each(function (bid) {
            bullets.getKey(bid).children.getIndex(0).isHover = false;
          });
        };

        for (var i = 0; i < ncols; ++i) {
          _loop2(i);
        }
      });
    }
    /* ~~~~\  function handling the drag event  /~~~~ */


    function handleDrag(event) {
      var dataItem = event.target.dataItem; // convert coordinate to value

      var value = valueAxis.yToValue(event.target.pixelY); // set new value

      dataItem.openValueY = value; // make column hover
      //dataItem.column.isHover = true;
      // hide tooltip not to interrupt
      //dataItem.column.hideTooltip(0);

      event.target.hideTooltip(0); // make bullet hovered (as it might hide if mouse moves away)

      event.target.isHover = true;
    }
    /* ~~~~\  function handling the dragstop event  /~~~~ */


    function handleDragStop(event, value, field) {
      //handleDrag(event);
      var dataItem = event.target.dataItem;
      event.target.isHover = false;
      var newValue = dataItem.values[field].value;
      dataCopy[dataItem.index][value] = newValue;

      if (window.Shiny) {
        Shiny.setInputValue(shinyId + ":rAmCharts4.dataframe", dataCopy);
        Shiny.setInputValue(shinyId + "_change", {
          index: dataItem.index + 1,
          category: dataItem.categoryX,
          variable: value,
          value: newValue
        });
      }
    }
    /* 
      trigger the "positionchanged" event on bullets when a resizing occurs, 
      otherwise bullets are unresponsive  
    */


    chart.events.on("sizechanged", event => {
      event.target.series.each(function (s) {
        s.bulletsContainer.children.each(function (b) {
          b.dispatchImmediately("positionchanged");
        });
      });
    });
    values.forEach(function (y1y2, index) {
      var y1 = y1y2[0],
          y2 = y1y2[1];
      var series1 = chart.series.push(new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.ColumnSeries()),
          series2 = chart.series.push(new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.LineSeries()); // je n'utilise plus series2

      series2.hiddenInLegend = true;
      series2.strokeWidth = 0;
      series2.strokeOpacity = 0;
      series1.dataFields.categoryX = category;
      series2.dataFields.categoryX = category;
      series1.dataFields.valueY = y1;
      series2.dataFields.valueY = y2;
      series1.name = seriesNames[index];
      series2.name = valueNames[y2];
      series1.dataFields.openValueY = y2;
      series2.dataFields.openValueY = y1; //      series1.fill = areas[index].color || chart.colors.getIndex(index);
      //      series1.fillOpacity = areas[index].opacity;
      //series2.fillOpacity = series1.fillOpacity;
      //series2.zIndex = -1;

      series1.sequencedInterpolation = true;
      series2.sequencedInterpolation = true;
      series1.defaultState.interpolationDuration = 1000;
      series2.defaultState.interpolationDuration = 1500;
      /* ~~~~\  bullet  /~~~~ */

      var bullet1 = series1.bullets.push(new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.Bullet()),
          shape1 = _utils__WEBPACK_IMPORTED_MODULE_13__.Shape(_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__, chart, index, bullet1, bulletsStyle[y1]);
      bullet1.locationY = 1;
      var bullet2 = series1.bullets.push(new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.Bullet()),
          shape2 = _utils__WEBPACK_IMPORTED_MODULE_13__.Shape(_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__, chart, index, bullet2, bulletsStyle[y2]);

      if (tooltips) {
        /* ~~~~\  tooltip  /~~~~ */
        bullet1.tooltipText = tooltips[y1].text;
        var tooltip1 = _utils__WEBPACK_IMPORTED_MODULE_13__.Tooltip(_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__, chart, index, tooltips[y1]);
        bullet2.tooltipText = tooltips[y2].text;
        var tooltip2 = _utils__WEBPACK_IMPORTED_MODULE_13__.Tooltip(_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__, chart, index, tooltips[y2]);
        tooltip1.pointerOrientation = "horizontal";
        tooltip1.dy = 0;
        tooltip2.pointerOrientation = "horizontal";
        tooltip2.dy = 0;
        bullet1.tooltip = tooltip1;
        bullet2.tooltip = tooltip2;
      } // create bullet hover state


      var hoverState1 = shape1.states.create("hover");
      hoverState1.properties.strokeWidth = shape1.strokeWidth + 2;
      hoverState1.properties.opacity = 1; // visible when hovered

      var hoverState2 = shape2.states.create("hover");
      hoverState2.properties.strokeWidth = shape2.strokeWidth + 2;
      hoverState2.properties.opacity = 1; // visible when hovered

      if (draggable[y1]) {
        bullet1.draggable = true; // resize cursor when over

        bullet1.cursorOverStyle = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.MouseCursorStyle.verticalResize; // while dragging

        bullet1.events.on("drag", event => {
          var dataItem = event.target.dataItem; // convert coordinate to value

          var value = valueAxis.yToValue(event.target.pixelY); // set new value

          dataItem.openValueY = value; // hide tooltip not to interrupt

          event.target.hideTooltip(0); // make bullet hovered (as it might hide if mouse moves away)

          event.target.isHover = true;
        }); // on dragging stop

        bullet1.events.on("dragstop", event => {
          handleDragStop(event, y2, "openValueY");
        }); // start dragging bullet even if we hit on column not just a bullet, this will make it more friendly for touch devices

        bullet1.events.on("down", event => {
          var dataItem = event.target.dataItem;
          var itemBullet = dataItem.bullets.getKey(bullet1.uid);
          itemBullet.dragStart(event.pointer);
        }); // when line position changes, adjust minX/maxX of bullets so that we could only dragg vertically

        bullet1.events.on("positionchanged", event => {
          var dataItem = event.target.dataItem;

          if (dataItem.bullets) {
            var itemBullet = dataItem.bullets.getKey(bullet1.uid);
            var column = dataItem.column;
            itemBullet.minX = column.pixelX + column.pixelWidth / 2;
            itemBullet.maxX = itemBullet.minX;
            itemBullet.minY = 0;
            itemBullet.maxY = chart.seriesContainer.pixelHeight;
          }
        });
      }

      if (draggable[y2]) {
        bullet2.draggable = true; // resize cursor when over

        bullet2.cursorOverStyle = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.MouseCursorStyle.verticalResize; // while dragging

        bullet2.events.on("drag", event => {
          var dataItem = event.target.dataItem; // convert coordinate to value

          var value = valueAxis.yToValue(event.target.pixelY); // set new value

          dataItem.valueY = value; // hide tooltip not to interrupt

          event.target.hideTooltip(0); // make bullet hovered (as it might hide if mouse moves away)

          event.target.isHover = true;
        }); // on dragging stop

        bullet2.events.on("dragstop", event => {
          handleDragStop(event, y1, "valueY");
        }); // start dragging bullet even if we hit on column not just a bullet, this will make it more friendly for touch devices

        bullet2.events.on("down", event => {
          var dataItem = event.target.dataItem;
          var itemBullet = dataItem.bullets.getKey(bullet2.uid);
          itemBullet.dragStart(event.pointer);
        }); // when line position changes, adjust minX/maxX of bullets so that we could only dragg vertically

        bullet2.events.on("positionchanged", event => {
          var dataItem = event.target.dataItem;

          if (dataItem.bullets) {
            var itemBullet = dataItem.bullets.getKey(bullet2.uid);
            var column = dataItem.column;
            itemBullet.minX = column.pixelX + column.pixelWidth / 2;
            itemBullet.maxX = itemBullet.minX;
            itemBullet.minY = 0;
            itemBullet.maxY = chart.seriesContainer.pixelHeight;
          }
        });
      }
      /* ~~~~\  column template  /~~~~ */


      var columnStyle = segmentsStyles[seriesNames[index]];
      var columnTemplate = series1.columns.template;
      columnTemplate.width = columnStyle.width || 1;
      columnTemplate.fill = columnStyle.color || chart.colors.getIndex(index);

      if (columnStyle.colorAdapter) {
        columnTemplate.adapter.add("fill", columnStyle.colorAdapter);
        columnTemplate.adapter.add("stroke", columnStyle.colorAdapter);
      }

      columnTemplate.stroke = columnTemplate.fill;
      columnTemplate.strokeOpacity = 1;
      columnTemplate.column.fillOpacity = 1;
      columnTemplate.column.strokeWidth = 1; // columns hover state

      var columnHoverState = columnTemplate.column.states.create("hover"); // you can change any property on hover state and it will be animated

      columnHoverState.properties.strokeWidth = 3; // trigger bullet hover state

      columnTemplate.events.on("over", event => {
        var dataItem = event.target.dataItem,
            itemBullet1 = dataItem.bullets.getKey(bullet1.uid),
            itemBullet2 = dataItem.bullets.getKey(bullet2.uid);
        itemBullet1.children.getIndex(0).isHover = true;
        itemBullet2.children.getIndex(0).isHover = true;
      });
      columnTemplate.events.on("out", event => {
        var dataItem = event.target.dataItem,
            itemBullet1 = dataItem.bullets.getKey(bullet1.uid),
            itemBullet2 = dataItem.bullets.getKey(bullet2.uid);
        itemBullet1.children.getIndex(0).isHover = false;
        itemBullet2.children.getIndex(0).isHover = false;
      });
    });
    return chart;
  }

  componentDidMount() {
    this.chart = this.DumbbellChart();
  }

  componentDidUpdate() {
    if (this.chart) {
      this.chart.dispose();
    }

    this.chart = this.DumbbellChart();
  }

  componentWillUnmount() {
    if (this.chart) {
      this.chart.dispose();
    }
  }

  render() {
    return /*#__PURE__*/React.createElement("div", {
      key: this.props.chartId,
      id: this.props.chartId,
      style: this.style()
    });
  }

}
/* COMPONENT: HORIZONTAL DUMBBELL CHART */


class AmHorizontalDumbbellChart extends React.PureComponent {
  constructor(props) {
    super(props);
    this.style = this.style.bind(this);
    this.HorizontalDumbbellChart = this.HorizontalDumbbellChart.bind(this);
  }

  style() {
    if (window.Shiny && !window.FlexDashboard) {
      return {
        width: "100%",
        height: "100%"
      };
    } else {
      return {
        width: this.props.width,
        height: this.props.height
      };
    }
  }

  HorizontalDumbbellChart() {
    var theme = this.props.theme,
        animated = this.props.animated,
        chartLegend = this.props.legend,
        category = this.props.category,
        values = this.props.values,
        minValue = this.props.minValue,
        maxValue = this.props.maxValue,
        vline = this.props.vline,
        data = HTMLWidgets.dataframeToD3(this.props.data),
        dataCopy = HTMLWidgets.dataframeToD3(_utils__WEBPACK_IMPORTED_MODULE_13__.subset(this.props.data, [category].concat(values.flat()))),
        data2 = this.props.data2 ? HTMLWidgets.dataframeToD3(_utils__WEBPACK_IMPORTED_MODULE_13__.subset(this.props.data2, values.flat())) : null,
        valueNames = this.props.valueNames,
        seriesNames = this.props.seriesNames,
        xAxis = this.props.xAxis,
        yAxis = this.props.yAxis,
        draggable = this.props.draggable,
        tooltips = this.props.tooltip,
        valueFormatter = this.props.valueFormatter,
        segmentsStyles = this.props.segmentsStyle,
        bulletsStyle = this.props.bullets,
        cursor = this.props.cursor,
        chartId = this.props.chartId,
        shinyId = this.props.shinyId;

    if (window.Shiny) {
      if (shinyId === undefined) {
        shinyId = $(document.getElementById(chartId)).parent().attr("id");
      }

      Shiny.setInputValue(shinyId + ":rAmCharts4.dataframe", dataCopy);
    }

    if (animated) {
      _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_animated__WEBPACK_IMPORTED_MODULE_3__["default"]);
    }

    switch (theme) {
      case "dark":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_dark__WEBPACK_IMPORTED_MODULE_4__["default"]);
        break;

      case "dataviz":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_dataviz__WEBPACK_IMPORTED_MODULE_5__["default"]);
        break;

      case "frozen":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_frozen__WEBPACK_IMPORTED_MODULE_6__["default"]);
        break;

      case "kelly":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_kelly__WEBPACK_IMPORTED_MODULE_7__["default"]);
        break;

      case "material":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_material__WEBPACK_IMPORTED_MODULE_8__["default"]);
        break;

      case "microchart":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_microchart__WEBPACK_IMPORTED_MODULE_9__["default"]);
        break;

      case "moonrisekingdom":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_moonrisekingdom__WEBPACK_IMPORTED_MODULE_10__["default"]);
        break;

      case "patterns":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_patterns__WEBPACK_IMPORTED_MODULE_11__["default"]);
        break;

      case "spiritedaway":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_spiritedaway__WEBPACK_IMPORTED_MODULE_12__["default"]);
        break;
    }

    var chart;
    chart = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.create(this.props.chartId, _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.XYChart);
    chart.data = data;
    chart.hiddenState.properties.opacity = 0; // this makes initial fade in effect

    chart.padding(50, 40, 0, 10);
    chart.maskBullets = false; // allow bullets to go out of plot area

    var chartBackgroundColor = this.props.backgroundColor || chart.background.fill;
    chart.background.fill = chartBackgroundColor;
    /* ~~~~\  Enable export  /~~~~ */

    if (this.props.export) {
      chart.exporting.menu = new _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.ExportMenu();
      chart.exporting.menu.items = _utils__WEBPACK_IMPORTED_MODULE_13__.exportMenuItems;
    }
    /* ~~~~\  title  /~~~~ */


    var chartTitle = this.props.chartTitle;

    if (chartTitle) {
      var title = chart.titles.create();
      title.text = chartTitle.text.text;
      title.fill = chartTitle.text.color || (theme === "dark" ? "#ffffff" : "#000000");
      title.fontSize = chartTitle.text.fontSize || 22;
      title.fontWeight = chartTitle.text.fontWeight || "bold";
      title.fontFamily = chartTitle.text.fontFamily;
      title.align = chartTitle.align || "left";
      title.dy = -30;
    }
    /* ~~~~\  caption  /~~~~ */


    var chartCaption = this.props.caption;

    if (chartCaption) {
      var caption = chart.chartContainer.createChild(_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.Label);
      caption.text = chartCaption.text.text;
      caption.fill = chartCaption.text.color || (theme === "dark" ? "#ffffff" : "#000000");
      caption.fontSize = chartCaption.text.fontSize;
      caption.fontWeight = chartCaption.text.fontWeight;
      caption.fontFamily = chartCaption.text.fontFamily;
      caption.align = chartCaption.align || "right";
    }
    /* ~~~~\  image  /~~~~ */


    if (this.props.image) {
      _utils__WEBPACK_IMPORTED_MODULE_13__.Image(_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__, chart, this.props.image);
    }
    /* ~~~~\  scrollbars  /~~~~ */


    if (this.props.scrollbarX) {
      chart.scrollbarX = new _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.Scrollbar();
    }

    if (this.props.scrollbarY) {
      chart.scrollbarY = new _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.Scrollbar();
    }
    /* ~~~~\  button  /~~~~ */


    if (this.props.button) {
      var Button = chart.chartContainer.createChild(_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.Button);
      _utils__WEBPACK_IMPORTED_MODULE_13__.makeButton(Button, this.props.button);
      Button.events.on("hit", function () {
        for (var r = 0; r < data.length; ++r) {
          for (var v = 0; v < values.length; ++v) {
            chart.data[r][values[v][0]] = data2[r][values[v][0]];
            chart.data[r][values[v][1]] = data2[r][values[v][1]];
          }
        }

        chart.invalidateRawData();

        if (window.Shiny) {
          Shiny.setInputValue(shinyId + ":rAmCharts4.dataframe", chart.data);
          Shiny.setInputValue(shinyId + "_change", null);
        }
      });
    }
    /* ~~~~\  category axis  /~~~~ */


    var categoryAxis = _utils__WEBPACK_IMPORTED_MODULE_13__.createCategoryAxis("Y", _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__, chart, category, yAxis, 80, theme);
    categoryAxis.events.on("startchanged", _utils__WEBPACK_IMPORTED_MODULE_13__.onAxisZoomed);
    categoryAxis.events.on("endchanged", _utils__WEBPACK_IMPORTED_MODULE_13__.onAxisZoomed);
    /* ~~~~\  value axis  /~~~~ */

    var valueAxis = _utils__WEBPACK_IMPORTED_MODULE_13__.createAxis("X", _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__, _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__, chart, xAxis, minValue, maxValue, false, theme, cursor);
    /* ~~~~\  vertical line  /~~~~ */

    if (vline) {
      var range = valueAxis.axisRanges.create();
      range.value = vline.value;
      range.grid.stroke = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.color(vline.line.color);
      range.grid.strokeWidth = vline.line.width;
      range.grid.strokeOpacity = vline.line.opacity;
      range.grid.strokeDasharray = vline.line.dash;
    }
    /* ~~~~\  cursor  /~~~~ */


    if (cursor) {
      chart.cursor = new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.XYCursor();
      chart.cursor.xAxis = valueAxis;
      chart.cursor.lineY.disabled = true;
    }
    /* ~~~~\  legend  /~~~~ */


    if (chartLegend) {
      chart.legend = new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.Legend();
      var legendPosition = chartLegend.position || "bottom";
      chart.legend.position = legendPosition;

      if (legendPosition === "bottom" || legendPosition === "top") {
        chart.legend.maxHeight = chartLegend.maxHeight;
        chart.legend.scrollable = chartLegend.scrollable;
      } else {
        chart.legend.maxWidth = chartLegend.maxWidth;
      }

      chart.legend.useDefaultMarker = false;
      var markerTemplate = chart.legend.markers.template;
      markerTemplate.width = chartLegend.itemsWidth || 20;
      markerTemplate.height = chartLegend.itemsHeight || 20;
      chart.legend.itemContainers.template.events.on("over", function (ev) {
        var dataItem = ev.target.dataItem;
        dataItem.dataContext.columns.each(function (x) {
          x.column.isHover = true;
        });
        var columns = dataItem.dataContext.columns,
            ncols = columns.length;

        var _loop3 = function _loop3(i) {
          var bullets = columns.getIndex(i).column.dataItem.bullets;
          bullets.each(function (bid) {
            bullets.getKey(bid).children.getIndex(0).isHover = true;
          });
        };

        for (var i = 0; i < ncols; ++i) {
          _loop3(i);
        }
      });
      chart.legend.itemContainers.template.events.on("out", function (ev) {
        var dataItem = ev.target.dataItem;
        dataItem.dataContext.columns.each(function (x) {
          x.column.isHover = false;
        });
        var columns = dataItem.dataContext.columns,
            ncols = columns.length;

        var _loop4 = function _loop4(i) {
          var bullets = columns.getIndex(i).column.dataItem.bullets;
          bullets.each(function (bid) {
            bullets.getKey(bid).children.getIndex(0).isHover = false;
          });
        };

        for (var i = 0; i < ncols; ++i) {
          _loop4(i);
        }
      });
    }
    /* ~~~~\  function handling the dragstop event  /~~~~ */


    function handleDragStop(event, value, field) {
      var dataItem = event.target.dataItem;
      event.target.isHover = false;
      var newValue = dataItem.values[field].value;
      dataCopy[dataItem.index][value] = newValue;

      if (window.Shiny) {
        Shiny.setInputValue(shinyId + ":rAmCharts4.dataframe", dataCopy);
        Shiny.setInputValue(shinyId + "_change", {
          index: dataItem.index + 1,
          category: dataItem.categoryY,
          variable: value,
          value: newValue
        });
      }
    }
    /* 
      trigger the "positionchanged" event on bullets when a resizing occurs, 
      otherwise bullets are unresponsive  
    */


    chart.events.on("sizechanged", event => {
      event.target.series.each(function (s) {
        s.bulletsContainer.children.each(function (b) {
          b.dispatchImmediately("positionchanged");
        });
      });
    });
    values.forEach(function (y1y2, index) {
      var y1 = y1y2[0],
          y2 = y1y2[1];
      var series = chart.series.push(new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.ColumnSeries());
      series.dataFields.categoryY = category;
      series.dataFields.valueX = y1;
      series.name = seriesNames[index];
      series.dataFields.openValueX = y2;
      series.sequencedInterpolation = true;
      series.defaultState.interpolationDuration = 1000;
      /* ~~~~\  bullet  /~~~~ */

      var bullet1 = series.bullets.push(new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.Bullet()),
          shape1 = _utils__WEBPACK_IMPORTED_MODULE_13__.Shape(_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__, chart, index, bullet1, bulletsStyle[y1]);
      bullet1.locationX = 1;
      var bullet2 = series.bullets.push(new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.Bullet()),
          shape2 = _utils__WEBPACK_IMPORTED_MODULE_13__.Shape(_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__, chart, index, bullet2, bulletsStyle[y2]);

      if (tooltips) {
        /* ~~~~\  tooltip  /~~~~ */
        bullet1.tooltipText = tooltips[y1].text;
        var tooltip1 = _utils__WEBPACK_IMPORTED_MODULE_13__.Tooltip(_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__, chart, index, tooltips[y1]);
        bullet2.tooltipText = tooltips[y2].text;
        var tooltip2 = _utils__WEBPACK_IMPORTED_MODULE_13__.Tooltip(_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__, chart, index, tooltips[y2]);
        tooltip1.pointerOrientation = "vertical";
        tooltip1.dx = 0;
        tooltip2.pointerOrientation = "vertical";
        tooltip2.dx = 0;
        bullet1.tooltip = tooltip1;
        bullet2.tooltip = tooltip2;
      } // create bullet hover state


      var hoverState1 = shape1.states.create("hover");
      hoverState1.properties.strokeWidth = shape1.strokeWidth + 2;
      hoverState1.properties.opacity = 1; // visible when hovered

      var hoverState2 = shape2.states.create("hover");
      hoverState2.properties.strokeWidth = shape2.strokeWidth + 2;
      hoverState2.properties.opacity = 1; // visible when hovered

      if (draggable[y1]) {
        bullet1.draggable = true; // resize cursor when over

        bullet1.cursorOverStyle = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.MouseCursorStyle.horizontalResize; // while dragging

        bullet1.events.on("drag", event => {
          var dataItem = event.target.dataItem; // convert coordinate to value

          var value = valueAxis.xToValue(event.target.pixelX); // set new value

          dataItem.openValueX = value; // hide tooltip not to interrupt

          event.target.hideTooltip(0); // make bullet hovered (as it might hide if mouse moves away)

          event.target.isHover = true;
        }); // on dragging stop

        bullet1.events.on("dragstop", event => {
          handleDragStop(event, y2, "openValueX");
        }); // start dragging bullet even if we hit on column not just a bullet, this will make it more friendly for touch devices

        bullet1.events.on("down", event => {
          var dataItem = event.target.dataItem;
          var itemBullet = dataItem.bullets.getKey(bullet1.uid);
          itemBullet.dragStart(event.pointer);
        }); // when line position changes, adjust minX/maxX of bullets so that we could only dragg vertically

        bullet1.events.on("positionchanged", event => {
          var dataItem = event.target.dataItem;

          if (dataItem.bullets) {
            var itemBullet = dataItem.bullets.getKey(bullet1.uid);
            var column = dataItem.column;
            itemBullet.minY = column.pixelY + column.pixelHeight / 2;
            itemBullet.maxY = itemBullet.minY;
            itemBullet.minX = 0;
            itemBullet.maxX = chart.seriesContainer.pixelWidth;
          }
        });
      }

      if (draggable[y2]) {
        bullet2.draggable = true; // resize cursor when over

        bullet2.cursorOverStyle = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.MouseCursorStyle.horizontalResize; // while dragging

        bullet2.events.on("drag", event => {
          var dataItem = event.target.dataItem; // convert coordinate to value

          var value = valueAxis.xToValue(event.target.pixelX); // set new value

          dataItem.valueX = value; // hide tooltip not to interrupt

          event.target.hideTooltip(0); // make bullet hovered (as it might hide if mouse moves away)

          event.target.isHover = true;
        }); // on dragging stop

        bullet2.events.on("dragstop", event => {
          handleDragStop(event, y1, "valueX");
        }); // start dragging bullet even if we hit on column not just a bullet, this will make it more friendly for touch devices

        bullet2.events.on("down", event => {
          var dataItem = event.target.dataItem;
          var itemBullet = dataItem.bullets.getKey(bullet2.uid);
          itemBullet.dragStart(event.pointer);
        }); // when line position changes, adjust minX/maxX of bullets so that we could only dragg vertically

        bullet2.events.on("positionchanged", event => {
          var dataItem = event.target.dataItem;

          if (dataItem.bullets) {
            var itemBullet = dataItem.bullets.getKey(bullet2.uid);
            var column = dataItem.column;
            itemBullet.minY = column.pixelY + column.pixelHeight / 2;
            itemBullet.maxY = itemBullet.minY;
            itemBullet.minX = 0;
            itemBullet.maxX = chart.seriesContainer.pixelWidth;
          }
        });
      }
      /* ~~~~\  column template  /~~~~ */


      var columnStyle = segmentsStyles[seriesNames[index]];
      var columnTemplate = series.columns.template;
      columnTemplate.height = columnStyle.width || 1;
      columnTemplate.fill = columnStyle.color || chart.colors.getIndex(index);

      if (columnStyle.colorAdapter) {
        columnTemplate.adapter.add("fill", columnStyle.colorAdapter);
        columnTemplate.adapter.add("stroke", columnStyle.colorAdapter);
      }

      columnTemplate.stroke = columnTemplate.fill;
      columnTemplate.strokeOpacity = 1;
      columnTemplate.column.fillOpacity = 1;
      columnTemplate.column.strokeWidth = 1; // columns hover state

      var columnHoverState = columnTemplate.column.states.create("hover"); // you can change any property on hover state and it will be animated

      columnHoverState.properties.strokeWidth = 3; // trigger bullet hover state

      columnTemplate.events.on("over", event => {
        var dataItem = event.target.dataItem,
            itemBullet1 = dataItem.bullets.getKey(bullet1.uid),
            itemBullet2 = dataItem.bullets.getKey(bullet2.uid);
        itemBullet1.children.getIndex(0).isHover = true;
        itemBullet2.children.getIndex(0).isHover = true;
      });
      columnTemplate.events.on("out", event => {
        var dataItem = event.target.dataItem,
            itemBullet1 = dataItem.bullets.getKey(bullet1.uid),
            itemBullet2 = dataItem.bullets.getKey(bullet2.uid);
        itemBullet1.children.getIndex(0).isHover = false;
        itemBullet2.children.getIndex(0).isHover = false;
      });
    });
    return chart;
  }

  componentDidMount() {
    this.chart = this.HorizontalDumbbellChart();
  }

  componentDidUpdate() {
    if (this.chart) {
      this.chart.dispose();
    }

    this.chart = this.HorizontalDumbbellChart();
  }

  componentWillUnmount() {
    if (this.chart) {
      this.chart.dispose();
    }
  }

  render() {
    return /*#__PURE__*/React.createElement("div", {
      key: this.props.chartId,
      id: this.props.chartId,
      style: this.style()
    });
  }

}
/* COMPONENT: GAUGE CHART */


function lookUpGrade(lookupScore, grades) {
  for (var i = 0; i < grades.length; i++) {
    var x = grades[i];

    if (x.lowScore < lookupScore && x.highScore >= lookupScore) {
      return x;
    }
  }

  return null;
}

class AmGaugeChart extends React.PureComponent {
  constructor(props) {
    super(props);
    this.style = this.style.bind(this);
    this.GaugeChart = this.GaugeChart.bind(this);
  }

  style() {
    if (window.Shiny && !window.FlexDashboard) {
      return {
        width: "100%",
        height: "100%"
      };
    } else {
      return {
        width: this.props.width,
        height: this.props.height
      };
    }
  }

  GaugeChart() {
    var theme = this.props.theme,
        animated = this.props.animated,
        score = this.props.score,
        minScore = this.props.minScore,
        maxScore = this.props.maxScore,
        scorePrecision = this.props.scorePrecision,
        gradingData = this.props.gradingData,
        innerRadius = this.props.innerRadius,
        labelsRadius = this.props.labelsRadius,
        axisLabelsRadius = this.props.axisLabelsRadius,
        chartFontSize = this.props.chartFontSize,
        labelsFont = this.props.labelsFont,
        axisLabelsFont = this.props.axisLabelsFont,
        scoreFont = this.props.scoreFont,
        scoreLabelFont = this.props.scoreLabelFont,
        hand = this.props.hand,
        gridLines = this.props.gridLines,
        chartId = this.props.chartId,
        shinyId = this.props.shinyId;

    if (window.Shiny) {
      if (shinyId === undefined) {
        shinyId = $(document.getElementById(chartId)).parent().attr("id");
      }
    }

    if (animated) {
      _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_animated__WEBPACK_IMPORTED_MODULE_3__["default"]);
    }

    switch (theme) {
      case "dark":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_dark__WEBPACK_IMPORTED_MODULE_4__["default"]);
        break;

      case "dataviz":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_dataviz__WEBPACK_IMPORTED_MODULE_5__["default"]);
        break;

      case "frozen":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_frozen__WEBPACK_IMPORTED_MODULE_6__["default"]);
        break;

      case "kelly":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_kelly__WEBPACK_IMPORTED_MODULE_7__["default"]);
        break;

      case "material":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_material__WEBPACK_IMPORTED_MODULE_8__["default"]);
        break;

      case "microchart":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_microchart__WEBPACK_IMPORTED_MODULE_9__["default"]);
        break;

      case "moonrisekingdom":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_moonrisekingdom__WEBPACK_IMPORTED_MODULE_10__["default"]);
        break;

      case "patterns":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_patterns__WEBPACK_IMPORTED_MODULE_11__["default"]);
        break;

      case "spiritedaway":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_spiritedaway__WEBPACK_IMPORTED_MODULE_12__["default"]);
        break;
    }

    var chart = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.create(this.props.chartId, _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.GaugeChart);
    var nparts = gradingData.label.length;

    if (gradingData.color) {
      for (var i = 0; i < nparts; i++) {
        gradingData.color[i] = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.color(gradingData.color[i]);
      }
    } else {
      gradingData.color = new Array(nparts);

      for (var _i5 = 0; _i5 < nparts; _i5++) {
        gradingData.color[_i5] = chart.colors.getIndex(_i5);
      }
    }

    var data = {
      score: score,
      gradingData: HTMLWidgets.dataframeToD3(gradingData)
    };
    chart.hiddenState.properties.opacity = 0; // this makes initial fade in effect

    chart.padding(50, 40, 0, 10);
    var chartBackgroundColor = this.props.backgroundColor || chart.background.fill;
    chart.background.fill = chartBackgroundColor;
    chart.fontSize = chartFontSize;
    chart.innerRadius = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.percent(innerRadius);
    chart.resizable = true;
    /* ~~~~\  Enable export  /~~~~ */

    if (this.props.export) {
      chart.exporting.menu = new _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.ExportMenu();
      chart.exporting.menu.items = _utils__WEBPACK_IMPORTED_MODULE_13__.exportMenuItems;
    }
    /* ~~~~\  title  /~~~~ */


    var chartTitle = this.props.chartTitle;

    if (chartTitle) {
      var title = chart.titles.create();
      title.text = chartTitle.text.text;
      title.fill = chartTitle.text.color || (theme === "dark" ? "#ffffff" : "#000000");
      title.fontSize = chartTitle.text.fontSize || 22;
      title.fontWeight = chartTitle.text.fontWeight || "bold";
      title.fontFamily = chartTitle.text.fontFamily;
      title.align = chartTitle.align || "left";
      title.dy = -30;
    }
    /* ~~~~\  caption  /~~~~ */


    var chartCaption = this.props.caption;

    if (chartCaption) {
      var caption = chart.chartContainer.createChild(_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.Label);
      caption.text = chartCaption.text.text;
      caption.fill = chartCaption.text.color || (theme === "dark" ? "#ffffff" : "#000000");
      caption.fontSize = chartCaption.text.fontSize;
      caption.fontWeight = chartCaption.text.fontWeight;
      caption.fontFamily = chartCaption.text.fontFamily;
      caption.align = chartCaption.align || "right";
    }
    /* ~~~~\  image  /~~~~ */


    if (this.props.image) {
      _utils__WEBPACK_IMPORTED_MODULE_13__.Image(_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__, chart, this.props.image);
    }
    /* ~~~~\  normal axis  /~~~~ */


    var axis = chart.xAxes.push(new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.ValueAxis());
    axis.min = minScore;
    axis.max = maxScore;
    axis.strictMinMax = true;
    axis.renderer.radius = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.percent(innerRadius);
    axis.renderer.inside = true;
    axis.renderer.line.strokeOpacity = 0.1;
    axis.renderer.ticks.template.disabled = false;
    axis.renderer.ticks.template.strokeOpacity = 1;
    axis.renderer.ticks.template.strokeWidth = 0.5;
    axis.renderer.ticks.template.length = 5;
    axis.renderer.grid.template.disabled = true;
    axis.renderer.labels.template.radius = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.percent(axisLabelsRadius);
    axis.renderer.labels.template.fontSize = axisLabelsFont.fontSize;
    /* ~~~~\  axis for ranges  /~~~~ */

    var axis2 = chart.xAxes.push(new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.ValueAxis());
    axis2.min = minScore;
    axis2.max = maxScore;
    axis2.strictMinMax = true;
    axis2.renderer.labels.template.disabled = true; // ???????? strange

    axis2.renderer.ticks.template.disabled = true;

    if (gridLines) {
      axis2.renderer.grid.template.disabled = false;
      axis2.renderer.grid.template.stroke = gridLines.color || (theme === "dark" ? "#ffffff" : "#000000");
      axis2.renderer.grid.template.strokeOpacity = gridLines.opacity || 0.6;
      axis2.renderer.grid.template.strokeWidth = gridLines.width || 1;
      axis2.renderer.grid.template.strokeDasharray = gridLines.dash || "3,3";
    } else {
      axis2.renderer.grid.template.disabled = true;
    } //    axis2.renderer.grid.template.opacity = 0.5;


    axis2.renderer.labels.template.bent = true; //    axis2.renderer.labels.template.fill = am4core.color("#000");

    axis2.renderer.labels.template.fontSize = labelsFont.fontSize;
    axis2.renderer.labels.template.fontWeight = labelsFont.fontWeight;
    axis2.renderer.labels.template.fontFamily = labelsFont.fontFamily;
    axis2.renderer.labels.template.fillOpacity = 1;
    /* ~~~~\  ranges  /~~~~ */

    for (var grading of data.gradingData) {
      var range = axis2.axisRanges.create();
      range.axisFill.fill = grading.color;
      range.axisFill.fillOpacity = 0.8;
      range.axisFill.zIndex = -1;
      range.value = grading.lowScore > minScore ? grading.lowScore : minScore;
      range.endValue = grading.highScore < maxScore ? grading.highScore : maxScore;
      range.grid.strokeOpacity = 0;
      range.stroke = grading.color.lighten(-0.1);
      range.label.inside = true;
      range.label.text = grading.label;
      range.label.fill = grading.color.alternative;
      range.label.location = 0.5;
      range.label.radius = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.percent(labelsRadius);
      range.label.paddingBottom = -_utils__WEBPACK_IMPORTED_MODULE_13__.fontSizeToPixels(chartFontSize, labelsFont.fontSize) / 2; //    range.label.fontSize = labelsFont.fontSize;
    }
    /* ~~~~\  matching grade  /~~~~ */


    var matchingGrade = lookUpGrade(data.score, data.gradingData);
    /* ~~~~\  score label  /~~~~ */

    var label = chart.radarContainer.createChild(_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.Label);
    label.isMeasured = false;
    label.fontSize = scoreFont.fontSize;
    label.fontFamily = scoreFont.fontFamily;
    label.fontWeight = scoreFont.fontWeight;
    label.x = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.percent(50);
    label.paddingBottom = 15;
    label.horizontalCenter = "middle";
    label.verticalCenter = "bottom"; //label.dataItem = data;

    label.text = data.score.toFixed(scorePrecision); //label.text = "{score}";

    label.fill = matchingGrade.color;
    /* ~~~~\  score range label  /~~~~ */

    var label2 = chart.radarContainer.createChild(_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.Label);
    label2.isMeasured = false;
    label2.fontSize = scoreLabelFont.fontSize;
    label2.fontWeight = scoreLabelFont.fontWeight;
    label2.fontFamily = scoreLabelFont.fontFamily;
    label2.horizontalCenter = "middle";
    label2.verticalCenter = "bottom";
    label2.text = matchingGrade.label;
    label2.fill = matchingGrade.color;
    /* ~~~~\  hand  /~~~~ */

    var clockHand = chart.hands.push(new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.ClockHand());
    clockHand.axis = axis2;
    clockHand.innerRadius = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.percent(hand.innerRadius);
    clockHand.startWidth = hand.width;
    clockHand.pin.disabled = true;
    clockHand.value = data.score;
    clockHand.fill = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.color(hand.color);
    clockHand.stroke = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.color(hand.strokeColor);
    clockHand.events.on("positionchanged", function () {
      var position = clockHand.currentPosition;
      label.text = axis2.positionToValue(position).toFixed(scorePrecision);
      var value = axis.positionToValue(position);
      var matchingGrade = lookUpGrade(value, data.gradingData);
      label2.text = matchingGrade.label;
      label2.fill = matchingGrade.color;
      label2.stroke = matchingGrade.color;
      label.fill = matchingGrade.color;
    });

    if (window.Shiny) {
      Shiny.addCustomMessageHandler(shinyId + "gauge", function (score) {
        clockHand.showValue(score, 1000, _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.ease.cubicOut);
      });
    }

    return chart;
  }

  componentDidMount() {
    this.chart = this.GaugeChart();
  }

  componentDidUpdate() {
    if (this.chart) {
      this.chart.dispose();
    }

    this.chart = this.GaugeChart();
  }

  componentWillUnmount() {
    if (this.chart) {
      this.chart.dispose();
    }
  }

  render() {
    return /*#__PURE__*/React.createElement("div", {
      key: this.props.chartId,
      id: this.props.chartId,
      style: this.style()
    });
  }

}
/* COMPONENT: VERTICAL STACKED BAR CHART */


class AmStackedBarChart extends React.PureComponent {
  constructor(props) {
    super(props);
    this.style = this.style.bind(this);
    this.StackedBarChart = this.StackedBarChart.bind(this);
  }

  style() {
    if (window.Shiny && !window.FlexDashboard) {
      return {
        width: "100%",
        height: "100%"
      };
    } else {
      return {
        width: this.props.width,
        height: this.props.height
      };
    }
  }

  StackedBarChart() {
    var theme = this.props.theme,
        animated = this.props.animated,
        threeD = this.props.threeD,
        chartLegend = this.props.legend,
        category = this.props.category,
        categories = this.props.data[category],
        stacks = this.props.stacks,
        Series = Object.keys(stacks),
        minValue = this.props.minValue,
        maxValue = this.props.maxValue,
        hline = this.props.hline,
        data = HTMLWidgets.dataframeToD3(this.props.data),
        dataCopy = HTMLWidgets.dataframeToD3(_utils__WEBPACK_IMPORTED_MODULE_13__.subset(this.props.data, [category].concat(Series))),
        data2 = this.props.data2 ? HTMLWidgets.dataframeToD3(_utils__WEBPACK_IMPORTED_MODULE_13__.subset(this.props.data2, Series)) : null,
        SeriesNames = this.props.seriesNames,
        colors = this.props.colors,
        cellWidth = this.props.cellWidth,
        columnWidth = this.props.columnWidth,
        xAxis = this.props.xAxis,
        yAxis = this.props.yAxis,
        tooltips = this.props.tooltip,
        valueFormatter = this.props.valueFormatter,
        cursor = this.props.cursor,
        chartId = this.props.chartId,
        shinyId = this.props.shinyId;

    if (window.Shiny) {
      if (shinyId === undefined) {
        shinyId = $(document.getElementById(chartId)).parent().attr("id");
      }

      Shiny.setInputValue(shinyId + ":rAmCharts4.dataframe", dataCopy);
    }

    if (animated) {
      _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_animated__WEBPACK_IMPORTED_MODULE_3__["default"]);
    }

    switch (theme) {
      case "dark":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_dark__WEBPACK_IMPORTED_MODULE_4__["default"]);
        break;

      case "dataviz":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_dataviz__WEBPACK_IMPORTED_MODULE_5__["default"]);
        break;

      case "frozen":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_frozen__WEBPACK_IMPORTED_MODULE_6__["default"]);
        break;

      case "kelly":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_kelly__WEBPACK_IMPORTED_MODULE_7__["default"]);
        break;

      case "material":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_material__WEBPACK_IMPORTED_MODULE_8__["default"]);
        break;

      case "microchart":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_microchart__WEBPACK_IMPORTED_MODULE_9__["default"]);
        break;

      case "moonrisekingdom":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_moonrisekingdom__WEBPACK_IMPORTED_MODULE_10__["default"]);
        break;

      case "patterns":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_patterns__WEBPACK_IMPORTED_MODULE_11__["default"]);
        break;

      case "spiritedaway":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_spiritedaway__WEBPACK_IMPORTED_MODULE_12__["default"]);
        break;
    }

    var chart;

    if (threeD) {
      chart = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.create(this.props.chartId, _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.XYChart3D);
    } else {
      chart = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.create(this.props.chartId, _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.XYChart);
    }

    chart.data = data;
    chart.hiddenState.properties.opacity = 0; // this makes initial fade in effect

    chart.padding(50, 40, 0, 10);
    var chartBackgroundColor = this.props.backgroundColor || chart.background.fill;
    chart.background.fill = chartBackgroundColor;
    /* ~~~~\  Enable export  /~~~~ */

    if (this.props.export) {
      chart.exporting.menu = new _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.ExportMenu();
      chart.exporting.menu.items = _utils__WEBPACK_IMPORTED_MODULE_13__.exportMenuItems;
    }
    /* ~~~~\  title  /~~~~ */


    var chartTitle = this.props.chartTitle;

    if (chartTitle) {
      var title = chart.titles.create();
      title.text = chartTitle.text.text;
      title.fill = chartTitle.text.color || (theme === "dark" ? "#ffffff" : "#000000");
      title.fontSize = chartTitle.text.fontSize || 22;
      title.fontWeight = chartTitle.text.fontWeight || "bold";
      title.fontFamily = chartTitle.text.fontFamily;
      title.align = chartTitle.align || "left";
      title.dy = -30;
    }
    /* ~~~~\  caption  /~~~~ */


    var chartCaption = this.props.caption;

    if (chartCaption) {
      var caption = chart.chartContainer.createChild(_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.Label);
      caption.text = chartCaption.text.text;
      caption.fill = chartCaption.text.color || (theme === "dark" ? "#ffffff" : "#000000");
      caption.fontSize = chartCaption.text.fontSize;
      caption.fontWeight = chartCaption.text.fontWeight;
      caption.fontFamily = chartCaption.text.fontFamily;
      caption.align = chartCaption.align || "right";
    }
    /* ~~~~\  image  /~~~~ */


    if (this.props.image) {
      _utils__WEBPACK_IMPORTED_MODULE_13__.Image(_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__, chart, this.props.image);
    }
    /* ~~~~\  scrollbars  /~~~~ */


    if (this.props.scrollbarX) {
      chart.scrollbarX = new _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.Scrollbar();
    }

    if (this.props.scrollbarY) {
      chart.scrollbarY = new _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.Scrollbar();
    }
    /* ~~~~\  button  /~~~~ */


    if (this.props.button) {
      var Button = chart.chartContainer.createChild(_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.Button);
      _utils__WEBPACK_IMPORTED_MODULE_13__.makeButton(Button, this.props.button);
      Button.events.on("hit", function () {
        for (var r = 0; r < data.length; ++r) {
          for (var v = 0; v < Series.length; ++v) {
            chart.data[r][Series[v]] = data2[r][Series[v]];
          }
        }

        chart.invalidateRawData();

        if (window.Shiny) {
          Shiny.setInputValue(shinyId + ":rAmCharts4.dataframe", chart.data);
          Shiny.setInputValue(shinyId + "_change", null);
        }
      });
    }
    /* ~~~~\  Shiny message handler for stacked bar chart  /~~~~ */


    if (window.Shiny) {
      Shiny.addCustomMessageHandler(shinyId + "bar", function (newdata) {
        var tail = " is missing in the data you supplied!"; // check that the received data has the 'category' column

        if (!newdata.hasOwnProperty(category)) {
          console.warn("updateAmBarChart: column \"".concat(category, "\"") + tail);
          return null;
        } // check that the received data has the necessary categories


        var ok = true,
            i = 0;

        while (ok && i < categories.length) {
          ok = newdata[category].indexOf(categories[i]) > -1;

          if (!ok) {
            console.warn("updateAmBarChart: category \"".concat(categories[i], "\"") + tail);
          }

          i++;
        }

        if (!ok) {
          return null;
        } // check that the received data has the necessary 'Series' columns


        i = 0;

        while (ok && i < Series.length) {
          ok = newdata.hasOwnProperty(Series[i]);

          if (!ok) {
            console.warn("updateAmBarChart: column \"".concat(Series[i], "\"") + tail);
          }

          i++;
        }

        if (!ok) {
          return null;
        } // update chart data


        var tnewdata = HTMLWidgets.dataframeToD3(newdata);

        for (var r = 0; r < data.length; ++r) {
          for (var v = 0; v < Series.length; ++v) {
            chart.data[r][Series[v]] = tnewdata[r][Series[v]];
          }
        }

        chart.invalidateRawData();
        Shiny.setInputValue(shinyId + ":rAmCharts4.dataframe", tnewdata);
        Shiny.setInputValue(shinyId + "_change", null);
      });
    }
    /* ~~~~\  category axis  /~~~~ */


    var categoryAxis = _utils__WEBPACK_IMPORTED_MODULE_13__.createCategoryAxis("X", _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__, chart, category, xAxis, cellWidth, theme);
    /* ~~~~\  value axis  /~~~~ */

    var valueAxis = _utils__WEBPACK_IMPORTED_MODULE_13__.createAxis("Y", _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__, _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__, chart, yAxis, minValue, maxValue, false, theme, cursor);
    /* ~~~~\  horizontal line  /~~~~ */

    if (hline) {
      var range = valueAxis.axisRanges.create();
      range.value = hline.value;
      range.grid.stroke = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.color(hline.line.color);
      range.grid.strokeWidth = hline.line.width;
      range.grid.strokeOpacity = hline.line.opacity;
      range.grid.strokeDasharray = hline.line.dash;
    }
    /* ~~~~\  cursor  /~~~~ */


    if (cursor) {
      chart.cursor = new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.XYCursor();
      chart.cursor.yAxis = valueAxis;
      chart.cursor.lineX.disabled = true;
    }
    /* ~~~~\  legend  /~~~~ */


    if (chartLegend) {
      chart.legend = new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.Legend();
      var legendPosition = chartLegend.position || "bottom";
      chart.legend.position = legendPosition;

      if (legendPosition === "bottom" || legendPosition === "top") {
        chart.legend.maxHeight = chartLegend.maxHeight;
        chart.legend.scrollable = chartLegend.scrollable;
      } else {
        chart.legend.maxWidth = chartLegend.maxWidth;
      }

      chart.legend.useDefaultMarker = false;
      var markerTemplate = chart.legend.markers.template;
      markerTemplate.width = chartLegend.itemsWidth || 20;
      markerTemplate.height = chartLegend.itemsHeight || 20; // markerTemplate.strokeWidth = 1;
      // markerTemplate.strokeOpacity = 1;

      chart.legend.itemContainers.template.events.on("over", function (ev) {
        ev.target.dataItem.dataContext.columns.each(function (x) {
          x.column.isHover = true;
        });
      });
      chart.legend.itemContainers.template.events.on("out", function (ev) {
        ev.target.dataItem.dataContext.columns.each(function (x) {
          x.column.isHover = false;
        });
      });
    }

    Series.forEach(function (Serie, index) {
      var series;

      if (threeD) {
        series = chart.series.push(new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.ColumnSeries3D());
      } else {
        series = chart.series.push(new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.ColumnSeries());
      }

      series.dataFields.categoryX = category;
      series.dataFields.valueY = Serie;
      series.name = SeriesNames[Serie];
      series.stacked = stacks[Serie];
      series.sequencedInterpolation = true;
      series.defaultState.interpolationDuration = 1500;
      /* ~~~~\  column template  /~~~~ */

      var columnTemplate = series.columns.template;
      columnTemplate.width = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.percent(columnWidth);

      if (colors) {
        columnTemplate.fill = colors[Serie];
      }
      /* ~~~~\  tooltip  /~~~~ */


      if (tooltips) {
        columnTemplate.tooltipText = tooltips[Serie].text;
        var tooltip = _utils__WEBPACK_IMPORTED_MODULE_13__.Tooltip(_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__, chart, index, tooltips[Serie]);
        tooltip.pointerOrientation = "vertical";
        tooltip.dy = 0;
        tooltip.adapter.add("rotation", (x, target) => {
          if (target.dataItem) {
            if (target.dataItem.valueY >= 0) {
              return 0;
            } else {
              return 180;
            }
          } else {
            return x;
          }
        });
        tooltip.label.adapter.add("verticalCenter", (x, target) => {
          if (target.dataItem) {
            if (target.dataItem.valueY >= 0) {
              return "none";
            } else {
              return "bottom";
            }
          } else {
            return x;
          }
        });
        tooltip.label.adapter.add("rotation", (x, target) => {
          if (target.dataItem) {
            if (target.dataItem.valueY >= 0) {
              return 0;
            } else {
              return 180;
            }
          } else {
            return x;
          }
        });
        columnTemplate.tooltip = tooltip;
        columnTemplate.adapter.add("tooltipY", (x, target) => {
          if (target.dataItem.valueY > 0) {
            return 0;
          } else {
            return -valueAxis.valueToPoint(maxValue - target.dataItem.valueY).y;
          }
        });
      } // columns hover state


      var columnHoverState = columnTemplate.column.states.create("hover"); // you can change any property on hover state and it will be animated

      columnHoverState.properties.fillOpacity = 1;
    });
    return chart;
  }

  componentDidMount() {
    this.chart = this.StackedBarChart();
  }

  componentDidUpdate() {
    if (this.chart) {
      this.chart.dispose();
    }

    this.chart = this.StackedBarChart();
  }

  componentWillUnmount() {
    if (this.chart) {
      this.chart.dispose();
    }
  }

  render() {
    return /*#__PURE__*/React.createElement("div", {
      key: this.props.chartId,
      id: this.props.chartId,
      style: this.style()
    });
  }

}
/* COMPONENT: BOXPLOT CHART */


class AmBoxplotChart extends React.PureComponent {
  constructor(props) {
    super(props);
    this.style = this.style.bind(this);
    this.BoxplotChart = this.BoxplotChart.bind(this);
  }

  style() {
    if (window.Shiny && !window.FlexDashboard) {
      return {
        width: "100%",
        height: "100%"
      };
    } else {
      return {
        width: this.props.width,
        height: this.props.height
      };
    }
  }

  BoxplotChart() {
    var theme = this.props.theme,
        animated = this.props.animated,
        category = this.props.category,
        isDate = this.props.isDate,
        minDate = isDate ? _utils__WEBPACK_IMPORTED_MODULE_13__.toDate(this.props.minDate).getTime() : null,
        maxDate = isDate ? _utils__WEBPACK_IMPORTED_MODULE_13__.toDate(this.props.maxDate).getTime() : null,
        minValue = this.props.minValue,
        maxValue = this.props.maxValue,
        color = this.props.color,
        data = this.props.data.fiveNumbers,
        outliers = this.props.data.outliers,
        hline = this.props.hline,
        xAxis = this.props.xAxis,
        yAxis = this.props.yAxis,
        tooltips = this.props.tooltip,
        valueFormatter = this.props.valueFormatter,
        bulletsStyle = this.props.bullets,
        cursor = this.props.cursor,
        chartId = this.props.chartId,
        shinyId = this.props.shinyId;

    if (outliers) {
      if (isDate) {
        for (var i = 0; i < outliers.length; i++) {
          outliers[i][category] = outliers[i][category].map(_utils__WEBPACK_IMPORTED_MODULE_13__.toDate);
        }
      }

      outliers = outliers.map(HTMLWidgets.dataframeToD3);
    }

    if (isDate) {
      data[category] = data[category].map(_utils__WEBPACK_IMPORTED_MODULE_13__.toDate);
    }

    data = HTMLWidgets.dataframeToD3(data);
    var dataCopy = data.map(row => _objectSpread({}, row)); // correct?

    if (window.Shiny) {
      if (shinyId === undefined) {
        shinyId = $(document.getElementById(chartId)).parent().attr("id");
      }

      Shiny.setInputValue(shinyId + ":rAmCharts4.dataframe", dataCopy);
    }

    if (animated) {
      _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_animated__WEBPACK_IMPORTED_MODULE_3__["default"]);
    }

    switch (theme) {
      case "dark":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_dark__WEBPACK_IMPORTED_MODULE_4__["default"]);
        break;

      case "dataviz":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_dataviz__WEBPACK_IMPORTED_MODULE_5__["default"]);
        break;

      case "frozen":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_frozen__WEBPACK_IMPORTED_MODULE_6__["default"]);
        break;

      case "kelly":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_kelly__WEBPACK_IMPORTED_MODULE_7__["default"]);
        break;

      case "material":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_material__WEBPACK_IMPORTED_MODULE_8__["default"]);
        break;

      case "microchart":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_microchart__WEBPACK_IMPORTED_MODULE_9__["default"]);
        break;

      case "moonrisekingdom":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_moonrisekingdom__WEBPACK_IMPORTED_MODULE_10__["default"]);
        break;

      case "patterns":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_patterns__WEBPACK_IMPORTED_MODULE_11__["default"]);
        break;

      case "spiritedaway":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_spiritedaway__WEBPACK_IMPORTED_MODULE_12__["default"]);
        break;
    }

    var chart;
    chart = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.create(this.props.chartId, _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.XYChart);
    chart.data = data;
    chart.hiddenState.properties.opacity = 0; // this makes initial fade in effect

    chart.padding(50, 40, 0, 10);
    chart.maskBullets = false; // allow bullets to go out of plot area

    var chartBackgroundColor = this.props.backgroundColor || chart.background.fill;
    chart.background.fill = chartBackgroundColor;
    /* ~~~~\  Enable export  /~~~~ */

    if (this.props.export) {
      chart.exporting.menu = new _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.ExportMenu();
      chart.exporting.menu.items = _utils__WEBPACK_IMPORTED_MODULE_13__.exportMenuItems;
    }
    /* ~~~~\  title  /~~~~ */


    var chartTitle = this.props.chartTitle;

    if (chartTitle) {
      var title = chart.titles.create();
      title.text = chartTitle.text.text;
      title.fill = chartTitle.text.color || (theme === "dark" ? "#ffffff" : "#000000");
      title.fontSize = chartTitle.text.fontSize || 22;
      title.fontWeight = chartTitle.text.fontWeight || "bold";
      title.fontFamily = chartTitle.text.fontFamily;
      title.align = chartTitle.align || "left";
      title.dy = -30;
    }
    /* ~~~~\  caption  /~~~~ */


    var chartCaption = this.props.caption;

    if (chartCaption) {
      var caption = chart.chartContainer.createChild(_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.Label);
      caption.text = chartCaption.text.text;
      caption.fill = chartCaption.text.color || (theme === "dark" ? "#ffffff" : "#000000");
      caption.fontSize = chartCaption.text.fontSize;
      caption.fontWeight = chartCaption.text.fontWeight;
      caption.fontFamily = chartCaption.text.fontFamily;
      caption.align = chartCaption.align || "right";
    }
    /* ~~~~\  image  /~~~~ */


    if (this.props.image) {
      _utils__WEBPACK_IMPORTED_MODULE_13__.Image(_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__, chart, this.props.image);
    }
    /* ~~~~\  scrollbars  /~~~~ */


    if (this.props.scrollbarX) {
      chart.scrollbarX = new _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.Scrollbar();
    }

    if (this.props.scrollbarY) {
      chart.scrollbarY = new _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.Scrollbar();
    }
    /* ~~~~\  x-axis  /~~~~ */


    var XAxis;

    if (isDate) {
      XAxis = _utils__WEBPACK_IMPORTED_MODULE_13__.createAxis("X", _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__, _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__, chart, xAxis, minDate, maxDate, true, theme, cursor, category);
    } else {
      XAxis = _utils__WEBPACK_IMPORTED_MODULE_13__.createCategoryAxis("X", _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__, chart, category, xAxis, 100, theme);
    }
    /* ~~~~\  value axis  /~~~~ */


    var valueAxis = _utils__WEBPACK_IMPORTED_MODULE_13__.createAxis("Y", _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__, _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__, chart, yAxis, minValue, maxValue, false, theme, cursor);
    /* ~~~~\  horizontal line  /~~~~ */

    if (hline) {
      var range = valueAxis.axisRanges.create();
      range.value = hline.value;
      range.grid.stroke = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.color(hline.line.color);
      range.grid.strokeWidth = hline.line.width;
      range.grid.strokeOpacity = hline.line.opacity;
      range.grid.strokeDasharray = hline.line.dash;
    }
    /* ~~~~\  cursor  /~~~~ */


    if (cursor || tooltips) {
      chart.cursor = new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.XYCursor();
      chart.cursor.yAxis = valueAxis; //chart.cursor.lineX.disabled = true;
    }
    /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */


    var series = chart.series.push(new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.CandlestickSeries());

    if (color) {
      series.fill = color;
    }

    if (isDate) {
      series.dataFields.dateX = category;
    } else {
      series.dataFields.categoryX = category;
    }

    series.dataFields.valueY = "hingeUpr";
    series.dataFields.openValueY = "hingeLwr";
    series.dataFields.lowValueY = "whiskerLwr";
    series.dataFields.highValueY = "whiskerUpr";
    series.simplifiedProcessing = true;
    series.riseFromOpenState = undefined;
    series.dropFromOpenState = undefined;
    series.sequencedInterpolation = true;
    series.defaultState.interpolationDuration = 1000;

    if (tooltips) {
      series.tooltipText = tooltips.text; //      let tooltip = utils.Tooltip(am4core, chart, 0, [tooltips]);
      //      series.tooltip = tooltip;
    }

    var medianaSeries = chart.series.push(new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.StepLineSeries());
    medianaSeries.noRisers = true;
    medianaSeries.startLocation = 0.2;
    medianaSeries.endLocation = 0.8;
    medianaSeries.dataFields.valueY = "median";

    if (isDate) {
      medianaSeries.dataFields.dateX = category;
    } else {
      medianaSeries.dataFields.categoryX = category;
    }

    medianaSeries.strokeWidth = 2;
    medianaSeries.stroke = chart.colors.getIndex(1);
    var topSeries = chart.series.push(new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.StepLineSeries());
    topSeries.noRisers = true;
    topSeries.startLocation = 0.2;
    topSeries.endLocation = 0.8;
    topSeries.dataFields.valueY = "whiskerUpr";

    if (isDate) {
      topSeries.dataFields.dateX = category;
    } else {
      topSeries.dataFields.categoryX = category;
    }

    topSeries.stroke = chart.colors.getIndex(0);
    topSeries.strokeWidth = 2;
    var bottomSeries = chart.series.push(new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.StepLineSeries());
    bottomSeries.noRisers = true;
    bottomSeries.startLocation = 0.2;
    bottomSeries.endLocation = 0.8;
    bottomSeries.dataFields.valueY = "whiskerLwr";

    if (isDate) {
      bottomSeries.dataFields.dateX = category;
    } else {
      bottomSeries.dataFields.categoryX = category;
    }

    bottomSeries.stroke = chart.colors.getIndex(0);
    bottomSeries.strokeWidth = 2;

    if (outliers) {
      var tooltipStyle = {
        backgroundColor: series.fill,
        pointerLength: 10
      };

      for (var _i6 = 0; _i6 < outliers.length; _i6++) {
        var bulletSeries = chart.series.push(new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.LineSeries());
        bulletSeries.strokeOpacity = 0;
        bulletSeries.data = outliers[_i6];

        if (isDate) {
          bulletSeries.dataFields.dateX = category;
        } else {
          bulletSeries.dataFields.categoryX = category;
        }

        bulletSeries.dataFields.valueY = "outlier";
        bulletSeries.tooltipText = "{valueY.value.formatNumber('".concat(valueFormatter, "')}");
        var tooltip = _utils__WEBPACK_IMPORTED_MODULE_13__.Tooltip(_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__, chart, 1, tooltipStyle);
        tooltip.pointerOrientation = "horizontal";
        tooltip.dx = 0;
        bulletSeries.tooltip = tooltip;
        var bullet = bulletSeries.bullets.push(new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.Bullet()),
            shape = _utils__WEBPACK_IMPORTED_MODULE_13__.Shape(_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__, chart, 1, bullet, bulletsStyle); // create bullet hover state

        var hoverState = shape.states.create("hover");
        hoverState.properties.strokeWidth = shape.strokeWidth + 2;
        hoverState.properties.opacity = 1; // visible when hovered
      }
    }

    return chart;
  }

  componentDidMount() {
    this.chart = this.BoxplotChart();
  }

  componentDidUpdate() {
    if (this.chart) {
      this.chart.dispose();
    }

    this.chart = this.BoxplotChart();
  }

  componentWillUnmount() {
    if (this.chart) {
      this.chart.dispose();
    }
  }

  render() {
    return /*#__PURE__*/React.createElement("div", {
      key: this.props.chartId,
      id: this.props.chartId,
      style: this.style()
    });
  }

}
/* COMPONENT: PIE CHART */


class AmPieChart extends React.PureComponent {
  constructor(props) {
    super(props);
    this.style = this.style.bind(this);
    this.PieChart = this.PieChart.bind(this);
  }

  style() {
    if (window.Shiny && !window.FlexDashboard) {
      return {
        width: "100%",
        height: "100%"
      };
    } else {
      return {
        width: this.props.width,
        height: this.props.height
      };
    }
  }

  PieChart() {
    var theme = this.props.theme,
        animated = this.props.animated,
        threeD = this.props.threeD,
        chartLegend = this.props.legend,
        category = this.props.category,
        value = this.props.value,
        depth = this.props.depth,
        innerRadius = this.props.innerRadius,
        variableDepth = this.props.variableDepth,
        variableRadius = this.props.variableRadius,
        colorStep = this.props.colorStep,
        data = HTMLWidgets.dataframeToD3(this.props.data),
        dataCopy = HTMLWidgets.dataframeToD3(_utils__WEBPACK_IMPORTED_MODULE_13__.subset(this.props.data, [category, value])),
        chartId = this.props.chartId,
        shinyId = this.props.shinyId;

    if (window.Shiny) {
      if (shinyId === undefined) {
        shinyId = $(document.getElementById(chartId)).parent().attr("id");
      }

      Shiny.setInputValue(shinyId + ":rAmCharts4.dataframe", dataCopy);
    }

    if (animated) {
      _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_animated__WEBPACK_IMPORTED_MODULE_3__["default"]);
    }

    switch (theme) {
      case "dark":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_dark__WEBPACK_IMPORTED_MODULE_4__["default"]);
        break;

      case "dataviz":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_dataviz__WEBPACK_IMPORTED_MODULE_5__["default"]);
        break;

      case "frozen":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_frozen__WEBPACK_IMPORTED_MODULE_6__["default"]);
        break;

      case "kelly":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_kelly__WEBPACK_IMPORTED_MODULE_7__["default"]);
        break;

      case "material":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_material__WEBPACK_IMPORTED_MODULE_8__["default"]);
        break;

      case "microchart":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_microchart__WEBPACK_IMPORTED_MODULE_9__["default"]);
        break;

      case "moonrisekingdom":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_moonrisekingdom__WEBPACK_IMPORTED_MODULE_10__["default"]);
        break;

      case "patterns":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_patterns__WEBPACK_IMPORTED_MODULE_11__["default"]);
        break;

      case "spiritedaway":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_spiritedaway__WEBPACK_IMPORTED_MODULE_12__["default"]);
        break;
    }

    var chart;

    if (threeD) {
      chart = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.create(this.props.chartId, _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.PieChart3D);
      chart.depth = depth;
    } else {
      chart = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.create(this.props.chartId, _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.PieChart);
    }

    chart.hiddenState.properties.opacity = 0; // this creates initial fade-in

    chart.innerRadius = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.percent(innerRadius);
    chart.data = data;
    chart.padding(50, 40, 0, 10);
    var chartBackgroundColor = this.props.backgroundColor || chart.background.fill;
    chart.background.fill = chartBackgroundColor;
    /* ~~~~\  Enable export  /~~~~ */

    if (this.props.export) {
      chart.exporting.menu = new _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.ExportMenu();
      chart.exporting.menu.items = _utils__WEBPACK_IMPORTED_MODULE_13__.exportMenuItems;
    }
    /* ~~~~\  title  /~~~~ */


    var chartTitle = this.props.chartTitle;

    if (chartTitle) {
      var title = chart.titles.create();
      title.text = chartTitle.text.text;
      title.fill = chartTitle.text.color || (theme === "dark" ? "#ffffff" : "#000000");
      title.fontSize = chartTitle.text.fontSize || 22;
      title.fontWeight = chartTitle.text.fontWeight || "bold";
      title.fontFamily = chartTitle.text.fontFamily;
      title.align = chartTitle.align || "left";
      title.dy = -30;
    }
    /* ~~~~\  caption  /~~~~ */


    var chartCaption = this.props.caption;

    if (chartCaption) {
      var caption = chart.chartContainer.createChild(_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.Label);
      caption.text = chartCaption.text.text;
      caption.fill = chartCaption.text.color || (theme === "dark" ? "#ffffff" : "#000000");
      caption.fontSize = chartCaption.text.fontSize;
      caption.fontWeight = chartCaption.text.fontWeight;
      caption.fontFamily = chartCaption.text.fontFamily;
      caption.align = chartCaption.align || "right";
    }
    /* ~~~~\  image  /~~~~ */


    if (this.props.image) {
      _utils__WEBPACK_IMPORTED_MODULE_13__.Image(_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__, chart, this.props.image);
    }
    /* ~~~~\  Shiny message handler for pie chart  /~~~~ */


    if (window.Shiny) {
      Shiny.addCustomMessageHandler(shinyId + "pie", function (newdata) {
        var tail = " is missing in the data you supplied!"; // check that the received data has the 'category' column

        if (!newdata.hasOwnProperty(category)) {
          console.warn("updateAmPieChart: column \"".concat(category, "\"") + tail);
          return null;
        } // check that the received data has the 'value' column


        if (!newdata.hasOwnProperty(value)) {
          console.warn("updateAmPieChart: column \"".concat(value, "\"") + tail);
          return null;
        } // update chart data


        chart.data = HTMLWidgets.dataframeToD3(newdata);
        chart.invalidateRawData();
        Shiny.setInputValue(shinyId + ":rAmCharts4.dataframe", tnewdata);
        Shiny.setInputValue(shinyId + "_change", null);
      });
    }
    /* ~~~~\  legend  /~~~~ */


    if (chartLegend) {
      chart.legend = new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.Legend();
      var legendPosition = chartLegend.position || "bottom";
      chart.legend.position = legendPosition;

      if (legendPosition === "bottom" || legendPosition === "top") {
        chart.legend.maxHeight = chartLegend.maxHeight;
        chart.legend.scrollable = chartLegend.scrollable;
      } else {
        chart.legend.maxWidth = chartLegend.maxWidth;
      }

      chart.legend.useDefaultMarker = false;
      var markerTemplate = chart.legend.markers.template;
      markerTemplate.width = chartLegend.itemsWidth || 20;
      markerTemplate.height = chartLegend.itemsHeight || 20; // markerTemplate.strokeWidth = 1;
      // markerTemplate.strokeOpacity = 1;
    }

    var series;

    if (threeD) {
      series = chart.series.push(new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.PieSeries3D());
    } else {
      series = chart.series.push(new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.PieSeries());
    }

    series.dataFields.value = value;
    series.dataFields.category = category; //series.slices.template.cornerRadius = 5;

    series.colors.step = colorStep;

    if (threeD && variableDepth) {
      series.dataFields.depthValue = value;
    }

    if (variableRadius) {
      series.dataFields.radiusValue = value;
    }

    series.hiddenState.properties.endAngle = -90;
    return chart;
  }

  componentDidMount() {
    this.chart = this.PieChart();
  }

  componentWillUnmount() {
    if (this.chart) {
      this.chart.dispose();
    }
  }

  componentDidUpdate(prevProps, prevState) {
    if (this.chart) {
      this.chart.dispose();
    }

    this.chart = this.PieChart();
  }

  render() {
    return /*#__PURE__*/React.createElement("div", {
      key: this.props.chartId,
      id: this.props.chartId,
      style: this.style()
    });
  }

}
/* COMPONENT: 100% STACKED BAR CHART */


class AmPercentageBarChart extends React.PureComponent {
  constructor(props) {
    super(props);
    this.style = this.style.bind(this);
    this.PercentageBarChart = this.PercentageBarChart.bind(this);
  }

  style() {
    if (window.Shiny && !window.FlexDashboard) {
      return {
        width: "100%",
        height: "100%"
      };
    } else {
      return {
        width: this.props.width,
        height: this.props.height
      };
    }
  }

  PercentageBarChart() {
    var theme = this.props.theme,
        animated = this.props.animated,
        chartLegend = this.props.legend,
        category = this.props.category,
        categories = this.props.data[category],
        values = this.props.values,
        hline = this.props.hline,
        data = HTMLWidgets.dataframeToD3(this.props.data),
        valueNames = this.props.valueNames,
        xAxis = this.props.xAxis,
        yAxis = this.props.yAxis,
        chartId = this.props.chartId,
        shinyId = this.props.shinyId;

    if (window.Shiny) {
      if (shinyId === undefined) {
        shinyId = $(document.getElementById(chartId)).parent().attr("id");
      }
    }

    if (animated) {
      _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_animated__WEBPACK_IMPORTED_MODULE_3__["default"]);
    }

    switch (theme) {
      case "dark":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_dark__WEBPACK_IMPORTED_MODULE_4__["default"]);
        break;

      case "dataviz":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_dataviz__WEBPACK_IMPORTED_MODULE_5__["default"]);
        break;

      case "frozen":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_frozen__WEBPACK_IMPORTED_MODULE_6__["default"]);
        break;

      case "kelly":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_kelly__WEBPACK_IMPORTED_MODULE_7__["default"]);
        break;

      case "material":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_material__WEBPACK_IMPORTED_MODULE_8__["default"]);
        break;

      case "microchart":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_microchart__WEBPACK_IMPORTED_MODULE_9__["default"]);
        break;

      case "moonrisekingdom":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_moonrisekingdom__WEBPACK_IMPORTED_MODULE_10__["default"]);
        break;

      case "patterns":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_patterns__WEBPACK_IMPORTED_MODULE_11__["default"]);
        break;

      case "spiritedaway":
        _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.useTheme(_amcharts_amcharts4_themes_spiritedaway__WEBPACK_IMPORTED_MODULE_12__["default"]);
        break;
    }

    var chart = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.create(this.props.chartId, _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.XYChart);
    chart.data = data;
    chart.colors.step = 2;
    chart.hiddenState.properties.opacity = 0; // this makes initial fade in effect

    chart.padding(50, 40, 0, 10);
    var chartBackgroundColor = this.props.backgroundColor || chart.background.fill;
    chart.background.fill = chartBackgroundColor;
    /* ~~~~\  Enable export  /~~~~ */

    if (this.props.export) {
      chart.exporting.menu = new _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.ExportMenu();
      chart.exporting.menu.items = _utils__WEBPACK_IMPORTED_MODULE_13__.exportMenuItems;
    }
    /* ~~~~\  title  /~~~~ */


    var chartTitle = this.props.chartTitle;

    if (chartTitle) {
      var title = chart.titles.create();
      title.text = chartTitle.text.text;
      title.fill = chartTitle.text.color || (theme === "dark" ? "#ffffff" : "#000000");
      title.fontSize = chartTitle.text.fontSize || 22;
      title.fontWeight = chartTitle.text.fontWeight || "bold";
      title.fontFamily = chartTitle.text.fontFamily;
      title.align = chartTitle.align || "left";
      title.dy = -30;
    }
    /* ~~~~\  caption  /~~~~ */


    var chartCaption = this.props.caption;

    if (chartCaption) {
      var caption = chart.chartContainer.createChild(_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.Label);
      caption.text = chartCaption.text.text;
      caption.fill = chartCaption.text.color || (theme === "dark" ? "#ffffff" : "#000000");
      caption.fontSize = chartCaption.text.fontSize;
      caption.fontWeight = chartCaption.text.fontWeight;
      caption.fontFamily = chartCaption.text.fontFamily;
      caption.align = chartCaption.align || "right";
    }
    /* ~~~~\  image  /~~~~ */


    if (this.props.image) {
      _utils__WEBPACK_IMPORTED_MODULE_13__.Image(_amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__, chart, this.props.image);
    }
    /* ~~~~\  scrollbars  /~~~~ */


    if (this.props.scrollbarX) {
      chart.scrollbarX = new _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.Scrollbar();
    }

    if (this.props.scrollbarY) {
      chart.scrollbarY = new _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.Scrollbar();
    }
    /* ~~~~\  legend  /~~~~ */


    if (chartLegend) {
      chart.legend = new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.Legend();
      var legendPosition = chartLegend.position || "bottom";
      chart.legend.position = legendPosition;

      if (legendPosition === "bottom" || legendPosition === "top") {
        chart.legend.maxHeight = chartLegend.maxHeight;
        chart.legend.scrollable = chartLegend.scrollable;
      } else {
        chart.legend.maxWidth = chartLegend.maxWidth;
      }

      chart.legend.useDefaultMarker = false;
      var markerTemplate = chart.legend.markers.template;
      markerTemplate.width = chartLegend.itemsWidth || 20;
      markerTemplate.height = chartLegend.itemsHeight || 20; // markerTemplate.strokeWidth = 1;
      // markerTemplate.strokeOpacity = 1;

      chart.legend.itemContainers.template.events.on("over", function (ev) {
        ev.target.dataItem.dataContext.columns.each(function (x) {
          x.column.isHover = true;
        });
      });
      chart.legend.itemContainers.template.events.on("out", function (ev) {
        ev.target.dataItem.dataContext.columns.each(function (x) {
          x.column.isHover = false;
        });
      });
    }
    /* ~~~~\  Shiny message handler for percentage bar chart  /~~~~ */


    if (window.Shiny) {
      Shiny.addCustomMessageHandler(shinyId + "percentage", function (newdata) {
        var tail = " is missing in the data you supplied!"; // check that the received data has the 'category' column

        if (!newdata.hasOwnProperty(category)) {
          console.warn("updateAmPercentageBarChart: column \"".concat(category, "\"") + tail);
          return null;
        } // check that the received data has the necessary categories


        var ok = true,
            i = 0;

        while (ok && i < categories.length) {
          ok = newdata[category].indexOf(categories[i]) > -1;

          if (!ok) {
            console.warn("updateAmPercentageBarChart: category \"".concat(categories[i], "\"") + tail);
          }

          i++;
        }

        if (!ok) {
          return null;
        } // check that the received data has the necessary 'values' columns


        i = 0;

        while (ok && i < values.length) {
          ok = newdata.hasOwnProperty(values[i]);

          if (!ok) {
            console.warn("updateAmPercentageBarChart: column \"".concat(values[i], "\"") + tail);
          }

          i++;
        }

        if (!ok) {
          return null;
        } // update chart data


        var tnewdata = HTMLWidgets.dataframeToD3(newdata);

        for (var r = 0; r < data.length; ++r) {
          for (var v = 0; v < values.length; ++v) {
            chart.data[r][values[v]] = tnewdata[r][values[v]];
          }
        }

        chart.invalidateRawData();
      });
    }
    /* ~~~~\  category axis  /~~~~ */


    var categoryAxis = _utils__WEBPACK_IMPORTED_MODULE_13__.createCategoryAxis("X", _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__, chart, category, xAxis, 95, theme); //    let categoryAxis = chart.xAxes.push(new am4charts.CategoryAxis());
    //    categoryAxis.dataFields.category = category;
    //    categoryAxis.renderer.grid.template.location = 0;

    /* ~~~~\  value axis  /~~~~ */

    var valueAxis = _utils__WEBPACK_IMPORTED_MODULE_13__.createAxis("Y", _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__, _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__, chart, yAxis, 0, 100, false, theme, false); //    let valueAxis = chart.yAxes.push(new am4charts.ValueAxis());
    //    valueAxis.min = 0;
    //    valueAxis.max = 100;
    //    valueAxis.strictMinMax = true;

    valueAxis.calculateTotals = true;
    valueAxis.renderer.minWidth = 50;
    /* ~~~~\  horizontal line  /~~~~ */

    if (hline) {
      var range = valueAxis.axisRanges.create();
      range.value = hline.value;
      range.grid.stroke = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.color(hline.line.color);
      range.grid.strokeWidth = hline.line.width;
      range.grid.strokeOpacity = hline.line.opacity;
      range.grid.strokeDasharray = hline.line.dash;
    }
    /* ~~~~\  chart  /~~~~ */


    for (var i = 0; i < values.length; i++) {
      var series = chart.series.push(new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.ColumnSeries());
      series.columns.template.width = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.percent(80);
      series.columns.template.tooltipText = "{name}: {valueY.totalPercent.formatNumber('#.00')}%";
      series.name = valueNames[values[i]];
      series.dataFields.categoryX = category;
      series.dataFields.valueY = values[i];
      series.dataFields.valueYShow = "totalPercent";
      series.dataItems.template.locations.categoryX = 0.5;
      series.stacked = true;
      series.tooltip.pointerOrientation = "vertical";
      var bullet = series.bullets.push(new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_2__.LabelBullet());
      bullet.interactionsEnabled = false;
      bullet.label.text = "{valueY.totalPercent.formatNumber('#.00')}%";
      bullet.locationY = 0.5;
      bullet.label.fill = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_1__.color("#ffffff");
    }

    return chart;
  }

  componentDidMount() {
    this.chart = this.PercentageBarChart();
  }

  componentWillUnmount() {
    if (this.chart) {
      this.chart.dispose();
    }
  }

  componentDidUpdate(prevProps, prevState) {
    if (this.chart) {
      this.chart.dispose();
    }

    this.chart = this.PercentageBarChart();
  }

  render() {
    return /*#__PURE__*/React.createElement("div", {
      key: this.props.chartId,
      id: this.props.chartId,
      style: this.style()
    });
  }

}
/* CREATE WIDGETS */


(0,reactR__WEBPACK_IMPORTED_MODULE_0__.reactWidget)("amChart4", "output", {
  AmBarChart: AmBarChart,
  AmHorizontalBarChart: AmHorizontalBarChart,
  AmLineChart: AmLineChart,
  AmScatterChart: AmScatterChart,
  AmRangeAreaChart: AmRangeAreaChart,
  AmRadialBarChart: AmRadialBarChart,
  AmDumbbellChart: AmDumbbellChart,
  AmHorizontalDumbbellChart: AmHorizontalDumbbellChart,
  AmGaugeChart: AmGaugeChart,
  AmStackedBarChart: AmStackedBarChart,
  AmBoxplotChart: AmBoxplotChart,
  AmPieChart: AmPieChart,
  AmPercentageBarChart: AmPercentageBarChart
}, {});
})();

/******/ })()
;
//# sourceMappingURL=amChart4.js.map