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,EAAKvhB,GACnB,OAAOA,GAAK,EAAIu6H,EAASv6H,IAAM,GAAKu6H,EAASn7H,KAAKmiB,KAAKvhB,EACzD,+FCjBO,SAASyoI,EAASC,GACvB,IAAIr+H,EAAS,EAcb,OAZAq+H,EAAMr+H,OAAS,SAASpB,GACtB,IAAKxI,UAAUC,OAAQ,OAAO2J,EAC9B,GAAS,MAALpB,EACFoB,EAAS,SACJ,CACL,MAAMlL,EAAIC,KAAK4L,MAAM/B,GACrB,KAAM9J,GAAK,GAAI,MAAM,IAAI8L,WAAW,mBAAmBhC,KACvDoB,EAASlL,CACX,CACA,OAAOupI,CACT,EAEO,IAAM,IAAI,KAAKr+H,EACxB,wBClBO,SAASrK,EAAEwY,GAChB,OAAOA,EAAE,EACX,CAEO,SAASvY,EAAEuY,GAChB,OAAOA,EAAE,EACX","sources":["webpack:///./node_modules/@amcharts/amcharts5-geodata/data/countries2.js","webpack:///./node_modules/d3-hierarchy/src/pack/index.js","webpack:///./node_modules/src/.internal/charts/map/ClusteredPointSeries.ts","webpack:///./node_modules/d3-geo/src/graticule.js","webpack:///./node_modules/src/.internal/charts/map/GraticuleSeries.ts","webpack:///./node_modules/src/.internal/charts/map/MapChart.ts","webpack:///./node_modules/d3-geo/src/path/index.js","webpack:///./node_modules/src/.internal/charts/map/MapChartDefaultTheme.ts","webpack:///./node_modules/d3-geo/src/distance.js","webpack:///./node_modules/src/.internal/charts/map/MapLine.ts","webpack:///./node_modules/d3-geo/src/interpolate.js","webpack:///./node_modules/src/.internal/charts/map/MapLineSeries.ts","webpack:///./node_modules/src/.internal/charts/map/MapPointSeries.ts","webpack:///./node_modules/src/.internal/charts/map/MapPolygon.ts","webpack:///./node_modules/src/.internal/charts/map/MapPolygonSeries.ts","webpack:///./node_modules/src/.internal/charts/map/MapSeries.ts","webpack:///./node_modules/src/.internal/charts/map/MapUtils.ts","webpack:///./node_modules/src/.internal/core/render/ZoomableContainer.ts","webpack:///./node_modules/src/.internal/core/render/ZoomTools.ts","webpack:///./node_modules/src/.internal/charts/map/ZoomControl.ts","webpack:///./node_modules/src/.internal/charts/radar/AxisRendererCircular.ts","webpack:///./node_modules/src/.internal/charts/radar/AxisRendererRadial.ts","webpack:///./node_modules/src/.internal/charts/radar/RadarDefaultTheme.ts","webpack:///./node_modules/src/.internal/charts/radar/RadarChart.ts","webpack:///./node_modules/src/.internal/charts/xy/series/BaseColumnSeries.ts","webpack:///./node_modules/src/.internal/charts/radar/RadarColumnSeries.ts","webpack:///./node_modules/src/.internal/charts/radar/RadarLineSeries.ts","webpack:///./node_modules/src/.internal/charts/xy/XYChartDefaultTheme.ts","webpack:///./node_modules/src/.internal/charts/xy/XYChart.ts","webpack:///./node_modules/src/.internal/charts/xy/axes/Axis.ts","webpack:///./node_modules/src/.internal/core/render/RadialText.ts","webpack:///./node_modules/src/.internal/core/render/RadialLabel.ts","webpack:///./node_modules/src/.internal/charts/xy/axes/AxisLabelRadial.ts","webpack:///./node_modules/src/.internal/core/util/Draw.ts","webpack:///./node_modules/src/.internal/core/render/Line.ts","webpack:///./node_modules/src/.internal/core/render/Tick.ts","webpack:///./node_modules/src/.internal/charts/xy/axes/AxisTick.ts","webpack:///./node_modules/src/.internal/charts/xy/axes/Grid.ts","webpack:///./node_modules/src/.internal/charts/xy/axes/AxisLabel.ts","webpack:///./node_modules/src/.internal/charts/xy/axes/AxisRenderer.ts","webpack:///./node_modules/src/.internal/charts/xy/axes/AxisRendererX.ts","webpack:///./node_modules/src/.internal/charts/xy/axes/AxisRendererY.ts","webpack:///./node_modules/src/.internal/charts/xy/axes/CategoryAxis.ts","webpack:///./node_modules/src/.internal/charts/xy/axes/ValueAxis.ts","webpack:///./node_modules/d3-shape/src/area.js","webpack:///./node_modules/src/.internal/charts/xy/series/LineSeries.ts","webpack:///./node_modules/src/.internal/core/render/MonotoneXTension.ts","webpack:///./node_modules/src/.internal/charts/xy/series/SmoothedXLineSeries.ts","webpack:///./node_modules/src/.internal/charts/xy/series/XYSeries.ts","webpack:///./node_modules/src/.internal/core/Registry.ts","webpack:///./node_modules/src/.internal/core/Root.ts","webpack:///./node_modules/src/.internal/core/Theme.ts","webpack:///./node_modules/src/.internal/core/render/Bullet.ts","webpack:///./node_modules/src/.internal/core/render/Button.ts","webpack:///./node_modules/src/.internal/core/render/Circle.ts","webpack:///./node_modules/src/.internal/core/util/Data.ts","webpack:///./node_modules/src/.internal/core/render/Component.ts","webpack:///./node_modules/src/.internal/core/util/Children.ts","webpack:///./node_modules/src/.internal/core/render/Container.ts","webpack:///./node_modules/src/.internal/core/render/patterns/Pattern.ts","webpack:///./node_modules/src/.internal/core/render/patterns/PicturePattern.ts","webpack:///./node_modules/src/.internal/core/render/Graphics.ts","webpack:///./node_modules/src/.internal/core/render/GridLayout.ts","webpack:///./node_modules/src/.internal/core/render/HorizontalLayout.ts","webpack:///./node_modules/src/.internal/core/render/Label.ts","webpack:///./node_modules/src/.internal/core/render/Layout.ts","webpack:///./node_modules/src/.internal/core/render/Rectangle.ts","webpack:///./node_modules/src/.internal/core/render/RoundedRectangle.ts","webpack:///./node_modules/src/.internal/core/render/Chart.ts","webpack:///./node_modules/src/.internal/core/render/SerialChart.ts","webpack:///./node_modules/src/.internal/core/render/Series.ts","webpack:///./node_modules/src/.internal/core/render/Slice.ts","webpack:///./node_modules/src/.internal/core/render/Scrollbar.ts","webpack:///./node_modules/src/.internal/core/render/Slider.ts","webpack:///./node_modules/src/.internal/core/render/Sprite.ts","webpack:///./node_modules/src/.internal/core/render/Text.ts","webpack:///./node_modules/src/.internal/core/render/PointedRectangle.ts","webpack:///./node_modules/src/.internal/core/render/Tooltip.ts","webpack:///./node_modules/src/.internal/core/render/VerticalLayout.ts","webpack:///./node_modules/svg-arc-to-cubic-bezier/modules/index.js","webpack:///./node_modules/src/.internal/core/render/backend/CanvasRenderer.ts","webpack:///./node_modules/src/.internal/core/render/backend/Renderer.ts","webpack:///./node_modules/src/.internal/core/render/gradients/Gradient.ts","webpack:///./node_modules/src/.internal/core/render/gradients/LinearGradient.ts","webpack:///./node_modules/src/.internal/core/util/Animation.ts","webpack:///./node_modules/src/.internal/core/util/Array.ts","webpack:///./node_modules/src/.internal/core/util/Color.ts","webpack:///./node_modules/src/.internal/core/util/ColorSet.ts","webpack:///./node_modules/src/.internal/core/util/DataParser.ts","webpack:///./node_modules/src/.internal/core/util/DateFormatter.ts","webpack:///./node_modules/src/.internal/core/util/Disposer.ts","webpack:///./node_modules/src/.internal/core/util/DurationFormatter.ts","webpack:///./node_modules/src/.internal/core/util/Ease.ts","webpack:///./node_modules/src/.internal/core/util/States.ts","webpack:///./node_modules/src/.internal/core/util/Entity.ts","webpack:///./node_modules/src/.internal/core/util/EventDispatcher.ts","webpack:///./node_modules/src/.internal/core/util/InterfaceColors.ts","webpack:///./node_modules/src/.internal/core/util/Language.ts","webpack:///./node_modules/src/.internal/core/util/List.ts","webpack:///./node_modules/src/.internal/core/util/Math.ts","webpack:///./node_modules/src/.internal/core/util/Matrix.ts","webpack:///./node_modules/src/.internal/core/util/Net.ts","webpack:///./node_modules/src/.internal/core/util/NumberFormatter.ts","webpack:///./node_modules/src/.internal/core/util/Object.ts","webpack:///./node_modules/src/.internal/core/util/Order.ts","webpack:///./node_modules/src/.internal/core/util/Percent.ts","webpack:///./node_modules/src/.internal/core/util/PopulateString.ts","webpack:///./node_modules/src/.internal/core/util/ResizeSensor.ts","webpack:///./node_modules/src/.internal/core/util/Template.ts","webpack:///./node_modules/src/.internal/core/util/TextFormatter.ts","webpack:///./node_modules/src/.internal/core/util/Time.ts","webpack:///./node_modules/src/.internal/core/util/Timezone.ts","webpack:///./node_modules/src/.internal/core/util/Type.ts","webpack:///./node_modules/src/.internal/core/util/Utils.ts","webpack:///./node_modules/src/.internal/plugins/exporting/Exporting.ts","webpack:///./node_modules/src/.internal/themes/AnimatedTheme.ts","webpack:///./node_modules/src/.internal/themes/DarkTheme.ts","webpack:///./node_modules/src/.internal/themes/DefaultTheme.ts","webpack:///./node_modules/src/locales/en.ts","webpack:///./node_modules/src/themes/Animated.ts","webpack:///./node_modules/src/themes/Dark.ts","webpack:///./node_modules/polylabel/polylabel.js","webpack:///./node_modules/tinyqueue/index.js","webpack:///./node_modules/tslib/tslib.es6.js","webpack:///./node_modules/@amcharts/amcharts5-geodata/continentsLow.js","webpack:///./src/.internal/Banner.ts","webpack:///./src/.internal/CommonUI.ts","webpack:///./src/.internal/Sharing.ts","webpack:///./src/.internal/UIQuery.ts","webpack:///./src/.internal/VisitedPlaces.ts","webpack:///./node_modules/d3-array/src/fsum.js","webpack:///./node_modules/d3-array/src/merge.js","webpack:///./node_modules/d3-array/src/range.js","webpack:///./node_modules/d3-geo/src/area.js","webpack:///./node_modules/d3-geo/src/bounds.js","webpack:///./node_modules/d3-geo/src/cartesian.js","webpack:///./node_modules/d3-geo/src/centroid.js","webpack:///./node_modules/d3-geo/src/circle.js","webpack:///./node_modules/d3-geo/src/clip/antimeridian.js","webpack:///./node_modules/d3-geo/src/clip/buffer.js","webpack:///./node_modules/d3-geo/src/clip/circle.js","webpack:///./node_modules/d3-geo/src/clip/index.js","webpack:///./node_modules/d3-geo/src/clip/line.js","webpack:///./node_modules/d3-geo/src/clip/rectangle.js","webpack:///./node_modules/d3-geo/src/clip/rejoin.js","webpack:///./node_modules/d3-geo/src/compose.js","webpack:///./node_modules/d3-geo/src/constant.js","webpack:///./node_modules/d3-geo/src/identity.js","webpack:///./node_modules/d3-geo/src/length.js","webpack:///./node_modules/d3-geo/src/math.js","webpack:///./node_modules/d3-geo/src/noop.js","webpack:///./node_modules/d3-geo/src/path/area.js","webpack:///./node_modules/d3-geo/src/path/bounds.js","webpack:///./node_modules/d3-geo/src/path/centroid.js","webpack:///./node_modules/d3-geo/src/path/context.js","webpack:///./node_modules/d3-geo/src/path/measure.js","webpack:///./node_modules/d3-geo/src/path/string.js","webpack:///./node_modules/d3-geo/src/pointEqual.js","webpack:///./node_modules/d3-geo/src/polygonContains.js","webpack:///./node_modules/d3-geo/src/projection/albers.js","webpack:///./node_modules/d3-geo/src/projection/albersUsa.js","webpack:///./node_modules/d3-geo/src/projection/conic.js","webpack:///./node_modules/d3-geo/src/projection/conicEqualArea.js","webpack:///./node_modules/d3-geo/src/projection/cylindricalEqualArea.js","webpack:///./node_modules/d3-geo/src/projection/equalEarth.js","webpack:///./node_modules/d3-geo/src/projection/equirectangular.js","webpack:///./node_modules/d3-geo/src/projection/fit.js","webpack:///./node_modules/d3-geo/src/projection/index.js","webpack:///./node_modules/d3-geo/src/projection/mercator.js","webpack:///./node_modules/d3-geo/src/projection/naturalEarth1.js","webpack:///./node_modules/d3-geo/src/projection/azimuthal.js","webpack:///./node_modules/d3-geo/src/projection/orthographic.js","webpack:///./node_modules/d3-geo/src/projection/resample.js","webpack:///./node_modules/d3-geo/src/rotation.js","webpack:///./node_modules/d3-geo/src/stream.js","webpack:///./node_modules/d3-geo/src/transform.js","webpack:///./node_modules/d3-hierarchy/src/accessors.js","webpack:///./node_modules/d3-hierarchy/src/array.js","webpack:///./node_modules/d3-hierarchy/src/constant.js","webpack:///./node_modules/d3-hierarchy/src/lcg.js","webpack:///./node_modules/d3-hierarchy/src/pack/enclose.js","webpack:///./node_modules/d3-hierarchy/src/pack/siblings.js","webpack:///./node_modules/d3-path/src/path.js","webpack:///./node_modules/d3-shape/src/arc.js","webpack:///./node_modules/d3-shape/src/array.js","webpack:///./node_modules/d3-shape/src/constant.js","webpack:///./node_modules/d3-shape/src/curve/linear.js","webpack:///./node_modules/d3-shape/src/line.js","webpack:///./node_modules/d3-shape/src/math.js","webpack:///./node_modules/d3-shape/src/path.js","webpack:///./node_modules/d3-shape/src/point.js"],"sourcesContent":["const countries2 = {\r\n \"AD\": {\r\n \"country\": \"Andorra\",\r\n \"continent_code\": \"EU\",\r\n \"continent\": \"Europe\",\r\n \"maps\": [\"andorraLow\", \"andorraHigh\"]\r\n },\r\n \"AE\": {\r\n \"country\": \"United Arab Emirates\",\r\n \"continent_code\": \"AS\",\r\n \"continent\": \"Asia\",\r\n \"maps\": [\"uaeLow\", \"uaeHigh\"]\r\n },\r\n \"AF\": {\r\n \"country\": \"Afghanistan\",\r\n \"continent_code\": \"AS\",\r\n \"continent\": \"Asia\",\r\n \"maps\": [\"afghanistanLow\", \"afghanistanHigh\"]\r\n },\r\n \"AG\": {\r\n \"country\": \"Antigua and Barbuda\",\r\n \"continent_code\": \"NA\",\r\n \"continent\": \"North America\",\r\n \"maps\": [\"antiguaBarbudaLow\", \"antiguaBarbudaHigh\"]\r\n },\r\n \"AI\": {\r\n \"country\": \"Anguilla\",\r\n \"continent_code\": \"NA\",\r\n \"continent\": \"North America\",\r\n \"maps\": [\"anguillaLow\", \"anguillaHigh\"]\r\n },\r\n \"AL\": {\r\n \"country\": \"Albania\",\r\n \"continent_code\": \"EU\",\r\n \"continent\": \"Europe\",\r\n \"maps\": [\"albaniaLow\", \"albaniaHigh\"]\r\n },\r\n \"AM\": {\r\n \"country\": \"Armenia\",\r\n \"continent_code\": \"EU\",\r\n \"continent\": \"Europe\",\r\n \"maps\": [\"armeniaLow\", \"armeniaHigh\"]\r\n },\r\n \"AO\": {\r\n \"country\": \"Angola\",\r\n \"continent_code\": \"AF\",\r\n \"continent\": \"Africa\",\r\n \"maps\": [\"angolaLow\", \"angolaHigh\"]\r\n },\r\n \"AQ\": {\r\n \"country\": \"Antarctica\",\r\n \"continent_code\": \"AN\",\r\n \"continent\": \"Antarctica\",\r\n \"maps\": []\r\n },\r\n \"AR\": {\r\n \"country\": \"Argentina\",\r\n \"continent_code\": \"SA\",\r\n \"continent\": \"South America\",\r\n \"maps\": [\"argentinaLow\", \"argentinaHigh\"]\r\n },\r\n \"AS\": {\r\n \"country\": \"American Samoa\",\r\n \"continent_code\": \"OC\",\r\n \"continent\": \"Oceania\",\r\n \"maps\": [\"americanSamoaLow\", \"americanSamoaHigh\"]\r\n },\r\n \"AT\": {\r\n \"country\": \"Austria\",\r\n \"continent_code\": \"EU\",\r\n \"continent\": \"Europe\",\r\n \"maps\": [\"austriaLow\", \"austriaHigh\"]\r\n },\r\n \"AU\": {\r\n \"country\": \"Australia\",\r\n \"continent_code\": \"OC\",\r\n \"continent\": \"Oceania\",\r\n \"maps\": [\"australiaLow\", \"australiaHigh\"]\r\n },\r\n \"AW\": {\r\n \"country\": \"Aruba\",\r\n \"continent_code\": \"NA\",\r\n \"continent\": \"North America\",\r\n \"maps\": [\"arubaLow\", \"arubaHigh\"]\r\n },\r\n \"AX\": {\r\n \"country\": \"Aland Islands\",\r\n \"continent_code\": \"EU\",\r\n \"continent\": \"Europe\",\r\n \"maps\": []\r\n },\r\n \"AZ\": {\r\n \"country\": \"Azerbaijan\",\r\n \"continent_code\": \"EU\",\r\n \"continent\": \"Europe\",\r\n \"maps\": [\"azerbaijanLow\", \"azerbaijanHigh\"]\r\n },\r\n \"BA\": {\r\n \"country\": \"Bosnia and Herzegovina\",\r\n \"continent_code\": \"EU\",\r\n \"continent\": \"Europe\",\r\n \"maps\": [\"bosniaHerzegovinaLow\", \"bosniaHerzegovinaHigh\", \"bosniaHerzegovinaCantonsLow\", \"bosniaHerzegovinaCantonsHigh\"]\r\n },\r\n \"BB\": {\r\n \"country\": \"Barbados\",\r\n \"continent_code\": \"NA\",\r\n \"continent\": \"North America\",\r\n \"maps\": [\"barbadosLow\", \"barbadosHigh\"]\r\n },\r\n \"BD\": {\r\n \"country\": \"Bangladesh\",\r\n \"continent_code\": \"AS\",\r\n \"continent\": \"Asia\",\r\n \"maps\": [\"bangladeshLow\", \"bangladeshHigh\"]\r\n },\r\n \"BE\": {\r\n \"country\": \"Belgium\",\r\n \"continent_code\": \"EU\",\r\n \"continent\": \"Europe\",\r\n \"maps\": [\"belgiumLow\", \"belgiumHigh\"]\r\n },\r\n \"BF\": {\r\n \"country\": \"Burkina Faso\",\r\n \"continent_code\": \"AF\",\r\n \"continent\": \"Africa\",\r\n \"maps\": [\"burkinaFasoLow\", \"burkinaFasoHigh\"]\r\n },\r\n \"BG\": {\r\n \"country\": \"Bulgaria\",\r\n \"continent_code\": \"EU\",\r\n \"continent\": \"Europe\",\r\n \"maps\": [\"bulgariaLow\", \"bulgariaHigh\"]\r\n },\r\n \"BH\": {\r\n \"country\": \"Bahrain\",\r\n \"continent_code\": \"AS\",\r\n \"continent\": \"Asia\",\r\n \"maps\": [\"bahrainLow\", \"bahrainHigh\"]\r\n },\r\n \"BI\": {\r\n \"country\": \"Burundi\",\r\n \"continent_code\": \"AF\",\r\n \"continent\": \"Africa\",\r\n \"maps\": [\"burundiLow\", \"burundiHigh\"]\r\n },\r\n \"BJ\": {\r\n \"country\": \"Benin\",\r\n \"continent_code\": \"AF\",\r\n \"continent\": \"Africa\",\r\n \"maps\": [\"beninLow\", \"beninHigh\"]\r\n },\r\n \"BL\": {\r\n \"country\": \"Saint Barthelemy\",\r\n \"continent_code\": \"NA\",\r\n \"continent\": \"North America\",\r\n \"maps\": []\r\n },\r\n \"BM\": {\r\n \"country\": \"Bermuda\",\r\n \"continent_code\": \"NA\",\r\n \"continent\": \"North America\",\r\n \"maps\": [\"bermudaLow\", \"bermudaHigh\"]\r\n },\r\n \"BN\": {\r\n \"country\": \"Brunei Darussalam\",\r\n \"continent_code\": \"AS\",\r\n \"continent\": \"Asia\",\r\n \"maps\": [\"bruneiDarussalamLow\", \"bruneiDarussalamHigh\"]\r\n },\r\n \"BO\": {\r\n \"country\": \"Bolivia, Plurinational State of\",\r\n \"continent_code\": \"SA\",\r\n \"continent\": \"South America\",\r\n \"maps\": [\"boliviaLow\", \"boliviaHigh\"]\r\n },\r\n \"BQ\": {\r\n \"country\": \"Bonaire, Sint Eustatius and Saba\",\r\n \"continent_code\": \"NA\",\r\n \"continent\": \"North America\",\r\n \"maps\": [\"bonaireSintEustatiusSabaLow\", \"bonaireSintEustatiusSabaHigh\"]\r\n },\r\n \"BR\": {\r\n \"country\": \"Brazil\",\r\n \"continent_code\": \"SA\",\r\n \"continent\": \"South America\",\r\n \"maps\": [\"brazilLow\", \"brazilHigh\"]\r\n },\r\n \"BS\": {\r\n \"country\": \"Bahamas\",\r\n \"continent_code\": \"NA\",\r\n \"continent\": \"North America\",\r\n \"maps\": [\"bahamasLow\", \"bahamasHigh\"]\r\n },\r\n \"BT\": {\r\n \"country\": \"Bhutan\",\r\n \"continent_code\": \"AS\",\r\n \"continent\": \"Asia\",\r\n \"maps\": [\"bhutanLow\", \"bhutanHigh\"]\r\n },\r\n \"BV\": {\r\n \"country\": \"Bouvet Island\",\r\n \"continent_code\": \"AN\",\r\n \"continent\": \"Antarctica\",\r\n \"maps\": []\r\n },\r\n \"BW\": {\r\n \"country\": \"Botswana\",\r\n \"continent_code\": \"AF\",\r\n \"continent\": \"Africa\",\r\n \"maps\": [\"botswanaLow\", \"botswanaHigh\"]\r\n },\r\n \"BY\": {\r\n \"country\": \"Belarus\",\r\n \"continent_code\": \"EU\",\r\n \"continent\": \"Europe\",\r\n \"maps\": [\"belarusLow\", \"belarusHigh\"]\r\n },\r\n \"BZ\": {\r\n \"country\": \"Belize\",\r\n \"continent_code\": \"NA\",\r\n \"continent\": \"North America\",\r\n \"maps\": [\"belizeLow\", \"belizeHigh\"]\r\n },\r\n \"CA\": {\r\n \"country\": \"Canada\",\r\n \"continent_code\": \"NA\",\r\n \"continent\": \"North America\",\r\n \"maps\": [\"canadaLow\", \"canadaHigh\"]\r\n },\r\n \"CC\": {\r\n \"country\": \"Cocos (Keeling) Islands\",\r\n \"continent_code\": \"AS\",\r\n \"continent\": \"Asia\",\r\n \"maps\": [\"cocosKeelingLow\", \"cocosKeelingHigh\"]\r\n },\r\n \"CD\": {\r\n \"country\": \"Congo, the Democratic Republic of the\",\r\n \"continent_code\": \"AF\",\r\n \"continent\": \"Africa\",\r\n \"maps\": [\"congoDRLow\", \"congoDRHigh\"]\r\n },\r\n \"CF\": {\r\n \"country\": \"Central African Republic\",\r\n \"continent_code\": \"AF\",\r\n \"continent\": \"Africa\",\r\n \"maps\": [\"centralAfricanRepublicLow\", \"centralAfricanRepublicHigh\"]\r\n },\r\n \"CG\": {\r\n \"country\": \"Congo\",\r\n \"continent_code\": \"AF\",\r\n \"continent\": \"Africa\",\r\n \"maps\": [\"congoLow\", \"congoHigh\"]\r\n },\r\n \"CH\": {\r\n \"country\": \"Switzerland\",\r\n \"continent_code\": \"EU\",\r\n \"continent\": \"Europe\",\r\n \"maps\": [\"switzerlandLow\", \"switzerlandHigh\"]\r\n },\r\n \"CI\": {\r\n \"country\": \"Cote d'Ivoire\",\r\n \"continent_code\": \"AF\",\r\n \"continent\": \"Africa\",\r\n \"maps\": [\"cotedIvoireLow\", \"cotedIvoireHigh\"]\r\n },\r\n \"CK\": {\r\n \"country\": \"Cook Islands\",\r\n \"continent_code\": \"OC\",\r\n \"continent\": \"Oceania\",\r\n \"maps\": []\r\n },\r\n \"CL\": {\r\n \"country\": \"Chile\",\r\n \"continent_code\": \"SA\",\r\n \"continent\": \"South America\",\r\n \"maps\": [\"chileLow\", \"chileHigh\"]\r\n },\r\n \"CM\": {\r\n \"country\": \"Cameroon\",\r\n \"continent_code\": \"AF\",\r\n \"continent\": \"Africa\",\r\n \"maps\": [\"cameroonLow\", \"cameroonHigh\"]\r\n },\r\n \"CN\": {\r\n \"country\": \"China\",\r\n \"continent_code\": \"AS\",\r\n \"continent\": \"Asia\",\r\n \"maps\": [\"chinaLow\", \"chinaHigh\"]\r\n },\r\n \"CO\": {\r\n \"country\": \"Colombia\",\r\n \"continent_code\": \"SA\",\r\n \"continent\": \"South America\",\r\n \"maps\": [\"colombiaLow\", \"colombiaHigh\", \"colombiaMuniLow\", \"colombiaMuniHigh\"]\r\n },\r\n \"CR\": {\r\n \"country\": \"Costa Rica\",\r\n \"continent_code\": \"NA\",\r\n \"continent\": \"North America\",\r\n \"maps\": [\"costaRicaLow\", \"costaRicaHigh\"]\r\n },\r\n \"CU\": {\r\n \"country\": \"Cuba\",\r\n \"continent_code\": \"NA\",\r\n \"continent\": \"North America\",\r\n \"maps\": [\"cubaLow\", \"cubaHigh\"]\r\n },\r\n \"CV\": {\r\n \"country\": \"Cape Verde\",\r\n \"continent_code\": \"AF\",\r\n \"continent\": \"Africa\",\r\n \"maps\": [\"capeVerdeLow\", \"capeVerdeHigh\"]\r\n },\r\n \"CW\": {\r\n \"country\": \"Curacao\",\r\n \"continent_code\": \"NA\",\r\n \"continent\": \"North America\",\r\n \"maps\": [\"curacaoLow\", \"curacaoHigh\"]\r\n },\r\n \"CX\": {\r\n \"country\": \"Christmas Island\",\r\n \"continent_code\": \"AS\",\r\n \"continent\": \"Asia\",\r\n \"maps\": []\r\n },\r\n \"CY\": {\r\n \"country\": \"Cyprus\",\r\n \"continent_code\": \"EU\",\r\n \"continent\": \"Europe\",\r\n \"maps\": [\"cyprusLow\", \"cyprusHigh\", \"cyprusNorthCyprusLow\", \"cyprusNorthCyprusHigh\"]\r\n },\r\n \"CZ\": {\r\n \"country\": \"Czech Republic\",\r\n \"continent_code\": \"EU\",\r\n \"continent\": \"Europe\",\r\n \"maps\": [\"czechiaLow\", \"czechiaHigh\"]\r\n },\r\n \"DE\": {\r\n \"country\": \"Germany\",\r\n \"continent_code\": \"EU\",\r\n \"continent\": \"Europe\",\r\n \"maps\": [\"germanyLow\", \"germanyHigh\"]\r\n },\r\n \"DJ\": {\r\n \"country\": \"Djibouti\",\r\n \"continent_code\": \"AF\",\r\n \"continent\": \"Africa\",\r\n \"maps\": [\"djiboutiLow\", \"djiboutiHigh\"]\r\n },\r\n \"DK\": {\r\n \"country\": \"Denmark\",\r\n \"continent_code\": \"EU\",\r\n \"continent\": \"Europe\",\r\n \"maps\": [\"denmarkLow\", \"denmarkHigh\"]\r\n },\r\n \"DM\": {\r\n \"country\": \"Dominica\",\r\n \"continent_code\": \"NA\",\r\n \"continent\": \"North America\",\r\n \"maps\": [\"dominicaLow\", \"dominicaHigh\"]\r\n },\r\n \"DO\": {\r\n \"country\": \"Dominican Republic\",\r\n \"continent_code\": \"NA\",\r\n \"continent\": \"North America\",\r\n \"maps\": [\"dominicanRepublicLow\", \"dominicanRepublicHigh\", \"dominicanRepublicMuniLow\", \"dominicanRepublicMuniHigh\"]\r\n },\r\n \"DZ\": {\r\n \"country\": \"Algeria\",\r\n \"continent_code\": \"AF\",\r\n \"continent\": \"Africa\",\r\n \"maps\": [\"algeriaLow\", \"algeriaHigh\"]\r\n },\r\n \"EC\": {\r\n \"country\": \"Ecuador\",\r\n \"continent_code\": \"SA\",\r\n \"continent\": \"South America\",\r\n \"maps\": [\"ecuadorLow\", \"ecuadorHigh\"]\r\n },\r\n \"EE\": {\r\n \"country\": \"Estonia\",\r\n \"continent_code\": \"EU\",\r\n \"continent\": \"Europe\",\r\n \"maps\": [\"estoniaLow\", \"estoniaHigh\"]\r\n },\r\n \"EG\": {\r\n \"country\": \"Egypt\",\r\n \"continent_code\": \"AF\",\r\n \"continent\": \"Africa\",\r\n \"maps\": [\"egyptLow\", \"egyptHigh\"]\r\n },\r\n \"EH\": {\r\n \"country\": \"Western Sahara\",\r\n \"continent_code\": \"AF\",\r\n \"continent\": \"Africa\",\r\n \"maps\": []\r\n },\r\n \"ER\": {\r\n \"country\": \"Eritrea\",\r\n \"continent_code\": \"AF\",\r\n \"continent\": \"Africa\",\r\n \"maps\": [\"eritreaLow\", \"eritreaHigh\"]\r\n },\r\n \"ES\": {\r\n \"country\": \"Spain\",\r\n \"continent_code\": \"EU\",\r\n \"continent\": \"Europe\",\r\n \"maps\": [\"spainLow\", \"spainHigh\", \"spainProvincesLow\", \"spainProvincesHigh\", \"spainProvinces2Low\", \"spainProvinces2High\"]\r\n },\r\n \"ET\": {\r\n \"country\": \"Ethiopia\",\r\n \"continent_code\": \"AF\",\r\n \"continent\": \"Africa\",\r\n \"maps\": [\"ethiopiaLow\", \"ethiopiaHigh\"]\r\n },\r\n \"FI\": {\r\n \"country\": \"Finland\",\r\n \"continent_code\": \"EU\",\r\n \"continent\": \"Europe\",\r\n \"maps\": [\"finlandLow\", \"finlandHigh\"]\r\n },\r\n \"FJ\": {\r\n \"country\": \"Fiji\",\r\n \"continent_code\": \"OC\",\r\n \"continent\": \"Oceania\",\r\n \"maps\": [\"fijiEastLow\", \"fijiEastHigh\", \"fijiWestLow\", \"fijiWestHigh\"]\r\n },\r\n \"FK\": {\r\n \"country\": \"Falkland Islands (Malvinas)\",\r\n \"continent_code\": \"SA\",\r\n \"continent\": \"South America\",\r\n \"maps\": [\"falklandIslandsLow\", \"falklandIslandsHigh\"]\r\n },\r\n \"FM\": {\r\n \"country\": \"Micronesia, Federated States of\",\r\n \"continent_code\": \"OC\",\r\n \"continent\": \"Oceania\",\r\n \"maps\": []\r\n },\r\n \"FO\": {\r\n \"country\": \"Faroe Islands\",\r\n \"continent_code\": \"EU\",\r\n \"continent\": \"Europe\",\r\n \"maps\": [\"faroeIslandsLow\", \"faroeIslandsHigh\"]\r\n },\r\n \"FR\": {\r\n \"country\": \"France\",\r\n \"continent_code\": \"EU\",\r\n \"continent\": \"Europe\",\r\n \"maps\": [\"franceLow\", \"franceHigh\", \"franceDepartmentsLow\", \"franceDepartmentsHigh\", \"franceDepartments2Low\", \"franceDepartments2High\"]\r\n },\r\n \"GA\": {\r\n \"country\": \"Gabon\",\r\n \"continent_code\": \"AF\",\r\n \"continent\": \"Africa\",\r\n \"maps\": [\"gabonLow\", \"gabonHigh\"]\r\n },\r\n \"GB\": {\r\n \"country\": \"United Kingdom\",\r\n \"continent_code\": \"EU\",\r\n \"continent\": \"Europe\",\r\n \"maps\": [\"ukLow\", \"ukHigh\", \"ukCountiesLow\", \"ukCountiesHigh\", \"ukCountriesLow\", \"ukCountriesHigh\"]\r\n },\r\n \"GB-CHA\": {\r\n \"country\": \"Channel Islands\",\r\n \"continent_code\": \"EU\",\r\n \"continent\": \"Europe\",\r\n \"maps\": [\"channelIslandsLow\", \"channelIslandsHigh\"]\r\n },\r\n \"GD\": {\r\n \"country\": \"Grenada\",\r\n \"continent_code\": \"NA\",\r\n \"continent\": \"North America\",\r\n \"maps\": [\"grenadaLow\", \"grenadaHigh\"]\r\n },\r\n \"GE\": {\r\n \"country\": \"Georgia\",\r\n \"continent_code\": \"EU\",\r\n \"continent\": \"Europe\",\r\n \"maps\": [\"georgiaLow\", \"georgiaHigh\", \"georgiaSouthOssetiaLow\", \"georgiaSouthOssetiaHigh\"]\r\n },\r\n \"GF\": {\r\n \"country\": \"French Guiana\",\r\n \"continent_code\": \"SA\",\r\n \"continent\": \"South America\",\r\n \"maps\": [\"frenchGuianaLow\", \"frenchGuianaHigh\"]\r\n },\r\n \"GG\": {\r\n \"country\": \"Guernsey\",\r\n \"continent_code\": \"EU\",\r\n \"continent\": \"Europe\",\r\n \"maps\": []\r\n },\r\n \"GH\": {\r\n \"country\": \"Ghana\",\r\n \"continent_code\": \"AF\",\r\n \"continent\": \"Africa\",\r\n \"maps\": [\"ghanaLow\", \"ghanaHigh\"]\r\n },\r\n \"GI\": {\r\n \"country\": \"Gibraltar\",\r\n \"continent_code\": \"EU\",\r\n \"continent\": \"Europe\",\r\n \"maps\": []\r\n },\r\n \"GL\": {\r\n \"country\": \"Greenland\",\r\n \"continent_code\": \"NA\",\r\n \"continent\": \"North America\",\r\n \"maps\": [\"greenlandLow\", \"greenlandHigh\"]\r\n },\r\n \"GM\": {\r\n \"country\": \"Gambia\",\r\n \"continent_code\": \"AF\",\r\n \"continent\": \"Africa\",\r\n \"maps\": [\"gambiaLow\", \"gambiaHigh\"]\r\n },\r\n \"GN\": {\r\n \"country\": \"Guinea\",\r\n \"continent_code\": \"AF\",\r\n \"continent\": \"Africa\",\r\n \"maps\": [\"guineaLow\", \"guineaHigh\"]\r\n },\r\n \"GP\": {\r\n \"country\": \"Guadeloupe\",\r\n \"continent_code\": \"NA\",\r\n \"continent\": \"North America\",\r\n \"maps\": [\"guadeloupeLow\", \"guadeloupeHigh\"]\r\n },\r\n \"GQ\": {\r\n \"country\": \"Equatorial Guinea\",\r\n \"continent_code\": \"AF\",\r\n \"continent\": \"Africa\",\r\n \"maps\": [\"equatorialGuineaLow\", \"equatorialGuineaHigh\"]\r\n },\r\n \"GR\": {\r\n \"country\": \"Greece\",\r\n \"continent_code\": \"EU\",\r\n \"continent\": \"Europe\",\r\n \"maps\": [\"greeceLow\", \"greeceHigh\"]\r\n },\r\n \"GS\": {\r\n \"country\": \"South Georgia and the South Sandwich Islands\",\r\n \"continent_code\": \"AN\",\r\n \"continent\": \"Antarctica\",\r\n \"maps\": []\r\n },\r\n \"GT\": {\r\n \"country\": \"Guatemala\",\r\n \"continent_code\": \"NA\",\r\n \"continent\": \"North America\",\r\n \"maps\": [\"guatemalaLow\", \"guatemalaHigh\"]\r\n },\r\n \"GU\": {\r\n \"country\": \"Guam\",\r\n \"continent_code\": \"OC\",\r\n \"continent\": \"Oceania\",\r\n \"maps\": [\"guamLow\", \"guamHigh\"]\r\n },\r\n \"GW\": {\r\n \"country\": \"Guinea-Bissau\",\r\n \"continent_code\": \"AF\",\r\n \"continent\": \"Africa\",\r\n \"maps\": [\"guineaBissauLow\", \"guineaBissauHigh\"]\r\n },\r\n \"GY\": {\r\n \"country\": \"Guyana\",\r\n \"continent_code\": \"SA\",\r\n \"continent\": \"South America\",\r\n \"maps\": [\"guyanaLow\", \"guyanaHigh\"]\r\n },\r\n \"HK\": {\r\n \"country\": \"Hong Kong\",\r\n \"continent_code\": \"AS\",\r\n \"continent\": \"Asia\",\r\n \"maps\": [\"hongKongLow\", \"hongKongHigh\"]\r\n },\r\n \"HM\": {\r\n \"country\": \"Heard Island and McDonald Islands\",\r\n \"continent_code\": \"AN\",\r\n \"continent\": \"Antarctica\",\r\n \"maps\": []\r\n },\r\n \"HN\": {\r\n \"country\": \"Honduras\",\r\n \"continent_code\": \"NA\",\r\n \"continent\": \"North America\",\r\n \"maps\": [\"hondurasLow\", \"hondurasHigh\"]\r\n },\r\n \"HR\": {\r\n \"country\": \"Croatia\",\r\n \"continent_code\": \"EU\",\r\n \"continent\": \"Europe\",\r\n \"maps\": [\"croatiaLow\", \"croatiaHigh\"]\r\n },\r\n \"HT\": {\r\n \"country\": \"Haiti\",\r\n \"continent_code\": \"NA\",\r\n \"continent\": \"North America\",\r\n \"maps\": [\"haitiLow\", \"haitiHigh\"]\r\n },\r\n \"HU\": {\r\n \"country\": \"Hungary\",\r\n \"continent_code\": \"EU\",\r\n \"continent\": \"Europe\",\r\n \"maps\": [\"hungaryLow\", \"hungaryHigh\"]\r\n },\r\n \"ID\": {\r\n \"country\": \"Indonesia\",\r\n \"continent_code\": \"AS\",\r\n \"continent\": \"Asia\",\r\n \"maps\": [\"indonesiaLow\", \"indonesiaHigh\"]\r\n },\r\n \"IE\": {\r\n \"country\": \"Ireland\",\r\n \"continent_code\": \"EU\",\r\n \"continent\": \"Europe\",\r\n \"maps\": [\"irelandLow\", \"irelandHigh\"]\r\n },\r\n \"IL\": {\r\n \"country\": \"Israel\",\r\n \"continent_code\": \"AS\",\r\n \"continent\": \"Asia\",\r\n \"maps\": [\"israelLow\", \"israelHigh\", \"israelPalestineLow\", \"israelPalestineHigh\"]\r\n },\r\n \"IM\": {\r\n \"country\": \"Isle of Man\",\r\n \"continent_code\": \"EU\",\r\n \"continent\": \"Europe\",\r\n \"maps\": []\r\n },\r\n \"IN\": {\r\n \"country\": \"India\",\r\n \"continent_code\": \"AS\",\r\n \"continent\": \"Asia\",\r\n \"maps\": [\"india2020Low\", \"india2020High\", \"india2019Low\", \"india2019High\", \"indiaLow\", \"indiaHigh\"]\r\n },\r\n \"IO\": {\r\n \"country\": \"British Indian Ocean Territory\",\r\n \"continent_code\": \"AS\",\r\n \"continent\": \"Asia\",\r\n \"maps\": [\"britishIndianOceanTerritoryLow\", \"britishIndianOceanTerritoryHigh\"]\r\n },\r\n \"IQ\": {\r\n \"country\": \"Iraq\",\r\n \"continent_code\": \"AS\",\r\n \"continent\": \"Asia\",\r\n \"maps\": [\"iraqLow\", \"iraqHigh\"]\r\n },\r\n \"IR\": {\r\n \"country\": \"Iran, Islamic Republic of\",\r\n \"continent_code\": \"AS\",\r\n \"continent\": \"Asia\",\r\n \"maps\": [\"iranLow\", \"iranHigh\"]\r\n },\r\n \"IS\": {\r\n \"country\": \"Iceland\",\r\n \"continent_code\": \"EU\",\r\n \"continent\": \"Europe\",\r\n \"maps\": [\"icelandLow\", \"icelandHigh\"]\r\n },\r\n \"IT\": {\r\n \"country\": \"Italy\",\r\n \"continent_code\": \"EU\",\r\n \"continent\": \"Europe\",\r\n \"maps\": [\"italyLow\", \"italyHigh\", \"italyProvincesLow\", \"italyProvincesHigh\"]\r\n },\r\n \"JE\": {\r\n \"country\": \"Jersey\",\r\n \"continent_code\": \"EU\",\r\n \"continent\": \"Europe\",\r\n \"maps\": [\"channelIslandsLow\", \"channelIslandsHigh\"]\r\n },\r\n \"JM\": {\r\n \"country\": \"Jamaica\",\r\n \"continent_code\": \"NA\",\r\n \"continent\": \"North America\",\r\n \"maps\": [\"jamaicaLow\", \"jamaicaHigh\"]\r\n },\r\n \"JO\": {\r\n \"country\": \"Jordan\",\r\n \"continent_code\": \"AS\",\r\n \"continent\": \"Asia\",\r\n \"maps\": [\"jordanLow\", \"jordanHigh\"]\r\n },\r\n \"JP\": {\r\n \"country\": \"Japan\",\r\n \"continent_code\": \"AS\",\r\n \"continent\": \"Asia\",\r\n \"maps\": [\"japanLow\", \"japanHigh\"]\r\n },\r\n \"KE\": {\r\n \"country\": \"Kenya\",\r\n \"continent_code\": \"AF\",\r\n \"continent\": \"Africa\",\r\n \"maps\": [\"kenyaLow\", \"kenyaHigh\"]\r\n },\r\n \"KG\": {\r\n \"country\": \"Kyrgyzstan\",\r\n \"continent_code\": \"AS\",\r\n \"continent\": \"Asia\",\r\n \"maps\": [\"kyrgyzstanLow\", \"kyrgyzstanHigh\"]\r\n },\r\n \"KH\": {\r\n \"country\": \"Cambodia\",\r\n \"continent_code\": \"AS\",\r\n \"continent\": \"Asia\",\r\n \"maps\": [\"cambodiaLow\", \"cambodiaHigh\"]\r\n },\r\n \"KI\": {\r\n \"country\": \"Kiribati\",\r\n \"continent_code\": \"OC\",\r\n \"continent\": \"Oceania\",\r\n \"maps\": []\r\n },\r\n \"KM\": {\r\n \"country\": \"Comoros\",\r\n \"continent_code\": \"AF\",\r\n \"continent\": \"Africa\",\r\n \"maps\": [\"comorosLow\", \"comorosHigh\"]\r\n },\r\n \"KP\": {\r\n \"country\": \"Korea, Democratic People's Republic of\",\r\n \"continent_code\": \"AS\",\r\n \"continent\": \"Asia\",\r\n \"maps\": [\"northKoreaLow\", \"northKoreaHigh\"]\r\n },\r\n \"KR\": {\r\n \"country\": \"Korea, Republic of\",\r\n \"continent_code\": \"AS\",\r\n \"continent\": \"Asia\",\r\n \"maps\": [\"southKoreaLow\", \"southKoreaHigh\"]\r\n },\r\n \"KN\": {\r\n \"country\": \"Saint Kitts and Nevis\",\r\n \"continent_code\": \"NA\",\r\n \"continent\": \"North America\",\r\n \"maps\": [\"stKittsNevisLow\", \"stKittsNevisHigh\"]\r\n },\r\n \"KW\": {\r\n \"country\": \"Kuwait\",\r\n \"continent_code\": \"AS\",\r\n \"continent\": \"Asia\",\r\n \"maps\": [\"kuwaitLow\", \"kuwaitHigh\"]\r\n },\r\n \"KY\": {\r\n \"country\": \"Cayman Islands\",\r\n \"continent_code\": \"NA\",\r\n \"continent\": \"North America\",\r\n \"maps\": [\"caymanIslandsLow\", \"caymanIslandsHigh\"]\r\n },\r\n \"KZ\": {\r\n \"country\": \"Kazakhstan\",\r\n \"continent_code\": \"EU\",\r\n \"continent\": \"Europe\",\r\n \"maps\": [\"kazakhstan2023Low\", \"kazakhstan2023High\", \"kazakhstanLow\", \"kazakhstanHigh\"]\r\n },\r\n \"LA\": {\r\n \"country\": \"Lao People's Democratic Republic\",\r\n \"continent_code\": \"AS\",\r\n \"continent\": \"Asia\",\r\n \"maps\": [\"laosLow\", \"laosHigh\"]\r\n },\r\n \"LB\": {\r\n \"country\": \"Lebanon\",\r\n \"continent_code\": \"AS\",\r\n \"continent\": \"Asia\",\r\n \"maps\": [\"lebanonLow\", \"lebanonHigh\"]\r\n },\r\n \"LC\": {\r\n \"country\": \"Saint Lucia\",\r\n \"continent_code\": \"NA\",\r\n \"continent\": \"North America\",\r\n \"maps\": [\"saintLuciaLow\", \"saintLuciaHigh\"]\r\n },\r\n \"LI\": {\r\n \"country\": \"Liechtenstein\",\r\n \"continent_code\": \"EU\",\r\n \"continent\": \"Europe\",\r\n \"maps\": [\"liechtensteinLow\", \"liechtensteinHigh\"]\r\n },\r\n \"LK\": {\r\n \"country\": \"Sri Lanka\",\r\n \"continent_code\": \"AS\",\r\n \"continent\": \"Asia\",\r\n \"maps\": [\"sriLankaLow\", \"sriLankaHigh\"]\r\n },\r\n \"LR\": {\r\n \"country\": \"Liberia\",\r\n \"continent_code\": \"AF\",\r\n \"continent\": \"Africa\",\r\n \"maps\": [\"liberiaLow\", \"liberiaHigh\"]\r\n },\r\n \"LS\": {\r\n \"country\": \"Lesotho\",\r\n \"continent_code\": \"AF\",\r\n \"continent\": \"Africa\",\r\n \"maps\": [\"lesothoLow\", \"lesothoHigh\"]\r\n },\r\n \"LT\": {\r\n \"country\": \"Lithuania\",\r\n \"continent_code\": \"EU\",\r\n \"continent\": \"Europe\",\r\n \"maps\": [\"lithuaniaLow\", \"lithuaniaHigh\"]\r\n },\r\n \"LU\": {\r\n \"country\": \"Luxembourg\",\r\n \"continent_code\": \"EU\",\r\n \"continent\": \"Europe\",\r\n \"maps\": [\"luxembourgLow\", \"luxembourgHigh\"]\r\n },\r\n \"LV\": {\r\n \"country\": \"Latvia\",\r\n \"continent_code\": \"EU\",\r\n \"continent\": \"Europe\",\r\n \"maps\": [\"latvia2021Low\", \"latvia2021High\", \"latviaLow\", \"latviaHigh\"]\r\n },\r\n \"LY\": {\r\n \"country\": \"Libya\",\r\n \"continent_code\": \"AF\",\r\n \"continent\": \"Africa\",\r\n \"maps\": [\"libyaLow\", \"libyaHigh\"]\r\n },\r\n \"MA\": {\r\n \"country\": \"Morocco\",\r\n \"continent_code\": \"AF\",\r\n \"continent\": \"Africa\",\r\n \"maps\": [\"moroccoLow\", \"moroccoHigh\"]\r\n },\r\n \"MC\": {\r\n \"country\": \"Monaco\",\r\n \"continent_code\": \"EU\",\r\n \"continent\": \"Europe\",\r\n \"maps\": []\r\n },\r\n \"MD\": {\r\n \"country\": \"Moldova, Republic of\",\r\n \"continent_code\": \"EU\",\r\n \"continent\": \"Europe\",\r\n \"maps\": [\"moldovaLow\", \"moldovaHigh\"]\r\n },\r\n \"ME\": {\r\n \"country\": \"Montenegro\",\r\n \"continent_code\": \"EU\",\r\n \"continent\": \"Europe\",\r\n \"maps\": [\"montenegroLow\", \"montenegroHigh\"]\r\n },\r\n \"MF\": {\r\n \"country\": \"Saint Martin (French Part)\",\r\n \"continent_code\": \"NA\",\r\n \"continent\": \"North America\",\r\n \"maps\": []\r\n },\r\n \"MG\": {\r\n \"country\": \"Madagascar\",\r\n \"continent_code\": \"AF\",\r\n \"continent\": \"Africa\",\r\n \"maps\": [\"madagascarProvinceLow\", \"madagascarProvinceHigh\", \"madagascarRegionLow\", \"madagascarRegionHigh\"]\r\n },\r\n \"MH\": {\r\n \"country\": \"Marshall Islands\",\r\n \"continent_code\": \"OC\",\r\n \"continent\": \"Oceania\",\r\n \"maps\": []\r\n },\r\n \"MK\": {\r\n \"country\": \"North Macedonia\",\r\n \"continent_code\": \"EU\",\r\n \"continent\": \"Europe\",\r\n \"maps\": [\"northMacedoniaLow\", \"northMacedoniaHigh\"]\r\n },\r\n \"ML\": {\r\n \"country\": \"Mali\",\r\n \"continent_code\": \"AF\",\r\n \"continent\": \"Africa\",\r\n \"maps\": [\"maliLow\", \"maliHigh\"]\r\n },\r\n \"MM\": {\r\n \"country\": \"Myanmar\",\r\n \"continent_code\": \"AS\",\r\n \"continent\": \"Asia\",\r\n \"maps\": [\"myanmarLow\", \"myanmarHigh\"]\r\n },\r\n \"MN\": {\r\n \"country\": \"Mongolia\",\r\n \"continent_code\": \"AS\",\r\n \"continent\": \"Asia\",\r\n \"maps\": [\"mongoliaLow\", \"mongoliaHigh\"]\r\n },\r\n \"MO\": {\r\n \"country\": \"Macao\",\r\n \"continent_code\": \"AS\",\r\n \"continent\": \"Asia\",\r\n \"maps\": []\r\n },\r\n \"MP\": {\r\n \"country\": \"Northern Mariana Islands\",\r\n \"continent_code\": \"OC\",\r\n \"continent\": \"Oceania\",\r\n \"maps\": [\"northernMarianaLow\", \"northernMarianaHigh\"]\r\n },\r\n \"MQ\": {\r\n \"country\": \"Martinique\",\r\n \"continent_code\": \"NA\",\r\n \"continent\": \"North America\",\r\n \"maps\": [\"martiniqueLow\", \"martiniqueHigh\"]\r\n },\r\n \"MR\": {\r\n \"country\": \"Mauritania\",\r\n \"continent_code\": \"AF\",\r\n \"continent\": \"Africa\",\r\n \"maps\": [\"mauritaniaLow\", \"mauritaniaHigh\"]\r\n },\r\n \"MS\": {\r\n \"country\": \"Montserrat\",\r\n \"continent_code\": \"NA\",\r\n \"continent\": \"North America\",\r\n \"maps\": [\"montserratLow\", \"montserratHigh\"]\r\n },\r\n \"MT\": {\r\n \"country\": \"Malta\",\r\n \"continent_code\": \"EU\",\r\n \"continent\": \"Europe\",\r\n \"maps\": [\"maltaLow\", \"maltaHigh\"]\r\n },\r\n \"MU\": {\r\n \"country\": \"Mauritius\",\r\n \"continent_code\": \"AF\",\r\n \"continent\": \"Africa\",\r\n \"maps\": [\"mauritiusLow\", \"mauritiusHigh\"]\r\n },\r\n \"MV\": {\r\n \"country\": \"Maldives\",\r\n \"continent_code\": \"AS\",\r\n \"continent\": \"Asia\",\r\n \"maps\": [\"maldivesLow\", \"maldivesHigh\", \"maldivesIslandsLow\", \"maldivesIslandsHigh\"]\r\n },\r\n \"MW\": {\r\n \"country\": \"Malawi\",\r\n \"continent_code\": \"AF\",\r\n \"continent\": \"Africa\",\r\n \"maps\": [\"malawiLow\", \"malawiHigh\"]\r\n },\r\n \"MX\": {\r\n \"country\": \"Mexico\",\r\n \"continent_code\": \"NA\",\r\n \"continent\": \"North America\",\r\n \"maps\": [\"mexicoLow\", \"mexicoHigh\"]\r\n },\r\n \"MY\": {\r\n \"country\": \"Malaysia\",\r\n \"continent_code\": \"AS\",\r\n \"continent\": \"Asia\",\r\n \"maps\": [\"malaysiaLow\", \"malaysiaHigh\"]\r\n },\r\n \"MZ\": {\r\n \"country\": \"Mozambique\",\r\n \"continent_code\": \"AF\",\r\n \"continent\": \"Africa\",\r\n \"maps\": [\"mozambiqueLow\", \"mozambiqueHigh\"]\r\n },\r\n \"NA\": {\r\n \"country\": \"Namibia\",\r\n \"continent_code\": \"AF\",\r\n \"continent\": \"Africa\",\r\n \"maps\": [\"namibiaLow\", \"namibiaHigh\"]\r\n },\r\n \"NC\": {\r\n \"country\": \"New Caledonia\",\r\n \"continent_code\": \"OC\",\r\n \"continent\": \"Oceania\",\r\n \"maps\": []\r\n },\r\n \"NE\": {\r\n \"country\": \"Niger\",\r\n \"continent_code\": \"AF\",\r\n \"continent\": \"Africa\",\r\n \"maps\": [\"nigerLow\", \"nigerHigh\"]\r\n },\r\n \"NF\": {\r\n \"country\": \"Norfolk Island\",\r\n \"continent_code\": \"OC\",\r\n \"continent\": \"Oceania\",\r\n \"maps\": []\r\n },\r\n \"NG\": {\r\n \"country\": \"Nigeria\",\r\n \"continent_code\": \"AF\",\r\n \"continent\": \"Africa\",\r\n \"maps\": [\"nigeriaLow\", \"nigeriaHigh\"]\r\n },\r\n \"NI\": {\r\n \"country\": \"Nicaragua\",\r\n \"continent_code\": \"NA\",\r\n \"continent\": \"North America\",\r\n \"maps\": [\"nicaraguaLow\", \"nicaraguaHigh\"]\r\n },\r\n \"NL\": {\r\n \"country\": \"Netherlands\",\r\n \"continent_code\": \"EU\",\r\n \"continent\": \"Europe\",\r\n \"maps\": [\"netherlandsLow\", \"netherlandsHigh\"]\r\n },\r\n \"NO\": {\r\n \"country\": \"Norway\",\r\n \"continent_code\": \"EU\",\r\n \"continent\": \"Europe\",\r\n \"maps\": [\"norway2020Low\", \"norway2020High\", \"norwayLow\", \"norwayHigh\"]\r\n },\r\n \"NP\": {\r\n \"country\": \"Nepal\",\r\n \"continent_code\": \"AS\",\r\n \"continent\": \"Asia\",\r\n \"maps\": [\"nepal2020Low\", \"nepal2020High\", \"nepalLow\", \"nepalHigh\"]\r\n },\r\n \"NR\": {\r\n \"country\": \"Nauru\",\r\n \"continent_code\": \"OC\",\r\n \"continent\": \"Oceania\",\r\n \"maps\": []\r\n },\r\n \"NU\": {\r\n \"country\": \"Niue\",\r\n \"continent_code\": \"OC\",\r\n \"continent\": \"Oceania\",\r\n \"maps\": []\r\n },\r\n \"NZ\": {\r\n \"country\": \"New Zealand\",\r\n \"continent_code\": \"OC\",\r\n \"continent\": \"Oceania\",\r\n \"maps\": [\"newZealandLow\", \"newZealandHigh\"]\r\n },\r\n \"OM\": {\r\n \"country\": \"Oman\",\r\n \"continent_code\": \"AS\",\r\n \"continent\": \"Asia\",\r\n \"maps\": [\"omanLow\", \"omanHigh\"]\r\n },\r\n \"PA\": {\r\n \"country\": \"Panama\",\r\n \"continent_code\": \"NA\",\r\n \"continent\": \"North America\",\r\n \"maps\": [\"panamaLow\", \"panamaHigh\"]\r\n },\r\n \"PE\": {\r\n \"country\": \"Peru\",\r\n \"continent_code\": \"SA\",\r\n \"continent\": \"South America\",\r\n \"maps\": [\"peruLow\", \"peruHigh\"]\r\n },\r\n \"PF\": {\r\n \"country\": \"French Polynesia\",\r\n \"continent_code\": \"OC\",\r\n \"continent\": \"Oceania\",\r\n \"maps\": []\r\n },\r\n \"PG\": {\r\n \"country\": \"Papua New Guinea\",\r\n \"continent_code\": \"OC\",\r\n \"continent\": \"Oceania\",\r\n \"maps\": []\r\n },\r\n \"PH\": {\r\n \"country\": \"Philippines\",\r\n \"continent_code\": \"AS\",\r\n \"continent\": \"Asia\",\r\n \"maps\": [\"philippinesLow\", \"philippinesHigh\"]\r\n },\r\n \"PK\": {\r\n \"country\": \"Pakistan\",\r\n \"continent_code\": \"AS\",\r\n \"continent\": \"Asia\",\r\n \"maps\": [\"pakistanLow\", \"pakistanHigh\"]\r\n },\r\n \"PL\": {\r\n \"country\": \"Poland\",\r\n \"continent_code\": \"EU\",\r\n \"continent\": \"Europe\",\r\n \"maps\": [\"polandLow\", \"polandHigh\"]\r\n },\r\n \"PM\": {\r\n \"country\": \"Saint Pierre and Miquelon\",\r\n \"continent_code\": \"NA\",\r\n \"continent\": \"North America\",\r\n \"maps\": [\"stPierreMiquelonLow\", \"stPierreMiquelonHigh\"]\r\n },\r\n \"PN\": {\r\n \"country\": \"Pitcairn\",\r\n \"continent_code\": \"OC\",\r\n \"continent\": \"Oceania\",\r\n \"maps\": []\r\n },\r\n \"PR\": {\r\n \"country\": \"Puerto Rico\",\r\n \"continent_code\": \"NA\",\r\n \"continent\": \"North America\",\r\n \"maps\": [\"puertoRicoLow\", \"puertoRicoHigh\"]\r\n },\r\n \"PS\": {\r\n \"country\": \"Palestinian, State of\",\r\n \"continent_code\": \"AS\",\r\n \"continent\": \"Asia\",\r\n \"maps\": [\"palestineLow\", \"palestineHigh\"]\r\n },\r\n \"PT\": {\r\n \"country\": \"Portugal\",\r\n \"continent_code\": \"EU\",\r\n \"continent\": \"Europe\",\r\n \"maps\": [\"portugalLow\", \"portugalHigh\", \"portugalRegionsLow\", \"portugalRegionsHigh\"]\r\n },\r\n \"PW\": {\r\n \"country\": \"Palau\",\r\n \"continent_code\": \"OC\",\r\n \"continent\": \"Oceania\",\r\n \"maps\": []\r\n },\r\n \"PY\": {\r\n \"country\": \"Paraguay\",\r\n \"continent_code\": \"SA\",\r\n \"continent\": \"South America\",\r\n \"maps\": [\"paraguayLow\", \"paraguayHigh\"]\r\n },\r\n \"QA\": {\r\n \"country\": \"Qatar\",\r\n \"continent_code\": \"AS\",\r\n \"continent\": \"Asia\",\r\n \"maps\": [\"qatarLow\", \"qatarHigh\"]\r\n },\r\n \"RE\": {\r\n \"country\": \"Reunion\",\r\n \"continent_code\": \"AF\",\r\n \"continent\": \"Africa\",\r\n \"maps\": []\r\n },\r\n \"RO\": {\r\n \"country\": \"Romania\",\r\n \"continent_code\": \"EU\",\r\n \"continent\": \"Europe\",\r\n \"maps\": [\"romaniaLow\", \"romaniaHigh\"]\r\n },\r\n \"RS\": {\r\n \"country\": \"Serbia\",\r\n \"continent_code\": \"EU\",\r\n \"continent\": \"Europe\",\r\n \"maps\": [\"serbiaLow\", \"serbiaHigh\", \"serbiaNoKosovoLow\", \"serbiaNoKosovoHigh\"]\r\n },\r\n \"RU\": {\r\n \"country\": \"Russian Federation\",\r\n \"continent_code\": \"EU\",\r\n \"continent\": \"Europe\",\r\n \"maps\": [\"russiaLow\", \"russiaHigh\", \"russiaCrimeaLow\", \"russiaCrimeaHigh\"]\r\n },\r\n \"RW\": {\r\n \"country\": \"Rwanda\",\r\n \"continent_code\": \"AF\",\r\n \"continent\": \"Africa\",\r\n \"maps\": [\"rwandaLow\", \"rwandaHigh\"]\r\n },\r\n \"SA\": {\r\n \"country\": \"Saudi Arabia\",\r\n \"continent_code\": \"AS\",\r\n \"continent\": \"Asia\",\r\n \"maps\": [\"saudiArabiaLow\", \"saudiArabiaHigh\"]\r\n },\r\n \"SB\": {\r\n \"country\": \"Solomon Islands\",\r\n \"continent_code\": \"OC\",\r\n \"continent\": \"Oceania\",\r\n \"maps\": [\"solomonIslandsLow\", \"solomonIslandsHigh\"]\r\n },\r\n \"SC\": {\r\n \"country\": \"Seychelles\",\r\n \"continent_code\": \"AF\",\r\n \"continent\": \"Africa\",\r\n \"maps\": [\"seychellesLow\", \"seychellesHigh\"]\r\n },\r\n \"SD\": {\r\n \"country\": \"Sudan\",\r\n \"continent_code\": \"AF\",\r\n \"continent\": \"Africa\",\r\n \"maps\": [\"sudanLow\", \"sudanHigh\"]\r\n },\r\n \"SE\": {\r\n \"country\": \"Sweden\",\r\n \"continent_code\": \"EU\",\r\n \"continent\": \"Europe\",\r\n \"maps\": [\"swedenLow\", \"swedenHigh\"]\r\n },\r\n \"SG\": {\r\n \"country\": \"Singapore\",\r\n \"continent_code\": \"AS\",\r\n \"continent\": \"Asia\",\r\n \"maps\": [\"singaporeLow\", \"singaporeHigh\"]\r\n },\r\n \"SH\": {\r\n \"country\": \"Saint Helena, Ascension and Tristan da Cunha\",\r\n \"continent_code\": \"AF\",\r\n \"continent\": \"Africa\",\r\n \"maps\": [\"saintHelenaLow\", \"saintHelenaHigh\"]\r\n },\r\n \"SI\": {\r\n \"country\": \"Slovenia\",\r\n \"continent_code\": \"EU\",\r\n \"continent\": \"Europe\",\r\n \"maps\": [\"sloveniaLow\", \"sloveniaHigh\", \"sloveniaRegionsLow\", \"sloveniaRegionsHigh\"]\r\n },\r\n \"SJ\": {\r\n \"country\": \"Svalbard and Jan Mayen\",\r\n \"continent_code\": \"EU\",\r\n \"continent\": \"Europe\",\r\n \"maps\": [\"svalbardLow\", \"svalbardHigh\"]\r\n },\r\n \"SK\": {\r\n \"country\": \"Slovakia\",\r\n \"continent_code\": \"EU\",\r\n \"continent\": \"Europe\",\r\n \"maps\": [\"slovakiaLow\", \"slovakiaHigh\"]\r\n },\r\n \"SL\": {\r\n \"country\": \"Sierra Leone\",\r\n \"continent_code\": \"AF\",\r\n \"continent\": \"Africa\",\r\n \"maps\": [\"sierraLeoneLow\", \"sierraLeoneHigh\"]\r\n },\r\n \"SM\": {\r\n \"country\": \"San Marino\",\r\n \"continent_code\": \"EU\",\r\n \"continent\": \"Europe\",\r\n \"maps\": [\"sanMarinoLow\", \"sanMarinoHigh\"]\r\n },\r\n \"SN\": {\r\n \"country\": \"Senegal\",\r\n \"continent_code\": \"AF\",\r\n \"continent\": \"Africa\",\r\n \"maps\": [\"senegalLow\", \"senegalHigh\"]\r\n },\r\n \"SO\": {\r\n \"country\": \"Somalia\",\r\n \"continent_code\": \"AF\",\r\n \"continent\": \"Africa\",\r\n \"maps\": [\"somaliaLow\", \"somaliaHigh\"]\r\n },\r\n \"SR\": {\r\n \"country\": \"Suriname\",\r\n \"continent_code\": \"SA\",\r\n \"continent\": \"South America\",\r\n \"maps\": [\"surinameLow\", \"surinameHigh\"]\r\n },\r\n \"SS\": {\r\n \"country\": \"South Sudan\",\r\n \"continent_code\": \"AF\",\r\n \"continent\": \"Africa\",\r\n \"maps\": [\"southSudanLow\", \"southSudanHigh\", \"southSudan2015Low\", \"southSudan2015High\"]\r\n },\r\n \"ST\": {\r\n \"country\": \"Sao Tome and Principe\",\r\n \"continent_code\": \"AF\",\r\n \"continent\": \"Africa\",\r\n \"maps\": [\"saoTomePrincipeLow\", \"saoTomePrincipeHigh\"]\r\n },\r\n \"SV\": {\r\n \"country\": \"El Salvador\",\r\n \"continent_code\": \"NA\",\r\n \"continent\": \"North America\",\r\n \"maps\": [\"elSalvadorLow\", \"elSalvadorHigh\"]\r\n },\r\n \"SX\": {\r\n \"country\": \"Sint Maarten (Dutch Part)\",\r\n \"continent_code\": \"NA\",\r\n \"continent\": \"North America\",\r\n \"maps\": []\r\n },\r\n \"SY\": {\r\n \"country\": \"Syrian Arab Republic\",\r\n \"continent_code\": \"AS\",\r\n \"continent\": \"Asia\",\r\n \"maps\": [\"syriaLow\", \"syriaHigh\"]\r\n },\r\n \"SZ\": {\r\n \"country\": \"Swaziland\",\r\n \"continent_code\": \"AF\",\r\n \"continent\": \"Africa\",\r\n \"maps\": [\"eswatiniLow\", \"eswatiniHigh\"]\r\n },\r\n \"TC\": {\r\n \"country\": \"Turks and Caicos Islands\",\r\n \"continent_code\": \"NA\",\r\n \"continent\": \"North America\",\r\n \"maps\": []\r\n },\r\n \"TD\": {\r\n \"country\": \"Chad\",\r\n \"continent_code\": \"AF\",\r\n \"continent\": \"Africa\",\r\n \"maps\": [\"chadLow\", \"chadHigh\"]\r\n },\r\n \"TF\": {\r\n \"country\": \"French Southern Territories\",\r\n \"continent_code\": \"AN\",\r\n \"continent\": \"Antarctica\",\r\n \"maps\": []\r\n },\r\n \"TG\": {\r\n \"country\": \"Togo\",\r\n \"continent_code\": \"AF\",\r\n \"continent\": \"Africa\",\r\n \"maps\": [\"togoLow\", \"togoHigh\"]\r\n },\r\n \"TH\": {\r\n \"country\": \"Thailand\",\r\n \"continent_code\": \"AS\",\r\n \"continent\": \"Asia\",\r\n \"maps\": [\"thailandLow\", \"thailandHigh\"]\r\n },\r\n \"TJ\": {\r\n \"country\": \"Tajikistan\",\r\n \"continent_code\": \"AS\",\r\n \"continent\": \"Asia\",\r\n \"maps\": [\"tajikistanLow\", \"tajikistanHigh\"]\r\n },\r\n \"TK\": {\r\n \"country\": \"Tokelau\",\r\n \"continent_code\": \"OC\",\r\n \"continent\": \"Oceania\",\r\n \"maps\": []\r\n },\r\n \"TL\": {\r\n \"country\": \"Timor-Leste\",\r\n \"continent_code\": \"AS\",\r\n \"continent\": \"Asia\",\r\n \"maps\": [\"timorLesteLow\", \"timorLesteHigh\"]\r\n },\r\n \"TM\": {\r\n \"country\": \"Turkmenistan\",\r\n \"continent_code\": \"AS\",\r\n \"continent\": \"Asia\",\r\n \"maps\": [\"turkmenistanLow\", \"turkmenistanHigh\"]\r\n },\r\n \"TN\": {\r\n \"country\": \"Tunisia\",\r\n \"continent_code\": \"AF\",\r\n \"continent\": \"Africa\",\r\n \"maps\": [\"tunisiaLow\", \"tunisiaHigh\"]\r\n },\r\n \"TO\": {\r\n \"country\": \"Tonga\",\r\n \"continent_code\": \"OC\",\r\n \"continent\": \"Oceania\",\r\n \"maps\": []\r\n },\r\n \"TR\": {\r\n \"country\": \"Türkiye\",\r\n \"continent_code\": \"EU\",\r\n \"continent\": \"Europe\",\r\n \"maps\": [\"turkeyLow\", \"turkeyHigh\"]\r\n },\r\n \"TT\": {\r\n \"country\": \"Trinidad and Tobago\",\r\n \"continent_code\": \"NA\",\r\n \"continent\": \"North America\",\r\n \"maps\": [\"trinidadTobagoLow\", \"trinidadTobagoHigh\"]\r\n },\r\n \"TV\": {\r\n \"country\": \"Tuvalu\",\r\n \"continent_code\": \"OC\",\r\n \"continent\": \"Oceania\",\r\n \"maps\": []\r\n },\r\n \"TW\": {\r\n \"country\": \"Taiwan\",\r\n \"continent_code\": \"AS\",\r\n \"continent\": \"Asia\",\r\n \"maps\": [\"taiwanLow\", \"taiwanHigh\"]\r\n },\r\n \"TZ\": {\r\n \"country\": \"Tanzania, United Republic of\",\r\n \"continent_code\": \"AF\",\r\n \"continent\": \"Africa\",\r\n \"maps\": [\"tanzaniaLow\", \"tanzaniaHigh\"]\r\n },\r\n \"UA\": {\r\n \"country\": \"Ukraine\",\r\n \"continent_code\": \"EU\",\r\n \"continent\": \"Europe\",\r\n \"maps\": [\"ukraineLow\", \"ukraineHigh\"]\r\n },\r\n \"UG\": {\r\n \"country\": \"Uganda\",\r\n \"continent_code\": \"AF\",\r\n \"continent\": \"Africa\",\r\n \"maps\": [\"ugandaLow\", \"ugandaHigh\", \"ugandaRegionsLow\", \"ugandaRegionsHigh\"]\r\n },\r\n \"UM\": {\r\n \"country\": \"United States Minor Outlying Islands\",\r\n \"continent_code\": \"OC\",\r\n \"continent\": \"Oceania\",\r\n \"maps\": []\r\n },\r\n \"US\": {\r\n \"country\": \"United States\",\r\n \"continent_code\": \"NA\",\r\n \"continent\": \"North America\",\r\n \"maps\": [\"usaLow\", \"usaHigh\", \"usaTerritoriesLow\", \"usaTerritoriesHigh\", \"usaTerritories2Low\", \"usaTerritories2High\"]\r\n },\r\n \"UY\": {\r\n \"country\": \"Uruguay\",\r\n \"continent_code\": \"SA\",\r\n \"continent\": \"South America\",\r\n \"maps\": [\"uruguayLow\", \"uruguayHigh\"]\r\n },\r\n \"UZ\": {\r\n \"country\": \"Uzbekistan\",\r\n \"continent_code\": \"AS\",\r\n \"continent\": \"Asia\",\r\n \"maps\": [\"uzbekistanLow\", \"uzbekistanHigh\"]\r\n },\r\n \"VA\": {\r\n \"country\": \"Holy See (Vatican City State)\",\r\n \"continent_code\": \"EU\",\r\n \"continent\": \"Europe\",\r\n \"maps\": [\"vaticanLow\", \"vaticanHigh\"]\r\n },\r\n \"VC\": {\r\n \"country\": \"Saint Vincent and the Grenadines\",\r\n \"continent_code\": \"NA\",\r\n \"continent\": \"North America\",\r\n \"maps\": [\"saintVincentLow\", \"saintVincentHigh\"]\r\n },\r\n \"VE\": {\r\n \"country\": \"Venezuela, Bolivarian Republic of\",\r\n \"continent_code\": \"SA\",\r\n \"continent\": \"South America\",\r\n \"maps\": [\"venezuelaLow\", \"venezuelaHigh\"]\r\n },\r\n \"VG\": {\r\n \"country\": \"Virgin Islands, British\",\r\n \"continent_code\": \"NA\",\r\n \"continent\": \"North America\",\r\n \"maps\": [\"britishVirginIslandsLow\", \"britishVirginIslandsHigh\"]\r\n },\r\n \"VI\": {\r\n \"country\": \"Virgin Islands, U.S.\",\r\n \"continent_code\": \"NA\",\r\n \"continent\": \"North America\",\r\n \"maps\": [\"usVirginIslandsLow\", \"usVirginIslandsHigh\"]\r\n },\r\n \"VN\": {\r\n \"country\": \"Viet Nam\",\r\n \"continent_code\": \"AS\",\r\n \"continent\": \"Asia\",\r\n \"maps\": [\"vietnamLow\", \"vietnamHigh\"]\r\n },\r\n \"VU\": {\r\n \"country\": \"Vanuatu\",\r\n \"continent_code\": \"OC\",\r\n \"continent\": \"Oceania\",\r\n \"maps\": []\r\n },\r\n \"WF\": {\r\n \"country\": \"Wallis and Futuna\",\r\n \"continent_code\": \"OC\",\r\n \"continent\": \"Oceania\",\r\n \"maps\": []\r\n },\r\n \"WS\": {\r\n \"country\": \"Samoa\",\r\n \"continent_code\": \"OC\",\r\n \"continent\": \"Oceania\",\r\n \"maps\": [\"samoaLow\", \"samoaHigh\"]\r\n },\r\n \"YE\": {\r\n \"country\": \"Yemen\",\r\n \"continent_code\": \"AS\",\r\n \"continent\": \"Asia\",\r\n \"maps\": [\"yemenLow\", \"yemenHigh\"]\r\n },\r\n \"YT\": {\r\n \"country\": \"Mayotte\",\r\n \"continent_code\": \"AF\",\r\n \"continent\": \"Africa\",\r\n \"maps\": []\r\n },\r\n \"ZA\": {\r\n \"country\": \"South Africa\",\r\n \"continent_code\": \"AF\",\r\n \"continent\": \"Africa\",\r\n \"maps\": [\"southAfricaLow\", \"southAfricaHigh\"]\r\n },\r\n \"ZM\": {\r\n \"country\": \"Zambia\",\r\n \"continent_code\": \"AF\",\r\n \"continent\": \"Africa\",\r\n \"maps\": [\"zambiaLow\", \"zambiaHigh\"]\r\n },\r\n \"ZW\": {\r\n \"country\": \"Zimbabwe\",\r\n \"continent_code\": \"AF\",\r\n \"continent\": \"Africa\",\r\n \"maps\": [\"zimbabweLow\", \"zimbabweHigh\"]\r\n },\r\n \"XK\": {\r\n \"country\": \"Kosovo\",\r\n \"continent_code\": \"EU\",\r\n \"continent\": \"Europe\",\r\n \"maps\": [\"kosovoLow\", \"kosovoHigh\"]\r\n }\r\n};\r\nexport default countries2;\r\n","import {optional} from \"../accessors.js\";\nimport constant, {constantZero} from \"../constant.js\";\nimport lcg from \"../lcg.js\";\nimport {packSiblingsRandom} from \"./siblings.js\";\n\nfunction defaultRadius(d) {\n return Math.sqrt(d.value);\n}\n\nexport default function() {\n var radius = null,\n dx = 1,\n dy = 1,\n padding = constantZero;\n\n function pack(root) {\n const random = lcg();\n root.x = dx / 2, root.y = dy / 2;\n if (radius) {\n root.eachBefore(radiusLeaf(radius))\n .eachAfter(packChildrenRandom(padding, 0.5, random))\n .eachBefore(translateChild(1));\n } else {\n root.eachBefore(radiusLeaf(defaultRadius))\n .eachAfter(packChildrenRandom(constantZero, 1, random))\n .eachAfter(packChildrenRandom(padding, root.r / Math.min(dx, dy), random))\n .eachBefore(translateChild(Math.min(dx, dy) / (2 * root.r)));\n }\n return root;\n }\n\n pack.radius = function(x) {\n return arguments.length ? (radius = optional(x), pack) : radius;\n };\n\n pack.size = function(x) {\n return arguments.length ? (dx = +x[0], dy = +x[1], pack) : [dx, dy];\n };\n\n pack.padding = function(x) {\n return arguments.length ? (padding = typeof x === \"function\" ? x : constant(+x), pack) : padding;\n };\n\n return pack;\n}\n\nfunction radiusLeaf(radius) {\n return function(node) {\n if (!node.children) {\n node.r = Math.max(0, +radius(node) || 0);\n }\n };\n}\n\nfunction packChildrenRandom(padding, k, random) {\n return function(node) {\n if (children = node.children) {\n var children,\n i,\n n = children.length,\n r = padding(node) * k || 0,\n e;\n\n if (r) for (i = 0; i < n; ++i) children[i].r += r;\n e = packSiblingsRandom(children, random);\n if (r) for (i = 0; i < n; ++i) children[i].r -= r;\n node.r = e + r;\n }\n };\n}\n\nfunction translateChild(k) {\n return function(node) {\n var parent = node.parent;\n node.r *= k;\n if (parent) {\n node.x = parent.x + k * node.x;\n node.y = parent.y + k * node.y;\n }\n };\n}\n","import { MapPointSeries, IMapPointSeriesSettings, IMapPointSeriesPrivate, IMapPointSeriesDataItem } from \"./MapPointSeries\";\r\nimport { Component, DataItem, IComponentDataItem } from \"../../core/render/Component\";\r\nimport type { Root } from \"../../core/Root\";\r\nimport type { Bullet } from \"../../core/render/Bullet\";\r\nimport { Container } from \"../../core/render/Container\";\r\nimport { Label } from \"../../core/render/Label\";\r\nimport type { IDisposer } from \"../../core/util/Disposer\";\r\n\r\nimport * as $array from \"../../core/util/Array\";\r\nimport * as $object from \"../../core/util/Object\";\r\nimport * as d3hierarchy from \"d3-hierarchy\";\r\nimport * as $math from \"../../core/util/Math\";\r\n\r\n\r\nexport interface IClusteredDataItem extends IComponentDataItem {\r\n\t/**\r\n\t * All the data items of this cluster\r\n\t */\r\n\tchildren?: Array<DataItem<IMapPointSeriesDataItem>>;\r\n\r\n\t/**\r\n\t * Bullet of clustered data item\r\n\t */\r\n\tbullet?: Bullet;\r\n\r\n\t/**\r\n\t * An ID of a group.\r\n\t */\r\n\tgroupId?: string\r\n\r\n\t/**\r\n\t * Longitude.\r\n\t */\r\n\tlongitude?: number;\r\n\r\n\t/**\r\n\t * Latitude.\r\n\t */\r\n\tlatitude?: number;\r\n}\r\n\r\nexport interface IClusteredPointSeriesDataItem extends IMapPointSeriesDataItem {\r\n\t/**\r\n\t * An ID of a bullet's group.\r\n\t */\r\n\tgroupId?: string\r\n\r\n\t/**\r\n\t * Clustered data item (if available)\r\n\t * @readonly\r\n\t */\r\n\tcluster?: DataItem<IClusteredDataItem>;\r\n\r\n\t/**\r\n\t * How much bullet was moved from its original position\r\n\t */\r\n\tdx?: number;\r\n\r\n\t/**\r\n\t * How much bullet was moved from its original position\r\n\t */\r\n\tdy?: number;\r\n}\r\n\r\nexport interface IClusteredPointSeriesPrivate extends IMapPointSeriesPrivate {\r\n\r\n}\r\n\r\nexport interface IClusteredPointSeriesSettings extends IMapPointSeriesSettings {\r\n\t/**\r\n\t * Series data can contain a field with an ID of a virtual group the bullet\r\n\t * belongs to.\r\n\t *\r\n\t * For example, we migth want bullets to group with other bullets from the\r\n\t * same continent.\r\n\t *\r\n\t * `groupIdField` specifies which field in source data holds group IDs.\r\n\t *\r\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/map-chart/clustered-point-series/#Group_segregation} for more info\r\n\t * @default groupID\r\n\t */\r\n\tgroupIdField?: string;\r\n\r\n\t/**\r\n\t * Bullets that are closer than X pixels apart, will be automatically grouped.\r\n\t *\r\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/map-chart/clustered-point-series/#Minimal_distance} for more info\r\n\t * @default 20\r\n\t */\r\n\tminDistance?: number;\r\n\r\n\t/**\r\n\t * Set this to a [[Bullet]] instance which will be used to show groups.\r\n\t *\r\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/map-chart/clustered-point-series/#Group_bullet} for more info\r\n\t */\r\n\tclusteredBullet?: (root: Root, series: ClusteredPointSeries, dataItem: DataItem<IClusteredDataItem>) => Bullet | undefined;\r\n\r\n\t/**\r\n\t * If bullets are closer to each other than `scatterDistance`, they will be\r\n\t * scattered so that all are visible.\r\n\t *\r\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/map-chart/clustered-point-series/#Scatter_settings} for more info\r\n\t * @default 5\r\n\t * @since 5.5.7\r\n\t */\r\n\tscatterDistance?: number;\r\n\r\n\t/**\r\n\t * Presumed radius of a each bullet when scattering them.\r\n\t * \r\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/map-chart/clustered-point-series/#Scatter_settings} for more info\r\n\t * @default 8\r\n\t * @since 5.5.7\r\n\t */\r\n\tscatterRadius?: number;\r\n\r\n\t/**\r\n\t * If a map is zoomed to a maxZoomLevel * stopClusterZoom, clusters will be\r\n\t * disabled.\r\n\t * \r\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/map-chart/clustered-point-series/#Scatter_settings} for more info\r\n\t * @default 0.95\r\n\t * @since 5.5.7\r\n\t */\r\n\tstopClusterZoom?: number\r\n\r\n\r\n\t/**\r\n\t * Delay in milliseconds before clustering is made.\r\n\t * \r\n\t * This is useful if you have many data items and want to avoid re-clustering\r\n\t * on every zoom/position change.\r\n\t * \r\n\t * @default 0\r\n\t * @since 5.9.11\r\n\t */\r\n\tclusterDelay?: number;\r\n}\r\n\r\n/**\r\n * A version of [[MapPointSeries]] which can automatically group closely located\r\n * bullets into groups.\r\n * \r\n * @see {@link https://www.amcharts.com/docs/v5/charts/map-chart/clustered-point-series/} for more info\r\n * @since 5.5.6\r\n * @important\r\n */\r\nexport class ClusteredPointSeries extends MapPointSeries {\r\n\r\n\tpublic static className: string = \"ClusteredPointSeries\";\r\n\tpublic static classNames: Array<string> = MapPointSeries.classNames.concat([ClusteredPointSeries.className]);\r\n\r\n\tdeclare public _settings: IClusteredPointSeriesSettings;\r\n\tdeclare public _privateSettings: IClusteredPointSeriesPrivate;\r\n\tdeclare public _dataItemSettings: IClusteredPointSeriesDataItem;\r\n\r\n\tprotected _dataItem: DataItem<this[\"_dataItemSettings\"]> = this.makeDataItem({});\r\n\tprotected _clusterIndex: number = 0;\r\n\tprotected _clusters: Array<Array<DataItem<this[\"_dataItemSettings\"]>>> = [];\r\n\tpublic clusteredDataItems: Array<DataItem<IClusteredDataItem>> = [];\r\n\r\n\tprotected _scatterIndex: number = 0;\r\n\tprotected _scatters: Array<Array<DataItem<this[\"_dataItemSettings\"]>>> = [];\r\n\r\n\tpublic _packLayout = d3hierarchy.pack();\r\n\r\n\tprotected _spiral: Array<{ x: number, y: number }> = [];\r\n\r\n\tprotected _clusterDP?: IDisposer;\r\n\r\n\tprotected _previousZL: number = 0;\r\n\r\n\tprotected _afterNew() {\r\n\t\tthis.fields.push(\"groupId\");\r\n\t\tthis._setRawDefault(\"groupIdField\", \"groupId\");\r\n\r\n\t\tsuper._afterNew();\r\n\t}\r\n\r\n\tpublic _updateChildren() {\r\n\t\tsuper._updateChildren();\r\n\r\n\t\tif (this.isDirty(\"scatterRadius\")) {\r\n\t\t\tthis._spiral = $math.spiralPoints(0, 0, 300, 300, 0, 3, 3, 0, 0)\r\n\t\t}\r\n\r\n\t\tconst chart = this.chart;\r\n\r\n\t\tif (chart) {\r\n\r\n\t\t\tconst zoomLevel = chart.get(\"zoomLevel\", 1);\r\n\r\n\t\t\tif (zoomLevel != this._previousZL) {\r\n\t\t\t\tconst clusterDelay = this.get(\"clusterDelay\", 0);\r\n\t\t\t\tif (clusterDelay) {\r\n\t\t\t\t\tif (this._clusterDP) {\r\n\t\t\t\t\t\tthis._clusterDP.dispose();\r\n\r\n\t\t\t\t\t\tthis._clusterDP = this.setTimeout(() => {\r\n\t\t\t\t\t\t\tthis._doTheCluster();\r\n\t\t\t\t\t\t}, clusterDelay)\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\t// first time without delay\r\n\t\t\t\t\t\tthis._doTheCluster();\r\n\t\t\t\t\t\tthis._clusterDP = this.setTimeout(() => { }, 0);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tthis._doTheCluster();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis._previousZL = zoomLevel;\r\n\t\t\t}\r\n\r\n\t\t\t$array.each(this.clusteredDataItems, (dataItem) => {\r\n\t\t\t\tconst bullet = dataItem.get(\"bullet\" as any);\r\n\t\t\t\tconst longitude = dataItem.get(\"longitude\", 0);\r\n\t\t\t\tconst latitude = dataItem.get(\"latitude\", 0);\r\n\t\t\t\tthis._positionBulletReal(bullet, { type: \"Point\", coordinates: [longitude, latitude] }, [longitude, latitude]);\r\n\t\t\t})\t\t\t\r\n\t\t}\r\n\t}\r\n\r\n\r\n\tprotected _doTheCluster() {\r\n\t\tconst groups: { [index: string]: Array<DataItem<IClusteredPointSeriesDataItem>> } = {};\r\n\t\t// distribute to groups\r\n\t\t$array.each(this.dataItems, (dataItem) => {\r\n\t\t\tconst groupId = dataItem.get(\"groupId\", \"_default\");\r\n\r\n\t\t\tif (!groups[groupId]) {\r\n\t\t\t\tgroups[groupId] = [];\r\n\t\t\t}\r\n\t\t\tgroups[groupId].push(dataItem);\r\n\t\t})\r\n\r\n\t\tthis._scatterIndex = -1;\r\n\t\tthis._scatters = [];\r\n\t\tthis._clusterIndex = -1;\r\n\t\tthis._clusters = [];\r\n\r\n\t\t$array.each(this.clusteredDataItems, (dataItem) => {\r\n\t\t\tdataItem.setRaw(\"children\", undefined);\r\n\t\t})\r\n\r\n\t\t$array.each(this.dataItems, (dataItem) => {\r\n\t\t\tdataItem.setRaw(\"cluster\", undefined);\r\n\t\t})\r\n\r\n\t\t$object.each(groups, (_key, group) => {\r\n\t\t\tthis._scatterGroup(group);\r\n\t\t})\r\n\r\n\r\n\t\t$object.each(groups, (_key, group) => {\r\n\t\t\tthis._clusterGroup(group);\r\n\t\t})\r\n\r\n\t\t$array.each(this.dataItems, (dataItem) => {\r\n\t\t\tif (!dataItem.get(\"cluster\")) {\r\n\t\t\t\tconst bullets = dataItem.bullets;\r\n\t\t\t\tif (bullets) {\r\n\t\t\t\t\t$array.each(bullets, (bullet) => {\r\n\t\t\t\t\t\tconst sprite = bullet.get(\"sprite\");\r\n\t\t\t\t\t\tif (sprite) {\r\n\t\t\t\t\t\t\tsprite.set(\"forceHidden\", false);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t})\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t})\r\n\t}\r\n\r\n\t/**\r\n\t * Zooms to the area so that all clustered data items of a cluster would be\r\n\t * visible.\r\n\t *\r\n\t * Pass in `true` as a second parameter to rotate that map so that the group\r\n\t * is in the center. This is especially useful in the maps that use\r\n\t * Orthographic (globe) projection.\r\n\t *\r\n\t * @param dataItem Group data item\r\n\t * @param rotate Rotate the map so that group is in the center?\r\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/map-chart/clustered-point-series/#Drill_down} for more info\r\n\t */\r\n\tpublic zoomToCluster(dataItem: DataItem<IClusteredDataItem>, rotate?: boolean) {\r\n\t\tthis.zoomToDataItems(dataItem.get(\"children\", []), rotate);\r\n\t}\r\n\r\n\tprotected _clusterGroup(dataItems: Array<DataItem<IClusteredPointSeriesDataItem>>) {\r\n\t\tconst chart = this.chart;\r\n\t\tif (chart && chart.get(\"zoomLevel\", 1) >= chart.get(\"maxZoomLevel\", 100) * this.get(\"stopClusterZoom\", 0.95)) {\r\n\t\t\t// void\r\n\t\t}\r\n\t\telse {\r\n\r\n\t\t\tdataItems.sort((a, b) => {\r\n\t\t\t\tconst pointA = a.get(\"point\");\r\n\t\t\t\tconst pointB = b.get(\"point\");\r\n\t\t\t\tif (pointA && pointB) {\r\n\t\t\t\t\treturn Math.hypot(pointA.x - pointB.x, pointA.y - pointB.y);\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn 0;\r\n\t\t\t})\r\n\r\n\t\t\twhile (dataItems.length > 0) {\r\n\t\t\t\tthis._clusterIndex++;\r\n\t\t\t\tthis._clusters[this._clusterIndex] = [];\r\n\t\t\t\tconst cluster = this._clusters[this._clusterIndex];\r\n\t\t\t\tconst dataItem = dataItems[0];\r\n\r\n\t\t\t\tcluster.push(dataItem);\r\n\t\t\t\t$array.removeFirst(dataItems, dataItem);\r\n\r\n\t\t\t\tthis._clusterDataItem(dataItem, dataItems);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tlet i = 0;\r\n\r\n\t\tconst bulletMethod = this.get(\"clusteredBullet\");\r\n\t\tif (bulletMethod) {\r\n\t\t\t$array.each(this._clusters, (cluster) => {\r\n\t\t\t\tlet sumX = 0;\r\n\t\t\t\tlet sumY = 0;\r\n\r\n\t\t\t\tlet len = cluster.length;\r\n\r\n\t\t\t\tif (len > 1) {\r\n\r\n\t\t\t\t\tlet clusteredDataItem = this.clusteredDataItems[i];\r\n\t\t\t\t\tif (!clusteredDataItem) {\r\n\t\t\t\t\t\tclusteredDataItem = new DataItem(this, undefined, {});\r\n\r\n\t\t\t\t\t\tconst bullet = clusteredDataItem.set(\"bullet\" as any, bulletMethod(this._root, this, clusteredDataItem));\r\n\r\n\t\t\t\t\t\tif (bullet) {\r\n\t\t\t\t\t\t\tconst sprite = bullet.get(\"sprite\");\r\n\t\t\t\t\t\t\tif (sprite) {\r\n\t\t\t\t\t\t\t\tthis.bulletsContainer.children.push(sprite);\r\n\t\t\t\t\t\t\t\tsprite._setDataItem(clusteredDataItem);\r\n\r\n\t\t\t\t\t\t\t\tthis.root.events.once(\"frameended\", () => {\r\n\t\t\t\t\t\t\t\t\tif (sprite instanceof Container) {\r\n\t\t\t\t\t\t\t\t\t\tsprite.walkChildren((child) => {\r\n\t\t\t\t\t\t\t\t\t\t\tif (child instanceof Component) {\r\n\t\t\t\t\t\t\t\t\t\t\t\tchild.markDirtyValues();\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t})\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tthis.clusteredDataItems.push(clusteredDataItem)\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tlet groupId;\r\n\r\n\t\t\t\t\t$array.each(cluster, (dataItem) => {\r\n\t\t\t\t\t\tdataItem.setRaw(\"cluster\", clusteredDataItem);\r\n\r\n\t\t\t\t\t\tconst point = dataItem.get(\"point\");\r\n\t\t\t\t\t\tif (point) {\r\n\t\t\t\t\t\t\tsumX += point.x;\r\n\t\t\t\t\t\t\tsumY += point.y;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tconst bullets = dataItem.bullets;\r\n\t\t\t\t\t\tif (bullets) {\r\n\t\t\t\t\t\t\t$array.each(bullets, (bullet) => {\r\n\t\t\t\t\t\t\t\tconst sprite = bullet.get(\"sprite\");\r\n\t\t\t\t\t\t\t\tif (sprite) {\r\n\t\t\t\t\t\t\t\t\tsprite.set(\"forceHidden\", true);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t})\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tgroupId = dataItem.get(\"groupId\");\r\n\t\t\t\t\t})\r\n\r\n\t\t\t\t\tlet averageX = sumX / len;\r\n\t\t\t\t\tlet averageY = sumY / len;\r\n\r\n\t\t\t\t\tclusteredDataItem.setRaw(\"children\" as any, cluster);\r\n\t\t\t\t\tclusteredDataItem.setRaw(\"groupId\", groupId);\r\n\r\n\t\t\t\t\tconst prevLen = clusteredDataItem.get(\"value\" as any);\r\n\t\t\t\t\tclusteredDataItem.setRaw(\"value\" as any, len);\r\n\r\n\t\t\t\t\tconst bullet = clusteredDataItem.get(\"bullet\" as any);\r\n\t\t\t\t\tif (bullet) {\r\n\r\n\t\t\t\t\t\tlet geoPoint = this.chart!.invert({ x: averageX, y: averageY });\r\n\t\t\t\t\t\tif (geoPoint) {\r\n\t\t\t\t\t\t\tclusteredDataItem.setAll({\r\n\t\t\t\t\t\t\t\tlongitude: geoPoint.longitude,\r\n\t\t\t\t\t\t\t\tlatitude: geoPoint.latitude,\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tthis._positionBullets(clusteredDataItem)\r\n\r\n\t\t\t\t\t\tconst sprite = bullet.get(\"sprite\");\r\n\t\t\t\t\t\tif (sprite) {\r\n\t\t\t\t\t\t\tsprite.set(\"forceHidden\", false);\r\n\t\t\t\t\t\t\t//sprite.setAll({ x: averageX, y: averageY });\r\n\r\n\t\t\t\t\t\t\tif (prevLen != len) {\r\n\t\t\t\t\t\t\t\tif (sprite instanceof Container) {\r\n\t\t\t\t\t\t\t\t\tsprite.walkChildren((child) => {\r\n\t\t\t\t\t\t\t\t\t\tif (child instanceof Label) {\r\n\t\t\t\t\t\t\t\t\t\t\tchild.text.markDirtyText();\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t})\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\ti++;\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t}\r\n\r\n\t\t$array.each(this.clusteredDataItems, (dataItem) => {\r\n\t\t\tlet children = dataItem.get(\"children\");\r\n\t\t\tif (!children || children.length == 0) {\r\n\t\t\t\tconst bullet = dataItem.get(\"bullet\" as any);\r\n\t\t\t\tif (bullet) {\r\n\t\t\t\t\tconst sprite = bullet.get(\"sprite\");\r\n\t\t\t\t\tif (sprite) {\r\n\t\t\t\t\t\tsprite.set(\"forceHidden\", true);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t})\r\n\t}\r\n\r\n\tprotected _onDataClear() {\r\n\t\tsuper._onDataClear();\r\n\r\n\t\t$array.each(this.clusteredDataItems, (dataItem) => {\r\n\t\t\tconst bullet = dataItem.get(\"bullet\" as any);\r\n\t\t\tif (bullet) {\r\n\t\t\t\tconst sprite = bullet.get(\"sprite\");\r\n\t\t\t\tif (sprite) {\r\n\t\t\t\t\tsprite.dispose();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t})\r\n\t\tthis.clusteredDataItems = [];\r\n\r\n\t}\r\n\r\n\tprotected _clusterDataItem(dataItem: DataItem<IClusteredPointSeriesDataItem>, dataItems: Array<DataItem<IClusteredPointSeriesDataItem>>) {\r\n\t\tconst point = dataItem.get(\"point\");\r\n\t\tif (point) {\r\n\t\t\tlet minDistance = this.get(\"minDistance\", 20);\r\n\t\t\tconst cluster = this._clusters[this._clusterIndex];\r\n\r\n\t\t\tfor (let i = dataItems.length - 1; i >= 0; i--) {\r\n\t\t\t\tconst di = dataItems[i];\r\n\t\t\t\tif (di && !di.get(\"clipped\")) {\r\n\t\t\t\t\tconst diPoint = di.get(\"point\");\r\n\t\t\t\t\tif (diPoint) {\r\n\t\t\t\t\t\tif (Math.hypot(diPoint.x - point.x, diPoint.y - point.y) < minDistance) {\r\n\t\t\t\t\t\t\tcluster.push(di);\r\n\t\t\t\t\t\t\t$array.removeFirst(dataItems, di);\r\n\t\t\t\t\t\t\tthis._clusterDataItem(di, dataItems);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tprotected _scatterGroup(dataItems: Array<DataItem<IClusteredPointSeriesDataItem>>) {\r\n\t\tconst chart = this.chart;\r\n\t\tif (chart && chart.get(\"zoomLevel\", 1) >= chart.get(\"maxZoomLevel\", 100) * this.get(\"stopClusterZoom\", 0.95)) {\r\n\t\t\twhile (dataItems.length > 0) {\r\n\t\t\t\tthis._scatterIndex++;\r\n\t\t\t\tthis._scatters[this._scatterIndex] = [];\r\n\t\t\t\tconst scatter = this._scatters[this._scatterIndex];\r\n\t\t\t\tconst dataItem = dataItems[0];\r\n\r\n\t\t\t\tscatter.push(dataItem);\r\n\t\t\t\t$array.remove(dataItems, dataItem);\r\n\r\n\t\t\t\tthis._scatterDataItem(dataItem, dataItems);\r\n\t\t\t}\r\n\r\n\t\t\t$array.each(this._scatters, (scatter) => {\r\n\t\t\t\tlet len = scatter.length;\r\n\r\n\t\t\t\tif (len > 1) {\r\n\t\t\t\t\tlet previousCircles: Array<{ x: number, y: number, radius: number }> = [];\r\n\t\t\t\t\tlet s = 0;\r\n\t\t\t\t\tlet radius = this.get(\"scatterRadius\", 8);\r\n\t\t\t\t\t$array.each(scatter, (dataItem) => {\r\n\t\t\t\t\t\tlet spiralPoint = this._spiral[s];\r\n\t\t\t\t\t\tlet intersects = true;\r\n\r\n\t\t\t\t\t\tif (previousCircles.length > 0) {\r\n\t\t\t\t\t\t\twhile (intersects) {\r\n\t\t\t\t\t\t\t\t$array.each(previousCircles, (previousCircle) => {\r\n\t\t\t\t\t\t\t\t\tintersects = false;\r\n\t\t\t\t\t\t\t\t\twhile ($math.circlesOverlap({ x: spiralPoint.x, y: spiralPoint.y, radius: radius }, previousCircle)) {\r\n\t\t\t\t\t\t\t\t\t\ts++;\r\n\r\n\t\t\t\t\t\t\t\t\t\tif (this._spiral[s] == undefined) {\r\n\t\t\t\t\t\t\t\t\t\t\tintersects = false;\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\t\tintersects = true;\r\n\t\t\t\t\t\t\t\t\t\t\tspiralPoint = this._spiral[s];\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t})\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tconst dx = spiralPoint.x;\r\n\t\t\t\t\t\tconst dy = spiralPoint.y;\r\n\r\n\t\t\t\t\t\tpreviousCircles.push({ x: dx, y: dy, radius: radius });\r\n\r\n\t\t\t\t\t\tdataItem.set(\"dx\", dx);\r\n\t\t\t\t\t\tdataItem.set(\"dy\", dy);\r\n\r\n\t\t\t\t\t\tconst bullets = dataItem.bullets;\r\n\t\t\t\t\t\tif (bullets) {\r\n\t\t\t\t\t\t\t$array.each(bullets, (bullet) => {\r\n\t\t\t\t\t\t\t\tconst sprite = bullet.get(\"sprite\");\r\n\t\t\t\t\t\t\t\tif (sprite) {\r\n\t\t\t\t\t\t\t\t\tsprite.setAll({ dx: dx, dy: dy });\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t})\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t})\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t}\r\n\t}\r\n\r\n\tprotected _scatterDataItem(dataItem: DataItem<IClusteredPointSeriesDataItem>, dataItems: Array<DataItem<IClusteredPointSeriesDataItem>>) {\r\n\t\tconst point = dataItem.get(\"point\");\r\n\t\tif (point) {\r\n\t\t\tconst scatterDistance = this.get(\"scatterDistance\", 5)\r\n\t\t\tconst scatter = this._scatters[this._scatterIndex];\r\n\t\t\t$array.each(dataItems, (di) => {\r\n\t\t\t\tif (di && !di.get(\"clipped\")) {\r\n\t\t\t\t\tconst diPoint = di.get(\"point\");\r\n\r\n\t\t\t\t\tif (diPoint) {\r\n\t\t\t\t\t\tif (Math.hypot(diPoint.x - point.x, diPoint.y - point.y) < scatterDistance) {\r\n\t\t\t\t\t\t\tscatter.push(di);\r\n\t\t\t\t\t\t\t$array.removeFirst(dataItems, di);\r\n\t\t\t\t\t\t\tthis._scatterDataItem(di, dataItems);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t}\r\n\t}\r\n}\r\n","import {range} from \"d3-array\";\nimport {abs, ceil, epsilon} from \"./math.js\";\n\nfunction graticuleX(y0, y1, dy) {\n var y = range(y0, y1 - epsilon, dy).concat(y1);\n return function(x) { return y.map(function(y) { return [x, y]; }); };\n}\n\nfunction graticuleY(x0, x1, dx) {\n var x = range(x0, x1 - epsilon, dx).concat(x1);\n return function(y) { return x.map(function(x) { return [x, y]; }); };\n}\n\nexport default function graticule() {\n var x1, x0, X1, X0,\n y1, y0, Y1, Y0,\n dx = 10, dy = dx, DX = 90, DY = 360,\n x, y, X, Y,\n precision = 2.5;\n\n function graticule() {\n return {type: \"MultiLineString\", coordinates: lines()};\n }\n\n function lines() {\n return range(ceil(X0 / DX) * DX, X1, DX).map(X)\n .concat(range(ceil(Y0 / DY) * DY, Y1, DY).map(Y))\n .concat(range(ceil(x0 / dx) * dx, x1, dx).filter(function(x) { return abs(x % DX) > epsilon; }).map(x))\n .concat(range(ceil(y0 / dy) * dy, y1, dy).filter(function(y) { return abs(y % DY) > epsilon; }).map(y));\n }\n\n graticule.lines = function() {\n return lines().map(function(coordinates) { return {type: \"LineString\", coordinates: coordinates}; });\n };\n\n graticule.outline = function() {\n return {\n type: \"Polygon\",\n coordinates: [\n X(X0).concat(\n Y(Y1).slice(1),\n X(X1).reverse().slice(1),\n Y(Y0).reverse().slice(1))\n ]\n };\n };\n\n graticule.extent = function(_) {\n if (!arguments.length) return graticule.extentMinor();\n return graticule.extentMajor(_).extentMinor(_);\n };\n\n graticule.extentMajor = function(_) {\n if (!arguments.length) return [[X0, Y0], [X1, Y1]];\n X0 = +_[0][0], X1 = +_[1][0];\n Y0 = +_[0][1], Y1 = +_[1][1];\n if (X0 > X1) _ = X0, X0 = X1, X1 = _;\n if (Y0 > Y1) _ = Y0, Y0 = Y1, Y1 = _;\n return graticule.precision(precision);\n };\n\n graticule.extentMinor = function(_) {\n if (!arguments.length) return [[x0, y0], [x1, y1]];\n x0 = +_[0][0], x1 = +_[1][0];\n y0 = +_[0][1], y1 = +_[1][1];\n if (x0 > x1) _ = x0, x0 = x1, x1 = _;\n if (y0 > y1) _ = y0, y0 = y1, y1 = _;\n return graticule.precision(precision);\n };\n\n graticule.step = function(_) {\n if (!arguments.length) return graticule.stepMinor();\n return graticule.stepMajor(_).stepMinor(_);\n };\n\n graticule.stepMajor = function(_) {\n if (!arguments.length) return [DX, DY];\n DX = +_[0], DY = +_[1];\n return graticule;\n };\n\n graticule.stepMinor = function(_) {\n if (!arguments.length) return [dx, dy];\n dx = +_[0], dy = +_[1];\n return graticule;\n };\n\n graticule.precision = function(_) {\n if (!arguments.length) return precision;\n precision = +_;\n x = graticuleX(y0, y1, 90);\n y = graticuleY(x0, x1, precision);\n X = graticuleX(Y0, Y1, 90);\n Y = graticuleY(X0, X1, precision);\n return graticule;\n };\n\n return graticule\n .extentMajor([[-180, -90 + epsilon], [180, 90 - epsilon]])\n .extentMinor([[-180, -80 - epsilon], [180, 80 + epsilon]]);\n}\n\nexport function graticule10() {\n return graticule()();\n}\n","import { MapLineSeries, IMapLineSeriesSettings, IMapLineSeriesPrivate, IMapLineSeriesDataItem } from \"./MapLineSeries\";\nimport type { DataItem } from \"../../core/render/Component\";\nimport { geoGraticule } from \"d3-geo\";\n\nexport interface IGraticuleSeriesDataItem extends IMapLineSeriesDataItem {\n}\n\nexport interface IGraticuleSeriesPrivate extends IMapLineSeriesPrivate {\n}\n\nexport interface IGraticuleSeriesSettings extends IMapLineSeriesSettings {\n\tclipExtent?: boolean;\n\n\t/**\n\t * Place a grid line every Xth latitude/longitude.\n\t *\n\t * @default 10\n\t */\n\tstep?: number;\n}\n\n/**\n * A [[MapChart]] series to draw a map grid.\n *\n * @see {@link https://www.amcharts.com/docs/v5/charts/map-chart/graticule-series/} for more info\n * @important\n */\nexport class GraticuleSeries extends MapLineSeries {\n\n\tpublic static className: string = \"GraticuleSeries\";\n\tpublic static classNames: Array<string> = MapLineSeries.classNames.concat([GraticuleSeries.className]);\n\n\tdeclare public _settings: IGraticuleSeriesSettings;\n\tdeclare public _privateSettings: IGraticuleSeriesPrivate;\n\n\tprotected _dataItem: DataItem<this[\"_dataItemSettings\"]> = this.makeDataItem({});\n\n\tprotected _afterNew() {\n\t\tsuper._afterNew();\n\t\tthis.dataItems.push(this._dataItem);\n\t\tthis._generate();\n\t}\n\n\tpublic _updateChildren() {\n\t\tsuper._updateChildren();\n\n\t\tif (this.isDirty(\"step\")) {\n\t\t\tthis._generate();\n\t\t}\n\n\t\tif (this.isDirty(\"clipExtent\")) {\n\n\t\t\tif (this.get(\"clipExtent\")) {\n\t\t\t\tconst chart = this.chart;\n\t\t\t\tif (chart) {\n\t\t\t\t\tchart.events.on(\"geoboundschanged\", () => {\n\t\t\t\t\t\tthis._generate();\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t\tthis._generate();\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected _generate() {\n\t\tlet graticule = geoGraticule();\n\n\t\tif (graticule) {\n\t\t\tif (this.get(\"clipExtent\")) {\n\t\t\t\tconst chart = this.chart;\n\t\t\t\tif (chart) {\n\t\t\t\t\tconst geoBounds = chart.geoBounds();\n\t\t\t\t\tif (geoBounds) {\n\t\t\t\t\t\tgraticule.extent([[geoBounds.left, geoBounds.bottom], [geoBounds.right, geoBounds.top]]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst step = this.get(\"step\", 10);\n\t\t\tgraticule.stepMinor([360, 360]);\n\t\t\tgraticule.stepMajor([step, step]);\n\t\t\tthis._dataItem.set(\"geometry\", graticule());\n\t\t}\n\t}\n}\n","import type { MapSeries } from \"./MapSeries\";\nimport type { MapPointSeries } from \"./MapPointSeries\";\nimport type { GeoProjection, GeoPath } from \"d3-geo\";\nimport type { IPoint } from \"../../core/util/IPoint\";\nimport type { IGeoPoint } from \"../../core/util/IGeoPoint\";\nimport type { Time } from \"../../core/util/Animation\";\nimport type { ZoomControl } from \"./ZoomControl\";\nimport type { Animation } from \"../../core/util/Entity\";\nimport type { DataItem } from \"../../core/render/Component\";\nimport type { IMapPolygonSeriesDataItem } from \"./MapPolygonSeries\";\n\nimport { MapChartDefaultTheme } from \"./MapChartDefaultTheme\";\nimport { SerialChart, ISerialChartPrivate, ISerialChartSettings, ISerialChartEvents } from \"../../core/render/SerialChart\";\nimport { Rectangle } from \"../../core/render/Rectangle\";\nimport { geoPath } from \"d3-geo\";\nimport { Color } from \"../../core/util/Color\";\nimport { registry } from \"../../core/Registry\";\n\nimport * as $math from \"../../core/util/Math\";\nimport * as $array from \"../../core/util/Array\";\nimport * as $type from \"../../core/util/Type\";\nimport * as $mapUtils from \"./MapUtils\";\nimport * as $object from \"../../core/util/Object\";\nimport * as $utils from \"../../core/util/Utils\";\n\nimport type { IDisposer } from \"../../core/util/Disposer\";\nimport type { ISpritePointerEvent } from \"../../core/render/Sprite\";\n\n\nexport interface IMapChartSettings extends ISerialChartSettings {\n\n\t/**\n\t * A projection to use when plotting the map.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/map-chart/#Projections} for more info\n\t */\n\tprojection?: GeoProjection;\n\n\t/**\n\t * Current zoom level.\n\t */\n\tzoomLevel?: number;\n\n\t/**\n\t * current x position of a map\n\t */\n\ttranslateX?: number;\n\n\t/**\n\t * current y position of a map\n\t */\n\ttranslateY?: number;\n\n\t/**\n\t * Vertical centering of the map.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/map-chart/#Centering_the_map} for more info\n\t */\n\trotationY?: number;\n\n\t/**\n\t * Horizontal centering of the map.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/map-chart/#Centering_the_map} for more info\n\t */\n\trotationX?: number;\n\n\t/**\n\t * Depth centering of the map.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/map-chart/#Centering_the_map} for more info\n\t */\n\trotationZ?: number;\n\n\t/**\n\t * Highest zoom level map is allowed to zoom in to.\n\t *\n\t * @deault 32\n\t */\n\tmaxZoomLevel?: number;\n\n\t/**\n\t * Lowest zoom level map is allowed to zoom in to.\n\t *\n\t * @deault 1\n\t */\n\tminZoomLevel?: number;\n\n\t/**\n\t * Increment zoom level by `zoomStep` when user zooms in via [[ZoomControl]] or\n\t * API.\n\t *\n\t * @default 2\n\t */\n\tzoomStep?: number;\n\n\t/**\n\t * Defines what happens when map is being dragged horizontally.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/map-chart/map-pan-zoom/#Panning} for more info\n\t * @default \"translateX\"\n\t */\n\tpanX?: \"none\" | \"rotateX\" | \"translateX\";\n\n\t/**\n\t * Defines what happens when map is being dragged vertically.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/map-chart/map-pan-zoom/#Panning} for more info\n\t * @default \"translateY\"\n\t */\n\tpanY?: \"none\" | \"rotateY\" | \"translateY\";\n\n\t/**\n\t * Enables pinch-zooming of the map on multi-touch devices.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/map-chart/map-pan-zoom/#Pinch_zoom} for more info\n\t * @default true\n\t */\n\tpinchZoom?: boolean;\n\n\t/**\n\t * Defines what happens when horizontal mouse wheel (only some mouses do have such a wheel)\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/map-chart/map-pan-zoom/#Mouse_wheel_behavior} for more info\n\t * @default \"none\"\n\t */\n\twheelX?: \"none\" | \"zoom\" | \"rotateX\" | \"rotateY\";\n\n\t/**\n\t * Defines what happens when mouse wheel is turned.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/map-chart/map-pan-zoom/#Mouse_wheel_behavior} for more info\n\t * @default \"zoom\"\n\t */\n\twheelY?: \"none\" | \"zoom\" | \"rotateX\" | \"rotateY\";\n\n\t/**\n\t * Sensitivity of a mouse wheel.\n\t *\n\t * NOTE: this setting is ignored when `wheelX` or `wheelY` is set to `\"zoom\"`.\n\t *\n\t * @default 1\n\t */\n\twheelSensitivity?: number;\n\n\t/**\n\t * Duration of mouse-wheel action animation, in milliseconds.\n\t *\n\t * NOTE: this setting is ignored when `wheelX` or `wheelY` is set to `\"zoom\"`.\n\t */\n\twheelDuration?: number;\n\n\t/**\n\t * An easing function to use for mouse wheel action animations.\n\t *\n\t * NOTE: this setting is ignored when `wheelX` or `wheelY` is set to `\"zoom\"`.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/animations/#Easing_functions} for more info\n\t * @default am5.ease.out($ease.cubic)\n\t */\n\twheelEasing?: (t: Time) => Time;\n\n\t/**\n\t * Duration of zoom/pan animations, in milliseconds.\n\t */\n\tanimationDuration?: number;\n\n\t/**\n\t * An easing function to use for zoom/pan animations.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/animations/#Easing_functions} for more info\n\t * @default am5.ease.out($ease.cubic)\n\t */\n\tanimationEasing?: (t: Time) => Time;\n\n\n\t/**\n\t * A [[ZoomControl]] instance.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/map-chart/#Zoom_control} for more info\n\t */\n\tzoomControl?: ZoomControl;\n\n\t/**\n\t * Initial/home zoom level.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/map-chart/map-pan-zoom/#Initial_position_and_zoom} for more info\n\t */\n\thomeZoomLevel?: number;\n\n\t/**\n\t * Initial/home rotationX.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/map-chart/map-pan-zoom/#Initial_position_and_zoom} for more info\n\t */\n\thomeRotationX?: number;\n\n\t/**\n\t * Initial/home rotationY.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/map-chart/map-pan-zoom/#Initial_position_and_zoom} for more info\n\t */\n\thomeRotationY?: number;\n\n\t/**\n\t * Initial coordinates to center map on load or `goHome()` call.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/map-chart/map-pan-zoom/#Initial_position_and_zoom} for more info\n\t */\n\thomeGeoPoint?: IGeoPoint;\n\n\t/**\n\t * How much of a map can go outside the viewport.\n\t *\n\t * @default 0.4\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/map-chart/map-pan-zoom/#Panning_outside_viewport} for more info\n\t */\n\tmaxPanOut?: number;\n\n\t/**\n\t * Setting `true` means that the map will automatically center itself (or go\n\t * to `homeGeoPoint` if set) when fully zoomed out.\n\t *\n\t * `false` would mean that zoom out will be centered around the mouse\n\t * cursor (when zooming using wheel), or current map position.\n\t * \n\t * @default true\n\t * @since 5.2.1\n\t */\n\tcenterMapOnZoomOut?: boolean;\n\n}\n\nexport interface IMapChartPrivate extends ISerialChartPrivate {\n\n\t/**\n\t * @ignore\n\t */\n\tgeoPath: GeoPath;\n\n\t/**\n\t * @ignore\n\t */\n\tmapScale: number;\n\n}\n\n\nexport interface IMapChartEvents extends ISerialChartEvents {\n\n\t/**\n\t * Invoked when geo bounds of the map change, usually after map is\n\t * initialized.\n\t */\n\tgeoboundschanged: {};\n\n}\n\n\nexport class MapChart extends SerialChart {\n\tpublic static className: string = \"MapChart\";\n\tpublic static classNames: Array<string> = SerialChart.classNames.concat([MapChart.className]);\n\n\tdeclare public _settings: IMapChartSettings;\n\tdeclare public _privateSettings: IMapChartPrivate;\n\tdeclare public _seriesType: MapSeries;\n\tdeclare public _events: IMapChartEvents;\n\n\tprotected _downTranslateX: number | undefined;\n\tprotected _downTranslateY: number | undefined;\n\tprotected _downRotationX: number | undefined;\n\tprotected _downRotationY: number | undefined;\n\tprotected _downRotationZ: number | undefined;\n\tprotected _pLat: number = 0;\n\tprotected _pLon: number = 0;\n\n\tprotected _movePoints: { [index: number]: IPoint } = {};\n\tprotected _downZoomLevel: number = 1;\n\tprotected _doubleDownDistance: number = 0;\n\n\tprotected _dirtyGeometries: boolean = false;\n\tprotected _geometryColection: GeoJSON.GeometryCollection = { type: \"GeometryCollection\", geometries: [] };\n\n\tpublic _centerLocation: [number, number] | null = null;\n\n\tprotected _za?: Animation<this[\"_settings\"][\"zoomLevel\"]>;\n\tprotected _rxa?: Animation<this[\"_settings\"][\"rotationX\"]>;\n\tprotected _rya?: Animation<this[\"_settings\"][\"rotationY\"]>;\n\tprotected _txa?: Animation<this[\"_settings\"][\"translateX\"]>;\n\tprotected _tya?: Animation<this[\"_settings\"][\"translateY\"]>;\n\n\tprotected _mapBounds = [[0, 0], [0, 0]];\n\n\tprotected _geoCentroid: IGeoPoint = { longitude: 0, latitude: 0 };\n\tprotected _geoBounds: { left: number, right: number, top: number, bottom: number } = { left: 0, right: 0, top: 0, bottom: 0 };\n\tprotected _prevGeoBounds: { left: number, right: number, top: number, bottom: number } = { left: 0, right: 0, top: 0, bottom: 0 };\n\n\tprotected _dispatchBounds: boolean = false;\n\n\tprotected _wheelDp: IDisposer | undefined;\n\n\tprotected _pw?: number;\n\tprotected _ph?: number;\n\n\tprotected _mapFitted: boolean = false;\n\n\tprotected _centerX: number = 0;\n\tprotected _centerY: number = 0;\n\n\tprotected _makeGeoPath() {\n\t\tconst projection = this.get(\"projection\")!;\n\t\tconst path = geoPath();\n\t\tpath.projection(projection);\n\t\tthis.setPrivateRaw(\"geoPath\", path);\n\t}\n\n\t/**\n\t * Returns a geoPoint of the current zoom position.\n\t * \n\t * You can later use it to restore zoom position, e.g.: `chart.zoomToGeoPoint(geoPoint, zoomLevel, true)`.\n\t *\n\t * @since 5.2.19\n\t */\n\tpublic geoPoint() {\n\t\treturn this.invert(this.seriesContainer.toGlobal({ x: this.width() / 2, y: this.height() / 2 }));\n\t}\n\n\t/**\n\t * Returns coordinates to geographical center of the map.\n\t */\n\tpublic geoCentroid() {\n\t\treturn this._geoCentroid;\n\t}\n\n\t/**\n\t * Returns geographical bounds of the map.\n\t */\n\tpublic geoBounds() {\n\t\treturn this._geoBounds;\n\t}\n\n\tprotected _handleSetWheel() {\n\n\t\tconst wheelX = this.get(\"wheelX\");\n\t\tconst wheelY = this.get(\"wheelY\");\n\t\tconst chartContainer = this.chartContainer;\n\n\t\tif (wheelX != \"none\" || wheelY != \"none\") {\n\t\t\tif (this._wheelDp) {\n\t\t\t\tthis._wheelDp.dispose();\n\t\t\t}\n\n\t\t\tthis._wheelDp = chartContainer.events.on(\"wheel\", (event) => {\n\t\t\t\tconst wheelEasing = this.get(\"wheelEasing\")!;\n\t\t\t\tconst wheelSensitivity = this.get(\"wheelSensitivity\", 1);\n\t\t\t\tconst wheelDuration = this.get(\"wheelDuration\", 0);\n\n\t\t\t\tconst wheelEvent = event.originalEvent;\n\n\t\t\t\t// Ignore wheel event if it is happening on a non-chart element, e.g. if\n\t\t\t\t// some page element is over the chart.\n\t\t\t\tlet prevent = false;\n\t\t\t\tif ($utils.isLocalEvent(wheelEvent, this)) {\n\t\t\t\t\tprevent = true;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst point = chartContainer._display.toLocal(event.point);\n\n\t\t\t\tif ((wheelY == \"zoom\")) {\n\t\t\t\t\tif(this.get(\"zoomLevel\") == this.get(\"minZoomLevel\", 1) && wheelEvent.deltaY > 0) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tthis._handleWheelZoom(wheelEvent.deltaY, point);\n\t\t\t\t}\n\t\t\t\telse if (wheelY == \"rotateY\") {\n\t\t\t\t\tthis._handleWheelRotateY(wheelEvent.deltaY / 5 * wheelSensitivity, wheelDuration, wheelEasing);\n\t\t\t\t}\n\t\t\t\telse if (wheelY == \"rotateX\") {\n\t\t\t\t\tthis._handleWheelRotateX(wheelEvent.deltaY / 5 * wheelSensitivity, wheelDuration, wheelEasing);\n\t\t\t\t}\n\n\t\t\t\tif ((wheelX == \"zoom\")) {\n\t\t\t\t\tthis._handleWheelZoom(wheelEvent.deltaX, point);\n\t\t\t\t}\n\t\t\t\telse if (wheelX == \"rotateY\") {\n\t\t\t\t\tthis._handleWheelRotateY(wheelEvent.deltaX / 5 * wheelSensitivity, wheelDuration, wheelEasing);\n\t\t\t\t}\n\t\t\t\telse if (wheelX == \"rotateX\") {\n\t\t\t\t\tthis._handleWheelRotateX(wheelEvent.deltaX / 5 * wheelSensitivity, wheelDuration, wheelEasing);\n\t\t\t\t}\n\t\t\t\tif(prevent) {\n\t\t\t\t\twheelEvent.preventDefault();\n\t\t\t\t}\n\n\t\t\t});\n\n\t\t\tthis._disposers.push(this._wheelDp);\n\t\t}\n\t\telse {\n\t\t\tif (this._wheelDp) {\n\t\t\t\tthis._wheelDp.dispose();\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic _prepareChildren() {\n\t\tsuper._prepareChildren();\n\n\t\tconst projection = this.get(\"projection\")!;\n\t\tconst w = this.innerWidth();\n\t\tconst h = this.innerHeight();\n\n\t\tconst previousGeometries = this._geometryColection.geometries;\n\n\t\tif (this.isDirty(\"projection\")) {\n\t\t\tthis._makeGeoPath();\n\t\t\tthis.markDirtyProjection();\n\t\t\tthis._fitMap();\n\n\t\t\tprojection.scale(this.getPrivate(\"mapScale\") * this.get(\"zoomLevel\", 1));\n\t\t\tif (projection.rotate) {\n\t\t\t\tprojection.rotate([this.get(\"rotationX\", 0), this.get(\"rotationY\", 0), this.get(\"rotationZ\", 0)])\n\t\t\t}\n\n\t\t\tlet prev = this._prevSettings.projection;\n\t\t\tif (prev && prev != projection) {\n\t\t\t\tlet hw = w / 2;\n\t\t\t\tlet hh = h / 2;\n\t\t\t\tif (prev.invert) {\n\t\t\t\t\tlet centerLocation = prev.invert([hw, hh]);\n\n\t\t\t\t\tif (centerLocation) {\n\n\t\t\t\t\t\tlet xy = projection(centerLocation);\n\t\t\t\t\t\tif (xy) {\n\t\t\t\t\t\t\tlet translate = projection.translate();\n\n\t\t\t\t\t\t\tlet xx = hw - ((xy[0] - translate[0]));\n\t\t\t\t\t\t\tlet yy = hh - ((xy[1] - translate[1]));\n\n\t\t\t\t\t\t\tprojection.translate([xx, yy])\n\n\t\t\t\t\t\t\tthis.setRaw(\"translateX\", xx);\n\t\t\t\t\t\t\tthis.setRaw(\"translateY\", yy);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (this.isDirty(\"wheelX\") || this.isDirty(\"wheelY\")) {\n\t\t\tthis._handleSetWheel();\n\t\t}\n\t\tif (this._dirtyGeometries) {\n\t\t\tthis._geometryColection.geometries = [];\n\n\t\t\tthis.series.each((series) => {\n\t\t\t\t$array.pushAll(this._geometryColection.geometries, series._geometries);\n\t\t\t})\n\n\n\t\t\tthis._fitMap();\n\t\t}\n\n\t\tif (previousGeometries.length != 0 && (w != this._pw || h != this._ph || this._dirtyGeometries)) {\n\t\t\tif (w > 0 && h > 0) {\n\t\t\t\tlet hw = w / 2;\n\t\t\t\tlet hh = h / 2;\n\n\t\t\t\tprojection.fitSize([w, h], this._geometryColection);\n\t\t\t\tconst newScale = projection.scale();\n\n\t\t\t\tthis.setPrivateRaw(\"mapScale\", newScale);\n\t\t\t\tprojection.scale(newScale * this.get(\"zoomLevel\", 1));\n\n\t\t\t\tif (this._centerLocation) {\n\t\t\t\t\tlet xy = projection(this._centerLocation);\n\t\t\t\t\tif (xy) {\n\t\t\t\t\t\tlet translate = projection.translate();\n\n\t\t\t\t\t\tlet xx = hw - ((xy[0] - translate[0]));\n\t\t\t\t\t\tlet yy = hh - ((xy[1] - translate[1]));\n\n\t\t\t\t\t\tprojection.translate([xx, yy])\n\n\t\t\t\t\t\tthis.setRaw(\"translateX\", xx);\n\t\t\t\t\t\tthis.setRaw(\"translateY\", yy);\n\n\t\t\t\t\t\tthis._centerX = translate[0];\n\t\t\t\t\t\tthis._centerY = translate[1];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis.markDirtyProjection();\n\n\t\t\t\tconst geoPath = this.getPrivate(\"geoPath\");\n\t\t\t\tthis._mapBounds = geoPath.bounds(this._geometryColection);\n\t\t\t}\n\t\t}\n\n\t\tthis._pw = w;\n\t\tthis._ph = h;\n\n\t\tif (this.isDirty(\"zoomControl\")) {\n\t\t\tconst previous = this._prevSettings.zoomControl;\n\t\t\tconst zoomControl = this.get(\"zoomControl\")!;\n\t\t\tif (zoomControl !== previous) {\n\t\t\t\tthis._disposeProperty(\"zoomControl\");\n\t\t\t\tif (previous) {\n\t\t\t\t\tprevious.dispose();\n\t\t\t\t}\n\t\t\t\tif (zoomControl) {\n\t\t\t\t\tzoomControl.setPrivate(\"chart\", this);\n\t\t\t\t\tthis.children.push(zoomControl);\n\t\t\t\t}\n\n\t\t\t\tthis.setRaw(\"zoomControl\", zoomControl);\n\t\t\t}\n\t\t}\n\n\t\tif (this.isDirty(\"zoomLevel\")) {\n\t\t\tprojection.scale(this.getPrivate(\"mapScale\") * this.get(\"zoomLevel\", 1));\n\t\t\tthis.markDirtyProjection();\n\n\t\t\tthis.series.each((series) => {\n\t\t\t\tif (series.isType<MapPointSeries>(\"MapPointSeries\")) {\n\t\t\t\t\tif (series.get(\"autoScale\")) {\n\t\t\t\t\t\t$array.each(series.dataItems, (dataItem) => {\n\t\t\t\t\t\t\tconst bullets = dataItem.bullets;\n\t\t\t\t\t\t\tif (bullets) {\n\t\t\t\t\t\t\t\t$array.each(bullets, (bullet) => {\n\t\t\t\t\t\t\t\t\tconst sprite = bullet.get(\"sprite\");\n\t\t\t\t\t\t\t\t\tif (sprite) {\n\t\t\t\t\t\t\t\t\t\tsprite.set(\"scale\", this.get(\"zoomLevel\"));\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\n\t\t\tconst zoomControl = this.get(\"zoomControl\");\n\t\t\tif (zoomControl) {\n\t\t\t\tconst zoomLevel = this.get(\"zoomLevel\", 1);\n\n\t\t\t\tif (zoomLevel == this.get(\"minZoomLevel\", 1)) {\n\t\t\t\t\tthis.root.events.once(\"frameended\", () =>{\n\t\t\t\t\t\tzoomControl.minusButton.set(\"disabled\", true);\n\t\t\t\t\t})\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tzoomControl.minusButton.set(\"disabled\", false);\n\t\t\t\t}\n\n\t\t\t\tif (zoomLevel == this.get(\"maxZoomLevel\", 32)) {\n\t\t\t\t\tzoomControl.plusButton.set(\"disabled\", true);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tzoomControl.plusButton.set(\"disabled\", false);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (this.isDirty(\"translateX\") || this.isDirty(\"translateY\")) {\n\t\t\tprojection.translate([this.get(\"translateX\", this.width() / 2), this.get(\"translateY\", this.height() / 2)])\n\t\t\tthis.markDirtyProjection();\n\t\t}\n\n\t\tif (projection.rotate) {\n\t\t\tif (this.isDirty(\"rotationX\") || this.isDirty(\"rotationY\") || this.isDirty(\"rotationZ\")) {\n\t\t\t\tprojection.rotate([this.get(\"rotationX\", 0), this.get(\"rotationY\", 0), this.get(\"rotationZ\", 0)])\n\t\t\t\tthis.markDirtyProjection();\n\t\t\t}\n\t\t}\n\n\t\tif (this.isDirty(\"pinchZoom\") || this.get(\"panX\") || this.get(\"panY\")) {\n\t\t\tthis._setUpTouch();\n\t\t}\n\t}\n\n\n\tprotected _fitMap() {\n\t\tconst projection = this.get(\"projection\")!;\n\n\t\tlet w = this.innerWidth();\n\t\tlet h = this.innerHeight();\n\n\t\tif (w > 0 && h > 0) {\n\t\t\tprojection.fitSize([w, h], this._geometryColection);\n\t\t\tthis.setPrivateRaw(\"mapScale\", projection.scale());\n\n\t\t\tconst translate = projection.translate();\n\n\t\t\tthis.setRaw(\"translateX\", translate[0]);\n\t\t\tthis.setRaw(\"translateY\", translate[1]);\n\n\t\t\tthis._centerX = translate[0];\n\t\t\tthis._centerY = translate[1];\n\n\t\t\tconst geoPath = this.getPrivate(\"geoPath\");\n\t\t\tthis._mapBounds = geoPath.bounds(this._geometryColection);\n\n\t\t\tthis._geoCentroid = $mapUtils.getGeoCentroid(this._geometryColection);\n\n\t\t\tconst bounds = $mapUtils.getGeoBounds(this._geometryColection);\n\t\t\tthis._geoBounds = bounds;\n\n\t\t\tif (this._geometryColection.geometries.length > 0) {\n\n\t\t\t\tbounds.left = $math.round(this._geoBounds.left, 3);\n\t\t\t\tbounds.right = $math.round(this._geoBounds.right, 3);\n\t\t\t\tbounds.top = $math.round(this._geoBounds.top, 3);\n\t\t\t\tbounds.bottom = $math.round(this._geoBounds.bottom, 3);\n\n\t\t\t\tconst prevGeoBounds = this._prevGeoBounds;\n\n\t\t\t\tif (prevGeoBounds && !$utils.sameBounds(bounds, prevGeoBounds)) {\n\t\t\t\t\tthis._dispatchBounds = true;\n\t\t\t\t\tthis._prevGeoBounds = bounds;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis._mapFitted = true;\n\t\t}\n\t}\n\n\t/**\n\t * Returns geographical coordinates for calculated or manual center of the\n\t * map.\n\t */\n\tpublic homeGeoPoint(): IGeoPoint {\n\t\tlet homeGeoPoint = this.get(\"homeGeoPoint\");\n\t\tif (!homeGeoPoint) {\n\t\t\tconst geoPath = this.getPrivate(\"geoPath\");\n\t\t\tconst bounds = geoPath.bounds(this._geometryColection);\n\n\t\t\tconst left = bounds[0][0];\n\t\t\tconst top = bounds[0][1];\n\n\t\t\tconst right = bounds[1][0];\n\t\t\tconst bottom = bounds[1][1];\n\n\t\t\thomeGeoPoint = this.invert({ x: left + (right - left) / 2, y: top + (bottom - top) / 2 });\n\t\t}\n\t\treturn homeGeoPoint;\n\t}\n\n\t/**\n\t * Repositions the map to the \"home\" zoom level and center coordinates.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/map-chart/map-pan-zoom/#Resetting_position_level} for more info\n\t * @param duration Animation duration in milliseconds\n\t */\n\tpublic goHome(duration?: number) {\n\t\tthis.zoomToGeoPoint(this.homeGeoPoint(), this.get(\"homeZoomLevel\", 1), true, duration, this.get(\"homeRotationX\"), this.get(\"homeRotationY\"));\n\t}\n\n\tpublic _updateChildren() {\n\t\tconst projection = this.get(\"projection\")!;\n\t\tif (projection.invert) {\n\t\t\tlet w = this.innerWidth();\n\t\t\tlet h = this.innerHeight();\n\t\t\tif (w > 0 && h > 0) {\n\t\t\t\tthis._centerLocation = projection.invert([this.innerWidth() / 2, this.innerHeight() / 2]);\n\t\t\t}\n\t\t}\n\t\tsuper._updateChildren();\n\t}\n\n\tpublic _afterChanged() {\n\t\tsuper._afterChanged();\n\t\tif (this._dispatchBounds) {\n\t\t\tthis._dispatchBounds = false;\n\t\t\tconst type = \"geoboundschanged\";\n\t\t\tif (this.events.isEnabled(type)) {\n\t\t\t\tthis.events.dispatch(type, { type: type, target: this });\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected _setUpTouch(): void {\n\t\tif (!this.chartContainer._display.cancelTouch) {\n\t\t\tthis.chartContainer._display.cancelTouch = (this.get(\"pinchZoom\") || this.get(\"panX\") || this.get(\"panY\")) ? true : false;\n\t\t}\n\t}\n\n\n\t/**\n\t * @ignore\n\t */\n\tpublic markDirtyGeometries() {\n\t\tthis._dirtyGeometries = true;\n\t\tthis.markDirty();\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic markDirtyProjection() {\n\t\tthis.series.each((series) => {\n\t\t\tseries.markDirtyProjection();\n\t\t})\n\t}\n\n\tprotected _afterNew() {\n\t\tthis._defaultThemes.push(MapChartDefaultTheme.new(this._root));\n\t\tthis._settings.themeTags = $utils.mergeTags(this._settings.themeTags, [\"map\"]);\n\n\t\tthis.children.push(this.bulletsContainer);\n\n\t\tsuper._afterNew();\n\n\t\tthis._makeGeoPath();\n\n\t\tthis.chartContainer.children.push(this.seriesContainer);\n\n\t\tif (this.get(\"translateX\") == null) {\n\t\t\tthis.set(\"translateX\", this.width() / 2);\n\t\t}\n\t\tif (this.get(\"translateY\") == null) {\n\t\t\tthis.set(\"translateY\", this.height() / 2);\n\t\t}\n\n\t\t// Setting trasnparent background so that full body of the plot container\n\t\t// is interactive\n\t\tthis.chartContainer.set(\"interactive\", true);\n\t\tthis.chartContainer.set(\"interactiveChildren\", false);\n\t\tthis.chartContainer.set(\"background\", Rectangle.new(this._root, {\n\t\t\tthemeTags: [\"map\", \"background\"],\n\t\t\tfill: Color.fromHex(0x000000),\n\t\t\tfillOpacity: 0\n\t\t}));\n\n\t\tthis._disposers.push(this.chartContainer.events.on(\"pointerdown\", (event) => {\n\t\t\tthis._handleChartDown(event);\n\t\t}));\n\n\t\tthis._disposers.push(this.chartContainer.events.on(\"globalpointerup\", (event) => {\n\t\t\tthis._handleChartUp(event);\n\t\t}));\n\n\t\tthis._disposers.push(this.chartContainer.events.on(\"globalpointermove\", (event) => {\n\t\t\tthis._handleChartMove(event);\n\t\t}));\n\n\t\tlet license = false;\n\t\tfor (let i = 0; i < registry.licenses.length; i++) {\n\t\t\tif (registry.licenses[i].match(/^AM5M.{5,}/i)) {\n\t\t\t\tlicense = true;\n\t\t\t}\n\t\t}\n\t\tif (!license) {\n\t\t\tthis._root._showBranding();\n\t\t}\n\t\telse {\n\t\t\tthis._root._licenseApplied();\n\t\t}\n\n\t\tthis._setUpTouch();\n\n\t}\n\n\tprotected _handleChartDown(event: ISpritePointerEvent) {\n\n\t\tthis._downZoomLevel = this.get(\"zoomLevel\", 1);\n\t\tconst downPoints = this.chartContainer._downPoints;\n\n\t\tlet count = $object.keys(downPoints).length;\n\t\tif (count == 1) {\n\t\t\t// workaround to solve a problem when events are added to some children of chart container (rotation stops working)\n\t\t\tlet downPoint = downPoints[1];\n\t\t\tif (!downPoint) {\n\t\t\t\tdownPoint = downPoints[0];\n\t\t\t}\n\n\t\t\tif (downPoint && (downPoint.x == event.point.x && downPoint.y == event.point.y)) {\n\t\t\t\tcount = 0;\n\t\t\t}\n\t\t}\n\n\t\tif (count > 0) {\n\t\t\tthis._downTranslateX = this.get(\"translateX\");\n\t\t\tthis._downTranslateY = this.get(\"translateY\");\n\t\t\tthis._downRotationX = this.get(\"rotationX\");\n\t\t\tthis._downRotationY = this.get(\"rotationY\");\n\t\t\tthis._downRotationZ = this.get(\"rotationZ\");\n\n\t\t\tconst downId = this.chartContainer._getDownPointId();\n\t\t\tif (downId) {\n\t\t\t\tlet movePoint = this._movePoints[downId];\n\t\t\t\tif (movePoint) {\n\t\t\t\t\tthis.chartContainer._downPoints[downId] = movePoint;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if (count == 0) {\n\t\t\tlet bg = this.chartContainer.get(\"background\");\n\t\t\tif (bg) {\n\t\t\t\tbg.events.enableType(\"click\");\n\t\t\t}\n\n\t\t\tif (this.get(\"panX\") || this.get(\"panY\")) {\n\n\t\t\t\tif (this._za) {\n\t\t\t\t\tthis._za.stop();\n\t\t\t\t}\n\t\t\t\tif (this._txa) {\n\t\t\t\t\tthis._txa.stop();\n\t\t\t\t}\n\t\t\t\tif (this._tya) {\n\t\t\t\t\tthis._tya.stop();\n\t\t\t\t}\n\t\t\t\tif (this._rxa) {\n\t\t\t\t\tthis._rxa.stop();\n\t\t\t\t}\n\t\t\t\tif (this._rya) {\n\t\t\t\t\tthis._rya.stop();\n\t\t\t\t}\n\n\t\t\t\tconst downPoint = this.chartContainer._display.toLocal(event.point);\n\t\t\t\tthis._downTranslateX = this.get(\"translateX\");\n\t\t\t\tthis._downTranslateY = this.get(\"translateY\");\n\t\t\t\tthis._downRotationX = this.get(\"rotationX\");\n\t\t\t\tthis._downRotationY = this.get(\"rotationY\");\n\t\t\t\tthis._downRotationZ = this.get(\"rotationZ\");\n\n\t\t\t\tlet projection = this.get(\"projection\")!;\n\n\t\t\t\tif (projection.invert) {\n\t\t\t\t\tlet l0 = projection.invert([downPoint.x, downPoint.y]);\n\t\t\t\t\tlet l1 = projection.invert([downPoint.x + 1, downPoint.y + 1]);\n\t\t\t\t\tif (l0 && l1) {\n\t\t\t\t\t\tthis._pLon = Math.abs(l1[0] - l0[0]);\n\t\t\t\t\t\tthis._pLat = Math.abs(l1[1] - l0[1]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Converts screen coordinates (X and Y) within chart to latitude and\n\t * longitude.\n\t * \n\t * @param point Screen coordinates\n\t * @return Geographical coordinates\n\t */\n\tpublic invert(point: IPoint): IGeoPoint {\n\t\tlet projection = this.get(\"projection\")!;\n\n\t\tif (projection.invert) {\n\t\t\tconst ll = projection.invert([point.x, point.y]);\n\t\t\tif (ll) {\n\t\t\t\treturn { longitude: ll[0], latitude: ll[1] };\n\t\t\t}\n\t\t}\n\n\t\treturn { longitude: 0, latitude: 0 };\n\t}\n\n\t/**\n\t * Converts latitude/longitude to screen coordinates (X and Y).\n\t * \n\t * @param point Geographical coordinates\n\t * @param rotationX X rotation of a map if different from current\n\t * @param rotationY Y rotation of a map if different from current\n\t * \n\t * @return Screen coordinates\n\t */\n\tpublic convert(point: IGeoPoint, rotationX?: number, rotationY?: number): IPoint {\n\t\tlet projection = this.get(\"projection\")!;\n\t\tlet xy;\n\n\t\tif (!projection.rotate) {\n\t\t\trotationX = undefined;\n\t\t\trotationY = undefined;\n\t\t}\n\n\t\tif (rotationX != null || rotationY != null) {\n\t\t\tif (rotationX == null) {\n\t\t\t\trotationX = 0;\n\t\t\t}\n\t\t\tif (rotationY == null) {\n\t\t\t\trotationY = 0;\n\t\t\t}\n\t\t\tlet rotation = projection.rotate();\n\t\t\tprojection.rotate([rotationX, rotationY, 0]);\n\t\t\txy = projection([point.longitude, point.latitude]);\n\t\t\tprojection.rotate(rotation);\n\t\t}\n\t\telse {\n\t\t\txy = projection([point.longitude, point.latitude]);\n\t\t}\n\n\t\tif (xy) {\n\t\t\treturn { x: xy[0], y: xy[1] };\n\t\t}\n\n\t\treturn { x: 0, y: 0 };\n\t}\n\n\tprotected _handleChartUp(_event: ISpritePointerEvent) {\n\t\tthis.chartContainer._downPoints = {}\n\t}\n\n\tprotected _handlePinch() {\n\t\tconst chartContainer = this.chartContainer;\n\t\tlet i = 0;\n\t\tlet downPoints: Array<IPoint> = [];\n\t\tlet movePoints: Array<IPoint> = [];\n\n\t\t$object.each(chartContainer._downPoints, (k, point) => {\n\t\t\tdownPoints[i] = point;\n\t\t\tlet movePoint = this._movePoints[k];\n\t\t\tif (movePoint) {\n\t\t\t\tmovePoints[i] = movePoint;\n\t\t\t}\n\t\t\ti++;\n\t\t});\n\n\t\tif (downPoints.length > 1 && movePoints.length > 1) {\n\t\t\tconst display = chartContainer._display;\n\n\t\t\tlet downPoint0 = downPoints[0];\n\t\t\tlet downPoint1 = downPoints[1];\n\n\t\t\tlet movePoint0 = movePoints[0];\n\t\t\tlet movePoint1 = movePoints[1];\n\n\t\t\tif (downPoint0 && downPoint1 && movePoint0 && movePoint1) {\n\n\t\t\t\tdownPoint0 = display.toLocal(downPoint0);\n\t\t\t\tdownPoint1 = display.toLocal(downPoint1);\n\n\t\t\t\tmovePoint0 = display.toLocal(movePoint0);\n\t\t\t\tmovePoint1 = display.toLocal(movePoint1);\n\n\t\t\t\tlet initialDistance = Math.hypot(downPoint1.x - downPoint0.x, downPoint1.y - downPoint0.y);\n\t\t\t\tlet currentDistance = Math.hypot(movePoint1.x - movePoint0.x, movePoint1.y - movePoint0.y);\n\n\t\t\t\tlet level = currentDistance / initialDistance * this._downZoomLevel;\n\t\t\t\tlevel = $math.fitToRange(level, this.get(\"minZoomLevel\", 1), this.get(\"maxZoomLevel\", 32));\n\n\t\t\t\tlet moveCenter = { x: movePoint0.x + (movePoint1.x - movePoint0.x) / 2, y: movePoint0.y + (movePoint1.y - movePoint0.y) / 2 };\n\t\t\t\tlet downCenter = { x: downPoint0.x + (downPoint1.x - downPoint0.x) / 2, y: downPoint0.y + (downPoint1.y - downPoint0.y) / 2 };\n\n\t\t\t\tlet tx = this._downTranslateX || 0;\n\t\t\t\tlet ty = this._downTranslateY || 0;\n\n\t\t\t\tlet zoomLevel = this._downZoomLevel;\n\n\t\t\t\tlet xx = moveCenter.x - (- tx + downCenter.x) / zoomLevel * level;\n\t\t\t\tlet yy = moveCenter.y - (- ty + downCenter.y) / zoomLevel * level;\n\n\t\t\t\tthis.set(\"zoomLevel\", level);\n\t\t\t\tthis.set(\"translateX\", xx);\n\t\t\t\tthis.set(\"translateY\", yy);\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected _handleChartMove(event: ISpritePointerEvent) {\n\t\tconst chartContainer = this.chartContainer;\n\t\tlet downPoint = chartContainer._getDownPoint();\n\t\tconst downPointId = chartContainer._getDownPointId();\n\t\tconst originalEvent = event.originalEvent as any;\n\n\t\tconst pointerId = originalEvent.pointerId;\n\n\t\tif (this.get(\"pinchZoom\")) {\n\t\t\tif (pointerId) {\n\t\t\t\tthis._movePoints[pointerId] = event.point;\n\n\t\t\t\tif ($object.keys(chartContainer._downPoints).length > 1) {\n\t\t\t\t\tthis._handlePinch();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (downPointId && pointerId && pointerId != downPointId) {\n\t\t\treturn;\n\t\t}\n\t\telse {\n\t\t\tif (downPoint) {\n\t\t\t\tconst panX = this.get(\"panX\");\n\t\t\t\tconst panY = this.get(\"panY\");\n\t\t\t\tif (panX != \"none\" || panY != \"none\") {\n\t\t\t\t\tconst display = chartContainer._display;\n\t\t\t\t\tlet local = display.toLocal(event.point);\n\t\t\t\t\tdownPoint = display.toLocal(downPoint);\n\n\t\t\t\t\tlet x = this._downTranslateX;\n\t\t\t\t\tlet y = this._downTranslateY;\n\n\t\t\t\t\tif (Math.hypot(downPoint.x - local.x, downPoint.y - local.y) > 5) {\n\t\t\t\t\t\tlet bg = chartContainer.get(\"background\");\n\t\t\t\t\t\tif (bg) {\n\t\t\t\t\t\t\tbg.events.disableType(\"click\");\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ($type.isNumber(x) && $type.isNumber(y)) {\n\t\t\t\t\t\t\tlet projection = this.get(\"projection\")!;\n\t\t\t\t\t\t\tconst zoomLevel = this.get(\"zoomLevel\", 1);\n\n\t\t\t\t\t\t\tconst maxPanOut = this.get(\"maxPanOut\", 0.4);\n\t\t\t\t\t\t\tconst bounds = this._mapBounds;\n\n\t\t\t\t\t\t\tconst w = this.width();\n\t\t\t\t\t\t\tconst h = this.height();\n\n\t\t\t\t\t\t\tconst ww = bounds[1][0] - bounds[0][0];\n\t\t\t\t\t\t\tconst hh = bounds[1][1] - bounds[0][1];\n\n\t\t\t\t\t\t\tif (panX == \"translateX\") {\n\t\t\t\t\t\t\t\tx += local.x - downPoint.x;\n\n\t\t\t\t\t\t\t\tconst cx = w / 2 - (w / 2 - this._centerX) * zoomLevel;\n\t\t\t\t\t\t\t\tx = Math.min(x, cx + ww * maxPanOut * zoomLevel);\n\t\t\t\t\t\t\t\tx = Math.max(x, cx - ww * maxPanOut * zoomLevel);\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (panY == \"translateY\") {\n\t\t\t\t\t\t\t\ty += local.y - downPoint.y;\n\t\t\t\t\t\t\t\tconst cy = h / 2 - (h / 2 - this._centerY) * zoomLevel;\n\t\t\t\t\t\t\t\ty = Math.min(y, cy + hh * maxPanOut * zoomLevel);\n\t\t\t\t\t\t\t\ty = Math.max(y, cy - hh * maxPanOut * zoomLevel);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tthis.set(\"translateX\", x);\n\t\t\t\t\t\t\tthis.set(\"translateY\", y);\n\n\t\t\t\t\t\t\tif (projection.invert) {\n\t\t\t\t\t\t\t\tlet downLocation = projection.invert([downPoint.x, downPoint.y]);\n\t\t\t\t\t\t\t\tif (location && downLocation) {\n\t\t\t\t\t\t\t\t\tif (panX == \"rotateX\") {\n\t\t\t\t\t\t\t\t\t\tthis.set(\"rotationX\", this._downRotationX! - (downPoint.x - local.x) * this._pLon);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif (panY == \"rotateY\") {\n\t\t\t\t\t\t\t\t\t\tthis.set(\"rotationY\", this._downRotationY! + (downPoint.y - local.y) * this._pLat);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected _handleWheelRotateY(delta: number, duration: number, easing: (t: Time) => Time) {\n\t\tthis._rya = this.animate({ key: \"rotationY\", to: this.get(\"rotationY\", 0) - delta, duration: duration, easing: easing });\n\t}\n\n\tprotected _handleWheelRotateX(delta: number, duration: number, easing: (t: Time) => Time) {\n\t\tthis._rxa = this.animate({ key: \"rotationX\", to: this.get(\"rotationX\", 0) - delta, duration: duration, easing: easing });\n\t}\n\n\tprotected _handleWheelZoom(delta: number, point: IPoint) {\n\t\tlet step = this.get(\"zoomStep\", 2);\n\t\tlet zoomLevel = this.get(\"zoomLevel\", 1);\n\t\tlet newZoomLevel = zoomLevel;\n\t\tif (delta > 0) {\n\t\t\tnewZoomLevel = zoomLevel / step;\n\t\t}\n\t\telse if (delta < 0) {\n\t\t\tnewZoomLevel = zoomLevel * step;\n\t\t}\n\n\t\tif (newZoomLevel != zoomLevel) {\n\t\t\tthis.zoomToPoint(point, newZoomLevel)\n\t\t}\n\t}\n\n\t/**\n\t * Zoom the map to geographical bounds.\n\t *\n\t * @param geoBounds Bounds\n\t * @param duration Animation duration in milliseconds\n\t * @param rotationX X rotation of a map at the end of zoom\n\t * @param rotationY Y rotation of a map at the end of zoom\n\t */\n\tpublic zoomToGeoBounds(geoBounds: { left: number, right: number, top: number, bottom: number }, duration?: number, rotationX?: number, rotationY?: number): Animation<this[\"_settings\"][\"zoomLevel\"]> | undefined {\n\t\tif (geoBounds.right < geoBounds.left) {\n\t\t\tgeoBounds.right = 180;\n\t\t\tgeoBounds.left = -180;\n\t\t}\n\n\t\tconst geoPath = this.getPrivate(\"geoPath\");\n\t\tconst mapBounds = geoPath.bounds(this._geometryColection);\n\n\t\tlet p0 = this.convert({ longitude: geoBounds.left, latitude: geoBounds.top }, rotationX, rotationY);\n\t\tlet p1 = this.convert({ longitude: geoBounds.right, latitude: geoBounds.bottom }, rotationX, rotationY);\n\n\t\tif (p0.y < mapBounds[0][1]) {\n\t\t\tp0.y = mapBounds[0][1];\n\t\t}\n\n\t\tif (p1.y > mapBounds[1][1]) {\n\t\t\tp1.y = mapBounds[1][1];\n\t\t}\n\n\t\tlet zl = this.get(\"zoomLevel\", 1);\n\n\t\tlet bounds = { left: p0.x, right: p1.x, top: p0.y, bottom: p1.y };\n\n\t\tlet seriesContainer = this.seriesContainer;\n\n\t\tlet zoomLevel = .9 * Math.min(seriesContainer.innerWidth() / (bounds.right - bounds.left) * zl, seriesContainer.innerHeight() / (bounds.bottom - bounds.top) * zl);\n\t\tlet x = bounds.left + (bounds.right - bounds.left) / 2;\n\t\tlet y = bounds.top + (bounds.bottom - bounds.top) / 2;\n\n\t\tlet geoPoint = this.invert({ x, y });\n\n\t\tif (rotationX != null || rotationY != null) {\n\t\t\tthis.rotate(rotationX, rotationY);\n\t\t}\n\n\t\treturn this.zoomToGeoPoint(geoPoint, zoomLevel, true, duration);\n\t}\n\n\t/**\n\t * Zooms the map to specific screen point.\n\t *\n\t * @param point Point\n\t * @param level Zoom level\n\t * @param center Center the map\n\t * @param duration Duration of the animation in milliseconds\n\t */\n\tpublic zoomToPoint(point: IPoint, level: number, center?: boolean, duration?: number): Animation<this[\"_settings\"][\"zoomLevel\"]> | undefined {\n\t\tif (level) {\n\t\t\tlevel = $math.fitToRange(level, this.get(\"minZoomLevel\", 1), this.get(\"maxZoomLevel\", 32));\n\t\t}\n\n\t\tif (!$type.isNumber(duration)) {\n\t\t\tduration = this.get(\"animationDuration\", 0);\n\t\t}\n\t\tconst easing = this.get(\"animationEasing\");\n\t\tconst zoomLevel = this.get(\"zoomLevel\", 1);\n\n\t\tif (this.get(\"centerMapOnZoomOut\") && level == this.get(\"homeZoomLevel\", 1)) {\n\t\t\tpoint = this.convert(this.homeGeoPoint(), this.get(\"homeRotationX\"), this.get(\"homeRotationY\"));\n\t\t\tcenter = true;\n\t\t}\n\n\t\tlet x = point.x;\n\t\tlet y = point.y;\n\n\t\tlet tx = this.get(\"translateX\", 0);\n\t\tlet ty = this.get(\"translateY\", 0);\n\n\t\tlet cx = x;\n\t\tlet cy = y;\n\n\t\tif (center) {\n\t\t\tcx = this.width() / 2;\n\t\t\tcy = this.height() / 2;\n\t\t}\n\n\t\tlet xx = cx - ((x - tx) / zoomLevel * level);\n\t\tlet yy = cy - ((y - ty) / zoomLevel * level);\n\n\n\t\tthis._txa = this.animate({ key: \"translateX\", to: xx, duration: duration, easing: easing });\n\t\tthis._tya = this.animate({ key: \"translateY\", to: yy, duration: duration, easing: easing });\n\t\tthis._za = this.animate({ key: \"zoomLevel\", to: level, duration: duration, easing: easing });\n\n\t\tif (zoomLevel != level) {\n\t\t\tthis._root.readerAlert(this._t(\"Zoom level changed to %1\", this._root.locale, $type.numberToString(level)));\n\t\t}\n\n\t\treturn this._za;\n\t}\n\n\t/**\n\t * Zooms the map to specific geographical point.\n\t *\n\t * @param geoPoint Point\n\t * @param level Zoom level\n\t * @param center Center the map\n\t * @param duration Duration of the animation in milliseconds\n\t * @param rotationX X rotation of a map at the end of zoom\n\t * @param rotationY Y rotation of a map at the end of zoom\n\t * \n\t */\n\tpublic zoomToGeoPoint(geoPoint: IGeoPoint, level: number, center?: boolean, duration?: number, rotationX?: number, rotationY?: number): Animation<this[\"_settings\"][\"zoomLevel\"]> | undefined {\n\n\t\tlet xy = this.convert(geoPoint, rotationX, rotationY);\n\n\t\tif (rotationX != null || rotationY != null) {\n\t\t\tthis.rotate(rotationX, rotationY, duration);\n\t\t}\n\n\t\tif (xy) {\n\t\t\treturn this.zoomToPoint(xy, level, center, duration);\n\t\t}\n\t}\n\n\tpublic rotate(rotationX?: number, rotationY?: number, duration?: number) {\n\t\tconst projection = this.get(\"projection\")!;\n\t\tif (!projection.rotate) {\n\t\t}\n\t\telse {\n\t\t\tif (!$type.isNumber(duration)) {\n\t\t\t\tduration = this.get(\"animationDuration\", 0);\n\t\t\t}\n\n\t\t\tconst easing = this.get(\"animationEasing\");\n\t\t\tif (rotationX != null) {\n\t\t\t\tthis.animate({ key: \"rotationX\", to: rotationX, duration: duration, easing: easing });\n\t\t\t}\n\t\t\tif (rotationY != null) {\n\t\t\t\tthis.animate({ key: \"rotationY\", to: rotationY, duration: duration, easing: easing });\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Zooms the map in.\n\t */\n\tpublic zoomIn(): Animation<this[\"_settings\"][\"zoomLevel\"]> | undefined {\n\t\treturn this.zoomToPoint({ x: this.width() / 2, y: this.height() / 2 }, this.get(\"zoomLevel\", 1) * this.get(\"zoomStep\", 2));\n\t}\n\n\t/**\n\t * Zooms the map out.\n\t */\n\tpublic zoomOut(): Animation<this[\"_settings\"][\"zoomLevel\"]> | undefined {\n\t\treturn this.zoomToPoint({ x: this.width() / 2, y: this.height() / 2 }, this.get(\"zoomLevel\", 1) / this.get(\"zoomStep\", 2));\n\t}\n\n\tpublic _clearDirty() {\n\t\tsuper._clearDirty();\n\t\tthis._dirtyGeometries = false;\n\t\tthis._mapFitted = false;\n\t}\n\n\t/**\n\t * Returns area of a mapPolygon in square pixels.\n\t */\n\tpublic getArea(dataItem: DataItem<IMapPolygonSeriesDataItem>): number {\n\t\tconst geoPath = this.getPrivate(\"geoPath\");\n\t\tconst geometry = dataItem.get(\"geometry\");\n\t\tif (geometry) {\n\t\t\treturn geoPath.area(geometry);\n\t\t}\n\t\treturn 0;\n\t}\n}\n","import identity from \"../identity.js\";\nimport stream from \"../stream.js\";\nimport pathArea from \"./area.js\";\nimport pathBounds from \"./bounds.js\";\nimport pathCentroid from \"./centroid.js\";\nimport PathContext from \"./context.js\";\nimport pathMeasure from \"./measure.js\";\nimport PathString from \"./string.js\";\n\nexport default function(projection, context) {\n let digits = 3,\n pointRadius = 4.5,\n projectionStream,\n contextStream;\n\n function path(object) {\n if (object) {\n if (typeof pointRadius === \"function\") contextStream.pointRadius(+pointRadius.apply(this, arguments));\n stream(object, projectionStream(contextStream));\n }\n return contextStream.result();\n }\n\n path.area = function(object) {\n stream(object, projectionStream(pathArea));\n return pathArea.result();\n };\n\n path.measure = function(object) {\n stream(object, projectionStream(pathMeasure));\n return pathMeasure.result();\n };\n\n path.bounds = function(object) {\n stream(object, projectionStream(pathBounds));\n return pathBounds.result();\n };\n\n path.centroid = function(object) {\n stream(object, projectionStream(pathCentroid));\n return pathCentroid.result();\n };\n\n path.projection = function(_) {\n if (!arguments.length) return projection;\n projectionStream = _ == null ? (projection = null, identity) : (projection = _).stream;\n return path;\n };\n\n path.context = function(_) {\n if (!arguments.length) return context;\n contextStream = _ == null ? (context = null, new PathString(digits)) : new PathContext(context = _);\n if (typeof pointRadius !== \"function\") contextStream.pointRadius(pointRadius);\n return path;\n };\n\n path.pointRadius = function(_) {\n if (!arguments.length) return pointRadius;\n pointRadius = typeof _ === \"function\" ? _ : (contextStream.pointRadius(+_), +_);\n return path;\n };\n\n path.digits = function(_) {\n if (!arguments.length) return digits;\n if (_ == null) digits = null;\n else {\n const d = Math.floor(_);\n if (!(d >= 0)) throw new RangeError(`invalid digits: ${_}`);\n digits = d;\n }\n if (context === null) contextStream = new PathString(digits);\n return path;\n };\n\n return path.projection(projection).digits(digits).context(context);\n}\n","import { Theme } from \"../../core/Theme\";\r\nimport { setColor } from \"../../themes/DefaultTheme\";\r\n\r\nimport { geoMercator } from \"d3-geo\";\r\n\r\nimport * as $ease from \"../../core/util/Ease\";\r\n\r\n\r\n/**\r\n * @ignore\r\n */\r\nexport class MapChartDefaultTheme extends Theme {\r\n\tprotected setupDefaultRules() {\r\n\t\tsuper.setupDefaultRules();\r\n\r\n\t\tconst ic = this._root.interfaceColors;\r\n\t\tconst r = this.rule.bind(this);\r\n\r\n\t\t/**\r\n\t\t * ========================================================================\r\n\t\t * charts/map\r\n\t\t * ========================================================================\r\n\t\t */\r\n\r\n\t\tr(\"MapChart\").setAll({\r\n\t\t\tprojection: geoMercator(),\r\n\t\t\tpanX: \"translateX\",\r\n\t\t\tpanY: \"translateY\",\r\n\t\t\tpinchZoom: true,\r\n\t\t\tzoomStep: 2,\r\n\t\t\tzoomLevel: 1,\r\n\t\t\trotationX: 0,\r\n\t\t\trotationY: 0,\r\n\t\t\trotationZ: 0,\r\n\t\t\tmaxZoomLevel: 32,\r\n\t\t\tminZoomLevel: 1,\r\n\t\t\twheelY: \"zoom\",\r\n\t\t\twheelX: \"none\",\r\n\t\t\tanimationEasing: $ease.out($ease.cubic),\r\n\t\t\twheelEasing: $ease.out($ease.cubic),\r\n\t\t\twheelDuration: 0,\r\n\t\t\twheelSensitivity: 1,\r\n\t\t\tmaxPanOut: 0.4,\r\n\t\t\tcenterMapOnZoomOut: true\r\n\t\t});\r\n\r\n\t\t{\r\n\t\t\tconst rule = r(\"MapLine\");\r\n\r\n\t\t\trule.setAll({\r\n\t\t\t\tprecision: 0.5,\r\n\t\t\t\trole: \"figure\",\r\n\t\t\t});\r\n\r\n\t\t\tsetColor(rule, \"stroke\", ic, \"grid\");\r\n\t\t}\r\n\r\n\t\tr(\"MapPolygonSeries\").setAll({\r\n\t\t\taffectsBounds: true\r\n\t\t})\r\n\r\n\r\n\t\tr(\"MapPointSeries\").setAll({\r\n\t\t\taffectsBounds: false,\r\n\t\t\tclipFront: false,\r\n\t\t\tclipBack: true,\r\n\t\t\tautoScale: false\r\n\t\t})\r\n\r\n\t\tr(\"ClusteredPointSeries\").setAll({\r\n\t\t\tminDistance: 20,\r\n\t\t\tscatterDistance: 3,\r\n\t\t\tscatterRadius: 8,\r\n\t\t\tstopClusterZoom: 0.95\r\n\t\t})\r\n\r\n\t\tr(\"MapLineSeries\").setAll({\r\n\t\t\taffectsBounds: false\r\n\t\t})\r\n\r\n\t\t{\r\n\t\t\tconst rule = r(\"MapPolygon\");\r\n\r\n\t\t\trule.setAll({\r\n\t\t\t\tprecision: 0.5,\r\n\t\t\t\tisMeasured: false,\r\n\t\t\t\trole: \"figure\",\r\n\t\t\t\tfillOpacity: 1,\r\n\t\t\t\tposition: \"absolute\",\r\n\t\t\t\tstrokeWidth: 0.2,\r\n\t\t\t\tstrokeOpacity: 1\r\n\t\t\t});\r\n\r\n\t\t\tsetColor(rule, \"fill\", ic, \"primaryButton\");\r\n\t\t\tsetColor(rule, \"stroke\", ic, \"background\");\r\n\t\t}\r\n\r\n\r\n\t\tr(\"Button\", [\"zoomtools\", \"home\"]).setAll({\r\n\t\t\tvisible: false\r\n\t\t});\r\n\r\n\t\t/**\r\n\t\t * ------------------------------------------------------------------------\r\n\t\t * charts/map: Series\r\n\t\t * ------------------------------------------------------------------------\r\n\t\t */\r\n\r\n\t\tr(\"GraticuleSeries\").setAll({\r\n\t\t\tstep: 10\r\n\t\t});\r\n\t}\r\n}\r\n","import length from \"./length.js\";\n\nvar coordinates = [null, null],\n object = {type: \"LineString\", coordinates: coordinates};\n\nexport default function(a, b) {\n coordinates[0] = a;\n coordinates[1] = b;\n return length(object);\n}\n","import type { MapLineSeries, IMapLineSeriesDataItem } from \"./MapLineSeries\";\nimport type { IGeoPoint } from \"../../core/util/IGeoPoint\";\nimport type { DataItem } from \"../../core/render/Component\";\nimport type { IPoint } from \"../../core/util/IPoint\";\nimport * as $type from \"../../core/util/Type\";\nimport { Percent } from \"../../core/util/Percent\";\n\nimport { Graphics, IGraphicsSettings, IGraphicsPrivate, IGraphicsEvents } from \"../../core/render/Graphics\";\nimport { geoLength, geoInterpolate, geoDistance } from \"d3-geo\";\n\nexport interface IMapLineSettings extends IGraphicsSettings {\n\n\t/**\n\t * A GeoJSON representation of the polygons geometry.\n\t */\n\tgeometry?: GeoJSON.LineString | GeoJSON.MultiLineString;\n\n\t/**\n\t * @todo needs description\n\t * @default 0.5\n\t */\n\tprecision?: number;\n}\n\nexport interface IMapLinePrivate extends IGraphicsPrivate {\n\n\t/**\n\t * @ignore\n\t */\n\tseries: MapLineSeries;\n}\n\nexport interface IMapLineEvents extends IGraphicsEvents {\n\n\t/**\n\t * Invoked when line is redrawn\n\t */\n\tlinechanged: {};\n}\n\n/**\n * A line object in a [[MapLineSeries]].\n */\nexport class MapLine extends Graphics {\n\n\tdeclare public _settings: IMapLineSettings;\n\tdeclare public _privateSettings: IMapLinePrivate;\n\tdeclare public _events: IMapLineEvents;\n\n\tpublic static className: string = \"MapLine\";\n\tpublic static classNames: Array<string> = Graphics.classNames.concat([MapLine.className]);\n\tprotected _projectionDirty: boolean = false;\n\n\tpublic _beforeChanged() {\n\t\tsuper._beforeChanged();\n\n\t\tif (this._projectionDirty || this.isDirty(\"geometry\") || this.isDirty(\"precision\")) {\n\t\t\tconst geometry = this.get(\"geometry\")!;\n\t\t\tif (geometry) {\n\t\t\t\tconst series = this.getPrivate(\"series\");\n\t\t\t\tif (series) {\n\t\t\t\t\tconst chart = series.chart;\n\t\t\t\t\tif (chart) {\n\t\t\t\t\t\tconst projection = chart.get(\"projection\");\n\t\t\t\t\t\tlet clipAngle: number | null = null;\n\n\t\t\t\t\t\tif (projection && projection.clipAngle) {\n\t\t\t\t\t\t\tclipAngle = projection.clipAngle();\n\t\t\t\t\t\t\tprojection.precision(this.get(\"precision\", 0.5));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst dataItem = this.dataItem as DataItem<IMapLineSeriesDataItem>;\n\t\t\t\t\t\tconst geoPath = chart.getPrivate(\"geoPath\");\n\t\t\t\t\t\tif (geoPath && dataItem) {\n\t\t\t\t\t\t\tthis._clear = true;\n\t\t\t\t\t\t\tif (dataItem.get(\"lineType\", series.get(\"lineType\")) == \"straight\") {\n\n\t\t\t\t\t\t\t\tconst geometry = this.get(\"geometry\")!;\n\n\t\t\t\t\t\t\t\tif (geometry) {\n\t\t\t\t\t\t\t\t\tlet coordinates = geometry.coordinates;\n\t\t\t\t\t\t\t\t\tif (coordinates) {\n\n\t\t\t\t\t\t\t\t\t\tlet segments!: number[][][];\n\n\t\t\t\t\t\t\t\t\t\tif (geometry.type == \"LineString\") {\n\t\t\t\t\t\t\t\t\t\t\tsegments = [coordinates] as number[][][];\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse if (geometry.type == \"MultiLineString\") {\n\t\t\t\t\t\t\t\t\t\t\tsegments = coordinates as number[][][];\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tthis.set(\"draw\", (display) => {\n\t\t\t\t\t\t\t\t\t\t\tfor (let s = 0; s < segments.length; s++) {\n\t\t\t\t\t\t\t\t\t\t\t\tlet segment = segments[s];\n\t\t\t\t\t\t\t\t\t\t\t\tif (segment.length > 0) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst gp0 = segment[0];\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst p0 = chart.convert({ longitude: gp0[0], latitude: gp0[1] })\n\t\t\t\t\t\t\t\t\t\t\t\t\tdisplay.lineTo(p0.x, p0.y);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor (let p = 0; p < segment.length; p++) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst gp = segment[p];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst pn = chart.convert({ longitude: gp[0], latitude: gp[1] })\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdisplay.lineTo(pn.x, pn.y);\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tthis.set(\"draw\", (_display) => {\n\t\t\t\t\t\t\t\t\tif (projection && series.get(\"clipBack\") === false) {\n\t\t\t\t\t\t\t\t\t\tprojection.clipAngle(180);\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tgeoPath.context(this._display as any);\n\t\t\t\t\t\t\t\t\tgeoPath(geometry);\n\t\t\t\t\t\t\t\t\tgeoPath.context(null);\n\n\t\t\t\t\t\t\t\t\tif (projection && projection.clipAngle) {\n\t\t\t\t\t\t\t\t\t\tprojection.clipAngle(clipAngle as any);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst type = \"linechanged\";\n\t\t\tif (this.events.isEnabled(type)) {\n\t\t\t\tthis.events.dispatch(type, { type: type, target: this });\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic markDirtyProjection() {\n\t\tthis.markDirty();\n\t\tthis._projectionDirty = true;\n\t}\n\n\tpublic _clearDirty() {\n\t\tsuper._clearDirty();\n\t\tthis._projectionDirty = false;\n\t}\n\n\tpublic _getTooltipPoint(): IPoint {\n\t\tlet tooltipX = this.get(\"tooltipX\");\n\t\tlet tooltipY = this.get(\"tooltipY\");\n\n\t\tlet x = 0;\n\t\tlet y = 0;\n\n\t\tif ($type.isNumber(tooltipX)) {\n\t\t\tx = tooltipX;\n\t\t}\n\n\t\tif ($type.isNumber(tooltipY)) {\n\t\t\ty = tooltipY;\n\t\t}\n\n\t\tif (tooltipX instanceof Percent) {\n\t\t\tconst geoPoint = this.positionToGeoPoint(tooltipX.value)\n\t\t\tconst series = this.getPrivate(\"series\");\n\t\t\tif (series) {\n\t\t\t\tconst chart = series.chart;\n\t\t\t\tif (chart) {\n\t\t\t\t\tconst point = chart.convert(geoPoint);\n\t\t\t\t\tx = point.x;\n\t\t\t\t\ty = point.y;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn { x, y };\n\t}\n\n\t/**\n\t * Converts relative position along the line (0-1) into pixel coordinates.\n\t *\n\t * @param position Position (0-1)\n\t * @return Coordinates\n\t */\n\tpublic positionToGeoPoint(position: number): IGeoPoint {\n\n\t\tconst geometry = this.get(\"geometry\")!;\n\t\tconst series = this.getPrivate(\"series\");\n\t\tconst chart = series.chart;\n\t\tconst dataItem = this.dataItem as DataItem<IMapLineSeriesDataItem>;\n\n\t\tif (geometry && series && chart && dataItem) {\n\t\t\tconst lineType = dataItem.get(\"lineType\", series.get(\"lineType\"));\n\t\t\tlet totalDistance: number = geoLength(geometry);\n\t\t\tlet currentDistance: number = 0;\n\n\t\t\tlet distanceAB: number;\n\t\t\tlet positionA: number = 0;\n\t\t\tlet positionB: number = 0;\n\t\t\tlet pointA!: [number, number];\n\t\t\tlet pointB!: [number, number];\n\n\t\t\tlet coordinates = geometry.coordinates;\n\t\t\tif (coordinates) {\n\t\t\t\tlet segments!: number[][][];\n\n\t\t\t\tif (geometry.type == \"LineString\") {\n\t\t\t\t\tsegments = [coordinates] as number[][][];\n\t\t\t\t}\n\t\t\t\telse if (geometry.type == \"MultiLineString\") {\n\t\t\t\t\tsegments = coordinates as number[][][];\n\t\t\t\t}\n\n\t\t\t\tfor (let s = 0; s < segments.length; s++) {\n\t\t\t\t\tlet segment = segments[s];\n\t\t\t\t\tif (segment.length > 1) {\n\t\t\t\t\t\tfor (let p = 1; p < segment.length; p++) {\n\t\t\t\t\t\t\tpointA = segment[p - 1] as [number, number];\n\t\t\t\t\t\t\tpointB = segment[p] as [number, number];\n\n\t\t\t\t\t\t\tpositionA = currentDistance / totalDistance;\n\t\t\t\t\t\t\tdistanceAB = geoDistance(pointA, pointB);\n\t\t\t\t\t\t\tcurrentDistance += distanceAB;\n\t\t\t\t\t\t\tpositionB = currentDistance / totalDistance;\n\n\t\t\t\t\t\t\tif (positionA <= position && positionB > position) {\n\t\t\t\t\t\t\t\ts = segments.length;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if (segment.length == 1) {\n\t\t\t\t\t\tpointA = segment[0] as [number, number];\n\t\t\t\t\t\tpointB = segment[0] as [number, number];\n\t\t\t\t\t\tpositionA = 0;\n\t\t\t\t\t\tpositionB = 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (pointA && pointB) {\n\t\t\t\t\tlet positionAB: number = (position - positionA) / (positionB - positionA);\n\t\t\t\t\tlet location: number[];\n\n\t\t\t\t\tif (lineType == \"straight\") {\n\t\t\t\t\t\tlet p0 = chart.convert({ longitude: pointA[0], latitude: pointA[1] });\n\t\t\t\t\t\tlet p1 = chart.convert({ longitude: pointB[0], latitude: pointB[1] });\n\n\t\t\t\t\t\tlet x = p0.x + (p1.x - p0.x) * positionAB;\n\t\t\t\t\t\tlet y = p0.y + (p1.y - p0.y) * positionAB;\n\n\t\t\t\t\t\treturn chart.invert({ x: x, y: y });\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tlocation = geoInterpolate(pointA, pointB)(positionAB);\n\t\t\t\t\t\treturn { longitude: location[0], latitude: location[1] }\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn { longitude: 0, latitude: 0 };\n\t}\n}\n","import {asin, atan2, cos, degrees, haversin, radians, sin, sqrt} from \"./math.js\";\n\nexport default function(a, b) {\n var x0 = a[0] * radians,\n y0 = a[1] * radians,\n x1 = b[0] * radians,\n y1 = b[1] * radians,\n cy0 = cos(y0),\n sy0 = sin(y0),\n cy1 = cos(y1),\n sy1 = sin(y1),\n kx0 = cy0 * cos(x0),\n ky0 = cy0 * sin(x0),\n kx1 = cy1 * cos(x1),\n ky1 = cy1 * sin(x1),\n d = 2 * asin(sqrt(haversin(y1 - y0) + cy0 * cy1 * haversin(x1 - x0))),\n k = sin(d);\n\n var interpolate = d ? function(t) {\n var B = sin(t *= d) / k,\n A = sin(d - t) / k,\n x = A * kx0 + B * kx1,\n y = A * ky0 + B * ky1,\n z = A * sy0 + B * sy1;\n return [\n atan2(y, x) * degrees,\n atan2(z, sqrt(x * x + y * y)) * degrees\n ];\n } : function() {\n return [x0 * degrees, y0 * degrees];\n };\n\n interpolate.distance = d;\n\n return interpolate;\n}\n","import type { IMapPointSeriesDataItem } from \"./MapPointSeries\";\nimport type { DataItem } from \"../../core/render/Component\";\n\nimport { MapSeries, IMapSeriesSettings, IMapSeriesDataItem, IMapSeriesPrivate } from \"./MapSeries\";\nimport { MapLine } from \"./MapLine\";\nimport { ListTemplate } from \"../../core/util/List\";\nimport { Template } from \"../../core/util/Template\";\n\nimport * as $array from \"../../core/util/Array\";\n\n/**\n * @ignore\n */\nexport interface IMapLineSeriesPrivate extends IMapSeriesPrivate {\n}\n\nexport interface IMapLineSeriesDataItem extends IMapSeriesDataItem {\n\n\t/**\n\t * Related [[MapLine]] object.\n\t */\n\tmapLine?: MapLine;\n\n\t/**\n\t * GeoJSON geometry of the line.\n\t */\n\tgeometry?: GeoJSON.LineString | GeoJSON.MultiLineString;\n\n\t/**\n\t * An array of data items from [[MapPointSeries]] to use as line end-points. Note, fixed points can not be used here.\n\t */\n\tpointsToConnect?: Array<DataItem<IMapPointSeriesDataItem>>;\n\n\t/**\n\t * A line type.\n\t *\n\t * * `\"curved\"` (default) - connects points using shortest distance, which will result in curved lines based on map projection.\n\t * * `\"straight\"` - connects points using visually straight lines, and will not cross the -180/180 longitude.\n\t *\n\t * @default \"curved\"\n\t * @since 5.2.32\n\t */\n\tlineType?: \"curved\" | \"straight\"\n\n}\n\nexport interface IMapLineSeriesSettings extends IMapSeriesSettings {\n\n\t/**\n\t * If set to `true` will hide line segments that are in the invisible range\n\t * of the map.\n\t *\n\t * For example on the side of the globe facing away from the viewer when\n\t * used with Orthographic projection.\n\t *\n\t * NOTE: not all projections have invisible side.\n\t */\n\tclipBack?: boolean;\n\n\t/**\n\t * A line type.\n\t *\n\t * * `\"curved\"` (default) - connects points using shortest distance, which will result in curved lines based on map projection.\n\t * * `\"straight\"` - connects points using visually straight lines, and will not cross the -180/180 longitude.\n\t *\n\t * @default \"curved\"\n\t * @since 5.2.24\n\t */\n\tlineType?: \"curved\" | \"straight\"\n\n\n\t/**\n\t * @ignore\n\t */\n\tlineTypeField?: string;\n}\n\n/**\n * Creates a map series for displaying lines on the map.\n *\n * @see {@link https://www.amcharts.com/docs/v5/charts/map-chart/map-line-series/} for more info\n * @important\n */\nexport class MapLineSeries extends MapSeries {\n\n\tprotected _afterNew() {\n\t\tthis.fields.push(\"lineType\");\n\t\tthis._setRawDefault(\"lineTypeField\", \"lineType\");\n\t\tsuper._afterNew();\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic makeMapLine(dataItem: DataItem<this[\"_dataItemSettings\"]>): MapLine {\n\t\tconst mapLine = this.children.push(this.mapLines.make());\n\t\tmapLine._setDataItem(dataItem);\n\t\tthis.mapLines.push(mapLine);\n\t\treturn mapLine;\n\t}\n\n\t/**\n\t * A [[ListTemplate]] of all lines in series.\n\t *\n\t * `mapLines.template` can also be used to configure lines.\n\t *\n\t * @default new ListTemplate<MapLine>\n\t */\n\tpublic readonly mapLines: ListTemplate<MapLine> = this.addDisposer(new ListTemplate(\n\t\tTemplate.new({}),\n\t\t() => MapLine._new(this._root, {}, [this.mapLines.template])\n\t));\n\n\tpublic static className: string = \"MapLineSeries\";\n\tpublic static classNames: Array<string> = MapSeries.classNames.concat([MapLineSeries.className]);\n\n\tdeclare public _settings: IMapLineSeriesSettings;\n\tdeclare public _privateSettings: IMapLineSeriesPrivate;\n\tdeclare public _dataItemSettings: IMapLineSeriesDataItem;\n\n\tprotected _types: Array<GeoJSON.GeoJsonGeometryTypes> = [\"LineString\", \"MultiLineString\"];\n\n\t/**\n\t * @ignore\n\t */\n\tpublic markDirtyProjection() {\n\t\t$array.each(this.dataItems, (dataItem) => {\n\t\t\tlet mapLine = dataItem.get(\"mapLine\");\n\t\t\tif (mapLine) {\n\t\t\t\tmapLine.markDirtyProjection();\n\t\t\t}\n\t\t})\n\t}\n\n\tpublic _prepareChildren() {\n\t\tsuper._prepareChildren();\n\n\t\tif (this.isDirty(\"stroke\")) {\n\t\t\tthis.mapLines.template.set(\"stroke\", this.get(\"stroke\"));\n\t\t}\n\t}\n\n\tprotected processDataItem(dataItem: DataItem<this[\"_dataItemSettings\"]>) {\n\t\tsuper.processDataItem(dataItem);\n\n\t\tlet mapLine = dataItem.get(\"mapLine\");\n\t\tif (!mapLine) {\n\t\t\tmapLine = this.makeMapLine(dataItem);\n\t\t}\n\n\t\tthis._handlePointsToConnect(dataItem);\n\t\tdataItem.on(\"pointsToConnect\", () => {\n\t\t\tthis._handlePointsToConnect(dataItem);\n\t\t})\n\n\t\tdataItem.set(\"mapLine\", mapLine);\n\n\t\tthis._addGeometry(dataItem.get(\"geometry\"), this);\n\n\t\tmapLine.setPrivate(\"series\", this);\n\t}\n\n\tprotected _handlePointsToConnect(dataItem: DataItem<this[\"_dataItemSettings\"]>) {\n\n\t\tconst pointsToConnect = dataItem.get(\"pointsToConnect\");\n\t\tif (pointsToConnect) {\n\t\t\t$array.each(pointsToConnect, (point) => {\n\n\t\t\t\tpoint.on(\"geometry\", () => {\n\t\t\t\t\tthis.markDirtyValues(dataItem);\n\t\t\t\t})\n\n\t\t\t\tpoint.on(\"longitude\", () => {\n\t\t\t\t\tthis.markDirtyValues(dataItem);\n\t\t\t\t})\n\n\t\t\t\tpoint.on(\"latitude\", () => {\n\t\t\t\t\tthis.markDirtyValues(dataItem);\n\t\t\t\t})\n\t\t\t})\n\n\t\t\tthis.markDirtyValues(dataItem);\n\t\t}\n\t}\n\n\t/**\n\t * Forces a repaint of the element which relies on data.\n\t *\n\t * @since 5.0.21\n\t */\n\tpublic markDirtyValues(dataItem: DataItem<this[\"_dataItemSettings\"]>) {\n\t\tsuper.markDirtyValues();\n\t\tif (dataItem) {\n\t\t\tconst mapLine = dataItem.get(\"mapLine\");\n\t\t\tif (mapLine) {\n\t\t\t\tconst pointsToConnect = dataItem.get(\"pointsToConnect\");\n\t\t\t\tif (pointsToConnect) {\n\t\t\t\t\tlet coordinates: Array<Array<number>> = [];\n\t\t\t\t\t$array.each(pointsToConnect, (point) => {\n\t\t\t\t\t\tconst longitude = point.get(\"longitude\");\n\t\t\t\t\t\tconst latitude = point.get(\"latitude\");\n\t\t\t\t\t\tif (longitude != null && latitude != null) {\n\t\t\t\t\t\t\tcoordinates.push([longitude, latitude]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tconst geometry = point.get(\"geometry\");\n\t\t\t\t\t\t\tif (geometry) {\n\t\t\t\t\t\t\t\tconst coords = geometry.coordinates;\n\t\t\t\t\t\t\t\tif (coords) {\n\t\t\t\t\t\t\t\t\tcoordinates.push([coords[0] as any, coords[1] as any]);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\n\t\t\t\t\tlet geometry: any = { type: \"LineString\", coordinates: coordinates };\n\n\t\t\t\t\tdataItem.setRaw(\"geometry\", geometry);\n\t\t\t\t\tmapLine.set(\"geometry\", geometry);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tmapLine.set(\"geometry\", dataItem.get(\"geometry\"));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic disposeDataItem(dataItem: DataItem<this[\"_dataItemSettings\"]>) {\n\t\tsuper.disposeDataItem(dataItem);\n\t\tconst mapLine = dataItem.get(\"mapLine\");\n\t\tif (mapLine) {\n\t\t\tthis.mapLines.removeValue(mapLine);\n\t\t\tmapLine.dispose();\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tprotected _excludeDataItem(dataItem: DataItem<this[\"_dataItemSettings\"]>) {\n\t\tsuper._excludeDataItem(dataItem);\n\t\tconst mapLine = dataItem.get(\"mapLine\");\n\t\tif (mapLine) {\n\t\t\tmapLine.setPrivate(\"visible\", false);\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tprotected _unexcludeDataItem(dataItem: DataItem<this[\"_dataItemSettings\"]>) {\n\t\tsuper._unexcludeDataItem(dataItem);\n\t\tconst mapLine = dataItem.get(\"mapLine\");\n\t\tif (mapLine) {\n\t\t\tmapLine.setPrivate(\"visible\", true);\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tprotected _notIncludeDataItem(dataItem: DataItem<this[\"_dataItemSettings\"]>) {\n\t\tsuper._notIncludeDataItem(dataItem);\n\t\tconst mapLine = dataItem.get(\"mapLine\");\n\t\tif (mapLine) {\n\t\t\tmapLine.setPrivate(\"visible\", false);\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tprotected _unNotIncludeDataItem(dataItem: DataItem<this[\"_dataItemSettings\"]>) {\n\t\tsuper._unNotIncludeDataItem(dataItem);\n\t\tconst mapLine = dataItem.get(\"mapLine\");\n\t\tif (mapLine) {\n\t\t\tmapLine.setPrivate(\"visible\", true);\n\t\t}\n\t}\n}\n","import type { IMapLineSeriesDataItem, MapLineSeries } from \"./MapLineSeries\";\nimport type { IMapPolygonSeriesDataItem, MapPolygonSeries } from \"./MapPolygonSeries\";\nimport type { Bullet } from \"../../core/render/Bullet\";\nimport type { DataItem } from \"../../core/render/Component\";\nimport type { MapLine } from \"./MapLine\";\nimport type { MapPolygon } from \"./MapPolygon\";\n\nimport { MapSeries, IMapSeriesSettings, IMapSeriesDataItem, IMapSeriesPrivate } from \"./MapSeries\";\n\nimport * as $array from \"../../core/util/Array\";\nimport * as $type from \"../../core/util/Type\";\nimport * as $math from \"../../core/util/Math\";\nimport type { IPoint } from \"../../core/util/IPoint\";\nimport type { Animation } from \"../../core/util/Entity\";\nimport type { IDisposer } from \"../../core/util/Disposer\";\n\nexport interface IMapPointSeriesPrivate extends IMapSeriesPrivate {\n}\n\nexport interface IMapPointSeriesDataItem extends IMapSeriesDataItem {\n\n\t/**\n\t * GeoJSON geometry of the point.\n\t */\n\tgeometry?: GeoJSON.Point | GeoJSON.MultiPoint;\n\n\t/**\n\t * Longitude.\n\t */\n\tlongitude?: number;\n\n\t/**\n\t * Latitude.\n\t */\n\tlatitude?: number;\n\n\t/**\n\t * Relative position (0-1) on the [[MapLine]] to place point on.\n\t */\n\tpositionOnLine?: number;\n\n\t/**\n\t * Automatically rotate the point bullet to face the direction of the line\n\t * it is attached to.\n\t */\n\tautoRotate?: boolean;\n\n\t/**\n\t * The angle will be added to the automatically-calculated angle.\n\t *\n\t * Can be used to reverse the direction.\n\t */\n\tautoRotateAngle?: number;\n\n\t/**\n\t * A data item from a [[MapLineSeries]] the point is attached to.\n\t */\n\tlineDataItem?: DataItem<IMapLineSeriesDataItem>;\n\n\t/**\n\t * An ID of a [[MapLine]] the point is attached to.\n\t */\n\tlineId?: string;\n\n\t/**\n\t * A data item from a [[MapPolygonSeries]] to use for positioning of the\n\t * point.\n\t */\n\tpolygonDataItem?: DataItem<IMapPolygonSeriesDataItem>;\n\n\t/**\n\t * An ID of the [[MapPolygon]] to use for centering the point.\n\t */\n\tpolygonId?: string;\n\n\t/**\n\t * If set to `true`, the point will be drawn according to its `x` and `y`\n\t * coordinates, not its latitude and longitude.\n\t * \n\t * Fixed points will not move together with map, and can not be used to\n\t * connect points on a `MapLineSeries`.\n\t * \n\t * @default false\n\t * @since 5.2.34\n\t */\n\tfixed?: boolean;\n\n\t/**\n\t * Point (in pixels) of a data item\n\t */\n\tpoint?: IPoint;\n\n\t/**\n\t * @ignore\n\t */\n\tclipped?: boolean;\n}\n\nexport interface IMapPointSeriesSettings extends IMapSeriesSettings {\n\n\t/**\n\t * A field in data that holds an ID of the related polygon.\n\t *\n\t * If set, the point will be positioned in the visual center of the target\n\t * polygon.\n\t */\n\tpolygonIdField?: string;\n\n\t/**\n\t * If set to `true` will hide all points that are in the visible range of\n\t * the map.\n\t */\n\tclipFront?: boolean;\n\n\t/**\n\t * If set to `true` will hide all points that are in the invisible range of\n\t * the map.\n\t *\n\t * For example on the side of the globe facing away from the viewer when\n\t * used with Orthographic projection.\n\t *\n\t * NOTE: not all projections have invisible side.\n\t *\n\t * @default true\n\t */\n\tclipBack?: boolean;\n\n\t/**\n\t * A field in data that holds point's longitude.\n\t */\n\tlatitudeField?: string;\n\n\t/**\n\t * A field in data that holds point's longitude.\n\t */\n\tlongitudeField?: string;\n\n\t/**\n\t * A field in data that holds information if this point is fixed or moves with a map.\n\t */\n\tfixedField?: string;\n\n\t/**\n\t * If set to `true`, bullets will resize when zooming the [[MapChart]].\n\t * \n\t * @since 5.2.8\n\t * @default false\n\t */\n\tautoScale?: boolean\n\n};\n\n/**\n * Creates a map series for displaying markers on the map.\n *\n * @see {@link https://www.amcharts.com/docs/v5/charts/map-chart/map-point-series/} for more info\n * @important\n */\nexport class MapPointSeries extends MapSeries {\n\n\tpublic static className: string = \"MapPointSeries\";\n\tpublic static classNames: Array<string> = MapSeries.classNames.concat([MapPointSeries.className]);\n\n\tdeclare public _settings: IMapPointSeriesSettings;\n\tdeclare public _privateSettings: IMapPointSeriesPrivate;\n\tdeclare public _dataItemSettings: IMapPointSeriesDataItem;\n\n\tprotected _types: Array<GeoJSON.GeoJsonGeometryTypes> = [\"Point\", \"MultiPoint\"];\n\n\tprotected _lineChangedDp?: IDisposer;\n\n\tprotected _afterNew() {\n\t\tthis.fields.push(\"polygonId\", \"lineId\", \"longitude\", \"latitude\", \"fixed\");\n\t\tsuper._afterNew();\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic markDirtyProjection() {\n\t\tthis.markDirty();\n\t}\n\n\t/**\n\t * Forces a repaint of the element which relies on data.\n\t *\n\t * @since 5.0.21\n\t */\n\tpublic markDirtyValues(dataItem: DataItem<this[\"_dataItemSettings\"]>) {\n\t\tsuper.markDirtyValues();\n\n\t\tif (dataItem) {\n\t\t\tthis._positionBullets(dataItem);\n\t\t}\n\t}\n\n\tprotected processDataItem(dataItem: DataItem<this[\"_dataItemSettings\"]>) {\n\t\tsuper.processDataItem(dataItem);\n\t\tlet geometry = dataItem.get(\"geometry\");\n\t\tif (!geometry) {\n\t\t\tgeometry = { type: \"Point\", coordinates: [dataItem.get(\"longitude\", 0), dataItem.get(\"latitude\", 0)] };\n\t\t\tdataItem.set(\"geometry\", geometry);\n\t\t}\n\t\telse {\n\t\t\tif (geometry.type == \"Point\") {\n\t\t\t\tconst coordinates = geometry.coordinates;\n\t\t\t\tif (coordinates) {\n\t\t\t\t\tdataItem.set(\"longitude\", coordinates[0]);\n\t\t\t\t\tdataItem.set(\"latitude\", coordinates[1]);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (geometry.type == \"MultiPoint\") {\n\t\t\t\tconst coordinates = geometry.coordinates;\n\t\t\t\tif (coordinates && coordinates[0]) {\n\t\t\t\t\tdataItem.set(\"longitude\", coordinates[0][0]);\n\t\t\t\t\tdataItem.set(\"latitude\", coordinates[0][1]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis._addGeometry(geometry, this);\n\t}\n\n\tprotected _makeBullets(dataItem: DataItem<this[\"_dataItemSettings\"]>) {\n\t\tdataItem.bullets = [];\n\n\t\tthis.bullets.each((bulletFunction) => {\n\t\t\tconst geometry = dataItem.get(\"geometry\");\n\n\t\t\tif (geometry) {\n\t\t\t\tif (geometry.type == \"Point\") {\n\t\t\t\t\tthis._setBulletParent(this._makeBullet(dataItem, bulletFunction));\n\t\t\t\t}\n\t\t\t\telse if (geometry.type = \"MultiPoint\") {\n\t\t\t\t\tlet i = 0;\n\t\t\t\t\t$array.each(geometry.coordinates, () => {\n\t\t\t\t\t\tthis._setBulletParent(this._makeBullet(dataItem, bulletFunction, i));\n\t\t\t\t\t\ti++;\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t}\n\n\tprotected _setBulletParent(bullet?: Bullet) {\n\t\tif (bullet) {\n\t\t\tconst sprite = bullet.get(\"sprite\");\n\t\t\tconst chart = this.chart;\n\t\t\tif (sprite && chart) {\n\t\t\t\tconst dataItem = sprite.dataItem as DataItem<IMapPointSeriesDataItem>;\n\t\t\t\tif (dataItem) {\n\t\t\t\t\tif (dataItem.get(\"fixed\")) {\n\t\t\t\t\t\tif (sprite.parent != chart.bulletsContainer) {\n\t\t\t\t\t\t\tchart.bulletsContainer.children.moveValue(sprite);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (sprite.parent != this.bulletsContainer) {\n\t\t\t\t\t\t\tthis.bulletsContainer.children.moveValue(sprite);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic _positionBullet(bullet: Bullet) {\n\t\tconst sprite = bullet.get(\"sprite\");\n\t\tif (sprite) {\n\t\t\tconst dataItem = sprite.dataItem as DataItem<this[\"_dataItemSettings\"]>;\n\t\t\tif (dataItem && dataItem.get(\"fixed\")) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst latitude = dataItem.get(\"latitude\");\n\t\t\tconst longitude = dataItem.get(\"longitude\");\n\t\t\tconst lineDataItem = dataItem.get(\"lineDataItem\");\n\t\t\tconst fixed = dataItem.get(\"fixed\");\n\t\t\tconst chart = this.chart;\n\t\t\tlet line: MapLine | undefined;\n\t\t\tif (lineDataItem) {\n\t\t\t\tline = lineDataItem.get(\"mapLine\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\tconst lineId = dataItem.get(\"lineId\");\n\n\t\t\t\tif (lineId && chart) {\n\t\t\t\t\tchart.series.each((series) => {\n\t\t\t\t\t\tif (series.isType<MapLineSeries>(\"MapLineSeries\")) {\n\t\t\t\t\t\t\tlet lineDI = series.getDataItemById(lineId);\n\t\t\t\t\t\t\tif (lineDI) {\n\t\t\t\t\t\t\t\tdataItem.set(\"lineDataItem\", lineDI);\n\t\t\t\t\t\t\t\tline = lineDI.get(\"mapLine\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (this._lineChangedDp) {\n\t\t\t\tthis._lineChangedDp.dispose();\n\t\t\t}\n\n\t\t\tif (line) {\n\t\t\t\tthis._lineChangedDp = line.events.on(\"linechanged\", () => {\n\t\t\t\t\tthis._positionBullets(dataItem);\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tconst polygonDataItem = dataItem.get(\"polygonDataItem\");\n\t\t\tlet polygon: MapPolygon | undefined;\n\t\t\tif (polygonDataItem) {\n\t\t\t\tpolygon = polygonDataItem.get(\"mapPolygon\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\tconst polygonId = dataItem.get(\"polygonId\");\n\n\t\t\t\tif (polygonId && chart) {\n\t\t\t\t\tchart.series.each((series) => {\n\t\t\t\t\t\tif (series.isType<MapPolygonSeries>(\"MapPolygonSeries\")) {\n\t\t\t\t\t\t\tlet polygonDI = series.getDataItemById(polygonId);\n\t\t\t\t\t\t\tif (polygonDI) {\n\t\t\t\t\t\t\t\tdataItem.set(\"polygonDataItem\", polygonDI);\n\t\t\t\t\t\t\t\tpolygon = polygonDI.get(\"mapPolygon\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst positionOnLine = dataItem.get(\"positionOnLine\");\n\t\t\tlet coordinates: [number, number] | undefined;\n\n\t\t\tlet angle: number | undefined;\n\n\t\t\tif (polygon) {\n\t\t\t\tlet geoPoint = polygon.visualCentroid();\n\t\t\t\tcoordinates = [geoPoint.longitude, geoPoint.latitude];\n\t\t\t\tdataItem.setRaw(\"longitude\", geoPoint.longitude);\n\t\t\t\tdataItem.setRaw(\"latitude\", geoPoint.latitude);\n\t\t\t}\n\t\t\telse if (line && $type.isNumber(positionOnLine)) {\n\t\t\t\tlet geoPoint = line.positionToGeoPoint(positionOnLine);\n\t\t\t\tcoordinates = [geoPoint.longitude, geoPoint.latitude];\n\n\t\t\t\tif (dataItem.get(\"autoRotate\", bullet.get(\"autoRotate\")) && chart) {\n\t\t\t\t\tconst geoPoint0 = line.positionToGeoPoint(positionOnLine - 0.002);\n\t\t\t\t\tconst geoPoint1 = line.positionToGeoPoint(positionOnLine + 0.002);\n\n\t\t\t\t\tconst point0 = chart.convert(geoPoint0);\n\t\t\t\t\tconst point1 = chart.convert(geoPoint1);\n\n\t\t\t\t\t//dataItem.set(\"autoRotateAngle\", $math.getAngle(point0, point1));\n\t\t\t\t\tangle = $math.getAngle(point0, point1);\n\t\t\t\t}\n\n\t\t\t\tdataItem.setRaw(\"longitude\", geoPoint.longitude);\n\t\t\t\tdataItem.setRaw(\"latitude\", geoPoint.latitude);\n\t\t\t}\n\t\t\telse if ($type.isNumber(longitude) && $type.isNumber(latitude)) {\n\t\t\t\tcoordinates = [longitude, latitude];\n\t\t\t}\n\t\t\telse {\n\t\t\t\tconst geometry = dataItem.get(\"geometry\")!;\n\t\t\t\tif (geometry) {\n\t\t\t\t\tif (geometry.type == \"Point\") {\n\t\t\t\t\t\tthis._positionBulletReal(bullet, geometry, geometry.coordinates as [number, number], angle);\n\t\t\t\t\t}\n\t\t\t\t\telse if (geometry.type == \"MultiPoint\") {\n\t\t\t\t\t\tlet index = bullet._index || 0;\n\t\t\t\t\t\tcoordinates = geometry.coordinates[index] as [number, number];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!fixed && coordinates) {\n\t\t\t\tthis._positionBulletReal(bullet, { type: \"Point\", coordinates: coordinates }, coordinates, angle);\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected _positionBulletReal(bullet: Bullet, geometry: GeoJSON.Geometry, coordinates: [number, number], angle?: number) {\n\t\tconst sprite = bullet.get(\"sprite\");\n\t\tconst chart = this.chart;\n\t\tif (chart) {\n\t\t\tconst projection = chart.get(\"projection\")!;\n\t\t\tconst geoPath = chart.getPrivate(\"geoPath\");\n\t\t\tconst dataItem: DataItem<IMapPointSeriesDataItem> = sprite.dataItem as DataItem<IMapPointSeriesDataItem>;\n\n\t\t\tconst xy = projection(coordinates as any);\n\n\t\t\tif (xy) {\n\t\t\t\tconst point = { x: xy[0], y: xy[1] };\n\t\t\t\tsprite.setAll(point);\n\t\t\t\tdataItem.setRaw(\"point\", point);\n\t\t\t}\n\n\t\t\tlet visible = true;\n\t\t\tif (geoPath(geometry)) {\n\t\t\t\tif (this.get(\"clipFront\")) {\n\t\t\t\t\tvisible = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (this.get(\"clipBack\")) {\n\t\t\t\t\tvisible = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tsprite.setPrivate(\"visible\", visible);\n\t\t\tdataItem.set(\"clipped\", !visible);\n\n\t\t\tif (dataItem && angle != null && dataItem.get(\"autoRotate\", bullet.get(\"autoRotate\"))) {\n\t\t\t\tsprite.set(\"rotation\", angle + dataItem.get(\"autoRotateAngle\", bullet.get(\"autoRotateAngle\", 0)));\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Centers the map to specific series' data item and zooms to the level\n\t * specified in the parameters.\n\t *\n\t * @param dataItem Map point\n\t * @param zoomLevel Zoom level\n\t * @param rotate If it's true, the map will rotate so that this point would be in the center. Mostly usefull with geoOrthographic projection.\n\t */\n\tpublic zoomToDataItem(dataItem: DataItem<IMapPointSeriesDataItem>, zoomLevel: number, rotate?: boolean): Animation<any> | undefined {\n\t\tconst chart = this.chart;\n\t\tif (chart) {\n\t\t\tconst longitude = dataItem.get(\"longitude\", 0);\n\t\t\tconst latitude = dataItem.get(\"latitude\", 0);\n\t\t\tif (rotate) {\n\t\t\t\treturn chart.zoomToGeoPoint({ longitude: longitude, latitude: latitude }, zoomLevel, true, undefined, -longitude, -latitude);\n\t\t\t}\n\t\t\treturn chart.zoomToGeoPoint({ longitude: longitude, latitude: latitude }, zoomLevel, true);\n\t\t}\n\t}\n\n\n\t/**\n\t * Zooms the map in so that all points in the array are visible.\n\t *\n\t * @param dataItems An array of data items of points to zoom to\n\t * @param rotate Rotate the map so it is centered on the selected items\n\t * @return Animation\n\t * @since 5.5.6\n\t */\n\tpublic zoomToDataItems(dataItems: Array<DataItem<IMapPointSeriesDataItem>>, rotate?: boolean): Animation<any> | undefined {\n\n\t\tlet left: number | null = null;\n\t\tlet right: number | null = null;\n\t\tlet top: number | null = null;\n\t\tlet bottom: number | null = null;\n\n\t\t$array.each(dataItems, (dataItem) => {\n\t\t\tconst longitude = dataItem.get(\"longitude\", 0);\n\t\t\tconst latitude = dataItem.get(\"latitude\", 0);\n\n\t\t\tif (left == null || left > longitude) {\n\t\t\t\tleft = longitude;\n\t\t\t}\n\t\t\tif (right == null || right < longitude) {\n\t\t\t\tright = longitude;\n\t\t\t}\n\t\t\tif (top == null || top < latitude) {\n\t\t\t\ttop = latitude;\n\t\t\t}\n\t\t\tif (bottom == null || bottom > latitude) {\n\t\t\t\tbottom = latitude;\n\t\t\t}\n\t\t})\n\t\tif (left != null && right != null && top != null && bottom != null) {\n\t\t\tconst chart = this.chart;\n\t\t\tif (chart) {\n\t\t\t\tif (rotate) {\n\t\t\t\t\treturn chart.zoomToGeoBounds({ left, right, top, bottom }, undefined, -(left + (right - left) / 2), -(top + (top - bottom) / 2));\n\t\t\t\t}\n\t\t\t\treturn chart.zoomToGeoBounds({ left, right, top, bottom });\n\t\t\t}\n\t\t}\n\t}\n\n\n\t/**\n\t * @ignore\n\t */\n\tpublic disposeDataItem(dataItem: DataItem<this[\"_dataItemSettings\"]>) {\n\t\tconst chart = this.chart;\n\t\tif (chart) {\n\t\t\tchart.series.each((series) => {\n\t\t\t\tif (series.isType<MapLineSeries>(\"MapLineSeries\")) {\n\t\t\t\t\t$array.each(series.dataItems, (di) => {\n\t\t\t\t\t\tconst pointsToConnect = di.get(\"pointsToConnect\");\n\t\t\t\t\t\tif (pointsToConnect) {\n\t\t\t\t\t\t\t$array.each(pointsToConnect, (point) => {\n\t\t\t\t\t\t\t\tif (point == dataItem) {\n\t\t\t\t\t\t\t\t\t$array.remove(pointsToConnect, point);\n\t\t\t\t\t\t\t\t\tseries.markDirtyValues(di);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\n\t\tsuper.disposeDataItem(dataItem);\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tprotected _excludeDataItem(dataItem: DataItem<this[\"_dataItemSettings\"]>) {\n\t\tsuper._excludeDataItem(dataItem);\n\t\tconst bullets = dataItem.bullets;\n\t\tif (bullets) {\n\t\t\t$array.each(bullets, (bullet) => {\n\t\t\t\tconst sprite = bullet.get(\"sprite\");\n\t\t\t\tif (sprite) {\n\t\t\t\t\tsprite.setPrivate(\"visible\", false);\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\t}\n\n\n\t/**\n\t * @ignore\n\t */\n\tprotected _unexcludeDataItem(dataItem: DataItem<this[\"_dataItemSettings\"]>) {\n\t\tsuper._unexcludeDataItem(dataItem);\n\t\tconst bullets = dataItem.bullets;\n\t\tif (bullets) {\n\t\t\t$array.each(bullets, (bullet) => {\n\t\t\t\tconst sprite = bullet.get(\"sprite\");\n\t\t\t\tif (sprite) {\n\t\t\t\t\tsprite.setPrivate(\"visible\", true);\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tprotected _notIncludeDataItem(dataItem: DataItem<this[\"_dataItemSettings\"]>) {\n\t\tsuper._notIncludeDataItem(dataItem);\n\t\tconst bullets = dataItem.bullets;\n\t\tif (bullets) {\n\t\t\t$array.each(bullets, (bullet) => {\n\t\t\t\tconst sprite = bullet.get(\"sprite\");\n\t\t\t\tif (sprite) {\n\t\t\t\t\tsprite.setPrivate(\"visible\", false);\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tprotected _unNotIncludeDataItem(dataItem: DataItem<this[\"_dataItemSettings\"]>) {\n\t\tsuper._unNotIncludeDataItem(dataItem);\n\t\tconst bullets = dataItem.bullets;\n\t\tif (bullets) {\n\t\t\t$array.each(bullets, (bullet) => {\n\t\t\t\tconst sprite = bullet.get(\"sprite\");\n\t\t\t\tif (sprite) {\n\t\t\t\t\tsprite.setPrivate(\"visible\", true);\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\t}\n}\n","import { Graphics, IGraphicsSettings, IGraphicsPrivate } from \"../../core/render/Graphics\";\nimport type { MapPolygonSeries } from \"./MapPolygonSeries\";\nimport type { IGeoPoint } from \"../../core/util/IGeoPoint\";\nimport type { IPoint } from \"../../core/util/IPoint\";\nimport * as $mapUtils from \"./MapUtils\";\nimport $polylabel from \"polylabel\";\nimport { geoArea } from \"d3-geo\";\n\nexport interface IMapPolygonSettings extends IGraphicsSettings {\n\n\t/**\n\t * A GeoJSON representation of the polygons geometry.\n\t */\n\tgeometry?: GeoJSON.MultiPolygon | GeoJSON.Polygon;\n\n\t/**\n\t * @todo needs description\n\t * @default 0.5\n\t */\n\tprecision?: number;\n\n}\n\nexport interface IMapPolygonPrivate extends IGraphicsPrivate {\n}\n\n/**\n * A polygon in a [[MapPolygonSeries]].\n */\nexport class MapPolygon extends Graphics {\n\n\tdeclare public _settings: IMapPolygonSettings;\n\tdeclare public _privateSettings: IMapPolygonPrivate;\n\n\tpublic static className: string = \"MapPolygon\";\n\tpublic static classNames: Array<string> = Graphics.classNames.concat([MapPolygon.className]);\n\tprotected _projectionDirty: boolean = false;\n\n\tprotected _afterNew(): void {\n\t\tsuper._afterNew();\n\t\tthis.setPrivate(\"trustBounds\", true);\n\t}\n\n\t/**\n\t * A [[MapPolygonSeries]] polygon belongs to.\n\t */\n\tpublic series: MapPolygonSeries | undefined;\n\n\tpublic _beforeChanged() {\n\t\tsuper._beforeChanged();\n\n\t\tif (this._projectionDirty || this.isDirty(\"geometry\") || this.isDirty(\"precision\")) {\n\t\t\tconst geometry = this.get(\"geometry\")!;\n\n\t\t\tif (geometry) {\n\t\t\t\tconst series = this.series;\n\t\t\t\tif (series) {\n\t\t\t\t\tconst projection = series.projection();\n\t\t\t\t\tif (projection) {\n\t\t\t\t\t\tprojection.precision(this.get(\"precision\", 0.5));\n\t\t\t\t\t}\n\n\t\t\t\t\tconst geoPath = series.geoPath();\n\n\t\t\t\t\tif (geoPath) {\n\t\t\t\t\t\tthis._clear = true;\n\n\t\t\t\t\t\tthis.set(\"draw\", (_display) => {\n\t\t\t\t\t\t\tgeoPath.context(this._display as any);\n\t\t\t\t\t\t\tgeoPath(geometry);\n\t\t\t\t\t\t\tgeoPath.context(null);\n\t\t\t\t\t\t})\n\n\t\t\t\t\t\tif (this.isHover()) {\n\t\t\t\t\t\t\tthis.showTooltip();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic markDirtyProjection() {\n\t\tthis.markDirty();\n\t\tthis._projectionDirty = true;\n\t}\n\n\tpublic _clearDirty() {\n\t\tsuper._clearDirty();\n\t\tthis._projectionDirty = false;\n\t}\n\n\t/**\n\t * Returns latitude/longitude of the geometrical center of the polygon.\n\t *\n\t * @return Center\n\t */\n\tpublic geoCentroid(): IGeoPoint {\n\t\tconst geometry = this.get(\"geometry\")!;\n\t\tif (geometry) {\n\t\t\treturn $mapUtils.getGeoCentroid(geometry);\n\t\t}\n\t\telse {\n\t\t\treturn { latitude: 0, longitude: 0 };\n\t\t}\n\t}\n\n\t/**\n\t * Returns latitude/longitude of the visual center of the polygon.\n\t *\n\t * @return Center\n\t */\n\tpublic visualCentroid(): IGeoPoint {\n\n\t\tlet biggestArea = 0;\n\t\tlet coordinates: number[][][] = [];\n\t\tconst geometry = this.get(\"geometry\")!;\n\n\t\tif (geometry) {\n\t\t\tif (geometry.type == \"Polygon\") {\n\t\t\t\tcoordinates = geometry.coordinates as number[][][];\n\t\t\t}\n\t\t\telse if (geometry.type == \"MultiPolygon\") {\n\t\t\t\tfor (let i = 0; i < geometry.coordinates.length; i++) {\n\t\t\t\t\tlet coords = geometry.coordinates[i] as number[][][];\n\t\t\t\t\tlet area = geoArea({ type: \"Polygon\", coordinates: coords });\n\t\t\t\t\tif (area > biggestArea) {\n\t\t\t\t\t\tcoordinates = coords;\n\t\t\t\t\t\tbiggestArea = area;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (coordinates) {\n\t\t\t\tlet center = $polylabel(coordinates as number[][][]);\n\t\t\t\treturn { longitude: center[0], latitude: center[1] };\n\t\t\t}\n\t\t}\n\t\treturn { longitude: 0, latitude: 0 };\n\t}\n\n\n\tpublic _getTooltipPoint(): IPoint {\n\t\tconst series = this.series;\n\n\t\tif (series) {\n\t\t\tconst projection = series.projection();\n\t\t\tif (projection) {\n\t\t\t\tconst geoPoint = this.visualCentroid();\n\t\t\t\tconst xy = projection([geoPoint.longitude, geoPoint.latitude]);\n\n\t\t\t\tif (xy) {\n\t\t\t\t\treturn { x: xy[0], y: xy[1] }\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn { x: 0, y: 0 };\n\t}\n}\n","import type { DataItem } from \"../../core/render/Component\";\nimport type { Animation } from \"../../core/util/Entity\";\nimport type { IPoint } from \"../../core/util/IPoint\";\nimport type { IGeoPoint } from \"../../core/util/IGeoPoint\";\n\nimport { MapSeries, IMapSeriesSettings, IMapSeriesDataItem, IMapSeriesPrivate } from \"./MapSeries\";\nimport { MapPolygon } from \"./MapPolygon\";\nimport { Template } from \"../../core/util/Template\";\nimport { ListTemplate } from \"../../core/util/List\";\n\nimport * as $array from \"../../core/util/Array\";\nimport * as $mapUtils from \"./MapUtils\";\n\n\n\nexport interface IMapPolygonSeriesPrivate extends IMapSeriesPrivate {\n}\n\nexport interface IMapPolygonSeriesDataItem extends IMapSeriesDataItem {\n\n\t/**\n\t * Related [[MapPolygon]] object.\n\t */\n\tmapPolygon: MapPolygon;\n\n\t/**\n\t * GeoJSON geometry of the polygon.\n\t */\n\tgeometry?: GeoJSON.Polygon | GeoJSON.MultiPolygon;\n}\n\nexport interface IMapPolygonSeriesSettings extends IMapSeriesSettings {\n\n\t/**\n\t * If set to `true`, the order of coordinates in GeoJSON will be flipped.\n\t *\n\t * Some GeoJSON software produces those in reverse order, so if your custom\n\t * map appears garbled, try this setting.\n\t *\n\t * @default false\n\t * @since 5.2.42\n\t */\n\treverseGeodata?: boolean;\n\n}\n\n/**\n * Creates a map series for displaying polygons.\n *\n * @see {@link https://www.amcharts.com/docs/v5/charts/map-chart/map-polygon-series/} for more info\n * @important\n */\nexport class MapPolygonSeries extends MapSeries {\n\n\t/**\n\t * @ignore\n\t */\n\tpublic makeMapPolygon(dataItem: DataItem<this[\"_dataItemSettings\"]>): MapPolygon {\n\t\tconst mapPolygon = this.children.push(this.mapPolygons.make());\n\t\tmapPolygon._setDataItem(dataItem);\n\t\tthis.mapPolygons.push(mapPolygon);\n\t\treturn mapPolygon;\n\t}\n\n\t/**\n\t * A [[ListTemplate]] of all polygons in series.\n\t *\n\t * `mapPolygons.template` can also be used to configure polygons.\n\t *\n\t * @default new ListTemplate<MapPolygon>\n\t */\n\tpublic readonly mapPolygons: ListTemplate<MapPolygon> = this.addDisposer(new ListTemplate(\n\t\tTemplate.new({}),\n\t\t() => MapPolygon._new(this._root, {}, [this.mapPolygons.template])\n\t));\n\n\tpublic static className: string = \"MapPolygonSeries\";\n\tpublic static classNames: Array<string> = MapSeries.classNames.concat([MapPolygonSeries.className]);\n\n\tdeclare public _settings: IMapPolygonSeriesSettings;\n\tdeclare public _privateSettings: IMapPolygonSeriesPrivate;\n\tdeclare public _dataItemSettings: IMapPolygonSeriesDataItem;\n\n\tprotected _types: Array<GeoJSON.GeoJsonGeometryTypes> = [\"Polygon\", \"MultiPolygon\"];\n\n\t/**\n\t * @ignore\n\t */\n\tpublic markDirtyProjection() {\n\t\t$array.each(this.dataItems, (dataItem) => {\n\t\t\tlet mapPolygon = dataItem.get(\"mapPolygon\");\n\t\t\tif (mapPolygon) {\n\t\t\t\tmapPolygon.markDirtyProjection();\n\t\t\t}\n\t\t})\n\t}\n\n\tpublic _prepareChildren() {\n\t\tsuper._prepareChildren();\n\n\t\tif (this.isDirty(\"fill\")) {\n\t\t\tthis.mapPolygons.template.set(\"fill\", this.get(\"fill\"));\n\t\t}\n\t\tif (this.isDirty(\"stroke\")) {\n\t\t\tthis.mapPolygons.template.set(\"stroke\", this.get(\"stroke\"));\n\t\t}\n\t}\n\n\tprotected processDataItem(dataItem: DataItem<this[\"_dataItemSettings\"]>) {\n\t\tsuper.processDataItem(dataItem);\n\n\t\tlet mapPolygon = dataItem.get(\"mapPolygon\");\n\t\tif (!mapPolygon) {\n\t\t\tmapPolygon = this.makeMapPolygon(dataItem);\n\t\t}\n\n\t\tdataItem.set(\"mapPolygon\", mapPolygon);\n\t\tlet geometry = dataItem.get(\"geometry\")!;\n\n\t\tif (geometry) {\n\t\t\tif (this.get(\"reverseGeodata\")) {\n\t\t\t\tconst coordinates = geometry.coordinates;\n\t\t\t\tif (coordinates) {\n\t\t\t\t\tfor (let x = 0; x < geometry.coordinates.length; x++) {\n\t\t\t\t\t\tif (geometry.type == \"MultiPolygon\") {\n\t\t\t\t\t\t\tfor (let y = 0; y < geometry.coordinates[x].length; y++) {\n\t\t\t\t\t\t\t\tgeometry.coordinates[x][y].reverse()\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tgeometry.coordinates[x].reverse()\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tmapPolygon.set(\"geometry\", geometry);\n\t\t}\n\n\t\tmapPolygon.series = this;\n\n\t\tthis._addGeometry(dataItem.get(\"geometry\"), this);\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic disposeDataItem(dataItem: DataItem<this[\"_dataItemSettings\"]>) {\n\t\tsuper.disposeDataItem(dataItem);\n\t\tconst mapPolygon = dataItem.get(\"mapPolygon\");\n\t\tif (mapPolygon) {\n\t\t\tthis.mapPolygons.removeValue(mapPolygon);\n\t\t\tmapPolygon.dispose();\n\t\t}\n\t\tthis._removeGeometry(dataItem.get(\"geometry\"));\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tprotected _excludeDataItem(dataItem: DataItem<this[\"_dataItemSettings\"]>) {\n\t\tsuper._excludeDataItem(dataItem);\n\t\tconst mapPolygon = dataItem.get(\"mapPolygon\");\n\t\tif (mapPolygon) {\n\t\t\tmapPolygon.setPrivate(\"visible\", false);\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tprotected _unexcludeDataItem(dataItem: DataItem<this[\"_dataItemSettings\"]>) {\n\t\tsuper._unexcludeDataItem(dataItem);\n\t\tconst mapPolygon = dataItem.get(\"mapPolygon\");\n\t\tif (mapPolygon) {\n\t\t\tmapPolygon.setPrivate(\"visible\", true);\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tprotected _notIncludeDataItem(dataItem: DataItem<this[\"_dataItemSettings\"]>) {\n\t\tsuper._notIncludeDataItem(dataItem);\n\t\tconst mapPolygon = dataItem.get(\"mapPolygon\");\n\t\tif (mapPolygon) {\n\t\t\tmapPolygon.setPrivate(\"visible\", false);\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tprotected _unNotIncludeDataItem(dataItem: DataItem<this[\"_dataItemSettings\"]>) {\n\t\tsuper._unNotIncludeDataItem(dataItem);\n\t\tconst mapPolygon = dataItem.get(\"mapPolygon\");\n\t\tif (mapPolygon) {\n\t\t\tmapPolygon.setPrivate(\"visible\", true);\n\t\t}\n\t}\n\n\t/**\n\t * Forces a repaint of the element which relies on data.\n\t *\n\t * @since 5.0.21\n\t */\n\tpublic markDirtyValues(dataItem: DataItem<this[\"_dataItemSettings\"]>) {\n\t\tsuper.markDirtyValues();\n\t\tif (dataItem) {\n\t\t\tconst mapPolygon = dataItem.get(\"mapPolygon\");\n\t\t\tif (mapPolygon) {\n\t\t\t\tmapPolygon.set(\"geometry\", dataItem.get(\"geometry\"));\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Centers and zooms in on the specific polygon.\n\t *\n\t * @param dataItem Target data item\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/map-chart/map-pan-zoom/#Zooming_to_clicked_object} for more info\n\t * @param rotate If it's true, the map will rotate so that this polygon would be in the center. Mostly usefull with geoOrthographic projection.\n\t */\n\tpublic zoomToDataItem(dataItem: DataItem<IMapPolygonSeriesDataItem>, rotate?: boolean): Animation<any> | undefined {\n\t\tconst polygon = dataItem.get(\"mapPolygon\");\n\t\tif (polygon) {\n\t\t\tconst geometry = polygon.get(\"geometry\");\n\t\t\tconst chart = this.chart;\n\n\t\t\tif (geometry && chart) {\n\n\t\t\t\tif (rotate) {\n\t\t\t\t\tconst centroid = $mapUtils.getGeoCentroid(geometry);\n\t\t\t\t\tchart.rotate(-centroid.longitude, -centroid.latitude);\n\t\t\t\t\treturn chart.zoomToGeoBounds($mapUtils.getGeoBounds(geometry), undefined, -centroid.longitude, -centroid.latitude);\n\t\t\t\t}\n\n\t\t\t\treturn chart.zoomToGeoBounds($mapUtils.getGeoBounds(geometry),);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Zooms the map in so that all polygons in the array are visible.\n\t *\n\t * @param dataItems An array of data items to zoom to\n\t * @param rotate Rotate the map so it is centered on the selected items\n\t * @return Animation\n\t * @since 5.9.0\n\t */\n\tpublic zoomToDataItems(dataItems: Array<DataItem<IMapPolygonSeriesDataItem>>, rotate?: boolean): Animation<any> | undefined {\n\t\tlet left!: number;\n\t\tlet right!: number;\n\t\tlet top!: number;\n\t\tlet bottom!: number;\n\n\t\t$array.each(dataItems, (dataItem) => {\n\n\t\t\tconst polygon = dataItem.get(\"mapPolygon\");\n\t\t\tif (polygon) {\n\t\t\t\tconst geometry = polygon.get(\"geometry\");\n\t\t\t\tif (geometry) {\n\t\t\t\t\tlet bounds = $mapUtils.getGeoBounds(geometry);\n\n\t\t\t\t\tif (left == null) {\n\t\t\t\t\t\tleft = bounds.left;\n\t\t\t\t\t}\n\t\t\t\t\tif (right == null) {\n\t\t\t\t\t\tright = bounds.right;\n\t\t\t\t\t}\n\t\t\t\t\tif (top == null) {\n\t\t\t\t\t\ttop = bounds.top;\n\t\t\t\t\t}\n\t\t\t\t\tif (bottom == null) {\n\t\t\t\t\t\tbottom = bounds.bottom;\n\t\t\t\t\t}\n\n\t\t\t\t\tleft = Math.min(bounds.left, left);\n\t\t\t\t\tright = Math.max(bounds.right, right);\n\t\t\t\t\ttop = Math.max(bounds.top, top);\n\t\t\t\t\tbottom = Math.min(bounds.bottom, bottom);\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\n\t\tif (left != null && right != null && top != null && bottom != null) {\n\t\t\tconst chart = this.chart;\n\t\t\tif (chart) {\n\t\t\t\tif (rotate) {\n\t\t\t\t\tconst rx = left + (right - left) / 2;\n\t\t\t\t\tconst ry = bottom + (top - bottom) / 2;\n\n\t\t\t\t\tchart.rotate(-rx, -ry);\n\t\t\t\t\treturn chart.zoomToGeoBounds({ left, right, top, bottom }, undefined, -rx, -ry);\n\t\t\t\t}\n\n\t\t\t\treturn chart.zoomToGeoBounds({ left, right, top, bottom });\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Returns a [[MapPolygon]] that is under specific X/Y point.\n\t *\n\t * @since 5.9.8\n\t * @param point X/Y\n\t * @return Polygon\n\t */\n\tpublic getPolygonByPoint(point: IPoint): MapPolygon | undefined {\n\t\tlet found: MapPolygon | undefined;\n\t\tconst renderer = this._display._renderer;\n\t\tconst displayObject = (renderer as any).getObjectAtPoint(point);\n\t\tif (displayObject) {\n\t\t\tthis.mapPolygons.each(function(polygon) {\n\t\t\t\tif (polygon._display == displayObject) {\n\t\t\t\t\tfound = polygon;\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn found;\n\t\t}\n\t}\n\n\tpublic getPolygonByGeoPoint(point: IGeoPoint): MapPolygon | undefined {\n\t\treturn this.getPolygonByPoint(this.chart!.convert(point));\n\t}\n}\n","import type { MapChart } from \"./MapChart\";\nimport type { GeoProjection, GeoPath } from \"d3-geo\";\nimport type { DataItem } from \"../../core/render/Component\";\n\nimport { Series, ISeriesSettings, ISeriesDataItem, ISeriesPrivate, ISeriesEvents } from \"../../core/render/Series\";\n\nimport * as $array from \"../../core/util/Array\";\nimport * as $object from \"../../core/util/Object\";\n\nexport interface IMapSeriesDataItem extends ISeriesDataItem {\n\tgeometry?: GeoJSON.Geometry;\n\tgeometryType?: GeoJSON.GeoJsonGeometryTypes;\n\tvalue?: number;\n}\n\nexport interface IMapSeriesSettings extends ISeriesSettings {\n\n\t/**\n\t * All map series will determine the actual bounds shown in the [[MapChart]].\n\t *\n\t * If we need a series to be ignored while calculating the bounds, we can set\n\t * this to `false`.\n\t *\n\t * Especially useful for background series.\n\t *\n\t * @default true\n\t * @since 5.2.36\n\t */\n\taffectsBounds?: boolean;\n\n\t/**\n\t * Map data in GeoJSON format.\n\t */\n\tgeoJSON?: GeoJSON.GeoJSON;\n\n\t/**\n\t * An array of map object ids from geodata to include in the map.\n\t *\n\t * If set, only those objects listed in `include` will be shown.\n\t */\n\tinclude?: Array<string>;\n\n\t/**\n\t * An array of map object ids from geodata to omit when showing the map.\n\t */\n\texclude?: Array<string>;\n\n\t/**\n\t * A field in series `data` that will hold map object's numeric value.\n\t *\n\t * It can be used in a number of places, e.g. tooltips, heat rules, etc.\n\t */\n\tvalueField?: string;\n\n\t/**\n\t * @ignore\n\t */\n\tgeometryField?: string;\n\n\t/**\n\t * @ignore\n\t */\n\tgeometryTypeField?: string;\n\n\t/**\n\t * Names of geodata items, such as countries, to replace by from loaded\n\t * geodata.\n\t *\n\t * Can be used to override built-in English names for countries.\n\t *\n\t * ```TypeScript\n\t * import am5geodata_lang_ES from '@amcharts5-geodata/lang/es';\n\t * // ...\n\t * map.geodataNames = am5geodata_lang_ES;\n\t * ```\n\t * ```JavaScript\n\t * map.geodataNames = am5geodata_lang_ES;\n\t * ```\n\t *\n\t * @since 5.1.13\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/map-chart/map-translations/} for more info\n\t */\n\tgeodataNames?: { [index: string]: string };\n\n}\n\nexport interface IMapSeriesPrivate extends ISeriesPrivate {\n}\n\nexport interface IMapSeriesEvents extends ISeriesEvents {\n\n\t/**\n\t * Invoked when geodata is finished loading and processed.\n\t */\n\tgeodataprocessed: {};\n\n}\n\n/**\n * Base class for map series.\n */\nexport abstract class MapSeries extends Series {\n\tpublic static className: string = \"MapSeries\";\n\tpublic static classNames: Array<string> = Series.classNames.concat([MapSeries.className]);\n\n\tdeclare public chart: MapChart | undefined;\n\tdeclare public _settings: IMapSeriesSettings;\n\tdeclare public _privateSettings: IMapSeriesPrivate;\n\tdeclare public _dataItemSettings: IMapSeriesDataItem;\n\tdeclare public _events: IMapSeriesEvents;\n\n\tprotected _types: Array<GeoJSON.GeoJsonGeometryTypes> = [];\n\n\tpublic _geometries: Array<GeoJSON.Geometry> = [];\n\tprotected _geoJSONparsed: boolean = false;\n\n\tprotected _excluded: Array<DataItem<IMapSeriesDataItem>> = [];\n\tprotected _notIncluded: Array<DataItem<IMapSeriesDataItem>> = [];\n\n\tprotected _afterNew() {\n\t\tthis.fields.push(\"geometry\", \"geometryType\");\n\t\tthis._setRawDefault(\"geometryField\", \"geometry\");\n\t\tthis._setRawDefault(\"geometryTypeField\", \"geometryType\");\n\t\tthis._setRawDefault(\"idField\", \"id\");\n\n\t\tthis.on(\"geoJSON\", (geoJSON) => {\n\t\t\tlet previous = this._prevSettings.geoJSON;\n\t\t\tif (previous && previous != geoJSON) {\n\t\t\t\tthis.data.clear();\n\t\t\t}\n\t\t})\n\n\t\tsuper._afterNew();\n\t}\n\n\tprotected _handleDirties() {\n\t\tconst geoJSON = this.get(\"geoJSON\");\n\t\tlet previous = this._prevSettings.geoJSON;\n\n\t\tif (previous && previous != geoJSON) {\n\t\t\tthis._prevSettings.geoJSON = undefined;\n\t\t\tthis._geoJSONparsed = false;\n\t\t}\n\n\t\tif (!this._geoJSONparsed) {\n\t\t\tthis._parseGeoJSON();\n\t\t\tthis._geoJSONparsed = true;\n\t\t}\n\t}\n\n\tpublic _prepareChildren() {\n\t\tsuper._prepareChildren();\n\n\t\tif (this._valuesDirty) {\n\t\t\tthis._handleDirties();\n\t\t}\n\n\t\tif (this.get(\"geoJSON\") && (this.isDirty(\"geoJSON\") || this.isDirty(\"include\") || this.isDirty(\"exclude\"))) {\n\n\t\t\tthis._handleDirties();\n\n\t\t\tconst chart = this.chart;\n\n\t\t\tconst exclude = this.get(\"exclude\");\n\n\t\t\tif (exclude) {\n\t\t\t\tif (chart) {\n\t\t\t\t\tchart._centerLocation = null;\n\t\t\t\t}\n\t\t\t\t$array.each(exclude, (id) => {\n\t\t\t\t\tconst dataItem = this.getDataItemById(id);\n\t\t\t\t\tif (dataItem) {\n\t\t\t\t\t\tthis._excludeDataItem(dataItem)\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tif (!exclude || exclude.length == 0) {\n\t\t\t\t$array.each(this._excluded, (dataItem) => {\n\t\t\t\t\tthis._unexcludeDataItem(dataItem)\n\t\t\t\t})\n\t\t\t\tthis._excluded = [];\n\t\t\t}\n\n\t\t\tconst include = this.get(\"include\");\n\t\t\tif (include) {\n\t\t\t\tif (chart) {\n\t\t\t\t\tchart._centerLocation = null;\n\t\t\t\t}\n\t\t\t\t$array.each(this.dataItems, (dataItem) => {\n\t\t\t\t\tconst id = dataItem.get(\"id\");\n\t\t\t\t\tif (id && include.indexOf(id) == -1) {\n\t\t\t\t\t\tthis._notIncludeDataItem(dataItem);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tthis._unNotIncludeDataItem(dataItem);\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tif (!include) {\n\t\t\t\t$array.each(this._notIncluded, (dataItem) => {\n\t\t\t\t\tthis._unNotIncludeDataItem(dataItem);\n\t\t\t\t})\n\t\t\t\tthis._notIncluded = [];\n\t\t\t}\n\n\t\t}\n\t}\n\n\tprotected _excludeDataItem(dataItem: DataItem<this[\"_dataItemSettings\"]>) {\n\t\tthis._removeGeometry(dataItem.get(\"geometry\"));\n\t\t$array.move(this._excluded, dataItem);\n\t}\n\n\tprotected _unexcludeDataItem(dataItem: DataItem<this[\"_dataItemSettings\"]>) {\n\t\tthis._addGeometry(dataItem.get(\"geometry\"), this);\n\t}\n\n\tprotected _notIncludeDataItem(dataItem: DataItem<this[\"_dataItemSettings\"]>) {\n\t\tthis._removeGeometry(dataItem.get(\"geometry\"));\n\t\t$array.move(this._notIncluded, dataItem);\n\t}\n\n\tprotected _unNotIncludeDataItem(dataItem: DataItem<this[\"_dataItemSettings\"]>) {\n\t\tthis._addGeometry(dataItem.get(\"geometry\"), this);\n\t}\n\n\tprotected checkInclude(id: string, includes: string[] | undefined, excludes?: string[] | undefined): boolean {\n\t\tif (includes) {\n\t\t\tif (includes.length == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (includes.indexOf(id) == -1) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (excludes && excludes.length > 0) {\n\t\t\tif (excludes.indexOf(id) != -1) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\n\tprotected _parseGeoJSON() {\n\n\t\tconst geoJSON = this.get(\"geoJSON\");\n\t\tif (geoJSON) {\n\n\t\t\tlet features!: any[];\n\n\t\t\tif (geoJSON.type == \"FeatureCollection\") {\n\t\t\t\tfeatures = geoJSON.features;\n\t\t\t}\n\t\t\telse if (geoJSON.type == \"Feature\") {\n\t\t\t\tfeatures = [geoJSON];\n\t\t\t}\n\t\t\telse if ([\"Point\", \"LineString\", \"Polygon\", \"MultiPoint\", \"MultiLineString\", \"MultiPolygon\"].indexOf(geoJSON.type) != -1) {\n\t\t\t\tfeatures = [{ geometry: geoJSON }];\n\t\t\t}\n\t\t\telse {\n\t\t\t\tconsole.log(\"nothing found in geoJSON\");\n\t\t\t}\n\n\t\t\tconst geodataNames = this.get(\"geodataNames\");\n\t\t\tif (features) {\n\n\t\t\t\tconst idField = this.get(\"idField\", \"id\");\n\n\t\t\t\tfor (let i = 0, len = features.length; i < len; i++) {\n\t\t\t\t\tlet feature: any = features[i];\n\t\t\t\t\tlet geometry: any = feature.geometry;\n\n\t\t\t\t\tif (geometry) {\n\t\t\t\t\t\tlet type = geometry.type;\n\t\t\t\t\t\tlet id: string = feature[idField];\n\n\t\t\t\t\t\tif (geodataNames && geodataNames[id]) {\n\t\t\t\t\t\t\tfeature.properties.name = geodataNames[id];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (this._types.indexOf(type) != -1) {\n\t\t\t\t\t\t\t//if (!this.checkInclude(id, this.get(\"include\"), this.get(\"exclude\"))) {\n\t\t\t\t\t\t\t//\tcontinue;\n\t\t\t\t\t\t\t//}\n\n\t\t\t\t\t\t\tlet dataItem: any;\n\n\t\t\t\t\t\t\tif (id != null) {\n\t\t\t\t\t\t\t\t// find data object in user-provided data\n\t\t\t\t\t\t\t\tdataItem = $array.find(this.dataItems, (value: any) => {\n\t\t\t\t\t\t\t\t\treturn value.get(\"id\") == id;\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tlet dataObject: any;\n\n\t\t\t\t\t\t\tif (dataItem) {\n\t\t\t\t\t\t\t\tdataObject = dataItem.dataContext;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// create one if not found\n\t\t\t\t\t\t\tif (!dataItem) {\n\t\t\t\t\t\t\t\tdataObject = { geometry: geometry, geometryType: type, madeFromGeoData: true };\n\t\t\t\t\t\t\t\tdataObject[idField] = id;\n\t\t\t\t\t\t\t\tthis.data.push(dataObject);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// in case found\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t// if user-provided object doesn't have points data provided in any way:\n\t\t\t\t\t\t\t\tif (!dataObject.geometry) {\n\t\t\t\t\t\t\t\t\tdataObject.geometry = geometry;\n\t\t\t\t\t\t\t\t\tdataObject.geometryType = type;\n\t\t\t\t\t\t\t\t\tdataItem.set(\"geometry\", geometry);\n\t\t\t\t\t\t\t\t\tdataItem.set(\"geometryType\", type);\n\t\t\t\t\t\t\t\t\tthis.processDataItem(dataItem);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// copy properties data to datacontext\n\t\t\t\t\t\t\t$object.softCopyProperties(feature.properties, dataObject);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst type = \"geodataprocessed\";\n\t\t\tif (this.events.isEnabled(type)) {\n\t\t\t\tthis.events.dispatch(type, { type: type, target: this });\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic abstract markDirtyProjection(): void\n\n\tpublic _placeBulletsContainer(_chart: MapChart) {\n\t\tthis.children.moveValue(this.bulletsContainer);\n\t}\n\n\tpublic _removeBulletsContainer() {\n\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic projection(): GeoProjection | undefined {\n\t\tconst chart = this.chart;\n\t\tif (chart) {\n\t\t\treturn chart.get(\"projection\");\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic geoPath(): GeoPath | undefined {\n\t\tconst chart = this.chart;\n\t\tif (chart) {\n\t\t\treturn chart.getPrivate(\"geoPath\");\n\t\t}\n\t}\n\n\tprotected _addGeometry(geometry: any, series: MapSeries) {\n\t\tif (geometry && series.get(\"affectsBounds\", true)) {\n\t\t\tthis._geometries.push(geometry);\n\n\t\t\tconst chart = this.chart;\n\t\t\tif (chart) {\n\t\t\t\tchart.markDirtyGeometries();\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected _removeGeometry(geometry: any) {\n\t\tif (geometry) {\n\t\t\t$array.remove(this._geometries, geometry);\n\n\t\t\tconst chart = this.chart;\n\t\t\tif (chart) {\n\t\t\t\tchart.markDirtyGeometries();\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected _dispose() {\n\t\tsuper._dispose();\n\n\t\tconst chart = this.chart;\n\t\tif (chart) {\n\t\t\tchart.series.removeValue(this);\n\t\t}\n\t}\n\n\tprotected _onDataClear() {\n\t\tsuper._onDataClear();\n\t\tthis._geoJSONparsed = false;\n\t\tthis._markDirtyKey(\"exclude\");\n\t}\t\n}\n","import type { IGeoPoint } from \"../../core/util/IGeoPoint\";\nimport * as $math from \"../../core/util/Math\";\nimport { geoCircle, geoCentroid, geoBounds, geoArea } from \"d3-geo\";\n\n/**\n * Returns a GeoJSON representation of a circle, suitable for use as `geometry` value\n * in a [[MapPolygon]] in a [[MapPolygonSeries]].\n * \n * @param geoPoint Coordinates\n * @param radius Circle radius in degrees\n * @return Polygon geometry\n */\nexport function getGeoCircle(geoPoint: IGeoPoint, radius: number): GeoJSON.Polygon {\n\treturn geoCircle().center([geoPoint.longitude, geoPoint.latitude]).radius(radius)();\n}\n\n/**\n * Returns geo centroid of a geometry\n */\nexport function getGeoCentroid(geometry: GeoJSON.GeometryObject): IGeoPoint {\n\tconst centroid = geoCentroid(geometry);\n\treturn { longitude: centroid[0], latitude: centroid[1] };\n}\n\n/**\n * Returns geo area of a geometry\n */\nexport function getGeoArea(geometry: GeoJSON.GeometryObject): number {\n\treturn geoArea(geometry);\n}\n\n/**\n * Returns bounds of a geometry\n */\nexport function getGeoBounds(geometry: GeoJSON.GeometryObject): { left: number, right: number, top: number, bottom: number } {\n\tconst bounds = geoBounds(geometry);\n\n\tif (bounds) {\n\t\tconst geoBounds = { left: bounds[0][0], right: bounds[1][0], top: bounds[1][1], bottom: bounds[0][1] };\n\t\tif (geoBounds.right < geoBounds.left) {\n\t\t\tgeoBounds.right = 180;\n\t\t\tgeoBounds.left = -180;\n\t\t}\n\t\treturn geoBounds;\n\t}\n\treturn { left: 0, right: 0, top: 0, bottom: 0 };\n}\n\n/**\n * Returns a GeoJSON representation of a rectangle, suitable for use\n * as `geometry` value in a [[MapPolygon]] in a [[MapPolygonSeries]].\n * \n * @param north North latitude\n * @param east East longitude\n * @param south South latitude\n * @param west West longitude\n * @return polygon geometry\n */\nexport function getGeoRectangle(north: number, east: number, south: number, west: number): GeoJSON.MultiPolygon {\n\n\tlet multiPolygon: Array<Array<Array<[number, number]>>> = [];\n\n\tif (west <= -180) {\n\t\twest = -179.9999;\n\t}\n\tif (south <= -90) {\n\t\tsouth = -89.9999;\n\t}\n\tif (north >= 90) {\n\t\tnorth = 89.9999;\n\t}\n\tif (east >= 180) {\n\t\teast = 179.9999;\n\t}\n\n\n\tlet stepLong = Math.min(90, (east - west) / Math.ceil((east - west) / 90));\n\tlet stepLat = (north - south) / Math.ceil((north - south) / 90);\n\n\tfor (let ln = west; ln < east; ln = ln + stepLong) {\n\t\tlet surface: Array<[number, number]> = [];\n\t\tmultiPolygon.push([surface]);\n\n\t\tif (ln + stepLong > east) {\n\t\t\tstepLong = east - ln;\n\t\t}\n\n\t\tfor (let ll = ln; ll <= ln + stepLong; ll = ll + 5) {\n\t\t\tsurface.push([ll, north]);\n\t\t}\n\n\t\tfor (let lt = north; lt >= south; lt = lt - stepLat) {\n\t\t\tsurface.push([ln + stepLong, lt]);\n\t\t}\n\n\t\tfor (let ll = ln + stepLong; ll >= ln; ll = ll - 5) {\n\t\t\tsurface.push([ll, south]);\n\t\t}\n\n\t\tfor (let lt = south; lt <= north; lt = lt + stepLat) {\n\t\t\tsurface.push([ln, lt]);\n\t\t}\n\t}\n\n\treturn { type: \"MultiPolygon\", coordinates: multiPolygon };\n}\n\n/**\n * Update longitudes and latitudes that wrap around -180/180 and -90/90 values.\n * \n * @param geoPoint Input coordinates\n * @return Updated coordinates\n */\nexport function normalizeGeoPoint(geoPoint: IGeoPoint): IGeoPoint {\n\tlet longitude = wrapAngleTo180(geoPoint.longitude);\n\tlet latitude = Math.asin(Math.sin((geoPoint.latitude * $math.RADIANS))) * $math.DEGREES;\n\n\tlet latitude180 = wrapAngleTo180(geoPoint.latitude);\n\n\tif (Math.abs(latitude180) > 90) {\n\t\tlongitude = wrapAngleTo180(longitude + 180);\n\t}\n\n\tgeoPoint.longitude = longitude;\n\tgeoPoint.latitude = latitude;\n\n\treturn geoPoint;\n}\n\n/**\n * @ignore\n */\nexport function wrapAngleTo180(angle: number): number {\n\tangle = angle % 360;\n\n\tif (angle > 180) {\n\t\tangle -= 360;\n\t}\n\tif (angle < -180) {\n\t\tangle += 360;\n\t}\n\n\treturn angle;\n}","import type { Time } from \"../../core/util/Animation\";\r\nimport type { Animation } from \"../../core/util/Entity\";\r\nimport type { IDisposer } from \"../../core/util/Disposer\";\r\nimport type { IPoint } from \"../../core/util/IPoint\";\r\nimport type { ISpritePointerEvent } from \"../../core/render/Sprite\";\r\n\r\nimport { Container, IContainerSettings, IContainerPrivate, IContainerEvents } from \"../../core/render/Container\";\r\nimport { p100 } from \"../../core/util/Percent\";\r\nimport { Rectangle } from \"../../core/render/Rectangle\";\r\nimport { color } from \"../../core/util/Color\";\r\n\r\nimport * as $utils from \"../../core/util/Utils\";\r\nimport * as $math from \"../../core/util/Math\";\r\nimport * as $object from \"../../core/util/Object\";\r\nimport * as $type from \"../../core/util/Type\";\r\n\r\nexport interface IZoomableContainerSettings extends IContainerSettings {\r\n\r\n\t/**\r\n\t * Maximum zoom-in level.\r\n\t * \r\n\t * @default 32\r\n\t */\r\n\tmaxZoomLevel?: number;\r\n\r\n\t/**\r\n\t * Maximum zoom-out level.\r\n\t * \r\n\t * @default 1\r\n\t */\r\n\tminZoomLevel?: number;\r\n\r\n\t/**\r\n\t * Zoom level increase/decrease factor with each zoom action.\r\n\t * \r\n\t * @defult 2\r\n\t */\r\n\tzoomStep?: number;\r\n\r\n\t/**\r\n\t * Pinch-zooming is enabled on touch devices.\r\n\t *\r\n\t * @default true\r\n\t */\r\n\tpinchZoom?: boolean;\r\n\r\n\t/**\r\n\t * Animation duration (ms) for zoom animations.\r\n\t *\r\n\t * @default 600\r\n\t */\r\n\tanimationDuration?: number;\r\n\r\n\t/**\r\n\t * Easing function to use for zoom animations.\r\n\t * \r\n\t * @default am5.ease.out(am5.ease.cubic)\r\n\t */\r\n\tanimationEasing?: (t: Time) => Time;\r\n\r\n\t/**\r\n\t * How much of a content can go outside the viewport.\r\n\t *\r\n\t * @default 0.4\r\n\t */\r\n\tmaxPanOut?: number;\r\n\r\n}\r\n\r\nexport interface IZoomableContainerPrivate extends IContainerPrivate {\r\n}\r\n\r\nexport interface IZoomableContainerEvents extends IContainerEvents {\r\n}\r\n\r\n/**\r\n * A version of [[Container]] which adds zooming capabilities.\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/containers/#Zoomable_container} for more info\r\n * @since 5.8.0\r\n * @important\r\n */\r\nexport class ZoomableContainer extends Container {\r\n\tpublic static className: string = \"ZoomableContainer\";\r\n\tpublic static classNames: Array<string> = Container.classNames.concat([ZoomableContainer.className]);\r\n\r\n\tdeclare public _settings: IZoomableContainerSettings;\r\n\tdeclare public _privateSettings: IZoomableContainerPrivate;\r\n\tdeclare public _events: IZoomableContainerEvents;\r\n\r\n\tprotected _za?: Animation<this[\"_settings\"][\"scale\"]>;\r\n\tprotected _txa?: Animation<this[\"_settings\"][\"x\"]>;\r\n\tprotected _tya?: Animation<this[\"_settings\"][\"y\"]>;\r\n\r\n\r\n\tprotected _movePoints: { [index: number]: IPoint } = {};\r\n\tprotected _downScale: number = 1;\r\n\tprotected _downX: number = 0;\r\n\tprotected _downY: number = 0;\r\n\r\n\tprotected _pinchDP?: IDisposer;\r\n\r\n\t/**\r\n\t * All elements must be added to `contents.children` instead of `children` of\r\n\t * [[ZoomableContainer]].\r\n\t *\r\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/containers/#Zoomable_container} for more info\r\n\t */\r\n\tpublic contents = this.children.push(Container.new(this._root, {\r\n\t\twidth: p100,\r\n\t\theight: p100,\r\n\t\tx: 0,\r\n\t\ty: 0,\r\n\t\tdraggable: true,\r\n\t\tbackground: Rectangle.new(this._root, {\r\n\t\t\tfill: color(0xffffff),\r\n\t\t\tfillOpacity: 0\r\n\t\t})\r\n\t}))\r\n\r\n\tprotected _wheelDp: IDisposer | undefined;\r\n\r\n\tprotected _afterNew(): void {\r\n\t\tsuper._afterNew();\r\n\r\n\t\tconst events = this.contents.events;\r\n\r\n\t\tthis._disposers.push(events.on(\"pointerdown\", (event) => {\r\n\t\t\tthis._handleThisDown(event);\r\n\t\t}));\r\n\r\n\t\tthis._disposers.push(events.on(\"globalpointerup\", (event) => {\r\n\t\t\tthis._handleThisUp(event);\r\n\t\t}));\r\n\r\n\t\tthis._disposers.push(events.on(\"globalpointermove\", (event) => {\r\n\t\t\tthis._handleThisMove(event);\r\n\t\t}));\r\n\r\n\t\tconst bg = this.contents.get(\"background\");\r\n\t\tif (bg) {\r\n\t\t\tbg.adapters.add(\"width\", (width) => {\r\n\t\t\t\treturn Number(width) * 20;\r\n\t\t\t})\r\n\t\t\tbg.adapters.add(\"height\", (height) => {\r\n\t\t\t\treturn Number(height) * 20;\r\n\t\t\t})\r\n\t\t\tbg.adapters.add(\"x\", (x) => {\r\n\t\t\t\treturn Number(x) - bg.width() / 2;\r\n\t\t\t})\r\n\t\t\tbg.adapters.add(\"y\", (y) => {\r\n\t\t\t\treturn Number(y) - bg.height() / 2;\r\n\t\t\t})\r\n\t\t}\r\n\r\n\t\tconst contents = this.contents;\r\n\r\n\t\tcontents.adapters.add(\"x\", (x) => {\r\n\t\t\tconst scale = contents.get(\"scale\", 1);\r\n\t\t\tif($type.isNumber(x) && scale >= 1){\r\n\t\t\t\tlet maxPanOut = this.get(\"maxPanOut\", 0.4);\r\n\t\t\t\tlet w = contents.width();\r\n\r\n\t\t\t\tx = Math.min(w * maxPanOut, x);\r\n\t\t\t\tx = Math.max(this.width() - w * scale * (1 + maxPanOut), x);\r\n\t\t\t}\r\n\t\t\treturn x;\r\n\t\t})\r\n\r\n\t\tcontents.adapters.add(\"y\", (y) => {\r\n\t\t\tconst scale = contents.get(\"scale\", 1);\r\n\t\t\tif($type.isNumber(y) && scale >= 1){\r\n\t\t\t\tlet maxPanOut = this.get(\"maxPanOut\", 0.4);\r\n\t\t\t\tlet h = contents.height();\r\n\r\n\t\t\t\ty = Math.min(h * maxPanOut, y);\r\n\t\t\t\ty = Math.max(this.height() - h * scale * (1 + maxPanOut), y);\r\n\t\t\t}\r\n\t\t\treturn y;\r\n\t\t})\r\n\t}\r\n\r\n\tpublic _prepareChildren() {\r\n\t\tsuper._prepareChildren();\r\n\t\tif (this.isDirty(\"wheelable\")) {\r\n\t\t\tthis._handleSetWheel();\r\n\t\t}\r\n\r\n\t\tthis.contents._display.cancelTouch = this.get(\"pinchZoom\", false);\r\n\t}\r\n\r\n\r\n\tprotected _handleSetWheel() {\r\n\t\tif (this.get(\"wheelable\")) {\r\n\t\t\tif (this._wheelDp) {\r\n\t\t\t\tthis._wheelDp.dispose();\r\n\t\t\t}\r\n\r\n\t\t\tthis._wheelDp = this.events.on(\"wheel\", (event) => {\r\n\t\t\t\tconst wheelEvent = event.originalEvent;\r\n\r\n\t\t\t\t// Ignore wheel event if it is happening on a non-ZoomableContainer element, e.g. if\r\n\t\t\t\t// some page element is over the ZoomableContainer.\r\n\t\t\t\tif ($utils.isLocalEvent(wheelEvent, this)) {\r\n\t\t\t\t\twheelEvent.preventDefault();\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tconst point = this.toLocal(event.point);\r\n\r\n\t\t\t\tthis._handleWheelZoom(wheelEvent.deltaY, point);\r\n\t\t\t});\r\n\r\n\t\t\tthis._disposers.push(this._wheelDp);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif (this._wheelDp) {\r\n\t\t\t\tthis._wheelDp.dispose();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tprotected _handleWheelZoom(delta: number, point: IPoint) {\r\n\t\tlet step = this.get(\"zoomStep\", 2);\r\n\t\tlet zoomLevel = this.contents.get(\"scale\", 1);\r\n\r\n\t\tlet newZoomLevel = zoomLevel;\r\n\t\tif (delta > 0) {\r\n\t\t\tnewZoomLevel = zoomLevel / step;\r\n\t\t}\r\n\t\telse if (delta < 0) {\r\n\t\t\tnewZoomLevel = zoomLevel * step;\r\n\t\t}\r\n\r\n\t\tif (newZoomLevel != zoomLevel) {\r\n\t\t\tthis.zoomToPoint(point, newZoomLevel)\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Zooms to specific X/Y point.\r\n\t * \r\n\t * @param point Center point\r\n\t * @param level Zoom level\r\n\t * @return Zoom Animation object\r\n\t */\r\n\tpublic zoomToPoint(point: IPoint, level: number): Animation<this[\"_settings\"][\"scale\"]> | undefined {\r\n\t\tif (level) {\r\n\t\t\tlevel = $math.fitToRange(level, this.get(\"minZoomLevel\", 1), this.get(\"maxZoomLevel\", 32));\r\n\t\t}\r\n\r\n\t\tconst zoomLevel = this.contents.get(\"scale\", 1);\r\n\r\n\t\tlet x = point.x;\r\n\t\tlet y = point.y;\r\n\r\n\t\tlet cx = x;\r\n\t\tlet cy = y;\r\n\r\n\t\tconst contents = this.contents;\r\n\r\n\t\tlet tx = contents.x();\r\n\t\tlet ty = contents.y();\r\n\r\n\t\tlet xx = cx - ((x - tx) / zoomLevel * level);\r\n\t\tlet yy = cy - ((y - ty) / zoomLevel * level);\r\n\r\n\t\tthis._animateTo(xx, yy, level);\r\n\r\n\t\treturn this._za;\r\n\t}\r\n\r\n\t/**\r\n\t * Zooms the container contents in by `zoomStep`.\r\n\t * \r\n\t * @return Zoom Animation object\r\n\t */\r\n\tpublic zoomIn(): Animation<this[\"_settings\"][\"scale\"]> | undefined {\r\n\t\treturn this.zoomToPoint({ x: this.width() / 2, y: this.height() / 2 }, this.contents.get(\"scale\", 1) * this.get(\"zoomStep\", 2));\r\n\t}\r\n\r\n\t/**\r\n\t * Zooms the container contents out by `zoomStep`.\r\n\t * \r\n\t * @return Zoom Animation object\r\n\t */\r\n\tpublic zoomOut(): Animation<this[\"_settings\"][\"scale\"]> | undefined {\r\n\t\treturn this.zoomToPoint({ x: this.width() / 2, y: this.height() / 2 }, this.contents.get(\"scale\", 1) / this.get(\"zoomStep\", 2));\r\n\t}\r\n\r\n\t/**\r\n\t * Fully zooms out the container contents.\r\n\t * \r\n\t * @return Zoom Animation object\r\n\t */\r\n\tpublic goHome() {\r\n\t\treturn this._animateTo(0, 0, 1);\r\n\t}\r\n\r\n\tprotected _animateTo(x: number, y: number, scale: number) {\r\n\t\tconst duration = this.get(\"animationDuration\", 0);\r\n\t\tconst easing = this.get(\"animationEasing\");\r\n\r\n\t\tconst contents = this.contents;\r\n\t\tthis._txa = contents.animate({ key: \"x\", to: x, duration: duration, easing: easing });\r\n\t\tthis._tya = contents.animate({ key: \"y\", to: y, duration: duration, easing: easing });\r\n\t\tthis._za = contents.animate({ key: \"scale\", to: scale, duration: duration, easing: easing });\r\n\t}\r\n\r\n\r\n\tprotected _handleThisUp(_event: ISpritePointerEvent) {\r\n\t\tthis._downPoints = {}\r\n\t}\r\n\r\n\tprotected _handleThisDown(event: ISpritePointerEvent) {\r\n\r\n\t\tconst contents = this.contents;\r\n\r\n\t\tthis._downScale = contents.get(\"scale\", 1);\r\n\t\tconst downPoints = contents._downPoints;\r\n\r\n\t\tlet count = $object.keys(downPoints).length;\r\n\r\n\t\tif (count == 1) {\r\n\t\t\t// workaround to solve a problem when events are added to some children of chart container (rotation stops working)\r\n\t\t\tlet downPoint = downPoints[1];\r\n\t\t\tif (!downPoint) {\r\n\t\t\t\tdownPoint = downPoints[0];\r\n\t\t\t}\r\n\r\n\t\t\tif (downPoint && (downPoint.x == event.point.x && downPoint.y == event.point.y)) {\r\n\t\t\t\tcount = 0;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (count > 0) {\r\n\t\t\tthis._downX = contents.x();\r\n\t\t\tthis._downY = contents.y();\r\n\r\n\t\t\tconst downId = contents._getDownPointId();\r\n\t\t\tif (downId) {\r\n\t\t\t\tlet movePoint = this._movePoints[downId];\r\n\t\t\t\tif (movePoint) {\r\n\t\t\t\t\tcontents._downPoints[downId] = movePoint;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\r\n\tprotected _handleThisMove(event: ISpritePointerEvent) {\r\n\t\tconst originalEvent = event.originalEvent as any;\r\n\r\n\t\tconst pointerId = originalEvent.pointerId;\r\n\r\n\t\tif (this.get(\"pinchZoom\")) {\r\n\t\t\tif (pointerId) {\r\n\t\t\t\tthis._movePoints[pointerId] = event.point;\r\n\r\n\t\t\t\tif ($object.keys(this.contents._downPoints).length > 1) {\r\n\t\t\t\t\tthis._handlePinch();\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tprotected _handlePinch() {\r\n\t\tlet i = 0;\r\n\t\tlet downPoints: Array<IPoint> = [];\r\n\t\tlet movePoints: Array<IPoint> = [];\r\n\r\n\t\t$object.each(this.contents._downPoints, (k, point) => {\r\n\t\t\tdownPoints[i] = point;\r\n\t\t\tlet movePoint = this._movePoints[k];\r\n\t\t\tif (movePoint) {\r\n\t\t\t\tmovePoints[i] = movePoint;\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t});\r\n\r\n\t\tif (downPoints.length > 1 && movePoints.length > 1) {\r\n\r\n\t\t\tthis.contents._isDragging = false;\r\n\r\n\t\t\tlet downPoint0 = downPoints[0];\r\n\t\t\tlet downPoint1 = downPoints[1];\r\n\r\n\t\t\tlet movePoint0 = movePoints[0];\r\n\t\t\tlet movePoint1 = movePoints[1];\r\n\r\n\t\t\tif (downPoint0 && downPoint1 && movePoint0 && movePoint1) {\r\n\t\t\t\tdownPoint0 = this.toLocal(downPoint0);\r\n\t\t\t\tdownPoint1 = this.toLocal(downPoint1);\r\n\r\n\t\t\t\tmovePoint0 = this.toLocal(movePoint0);\r\n\t\t\t\tmovePoint1 = this.toLocal(movePoint1);\r\n\r\n\t\t\t\tlet initialDistance = Math.hypot(downPoint1.x - downPoint0.x, downPoint1.y - downPoint0.y);\r\n\t\t\t\tlet currentDistance = Math.hypot(movePoint1.x - movePoint0.x, movePoint1.y - movePoint0.y);\r\n\r\n\t\t\t\tlet level = currentDistance / initialDistance * this._downScale;\r\n\t\t\t\tlet moveCenter = { x: movePoint0.x + (movePoint1.x - movePoint0.x) / 2, y: movePoint0.y + (movePoint1.y - movePoint0.y) / 2 };\r\n\t\t\t\tlet downCenter = { x: downPoint0.x + (downPoint1.x - downPoint0.x) / 2, y: downPoint0.y + (downPoint1.y - downPoint0.y) / 2 };\r\n\r\n\t\t\t\tlet tx = this._downX || 0;\r\n\t\t\t\tlet ty = this._downY || 0;\r\n\r\n\t\t\t\tlet zoomLevel = this._downScale;\r\n\r\n\t\t\t\tlet xx = moveCenter.x - (- tx + downCenter.x) / zoomLevel * level;\r\n\t\t\t\tlet yy = moveCenter.y - (- ty + downCenter.y) / zoomLevel * level;\r\n\r\n\t\t\t\tthis.contents.setAll({\r\n\t\t\t\t\tx: xx,\r\n\t\t\t\t\ty: yy,\r\n\t\t\t\t\tscale: level\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}","import { Container, IContainerPrivate, IContainerSettings, IContainerEvents } from \"../../core/render/Container\";\r\nimport { Button } from \"../../core/render/Button\";\r\nimport { Graphics } from \"../../core/render/Graphics\";\r\nimport { MultiDisposer, IDisposer } from \"../../core/util/Disposer\";\r\nimport { ZoomableContainer } from \"./ZoomableContainer\";\r\n\r\nexport interface IZoomable {\r\n\tzoomIn(): void;\r\n\tzoomOut(): void;\r\n\tgoHome(): void;\r\n}\r\n\r\nexport interface IZoomToolsSettings extends IContainerSettings {\r\n\r\n\t/**\r\n\t * A target element that zoom tools will control, e.g. [[ZoomableContainer]].\r\n\t */\r\n\ttarget?: IZoomable;\r\n\r\n}\r\n\r\nexport interface IZoomToolsPrivate extends IContainerPrivate {\r\n}\r\n\r\nexport interface IZoomToolsEvents extends IContainerEvents {\r\n}\r\n\r\n/**\r\n * A tool that displays button for zoomable targets.\r\n *\r\n * @since 5.8.0\r\n * @important\r\n */\r\nexport class ZoomTools extends Container {\r\n\r\n\tpublic static className: string = \"ZoomTools\";\r\n\tpublic static classNames: Array<string> = Container.classNames.concat([ZoomTools.className]);\r\n\tdeclare public _events: IContainerEvents;\r\n\r\n\t/**\r\n\t * A [[Button]] for home.\r\n\t */\r\n\tpublic readonly homeButton: Button = this.children.push(Button.new(this._root, { width: 35, height: 35, themeTags: [\"home\"] }));\r\n\r\n\t/**\r\n\t * A [[Button]] for zoom in.\r\n\t */\r\n\tpublic readonly plusButton: Button = this.children.push(Button.new(this._root, { width: 35, height: 35, themeTags: [\"plus\"] }));\r\n\r\n\t/**\r\n\t * A [[Button]] for zoom out.\r\n\t */\r\n\tpublic readonly minusButton: Button = this.children.push(Button.new(this._root, { width: 35, height: 35, themeTags: [\"minus\"] }));\r\n\r\n\tdeclare public _settings: IZoomToolsSettings;\r\n\tdeclare public _privateSettings: IZoomToolsPrivate;\r\n\r\n\tprotected _disposer: MultiDisposer | undefined;\r\n\tprotected _targetDisposer: IDisposer | undefined;\r\n\r\n\tprotected _afterNew() {\r\n\t\tsuper._afterNew();\r\n\r\n\t\tthis.set(\"position\", \"absolute\");\r\n\r\n\t\tthis.set(\"layout\", this._root.verticalLayout);\r\n\t\tthis.addTag(\"zoomtools\");\r\n\r\n\t\tthis.plusButton.setAll({\r\n\t\t\ticon: Graphics.new(this._root, { themeTags: [\"icon\"] }),\r\n\t\t\tlayout: undefined\r\n\t\t});\r\n\r\n\t\tthis.minusButton.setAll({\r\n\t\t\ticon: Graphics.new(this._root, { themeTags: [\"icon\"] }),\r\n\t\t\tlayout: undefined\r\n\t\t});\r\n\r\n\t\tthis.homeButton.setAll({\r\n\t\t\ticon: Graphics.new(this._root, { themeTags: [\"icon\"] }),\r\n\t\t\tlayout: undefined\r\n\t\t});\r\n\t}\r\n\r\n\tpublic _prepareChildren() {\r\n\t\tsuper._prepareChildren();\r\n\r\n\t\tif (this.isDirty(\"target\")) {\r\n\t\t\tconst target = this.get(\"target\");\r\n\r\n\t\t\tconst previous = this._prevSettings.target;\r\n\t\t\tif (target) {\r\n\t\t\t\tif (target instanceof ZoomableContainer) {\r\n\t\t\t\t\tthis._targetDisposer = this.addDisposer(target.contents.on(\"scale\", (scale) => {\r\n\t\t\t\t\t\tif (scale == target.get(\"minZoomLevel\")) {\r\n\t\t\t\t\t\t\tthis.minusButton.set(\"disabled\", true)\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tthis.minusButton.set(\"disabled\", false)\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (scale == target.get(\"maxZoomLevel\")) {\r\n\t\t\t\t\t\t\tthis.plusButton.set(\"disabled\", true)\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tthis.plusButton.set(\"disabled\", false)\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}))\r\n\t\t\t\t\tthis.root.events.once(\"frameended\", () => {\r\n\t\t\t\t\t\tif (target.get(\"scale\") == target.get(\"minZoomLevel\")) {\r\n\t\t\t\t\t\t\tthis.minusButton.set(\"disabled\", true)\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t})\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis._disposer = new MultiDisposer([\r\n\t\t\t\t\tthis.plusButton.events.on(\"click\", () => {\r\n\t\t\t\t\t\ttarget.zoomIn()\r\n\t\t\t\t\t}),\r\n\t\t\t\t\tthis.minusButton.events.on(\"click\", () => {\r\n\t\t\t\t\t\ttarget.zoomOut()\r\n\t\t\t\t\t}),\r\n\t\t\t\t\tthis.homeButton.events.on(\"click\", () => {\r\n\t\t\t\t\t\ttarget.goHome()\r\n\t\t\t\t\t})])\r\n\t\t\t}\r\n\r\n\t\t\tif (previous) {\r\n\t\t\t\tif (this._disposer) {\r\n\t\t\t\t\tthis._disposer.dispose();\r\n\t\t\t\t}\r\n\t\t\t\tif (this._targetDisposer) {\r\n\t\t\t\t\tthis._targetDisposer.dispose();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n","import type { MapChart } from \"./MapChart\";\n\nimport { ZoomTools, IZoomToolsPrivate, IZoomToolsSettings } from \"../../core/render/ZoomTools\";\n\nexport interface IZoomControlSettings extends IZoomToolsSettings {\n}\n\nexport interface IZoomControlPrivate extends IZoomToolsPrivate {\n\t/**\n\t * @ignore\n\t */\n\tchart?: MapChart;\n}\n\n/**\n * A control that displays button for zooming [[MapChart]] in and out.\n *\n * @see {@link https://www.amcharts.com/docs/v5/charts/map-chart/map-pan-zoom/#Zoom_control} for more information\n * @important\n */\nexport class ZoomControl extends ZoomTools {\n\tpublic static className: string = \"ZoomControl\";\n\tpublic static classNames: Array<string> = ZoomTools.classNames.concat([ZoomControl.className]);\n\n\tdeclare public _settings: IZoomControlSettings;\n\tdeclare public _privateSettings: IZoomControlPrivate;\n\n\tprotected _afterNew() {\n\t\tsuper._afterNew();\n\t\tthis.addTag(\"zoomtools\");\n\t}\n\n\tpublic _prepareChildren() {\n\t\tsuper._prepareChildren();\n\n\t\tif (this.isPrivateDirty(\"chart\")) {\n\t\t\tthis.set(\"target\", this.getPrivate(\"chart\"));\n\t\t}\n\t}\n}\n","import type { Axis } from \"../xy/axes/Axis\";\nimport type { RadarChart } from \"./RadarChart\";\nimport type { Grid } from \"../xy/axes/Grid\";\nimport type { IPoint } from \"../../core/util/IPoint\";\nimport type { Graphics } from \"../../core/render/Graphics\";\nimport type { AxisTick } from \"../xy/axes/AxisTick\";\nimport type { AxisBullet } from \"../xy/axes/AxisBullet\";\nimport type { Tooltip } from \"../../core/render/Tooltip\";\n\nimport { Slice } from \"../../core/render/Slice\";\nimport { AxisRenderer, IAxisRendererSettings, IAxisRendererPrivate } from \"../xy/axes/AxisRenderer\";\nimport { AxisLabelRadial } from \"../xy/axes/AxisLabelRadial\";\nimport { Percent, p100 } from \"../../core/util/Percent\";\nimport { ListTemplate } from \"../../core/util/List\";\nimport { Template } from \"../../core/util/Template\";\nimport { arc } from \"d3-shape\";\n\nimport * as $utils from \"../../core/util/Utils\";\nimport * as $math from \"../../core/util/Math\";\n\n\nexport interface IAxisRendererCircularSettings extends IAxisRendererSettings {\n\n\t/**\n\t * Outer radius of the axis.\n\t *\n\t * If set in percent, it will be relative to chart's own `radius`.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/radar-chart/radar-axes/#Axis_radii_and_angles} for more info\n\t */\n\tradius?: number | Percent;\n\n\t/**\n\t * Inner radius of the axis.\n\t *\n\t * If set in percent, it will be relative to chart's own `innerRadius`.\n\t *\n\t * If value is negative, inner radius will be calculated from the outer edge.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/radar-chart/radar-axes/#Axis_radii_and_angles} for more info\n\t */\n\tinnerRadius?: number | Percent;\n\n\t/**\n\t * Series start angle.\n\t *\n\t * If not set, will use chart's `startAngle.`\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/radar-chart/radar-axes/#Axis_radii_and_angles} for more info\n\t */\n\tstartAngle?: number;\n\n\t/**\n\t * Series end angle.\n\t *\n\t * If not set, will use chart's `endAngle.`\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/radar-chart/radar-axes/#Axis_radii_and_angles} for more info\n\t */\n\tendAngle?: number;\n\n\t/**\n\t * @todo am: needs description\n\t */\n\taxisAngle?: number;\n\n}\n\nexport interface IAxisRendererCircularPrivate extends IAxisRendererPrivate {\n\n\t/**\n\t * Actual radius of the label in pixels.\n\t */\n\tradius?: number;\n\n\t/**\n\t * Actual inner radius of the label in pixels.\n\t */\n\tinnerRadius?: number;\n\n\t/**\n\t * Actual start angle of the label in degrees.\n\t */\n\tstartAngle?: number;\n\n\t/**\n\t * Actual end angle of the label in degrees.\n\t */\n\tendAngle?: number;\n\n}\n\n/**\n * Renderer for circular axes.\n */\nexport class AxisRendererCircular extends AxisRenderer {\n\n\t/**\n\t * Chart this renderer is for.\n\t */\n\tdeclare public chart: RadarChart | undefined;\n\n\t/**\n\t * A list of labels in the axis.\n\t *\n\t * `labels.template` can be used to configure labels.\n\t *\n\t * @default new ListTemplate<AxisLabelRadial>\n\t */\n\tpublic readonly labels: ListTemplate<AxisLabelRadial> = this.addDisposer(new ListTemplate(\n\t\tTemplate.new({}),\n\t\t() => AxisLabelRadial._new(this._root, {\n\t\t\tthemeTags: $utils.mergeTags(this.labels.template.get(\"themeTags\", []), this.get(\"themeTags\", []))\n\t\t}, [this.labels.template])\n\t));\n\n\n\t/**\n\t * A list of fills in the axis.\n\t *\n\t * `axisFills.template` can be used to configure axis fills.\n\t *\n\t * @default new ListTemplate<Slice>\n\t */\n\tpublic readonly axisFills: ListTemplate<Slice> = this.addDisposer(new ListTemplate(\n\t\tTemplate.new({}),\n\t\t() => Slice._new(this._root, {\n\t\t\tthemeTags: $utils.mergeTags(this.axisFills.template.get(\"themeTags\", [\"fill\"]), this.get(\"themeTags\", []))\n\t\t}, [this.axisFills.template])\n\t));\n\n\n\tpublic static className: string = \"AxisRendererCircular\";\n\tpublic static classNames: Array<string> = AxisRenderer.classNames.concat([AxisRendererCircular.className]);\n\n\tdeclare public _settings: IAxisRendererCircularSettings;\n\tdeclare public _privateSettings: IAxisRendererCircularPrivate;\n\n\tprotected _fillGenerator = arc();\n\n\tpublic _afterNew() {\n\t\tthis._settings.themeTags = $utils.mergeTags(this._settings.themeTags, [\"renderer\", \"circular\"]);\n\t\tsuper._afterNew();\n\t\tthis.setPrivateRaw(\"letter\", \"X\");\n\t\tthis.setRaw(\"position\", \"absolute\");\n\t}\n\n\tpublic _changed() {\n\t\tsuper._changed();\n\n\t\tif (this.isDirty(\"radius\") || this.isDirty(\"innerRadius\") || this.isDirty(\"startAngle\") || this.isDirty(\"endAngle\")) {\n\t\t\tthis.updateLayout();\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic processAxis() {\n\t\tsuper.processAxis();\n\t\tconst axis = this.axis;\n\t\taxis.labelsContainer.set(\"isMeasured\", false);\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateLayout() {\n\t\tconst chart = this.chart;\n\t\tif (chart) {\n\t\t\tconst radius = chart.getPrivate(\"radius\", 0);\n\n\t\t\tlet r = $utils.relativeToValue(this.get(\"radius\", p100), radius);\n\n\t\t\tif (r < 0) {\n\t\t\t\tr = radius + r;\n\t\t\t}\n\n\t\t\tthis.setPrivate(\"radius\", r);\n\n\t\t\tlet ir = $utils.relativeToValue(this.get(\"innerRadius\", chart.getPrivate(\"innerRadius\", 0)), radius) * chart.getPrivate(\"irModifyer\", 1);\n\n\t\t\tif (ir < 0) {\n\t\t\t\tir = r + ir;\n\t\t\t}\n\n\t\t\tthis.setPrivate(\"innerRadius\", ir);\n\n\t\t\tlet startAngle = this.get(\"startAngle\", chart.get(\"startAngle\", -90));\n\t\t\tlet endAngle = this.get(\"endAngle\", chart.get(\"endAngle\", 270));\n\n\t\t\tthis.setPrivate(\"startAngle\", startAngle);\n\t\t\tthis.setPrivate(\"endAngle\", endAngle);\n\n\t\t\tthis.set(\"draw\", (display) => {\n\t\t\t\tconst p0 = this.positionToPoint(0);\n\t\t\t\tdisplay.moveTo(p0.x, p0.y);\n\n\t\t\t\tif (startAngle > endAngle) {\n\t\t\t\t\t[startAngle, endAngle] = [endAngle, startAngle];\n\t\t\t\t}\n\n\t\t\t\tdisplay.arc(0, 0, r, startAngle * $math.RADIANS, endAngle * $math.RADIANS);\n\t\t\t});\n\n\t\t\tthis.axis.markDirtySize();\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateGrid(grid?: Grid, position?: number, endPosition?: number) {\n\t\tif (grid) {\n\n\t\t\tif (position == null) {\n\t\t\t\tposition = 0;\n\t\t\t}\n\n\t\t\tlet location = grid.get(\"location\", 0.5);\n\t\t\tif (endPosition != null && endPosition != position) {\n\t\t\t\tposition = position + (endPosition - position) * location;\n\t\t\t}\n\n\t\t\tlet radius = this.getPrivate(\"radius\", 0);\n\t\t\tlet innerRadius = this.getPrivate(\"innerRadius\", 0);\n\t\t\tlet angle = this.positionToAngle(position);\n\n\t\t\tthis.toggleVisibility(grid, position, 0, 1);\n\n\t\t\tif (radius != null) {\n\t\t\t\tgrid.set(\"draw\", (display) => {\n\t\t\t\t\tdisplay.moveTo(innerRadius * $math.cos(angle), innerRadius * $math.sin(angle));\n\t\t\t\t\tdisplay.lineTo(radius * $math.cos(angle), radius * $math.sin(angle));\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Converts relative position to angle.\n\t *\n\t * @param position Position\n\t * @return Angle\n\t */\n\tpublic positionToAngle(position: number): number {\n\t\tconst axis: Axis<AxisRenderer> = this.axis;\n\t\tconst startAngle = this.getPrivate(\"startAngle\", 0);\n\t\tconst endAngle = this.getPrivate(\"endAngle\", 360);\n\n\t\tconst start = axis.get(\"start\", 0);\n\t\tconst end = axis.get(\"end\", 1);\n\n\t\tlet arc = (endAngle - startAngle) / (end - start);\n\n\t\tlet angle: number;\n\n\t\tif (this.get(\"inversed\")) {\n\t\t\tangle = startAngle + (end - position) * arc;\n\t\t}\n\t\telse {\n\t\t\tangle = startAngle + (position - start) * arc;\n\t\t}\n\n\t\treturn angle;\n\t}\n\n\t// do not delete\n\tprotected _handleOpposite() { }\n\n\t/**\n\t * Converts relative position to an X/Y coordinate.\n\t *\n\t * @param position Position\n\t * @return Point\n\t */\n\tpublic positionToPoint(position: number): IPoint {\n\t\tconst radius = this.getPrivate(\"radius\", 0);\n\t\tconst angle = this.positionToAngle(position);\n\t\treturn { x: radius * $math.cos(angle), y: radius * $math.sin(angle) };\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateLabel(label?: AxisLabelRadial, position?: number, endPosition?: number, count?: number) {\n\t\tif (label) {\n\t\t\tif (position == null) {\n\t\t\t\tposition = 0;\n\t\t\t}\n\n\t\t\tlet location = 0.5;\n\t\t\tif (count != null && count > 1) {\n\t\t\t\tlocation = label.get(\"multiLocation\", location);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tlocation = label.get(\"location\", location);\n\t\t\t}\n\n\t\t\tif (endPosition != null && endPosition != position) {\n\t\t\t\tposition = position + (endPosition - position) * location;\n\t\t\t}\n\n\t\t\tconst radius = this.getPrivate(\"radius\", 0);\n\t\t\tconst innerRadius = this.getPrivate(\"innerRadius\", 0);\n\t\t\tconst angle = this.positionToAngle(position);\n\n\t\t\tlabel.setPrivate(\"radius\", radius);\n\t\t\tlabel.setPrivate(\"innerRadius\", innerRadius);\n\t\t\tlabel.set(\"labelAngle\", angle);\n\n\t\t\tthis.toggleVisibility(label, position, label.get(\"minPosition\", 0), label.get(\"maxPosition\", 1));\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic fillDrawMethod(fill: Graphics, startAngle?: number, endAngle?: number) {\n\t\tfill.set(\"draw\", (display) => {\n\t\t\tif (startAngle == null) {\n\t\t\t\tstartAngle = this.getPrivate(\"startAngle\", 0);\n\t\t\t}\n\t\t\tif (endAngle == null) {\n\t\t\t\tendAngle = this.getPrivate(\"endAngle\", 0);\n\t\t\t}\n\t\t\tconst y0 = this.getPrivate(\"innerRadius\", 0);\n\t\t\tconst y1 = this.getPrivate(\"radius\", 0);\n\t\t\tthis._fillGenerator.context(display as any);\n\t\t\tthis._fillGenerator({ innerRadius: y0, outerRadius: y1, startAngle: (startAngle + 90) * $math.RADIANS, endAngle: (endAngle + 90) * $math.RADIANS });\n\t\t})\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateTick(tick?: AxisTick, position?: number, endPosition?: number, count?: number) {\n\t\tif (tick) {\n\t\t\tif (position == null) {\n\t\t\t\tposition = 0;\n\t\t\t}\n\n\t\t\tlet location = 0.5;\n\t\t\tif (count != null && count > 1) {\n\t\t\t\tlocation = tick.get(\"multiLocation\", location);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tlocation = tick.get(\"location\", location);\n\t\t\t}\n\n\t\t\tif (endPosition != null && endPosition != position) {\n\t\t\t\tposition = position + (endPosition - position) * location;\n\t\t\t}\n\n\t\t\tlet length = tick.get(\"length\", 0);\n\t\t\tconst inside = tick.get(\"inside\");\n\n\t\t\tif (inside) {\n\t\t\t\tlength *= -1\n\t\t\t}\n\n\t\t\tlet radius = this.getPrivate(\"radius\", 0);\n\t\t\tlet angle = this.positionToAngle(position);\n\n\t\t\tthis.toggleVisibility(tick, position, tick.get(\"minPosition\", 0), tick.get(\"maxPosition\", 1));\n\n\t\t\tif (radius != null) {\n\t\t\t\ttick.set(\"draw\", (display) => {\n\t\t\t\t\tdisplay.moveTo(radius * $math.cos(angle), radius * $math.sin(angle));\n\t\t\t\t\tradius += length;\n\t\t\t\t\tdisplay.lineTo(radius * $math.cos(angle), radius * $math.sin(angle));\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateBullet(bullet?: AxisBullet, position?: number, endPosition?: number) {\n\t\tif (bullet) {\n\t\t\tconst sprite = bullet.get(\"sprite\");\n\n\t\t\tif (sprite) {\n\t\t\t\tif (position == null) {\n\t\t\t\t\tposition = 0;\n\t\t\t\t}\n\n\t\t\t\tlet location = bullet.get(\"location\", 0.5);\n\t\t\t\tif (endPosition != null && endPosition != position) {\n\t\t\t\t\tposition = position + (endPosition - position) * location;\n\t\t\t\t}\n\n\t\t\t\tlet radius = this.getPrivate(\"radius\", 0);\n\t\t\t\tlet angle = this.positionToAngle(position);\n\n\t\t\t\tthis.toggleVisibility(sprite, position, 0, 1);\n\n\t\t\t\tsprite.setAll({ rotation: angle, x: radius * $math.cos(angle), y: radius * $math.sin(angle) });\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateFill(fill?: Slice, position?: number, endPosition?: number) {\n\t\tif (fill) {\n\t\t\tif (position == null) {\n\t\t\t\tposition = 0;\n\t\t\t}\n\t\t\tif (endPosition == null) {\n\t\t\t\tendPosition = 1;\n\t\t\t}\n\n\t\t\tlet startAngle = this.fitAngle(this.positionToAngle(position));\n\t\t\tlet endAngle = this.fitAngle(this.positionToAngle(endPosition));\n\t\t\tfill.setAll({ startAngle: startAngle, arc: endAngle - startAngle });\n\n\t\t\tfill._setSoft(\"innerRadius\", this.getPrivate(\"innerRadius\"));\n\t\t\tfill._setSoft(\"radius\", this.getPrivate(\"radius\"));\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic fitAngle(angle: number): number {\n\t\tconst startAngle = this.getPrivate(\"startAngle\", 0);\n\t\tconst endAngle = this.getPrivate(\"endAngle\", 0);\n\n\t\tconst minAngle = Math.min(startAngle, endAngle);\n\t\tconst maxAngle = Math.max(startAngle, endAngle);\n\n\t\tif (angle < minAngle) {\n\t\t\tangle = minAngle;\n\t\t}\n\n\t\tif (angle > maxAngle) {\n\t\t\tangle = maxAngle;\n\t\t}\n\n\t\treturn angle;\n\t}\n\n\t/**\n\t * Returns axis length in pixels.\n\t *\n\t * @return Length\n\t */\n\tpublic axisLength(): number {\n\t\treturn Math.abs(this.getPrivate(\"radius\", 0) * Math.PI * 2 * (this.getPrivate(\"endAngle\", 360) - this.getPrivate(\"startAngle\", 0)) / 360);\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic positionTooltip(tooltip: Tooltip, position: number) {\n\t\tlet radius = this.getPrivate(\"radius\", 0);\n\t\tconst angle = this.positionToAngle(position);\n\t\t//return tooltip.set(\"pointTo\", this.axis._display.toGlobal({ x: radius * $math.cos(angle), y: radius * $math.sin(angle) }));\n\t\tthis._positionTooltip(tooltip, { x: radius * $math.cos(angle), y: radius * $math.sin(angle) });\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateTooltipBounds(_tooltip: Tooltip) {\n\n\t}\n}\n","import type { RadarChart } from \"./RadarChart\";\nimport type { Grid } from \"../xy/axes/Grid\";\nimport type { IPoint } from \"../../core/util/IPoint\";\nimport type { Graphics } from \"../../core/render/Graphics\";\nimport type { AxisTick } from \"../xy/axes/AxisTick\";\nimport type { AxisBullet } from \"../xy/axes/AxisBullet\";\nimport type { Tooltip } from \"../../core/render/Tooltip\";\n\nimport { AxisRenderer, IAxisRendererSettings, IAxisRendererPrivate } from \"../xy/axes/AxisRenderer\";\nimport { Percent, p100 } from \"../../core/util/Percent\";\nimport { AxisLabelRadial } from \"../xy/axes/AxisLabelRadial\";\nimport { arc } from \"d3-shape\";\nimport { ListTemplate } from \"../../core/util/List\";\nimport { Template } from \"../../core/util/Template\";\n\nimport * as $utils from \"../../core/util/Utils\";\nimport * as $type from \"../../core/util/Type\";\nimport * as $math from \"../../core/util/Math\";\n\n\nexport interface IAxisRendererRadialSettings extends IAxisRendererSettings {\n\n\t/**\n\t * Outer radius of the axis.\n\t *\n\t * If set in percent, it will be relative to chart's own `radius`.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/radar-chart/radar-axes/#Axis_radii_and_angles} for more info\n\t */\n\tradius?: number | Percent;\n\n\t/**\n\t * Inner radius of the axis.\n\t *\n\t * If set in percent, it will be relative to chart's own `innerRadius`.\n\t *\n\t * If value is negative, inner radius will be calculated from the outer edge.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/radar-chart/radar-axes/#Axis_radii_and_angles} for more info\n\t */\n\tinnerRadius?: number | Percent;\n\n\t/**\n\t * Series start angle.\n\t *\n\t * If not set, will use chart's `startAngle.`\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/radar-chart/radar-axes/#Axis_radii_and_angles} for more info\n\t */\n\tstartAngle?: number;\n\n\t/**\n\t * Series end angle.\n\t *\n\t * If not set, will use chart's `endAngle.`\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/radar-chart/radar-axes/#Axis_radii_and_angles} for more info\n\t */\n\tendAngle?: number;\n\n\n\t/**\n\t * @todo am: needs description\n\t */\n\taxisAngle?: number;\n\n}\n\nexport interface IAxisRendererRadialPrivate extends IAxisRendererPrivate {\n\n\t/**\n\t * Actual radius of the label in pixels.\n\t */\n\tradius?: number;\n\n\t/**\n\t * Actual inner radius of the label in pixels.\n\t */\n\tinnerRadius?: number;\n\n\t/**\n\t * Actual start angle of the label in degrees.\n\t */\n\tstartAngle?: number;\n\n\t/**\n\t * Actual end angle of the label in degrees.\n\t */\n\tendAngle?: number;\n\n}\n\n/**\n * Renderer for radial axes.\n */\nexport class AxisRendererRadial extends AxisRenderer {\n\n\t/**\n\t * Chart this renderer is for.\n\t */\n\tdeclare public chart: RadarChart | undefined;\n\n\tpublic static className: string = \"AxisRendererRadial\";\n\tpublic static classNames: Array<string> = AxisRenderer.classNames.concat([AxisRendererRadial.className]);\n\n\tdeclare public _settings: IAxisRendererRadialSettings;\n\tdeclare public _privateSettings: IAxisRendererRadialPrivate;\n\n\tprotected _fillGenerator = arc();\n\n\t/**\n\t * A [[TemplateList]] with all the labels attached to the axis.\n\t *\n\t * `labels.template` can be used to configure appearance of the labels.\n\t *\n\t * @default new ListTemplate<AxisLabelRadial>\n\t */\n\tpublic readonly labels: ListTemplate<AxisLabelRadial> = this.addDisposer(new ListTemplate(\n\t\tTemplate.new({}),\n\t\t() => AxisLabelRadial._new(this._root, {\n\t\t\tthemeTags: $utils.mergeTags(this.labels.template.get(\"themeTags\", []), this.get(\"themeTags\", []))\n\t\t}, [this.labels.template])\n\t));\n\n\tpublic _afterNew() {\n\t\tthis._settings.themeTags = $utils.mergeTags(this._settings.themeTags, [\"renderer\", \"radial\"]);\n\t\tsuper._afterNew();\n\t\tthis.setPrivate(\"letter\", \"Y\");\n\t\tthis.setRaw(\"position\", \"absolute\");\n\t}\n\n\tpublic _changed() {\n\t\tsuper._changed();\n\n\t\tif (this.isDirty(\"radius\") || this.isDirty(\"innerRadius\") || this.isDirty(\"startAngle\") || this.isDirty(\"endAngle\")) {\n\t\t\tthis.updateLayout();\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic processAxis() {\n\t\tsuper.processAxis();\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateLayout() {\n\t\tconst chart = this.chart;\n\t\tif (chart) {\n\t\t\tconst radius = chart.getPrivate(\"radius\", 0);\n\n\t\t\tlet r = $utils.relativeToValue(this.get(\"radius\", p100), radius);\n\t\t\tlet ir = $utils.relativeToValue(this.get(\"innerRadius\", chart.getPrivate(\"innerRadius\", 0)), radius) * chart.getPrivate(\"irModifyer\", 1);\n\n\t\t\tif (ir < 0) {\n\t\t\t\tir = r + ir;\n\t\t\t}\n\n\t\t\tthis.setPrivate(\"radius\", r);\n\t\t\tthis.setPrivate(\"innerRadius\", ir);\n\t\t\tlet startAngle = this.get(\"startAngle\", chart.get(\"startAngle\", -90));\n\t\t\tlet endAngle = this.get(\"endAngle\", chart.get(\"endAngle\", 270));\n\n\t\t\tthis.setPrivate(\"startAngle\", startAngle);\n\t\t\tthis.setPrivate(\"endAngle\", endAngle);\n\n\t\t\tconst axisAngle = this.get(\"axisAngle\", 0);\n\n\t\t\tthis.set(\"draw\", (display) => {\n\t\t\t\tdisplay.moveTo(ir * $math.cos(axisAngle), ir * $math.sin(axisAngle));\n\t\t\t\tdisplay.lineTo(r * $math.cos(axisAngle), r * $math.sin(axisAngle));\n\t\t\t});\n\n\t\t\tthis.axis.markDirtySize();\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateGrid(grid?: Grid, position?: number, endPosition?: number) {\n\t\tif (grid) {\n\n\t\t\tif (!$type.isNumber(position)) {\n\t\t\t\tposition = 0;\n\t\t\t}\n\n\t\t\tlet location = grid.get(\"location\", 0.5);\n\t\t\tif ($type.isNumber(endPosition) && endPosition != position) {\n\t\t\t\tposition = position + (endPosition - position) * location;\n\t\t\t}\n\n\t\t\tlet radius = this.positionToCoordinate(position) + this.getPrivate(\"innerRadius\", 0);\n\n\t\t\tthis.toggleVisibility(grid, position, 0, 1);\n\n\t\t\tif ($type.isNumber(radius)) {\n\t\t\t\tgrid.set(\"draw\", (display) => {\n\t\t\t\t\tlet startAngle = this.getPrivate(\"startAngle\", 0) * $math.RADIANS;\n\t\t\t\t\tlet endAngle = this.getPrivate(\"endAngle\", 0) * $math.RADIANS;\n\t\t\t\t\tdisplay.arc(0, 0, Math.max(0, radius), Math.min(startAngle, endAngle), Math.max(startAngle, endAngle));\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\t}\n\n\t// do not delete\n\tprotected _handleOpposite() { }\n\n\t/**\n\t * Converts relative position to X/Y point.\n\t *\n\t * @param position Position\n\t * @return Point\n\t */\n\tpublic positionToPoint(position: number): IPoint {\n\t\tconst innerRadius = this.getPrivate(\"innerRadius\", 0);\n\t\tconst radius = this.positionToCoordinate(position) + innerRadius;\n\t\tconst axisAngle = this.get(\"axisAngle\", 0);\n\t\treturn { x: radius * $math.cos(axisAngle), y: radius * $math.sin(axisAngle) };\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateLabel(label?: AxisLabelRadial, position?: number, endPosition?: number, count?: number) {\n\t\tif (label) {\n\t\t\tif (!$type.isNumber(position)) {\n\t\t\t\tposition = 0;\n\t\t\t}\n\n\t\t\tlet location = 0.5;\n\t\t\tif ($type.isNumber(count) && count > 1) {\n\t\t\t\tlocation = label.get(\"multiLocation\", location);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tlocation = label.get(\"location\", location);\n\t\t\t}\n\n\t\t\tif ($type.isNumber(endPosition) && endPosition != position) {\n\t\t\t\tposition = position + (endPosition - position) * location;\n\t\t\t}\n\n\t\t\tconst point = this.positionToPoint(position);\n\n\t\t\tlet radius = Math.hypot(point.x, point.y);\n\n\t\t\tlabel.setPrivate(\"radius\", radius);\n\t\t\tlabel.setPrivate(\"innerRadius\", radius);\n\t\t\tlabel.set(\"labelAngle\", this.get(\"axisAngle\"));\n\n\t\t\tthis.toggleVisibility(label, position, label.get(\"minPosition\", 0), label.get(\"maxPosition\", 1));\n\t\t}\n\t}\n\n\tprotected fillDrawMethod(fill: Graphics, y0: number, y1: number) {\n\t\tfill.set(\"draw\", (display) => {\n\t\t\ty0 = Math.max(0, y0);\n\t\t\ty1 = Math.max(0, y1);\n\t\t\tthis._fillGenerator.context(display as any);\n\t\t\tlet startAngle = (this.getPrivate(\"startAngle\", 0) + 90) * $math.RADIANS;\n\t\t\tlet endAngle = (this.getPrivate(\"endAngle\", 0) + 90) * $math.RADIANS;\n\n\t\t\tif (endAngle < startAngle) {\n\t\t\t\t[startAngle, endAngle] = [endAngle, startAngle];\n\t\t\t}\n\n\t\t\tthis._fillGenerator({ innerRadius: y0, outerRadius: y1, startAngle: startAngle, endAngle: endAngle });\n\t\t})\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateTick(tick?: AxisTick, position?: number, endPosition?: number, count?: number) {\n\t\tif (tick) {\n\n\t\t\tif (!$type.isNumber(position)) {\n\t\t\t\tposition = 0;\n\t\t\t}\n\n\t\t\tlet location = 0.5;\n\t\t\tif ($type.isNumber(count) && count > 1) {\n\t\t\t\tlocation = tick.get(\"multiLocation\", location);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tlocation = tick.get(\"location\", location);\n\t\t\t}\n\n\t\t\tif ($type.isNumber(endPosition) && endPosition != position) {\n\t\t\t\tposition = position + (endPosition - position) * location;\n\t\t\t}\n\n\t\t\tconst point = this.positionToPoint(position);\n\n\t\t\ttick.set(\"x\", point.x);\n\t\t\ttick.set(\"y\", point.y);\n\n\t\t\tlet length = tick.get(\"length\", 0);\n\t\t\tconst inside = tick.get(\"inside\");\n\n\t\t\tif (inside) {\n\t\t\t\tlength *= -1\n\t\t\t}\n\n\t\t\tconst axisAngle = this.get(\"axisAngle\", 0) + 90;\n\n\t\t\ttick.set(\"draw\", (display) => {\n\t\t\t\tdisplay.moveTo(0, 0);\n\t\t\t\tdisplay.lineTo(length * $math.cos(axisAngle), length * $math.sin(axisAngle));\n\t\t\t})\n\n\t\t\tthis.toggleVisibility(tick, position, tick.get(\"minPosition\", 0), tick.get(\"maxPosition\", 1));\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateBullet(bullet?: AxisBullet, position?: number, endPosition?: number) {\n\t\tif (bullet) {\n\n\t\t\tconst sprite = bullet.get(\"sprite\");\n\n\t\t\tif (sprite) {\n\n\t\t\t\tif (!$type.isNumber(position)) {\n\t\t\t\t\tposition = 0;\n\t\t\t\t}\n\n\t\t\t\tlet location = bullet.get(\"location\", 0.5);\n\t\t\t\tif ($type.isNumber(endPosition) && endPosition != position) {\n\t\t\t\t\tposition = position + (endPosition - position) * location;\n\t\t\t\t}\n\n\t\t\t\tconst point = this.positionToPoint(position);\n\n\t\t\t\tsprite.setAll({ x: point.x, y: point.y });\n\n\t\t\t\tthis.toggleVisibility(sprite, position, 0, 1);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateFill(fill?: Graphics, position?: number, endPosition?: number) {\n\t\tif (fill) {\n\t\t\tif (!$type.isNumber(position)) {\n\t\t\t\tposition = 0;\n\t\t\t}\n\t\t\tif (!$type.isNumber(endPosition)) {\n\t\t\t\tendPosition = 1;\n\t\t\t}\n\n\t\t\tconst innerRadius = this.getPrivate(\"innerRadius\", 0);\n\n\t\t\tlet y0 = this.positionToCoordinate(position) + innerRadius;\n\t\t\tlet y1 = this.positionToCoordinate(endPosition) + innerRadius;\n\n\t\t\tthis.fillDrawMethod(fill, y0, y1);\n\t\t}\n\t}\n\n\t/**\n\t * Returns axis length in pixels.\n\t *\n\t * @return Length\n\t */\n\tpublic axisLength(): number {\n\t\treturn this.getPrivate(\"radius\", 0) - this.getPrivate(\"innerRadius\", 0);\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateTooltipBounds(_tooltip: Tooltip) {\n\n\t}\n\n\t/**\n\t * Converts relative position to pixels.\n\t *\n\t * @param position Position\n\t * @return Pixels\n\t */\n\tpublic positionToCoordinate(position: number): number {\n\t\tif (this._inversed) {\n\t\t\tposition = Math.min(this._end, position);\n\t\t\treturn (this._end - position) * this._axisLength;\n\t\t}\n\t\telse {\n\t\t\tposition = Math.max(this._start, position);\n\t\t\treturn (position - this._start) * this._axisLength;\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic positionTooltip(tooltip: Tooltip, position: number) {\n\t\tlet radius = this.getPrivate(\"innerRadius\", 0) + this.positionToCoordinate(position);\n\t\tconst angle = this.get(\"axisAngle\", 0);\n\t\t//return tooltip.set(\"pointTo\", this.axis._display.toGlobal({ x: radius * $math.cos(angle), y: radius * $math.sin(angle) }));\n\t\tthis._positionTooltip(tooltip, { x: radius * $math.cos(angle), y: radius * $math.sin(angle) });\n\t}\n}\n","import { Theme } from \"../../core/Theme\";\r\nimport { percent } from \"../../core/util/Percent\";\r\nimport { setColor } from \"../../themes/DefaultTheme\";\r\n\r\n\r\n/**\r\n * @ignore\r\n */\r\nexport class RadarDefaultTheme extends Theme {\r\n\tprotected setupDefaultRules() {\r\n\t\tsuper.setupDefaultRules();\r\n\r\n\t\tconst r = this.rule.bind(this);\r\n\r\n\t\tconst ic = this._root.interfaceColors;\r\n\r\n\r\n\t\t/**\r\n\t\t * ========================================================================\r\n\t\t * charts/radar\r\n\t\t * ========================================================================\r\n\t\t */\r\n\r\n\t\tr(\"RadarChart\").setAll({\r\n\t\t\tradius: percent(80),\r\n\t\t\tinnerRadius: 0,\r\n\t\t\tstartAngle: -90,\r\n\t\t\tendAngle: 270\r\n\t\t});\r\n\r\n\t\tr(\"RadarColumnSeries\").setAll({\r\n\t\t\tclustered: true\r\n\t\t});\r\n\r\n\t\tr(\"Slice\", [\"radar\", \"column\", \"series\"]).setAll({\r\n\t\t\twidth: percent(80),\r\n\t\t\theight: percent(80)\r\n\t\t});\r\n\r\n\t\tr(\"RadarLineSeries\").setAll({\r\n\t\t\tconnectEnds: true\r\n\t\t});\r\n\r\n\t\tr(\"SmoothedRadarLineSeries\").setAll({\r\n\t\t\ttension: 0.5\r\n\t\t});\r\n\r\n\t\tr(\"AxisRendererRadial\").setAll({\r\n\t\t\tminGridDistance: 40,\r\n\t\t\taxisAngle: -90,\r\n\t\t\tinversed: false,\r\n\t\t\tcellStartLocation: 0,\r\n\t\t\tcellEndLocation: 1\r\n\t\t});\r\n\r\n\t\tr(\"AxisRendererCircular\").setAll({\r\n\t\t\tminGridDistance: 100,\r\n\t\t\tinversed: false,\r\n\t\t\tcellStartLocation: 0,\r\n\t\t\tcellEndLocation: 1\r\n\t\t});\r\n\r\n\t\tr(\"RadialLabel\", [\"circular\"]).setAll({\r\n\t\t\ttextType: \"circular\",\r\n\t\t\tpaddingTop: 1,\r\n\t\t\tpaddingRight: 0,\r\n\t\t\tpaddingBottom: 1,\r\n\t\t\tpaddingLeft: 0,\r\n\t\t\tcenterX: 0,\r\n\t\t\tcenterY: 0,\r\n\t\t\tradius: 8\r\n\t\t});\r\n\r\n\r\n\t\tr(\"AxisLabelRadial\", [\"category\"]).setAll({\r\n\t\t\ttext:\"{category}\",\r\n\t\t\tpopulateText:true\r\n\t\t});\t\t\t\r\n\r\n\t\tr(\"RadialLabel\", [\"radial\"]).setAll({\r\n\t\t\ttextType: \"regular\",\r\n\t\t\tcenterX: 0,\r\n\t\t\ttextAlign: \"right\"\r\n\t\t});\r\n\r\n\t\tr(\"RadarChart\", [\"gauge\"]).setAll({\r\n\t\t\tstartAngle: 180,\r\n\t\t\tendAngle: 360,\r\n\t\t\tinnerRadius: percent(90)\r\n\t\t});\r\n\r\n\t\tr(\"ClockHand\").setAll({\r\n\t\t\ttopWidth: 1,\r\n\t\t\tbottomWidth: 10,\r\n\t\t\tradius: percent(90),\r\n\t\t\tpinRadius: 10\r\n\t\t});\r\n\r\n\t\t{\r\n\t\t\tconst rule = r(\"Graphics\", [\"clock\", \"hand\"]);\r\n\r\n\t\t\trule.setAll({\r\n\t\t\t\tfillOpacity: 1\r\n\t\t\t});\r\n\r\n\t\t\tsetColor(rule, \"fill\", ic, \"alternativeBackground\");\r\n\t\t}\r\n\r\n\t\t{\r\n\t\t\tconst rule = r(\"Graphics\", [\"clock\", \"pin\"]);\r\n\r\n\t\t\trule.setAll({\r\n\t\t\t\tfillOpacity: 1\r\n\t\t\t});\r\n\r\n\t\t\tsetColor(rule, \"fill\", ic, \"alternativeBackground\");\r\n\t\t}\r\n\r\n\t}\r\n}\r\n","import type { AxisRendererCircular } from \"./AxisRendererCircular\";\nimport type { AxisRendererRadial } from \"./AxisRendererRadial\";\nimport type { Axis } from \"../xy/axes/Axis\";\nimport type { XYSeries } from \"../xy/series/XYSeries\";\nimport type { RadarCursor } from \"./RadarCursor\";\nimport type { RadarColumnSeries } from \"./RadarColumnSeries\";\nimport type { RadarLineSeries } from \"./RadarLineSeries\";\nimport type { IPoint } from \"../../core/util/IPoint\";\n\nimport { RadarDefaultTheme } from \"./RadarDefaultTheme\";\nimport { XYChart, IXYChartPrivate, IXYChartSettings } from \"../xy/XYChart\";\nimport { Percent, p50, percent } from \"../../core/util/Percent\";\nimport { Container } from \"../../core/render/Container\";\nimport { Graphics } from \"../../core/render/Graphics\";\nimport { arc } from \"d3-shape\";\n\nimport * as $utils from \"../../core/util/Utils\";\nimport * as $math from \"../../core/util/Math\";\n\nexport interface IRadarChartSettings extends IXYChartSettings {\n\n\t/**\n\t * Outer radius of the chart. Can be set in pixels or percent, relative to\n\t * available space.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/radar-chart/#Chart_radius} for more info\n\t * @default 80%\n\t */\n\tradius?: number | Percent;\n\n\t/**\n\t * Inner radius of the chart. Can be set in pixels or percent, relative to\n\t * outer radius.\n\t *\n\t * Setting to negative number will mean pixels from outer radius.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/radar-chart/#Chart_radius} for more info\n\t */\n\tinnerRadius?: number | Percent;\n\n\t/**\n\t * Chart start angle in degress.\n\t *\n\t * @default -90\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/radar-chart/#Start_end_angles} for more info\n\t */\n\tstartAngle?: number;\n\n\t/**\n\t * Chart end angle in degress.\n\t *\n\t * @default 270\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/radar-chart/#Start_end_angles} for more info\n\t */\n\tendAngle?: number;\n\n\t/**\n\t * [[RadarCursor]] instance.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/radar-chart/#Cursor} for more info\n\t */\n\tcursor?: RadarCursor;\n\n}\n\nexport interface IRadarChartPrivate extends IXYChartPrivate {\n\n\t/**\n\t * Radius in pixels.\n\t */\n\tradius?: number;\n\n\t/**\n\t * Inner radius in pixels.\n\t */\n\tinnerRadius?: number;\n\n\t/**\n\t * @ignore\n\t */\n\tirModifyer?: number;\n\n}\n\n/**\n * Radar chart.\n *\n * @see {@link https://www.amcharts.com/docs/v5/charts/radar-chart/} for more info\n * @important\n */\nexport class RadarChart extends XYChart {\n\n\t/**\n\t * [[Container]] where radar-related elements go.\n\t *\n\t * @default Container.new()\n\t */\n\tpublic readonly radarContainer = this.plotContainer.children.push(Container.new(this._root, { x: p50, y: p50 }));\n\n\tpublic static className: string = \"RadarChart\";\n\tpublic static classNames: Array<string> = XYChart.classNames.concat([RadarChart.className]);\n\n\tdeclare public _settings: IRadarChartSettings;\n\tdeclare public _privateSettings: IRadarChartPrivate;\n\n\tprotected _arcGenerator = arc();\n\tdeclare public _seriesType: RadarColumnSeries | RadarLineSeries;\n\n\tprotected _maxRadius: number = 1;\n\n\tprotected _afterNew() {\n\t\tthis._defaultThemes.push(RadarDefaultTheme.new(this._root));\n\n\t\tsuper._afterNew();\n\n\t\tconst radarContainer = this.radarContainer;\n\t\tconst gridContainer = this.gridContainer;\n\t\tconst topGridContainer = this.topGridContainer;\n\t\tconst seriesContainer = this.seriesContainer;\n\t\tconst bulletsContainer = this.bulletsContainer;\n\n\t\tradarContainer.children.pushAll([gridContainer, seriesContainer, topGridContainer, bulletsContainer]);\n\n\t\tseriesContainer.set(\"mask\", Graphics.new(this._root, {}));\n\t\tgridContainer.set(\"mask\", Graphics.new(this._root, {}));\n\n\t\tthis._disposers.push(this.plotContainer.events.on(\"boundschanged\", () => {\n\t\t\tthis._updateRadius();\n\t\t}));\n\t}\n\n\tprotected _maskGrid(){\n\t\t\n\t}\n\n\n\tpublic _prepareChildren() {\n\t\tsuper._prepareChildren();\n\n\t\tif (this._sizeDirty || this.isDirty(\"radius\") || this.isDirty(\"innerRadius\") || this.isDirty(\"startAngle\") || this.isDirty(\"endAngle\")) {\n\n\t\t\tconst chartContainer = this.chartContainer;\n\t\t\tconst w = chartContainer.innerWidth();\n\t\t\tconst h = chartContainer.innerHeight();\n\n\t\t\tconst startAngle = this.get(\"startAngle\", 0);\n\t\t\tconst endAngle = this.get(\"endAngle\", 0);\n\t\t\tconst innerRadius = this.get(\"innerRadius\");\n\n\n\t\t\tlet bounds = $math.getArcBounds(0, 0, startAngle, endAngle, 1);\n\n\t\t\tconst wr = w / (bounds.right - bounds.left);\n\t\t\tconst hr = h / (bounds.bottom - bounds.top);\n\n\t\t\tlet innerBounds = { left: 0, right: 0, top: 0, bottom: 0 };\n\n\t\t\tif (innerRadius instanceof Percent) {\n\t\t\t\tlet value = innerRadius.value;\n\t\t\t\tlet mr = Math.min(wr, hr);\n\t\t\t\tvalue = Math.max(mr * value, mr - Math.min(h, w)) / mr;\n\t\t\t\tinnerBounds = $math.getArcBounds(0, 0, startAngle, endAngle, value);\n\t\t\t\tthis.setPrivateRaw(\"irModifyer\", value / innerRadius.value);\n\t\t\t}\n\n\t\t\tbounds = $math.mergeBounds([bounds, innerBounds]);\n\n\t\t\tthis._maxRadius = Math.max(0, Math.min(wr, hr));\n\n\t\t\tconst radius = $utils.relativeToValue(this.get(\"radius\", 0), this._maxRadius);\n\t\t\tthis.radarContainer.setAll({\n\t\t\t\tdy: -radius * (bounds.bottom + bounds.top) / 2, dx: -radius * (bounds.right + bounds.left) / 2\n\t\t\t})\n\n\t\t\tthis._updateRadius();\n\t\t}\n\t}\n\n\tprotected _addCursor(cursor: RadarCursor) {\n\t\tthis.radarContainer.children.push(cursor);\n\t}\n\n\n\t// do not delete\n\tpublic _updateRadius() {\n\t\tconst radius = $utils.relativeToValue(this.get(\"radius\", percent(80)), this._maxRadius);\n\t\tthis.setPrivateRaw(\"radius\", radius);\n\n\t\tlet innerRadius = $utils.relativeToValue(this.get(\"innerRadius\", 0), radius);\n\n\t\tif (innerRadius < 0) {\n\t\t\tinnerRadius = radius + innerRadius;\n\t\t}\n\n\t\tthis.setPrivateRaw(\"innerRadius\", innerRadius);\n\n\t\tthis.xAxes.each((axis) => {\n\t\t\tconst renderer = axis.get(\"renderer\") as AxisRendererCircular;\n\t\t\trenderer.updateLayout();\n\t\t})\n\n\t\tthis.yAxes.each((axis) => {\n\t\t\tconst renderer = axis.get(\"renderer\") as AxisRendererRadial;\n\t\t\trenderer.updateLayout();\n\t\t})\n\n\t\tthis._updateMask(this.seriesContainer, innerRadius, radius);\n\t\tthis._updateMask(this.gridContainer, innerRadius, radius);\n\n\t\tthis.series.each((series) => {\n\t\t\tif ((series as XYSeries).get(\"maskBullets\")) {\n\t\t\t\tthis._updateMask(series.bulletsContainer, innerRadius, radius);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tseries.bulletsContainer.remove(\"mask\");\n\t\t\t}\n\t\t})\n\n\t\tconst cursor = this.get(\"cursor\");\n\t\tif (cursor) {\n\t\t\tcursor.updateLayout();\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic _updateMask(container: Container, innerRadius: number, radius: number) {\n\t\tconst mask = container.get(\"mask\");\n\t\tif (mask) {\n\t\t\tmask.set(\"draw\", (display) => {\n\t\t\t\tthis._arcGenerator.context(display as any);\n\t\t\t\tthis._arcGenerator({ innerRadius: innerRadius, outerRadius: radius + .5, startAngle: (this.get(\"startAngle\", 0) + 90) * $math.RADIANS, endAngle: (this.get(\"endAngle\", 0) + 90) * $math.RADIANS });\n\t\t\t})\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic processAxis(axis: Axis<AxisRendererRadial | AxisRendererCircular>) {\n\t\tthis.radarContainer.children.push(axis);\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic inPlot(point: IPoint, radius?: number, innerRadius?: number): boolean {\n\t\tconst r = Math.hypot(point.x, point.y);\n\t\tconst angle = $math.normalizeAngle(Math.atan2(point.y, point.x) * $math.DEGREES);\n\n\t\tlet startAngle = $math.normalizeAngle(this.get(\"startAngle\", 0));\n\t\tlet endAngle = $math.normalizeAngle(this.get(\"endAngle\", 0));\n\n\t\tlet inArc = false;\n\t\tif (startAngle < endAngle) {\n\t\t\tif (startAngle < angle && angle < endAngle) {\n\t\t\t\tinArc = true;\n\t\t\t}\n\t\t}\n\n\t\tif (startAngle > endAngle) {\n\t\t\tif (angle > startAngle) {\n\t\t\t\tinArc = true;\n\t\t\t}\n\t\t\tif (angle < endAngle) {\n\t\t\t\tinArc = true;\n\t\t\t}\n\t\t}\n\n\t\tif (startAngle == endAngle) {\n\t\t\tinArc = true;\n\t\t}\n\n\t\tif (!inArc) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (radius == null) {\n\t\t\tradius = this.getPrivate(\"radius\", 0);\n\t\t}\n\n\t\tif (innerRadius == null) {\n\t\t\tinnerRadius = this.getPrivate(\"innerRadius\", 0);\n\t\t}\n\n\t\tif (innerRadius > radius) {\n\t\t\t[innerRadius, radius] = [radius, innerRadius];\n\t\t}\n\n\t\tif (r <= radius + .5 && r >= innerRadius - .5) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tprotected _tooltipToLocal(point: IPoint): IPoint {\n\t\treturn this.radarContainer._display.toLocal(point);\n\t}\n\n\tprotected _handlePinch(){\n\t\t\n\t}\n}\n","import type { DataItem } from \"../../../core/render/Component\";\nimport type { Graphics } from \"../../../core/render/Graphics\";\nimport type { Template } from \"../../../core/util/Template\";\nimport type { ListTemplate } from \"../../../core/util/List\";\nimport type { CategoryAxis } from \"../axes/CategoryAxis\";\nimport type { DateAxis } from \"../axes/DateAxis\";\nimport type { ValueAxis } from \"../axes/ValueAxis\";\nimport type { IAxisDataItem } from \"../axes/Axis\";\nimport type { ILegendDataItem } from \"../../../core/render/Legend\";\nimport type { Sprite } from \"../../../core/render/Sprite\";\n\nimport { XYSeries, IXYSeriesPrivate, IXYSeriesSettings, IXYSeriesDataItem, IXYSeriesAxisRange } from \"./XYSeries\";\nimport { Percent } from \"../../../core/util/Percent\";\nimport { visualSettings } from \"../../../core/render/Graphics\";\n\nimport * as $array from \"../../../core/util/Array\";\nimport * as $type from \"../../../core/util/Type\";\n\nexport interface IBaseColumnSeriesDataItem extends IXYSeriesDataItem {\n\n\t/**\n\t * An actual [[Graphics]] element (Column/Slice/Candlestick/OHLC).\n\t */\n\tgraphics?: Graphics;\n\n\t/**\n\t * In case axis ranges are added to the series, it creates a separate\n\t * element ([[Graphics]]) for each axis range. This array holds them all.\n\t */\n\trangeGraphics?: Array<Graphics>;\n\n\t/**\n\t * If data items from this series are used to feed a [[Legend]], this\n\t * will hold a reference to the equivalent Legend data item.\n\t * \n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/legend/#Data_item_list} for more info\n\t */\n\tlegendDataItem?: DataItem<ILegendDataItem>;\n}\n\nexport interface IBaseColumnSeriesSettings extends IXYSeriesSettings {\n\n\t/**\n\t * Indicates if series must divvy up available space with other column\n\t * series (`true`; default) or take up the whole available space (`false`).\n\t *\n\t * @default true\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/column-series/#Clustering} for more info\n\t */\n\tclustered?: boolean;\n\n\t/**\n\t * Whether positions of bullets should be calculated based on portion of\n\t * column currently visual (`true`) or the whole length/height of the\n\t * column (`false`).\n\t *\n\t * @default true\n\t */\n\tadjustBulletPosition?: boolean;\n\n\t/**\n\t * If set to `true` will use color of the last visible column for legend\n\t * marker. Otherwise, series `fill`/`stroke` will be used.\n\t *\n\t * @since 5.1.13\n\t */\n\tuseLastColorForLegendMarker?: boolean\n\n}\n\nexport interface IBaseColumnSeriesPrivate extends IXYSeriesPrivate { }\n\nexport interface IBaseColumnSeriesAxisRange extends IXYSeriesAxisRange {\n\n\t/**\n\t * A list of actual [[Graphics]] elements for an axis range.\n\t *\n\t * Can be used to ajust the look of the axis range columns.\n\t */\n\tcolumns: ListTemplate<Graphics>;\n\n}\n\n/**\n * Base class for all \"column-based\" series\n */\nexport abstract class BaseColumnSeries extends XYSeries {\n\n\tdeclare public _settings: IBaseColumnSeriesSettings;\n\tdeclare public _privateSettings: IBaseColumnSeriesPrivate;\n\tdeclare public _dataItemSettings: IBaseColumnSeriesDataItem;\n\tdeclare public _axisRangeType: IBaseColumnSeriesAxisRange;\n\n\tpublic static className: string = \"BaseColumnSeries\";\n\tpublic static classNames: Array<string> = XYSeries.classNames.concat([BaseColumnSeries.className]);\n\n\t/**\n\t * @ignore\n\t */\n\tpublic abstract makeColumn(dataItem: DataItem<this[\"_dataItemSettings\"]>, listTemplate: ListTemplate<Graphics>): Graphics\n\n\t/**\n\t * ListTemplate of columns in series.\n\t */\n\tpublic abstract columns: ListTemplate<Graphics>;\n\n\tprotected _makeGraphics(listTemplate: ListTemplate<Graphics>, dataItem: DataItem<this[\"_dataItemSettings\"]>): Graphics {\n\t\treturn this.makeColumn(dataItem, listTemplate);\n\t}\n\n\tprotected _ph: number = 0;\n\tprotected _pw: number = 0;\n\n\tpublic _makeFieldNames() {\n\t\tsuper._makeFieldNames();\n\n\t\tconst xAxis = this.get(\"xAxis\");\n\t\tconst yAxis = this.get(\"yAxis\");\n\n\t\tconst categoryAxis = \"CategoryAxis\";\n\t\tconst valueAxis = \"ValueAxis\";\n\n\t\tif (xAxis.isType<CategoryAxis<any>>(categoryAxis)) {\n\t\t\tif (!this.get(\"openCategoryXField\")) {\n\t\t\t\tthis._xOpenField = this._xField;\n\t\t\t}\n\t\t}\n\n\t\tif (xAxis.isType<DateAxis<any>>(valueAxis)) {\n\t\t\tif (!this.get(\"openValueXField\")) {\n\t\t\t\tthis._xOpenField = this._xField;\n\t\t\t}\n\t\t}\n\n\t\tif (yAxis.isType<CategoryAxis<any>>(categoryAxis)) {\n\t\t\tif (!this.get(\"openCategoryYField\")) {\n\t\t\t\tthis._yOpenField = this._yField;\n\t\t\t}\n\t\t}\n\n\t\tif (yAxis.isType<DateAxis<any>>(valueAxis)) {\n\t\t\tif (!this.get(\"openValueYField\")) {\n\t\t\t\tthis._yOpenField = this._yField;\n\t\t\t}\n\t\t}\n\t}\n\n\n\tpublic _prepareChildren() {\n\t\tsuper._prepareChildren();\n\n\t\tconst xAxis = this.get(\"xAxis\");\n\t\tconst yAxis = this.get(\"yAxis\");\n\n\t\tconst len = this.dataItems.length;\n\t\tconst startIndex = Math.max(0, this.startIndex() - 2);\n\t\tconst endIndex = Math.min(this.endIndex() + 2, len - 1);\n\n\t\tif (xAxis.inited && yAxis.inited) {\n\t\t\tfor (let i = startIndex; i <= endIndex; i++) {\n\t\t\t\tlet dataItem = this.dataItems[i];\n\t\t\t\tthis._createGraphics(dataItem);\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic _updateChildren() {\n\t\tconst chart = this.chart;\n\t\tif (chart) {\n\t\t\tthis._ph = chart.plotContainer.height();\n\t\t\tthis._pw = chart.plotContainer.width();\n\t\t}\n\n\t\tconst xAxis = this.get(\"xAxis\");\n\t\tconst yAxis = this.get(\"yAxis\");\n\t\tconst baseAxis = this.get(\"baseAxis\")!;\n\n\t\tconst columnsTemplate = this.columns.template;\n\t\tif (this.isDirty(\"fill\")) {\n\t\t\tif (columnsTemplate.get(\"fill\") == null) {\n\t\t\t\tcolumnsTemplate.set(\"fill\", this.get(\"fill\"));\n\t\t\t}\n\t\t}\n\n\t\tif (this.isDirty(\"fillPattern\")) {\n\t\t\tif (columnsTemplate.get(\"fillPattern\") == null) {\n\t\t\t\tcolumnsTemplate.set(\"fillPattern\", this.get(\"fillPattern\"));\n\t\t\t}\n\t\t}\n\n\t\tif (this.isDirty(\"stroke\")) {\n\t\t\tif (columnsTemplate.get(\"stroke\") == null) {\n\t\t\t\tcolumnsTemplate.set(\"stroke\", this.get(\"stroke\"));\n\t\t\t}\n\t\t}\n\n\t\tlet index = 0;\n\t\tlet clusterCount = 0;\n\t\tlet i = 0;\n\n\t\t$array.each(baseAxis.series, (series) => {\n\t\t\tif (series instanceof BaseColumnSeries) {\n\t\t\t\tconst stacked = series.get(\"stacked\");\n\n\t\t\t\tif (stacked && i == 0) {\n\t\t\t\t\tclusterCount++;\n\t\t\t\t}\n\n\t\t\t\tif (!stacked && series.get(\"clustered\")) {\n\t\t\t\t\tclusterCount++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (series === this) {\n\t\t\t\tindex = clusterCount - 1;\n\t\t\t}\n\t\t\ti++;\n\t\t})\n\n\t\tif (!this.get(\"clustered\")) {\n\t\t\tindex = 0;\n\t\t\tclusterCount = 1;\n\t\t}\n\n\t\tif (clusterCount === 0) {\n\t\t\tclusterCount = 1;\n\t\t\tindex = 0;\n\t\t}\n\n\t\tconst xRenderer = xAxis.get(\"renderer\");\n\t\tconst yRenderer = yAxis.get(\"renderer\");\n\n\t\tconst cellStartLocation = \"cellStartLocation\";\n\t\tconst cellEndLocation = \"cellEndLocation\";\n\n\t\tconst cellLocationX0 = xRenderer.get(cellStartLocation, 0);\n\t\tconst cellLocationX1 = xRenderer.get(cellEndLocation, 1);\n\n\t\tconst cellLocationY0 = yRenderer.get(cellStartLocation, 0);\n\t\tconst cellLocationY1 = yRenderer.get(cellEndLocation, 1);\n\n\t\tthis._aLocationX0 = cellLocationX0 + (index / clusterCount) * (cellLocationX1 - cellLocationX0);\n\t\tthis._aLocationX1 = cellLocationX0 + (index + 1) / clusterCount * (cellLocationX1 - cellLocationX0);;\n\n\t\tthis._aLocationY0 = cellLocationY0 + (index / clusterCount) * (cellLocationY1 - cellLocationY0);\n\t\tthis._aLocationY1 = cellLocationY0 + (index + 1) / clusterCount * (cellLocationY1 - cellLocationY0);\n\n\t\tif (xAxis.inited && yAxis.inited) {\n\t\t\tif (this._axesDirty || this._valuesDirty || this._stackDirty || this.isDirty(\"vcx\") || this.isDirty(\"vcy\") || this._sizeDirty) {\n\t\t\t\tconst len = this.dataItems.length;\n\n\t\t\t\tlet startIndex = Math.max(0, this.startIndex() - 2);\n\t\t\t\tlet endIndex = Math.min(this.endIndex() + 2, len - 1);\n\n\t\t\t\tfor (let i = 0; i < startIndex; i++) {\n\t\t\t\t\tthis._toggleColumn(this.dataItems[i], false);\n\t\t\t\t}\n\t\t\t\tlet previous = this.dataItems[startIndex];\n\n\t\t\t\tfor (let i = startIndex; i <= endIndex; i++) {\n\t\t\t\t\tlet dataItem = this.dataItems[i];\n\t\t\t\t\tif (dataItem.get(\"valueX\") != null && dataItem.get(\"valueY\") != null) {\n\t\t\t\t\t\tprevious = dataItem;\n\t\t\t\t\t\tif (i > 0 && startIndex > 0) {\n\t\t\t\t\t\t\tfor (let j = i - 1; j >= 0; j--) {\n\t\t\t\t\t\t\t\tlet dataItem = this.dataItems[j];\n\t\t\t\t\t\t\t\tif (dataItem.get(\"valueX\") != null && dataItem.get(\"valueY\") != null) {\n\t\t\t\t\t\t\t\t\tprevious = dataItem;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tthis._toggleColumn(dataItem, false);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor (let i = startIndex; i <= endIndex; i++) {\n\t\t\t\t\tlet dataItem = this.dataItems[i];\n\t\t\t\t\tthis._updateGraphics(dataItem, previous);\n\t\t\t\t\tif (dataItem.get(\"valueX\") != null && dataItem.get(\"valueY\") != null) {\n\t\t\t\t\t\tprevious = dataItem;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tfor (let i = endIndex + 1; i < len; i++) {\n\t\t\t\t\tthis._toggleColumn(this.dataItems[i], false);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tthis._skipped = true;\n\t\t}\n\t\tthis.updateLegendMarker(this.get(\"tooltipDataItem\"));\n\t\tsuper._updateChildren();\n\t}\n\n\n\tprotected _createGraphics(dataItem: DataItem<this[\"_dataItemSettings\"]>) {\n\t\tlet graphics = dataItem.get(\"graphics\");\n\t\tif (!graphics) {\n\n\t\t\tgraphics = this._makeGraphics(this.columns, dataItem);\n\t\t\tdataItem.set(\"graphics\", graphics);\n\t\t\tgraphics._setDataItem(dataItem);\n\n\t\t\tconst legendDataItem = dataItem.get(\"legendDataItem\");\n\t\t\tif (legendDataItem) {\n\t\t\t\tconst markerRectangle = legendDataItem.get(\"markerRectangle\");\n\t\t\t\tif (markerRectangle) {\n\t\t\t\t\tconst ds = markerRectangle.states.lookup(\"default\")!;\n\t\t\t\t\t$array.each(visualSettings, (setting: any) => {\n\t\t\t\t\t\tconst value = graphics!.get(setting, this.get(setting));\n\t\t\t\t\t\tmarkerRectangle.set(setting, value);\n\t\t\t\t\t\tds.set(setting, value);\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tlet graphicsArray: Array<Graphics> | undefined = dataItem.get(\"rangeGraphics\");\n\t\t\tif (graphicsArray) {\n\t\t\t\t$array.each(graphicsArray, (graphics) => {\n\t\t\t\t\tgraphics.dispose();\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tgraphicsArray = [];\n\t\t\tdataItem.setRaw(\"rangeGraphics\", graphicsArray);\n\n\t\t\tthis.axisRanges.each((axisRange) => {\n\t\t\t\tconst container = axisRange.container!;\n\t\t\t\tconst rangeGraphics = this._makeGraphics(axisRange.columns, dataItem);\n\t\t\t\tif (graphicsArray) {\n\t\t\t\t\tgraphicsArray.push(rangeGraphics);\n\t\t\t\t}\n\t\t\t\trangeGraphics.setPrivate(\"list\", axisRange.columns);\n\t\t\t\tcontainer.children.push(rangeGraphics);\n\t\t\t})\n\t\t}\n\t}\n\n\tpublic createAxisRange(axisDataItem: DataItem<IAxisDataItem>): this[\"_axisRangeType\"] {\n\t\t$array.each(this.dataItems, (dataItem) => {\n\t\t\tconst graphics = dataItem.get(\"graphics\");\n\t\t\tif (graphics) {\n\t\t\t\tgraphics.dispose();\n\t\t\t\tdataItem.set(\"graphics\", undefined);\n\t\t\t}\n\t\t})\n\n\t\treturn super.createAxisRange(axisDataItem);\n\t}\n\n\tprotected _updateGraphics(dataItem: DataItem<this[\"_dataItemSettings\"]>, previousDataItem: DataItem<this[\"_dataItemSettings\"]>) {\n\t\tlet graphics = dataItem.get(\"graphics\")!;\n\n\t\t//if (!graphics) {\n\t\t//\tthis._createGraphics(dataItem);\n\t\t//\tgraphics = dataItem.get(\"graphics\")!;\n\t\t//}\n\n\t\tconst xField = this._xField;\n\t\tconst yField = this._yField;\n\n\t\tconst valueX = dataItem.get(xField as any);\n\t\tconst valueY = dataItem.get(yField as any);\n\n\t\tif (valueX != null && valueY != null) {\n\t\t\tconst xOpenField = this._xOpenField;\n\t\t\tconst yOpenField = this._yOpenField;\n\n\t\t\tconst locationX = this.get(\"locationX\", dataItem.get(\"locationX\", 0.5));\n\t\t\tconst locationY = this.get(\"locationY\", dataItem.get(\"locationY\", 0.5));\n\n\t\t\tconst openLocationX = this.get(\"openLocationX\", dataItem.get(\"openLocationX\", locationX));\n\t\t\tconst openLocationY = this.get(\"openLocationY\", dataItem.get(\"openLocationY\", locationY));\n\n\t\t\tconst width = graphics.get(\"width\");\n\t\t\tconst height = graphics.get(\"height\");\n\n\t\t\tconst stacked = this.get(\"stacked\");\n\n\t\t\tconst xAxis = this.get(\"xAxis\");\n\t\t\tconst yAxis = this.get(\"yAxis\");\n\t\t\tconst baseAxis = this.get(\"baseAxis\");\n\n\t\t\tconst xStart = xAxis.get(\"start\");\n\t\t\tconst xEnd = xAxis.get(\"end\");\n\n\t\t\tconst yStart = yAxis.get(\"start\");\n\t\t\tconst yEnd = yAxis.get(\"end\");\n\n\t\t\tlet l!: number;\n\t\t\tlet r!: number;\n\t\t\tlet t!: number;\n\t\t\tlet b!: number;\n\n\t\t\tlet vcy = this.get(\"vcy\", 1);\n\t\t\tlet vcx = this.get(\"vcx\", 1);\n\n\t\t\tlet fitW = false;\n\t\t\tlet fitH = false;\n\n\t\t\tif (yAxis.isType<CategoryAxis<any>>(\"CategoryAxis\") && xAxis.isType<CategoryAxis<any>>(\"CategoryAxis\")) {\n\n\t\t\t\tlet startLocation = this._aLocationX0 + openLocationX - 0.5;\n\t\t\t\tlet endLocation = this._aLocationX1 + locationX - 0.5;\n\n\t\t\t\tif (width instanceof Percent) {\n\t\t\t\t\tlet offset: number = (endLocation - startLocation) * (1 - width.value) / 2;\n\t\t\t\t\tstartLocation += offset;\n\t\t\t\t\tendLocation -= offset;\n\t\t\t\t}\n\n\t\t\t\tl = xAxis.getDataItemPositionX(dataItem, xOpenField, startLocation, vcx);\n\t\t\t\tr = xAxis.getDataItemPositionX(dataItem, xField, endLocation, vcx);\n\n\t\t\t\tstartLocation = this._aLocationY0 + openLocationY - 0.5;\n\t\t\t\tendLocation = this._aLocationY1 + locationY - 0.5;\n\n\t\t\t\tif (height instanceof Percent) {\n\t\t\t\t\tlet offset: number = (endLocation - startLocation) * (1 - height.value) / 2;\n\t\t\t\t\tstartLocation += offset;\n\t\t\t\t\tendLocation -= offset;\n\t\t\t\t}\n\n\t\t\t\tt = yAxis.getDataItemPositionY(dataItem, yOpenField, startLocation, vcy);\n\t\t\t\tb = yAxis.getDataItemPositionY(dataItem, yField, endLocation, vcy);\n\n\t\t\t\tdataItem.setRaw(\"point\", { x: l + (r - l) / 2, y: t + (b - t) / 2 });\n\t\t\t}\n\t\t\telse if (xAxis === baseAxis) {\n\n\t\t\t\tlet startLocation = this._aLocationX0 + openLocationX - 0.5;\n\t\t\t\tlet endLocation = this._aLocationX1 + locationX - 0.5;\n\n\t\t\t\tif (width instanceof Percent) {\n\t\t\t\t\tlet offset: number = (endLocation - startLocation) * (1 - width.value) / 2;\n\t\t\t\t\tstartLocation += offset;\n\t\t\t\t\tendLocation -= offset;\n\t\t\t\t}\n\n\t\t\t\tl = xAxis.getDataItemPositionX(dataItem, xOpenField, startLocation, vcx);\n\t\t\t\tr = xAxis.getDataItemPositionX(dataItem, xField, endLocation, vcx);\n\t\t\t\tt = yAxis.getDataItemPositionY(dataItem, yField, locationY, vcy);\n\n\t\t\t\tif (this._yOpenField !== this._yField) {\n\t\t\t\t\tb = yAxis.getDataItemPositionY(dataItem, yOpenField, openLocationY, vcy);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (stacked) {\n\t\t\t\t\t\tlet stackToItemY = dataItem.get(\"stackToItemY\")!;\n\t\t\t\t\t\tif (stackToItemY) {\n\t\t\t\t\t\t\tb = yAxis.getDataItemPositionY(stackToItemY, yField, openLocationY, (stackToItemY.component as XYSeries).get(\"vcy\"));\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tb = yAxis.basePosition();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tb = yAxis.basePosition();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tdataItem.setRaw(\"point\", { x: l + (r - l) / 2, y: t });\n\n\t\t\t\tfitH = true;\n\t\t\t}\n\t\t\telse if (yAxis === baseAxis) {\n\t\t\t\tlet startLocation = this._aLocationY0 + openLocationY - 0.5;\n\t\t\t\tlet endLocation = this._aLocationY1 + locationY - 0.5;\n\n\t\t\t\tif (height instanceof Percent) {\n\t\t\t\t\tlet offset: number = (endLocation - startLocation) * (1 - height.value) / 2;\n\t\t\t\t\tstartLocation += offset;\n\t\t\t\t\tendLocation -= offset;\n\t\t\t\t}\n\n\t\t\t\tt = yAxis.getDataItemPositionY(dataItem, yOpenField, startLocation, vcy);\n\t\t\t\tb = yAxis.getDataItemPositionY(dataItem, yField, endLocation, vcy);\n\t\t\t\tr = xAxis.getDataItemPositionX(dataItem, xField, locationX, vcx);\n\n\t\t\t\tif (this._xOpenField !== this._xField) {\n\t\t\t\t\tl = xAxis.getDataItemPositionX(dataItem, xOpenField, openLocationX, vcx);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (stacked) {\n\t\t\t\t\t\tlet stackToItemX = dataItem.get(\"stackToItemX\")!;\n\t\t\t\t\t\tif (stackToItemX) {\n\t\t\t\t\t\t\tl = xAxis.getDataItemPositionX(stackToItemX, xField, openLocationX, (stackToItemX.component as XYSeries).get(\"vcx\"));\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tl = xAxis.basePosition();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tl = xAxis.basePosition();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tfitW = true;\n\n\t\t\t\tdataItem.setRaw(\"point\", { x: r, y: t + (b - t) / 2 });\n\t\t\t}\n\n\t\t\tthis._updateSeriesGraphics(dataItem, graphics!, l, r, t, b, fitW, fitH);\n\n\t\t\tif ((l < xStart && r < xStart) || (l > xEnd && r > xEnd) || (t < yStart && b <= yStart) || (t >= yEnd && b > yEnd) || $type.isNaN(l) || $type.isNaN(t)) {\n\t\t\t\tthis._toggleColumn(dataItem, false);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis._toggleColumn(dataItem, true);\n\t\t\t}\n\n\t\t\tlet rangeGraphics = dataItem.get(\"rangeGraphics\")!;\n\t\t\tif (rangeGraphics) {\n\t\t\t\t$array.each(rangeGraphics, (graphics) => {\n\t\t\t\t\tthis._updateSeriesGraphics(dataItem, graphics, l, r, t, b, fitW, fitH);\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tthis._applyGraphicsStates(dataItem, previousDataItem);\n\t\t}\n\t\telse {\n\t\t\tthis._toggleColumn(dataItem, false);\n\t\t}\n\t}\n\n\tprotected _updateSeriesGraphics(dataItem: DataItem<this[\"_dataItemSettings\"]>, graphics: Graphics, l: number, r: number, t: number, b: number, fitW: boolean, fitH: boolean) {\n\t\tconst width = graphics.get(\"width\");\n\t\tconst height = graphics.get(\"height\");\n\t\tconst maxWidth = graphics.get(\"maxWidth\");\n\t\tconst maxHeight = graphics.get(\"maxHeight\");\n\n\t\tconst ptl = this.getPoint(l, t);\n\t\tconst pbr = this.getPoint(r, b);\n\n\t\tconst tooltipPoint = dataItem.get(\"point\");\n\n\t\tif (tooltipPoint) {\n\t\t\tconst point = this.getPoint(tooltipPoint.x, tooltipPoint.y);\n\t\t\ttooltipPoint.x = point.x + this._x;\n\t\t\ttooltipPoint.y = point.y + this._y;\n\t\t}\n\n\t\tl = ptl.x;\n\t\tr = pbr.x;\n\n\t\tt = ptl.y;\n\t\tb = pbr.y;\n\n\t\tif ($type.isNumber(width)) {\n\t\t\tconst offset: number = ((r - l) - width) / 2;\n\t\t\tl += offset;\n\t\t\tr -= offset;\n\t\t}\n\n\t\tif ($type.isNumber(maxWidth) && maxWidth < Math.abs(r - l)) {\n\t\t\tconst offset: number = ((r - l) - maxWidth) / 2;\n\t\t\tl += offset;\n\t\t\tr -= offset;\n\t\t}\n\n\t\tif ($type.isNumber(height)) {\n\t\t\tconst offset: number = ((b - t) - height) / 2;\n\t\t\tt += offset;\n\t\t\tb -= offset;\n\t\t}\n\n\t\tif ($type.isNumber(maxHeight) && maxHeight < Math.abs(b - t)) {\n\t\t\tconst offset: number = ((b - t) - maxHeight) / 2;\n\t\t\tt += offset;\n\t\t\tb -= offset;\n\t\t}\n\n\t\tif (this.get(\"adjustBulletPosition\")) {\n\t\t\tif (fitW) {\n\t\t\t\tr = Math.min(Math.max(0, r), this._pw);\n\t\t\t\tl = Math.min(Math.max(0, l), this._pw);\n\t\t\t}\n\n\t\t\tif (fitH) {\n\t\t\t\tt = Math.min(Math.max(0, t), this._ph);\n\t\t\t\tb = Math.min(Math.max(0, b), this._ph);\n\t\t\t}\n\t\t}\n\n\t\tdataItem.setRaw(\"left\", l);\n\t\tdataItem.setRaw(\"right\", r);\n\t\tdataItem.setRaw(\"top\", t);\n\t\tdataItem.setRaw(\"bottom\", b);\n\n\t\tgraphics.setPrivate(\"width\", r - l);\n\t\tgraphics.setPrivate(\"height\", b - t);\n\t\tgraphics.set(\"x\", l);\n\t\tgraphics.set(\"y\", b - (b - t));\n\t}\n\n\tprotected _handleDataSetChange() {\n\t\tsuper._handleDataSetChange();\n\t\t$array.each(this._dataItems, (dataItem) => {\n\t\t\tthis._toggleColumn(dataItem, false);\n\t\t})\n\t}\n\n\tpublic _applyGraphicsStates(dataItem: DataItem<this[\"_dataItemSettings\"]>, previousDataItem: DataItem<this[\"_dataItemSettings\"]>) {\n\n\t\tconst graphics = dataItem.get(\"graphics\")!;\n\n\t\tconst dropFromOpen = graphics.states.lookup(\"dropFromOpen\");\n\t\tconst riseFromOpen = graphics.states.lookup(\"riseFromOpen\");\n\n\t\tconst dropFromPrevious = graphics.states.lookup(\"dropFromPrevious\");\n\t\tconst riseFromPrevious = graphics.states.lookup(\"riseFromPrevious\");\n\n\t\tif (dropFromOpen || dropFromPrevious || riseFromOpen || riseFromPrevious) {\n\t\t\tconst xAxis = this.get(\"xAxis\");\n\t\t\tconst yAxis = this.get(\"yAxis\");\n\t\t\tconst baseAxis = this.get(\"baseAxis\");\n\n\t\t\tlet open: number | undefined;\n\t\t\tlet close: number | undefined;\n\t\t\tlet previousClose: number | undefined;\n\n\t\t\tif (baseAxis === xAxis && yAxis.isType<ValueAxis<any>>(\"ValueAxis\")) {\n\t\t\t\topen = dataItem.get(this._yOpenField as any);\n\t\t\t\tclose = dataItem.get(this._yField as any);\n\n\t\t\t\tpreviousClose = previousDataItem.get(this._yField as any);\n\t\t\t}\n\t\t\telse if (baseAxis === yAxis && xAxis.isType<ValueAxis<any>>(\"ValueAxis\")) {\n\t\t\t\topen = dataItem.get(this._xOpenField as any);\n\t\t\t\tclose = dataItem.get(this._xField as any);\n\n\t\t\t\tpreviousClose = previousDataItem.get(this._xField as any);\n\t\t\t}\n\n\t\t\tif ($type.isNumber(open) && $type.isNumber(close)) {\n\t\t\t\tif (close < open) {\n\t\t\t\t\tif (dropFromOpen) {\n\t\t\t\t\t\tdropFromOpen.apply();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (riseFromOpen) {\n\t\t\t\t\t\triseFromOpen.apply();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ($type.isNumber(previousClose)) {\n\t\t\t\t\tif (close < previousClose) {\n\t\t\t\t\t\tif (dropFromPrevious) {\n\t\t\t\t\t\t\tdropFromPrevious.apply();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (riseFromPrevious) {\n\t\t\t\t\t\t\triseFromPrevious.apply();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic disposeDataItem(dataItem: DataItem<this[\"_dataItemSettings\"]>) {\n\t\tsuper.disposeDataItem(dataItem);\n\t\tconst graphics = dataItem.get(\"graphics\");\n\t\tif (graphics) {\n\t\t\tthis.columns.removeValue(graphics);\n\t\t\tgraphics.dispose();\n\t\t}\n\n\t\tconst rangeGraphics = dataItem.get(\"rangeGraphics\")!;\n\t\tif (rangeGraphics) {\n\t\t\t$array.each(rangeGraphics, (graphics) => {\n\t\t\t\tconst list = graphics.getPrivate(\"list\");\n\t\t\t\tif (list) {\n\t\t\t\t\tlist.removeValue(graphics);\n\t\t\t\t}\n\t\t\t\tgraphics.dispose();\n\t\t\t})\n\t\t}\n\t}\n\n\t/**\n\t * Hides series's data item.\n\t * \n\t * @param dataItem Data item\n\t * @param duration Animation duration in milliseconds\n\t * @return Promise\n\t */\n\tpublic async hideDataItem(dataItem: DataItem<this[\"_dataItemSettings\"]>, duration?: number): Promise<void> {\n\t\tconst promises = [super.hideDataItem(dataItem, duration)];\n\t\tconst graphics = dataItem.get(\"graphics\");\n\t\tif (graphics) {\n\t\t\tpromises.push(graphics.hide(duration));\n\t\t}\n\n\t\tconst rangeGraphics = dataItem.get(\"rangeGraphics\")!;\n\t\tif (rangeGraphics) {\n\t\t\t$array.each(rangeGraphics, (graphics) => {\n\t\t\t\tpromises.push(graphics.hide(duration));\n\t\t\t})\n\t\t}\n\n\t\tawait Promise.all(promises);\n\t}\n\n\tprotected _toggleColumn(dataItem: DataItem<this[\"_dataItemSettings\"]>, visible: boolean) {\n\t\tconst graphics = dataItem.get(\"graphics\");\n\t\tif (graphics) {\n\t\t\tgraphics.setPrivate(\"visible\", visible);\n\t\t}\n\n\t\tconst rangeGraphics = dataItem.get(\"rangeGraphics\")!;\n\t\tif (rangeGraphics) {\n\t\t\t$array.each(rangeGraphics, (graphics) => {\n\t\t\t\tgraphics.setPrivate(\"visible\", visible);\n\t\t\t})\n\t\t}\n\n\t\tconst bullets = dataItem.bullets;\n\t\tif (bullets) {\n\t\t\t$array.each(bullets, (bullet) => {\n\t\t\t\tbullet.setPrivate(\"hidden\", !visible);\n\t\t\t})\n\t\t}\n\t}\n\n\t/**\n\t * Shows series's data item.\n\t * \n\t * @param dataItem Data item\n\t * @param duration Animation duration in milliseconds\n\t * @return Promise\n\t */\n\tpublic async showDataItem(dataItem: DataItem<this[\"_dataItemSettings\"]>, duration?: number): Promise<void> {\n\t\tconst promises = [super.showDataItem(dataItem, duration)];\n\t\tconst graphics = dataItem.get(\"graphics\");\n\t\tif (graphics) {\n\t\t\tpromises.push(graphics.show(duration));\n\t\t}\n\n\t\tconst rangeGraphics = dataItem.get(\"rangeGraphics\")!;\n\t\tif (rangeGraphics) {\n\t\t\t$array.each(rangeGraphics, (graphics) => {\n\t\t\t\tpromises.push(graphics.show(duration));\n\t\t\t})\n\t\t}\n\n\t\tawait Promise.all(promises);\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateLegendMarker(dataItem?: DataItem<IBaseColumnSeriesDataItem>) {\n\t\tlet legendDataItem = this.get(\"legendDataItem\");\n\n\t\tif (this.get(\"useLastColorForLegendMarker\")) {\n\t\t\tif (!dataItem) {\n\t\t\t\tconst lastDataItem = this.dataItems[this.endIndex() - 1];\n\t\t\t\tif (lastDataItem) {\n\t\t\t\t\tdataItem = lastDataItem;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (legendDataItem) {\n\n\t\t\tlet graphics: Template<Graphics> | Graphics = this.columns.template;\n\t\t\tif (dataItem) {\n\t\t\t\tlet column = dataItem.get(\"graphics\");\n\t\t\t\tif (column) {\n\t\t\t\t\tgraphics = column;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst markerRectangle = legendDataItem.get(\"markerRectangle\");\n\n\t\t\tif (markerRectangle) {\n\t\t\t\tif (!legendDataItem.get(\"itemContainer\").get(\"disabled\")) {\n\t\t\t\t\tconst ds = markerRectangle.states.lookup(\"default\")!;\n\t\t\t\t\t$array.each(visualSettings, (setting: any) => {\n\t\t\t\t\t\tconst value = graphics.get(setting, this.get(setting));\n\t\t\t\t\t\tmarkerRectangle.set(setting, value);\n\t\t\t\t\t\tds.set(setting, value);\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}\n\n\tprotected _getTooltipTarget(dataItem: DataItem<this[\"_dataItemSettings\"]>): Sprite {\n\t\tif (this.get(\"seriesTooltipTarget\") == \"bullet\") {\n\t\t\treturn super._getTooltipTarget(dataItem);\n\t\t}\n\n\t\tlet column = dataItem.get(\"graphics\");\n\t\tif (column) {\n\t\t\treturn column;\n\t\t}\n\t\treturn this;\n\t}\n}\n","import type { DataItem } from \"../../core/render/Component\";\nimport type { IPoint } from \"../../core/util/IPoint\";\nimport type { AxisRendererCircular } from \"./AxisRendererCircular\";\nimport type { AxisRendererRadial } from \"./AxisRendererRadial\";\nimport type { Bullet } from \"../../core/render/Bullet\";\nimport type { RadarChart } from \"./RadarChart\";\n\nimport { BaseColumnSeries, IBaseColumnSeriesPrivate, IBaseColumnSeriesSettings, IBaseColumnSeriesDataItem, IBaseColumnSeriesAxisRange } from \"../xy/series/BaseColumnSeries\";\nimport { Slice } from \"../../core/render/Slice\";\nimport { Graphics } from \"../../core/render/Graphics\";\nimport { Template } from \"../../core/util/Template\";\nimport { ListTemplate } from \"../../core/util/List\";\n\nimport * as $math from \"../../core/util/Math\";\nimport * as $utils from \"../../core/util/Utils\";\n\n\nexport interface IRadarColumnSeriesDataItem extends IBaseColumnSeriesDataItem {\n\n\t/**\n\t * Actual radius of the column in pixels.\n\t */\n\tradius?: number;\n\n\t/**\n\t * Actual inner radius of the column in pixels.\n\t */\n\tinnerRadius?: number;\n\n\t/**\n\t * Actual start angle of the column in degrees.\n\t */\n\tstartAngle?: number;\n\n\t/**\n\t * Actual end angle of the column in degrees.\n\t */\n\tendAngle?: number;\n\n}\n\nexport interface IRadarColumnSeriesSettings extends IBaseColumnSeriesSettings {\n}\n\nexport interface IRadarColumnSeriesPrivate extends IBaseColumnSeriesPrivate {\n}\n\nexport interface IRadarColumnSeriesAxisRange extends IBaseColumnSeriesAxisRange {\n\n\t/**\n\t * List of columns in a range.\n\t */\n\tcolumns: ListTemplate<Slice>\n\n}\n\n/**\n * A column series for use in a [[RadarChart]].\n *\n * @important\n */\nexport class RadarColumnSeries extends BaseColumnSeries {\n\n\tdeclare public _settings: IRadarColumnSeriesSettings;\n\tdeclare public _privateSettings: IRadarColumnSeriesPrivate;\n\tdeclare public _dataItemSettings: IRadarColumnSeriesDataItem;\n\tdeclare public _axisRangeType: IRadarColumnSeriesAxisRange;\n\n\t/**\n\t * @ignore\n\t */\n\tpublic makeColumn(dataItem: DataItem<this[\"_dataItemSettings\"]>, listTemplate: ListTemplate<Slice>): Slice {\n\t\tconst column = this.mainContainer.children.push(listTemplate.make());\n\t\tcolumn._setDataItem(dataItem);\n\t\tlistTemplate.push(column);\n\t\treturn column;\n\t}\n\n\t/**\n\t * A [[TemplateList]] of all columns in series.\n\t *\n\t * `columns.template` can be used to set default settings for all columns,\n\t * or to change on existing ones.\n\t *\n\t * @default new ListTemplate<Slice>\n\t */\n\tpublic readonly columns: ListTemplate<Slice> = this.addDisposer(new ListTemplate(\n\t\tTemplate.new({}),\n\t\t() => Slice._new(this._root, {\n\t\t\tposition: \"absolute\",\n\t\t\tthemeTags: $utils.mergeTags(this.columns.template.get(\"themeTags\", []), [\"radar\", \"series\", \"column\"])\n\t\t}, [this.columns.template])\n\t));\n\n\tpublic static className: string = \"RadarColumnSeries\";\n\tpublic static classNames: Array<string> = BaseColumnSeries.classNames.concat([RadarColumnSeries.className]);\n\n\t/**\n\t * A chart series belongs to.\n\t */\n\tdeclare public chart: RadarChart | undefined;\n\n\tprotected _afterNew() {\n\t\tsuper._afterNew();\n\t\tthis.set(\"maskContent\", false);\n\t\tthis.bulletsContainer.set(\"maskContent\", false);\n\t\tthis.bulletsContainer.set(\"mask\", Graphics.new(this._root, {}));\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic getPoint(positionX: number, positionY: number): IPoint {\n\n\t\tconst yAxis = this.get(\"yAxis\");\n\t\tconst xAxis = this.get(\"xAxis\");\n\n\t\tconst rendererY = xAxis.get(\"renderer\") as AxisRendererRadial;\n\n\t\tconst radius = yAxis.get(\"renderer\").positionToCoordinate(positionY) + rendererY.getPrivate(\"innerRadius\", 0);\n\n\t\tconst rendererX = xAxis.get(\"renderer\") as AxisRendererCircular;\n\t\tconst angle = rendererX.positionToAngle(positionX);\n\n\t\treturn { x: radius * $math.cos(angle), y: radius * $math.sin(angle) };\n\t}\n\n\tprotected _updateSeriesGraphics(dataItem: DataItem<this[\"_dataItemSettings\"]>, graphics: Graphics, l: number, r: number, t: number, b: number) {\n\n\t\tgraphics.setPrivate(\"visible\", true);\n\n\t\tconst xAxis = this.get(\"xAxis\");\n\t\tconst yAxis = this.get(\"yAxis\");\n\n\t\tconst rendererX = xAxis.get(\"renderer\") as AxisRendererCircular;\n\t\tconst rendererY = yAxis.get(\"renderer\") as AxisRendererRadial;\n\n\t\tconst axisInnerRadius = rendererY.getPrivate(\"innerRadius\", 0);\n\n\t\tconst startAngle = rendererX.fitAngle(rendererX.positionToAngle(l));\n\t\tconst endAngle = rendererX.fitAngle(rendererX.positionToAngle(r));\n\n\t\tlet innerRadius = rendererY.positionToCoordinate(b) + axisInnerRadius;\n\t\tlet radius = rendererY.positionToCoordinate(t) + axisInnerRadius;\n\n\t\tconst slice = graphics as Slice;\n\n\t\tdataItem.setRaw(\"startAngle\", startAngle);\n\t\tdataItem.setRaw(\"endAngle\", endAngle);\n\t\tdataItem.setRaw(\"innerRadius\", innerRadius);\n\t\tdataItem.setRaw(\"radius\", radius);\n\n\t\tlet axisStartAngle = 0;\n\t\tlet axisEndAngle = 360;\n\n\t\tif (yAxis == this.get(\"baseAxis\")) {\n\t\t\taxisStartAngle = rendererY.getPrivate(\"startAngle\", 0);\n\t\t\taxisEndAngle = rendererY.getPrivate(\"endAngle\", 360);\n\t\t}\n\t\telse {\n\t\t\taxisStartAngle = rendererX.getPrivate(\"startAngle\", 0);\n\t\t\taxisEndAngle = rendererX.getPrivate(\"endAngle\", 360);\n\t\t}\n\n\t\tif (axisStartAngle > axisEndAngle) {\n\t\t\t[axisStartAngle, axisEndAngle] = [axisEndAngle, axisStartAngle];\n\t\t}\n\n\t\tif ((endAngle <= axisStartAngle) || (startAngle >= axisEndAngle) || (radius <= axisInnerRadius && innerRadius <= axisInnerRadius)) {\n\t\t\tslice.setPrivate(\"visible\", false);\n\t\t}\n\n\t\tslice.setAll({ innerRadius, radius, startAngle, arc: endAngle - startAngle });\n\t}\n\n\tprotected _shouldInclude(position: number): boolean {\n\t\tconst xAxis = this.get(\"xAxis\");\n\t\tif (position < xAxis.get(\"start\") || position > xAxis.get(\"end\")) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}\n\n\tprotected _shouldShowBullet(positionX: number, _positionY: number): boolean {\n\t\tconst xAxis = this.get(\"xAxis\");\n\t\tif (positionX < xAxis.get(\"start\") || positionX > xAxis.get(\"end\")) {\n\t\t\treturn false;\n\t\t}\n\t\treturn this._showBullets;\n\t}\n\n\tpublic _positionBullet(bullet: Bullet) {\n\n\t\tlet sprite = bullet.get(\"sprite\");\n\t\tif (sprite) {\n\t\t\tconst dataItem = sprite.dataItem as any;\n\n\t\t\tconst locationX = bullet.get(\"locationX\", dataItem.get(\"locationX\", 0.5));\n\t\t\tconst locationY = bullet.get(\"locationY\", dataItem.get(\"locationY\", 0.5));\n\n\t\t\tconst series = dataItem.component;\n\n\t\t\tconst xAxis = series.get(\"xAxis\");\n\t\t\tconst yAxis = series.get(\"yAxis\");\n\n\t\t\tconst positionX = xAxis.getDataItemPositionX(dataItem, series._xField, locationX, series.get(\"vcx\", 1));\n\t\t\tconst positionY = yAxis.getDataItemPositionY(dataItem, series._yField, locationY, series.get(\"vcy\", 1));\n\n\t\t\tconst startAngle = dataItem.get(\"startAngle\", 0);\n\t\t\tconst endAngle = dataItem.get(\"endAngle\", 0);\n\n\t\t\tconst radius = dataItem.get(\"radius\", 0);\n\t\t\tconst innerRadius = dataItem.get(\"innerRadius\", 0);\n\n\t\t\tif (series._shouldShowBullet(positionX, positionY)) {\n\t\t\t\tsprite.setPrivate(\"visible\", true);\n\n\t\t\t\tconst angle = startAngle + (endAngle - startAngle) * locationX;\n\t\t\t\tconst r = innerRadius + (radius - innerRadius) * locationY;\n\n\t\t\t\tsprite.set(\"x\", $math.cos(angle) * r);\n\t\t\t\tsprite.set(\"y\", $math.sin(angle) * r);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsprite.setPrivate(\"visible\", false);\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected _handleMaskBullets() {\n\n\t}\n\n\tprotected _processAxisRange(axisRange: this[\"_axisRangeType\"]) {\n\t\tsuper._processAxisRange(axisRange);\n\t\taxisRange.columns = new ListTemplate(\n\t\t\tTemplate.new({}),\n\t\t\t() => Slice._new(this._root, {\n\t\t\t\tposition: \"absolute\",\n\t\t\t\tthemeTags: $utils.mergeTags(axisRange.columns.template.get(\"themeTags\", []), [\"radar\", \"series\", \"column\"]),\n\t\t\t}, [this.columns.template, axisRange.columns.template])\n\t\t);\n\t}\n}\n","import { LineSeries, ILineSeriesPrivate, ILineSeriesSettings, ILineSeriesDataItem, ILineSeriesAxisRange } from \"../xy/series/LineSeries\";\nimport type { IPoint } from \"../../core/util/IPoint\";\nimport type { AxisRendererCircular } from \"./AxisRendererCircular\";\nimport type { AxisRendererRadial } from \"./AxisRendererRadial\";\nimport type { Bullet } from \"../../core/render/Bullet\";\nimport { Graphics } from \"../../core/render/Graphics\";\nimport type { RadarChart } from \"./RadarChart\";\nimport type { DataItem } from \"../../core/render/Component\";\nimport * as $math from \"../../core/util/Math\";\n\nexport interface IRadarLineSeriesDataItem extends ILineSeriesDataItem {\n}\n\nexport interface IRadarLineSeriesSettings extends ILineSeriesSettings {\n\n\t/**\n\t * If set to `true` (default), series will connect its last data point to the\n\t * first one with a line, thus completing full circle.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/radar-chart/radar-series/#Connecting_ends} for more info\n\t * @default @true\n\t */\n\tconnectEnds?: boolean;\n\n}\n\nexport interface IRadarLineSeriesPrivate extends ILineSeriesPrivate {\n}\n\nexport interface IRadarLineSeriesAxisRange extends ILineSeriesAxisRange {\n}\n\n/**\n * Draws a line series for use in a [[RadarChart]].\n *\n * @important\n */\nexport class RadarLineSeries extends LineSeries {\n\n\tdeclare public _settings: IRadarLineSeriesSettings;\n\tdeclare public _privateSettings: IRadarLineSeriesPrivate;\n\tdeclare public _dataItemSettings: IRadarLineSeriesDataItem;\n\tdeclare public _axisRangeType: IRadarLineSeriesAxisRange;\n\n\t/**\n\t * A chart series belongs to.\n\t */\n\tdeclare public chart: RadarChart | undefined;\n\n\tpublic static className: string = \"RadarLineSeries\";\n\tpublic static classNames: Array<string> = LineSeries.classNames.concat([RadarLineSeries.className]);\n\n\tprotected _afterNew() {\n\t\tsuper._afterNew();\n\t\tthis.set(\"maskContent\", false);\n\t\tthis.bulletsContainer.set(\"maskContent\", false);\n\t\tthis.bulletsContainer.set(\"mask\", Graphics.new(this._root, {}));\n\t}\n\n\tprotected _handleMaskBullets() {\n\n\t}\n\n\tpublic getPoint(positionX: number, positionY: number): IPoint {\n\n\t\tconst yAxis = this.get(\"yAxis\");\n\t\tconst xAxis = this.get(\"xAxis\");\n\n\t\tconst rendererY = yAxis.get(\"renderer\") as AxisRendererRadial;\n\n\t\tconst radius = rendererY.positionToCoordinate(positionY) + rendererY.getPrivate(\"innerRadius\", 0);\n\n\t\tconst rendererX = xAxis.get(\"renderer\") as AxisRendererCircular;\n\t\tconst angle = rendererX.positionToAngle(positionX);\n\n\t\treturn { x: radius * $math.cos(angle), y: radius * $math.sin(angle) };\n\t}\n\n\tprotected _endLine(points: Array<Array<number>>, firstPoint: Array<number>) {\n\t\tif (this.get(\"connectEnds\") && firstPoint) {\n\t\t\tpoints.push(firstPoint);\n\t\t}\n\t}\n\n\n\tprotected _shouldInclude(position: number): boolean {\n\t\tconst xAxis = this.get(\"xAxis\");\n\t\tif (position < xAxis.get(\"start\") || position > xAxis.get(\"end\")) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}\n\n\tprotected _shouldShowBullet(positionX: number, _positionY: number): boolean {\n\t\tconst xAxis = this.get(\"xAxis\");\n\t\tif (positionX < xAxis.get(\"start\") || positionX > xAxis.get(\"end\")) {\n\t\t\treturn false;\n\t\t}\n\t\treturn this._showBullets;\n\t}\n\n\tpublic _positionBullet(bullet: Bullet) {\n\n\t\tlet sprite = bullet.get(\"sprite\");\n\t\tif (sprite) {\n\t\t\tlet dataItem = sprite.dataItem as DataItem<this[\"_dataItemSettings\"]>;\n\n\t\t\tlet locationX = bullet.get(\"locationX\", dataItem.get(\"locationX\", 0.5));\n\t\t\tlet locationY = bullet.get(\"locationY\", dataItem.get(\"locationY\", 0.5));\n\n\t\t\tlet xAxis = this.get(\"xAxis\");\n\t\t\tlet yAxis = this.get(\"yAxis\");\n\t\t\t//let baseAxis = this.get(\"baseAxis\");\n\n\t\t\t//if(xAxis == baseAxis){\n\t\t\t//locationY = 1;\n\t\t\t//}\n\t\t\t//else if(yAxis == baseAxis){\n\t\t\t//locationX = 1;\n\t\t\t//}\n\n\t\t\tconst positionX = xAxis.getDataItemPositionX(dataItem, this._xField, locationX, this.get(\"vcx\", 1));\n\t\t\tconst positionY = yAxis.getDataItemPositionY(dataItem, this._yField, locationY, this.get(\"vcy\", 1))\n\n\t\t\tlet point = this.getPoint(positionX, positionY);\n\n\t\t\tif (this._shouldShowBullet(positionX, positionY)) {\n\t\t\t\tsprite.setPrivate(\"visible\", true);\n\n\t\t\t\tsprite.set(\"x\", point.x);\n\t\t\t\tsprite.set(\"y\", point.y);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsprite.setPrivate(\"visible\", false);\n\t\t\t}\n\t\t}\n\t}\n}\n","import type { ITimeInterval } from \"../../core/util/Time\";\r\nimport type { DataItem } from \"../../core/render/Component\";\r\nimport type { IValueAxisDataItem, ValueAxis } from \"./axes/ValueAxis\";\r\nimport type { AxisRenderer } from \"./axes/AxisRenderer\";\r\nimport type { DateAxis } from \"./axes/DateAxis\";\r\nimport type { ICategoryAxisDataItem } from \"./axes/CategoryAxis\";\r\nimport type { IGaplessDateAxisDataItem } from \"./axes/GaplessDateAxis\";\r\n\r\nimport { Theme } from \"../../core/Theme\";\r\nimport { percent, p50, p100 } from \"../../core/util/Percent\";\r\nimport { Color } from \"../../core/util/Color\";\r\nimport { ColorSet } from \"../../core/util/ColorSet\";\r\nimport { setColor } from \"../../themes/DefaultTheme\";\r\n\r\nimport * as $time from \"../../core/util/Time\";\r\nimport * as $type from \"../../core/util/Type\";\r\nimport * as $math from \"../../core/util/Math\";\r\nimport * as $object from \"../../core/util/Object\";\r\nimport * as $array from \"../../core/util/Array\";\r\n\r\n/**\r\n * @ignore\r\n */\r\nexport class XYChartDefaultTheme extends Theme {\r\n\tprotected setupDefaultRules() {\r\n\t\tsuper.setupDefaultRules();\r\n\r\n\t\tconst ic = this._root.interfaceColors;\r\n\t\tconst language = this._root.language;\r\n\t\tconst r = this.rule.bind(this);\r\n\r\n\t\t/**\r\n\t\t * ========================================================================\r\n\t\t * charts/xy\r\n\t\t * ========================================================================\r\n\t\t */\r\n\r\n\t\tr(\"XYChart\").setAll({\r\n\t\t\tcolors: ColorSet.new(this._root, {}),\r\n\t\t\tpaddingLeft: 20,\r\n\t\t\tpaddingRight: 20,\r\n\t\t\tpaddingTop: 16,\r\n\t\t\tpaddingBottom: 16,\r\n\t\t\tpanX: false,\r\n\t\t\tpanY: false,\r\n\t\t\twheelStep: 0.25,\r\n\t\t\tarrangeTooltips: true,\r\n\t\t\tpinchZoomX: false,\r\n\t\t\tpinchZoomY: false\r\n\t\t});\r\n\r\n\r\n\t\tr(\"XYSeries\").setAll({\r\n\t\t\tlegendLabelText: \"{name}\"\r\n\t\t})\r\n\r\n\t\tr(\"Rectangle\", [\"plotbackground\", \"xy\", \"background\"]).setAll({\r\n\t\t\tfill: Color.fromHex(0x000000),\r\n\t\t\tfillOpacity: 0\r\n\t\t});\r\n\r\n\t\t/**\r\n\t\t * ------------------------------------------------------------------------\r\n\t\t * charts/xy: XYChartScrollbar\r\n\t\t * ------------------------------------------------------------------------\r\n\t\t */\r\n\r\n\t\tr(\"XYChart\", [\"scrollbar\", \"chart\"]).setAll({\r\n\t\t\tpaddingBottom: 0,\r\n\t\t\tpaddingLeft: 0,\r\n\t\t\tpaddingTop: 0,\r\n\t\t\tpaddingRight: 0,\r\n\t\t\tcolors: ColorSet.new(this._root, {\r\n\t\t\t\tsaturation: 0\r\n\t\t\t})\r\n\t\t});\r\n\r\n\t\t{\r\n\t\t\tconst rule = r(\"Graphics\", [\"scrollbar\", \"overlay\"]);\r\n\r\n\t\t\trule.setAll({\r\n\t\t\t\tfillOpacity: 0.5\r\n\t\t\t});\r\n\r\n\t\t\tsetColor(rule, \"fill\", ic, \"background\");\r\n\t\t}\r\n\r\n\t\t// Class: RoundedRectangle\r\n\t\tr(\"RoundedRectangle\", [\"xy\", \"scrollbar\", \"thumb\"]).setAll({\r\n\t\t\tcornerRadiusTR: 0,\r\n\t\t\tcornerRadiusTL: 0,\r\n\t\t\tcornerRadiusBR: 0,\r\n\t\t\tcornerRadiusBL: 0,\r\n\t\t\tfillOpacity: 0,\r\n\t\t\tfocusable: true\r\n\t\t});\r\n\r\n\t\tr(\"RoundedRectangle\", [\"xy\", \"scrollbar\", \"thumb\"]).states.create(\"hover\", { fillOpacity: 0.4 });\r\n\r\n\t\tr(\"RoundedRectangle\", [\"xy\", \"scrollbar\", \"chart\", \"background\"]).setAll({\r\n\t\t\tcornerRadiusTL: 0,\r\n\t\t\tcornerRadiusBL: 0,\r\n\t\t\tcornerRadiusTR: 0,\r\n\t\t\tcornerRadiusBR: 0\r\n\t\t});\r\n\r\n\t\tr(\"RoundedRectangle\", [\"xy\", \"scrollbar\", \"chart\", \"background\", \"resize\", \"button\"]).setAll({\r\n\t\t\tcornerRadiusBL: 40,\r\n\t\t\tcornerRadiusBR: 40,\r\n\t\t\tcornerRadiusTL: 40,\r\n\t\t\tcornerRadiusTR: 40\r\n\t\t});\r\n\r\n\t\tr(\"AxisRendererX\", [\"xy\", \"chart\", \"scrollbar\"]).setAll({\r\n\t\t\tstrokeOpacity: 0,\r\n\t\t\tinside: true\r\n\t\t});\r\n\r\n\t\tr(\"AxisRendererY\", [\"xy\", \"chart\", \"scrollbar\"]).setAll({\r\n\t\t\tstrokeOpacity: 0,\r\n\t\t\tinside: true,\r\n\t\t\tminGridDistance: 5\r\n\t\t});\r\n\r\n\t\tr(\"AxisLabel\", [\"xy\", \"scrollbar\", \"x\"]).setAll({\r\n\t\t\topacity: 0.5,\r\n\t\t\tcenterY: p100,\r\n\t\t\tminPosition: 0.01,\r\n\t\t\tmaxPosition: 0.99,\r\n\t\t\tfontSize: \"0.8em\"\r\n\t\t});\r\n\r\n\t\tr(\"AxisLabel\", [\"category\"]).setAll({\r\n\t\t\ttext: \"{category}\",\r\n\t\t\tpopulateText: true\r\n\t\t});\r\n\r\n\t\tr(\"AxisLabel\", [\"x\"]).setAll({\r\n\t\t\tcenterY: 0\r\n\t\t});\r\n\r\n\t\tr(\"AxisLabel\", [\"x\", \"inside\"]).setAll({\r\n\t\t\tcenterY: p100\r\n\t\t});\r\n\r\n\t\tr(\"AxisLabel\", [\"x\", \"inside\", \"opposite\"]).setAll({\r\n\t\t\tcenterY: 0\r\n\t\t});\r\n\r\n\t\tr(\"AxisLabel\", [\"x\", \"opposite\"]).setAll({\r\n\t\t\tcenterY: p100\r\n\t\t});\r\n\r\n\r\n\t\tr(\"AxisLabel\", [\"y\"]).setAll({\r\n\t\t\tcenterX: p100\r\n\t\t});\r\n\r\n\t\tr(\"AxisLabel\", [\"y\", \"inside\"]).setAll({\r\n\t\t\tcenterX: 0\r\n\t\t});\r\n\r\n\t\tr(\"AxisLabel\", [\"y\", \"inside\", \"opposite\"]).setAll({\r\n\t\t\tcenterX: p100\r\n\t\t});\r\n\r\n\t\tr(\"AxisLabel\", [\"y\", \"opposite\"]).setAll({\r\n\t\t\tcenterX: 0\r\n\t\t});\r\n\r\n\t\tr(\"AxisLabel\", [\"minor\"]).setAll({\r\n\t\t\tfontSize: \"0.6em\"\r\n\t\t});\r\n\r\n\t\tr(\"AxisLabel\", [\"xy\", \"scrollbar\", \"y\"]).setAll({\r\n\t\t\tvisible: false\r\n\t\t});\r\n\r\n\t\t// Class: Grid\r\n\t\tr(\"Grid\", [\"xy\", \"scrollbar\", \"y\"]).setAll({\r\n\t\t\tvisible: false\r\n\t\t});\r\n\r\n\t\t// Class: Grid\r\n\t\tr(\"Grid\", [\"xy\", \"scrollbar\", \"x\"]).setAll({\r\n\t\t\topacity: 0.5\r\n\t\t});\r\n\r\n\r\n\r\n\r\n\t\t/**\r\n\t\t * ------------------------------------------------------------------------\r\n\t\t * charts/xy: Cursor\r\n\t\t * ------------------------------------------------------------------------\r\n\t\t */\r\n\r\n\t\tr(\"XYCursor\").setAll({\r\n\t\t\tbehavior: \"none\",\r\n\t\t\tlayer: 30,\r\n\t\t\texportable: false,\r\n\t\t\tsnapToSeriesBy: \"xy\",\r\n\t\t\tmoveThreshold: 1\r\n\t\t});\r\n\r\n\t\t{\r\n\t\t\tconst rule = r(\"Grid\", [\"cursor\", \"x\"]);\r\n\r\n\t\t\trule.setAll({\r\n\t\t\t\tforceInactive: true,\r\n\t\t\t\tstrokeOpacity: 0.8,\r\n\t\t\t\tstrokeDasharray: [2, 2],\r\n\t\t\t\trole: \"slider\",\r\n\t\t\t\tariaLabel: language.translate(\"Use left and right arrows to move selection\")\r\n\t\t\t});\r\n\r\n\t\t\tsetColor(rule, \"stroke\", ic, \"alternativeBackground\");\r\n\t\t}\r\n\r\n\t\t{\r\n\t\t\tconst rule = r(\"Grid\", [\"cursor\", \"y\"]);\r\n\r\n\t\t\trule.setAll({\r\n\t\t\t\tforceInactive: true,\r\n\t\t\t\tstrokeOpacity: 0.8,\r\n\t\t\t\tstrokeDasharray: [2, 2],\r\n\t\t\t\trole: \"slider\",\r\n\t\t\t\tariaLabel: language.translate(\"Use up and down arrows to move selection\")\r\n\t\t\t});\r\n\r\n\t\t\tsetColor(rule, \"stroke\", ic, \"alternativeBackground\");\r\n\t\t}\r\n\r\n\t\t{\r\n\t\t\tconst rule = r(\"Graphics\", [\"cursor\", \"selection\"]);\r\n\r\n\t\t\trule.setAll({\r\n\t\t\t\tfillOpacity: 0.15,\r\n\t\t\t});\r\n\r\n\t\t\tsetColor(rule, \"fill\", ic, \"alternativeBackground\");\r\n\t\t}\r\n\r\n\r\n\t\t/**\r\n\t\t * ------------------------------------------------------------------------\r\n\t\t * charts/xy: Axes\r\n\t\t * ------------------------------------------------------------------------\r\n\t\t */\r\n\r\n\t\tr(\"Axis\").setAll({\r\n\t\t\tstart: 0,\r\n\t\t\tend: 1,\r\n\t\t\tminZoomCount: 1,\r\n\t\t\tmaxZoomCount: Infinity,\r\n\t\t\tmaxZoomFactor: 1000,\r\n\t\t\tmaxDeviation: 0.1,\r\n\t\t\tsnapTooltip: true,\r\n\t\t\ttooltipLocation: 0.5,\r\n\t\t\tpanX: true,\r\n\t\t\tpanY: true,\r\n\t\t\tzoomX: true,\r\n\t\t\tzoomY: true,\r\n\t\t\tfixAxisSize: true\r\n\t\t});\r\n\r\n\t\tr(\"AxisLabel\").setAll({\r\n\t\t\tlocation: 0.5,\r\n\t\t\tmultiLocation: 0,\r\n\t\t\tcenterX: p50,\r\n\t\t\tcenterY: p50,\r\n\t\t\tpaddingTop: 3,\r\n\t\t\tpaddingBottom: 3,\r\n\t\t\tpaddingLeft: 5,\r\n\t\t\tpaddingRight: 5\r\n\t\t});\r\n\r\n\t\t// The following is deprecated following text measuring updates in 5.0.5\r\n\t\t// r(\"AxisLabel\", [\"y\"]).setAll({\r\n\t\t// \ttextAlign: \"right\"\r\n\t\t// });\r\n\r\n\t\t// r(\"AxisLabel\", [\"y\", \"opposite\"]).setAll({\r\n\t\t// \ttextAlign: \"left\"\r\n\t\t// });\r\n\r\n\t\tr(\"Container\", [\"axis\", \"header\"]).setAll({\r\n\t\t\tlayer: 30\r\n\t\t});\r\n\r\n\t\tr(\"Rectangle\", [\"axis\", \"header\", \"background\"]).setAll({\r\n\t\t\tcrisp: true\r\n\t\t});\r\n\r\n\t\t{\r\n\t\t\tconst rule = r(\"AxisRenderer\");\r\n\r\n\t\t\trule.setAll({\r\n\t\t\t\tcrisp: true,\r\n\t\t\t\tstrokeOpacity: 0\r\n\t\t\t});\r\n\r\n\t\t\tsetColor(rule, \"stroke\", ic, \"grid\");\r\n\t\t}\r\n\r\n\t\tr(\"AxisRendererX\").setAll({\r\n\t\t\tminGridDistance: 120,\r\n\t\t\topposite: false,\r\n\t\t\tinversed: false,\r\n\t\t\tcellStartLocation: 0,\r\n\t\t\tcellEndLocation: 1,\r\n\t\t\twidth: p100\r\n\t\t});\r\n\r\n\t\tr(\"AxisRendererY\").setAll({\r\n\t\t\tminGridDistance: 40,\r\n\t\t\topposite: false,\r\n\t\t\tinversed: false,\r\n\t\t\tcellStartLocation: 0,\r\n\t\t\tcellEndLocation: 1,\r\n\t\t\theight: p100\r\n\t\t});\r\n\r\n\t\t{\r\n\t\t\tconst rule = r(\"Rectangle\", [\"axis\", \"thumb\"]);\r\n\r\n\t\t\trule.setAll({\r\n\t\t\t\tfillOpacity: 0\r\n\t\t\t});\r\n\r\n\t\t\tsetColor(rule, \"fill\", ic, \"alternativeBackground\");\r\n\r\n\t\t\trule.states.create(\"hover\", { fillOpacity: 0.1 })\r\n\t\t}\r\n\r\n\t\tr(\"Rectangle\", [\"axis\", \"thumb\", \"x\"]).setAll({\r\n\t\t\tcursorOverStyle: \"ew-resize\"\r\n\t\t});\r\n\r\n\t\tr(\"Rectangle\", [\"axis\", \"thumb\", \"y\"]).setAll({\r\n\t\t\tcursorOverStyle: \"ns-resize\"\r\n\t\t});\r\n\r\n\r\n\t\t{\r\n\t\t\tconst rule = r(\"Grid\");\r\n\r\n\t\t\trule.setAll({\r\n\t\t\t\tlocation: 0,\r\n\t\t\t\tstrokeOpacity: 0.15,\r\n\t\t\t\tcrisp: true\r\n\t\t\t});\r\n\r\n\t\t\tsetColor(rule, \"stroke\", ic, \"grid\");\r\n\t\t}\r\n\r\n\t\t{\r\n\t\t\tconst rule = r(\"Grid\", [\"minor\"]);\r\n\r\n\t\t\trule.setAll({\r\n\t\t\t\tlocation: 0,\r\n\t\t\t\tstrokeOpacity: 0.07,\r\n\t\t\t\tcrisp: true\r\n\t\t\t});\r\n\r\n\t\t\tsetColor(rule, \"stroke\", ic, \"grid\");\r\n\t\t}\r\n\r\n\r\n\t\tr(\"Grid\", [\"base\"]).setAll({\r\n\t\t\tstrokeOpacity: 0.3\r\n\t\t});\r\n\r\n\t\t{\r\n\t\t\tconst rule = r(\"Graphics\", [\"axis\", \"fill\"]);\r\n\r\n\t\t\trule.setAll({\r\n\t\t\t\tvisible: false,\r\n\t\t\t\tisMeasured: false,\r\n\t\t\t\tposition: \"absolute\",\r\n\t\t\t\tfillOpacity: 0.05,\r\n\t\t\t});\r\n\r\n\t\t\tsetColor(rule, \"fill\", ic, \"alternativeBackground\");\r\n\t\t}\r\n\r\n\t\tr(\"Graphics\", [\"axis\", \"fill\", \"range\"]).setAll({\r\n\t\t\tisMeasured: true\r\n\t\t});\r\n\r\n\t\t// hides all elements of series axis range\r\n\t\tr(\"Graphics\", [\"series\", \"fill\", \"range\"]).setAll({\r\n\t\t\tvisible: false,\r\n\t\t\tisMeasured: true\r\n\t\t});\r\n\r\n\t\tr(\"Grid\", [\"series\", \"range\"]).setAll({\r\n\t\t\tvisible: false\r\n\t\t});\r\n\r\n\t\tr(\"AxisTick\", [\"series\", \"range\"]).setAll({\r\n\t\t\tvisible: false\r\n\t\t});\r\n\r\n\t\tr(\"AxisLabel\", [\"series\", \"range\"]).setAll({\r\n\t\t\tvisible: false\r\n\t\t});\r\n\r\n\t\t{\r\n\t\t\tconst rule = r(\"AxisTick\");\r\n\r\n\t\t\trule.setAll({\r\n\t\t\t\tlocation: 0.5,\r\n\t\t\t\tmultiLocation: 0,\r\n\t\t\t\tstrokeOpacity: 1,\r\n\t\t\t\tisMeasured: false,\r\n\t\t\t\tposition: \"absolute\",\r\n\t\t\t\tvisible: false\r\n\t\t\t});\r\n\r\n\t\t\tsetColor(rule, \"stroke\", ic, \"grid\");\r\n\t\t}\r\n\r\n\t\tr(\"CategoryAxis\").setAll({\r\n\t\t\tstartLocation: 0,\r\n\t\t\tendLocation: 1,\r\n\t\t\tfillRule: (dataItem: DataItem<ICategoryAxisDataItem>, index?: number) => {\r\n\t\t\t\tconst axisFill = dataItem.get(\"axisFill\");\r\n\t\t\t\tif (axisFill) {\r\n\t\t\t\t\tif (!$type.isNumber(index) || index % 2 == 0) {\r\n\t\t\t\t\t\taxisFill.setPrivate(\"visible\", true);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\taxisFill.setPrivate(\"visible\", false);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tconst gridIntervals: Array<ITimeInterval> = [\r\n\t\t\t{ timeUnit: \"millisecond\", count: 1 },\r\n\t\t\t{ timeUnit: \"millisecond\", count: 5 },\r\n\t\t\t{ timeUnit: \"millisecond\", count: 10 },\r\n\t\t\t{ timeUnit: \"millisecond\", count: 50 },\r\n\t\t\t{ timeUnit: \"millisecond\", count: 100 },\r\n\t\t\t{ timeUnit: \"millisecond\", count: 500 },\r\n\t\t\t{ timeUnit: \"second\", count: 1 },\r\n\t\t\t{ timeUnit: \"second\", count: 5 },\r\n\t\t\t{ timeUnit: \"second\", count: 10 },\r\n\t\t\t{ timeUnit: \"second\", count: 30 },\r\n\t\t\t{ timeUnit: \"minute\", count: 1 },\r\n\t\t\t{ timeUnit: \"minute\", count: 5 },\r\n\t\t\t{ timeUnit: \"minute\", count: 10 },\r\n\t\t\t{ timeUnit: \"minute\", count: 15 },\r\n\t\t\t{ timeUnit: \"minute\", count: 30 },\r\n\t\t\t{ timeUnit: \"hour\", count: 1 },\r\n\t\t\t{ timeUnit: \"hour\", count: 3 },\r\n\t\t\t{ timeUnit: \"hour\", count: 6 },\r\n\t\t\t{ timeUnit: \"hour\", count: 12 },\r\n\t\t\t{ timeUnit: \"day\", count: 1 },\r\n\t\t\t{ timeUnit: \"day\", count: 2 },\r\n\t\t\t{ timeUnit: \"day\", count: 3 },\r\n\t\t\t{ timeUnit: \"day\", count: 4 },\r\n\t\t\t{ timeUnit: \"day\", count: 5 },\r\n\t\t\t{ timeUnit: \"week\", count: 1 },\r\n\t\t\t{ timeUnit: \"month\", count: 1 },\r\n\t\t\t{ timeUnit: \"month\", count: 2 },\r\n\t\t\t{ timeUnit: \"month\", count: 3 },\r\n\t\t\t{ timeUnit: \"month\", count: 6 },\r\n\t\t\t{ timeUnit: \"year\", count: 1 },\r\n\t\t\t{ timeUnit: \"year\", count: 2 },\r\n\t\t\t{ timeUnit: \"year\", count: 5 },\r\n\t\t\t{ timeUnit: \"year\", count: 10 },\r\n\t\t\t{ timeUnit: \"year\", count: 50 },\r\n\t\t\t{ timeUnit: \"year\", count: 100 },\r\n\t\t\t{ timeUnit: \"year\", count: 200 },\r\n\t\t\t{ timeUnit: \"year\", count: 500 },\r\n\t\t\t{ timeUnit: \"year\", count: 1000 },\r\n\t\t\t{ timeUnit: \"year\", count: 2000 },\r\n\t\t\t{ timeUnit: \"year\", count: 5000 },\r\n\t\t\t{ timeUnit: \"year\", count: 10000 },\r\n\t\t\t{ timeUnit: \"year\", count: 100000 }\r\n\t\t];\r\n\r\n\t\tconst dateFormats = {\r\n\t\t\t\"millisecond\": language.translate(\"_date_millisecond\"),\r\n\t\t\t\"second\": language.translate(\"_date_second\"),\r\n\t\t\t\"minute\": language.translate(\"_date_minute\"),\r\n\t\t\t\"hour\": language.translate(\"_date_hour\"),\r\n\t\t\t\"day\": language.translate(\"_date_day\"),\r\n\t\t\t\"week\": language.translate(\"_date_day\"),\r\n\t\t\t\"month\": language.translate(\"_date_month\"),\r\n\t\t\t\"year\": language.translate(\"_date_year\")\r\n\t\t};\r\n\r\n\t\tconst periodChangeDateFormats = {\r\n\t\t\t\"millisecond\": language.translate(\"_date_millisecond\"),\r\n\t\t\t\"second\": language.translate(\"_date_second\"),\r\n\t\t\t\"minute\": language.translate(\"_date_minute\"),\r\n\t\t\t\"hour\": language.translate(\"_date_day\"),\r\n\t\t\t\"day\": language.translate(\"_date_day\"),\r\n\t\t\t\"week\": language.translate(\"_date_day\"),\r\n\t\t\t\"month\": language.translate(\"_date_month\") + \" \" + language.translate(\"_date_year\"),\r\n\t\t\t\"year\": language.translate(\"_date_year\")\r\n\t\t};\r\n\r\n\t\tconst tooltipDateFormats = {\r\n\t\t\t\"millisecond\": language.translate(\"_date_millisecond_full\"),\r\n\t\t\t\"second\": language.translate(\"_date_second_full\"),\r\n\t\t\t\"minute\": language.translate(\"_date_minute_full\"),\r\n\t\t\t\"hour\": language.translate(\"_date_hour_full\"),\r\n\t\t\t\"day\": language.translate(\"_date_day_full\"),\r\n\t\t\t\"week\": language.translate(\"_date_week_full\"),\r\n\t\t\t\"month\": language.translate(\"_date_month_full\"),\r\n\t\t\t\"year\": language.translate(\"_date_year\")\r\n\t\t};\r\n\r\n\t\tr(\"CategoryDateAxis\").setAll({\r\n\t\t\tmarkUnitChange: true,\r\n\t\t\tgridIntervals: $array.copy(gridIntervals),\r\n\t\t\tdateFormats: $object.copy(dateFormats),\r\n\t\t\tperiodChangeDateFormats: $object.copy(periodChangeDateFormats)\r\n\t\t});\r\n\r\n\t\tr(\"DateAxis\").setAll({\r\n\t\t\tmaxZoomFactor: null,\r\n\t\t\tstrictMinMax: true,\r\n\t\t\tstartLocation: 0,\r\n\t\t\tendLocation: 1,\r\n\t\t\tmarkUnitChange: true,\r\n\t\t\tgroupData: false,\r\n\t\t\tgroupCount: 500,\r\n\t\t\tgridIntervals: $array.copy(gridIntervals),\r\n\t\t\tdateFormats: $object.copy(dateFormats),\r\n\t\t\tperiodChangeDateFormats: $object.copy(periodChangeDateFormats),\r\n\t\t\ttooltipDateFormats: tooltipDateFormats,\r\n\r\n\t\t\tgroupIntervals: [\r\n\t\t\t\t{ timeUnit: \"millisecond\", count: 1 },\r\n\t\t\t\t{ timeUnit: \"millisecond\", count: 10 },\r\n\t\t\t\t{ timeUnit: \"millisecond\", count: 100 },\r\n\t\t\t\t{ timeUnit: \"second\", count: 1 },\r\n\t\t\t\t{ timeUnit: \"second\", count: 10 },\r\n\t\t\t\t{ timeUnit: \"minute\", count: 1 },\r\n\t\t\t\t{ timeUnit: \"minute\", count: 10 },\r\n\t\t\t\t{ timeUnit: \"hour\", count: 1 },\r\n\t\t\t\t{ timeUnit: \"day\", count: 1 },\r\n\t\t\t\t{ timeUnit: \"week\", count: 1 },\r\n\t\t\t\t{ timeUnit: \"month\", count: 1 },\r\n\t\t\t\t{ timeUnit: \"year\", count: 1 }\r\n\t\t\t],\r\n\r\n\t\t\tfillRule: (dataItem: DataItem<IValueAxisDataItem>) => {\r\n\t\t\t\tconst axisFill = dataItem.get(\"axisFill\");\r\n\t\t\t\tif (axisFill) {\r\n\t\t\t\t\tconst axis = <DateAxis<AxisRenderer>>dataItem.component;\r\n\t\t\t\t\tconst value = dataItem.get(\"value\");\r\n\t\t\t\t\tconst endValue = dataItem.get(\"endValue\");\r\n\t\t\t\t\tconst intervalDuration = axis.intervalDuration();\r\n\t\t\t\t\tconst baseInterval = axis.getPrivate(\"baseInterval\");\r\n\t\t\t\t\tconst gridInterval = axis.getPrivate(\"gridInterval\", baseInterval);\r\n\r\n\r\n\t\t\t\t\tlet min = axis.getPrivate(\"min\", 0);\r\n\t\t\t\t\tmin = $time.round(new Date(min), gridInterval.timeUnit, gridInterval.count, this._root.locale.firstDayOfWeek, this._root.utc, undefined, this._root.timezone).getTime();\r\n\r\n\t\t\t\t\tif (value != null && endValue != null) {\r\n\t\t\t\t\t\tconst val = Math.round(Math.round((value - min) / intervalDuration)) / 2;\r\n\r\n\t\t\t\t\t\tif (val == Math.round(val)) {\r\n\t\t\t\t\t\t\taxisFill.setPrivate(\"visible\", true);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\taxisFill.setPrivate(\"visible\", false);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tr(\"GaplessDateAxis\").setAll({\r\n\t\t\tfillRule: (dataItem: DataItem<IGaplessDateAxisDataItem>) => {\r\n\t\t\t\tconst axisFill = dataItem.get(\"axisFill\");\r\n\t\t\t\tif (axisFill) {\r\n\r\n\t\t\t\t\tconst index = dataItem.get(\"index\")\r\n\t\t\t\t\tlet visible = false;\r\n\t\t\t\t\tif (!$type.isNumber(index) || index % 2 == 0) {\r\n\t\t\t\t\t\tvisible = true\r\n\t\t\t\t\t}\r\n\t\t\t\t\taxisFill.setPrivate(\"visible\", visible);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\r\n\t\tr(\"ValueAxis\").setAll({\r\n\r\n\t\t\tbaseValue: 0,\r\n\t\t\tlogarithmic: false,\r\n\t\t\tstrictMinMax: false,\r\n\t\t\tautoZoom: true,\r\n\r\n\t\t\tfillRule: (dataItem: DataItem<IValueAxisDataItem>) => {\r\n\t\t\t\tconst axisFill = dataItem.get(\"axisFill\");\r\n\t\t\t\tif (axisFill) {\r\n\t\t\t\t\tconst axis = <ValueAxis<AxisRenderer>>dataItem.component;\r\n\t\t\t\t\tconst value = dataItem.get(\"value\");\r\n\t\t\t\t\tconst step = axis.getPrivate(\"step\");\r\n\r\n\t\t\t\t\tif ($type.isNumber(value) && $type.isNumber(step)) {\r\n\t\t\t\t\t\tif ($math.round(value / step / 2, 5) == Math.round(value / step / 2)) {\r\n\t\t\t\t\t\t\taxisFill.setPrivate(\"visible\", false);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\taxisFill.setPrivate(\"visible\", true);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tr(\"DurationAxis\").setAll({\r\n\t\t\tbaseUnit: \"second\"\r\n\t\t})\r\n\r\n\r\n\t\t/**\r\n\t\t * ------------------------------------------------------------------------\r\n\t\t * charts/xy: Series\r\n\t\t * ------------------------------------------------------------------------\r\n\t\t */\r\n\r\n\t\tr(\"XYSeries\").setAll({\r\n\t\t\tmaskBullets: true,\r\n\t\t\tstackToNegative: true,\r\n\r\n\t\t\tlocationX: 0.5,\r\n\t\t\tlocationY: 0.5,\r\n\r\n\t\t\tsnapTooltip: false,\r\n\r\n\t\t\topenValueXGrouped: \"open\",\r\n\t\t\topenValueYGrouped: \"open\",\r\n\t\t\tvalueXGrouped: \"close\",\r\n\t\t\tvalueYGrouped: \"close\",\r\n\r\n\t\t\tseriesTooltipTarget: \"series\"\r\n\t\t});\r\n\r\n\t\tr(\"BaseColumnSeries\").setAll({\r\n\t\t\tadjustBulletPosition: true\r\n\t\t});\r\n\r\n\t\tr(\"ColumnSeries\").setAll({\r\n\t\t\tclustered: true\r\n\t\t});\r\n\r\n\t\tr(\"RoundedRectangle\", [\"series\", \"column\"]).setAll({\r\n\t\t\tposition: \"absolute\",\r\n\t\t\tisMeasured: false,\r\n\t\t\twidth: percent(70),\r\n\t\t\theight: percent(70),\r\n\t\t\tstrokeWidth: 1,\r\n\t\t\tstrokeOpacity: 1,\r\n\t\t\tcornerRadiusBL: 0,\r\n\t\t\tcornerRadiusTL: 0,\r\n\t\t\tcornerRadiusBR: 0,\r\n\t\t\tcornerRadiusTR: 0,\r\n\t\t\tfillOpacity: 1,\r\n\t\t\trole: \"figure\"\r\n\t\t});\r\n\r\n\t\tr(\"LineSeries\").setAll({\r\n\t\t\tconnect: true,\r\n\t\t\tautoGapCount: 1.1,\r\n\t\t\tstackToNegative: false\r\n\t\t});\r\n\r\n\t\tr(\"Graphics\", [\"series\", \"stroke\"]).setAll({\r\n\t\t\tposition: \"absolute\",\r\n\t\t\tstrokeWidth: 1,\r\n\t\t\tstrokeOpacity: 1,\r\n\t\t\tisMeasured: false\r\n\t\t});\r\n\r\n\t\tr(\"Graphics\", [\"series\", \"fill\"]).setAll({\r\n\t\t\tvisible: false,\r\n\t\t\tfillOpacity: 0,\r\n\t\t\tposition: \"absolute\",\r\n\t\t\tstrokeWidth: 0,\r\n\t\t\tstrokeOpacity: 0,\r\n\t\t\tisMeasured: false\r\n\t\t});\r\n\r\n\t\tr(\"Graphics\", [\"line\", \"series\", \"legend\", \"marker\", \"stroke\"]).setAll({\r\n\t\t\tdraw: (display: any, sprite: any) => {\r\n\t\t\t\tconst parent = sprite.parent;\r\n\t\t\t\tif (parent) {\r\n\t\t\t\t\tconst h = parent.height();\r\n\t\t\t\t\tconst w = parent.width();\r\n\t\t\t\t\tdisplay.moveTo(0, h / 2);\r\n\t\t\t\t\tdisplay.lineTo(w, h / 2);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t{\r\n\t\t\tconst rule = r(\"Graphics\", [\"line\", \"series\", \"legend\", \"marker\", \"stroke\"]).states.create(\"disabled\", {});\r\n\t\t\tsetColor(rule, \"stroke\", ic, \"disabled\");\r\n\t\t}\r\n\r\n\t\tr(\"Graphics\", [\"line\", \"series\", \"legend\", \"marker\", \"fill\"]).setAll({\r\n\t\t\tdraw: (display: any, sprite: any) => {\r\n\t\t\t\tconst parent = sprite.parent;\r\n\t\t\t\tif (parent) {\r\n\t\t\t\t\tconst h = parent.height();\r\n\t\t\t\t\tconst w = parent.width();\r\n\t\t\t\t\tdisplay.moveTo(0, 0);\r\n\t\t\t\t\tdisplay.lineTo(w, 0);\r\n\t\t\t\t\tdisplay.lineTo(w, h);\r\n\t\t\t\t\tdisplay.lineTo(0, h);\r\n\t\t\t\t\tdisplay.lineTo(0, 0);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t{\r\n\t\t\tconst rule = r(\"Graphics\", [\"line\", \"series\", \"legend\", \"marker\", \"fill\"]).states.create(\"disabled\", {});\r\n\t\t\tsetColor(rule, \"stroke\", ic, \"disabled\");\r\n\t\t}\r\n\r\n\t\tr(\"SmoothedXYLineSeries\").setAll({\r\n\t\t\ttension: 0.5\r\n\t\t});\r\n\r\n\t\tr(\"SmoothedXLineSeries\").setAll({\r\n\t\t\ttension: 0.5\r\n\t\t});\r\n\r\n\t\tr(\"SmoothedYLineSeries\").setAll({\r\n\t\t\ttension: 0.5\r\n\t\t});\r\n\r\n\t\tr(\"Candlestick\").setAll({\r\n\t\t\tposition: \"absolute\",\r\n\t\t\tisMeasured: false,\r\n\t\t\twidth: percent(50),\r\n\t\t\theight: percent(50),\r\n\t\t\tstrokeWidth: 1,\r\n\t\t\tstrokeOpacity: 1,\r\n\t\t\tcornerRadiusBL: 0,\r\n\t\t\tcornerRadiusTL: 0,\r\n\t\t\tcornerRadiusBR: 0,\r\n\t\t\tcornerRadiusTR: 0,\r\n\t\t\tfillOpacity: 1,\r\n\t\t\trole: \"figure\"\r\n\t\t});\r\n\r\n\t\tr(\"OHLC\").setAll({\r\n\t\t\twidth: percent(80),\r\n\t\t\theight: percent(80)\r\n\t\t});\r\n\r\n\t\tr(\"CandlestickSeries\").setAll({\r\n\t\t\tlowValueXGrouped: \"low\",\r\n\t\t\tlowValueYGrouped: \"low\",\r\n\t\t\thighValueXGrouped: \"high\",\r\n\t\t\thighValueYGrouped: \"high\",\r\n\t\t\topenValueXGrouped: \"open\",\r\n\t\t\topenValueYGrouped: \"open\",\r\n\t\t\tvalueXGrouped: \"close\",\r\n\t\t\tvalueYGrouped: \"close\"\r\n\t\t})\r\n\r\n\t\t// These rules can be used for regular columns, too\r\n\t\t{\r\n\t\t\tconst rule = r(\"Rectangle\", [\"column\", \"autocolor\"]).states.create(\"riseFromOpen\", {});\r\n\t\t\tsetColor(rule, \"fill\", ic, \"positive\");\r\n\t\t\tsetColor(rule, \"stroke\", ic, \"positive\");\r\n\t\t}\r\n\r\n\t\t{\r\n\t\t\tconst rule = r(\"Rectangle\", [\"column\", \"autocolor\"]).states.create(\"dropFromOpen\", {});\r\n\t\t\tsetColor(rule, \"fill\", ic, \"negative\");\r\n\t\t\tsetColor(rule, \"stroke\", ic, \"negative\");\r\n\t\t}\r\n\r\n\t\t// Hollow\r\n\t\tr(\"Rectangle\", [\"column\", \"autocolor\", \"pro\"]).states.create(\"riseFromOpen\", { fillOpacity: 0 });\r\n\t\tr(\"Rectangle\", [\"column\", \"autocolor\", \"pro\"]).states.create(\"dropFromOpen\", { fillOpacity: 1 });\r\n\r\n\t\t{\r\n\t\t\tconst rule = r(\"Rectangle\", [\"column\", \"autocolor\", \"pro\"]).states.create(\"riseFromPrevious\", {});\r\n\t\t\tsetColor(rule, \"fill\", ic, \"positive\");\r\n\t\t\tsetColor(rule, \"stroke\", ic, \"positive\");\r\n\t\t}\r\n\r\n\t\t{\r\n\t\t\tconst rule = r(\"Rectangle\", [\"column\", \"autocolor\", \"pro\"]).states.create(\"dropFromPrevious\", {});\r\n\t\t\tsetColor(rule, \"fill\", ic, \"negative\");\r\n\t\t\tsetColor(rule, \"stroke\", ic, \"negative\");\r\n\t\t}\r\n\r\n\r\n\t\t// AXIS RANGE GRIP\r\n\t\t{\r\n\t\t\tconst rule = r(\"RoundedRectangle\", [\"rangegrip\"]);\r\n\r\n\t\t\trule.setAll({\r\n\t\t\t\tstrokeOpacity: 0,\r\n\t\t\t\tfillOpacity: 0,\r\n\t\t\t\tstrokeWidth: 1,\r\n\t\t\t\twidth: 12,\r\n\t\t\t\theight: 12\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\t{\r\n\t\t\tconst rule = r(\"Graphics\", [\"rangegrip\", \"button\", \"icon\"]);\r\n\r\n\t\t\trule.setAll({\r\n\t\t\t\tinteractive: false,\r\n\t\t\t\tcrisp: true,\r\n\t\t\t\tstrokeOpacity: 0.5,\r\n\t\t\t\tdraw: (display: any) => {\r\n\t\t\t\t\tdisplay.moveTo(0, 0.5);\r\n\t\t\t\t\tdisplay.lineTo(0, 12.5);\r\n\r\n\t\t\t\t\tdisplay.moveTo(2, 0.5);\r\n\t\t\t\t\tdisplay.lineTo(2, 12.5);\r\n\r\n\t\t\t\t\tdisplay.moveTo(4, 0.5);\r\n\t\t\t\t\tdisplay.lineTo(4, 12.5);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tsetColor(rule, \"stroke\", ic, \"secondaryButtonText\");\r\n\t\t}\r\n\r\n\t\tr(\"Button\", [\"rangegrip\"]).setAll({\r\n\t\t\tdraggable: true,\r\n\t\t\tpaddingTop: 0,\r\n\t\t\tpaddingBottom: 0\r\n\t\t})\r\n\r\n\t\tr(\"Button\", [\"rangegrip\", \"vertical\"]).setAll({\r\n\t\t\trotation: 90,\r\n\t\t\tcursorOverStyle: \"ns-resize\",\r\n\t\t\tcenterX: p50\r\n\t\t});\r\n\r\n\t\tr(\"Button\", [\"rangegrip\", \"horizontal\"]).setAll({\r\n\t\t\tcursorOverStyle: \"ew-resize\",\r\n\t\t\tcenterX: p50\r\n\t\t});\r\n\r\n\t\tr(\"Button\", [\"rangegrip\", \"vertical\", \"left\"]).setAll({\r\n\t\t\tcenterY: p100\r\n\t\t});\r\n\r\n\t\tr(\"Button\", [\"rangegrip\", \"vertical\", \"right\"]).setAll({\r\n\t\t\tcenterY: 0\r\n\t\t});\r\n\r\n\t\tr(\"Button\", [\"rangegrip\", \"horizontal\", \"top\"]).setAll({\r\n\t\t\tcenterY: 0\r\n\t\t});\r\n\r\n\t\tr(\"Button\", [\"rangegrip\", \"horizontal\", \"bottom\"]).setAll({\r\n\t\t\tcenterY: p100\r\n\t\t});\r\n\r\n\t}\r\n}\r\n","import type { Axis } from \"./axes/Axis\";\nimport type { XYCursor } from \"./XYCursor\";\nimport type { AxisRenderer } from \"./axes/AxisRenderer\";\nimport type { DataItem } from \"../../core/render/Component\";\nimport type { IDisposer } from \"../../core/util/Disposer\";\nimport type { XYSeries, IXYSeriesDataItem } from \"./series/XYSeries\";\nimport type { IPointerEvent } from \"../../core/render/backend/Renderer\";;\nimport type { Scrollbar } from \"../../core/render/Scrollbar\";\nimport type { Tooltip } from \"../../core/render/Tooltip\";\nimport type { IPoint } from \"../../core/util/IPoint\";\nimport type { ISpritePointerEvent } from \"../../core/render/Sprite\";\nimport type { Animation } from \"../../core/util/Entity\";\nimport type { CategoryAxis } from \"./axes/CategoryAxis\";\nimport type { DateAxis } from \"./axes/DateAxis\";\n\nimport { XYChartDefaultTheme } from \"./XYChartDefaultTheme\";\nimport { Container } from \"../../core/render/Container\";\nimport { Rectangle } from \"../../core/render/Rectangle\";\nimport { SerialChart, ISerialChartPrivate, ISerialChartSettings, ISerialChartEvents } from \"../../core/render/SerialChart\";\nimport { ListAutoDispose } from \"../../core/util/List\";\nimport { p100 } from \"../../core/util/Percent\";\nimport { Button } from \"../../core/render/Button\";\nimport { Graphics } from \"../../core/render/Graphics\";\nimport { Percent } from \"../../core/util/Percent\";\n\nimport * as $array from \"../../core/util/Array\";\nimport * as $type from \"../../core/util/Type\";\nimport * as $order from \"../../core/util/Order\";\nimport * as $object from \"../../core/util/Object\";\nimport * as $utils from \"../../core/util/Utils\";\nimport * as $math from \"../../core/util/Math\";\n\nexport interface IXYChartSettings extends ISerialChartSettings {\n\n\t/**\n\t * horizontal scrollbar.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/scrollbars/} for more info\n\t */\n\tscrollbarX?: Scrollbar;\n\n\t/**\n\t * Vertical scrollbar.\n\t *\n\t */\n\tscrollbarY?: Scrollbar;\n\n\t/**\n\t * If this is set to `true`, users will be able to pan the chart horizontally\n\t * by dragging plot area.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/zoom-and-pan/#Panning} for more info\n\t */\n\tpanX?: boolean;\n\n\t/**\n\t * If this is set to `true`, users will be able to pan the chart vertically\n\t * by dragging plot area.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/zoom-and-pan/#Panning} for more info\n\t */\n\tpanY?: boolean;\n\n\t/**\n\t * Indicates what happens when mouse wheel is spinned horizontally while over\n\t * plot area.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/zoom-and-pan/#Mouse_wheel_behavior} for more info\n\t */\n\twheelX?: \"zoomX\" | \"zoomY\" | \"zoomXY\" | \"panX\" | \"panY\" | \"panXY\" | \"none\";\n\n\t/**\n\t * Indicates what happens when mouse wheel is spinned vertically while over\n\t * plot area.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/zoom-and-pan/#Mouse_wheel_behavior} for more info\n\t */\n\twheelY?: \"zoomX\" | \"zoomY\" | \"zoomXY\" | \"panX\" | \"panY\" | \"panXY\" | \"none\";\n\n\t/**\n\t * Indicates the relative \"speed\" of the mouse wheel.\n\t *\n\t * @default 0.25\n\t */\n\twheelStep?: number;\n\n\t/**\n\t * Chart's cursor.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/cursor/} for more info\n\t */\n\tcursor?: XYCursor;\n\n\t/**\n\t * If not set (default), cursor will show tooltips for all data items in the\n\t * same category/date.\n\t *\n\t * If set, cursor will select closest data item to pointer (mouse or touch) and\n\t * show tooltip for it.\n\t *\n\t * It will also show tooltips for all data items that are within X pixels\n\t * range (as set in `maxTooltipDistance`).\n\t *\n\t * Tooltips for data items farther then X pixels, will not be shown.\n\t *\n\t * NOTE: set it to `-1` to ensure only one tooltip is displayed, even if there\n\t * are multiple data items in the same place.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/cursor/#tooltips} for more info\n\t */\n\tmaxTooltipDistance?: number;\n\n\t/**\n\t * Indicates how the distance should be measured when assessing distance\n\t * between tooltips as set in `maxTooltipDistance`.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/cursor/#tooltips} for more info\n\t * @since 5.2.6\n\t */\n\tmaxTooltipDistanceBy?: \"xy\" | \"x\" | \"y\";\n\n\t/**\n\t * If set to `false` the chart will not check for overlapping of multiple\n\t * tooltips, and will not arrange them to not overlap.\n\t *\n\t * Will work only if chart has an `XYCursor` enabled.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/cursor/#ooltips} for more info\n\t * @default true\n\t */\n\tarrangeTooltips?: boolean\n\n\t/**\n\t * If set to `true`, using pinch gesture on the chart's plot area will zoom\n\t * chart horizontally.\n\t *\n\t * NOTE: this setting is not supported in a [[RadarChart]].\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/zoom-and-pan/#Pinch_zoom} for more info\n\t * @since 5.1.8\n\t * @default false\n\t */\n\tpinchZoomX?: boolean;\n\n\t/**\n\t * If set to `true`, using pinch gesture on the chart's plot area will zoom\n\t * chart vertically.\n\t *\n\t * NOTE: this setting is not supported in a [[RadarChart]].\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/zoom-and-pan/#Pinch_zoom} for more info\n\t * @since 5.1.8\n\t * @default false\n\t */\n\tpinchZoomY?: boolean;\n\n\t/**\n\t * If set, will use this relative position as a \"center\" for mouse wheel\n\t * horizontal zooming instead of actual cursor position.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/zoom-and-pan/#Mouse_wheel_behavior} for more info\n\t * @since 5.2.11\n\t */\n\twheelZoomPositionX?: number;\n\n\t/**\n\t * If set, will use this relative position as a \"center\" for mouse wheel\n\t * vertical zooming instead of actual cursor position.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/zoom-and-pan/#Mouse_wheel_behavior} for more info\n\t * @since 5.2.11\n\t */\n\twheelZoomPositionY?: number;\n\n}\n\nexport interface IXYChartPrivate extends ISerialChartPrivate {\n\n\t/**\n\t * A list of [[Series]] that currently have their tooltip being displayed.\n\t */\n\ttooltipSeries?: Array<XYSeries>\n\n\t/**\n\t * Array of other [[XYChart]] objects that cursors should be synced with.\n\t *\n\t * Note: cursors will be synced across the vertically stacked charts only.\n\t */\n\totherCharts?: Array<XYChart>\n\n}\n\n\nexport interface IXYChartEvents extends ISerialChartEvents {\n\n\t/**\n\t * Invoked when panning starts.\n\t *\n\t * @since 5.0.4\n\t */\n\tpanstarted: {\n\t\toriginalEvent: IPointerEvent\n\t};\n\n\t/**\n\t * Invoked when panning ends.\n\t *\n\t * @since 5.0.4\n\t */\n\tpanended: {\n\t\toriginalEvent: IPointerEvent\n\t};\n\n\t/**\n\t * Invoked if pointer is pressed down on a chart and released without moving.\n\t *\n\t * `panended` event will still kick in after that.\n\t *\n\t * @since 5.2.19\n\t */\n\tpancancelled: {\n\t\toriginalEvent: IPointerEvent\n\t};\n\n\t/**\n\t * Invoked when wheel caused zoom ends.\n\t *\n\t * @since 5.0.4\n\t */\n\twheelended: {};\n\n}\n\n/**\n * Creates an XY chart.\n *\n * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/} for more info\n * @important\n */\nexport class XYChart extends SerialChart {\n\n\tpublic static className: string = \"XYChart\";\n\tpublic static classNames: Array<string> = SerialChart.classNames.concat([XYChart.className]);\n\n\tdeclare public _settings: IXYChartSettings;\n\tdeclare public _privateSettings: IXYChartPrivate;\n\tdeclare public _seriesType: XYSeries;\n\tdeclare public _events: IXYChartEvents;\n\n\t/**\n\t * A list of horizontal axes.\n\t */\n\tpublic readonly xAxes: ListAutoDispose<Axis<AxisRenderer>> = new ListAutoDispose();\n\n\t/**\n\t * A list of vertical axes.\n\t */\n\tpublic readonly yAxes: ListAutoDispose<Axis<AxisRenderer>> = new ListAutoDispose();\n\n\t/**\n\t * A [[Container]] located on top of the chart, used to store top horizontal\n\t * axes.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/xy-chart-containers/} for more info\n\t * @default Container.new()\n\t */\n\tpublic readonly topAxesContainer: Container = this.chartContainer.children.push(Container.new(this._root, { width: p100, layout: this._root.verticalLayout }));\n\n\t/**\n\t * A [[Container]] located in the middle the chart, used to store vertical axes\n\t * and plot area container.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/xy-chart-containers/} for more info\n\t * @default Container.new()\n\t */\n\tpublic readonly yAxesAndPlotContainer: Container = this.chartContainer.children.push(Container.new(this._root, { width: p100, height: p100, layout: this._root.horizontalLayout }));\n\n\t/**\n\t * A [[Container]] located on bottom of the chart, used to store bottom\n\t * horizontal axes.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/xy-chart-containers/} for more info\n\t * @default Container.new()\n\t */\n\tpublic readonly bottomAxesContainer: Container = this.chartContainer.children.push(Container.new(this._root, { width: p100, layout: this._root.verticalLayout }));\n\n\t/**\n\t * A [[Container]] located on left of the chart, used to store left-hand\n\t * vertical axes.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/xy-chart-containers/} for more info\n\t * @default Container.new()\n\t */\n\tpublic readonly leftAxesContainer: Container = this.yAxesAndPlotContainer.children.push(Container.new(this._root, { height: p100, layout: this._root.horizontalLayout }));\n\n\t/**\n\t * A [[Container]] located in the middle of the chart, used to store plotContainer and topPlotContainer\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/xy-chart-containers/} for more info\n\t * @default Container.new()\n\t */\n\tpublic readonly plotsContainer: Container = this.yAxesAndPlotContainer.children.push(Container.new(this._root, { width: p100, height: p100, maskContent: false }));\n\n\t/**\n\t * A [[Container]] located in the middle of the chart, used to store actual\n\t * plots (series).\n\t *\n\t * NOTE: `plotContainer` will automatically have its `background` preset. If\n\t * you need to modify background or outline for chart's plot area, you can\n\t * use `plotContainer.get(\"background\")` for that.*\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/xy-chart-containers/} for more info\n\t * @default Container.new()\n\t */\n\tpublic readonly plotContainer: Container = this.plotsContainer.children.push(Container.new(this._root, { width: p100, height: p100 }));\n\n\t/**\n\t * A [[Container]] used for any elements that need to be displayed over\n\t * regular `plotContainer`.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/xy-chart-containers/} for more info\n\t * @default Container.new()\n\t */\n\tpublic readonly topPlotContainer: Container = this.plotsContainer.children.push(Container.new(this._root, { width: p100, height: p100 }));\n\n\t/**\n\t * A [[Container]] axis grid elements are stored in.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/xy-chart-containers/} for more info\n\t * @default Container.new()\n\t */\n\tpublic readonly gridContainer: Container = this.plotContainer.children.push(Container.new(this._root, { width: p100, height: p100, isMeasured: false }));\n\n\t/**\n\t * A [[Container]] axis background grid elements are stored in.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/xy-chart-containers/} for more info\n\t * @default Container.new()\n\t */\n\tpublic readonly topGridContainer: Container = Container.new(this._root, { width: p100, height: p100, isMeasured: false });\n\n\t/**\n\t * A [[Container]] located on right of the chart, used to store right-hand\n\t * vertical axes.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/xy-chart-containers/} for more info\n\t * @default Container.new()\n\t */\n\tpublic readonly rightAxesContainer: Container = this.yAxesAndPlotContainer.children.push(Container.new(this._root, { height: p100, layout: this._root.horizontalLayout }));\n\n\t/**\n\t * A [[Container]] axis headers are stored in.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/axis-headers/} for more info\n\t * @default Container.new()\n\t */\n\tpublic readonly axisHeadersContainer: Container = this.plotContainer.children.push(Container.new(this._root, {}));\n\n\t/**\n\t * A button that is shown when chart is not fully zoomed out.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/zoom-and-pan/#Zoom_out_button} for more info\n\t * @default Button.new()\n\t */\n\tpublic readonly zoomOutButton: Button = this.topPlotContainer.children.push(Button.new(this._root, {\n\t\tthemeTags: [\"zoom\"],\n\t\ticon: Graphics.new(this._root, {\n\t\t\tthemeTags: [\"button\", \"icon\"]\n\t\t})\n\t}));\n\n\tpublic _movePoint: IPoint = { x: 0, y: 0 };\n\n\tprotected _wheelDp: IDisposer | undefined;\n\n\tpublic _otherCharts?: Array<XYChart>;\n\n\tprotected _movePoints: { [index: number]: IPoint } = {};\n\n\tprotected _downStartX?: number;\n\tprotected _downEndX?: number;\n\n\tprotected _downStartY?: number;\n\tprotected _downEndY?: number;\n\n\tprotected _afterNew() {\n\t\tthis._defaultThemes.push(XYChartDefaultTheme.new(this._root));\n\n\t\tsuper._afterNew();\n\n\t\tthis._disposers.push(this.xAxes);\n\t\tthis._disposers.push(this.yAxes);\n\n\t\tconst root = this._root;\n\n\t\tlet verticalLayout = this._root.verticalLayout;\n\n\t\tconst zoomOutButton = this.zoomOutButton;\n\t\tzoomOutButton.events.on(\"click\", () => {\n\t\t\tthis.zoomOut();\n\t\t})\n\t\tzoomOutButton.hide(0);\n\t\tzoomOutButton.states.lookup(\"default\")!.set(\"opacity\", 1);\n\n\t\tthis.chartContainer.set(\"layout\", verticalLayout);\n\n\t\tconst plotContainer = this.plotContainer;\n\t\tplotContainer.children.push(this.seriesContainer);\n\n\t\tthis._disposers.push(this._processAxis(this.xAxes, this.bottomAxesContainer));\n\t\tthis._disposers.push(this._processAxis(this.yAxes, this.leftAxesContainer));\n\n\n\t\tplotContainer.children.push(this.topGridContainer);\n\t\tplotContainer.children.push(this.bulletsContainer);\n\n\t\t// Setting trasnparent background so that full body of the plot container\n\t\t// is interactive\n\t\tplotContainer.set(\"interactive\", true);\n\t\tplotContainer.set(\"interactiveChildren\", false);\n\t\tplotContainer.set(\"background\", Rectangle.new(root, {\n\t\t\tthemeTags: [\"plotbackground\", \"xy\", \"background\"]\n\t\t}));\n\n\t\tthis._disposers.push(plotContainer.events.on(\"pointerdown\", (event) => {\n\t\t\tthis._handlePlotDown(event);\n\t\t}));\n\n\t\tthis._disposers.push(plotContainer.events.on(\"globalpointerup\", (event) => {\n\t\t\tthis._handlePlotUp(event);\n\t\t}));\n\n\t\tthis._disposers.push(plotContainer.events.on(\"globalpointermove\", (event) => {\n\t\t\tthis._handlePlotMove(event);\n\t\t}));\n\n\t\tthis._maskGrid();\n\t\tthis._setUpTouch();\n\t}\n\n\tpublic _beforeChanged() {\n\t\tsuper._beforeChanged();\n\n\t\tif (this.isDirty(\"pinchZoomX\") || this.isDirty(\"pinchZoomY\") || this.get(\"panX\") || this.get(\"panY\")) {\n\t\t\tthis._setUpTouch();\n\t\t}\n\n\t}\n\n\tprotected _setUpTouch(): void {\n\t\tif (!this.plotContainer._display.cancelTouch) {\n\t\t\tthis.plotContainer._display.cancelTouch = (this.get(\"pinchZoomX\") || this.get(\"pinchZoomY\") || this.get(\"panX\") || this.get(\"panY\")) ? true : false;\n\t\t}\n\t}\n\n\tprotected _maskGrid() {\n\t\tthis.gridContainer.set(\"maskContent\", true);\n\t\tthis.topGridContainer.set(\"maskContent\", true);\n\t}\n\n\tprotected _removeSeries(series: this[\"_seriesType\"]) {\n\t\tseries._unstack();\n\n\t\tif (series._posXDp) {\n\t\t\tseries._posXDp.dispose();\n\t\t}\n\n\t\tif (series._posYDp) {\n\t\t\tseries._posYDp.dispose();\n\t\t}\n\n\t\tseries.set(\"baseAxis\", undefined);\n\n\t\tconst xAxis = series.get(\"xAxis\");\n\t\tif (xAxis) {\n\t\t\t$array.remove(xAxis.series, series);\n\t\t\txAxis.markDirtyExtremes();\n\t\t}\n\t\tconst yAxis = series.get(\"yAxis\");\n\t\tif (yAxis) {\n\t\t\t$array.remove(yAxis.series, series);\n\t\t\tyAxis.markDirtyExtremes();\n\t\t}\n\n\t\tconst cursor = this.get(\"cursor\");\n\t\tif (cursor) {\n\t\t\tconst snapToSeries = cursor.get(\"snapToSeries\");\n\t\t\tif (snapToSeries) {\n\t\t\t\t$array.remove(snapToSeries, series);\n\t\t\t}\n\t\t}\n\n\t\tsuper._removeSeries(series);\n\t}\n\n\t/**\n\t * This method is invoked when mouse wheel is used over chart's plot\n\t * container, and handles zooming/pan.\n\t *\n\t * You can invoke this method manually, if you need to mimic chart's wheel\n\t * behavior over other elements of the chart.\n\t */\n\tpublic handleWheel(event: { originalEvent: WheelEvent, point: IPoint, target: Container }) {\n\t\tconst wheelX = this.get(\"wheelX\");\n\t\tconst wheelY = this.get(\"wheelY\");\n\t\tconst plotContainer = this.plotContainer;\n\n\t\tconst wheelEvent = event.originalEvent;\n\n\t\t// Ignore wheel event if it is happening on a non-chart element, e.g. if\n\t\t// some page element is over the chart.\n\t\tlet prevent = false;\n\t\tif ($utils.isLocalEvent(wheelEvent, this)) {\n\t\t\tprevent = true;\n\t\t}\n\t\telse {\n\t\t\treturn;\n\t\t}\n\n\t\tconst plotPoint = plotContainer.toLocal(event.point);\n\t\tconst wheelStep = this.get(\"wheelStep\", 0.2);\n\n\t\tconst shiftY = wheelEvent.deltaY / 100;\n\t\tconst shiftX = wheelEvent.deltaX / 100;\n\n\t\tconst wheelZoomPositionX = this.get(\"wheelZoomPositionX\");\n\t\tconst wheelZoomPositionY = this.get(\"wheelZoomPositionY\");\n\n\n\t\tif ((wheelX === \"zoomX\" || wheelX === \"zoomXY\") && shiftX != 0) {\n\t\t\tthis.xAxes.each((axis) => {\n\t\t\t\tif (axis.get(\"zoomX\")) {\n\t\t\t\t\tlet start = axis.get(\"start\")!;\n\t\t\t\t\tlet end = axis.get(\"end\")!;\n\n\t\t\t\t\tlet position = axis.fixPosition(plotPoint.x / plotContainer.width());\n\n\t\t\t\t\tif (wheelZoomPositionX != null) {\n\t\t\t\t\t\tposition = wheelZoomPositionX;\n\t\t\t\t\t}\n\n\t\t\t\t\tlet maxDeviation = axis.get(\"maxDeviation\", 0);\n\n\t\t\t\t\tlet newStart = Math.min(1 + maxDeviation, Math.max(-maxDeviation, start - wheelStep * (end - start) * shiftX * position));\n\t\t\t\t\tlet newEnd = Math.max(-maxDeviation, Math.min(1 + maxDeviation, end + wheelStep * (end - start) * shiftX * (1 - position)));\n\n\t\t\t\t\tif (newStart == start && newEnd == end) {\n\t\t\t\t\t\tprevent = false;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (1 / (newEnd - newStart) < axis.getPrivate(\"maxZoomFactor\", Infinity) / axis.get(\"minZoomCount\", 1)) {\n\t\t\t\t\t\tthis._handleWheelAnimation(axis.zoom(newStart, newEnd));\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tprevent = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\n\t\tif ((wheelY === \"zoomX\" || wheelY === \"zoomXY\") && shiftY != 0) {\n\t\t\tthis.xAxes.each((axis) => {\n\t\t\t\tif (axis.get(\"zoomX\")) {\n\t\t\t\t\tlet start = axis.get(\"start\")!;\n\t\t\t\t\tlet end = axis.get(\"end\")!;\n\n\t\t\t\t\tlet position = axis.fixPosition(plotPoint.x / plotContainer.width());\n\n\t\t\t\t\tif (wheelZoomPositionX != null) {\n\t\t\t\t\t\tposition = wheelZoomPositionX;\n\t\t\t\t\t}\n\n\t\t\t\t\tlet maxDeviation = axis.get(\"maxDeviation\", 0);\n\n\t\t\t\t\tlet newStart = Math.min(1 + maxDeviation, Math.max(-maxDeviation, start - wheelStep * (end - start) * shiftY * position));\n\t\t\t\t\tlet newEnd = Math.max(-maxDeviation, Math.min(1 + maxDeviation, end + wheelStep * (end - start) * shiftY * (1 - position)));\n\n\t\t\t\t\tif (newStart == start && newEnd == end) {\n\t\t\t\t\t\tprevent = false;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (1 / (newEnd - newStart) < axis.getPrivate(\"maxZoomFactor\", Infinity) / axis.get(\"minZoomCount\", 1)) {\n\t\t\t\t\t\tthis._handleWheelAnimation(axis.zoom(newStart, newEnd));\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tprevent = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\n\n\t\tif ((wheelX === \"zoomY\" || wheelX === \"zoomXY\") && shiftX != 0) {\n\t\t\tthis.yAxes.each((axis) => {\n\t\t\t\tif (axis.get(\"zoomY\")) {\n\t\t\t\t\tlet start = axis.get(\"start\")!;\n\t\t\t\t\tlet end = axis.get(\"end\")!;\n\n\t\t\t\t\tlet position = axis.fixPosition(plotPoint.y / plotContainer.height());\n\n\t\t\t\t\tif (wheelZoomPositionY != null) {\n\t\t\t\t\t\tposition = wheelZoomPositionY;\n\t\t\t\t\t}\n\n\t\t\t\t\tlet maxDeviation = axis.get(\"maxDeviation\", 0);\n\n\t\t\t\t\tlet newStart = Math.min(1 + maxDeviation, Math.max(-maxDeviation, start - wheelStep * (end - start) * shiftX * position));\n\t\t\t\t\tlet newEnd = Math.max(-maxDeviation, Math.min(1 + maxDeviation, end + wheelStep * (end - start) * shiftX * (1 - position)));\n\n\t\t\t\t\tif (newStart == start && newEnd == end) {\n\t\t\t\t\t\tprevent = false;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (1 / (newEnd - newStart) < axis.getPrivate(\"maxZoomFactor\", Infinity) / axis.get(\"minZoomCount\", 1)) {\n\t\t\t\t\t\tthis._handleWheelAnimation(axis.zoom(newStart, newEnd));\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tprevent = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\n\t\tif ((wheelY === \"zoomY\" || wheelY === \"zoomXY\") && shiftY != 0) {\n\t\t\tthis.yAxes.each((axis) => {\n\t\t\t\tif (axis.get(\"zoomY\")) {\n\t\t\t\t\tlet start = axis.get(\"start\")!;\n\t\t\t\t\tlet end = axis.get(\"end\")!;\n\n\t\t\t\t\tlet position = axis.fixPosition(plotPoint.y / plotContainer.height());\n\n\t\t\t\t\tif (wheelZoomPositionY != null) {\n\t\t\t\t\t\tposition = wheelZoomPositionY;\n\t\t\t\t\t}\n\n\t\t\t\t\tlet maxDeviation = axis.get(\"maxDeviation\", 0);\n\n\t\t\t\t\tlet newStart = Math.min(1 + maxDeviation, Math.max(-maxDeviation, start - wheelStep * (end - start) * shiftY * position));\n\t\t\t\t\tlet newEnd = Math.max(-maxDeviation, Math.min(1 + maxDeviation, end + wheelStep * (end - start) * shiftY * (1 - position)));\n\n\t\t\t\t\tif (newStart == start && newEnd == end) {\n\t\t\t\t\t\tprevent = false;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (1 / (newEnd - newStart) < axis.getPrivate(\"maxZoomFactor\", Infinity) / axis.get(\"minZoomCount\", 1)) {\n\t\t\t\t\t\tthis._handleWheelAnimation(axis.zoom(newStart, newEnd));\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tprevent = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\n\n\t\tif ((wheelX === \"panX\" || wheelX === \"panXY\") && shiftX != 0) {\n\t\t\tthis.xAxes.each((axis) => {\n\t\t\t\tif (axis.get(\"panX\")) {\n\t\t\t\t\tlet start = axis.get(\"start\")!;\n\t\t\t\t\tlet end = axis.get(\"end\")!;\n\n\t\t\t\t\tlet delta = this._getWheelSign(axis) * wheelStep * (end - start) * shiftX;\n\t\t\t\t\tlet newStart = start + delta;\n\t\t\t\t\tlet newEnd = end + delta;\n\n\t\t\t\t\tlet se = this._fixWheel(newStart, newEnd);\n\t\t\t\t\tnewStart = se[0];\n\t\t\t\t\tnewEnd = se[1];\n\n\t\t\t\t\tif (newStart == start && newEnd == end) {\n\t\t\t\t\t\tprevent = false;\n\t\t\t\t\t}\n\n\t\t\t\t\tthis._handleWheelAnimation(axis.zoom(newStart, newEnd));\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\n\t\tif ((wheelY === \"panX\" || wheelY === \"panXY\") && shiftY != 0) {\n\t\t\tthis.xAxes.each((axis) => {\n\t\t\t\tif (axis.get(\"panX\")) {\n\t\t\t\t\tlet start = axis.get(\"start\")!;\n\t\t\t\t\tlet end = axis.get(\"end\")!;\n\n\t\t\t\t\tlet delta = this._getWheelSign(axis) * wheelStep * (end - start) * shiftY;\n\t\t\t\t\tlet newStart = start + delta;\n\t\t\t\t\tlet newEnd = end + delta;\n\n\t\t\t\t\tlet se = this._fixWheel(newStart, newEnd);\n\t\t\t\t\tnewStart = se[0];\n\t\t\t\t\tnewEnd = se[1];\n\n\t\t\t\t\tif (newStart == start && newEnd == end) {\n\t\t\t\t\t\tprevent = false;\n\t\t\t\t\t}\n\n\t\t\t\t\tthis._handleWheelAnimation(axis.zoom(newStart, newEnd));\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\n\t\tif ((wheelX === \"panY\" || wheelX === \"panXY\") && shiftX != 0) {\n\t\t\tthis.yAxes.each((axis) => {\n\t\t\t\tif (axis.get(\"panY\")) {\n\t\t\t\t\tlet start = axis.get(\"start\")!;\n\t\t\t\t\tlet end = axis.get(\"end\")!;\n\n\t\t\t\t\tlet delta = this._getWheelSign(axis) * wheelStep * (end - start) * shiftX;\n\t\t\t\t\tlet newStart = start + delta;\n\t\t\t\t\tlet newEnd = end + delta;\n\n\t\t\t\t\tlet se = this._fixWheel(newStart, newEnd);\n\t\t\t\t\tnewStart = se[0];\n\t\t\t\t\tnewEnd = se[1];\n\n\t\t\t\t\tif (newStart == start && newEnd == end) {\n\t\t\t\t\t\tprevent = false;\n\t\t\t\t\t}\n\n\t\t\t\t\tthis._handleWheelAnimation(axis.zoom(newStart, newEnd));\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\n\t\tif ((wheelY === \"panY\" || wheelY === \"panXY\") && shiftY != 0) {\n\t\t\tthis.yAxes.each((axis) => {\n\t\t\t\tif (axis.get(\"panY\")) {\n\t\t\t\t\tlet start = axis.get(\"start\")!;\n\t\t\t\t\tlet end = axis.get(\"end\")!;\n\n\t\t\t\t\tlet delta = this._getWheelSign(axis) * wheelStep * (end - start) * shiftY;\n\t\t\t\t\tlet newStart = start - delta;\n\t\t\t\t\tlet newEnd = end - delta;\n\n\t\t\t\t\tlet se = this._fixWheel(newStart, newEnd);\n\t\t\t\t\tnewStart = se[0];\n\t\t\t\t\tnewEnd = se[1];\n\n\t\t\t\t\tif (newStart == start && newEnd == end) {\n\t\t\t\t\t\tprevent = false;\n\t\t\t\t\t}\n\n\t\t\t\t\tthis._handleWheelAnimation(axis.zoom(newStart, newEnd));\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\n\t\tif (prevent) {\n\t\t\twheelEvent.preventDefault();\n\t\t}\n\t}\n\n\tprotected _handleSetWheel() {\n\t\tconst wheelX = this.get(\"wheelX\");\n\t\tconst wheelY = this.get(\"wheelY\");\n\t\tconst plotContainer = this.plotContainer;\n\n\t\tif (wheelX !== \"none\" || wheelY !== \"none\") {\n\t\t\tthis._wheelDp = plotContainer.events.on(\"wheel\", (event) => {\n\t\t\t\tconst wheelEvent = event.originalEvent;\n\t\t\t\tif ((wheelX !== \"none\" && Math.abs(wheelEvent.deltaX) != 0) || (wheelY !== \"none\" && Math.abs(wheelEvent.deltaY) != 0)) {\n\t\t\t\t\tthis.handleWheel(event);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tthis._disposers.push(this._wheelDp);\n\t\t}\n\t\telse {\n\t\t\tif (this._wheelDp) {\n\t\t\t\tthis._wheelDp.dispose();\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected _getWheelSign(axis: Axis<AxisRenderer>) {\n\t\tlet sign = 1;\n\t\tif (axis.get(\"renderer\").get(\"inversed\")) {\n\t\t\tsign = -1;\n\t\t}\n\n\t\treturn sign\n\t}\n\n\tprotected _fixWheel(start: number, end: number): [number, number] {\n\t\tconst diff = end - start;\n\t\tif (start < 0) {\n\t\t\tstart = 0;\n\t\t\tend = start + diff;\n\t\t}\n\t\tif (end > 1) {\n\t\t\tend = 1;\n\t\t\tstart = end - diff;\n\t\t}\n\n\t\treturn [start, end];\n\t}\n\n\tprotected _handlePlotDown(event: ISpritePointerEvent) {\n\t\tconst originalEvent = event.originalEvent as any;\n\n\t\tif (originalEvent.button == 2) {\n\t\t\treturn;\n\t\t}\n\t\tconst plotContainer = this.plotContainer;\n\t\tlet local = plotContainer.toLocal(event.point);\n\n\t\tif (this.get(\"pinchZoomX\") || this.get(\"pinchZoomY\")) {\n\t\t\tconst pointerId = originalEvent.pointerId;\n\n\t\t\tif (pointerId) {\n\n\t\t\t\tif ($object.keys(plotContainer._downPoints).length > 0) {\n\t\t\t\t\tconst xAxis = this.xAxes.getIndex(0);\n\t\t\t\t\tconst yAxis = this.yAxes.getIndex(0);\n\n\n\t\t\t\t\tif (xAxis) {\n\t\t\t\t\t\tthis._downStartX = xAxis.get(\"start\", 0);\n\t\t\t\t\t\tthis._downEndX = xAxis.get(\"end\", 1);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (yAxis) {\n\t\t\t\t\t\tthis._downStartY = yAxis.get(\"start\", 0);\n\t\t\t\t\t\tthis._downEndY = yAxis.get(\"end\", 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (this.get(\"panX\") || this.get(\"panY\")) {\n\n\t\t\tif (local.x >= 0 && local.y >= 0 && local.x <= plotContainer.width() && local.y <= this.height()) {\n\t\t\t\t//this._downPoint = local;\n\t\t\t\tthis._downPoint = { x: originalEvent.clientX, y: originalEvent.clientY };\n\n\t\t\t\tconst panX = this.get(\"panX\");\n\t\t\t\tconst panY = this.get(\"panY\");\n\n\t\t\t\tif (panX) {\n\t\t\t\t\tthis.xAxes.each((axis) => {\n\t\t\t\t\t\taxis._panStart = axis.get(\"start\")!;\n\t\t\t\t\t\taxis._panEnd = axis.get(\"end\")!;\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t\tif (panY) {\n\t\t\t\t\tthis.yAxes.each((axis) => {\n\t\t\t\t\t\taxis._panStart = axis.get(\"start\")!;\n\t\t\t\t\t\taxis._panEnd = axis.get(\"end\")!;\n\t\t\t\t\t})\n\t\t\t\t}\n\n\t\t\t\tconst eventType = \"panstarted\";\n\t\t\t\tif (this.events.isEnabled(eventType)) {\n\t\t\t\t\tthis.events.dispatch(eventType, { type: eventType, target: this, originalEvent: event.originalEvent });\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected _handleWheelAnimation(animation?: Animation<any>) {\n\t\tif (animation) {\n\t\t\tanimation.events.on(\"stopped\", () => {\n\t\t\t\tthis._dispatchWheelAnimation();\n\t\t\t})\n\t\t}\n\t\telse {\n\t\t\tthis._dispatchWheelAnimation();\n\t\t}\n\t}\n\n\tprotected _dispatchWheelAnimation() {\n\t\tconst eventType = \"wheelended\";\n\t\tif (this.events.isEnabled(eventType)) {\n\t\t\tthis.events.dispatch(eventType, { type: eventType, target: this });\n\t\t}\n\t}\n\n\tprotected _handlePlotUp(event: ISpritePointerEvent) {\n\t\tconst downPoint = this._downPoint;\n\t\tif (downPoint) {\n\t\t\tif (this.get(\"panX\") || this.get(\"panY\")) {\n\t\t\t\tif (event.originalEvent.clientX == downPoint.x && event.originalEvent.clientY == downPoint.y) {\n\t\t\t\t\tconst eventType = \"pancancelled\";\n\t\t\t\t\tif (this.events.isEnabled(eventType)) {\n\t\t\t\t\t\tthis.events.dispatch(eventType, { type: eventType, target: this, originalEvent: event.originalEvent });\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tconst eventType = \"panended\";\n\t\t\t\tif (this.events.isEnabled(eventType)) {\n\t\t\t\t\tthis.events.dispatch(eventType, { type: eventType, target: this, originalEvent: event.originalEvent });\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// TODO: handle multitouch\n\t\tthis._downPoint = undefined;\n\t\tthis.xAxes.each((xAxis) => {\n\t\t\txAxis._isPanning = false;\n\t\t})\n\t\tthis.yAxes.each((yAxis) => {\n\t\t\tyAxis._isPanning = false;\n\t\t})\n\t}\n\n\tprotected _handlePlotMove(event: ISpritePointerEvent) {\n\t\tconst plotContainer = this.plotContainer;\n\n\t\tif (this.get(\"pinchZoomX\") || this.get(\"pinchZoomY\")) {\n\t\t\tconst touchEvent = event.originalEvent as any;\n\t\t\tconst pointerId = touchEvent.pointerId;\n\n\t\t\tif (pointerId) {\n\t\t\t\tthis._movePoints[pointerId] = event.point;\n\n\t\t\t\tif ($object.keys(plotContainer._downPoints).length > 1) {\n\t\t\t\t\tthis._handlePinch();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tlet downPoint = this._downPoint!;\n\n\t\tif (downPoint) {\n\n\t\t\tdownPoint = plotContainer.toLocal(this._root.documentPointToRoot(downPoint));\n\t\t\tlet local = plotContainer.toLocal(event.point);\n\n\t\t\tconst panX = this.get(\"panX\");\n\t\t\tconst panY = this.get(\"panY\");\n\n\t\t\tif (panX) {\n\n\t\t\t\tlet scrollbarX = this.get(\"scrollbarX\");\n\t\t\t\tif (scrollbarX) {\n\t\t\t\t\tscrollbarX.events.disableType(\"rangechanged\");\n\t\t\t\t}\n\n\t\t\t\tthis.xAxes.each((axis) => {\n\t\t\t\t\tif (axis.get(\"panX\")) {\n\t\t\t\t\t\taxis._isPanning = true;\n\t\t\t\t\t\t//const maxDeviation = axis.get(\"maxDeviation\", 0);\n\t\t\t\t\t\tlet panStart = axis._panStart;\n\t\t\t\t\t\tlet panEnd = axis._panEnd;\n\t\t\t\t\t\tlet difference = (panEnd - panStart);\n\t\t\t\t\t\tlet deltaX = difference * (downPoint.x - local.x) / plotContainer.width();\n\n\t\t\t\t\t\tif (axis.get(\"renderer\").get(\"inversed\")) {\n\t\t\t\t\t\t\tdeltaX *= -1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlet start = panStart + deltaX;\n\t\t\t\t\t\tlet end = panEnd + deltaX;\n\n\t\t\t\t\t\tif (end - start < 1 + axis.get(\"maxDeviation\", 1) * 2) {\n\t\t\t\t\t\t\taxis.set(\"start\", start);\n\t\t\t\t\t\t\taxis.set(\"end\", end);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\tif (scrollbarX) {\n\t\t\t\t\tscrollbarX.events.enableType(\"rangechanged\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (panY) {\n\n\t\t\t\tlet scrollbarY = this.get(\"scrollbarY\");\n\t\t\t\tif (scrollbarY) {\n\t\t\t\t\tscrollbarY.events.disableType(\"rangechanged\");\n\t\t\t\t}\n\n\t\t\t\tthis.yAxes.each((axis) => {\n\t\t\t\t\tif (axis.get(\"panY\")) {\n\t\t\t\t\t\taxis._isPanning = true;\n\t\t\t\t\t\t//const maxDeviation = axis.get(\"maxDeviation\", 0);\n\n\t\t\t\t\t\tlet panStart = axis._panStart;\n\t\t\t\t\t\tlet panEnd = axis._panEnd;\n\t\t\t\t\t\tlet difference = (panEnd - panStart);\n\t\t\t\t\t\tlet deltaY = difference * (downPoint.y - local.y) / plotContainer.height();\n\t\t\t\t\t\tif (axis.get(\"renderer\").get(\"inversed\")) {\n\t\t\t\t\t\t\tdeltaY *= -1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlet start = panStart - deltaY;\n\t\t\t\t\t\tlet end = panEnd - deltaY;\n\n\t\t\t\t\t\tif (end - start < 1 + axis.get(\"maxDeviation\", 1) * 2) {\n\t\t\t\t\t\t\taxis.set(\"start\", start);\n\t\t\t\t\t\t\taxis.set(\"end\", end);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\n\t\t\t\tif (scrollbarY) {\n\t\t\t\t\tscrollbarY.events.enableType(\"rangechanged\");\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t}\n\t}\n\n\tprotected _handlePinch() {\n\t\tconst plotContainer = this.plotContainer;\n\t\tlet i = 0;\n\t\tlet downPoints: Array<IPoint> = [];\n\t\tlet movePoints: Array<IPoint> = [];\n\n\t\t$object.each(plotContainer._downPoints, (k, point) => {\n\t\t\tdownPoints[i] = point;\n\t\t\tlet movePoint = this._movePoints[k];\n\t\t\tif (movePoint) {\n\t\t\t\tmovePoints[i] = movePoint;\n\t\t\t}\n\t\t\ti++;\n\t\t});\n\n\t\tif (downPoints.length > 1 && movePoints.length > 1) {\n\t\t\tconst w = plotContainer.width();\n\t\t\tconst h = plotContainer.height();\n\n\t\t\tlet downPoint0 = downPoints[0];\n\t\t\tlet downPoint1 = downPoints[1];\n\n\t\t\tlet movePoint0 = movePoints[0];\n\t\t\tlet movePoint1 = movePoints[1];\n\n\t\t\tif (downPoint0 && downPoint1 && movePoint0 && movePoint1) {\n\n\t\t\t\tmovePoint0 = plotContainer.toLocal(movePoint0)\n\t\t\t\tmovePoint1 = plotContainer.toLocal(movePoint1)\n\n\t\t\t\tdownPoint0 = plotContainer.toLocal(downPoint0)\n\t\t\t\tdownPoint1 = plotContainer.toLocal(downPoint1)\n\n\t\t\t\tif (this.get(\"pinchZoomX\")) {\n\t\t\t\t\tconst downStartX = this._downStartX;\n\t\t\t\t\tconst downEndX = this._downEndX;\n\n\t\t\t\t\tif (downStartX != null && downEndX != null) {\n\n\t\t\t\t\t\tif (downPoint0.x > downPoint1.x) {\n\t\t\t\t\t\t\t[downPoint0, downPoint1] = [downPoint1, downPoint0];\n\t\t\t\t\t\t\t[movePoint0, movePoint1] = [movePoint1, movePoint0];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlet downPos0 = downStartX + (downPoint0.x / w) * (downEndX - downStartX);\n\t\t\t\t\t\tlet downPos1 = downStartX + (downPoint1.x / w) * (downEndX - downStartX);\n\n\t\t\t\t\t\tlet movePos0 = downStartX + (movePoint0.x / w) * (downEndX - downStartX);\n\t\t\t\t\t\tlet movePos1 = downStartX + (movePoint1.x / w) * (downEndX - downStartX);\n\n\t\t\t\t\t\tlet initialDistance = Math.max(0.001, downPos1 - downPos0);\n\t\t\t\t\t\tlet currentDistance = Math.max(0.001, movePos1 - movePos0);\n\n\n\t\t\t\t\t\tlet d = initialDistance / currentDistance;\n\n\t\t\t\t\t\tlet s = downStartX * d + downPos0 - movePos0 * d;\n\t\t\t\t\t\tlet e = downEndX * d + downPos1 - movePos1 * d;\n\n\t\t\t\t\t\tthis.xAxes.each((xAxis) => {\n\t\t\t\t\t\t\tlet sa = xAxis.fixPosition(s);\n\t\t\t\t\t\t\tlet ea = xAxis.fixPosition(e);\n\n\t\t\t\t\t\t\txAxis.zoom(sa, ea, 0);\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (this.get(\"pinchZoomY\")) {\n\t\t\t\t\tconst downStartY = this._downStartY;\n\t\t\t\t\tconst downEndY = this._downEndY;\n\n\t\t\t\t\tif (downStartY != null && downEndY != null) {\n\n\t\t\t\t\t\tif (downPoint0.y < downPoint1.y) {\n\t\t\t\t\t\t\t[downPoint0, downPoint1] = [downPoint1, downPoint0];\n\t\t\t\t\t\t\t[movePoint0, movePoint1] = [movePoint1, movePoint0];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlet downPos0 = downStartY + (1 - downPoint0.y / h) * (downEndY - downStartY);\n\t\t\t\t\t\tlet downPos1 = downStartY + (1 - downPoint1.y / h) * (downEndY - downStartY);\n\n\t\t\t\t\t\tlet movePos0 = downStartY + (1 - movePoint0.y / h) * (downEndY - downStartY);\n\t\t\t\t\t\tlet movePos1 = downStartY + (1 - movePoint1.y / h) * (downEndY - downStartY);\n\n\t\t\t\t\t\tlet initialDistance = Math.max(0.001, downPos1 - downPos0);\n\t\t\t\t\t\tlet currentDistance = Math.max(0.001, movePos1 - movePos0);\n\n\t\t\t\t\t\tlet d = initialDistance / currentDistance;\n\n\t\t\t\t\t\tlet s = downStartY * d + downPos0 - movePos0 * d;\n\t\t\t\t\t\tlet e = downEndY * d + downPos1 - movePos1 * d;\n\n\t\t\t\t\t\tthis.yAxes.each((yAxis) => {\n\n\t\t\t\t\t\t\tlet sa = yAxis.fixPosition(s);\n\t\t\t\t\t\t\tlet ea = yAxis.fixPosition(e);\n\n\t\t\t\t\t\t\tyAxis.zoom(sa, ea, 0);\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic _handleCursorPosition() {\n\t\tconst cursor = this.get(\"cursor\");\n\t\tif (cursor) {\n\t\t\tconst cursorPoint = cursor.getPrivate(\"point\");\n\n\t\t\tlet snapToSeries = cursor.get(\"snapToSeries\");\n\n\t\t\tif (cursor._downPoint) {\n\t\t\t\tsnapToSeries = undefined;\n\t\t\t}\n\n\t\t\tif (snapToSeries && cursorPoint) {\n\t\t\t\tconst snapToSeriesBy = cursor.get(\"snapToSeriesBy\");\n\t\t\t\tconst dataItems: Array<DataItem<IXYSeriesDataItem>> = [];\n\t\t\t\t$array.each(snapToSeries, (series) => {\n\t\t\t\t\tif (!series.isHidden() && !series.isHiding()) {\n\t\t\t\t\t\tif (snapToSeriesBy != \"x!\" && snapToSeriesBy != \"y!\") {\n\t\t\t\t\t\t\tconst startIndex = series.startIndex();\n\t\t\t\t\t\t\tconst endIndex = series.endIndex();\n\t\t\t\t\t\t\tfor (let i = startIndex; i < endIndex; i++) {\n\t\t\t\t\t\t\t\tconst dataItem = series.dataItems[i];\n\t\t\t\t\t\t\t\tif (dataItem && !dataItem.isHidden()) {\n\t\t\t\t\t\t\t\t\tdataItems.push(dataItem);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tconst tooltipDataItem = series.get(\"tooltipDataItem\");\n\t\t\t\t\t\t\tif (tooltipDataItem) {\n\t\t\t\t\t\t\t\tdataItems.push(tooltipDataItem);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\n\t\t\t\tlet minDistance = Infinity;\n\t\t\t\tlet closestItem: DataItem<IXYSeriesDataItem> | undefined;\n\n\t\t\t\t$array.each(dataItems, (dataItem) => {\n\t\t\t\t\tconst point = dataItem.get(\"point\");\n\n\t\t\t\t\tif (point) {\n\t\t\t\t\t\tlet distance = 0;\n\t\t\t\t\t\tif (snapToSeriesBy == \"x\" || snapToSeriesBy == \"x!\") {\n\t\t\t\t\t\t\tdistance = Math.abs(cursorPoint.x - point.x);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (snapToSeriesBy == \"y\" || snapToSeriesBy == \"y!\") {\n\t\t\t\t\t\t\tdistance = Math.abs(cursorPoint.y - point.y);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tdistance = Math.hypot(cursorPoint.x - point.x, cursorPoint.y - point.y);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (distance < minDistance) {\n\t\t\t\t\t\t\tminDistance = distance;\n\t\t\t\t\t\t\tclosestItem = dataItem;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\n\t\t\t\t$array.each(snapToSeries, (series) => {\n\t\t\t\t\tconst tooltip = series.get(\"tooltip\");\n\t\t\t\t\tif (tooltip) {\n\t\t\t\t\t\ttooltip._setDataItem(undefined);\n\t\t\t\t\t}\n\t\t\t\t})\n\n\t\t\t\tif (closestItem) {\n\t\t\t\t\tlet series = closestItem.component as XYSeries;\n\t\t\t\t\tseries.showDataItemTooltip(closestItem);\n\t\t\t\t\tseries.setRaw(\"tooltipDataItem\", closestItem);\n\n\t\t\t\t\tconst point = closestItem.get(\"point\");\n\t\t\t\t\tif (point) {\n\n\t\t\t\t\t\t// removing x and y to solve #72225\n\t\t\t\t\t\tcursor.handleMove(series.toGlobal({ x: point.x - series.x(), y: point.y - series.y() }), true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic _updateCursor() {\n\t\tlet cursor = this.get(\"cursor\");\n\t\tif (cursor) {\n\t\t\tcursor.updateCursor();\n\t\t}\n\t}\n\n\tprotected _addCursor(cursor: XYCursor) {\n\t\tthis.plotContainer.children.push(cursor);\n\t}\n\n\tpublic _prepareChildren() {\n\t\tsuper._prepareChildren();\n\n\t\tthis.series.each((series) => {\n\t\t\tthis._colorize(series);\n\t\t})\n\n\t\tif (this.isDirty(\"wheelX\") || this.isDirty(\"wheelY\")) {\n\t\t\tthis._handleSetWheel();\n\t\t}\n\n\t\tif (this.isDirty(\"cursor\")) {\n\t\t\tconst previous = this._prevSettings.cursor;\n\t\t\tconst cursor = this.get(\"cursor\")!;\n\t\t\tif (cursor !== previous) {\n\t\t\t\tthis._disposeProperty(\"cursor\");\n\t\t\t\tif (previous) {\n\t\t\t\t\tprevious.dispose();\n\t\t\t\t}\n\t\t\t\tif (cursor) {\n\t\t\t\t\tcursor._setChart(this);\n\t\t\t\t\tthis._addCursor(cursor);\n\n\t\t\t\t\tthis._pushPropertyDisposer(\"cursor\", cursor.events.on(\"selectended\", () => {\n\t\t\t\t\t\tthis._handleCursorSelectEnd();\n\t\t\t\t\t}))\n\t\t\t\t}\n\n\t\t\t\t//this.setRaw(\"cursor\", cursor) // to reset previous value\n\t\t\t\tthis._prevSettings.cursor = cursor;\n\t\t\t}\n\t\t}\n\n\t\tif (this.isDirty(\"scrollbarX\")) {\n\t\t\tconst previous = this._prevSettings.scrollbarX;\n\t\t\tconst scrollbarX = this.get(\"scrollbarX\")!;\n\t\t\tif (scrollbarX !== previous) {\n\t\t\t\tthis._disposeProperty(\"scrollbarX\");\n\t\t\t\tif (previous) {\n\t\t\t\t\tprevious.dispose();\n\t\t\t\t}\n\t\t\t\tif (scrollbarX) {\n\t\t\t\t\tif (!scrollbarX.parent) {\n\t\t\t\t\t\tthis.topAxesContainer.children.push(scrollbarX);\n\t\t\t\t\t}\n\n\t\t\t\t\tthis._pushPropertyDisposer(\"scrollbarX\", scrollbarX.events.on(\"rangechanged\", (e) => {\n\t\t\t\t\t\tthis._handleScrollbar(this.xAxes, e.start, e.end, e.grip);\n\t\t\t\t\t}))\n\n\t\t\t\t\tthis._pushPropertyDisposer(\"scrollbarX\", scrollbarX.events.on(\"released\", () => {\n\t\t\t\t\t\tthis.xAxes.each((axis) => {\n\t\t\t\t\t\t\tif (axis.get(\"zoomable\")) {\n\t\t\t\t\t\t\t\tthis._handleAxisSelection(axis);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t}))\n\n\t\t\t\t\t// Used to populate `ariaLabel` with meaningful values\n\t\t\t\t\tscrollbarX.setPrivate(\"positionTextFunction\", (position: number) => {\n\t\t\t\t\t\tconst axis = this.xAxes.getIndex(0);\n\t\t\t\t\t\treturn axis ? axis.getTooltipText(position, false) || \"\" : \"\";\n\t\t\t\t\t});\n\n\t\t\t\t}\n\n\t\t\t\tthis._prevSettings.scrollbarX = scrollbarX;\n\t\t\t}\n\t\t}\n\n\t\tif (this.isDirty(\"scrollbarY\")) {\n\t\t\tconst previous = this._prevSettings.scrollbarY;\n\t\t\tconst scrollbarY = this.get(\"scrollbarY\")!;\n\t\t\tif (scrollbarY !== previous) {\n\t\t\t\tthis._disposeProperty(\"scrollbarY\");\n\t\t\t\tif (previous) {\n\t\t\t\t\tprevious.dispose();\n\t\t\t\t}\n\t\t\t\tif (scrollbarY) {\n\t\t\t\t\tif (!scrollbarY.parent) {\n\t\t\t\t\t\tthis.rightAxesContainer.children.push(scrollbarY);\n\t\t\t\t\t}\n\n\t\t\t\t\tthis._pushPropertyDisposer(\"scrollbarY\", scrollbarY.events.on(\"rangechanged\", (e) => {\n\t\t\t\t\t\tthis._handleScrollbar(this.yAxes, e.start, e.end, e.grip);\n\t\t\t\t\t}))\n\n\t\t\t\t\tthis._pushPropertyDisposer(\"scrollbarY\", scrollbarY.events.on(\"released\", () => {\n\t\t\t\t\t\tthis.yAxes.each((axis) => {\n\t\t\t\t\t\t\tif (axis.get(\"zoomable\")) {\n\t\t\t\t\t\t\t\tthis._handleAxisSelection(axis);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t}))\n\n\t\t\t\t\t// Used to populate `ariaLabel` with meaningful values\n\t\t\t\t\tscrollbarY.setPrivate(\"positionTextFunction\", (position: number) => {\n\t\t\t\t\t\tconst axis = this.yAxes.getIndex(0);\n\t\t\t\t\t\treturn axis ? axis.getTooltipText(position, false) || \"\" : \"\";\n\t\t\t\t\t});\n\n\t\t\t\t}\n\t\t\t\tthis._prevSettings.scrollbarY = scrollbarY;\n\t\t\t}\n\t\t}\n\n\t\tthis._handleZoomOut();\n\t}\n\n\tprotected _processSeries(series: this[\"_seriesType\"]) {\n\t\tsuper._processSeries(series);\n\n\t\tconst xAxis = series.get(\"xAxis\");\n\t\tconst yAxis = series.get(\"yAxis\");\n\n\t\t$array.move(xAxis.series, series);\n\t\t$array.move(yAxis.series, series);\n\n\t\tseries._posXDp = series.addDisposer(xAxis.events.on(\"positionchanged\", () => {\n\t\t\tseries._fixPosition();\n\t\t}))\n\n\t\tseries._posXDp = series.addDisposer(yAxis.events.on(\"positionchanged\", () => {\n\t\t\tseries._fixPosition();\n\t\t}))\n\n\t\tif (!series.get(\"baseAxis\")) {\n\t\t\tif (yAxis.isType<CategoryAxis<any>>(\"CategoryAxis\") || yAxis.isType<DateAxis<any>>(\"DateAxis\")) {\n\t\t\t\tseries.set(\"baseAxis\", yAxis);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tseries.set(\"baseAxis\", xAxis);\n\t\t\t}\n\t\t}\n\n\t\tif (series.get(\"stacked\")) {\n\t\t\tseries._markDirtyKey(\"stacked\");\n\t\t\t$array.each(series.dataItems, (dataItem) => {\n\t\t\t\tdataItem.set(\"stackToItemY\", undefined);\n\t\t\t\tdataItem.set(\"stackToItemX\", undefined);\n\t\t\t})\n\t\t}\n\t\tseries._markDirtyAxes();\n\t\tyAxis.markDirtyExtremes();\n\t\txAxis.markDirtyExtremes();\n\t\txAxis._seriesAdded = true;\n\t\tyAxis._seriesAdded = true;\n\n\t\tthis._colorize(series);\n\t}\n\n\tprotected _colorize(series: this[\"_seriesType\"]) {\n\t\tconst colorSet = this.get(\"colors\")!;\n\t\tif (colorSet) {\n\t\t\tif (series.get(\"fill\") == null) {\n\t\t\t\tconst color = colorSet.next();\n\n\t\t\t\tseries._setSoft(\"stroke\", color);\n\t\t\t\tseries._setSoft(\"fill\", color);\n\t\t\t}\n\t\t}\n\t\tconst patternSet = this.get(\"patterns\")!;\n\t\tif (patternSet) {\n\t\t\tif (series.get(\"fillPattern\") == null) {\n\t\t\t\tconst pattern = patternSet.next();\n\n\t\t\t\tseries._setSoft(\"fillPattern\", pattern);\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected _handleCursorSelectEnd() {\n\t\tconst cursor = this.get(\"cursor\")!;\n\t\tconst behavior = cursor.get(\"behavior\");\n\n\t\tconst downPositionX = cursor.getPrivate(\"downPositionX\", 0);\n\t\tconst downPositionY = cursor.getPrivate(\"downPositionY\", 0);\n\n\t\tconst positionX = Math.min(1, Math.max(0, cursor.getPrivate(\"positionX\", 0.5)));\n\t\tconst positionY = Math.min(1, Math.max(0, cursor.getPrivate(\"positionY\", 0.5)));\n\n\t\tthis.xAxes.each((axis) => {\n\t\t\tif (behavior === \"zoomX\" || behavior === \"zoomXY\") {\n\t\t\t\tlet position0 = axis.toAxisPosition(downPositionX);\n\t\t\t\tlet position1 = axis.toAxisPosition(positionX);\n\t\t\t\taxis.zoom(position0, position1);\n\t\t\t}\n\t\t\taxis.setPrivate(\"updateScrollbar\", true);\n\t\t})\n\n\t\tthis.yAxes.each((axis) => {\n\t\t\tif (behavior === \"zoomY\" || behavior === \"zoomXY\") {\n\t\t\t\tlet position0 = axis.toAxisPosition(downPositionY);\n\t\t\t\tlet position1 = axis.toAxisPosition(positionY);\n\t\t\t\taxis.zoom(position0, position1);\n\t\t\t}\n\t\t\taxis.setPrivate(\"updateScrollbar\", true);\n\t\t})\n\t}\n\n\tprotected _handleScrollbar(axes: ListAutoDispose<Axis<any>>, start: number, end: number, priority?: \"start\" | \"end\") {\n\n\t\taxes.each((axis) => {\n\n\t\t\tlet axisStart = axis.fixPosition(start);\n\t\t\tlet axisEnd = axis.fixPosition(end);\n\n\t\t\tlet zoomAnimation = axis.zoom(axisStart, axisEnd, undefined, priority);\n\n\t\t\tconst updateScrollbar = \"updateScrollbar\";\n\t\t\taxis.setPrivateRaw(updateScrollbar, false);\n\n\t\t\tif (zoomAnimation) {\n\t\t\t\tzoomAnimation.events.on(\"stopped\", () => {\n\t\t\t\t\taxis.setPrivateRaw(updateScrollbar, true);\n\t\t\t\t});\n\t\t\t}\n\t\t\telse {\n\t\t\t\taxis.setPrivateRaw(updateScrollbar, true);\n\t\t\t}\n\t\t})\n\t}\n\n\n\tprotected _processAxis<R extends AxisRenderer>(axes: ListAutoDispose<Axis<R>>, container: Container): IDisposer {\n\t\treturn axes.events.onAll((change) => {\n\t\t\tif (change.type === \"clear\") {\n\t\t\t\t$array.each(change.oldValues, (axis) => {\n\t\t\t\t\tthis._removeAxis(axis);\n\t\t\t\t})\n\t\t\t} else if (change.type === \"push\") {\n\t\t\t\tcontainer.children.push(change.newValue);\n\t\t\t\tchange.newValue.processChart(this);\n\t\t\t} else if (change.type === \"setIndex\") {\n\t\t\t\tcontainer.children.setIndex(change.index, change.newValue);\n\t\t\t\tchange.newValue.processChart(this);\n\t\t\t} else if (change.type === \"insertIndex\") {\n\t\t\t\tcontainer.children.insertIndex(change.index, change.newValue);\n\t\t\t\tchange.newValue.processChart(this);\n\t\t\t} else if (change.type === \"removeIndex\") {\n\t\t\t\tthis._removeAxis(change.oldValue);\n\t\t\t} else if (change.type === \"moveIndex\") {\n\t\t\t\tcontainer.children.moveValue(change.value, change.newIndex);\n\t\t\t\tchange.value.processChart(this);\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Unknown IListEvent type\");\n\t\t\t}\n\t\t});\n\t}\n\n\tprotected _removeAxis(axis: Axis<AxisRenderer>) {\n\t\tif (!axis.isDisposed()) {\n\t\t\tconst axisParent = axis.parent\n\t\t\tif (axisParent) {\n\t\t\t\taxisParent.children.removeValue(axis);\n\t\t\t}\n\n\t\t\tconst gridContainer = axis.gridContainer;\n\t\t\tconst gridParent = gridContainer.parent;\n\t\t\tif (gridParent) {\n\t\t\t\tgridParent.children.removeValue(gridContainer);\n\t\t\t}\n\n\t\t\tconst topGridContainer = axis.topGridContainer;\n\t\t\tconst topGridParent = topGridContainer.parent;\n\t\t\tif (topGridParent) {\n\t\t\t\ttopGridParent.children.removeValue(topGridContainer);\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic _updateChartLayout() {\n\t\tconst left = this.leftAxesContainer.width();\n\t\tconst right = this.rightAxesContainer.width();\n\n\t\tconst bottomAxesContainer = this.bottomAxesContainer;\n\t\tbottomAxesContainer.set(\"paddingLeft\", left);\n\t\tbottomAxesContainer.set(\"paddingRight\", right);\n\n\t\tconst topAxesContainer = this.topAxesContainer;\n\t\ttopAxesContainer.set(\"paddingLeft\", left);\n\t\ttopAxesContainer.set(\"paddingRight\", right);\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic processAxis(axis: Axis<AxisRenderer>) {\n\t\tvar cursor = this.get(\"cursor\");\n\t\tif (cursor) {\n\t\t\tthis.addDisposer(axis.on(\"start\", () => {\n\t\t\t\tthis._updateCursor();\n\t\t\t}))\n\n\t\t\tthis.addDisposer(axis.on(\"end\", () => {\n\t\t\t\tthis._updateCursor();\n\t\t\t}))\n\t\t}\n\t}\n\n\n\tpublic _handleAxisSelection(axis: Axis<any>, force?: boolean) {\n\n\t\tlet start = axis.fixPosition(axis.get(\"start\", 0));\n\t\tlet end = axis.fixPosition(axis.get(\"end\", 1));\n\n\t\tif (start > end) {\n\t\t\t[start, end] = [end, start];\n\t\t}\n\n\t\tif (this.xAxes.indexOf(axis) != -1) {\n\t\t\tif (force || axis.getPrivate(\"updateScrollbar\")) {\n\t\t\t\tlet scrollbarX = this.get(\"scrollbarX\");\n\n\t\t\t\tif (scrollbarX && (!scrollbarX.getPrivate(\"isBusy\") || force)) {\n\t\t\t\t\tscrollbarX.setRaw(\"start\", start);\n\t\t\t\t\tscrollbarX.setRaw(\"end\", end);\n\t\t\t\t\tscrollbarX.updateGrips();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if (this.yAxes.indexOf(axis) != -1) {\n\t\t\tif (force || axis.getPrivate(\"updateScrollbar\")) {\n\t\t\t\tlet scrollbarY = this.get(\"scrollbarY\");\n\n\t\t\t\tif (scrollbarY && (!scrollbarY.getPrivate(\"isBusy\") || force)) {\n\t\t\t\t\tscrollbarY.setRaw(\"start\", start);\n\t\t\t\t\tscrollbarY.setRaw(\"end\", end);\n\t\t\t\t\tscrollbarY.updateGrips();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis._handleZoomOut();\n\t}\n\n\tprotected _handleZoomOut() {\n\t\tlet zoomOutButton = this.zoomOutButton;\n\t\tif (zoomOutButton && zoomOutButton.parent) {\n\t\t\tlet visible = false;\n\t\t\tthis.xAxes.each((axis) => {\n\t\t\t\tif ($math.round(axis.get(\"start\", 0), 6) != 0 || $math.round(axis.get(\"end\", 1), 6) != 1) {\n\t\t\t\t\tvisible = true;\n\t\t\t\t}\n\t\t\t})\n\t\t\tthis.yAxes.each((axis) => {\n\t\t\t\tif ($math.round(axis.get(\"start\", 0), 6) != 0 || $math.round(axis.get(\"end\", 1), 6) != 1) {\n\t\t\t\t\tvisible = true;\n\t\t\t\t}\n\t\t\t})\n\n\t\t\tif (visible) {\n\t\t\t\tif (zoomOutButton.isHidden()) {\n\t\t\t\t\tzoomOutButton.show();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tzoomOutButton.hide();\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Checks if point is within plot area.\n\t *\n\t * @param point Reference point\n\t * @return Is within plot area?\n\t */\n\tpublic inPlot(point: IPoint): boolean {\n\t\tconst plotContainer = this.plotContainer;\n\t\tconst otherCharts = this.getPrivate(\"otherCharts\", this._otherCharts);\n\t\tconst global = plotContainer.toGlobal(point);\n\n\t\tif (point.x >= -0.5 && point.y >= -0.5 && point.x <= plotContainer.width() + 0.5 && point.y <= plotContainer.height() + 0.5) {\n\t\t\treturn true;\n\t\t}\n\t\tif (otherCharts) {\n\n\t\t\tfor (let i = otherCharts.length - 1; i >= 0; i--) {\n\t\t\t\tconst chart = otherCharts[i];\n\n\t\t\t\tif (chart != this) {\n\t\t\t\t\tconst chartPlotContainer = chart.plotContainer;\n\t\t\t\t\tconst documentPoint = this._root.rootPointToDocument(global);\n\t\t\t\t\tconst chartRoot = chart._root.documentPointToRoot(documentPoint);\n\t\t\t\t\tconst local = chartPlotContainer.toLocal(chartRoot);\n\t\t\t\t\tif (local.x >= -0.1 && local.y >= -0.1 && local.x <= chartPlotContainer.width() + 0.1 && local.y <= chartPlotContainer.height() + 0.1) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic arrangeTooltips() {\n\t\tconst plotContainer = this.plotContainer;\n\n\t\tconst w = plotContainer.width();\n\t\tconst h = plotContainer.height();\n\n\t\tlet hh = this.height();\n\n\t\tconst bounds = this._root.tooltipContainer.get(\"layerMargin\");\n\n\t\tif (bounds) {\n\t\t\tif (bounds.bottom > hh) {\n\t\t\t\thh = bounds.bottom;\n\t\t\t}\n\t\t}\n\n\t\tlet plotT = plotContainer._display.toGlobal({ x: 0, y: 0 });\n\t\tlet plotB = plotContainer._display.toGlobal({ x: w, y: h });\n\n\t\tconst tooltips: Array<Tooltip> = [];\n\t\tlet sum = 0;\n\n\t\tlet minDistance = Infinity;\n\t\tlet movePoint = this._movePoint;\n\t\tlet maxTooltipDistance = this.get(\"maxTooltipDistance\");\n\t\tlet maxTooltipDistanceBy = this.get(\"maxTooltipDistanceBy\", \"xy\");\n\t\tlet closest: XYSeries;\n\t\tlet closestPoint: IPoint;\n\n\t\tif ($type.isNumber(maxTooltipDistance)) {\n\t\t\tthis.series.each((series) => {\n\t\t\t\tif (!series.isHidden()) {\n\t\t\t\t\tconst tooltip = series.get(\"tooltip\");\n\t\t\t\t\tif (tooltip) {\n\t\t\t\t\t\tlet point = tooltip.get(\"pointTo\")!;\n\t\t\t\t\t\tif (point) {\n\t\t\t\t\t\t\tlet distance = Math.hypot(movePoint.x - point.x, movePoint.y - point.y);\n\t\t\t\t\t\t\tif (maxTooltipDistanceBy == \"x\") {\n\t\t\t\t\t\t\t\tdistance = Math.abs(movePoint.x - point.x);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if (maxTooltipDistanceBy == \"y\") {\n\t\t\t\t\t\t\t\tdistance = Math.abs(movePoint.y - point.y);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (distance < minDistance) {\n\t\t\t\t\t\t\t\tminDistance = distance;\n\t\t\t\t\t\t\t\tclosest = series;\n\t\t\t\t\t\t\t\tclosestPoint = point;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\t\tconst tooltipSeries: Array<XYSeries> = [];\n\n\t\tthis.series.each((series) => {\n\t\t\tconst tooltip = series.get(\"tooltip\")!;\n\n\t\t\tif (tooltip && !tooltip.get(\"forceHidden\")) {\n\t\t\t\tlet hidden = false;\n\t\t\t\tlet point = tooltip.get(\"pointTo\")!;\n\t\t\t\tif (point) {\n\t\t\t\t\tif (maxTooltipDistance >= 0) {\n\t\t\t\t\t\tlet point = tooltip.get(\"pointTo\")!;\n\t\t\t\t\t\tif (point && closestPoint) {\n\t\t\t\t\t\t\tif (series != closest) {\n\t\t\t\t\t\t\t\tlet distance = Math.hypot(closestPoint.x - point.x, closestPoint.y - point.y);\n\t\t\t\t\t\t\t\tif (maxTooltipDistanceBy == \"x\") {\n\t\t\t\t\t\t\t\t\tdistance = Math.abs(closestPoint.x - point.x);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse if (maxTooltipDistanceBy == \"y\") {\n\t\t\t\t\t\t\t\t\tdistance = Math.abs(closestPoint.y - point.y);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (distance > maxTooltipDistance) {\n\t\t\t\t\t\t\t\t\thidden = true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if (maxTooltipDistance == -1) {\n\t\t\t\t\t\tif (series != closest) {\n\t\t\t\t\t\t\thidden = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!this.inPlot(this._tooltipToLocal(point)) || !tooltip.dataItem) {\n\t\t\t\t\t\thidden = true;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (!hidden) {\n\t\t\t\t\t\t\tsum += point.y;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (hidden || series.isHidden() || series.isHiding()) {\n\t\t\t\t\t\ttooltip.hide(0);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\ttooltip.show();\n\t\t\t\t\t\ttooltips.push(tooltip);\n\n\t\t\t\t\t\ttooltipSeries.push(series);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\n\t\tthis.setPrivate(\"tooltipSeries\", tooltipSeries);\n\n\t\tif (this.get(\"arrangeTooltips\")) {\n\n\t\t\tconst tooltipContainer = this._root.tooltipContainer;\n\n\t\t\tconst count = tooltips.length;\n\t\t\tconst average = sum / count;\n\n\t\t\tif (average > h / 2 + plotT.y) {\n\t\t\t\ttooltips.sort((a, b) => $order.compareNumber(b.get(\"pointTo\")!.y, a.get(\"pointTo\")!.y));\n\n\t\t\t\tlet prevY = plotB.y;\n\n\t\t\t\t$array.each(tooltips, (tooltip) => {\n\t\t\t\t\tlet height = tooltip.height();\n\t\t\t\t\tlet centerY = tooltip.get(\"centerY\");\n\t\t\t\t\tif (centerY instanceof Percent) {\n\t\t\t\t\t\theight *= centerY.value;\n\t\t\t\t\t}\n\t\t\t\t\theight += tooltip.get(\"marginBottom\", 0);\n\n\t\t\t\t\ttooltip.set(\"bounds\", { left: plotT.x, top: plotT.y, right: plotB.x, bottom: prevY })\n\t\t\t\t\ttooltip.setPrivate(\"customData\", { left: plotT.x, top: plotT.y, right: plotB.x, bottom: prevY })\n\t\t\t\t\tprevY = Math.min(prevY - height, tooltip._fy - height);\n\t\t\t\t\tif (tooltip.parent == tooltipContainer) {\n\t\t\t\t\t\ttooltipContainer.children.moveValue(tooltip, 0);\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\tif (prevY < 0) {\n\t\t\t\t\ttooltips.reverse();\n\t\t\t\t\tlet prevBottom = prevY;\n\n\t\t\t\t\t$array.each(tooltips, (tooltip) => {\n\t\t\t\t\t\tlet bounds = tooltip.get(\"bounds\");\n\t\t\t\t\t\tif (bounds) {\n\t\t\t\t\t\t\tlet top = bounds.top - prevY;\n\t\t\t\t\t\t\tlet bottom = bounds.bottom - prevY;\n\t\t\t\t\t\t\tif (top < prevBottom) {\n\t\t\t\t\t\t\t\ttop = prevBottom;\n\t\t\t\t\t\t\t\tbottom = top + tooltip.height();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttooltip.set(\"bounds\", { left: bounds.left, top: top, right: bounds.right, bottom: bottom })\n\t\t\t\t\t\t\tprevBottom = bounds.bottom - prevY + tooltip.get(\"marginBottom\", 0);\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\ttooltips.reverse();\n\t\t\t\ttooltips.sort((a, b) => $order.compareNumber(a.get(\"pointTo\")!.y, b.get(\"pointTo\")!.y));\n\n\t\t\t\tlet prevY = 0;\n\t\t\t\t$array.each(tooltips, (tooltip) => {\n\t\t\t\t\tlet height = tooltip.height();\n\t\t\t\t\tlet centerY = tooltip.get(\"centerY\");\n\t\t\t\t\tif (centerY instanceof Percent) {\n\t\t\t\t\t\theight *= centerY.value;\n\t\t\t\t\t}\n\t\t\t\t\theight += tooltip.get(\"marginBottom\", 0);\n\n\t\t\t\t\ttooltip.set(\"bounds\", { left: plotT.x, top: prevY, right: plotB.x, bottom: Math.max(plotT.y + hh, prevY + height) })\n\t\t\t\t\tif (tooltip.parent == tooltipContainer) {\n\t\t\t\t\t\ttooltipContainer.children.moveValue(tooltip, 0);\n\t\t\t\t\t}\n\t\t\t\t\tprevY = Math.max(prevY + height, tooltip._fy + height);\n\t\t\t\t})\n\n\t\t\t\tif (prevY > hh) {\n\t\t\t\t\ttooltips.reverse();\n\t\t\t\t\tlet prevBottom = hh;\n\n\t\t\t\t\t$array.each(tooltips, (tooltip) => {\n\t\t\t\t\t\tlet bounds = tooltip.get(\"bounds\");\n\t\t\t\t\t\tif (bounds) {\n\t\t\t\t\t\t\tlet top = bounds.top - (hh - prevY);\n\t\t\t\t\t\t\tlet bottom = bounds.bottom - (hh - prevY);\n\t\t\t\t\t\t\tif (bottom > prevBottom) {\n\t\t\t\t\t\t\t\tbottom = prevBottom\n\t\t\t\t\t\t\t\ttop = bottom - tooltip.height();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttooltip.set(\"bounds\", { left: bounds.left, top: top, right: bounds.right, bottom: bottom })\n\t\t\t\t\t\t\tprevBottom = bottom - tooltip.height() - tooltip.get(\"marginBottom\", 0);\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected _tooltipToLocal(point: IPoint): IPoint {\n\t\treturn this.plotContainer.toLocal(point);\n\t}\n\n\t/**\n\t * Fully zooms out the chart.\n\t */\n\tpublic zoomOut() {\n\t\tthis.xAxes.each((axis) => {\n\t\t\taxis.setPrivate(\"updateScrollbar\", true);\n\t\t\taxis.zoom(0, 1);\n\t\t})\n\n\t\tthis.yAxes.each((axis) => {\n\t\t\taxis.setPrivate(\"updateScrollbar\", true);\n\t\t\taxis.zoom(0, 1);\n\t\t})\n\t}\n\n\tprotected _dispose() {\n\t\tsuper._dispose();\n\n\t\t// Explicitly disposing cursor to avoid memory leak of cursor adding\n\t\t// keyboard events after parent chart has been disposed\n\t\tconst cursor = this.get(\"cursor\");\n\t\tif (cursor) {\n\t\t\tcursor.dispose();\n\t\t}\n\t}\n\n}\n","import type { AxisRenderer } from \"./AxisRenderer\";\nimport type { AxisLabel } from \"./AxisLabel\";\nimport type { AxisTick } from \"./AxisTick\";\nimport type { Graphics } from \"../../../core/render/Graphics\";\nimport type { Grid } from \"./Grid\";\nimport type { AxisBullet } from \"./AxisBullet\";\nimport type { XYChart } from \"../XYChart\";\nimport type { XYSeries, IXYSeriesDataItem } from \"../series/XYSeries\";\nimport type { Animation } from \"../../../core/util/Entity\";\nimport type { Tooltip } from \"../../../core/render/Tooltip\";\nimport type { Root } from \"../../../core/Root\";\n\nimport { DataItem } from \"../../../core/render/Component\";\nimport { Component, IComponentSettings, IComponentPrivate, IComponentEvents, IComponentDataItem } from \"../../../core/render/Component\";\nimport { Container } from \"../../../core/render/Container\";\nimport { p100 } from \"../../../core/util/Percent\";\nimport { List } from \"../../../core/util/List\";\nimport { Rectangle } from \"../../../core/render/Rectangle\";\n\nimport * as $array from \"../../../core/util/Array\";\nimport * as $type from \"../../../core/util/Type\";\nimport * as $utils from \"../../../core/util/Utils\";\n\n\n\nexport interface IAxisSettings<R extends AxisRenderer> extends IComponentSettings {\n\t/**\n\t * A renderer object which is responsible of rendering visible axis elements.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/#Axis_renderer} for more info\n\t */\n\trenderer: R;\n\n\t/**\n\t * The initial relative zoom start position of the axis.\n\t *\n\t * E.g. stting it to `0.1` will pre-zoom axis to 10% from the start.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/zoom-and-pan/#Pre_zooming_axes} for more info\n\t */\n\tstart?: number;\n\n\t/**\n\t * The initial relative zoom end position of the axis.\n\t *\n\t * E.g. stting it to `0.9` will pre-zoom axis to 10% from the end.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/zoom-and-pan/#Pre_zooming_axes} for more info\n\t */\n\tend?: number;\n\n\t/**\n\t * Maximum number of times the scope of the axis could auto-zoom-in.\n\t *\n\t * This is to prevent axis jumping too drastically when scrolling/zooming.\n\t *\n\t * @default 1000\n\t */\n\tmaxZoomFactor?: number | null;\n\n\t/**\n\t * Maximum number of axis elements to show at a time.\n\t *\n\t * E.g. for a [[CategoryAxis]] that would be number of categories.\n\t * For a [[DateAxis]] it would be number of `baseInterval`.\n\t *\n\t * The axis will not allow to be zoomed out beyond this number.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/zoom-and-pan/#Limiting_zoom_scope} for more info\n\t */\n\tmaxZoomCount?: number;\n\n\t/**\n\t * Minimum number of axis elements to show at a time.\n\t *\n\t * E.g. for a [[CategoryAxis]] that would be number of categories.\n\t * For a [[DateAxis]] it would be number of `baseInterval`.\n\t *\n\t * The axis will not allow to be zoomed in beyond this number.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/zoom-and-pan/#Limiting_zoom_scope} for more info\n\t */\n\tminZoomCount?: number;\n\n\t/**\n\t * Base value of the axis.\n\t */\n\tbaseValue?: number;\n\n\t/**\n\t * If set to `false` the axis will be exempt when chart is panned\n\t * horizontally, and will keep its current position.`\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/zoom-and-pan/#Excluding_axes_from_pan_or_zoom} for more info\n\t */\n\tpanX?: boolean;\n\n\t/**\n\t * If set to `false` the axis will be exempt when chart is panned\n\t * vertically, and will keep its current position.`\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/zoom-and-pan/#Excluding_axes_from_pan_or_zoom} for more info\n\t */\n\tpanY?: boolean;\n\n\t/**\n\t * If set to `false` the axis will be exempt when chart is zoomed\n\t * horizontally, and will keep its current zoom/position.`\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/zoom-and-pan/#Excluding_axes_from_pan_or_zoom} for more info\n\t */\n\tzoomX?: boolean;\n\n\t/**\n\t * If set to `false` the axis will be exempt when chart is zoomed\n\t * vertically, and will keep its current zoom/position.`\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/zoom-and-pan/#Excluding_axes_from_pan_or_zoom} for more info\n\t */\n\tzoomY?: boolean;\n\n\t/**\n\t * Set this to `false` to prevent axis from being zoomed.\n\t */\n\tzoomable?:boolean;\n\n\t/**\n\t * A relative distance the axis is allowed to be zoomed/panned beyond its\n\t * actual scope.\n\t *\n\t * @default 0.1\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/zoom-and-pan/#Over_zooming} for more info\n\t */\n\tmaxDeviation?: number;\n\n\t/**\n\t * [[Tooltip]] element to use for axis.\n\t */\n\ttooltip?: Tooltip;\n\n\t/**\n\t * `tooltipLocation` indicates\n\t * which relative place to snap to: `0` beginning, `0.5` - middle, `1` - end.\n\t *\n\t * @default 0.5\n\t */\n\ttooltipLocation?: number;\n\n\t/**\n\t * Should tooltip snap to the `tooltipLocation` (`true`) or follow cursor.\n\t *\n\t * @default true\n\t */\n\tsnapTooltip?: boolean;\n\n\t/**\n\t * If set to `true` (default) the axis width will stay constant across all\n\t * zooms, even if actual length of all visible labels changes.\n\t *\n\t * @default true\n\t */\n\tfixAxisSize?: boolean;\n\n\t/**\n\t * A function that will be used to create bullets on each cell.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/#Axis_bullets} for more info\n\t */\n\tbullet?: (root: Root, axis: Axis<AxisRenderer>, dataItem: DataItem<IAxisDataItem>) => AxisBullet;\n}\n\nexport interface IAxisEvents extends IComponentEvents {\n}\n\nexport interface IAxisPrivate extends IComponentPrivate {\n\n\t/**\n\t * @ignore\n\t */\n\tname?: \"value\" | \"date\" | \"category\";\n\n\t/**\n\t * @ignore\n\t */\n\tupdateScrollbar?: boolean;\n\n\t/**\n\t * @ignore\n\t */\n\tmaxZoomFactor?: number | null;\n\n\t/**\n\t * Saves position to which tooltip points.\n\t */\n\ttooltipPosition?: number;\n\n\t/**\n\t * Width in pixels between grid lines (read-only).\n\t * \n\t * It might not be exact, as [[DateAxis]] can have grids at irregular\n\t * intervals.\n\t * \n\t * Could be used to detect when size changes and to adjust labels for them\n\t * not to overlap.\n\t */\n\tcellWidth?: number;\n\n}\n\nexport interface IAxisDataItem extends IComponentDataItem {\n\n\t/**\n\t * Axis label element.\n\t */\n\tlabel?: AxisLabel;\n\n\t/**\n\t * Tick element.\n\t */\n\ttick?: AxisTick;\n\n\t/**\n\t * Grid line element.\n\t */\n\tgrid?: Grid;\n\n\t/**\n\t * Axis fill element.\n\t */\n\taxisFill?: Graphics;\n\n\t/**\n\t * Bullet element.\n\t */\n\tbullet?: AxisBullet;\n\n\t/**\n\t * Indicates if this data item represents an axis range.\n\t */\n\tisRange?: boolean;\n\n\t/**\n\t * If set to `true`, the grid and axis fill of this data item will be drawn\n\t * above series.\n\t *\n\t * NOTE: this needs to be set **before** crating an axis range. Updating this\n\t * dynamically won't have any effect.\n\t *\n\t * NOTE: if you need all grid to be drawn above series, you can brig it to\n\t * front with `chart.gridContainer.toFront();`.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/axis-ranges/#Grid_fill_above_series} for more info\n\t * @default false\n\t */\n\tabove?: boolean\n\n}\n\n/**\n * A base class for all axes.\n *\n * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/#Adding_axes} for more info\n */\nexport abstract class Axis<R extends AxisRenderer> extends Component {\n\tpublic static className: string = \"Axis\";\n\tpublic static classNames: Array<string> = Component.classNames.concat([Axis.className]);\n\n\tdeclare public _settings: IAxisSettings<R>;\n\tdeclare public _privateSettings: IAxisPrivate;\n\tdeclare public _dataItemSettings: IAxisDataItem;\n\tdeclare public _events: IAxisEvents;\n\n\tdeclare public _seriesType: XYSeries;\n\n\tprotected _series: Array<this[\"_seriesType\"]> = [];\n\n\tpublic _isPanning: boolean = false;\n\n\t/**\n\t * Array of minor data items.\n\t */\n\tpublic minorDataItems: Array<DataItem<this[\"_dataItemSettings\"]>> = [];\n\n\t/**\n\t * A [[Container]] that holds all the axis label elements.\n\t *\n\t * @default Container.new()\n\t */\n\tpublic readonly labelsContainer: Container = this.children.push(Container.new(this._root, {}));\n\n\t/**\n\t * A [[Container]] that holds all the axis grid and fill elements.\n\t *\n\t * @default Container.new()\n\t */\n\tpublic readonly gridContainer: Container = Container.new(this._root, { width: p100, height: p100 });\n\n\t/**\n\t * A [[Container]] that holds axis grid elements which goes above the series.\n\t *\n\t * @default Container.new()\n\t */\n\tpublic readonly topGridContainer: Container = Container.new(this._root, { width: p100, height: p100 });\n\n\t/**\n\t * A [[Container]] that holds all the axis bullet elements.\n\t *\n\t * @default new Container\n\t */\n\tpublic readonly bulletsContainer: Container = this.children.push(Container.new(this._root, { isMeasured: false, width: p100, height: p100, position: \"absolute\" }));\n\n\t/**\n\t * A referenece to the the chart the axis belongs to.\n\t */\n\tpublic chart: XYChart | undefined;\n\n\tprotected _rangesDirty: Boolean = false;\n\n\tpublic _panStart: number = 0;\n\tpublic _panEnd: number = 1;\n\n\tprotected _sAnimation?: Animation<this[\"_settings\"][\"start\"]>;\n\tprotected _eAnimation?: Animation<this[\"_settings\"][\"end\"]>;\n\n\tpublic _skipSync: boolean = false;\n\n\t/**\n\t * A list of axis ranges.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/axis-ranges/} for more info\n\t * @default new List()\n\t */\n\tpublic readonly axisRanges: List<DataItem<this[\"_dataItemSettings\"]>> = new List();\n\n\tpublic _seriesAxisRanges: Array<DataItem<this[\"_dataItemSettings\"]>> = [];\n\n\t/**\n\t * A control label that is invisible but is used to keep width the width of\n\t * the axis constant.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/value-axis/#Ghost_label} for more info\n\t */\n\tpublic ghostLabel!: AxisLabel;\n\n\tprotected _cursorPosition: number = -1;\n\n\tprotected _snapToSeries?: Array<XYSeries>;\n\n\tpublic _seriesValuesDirty = false;\n\n\tpublic _seriesAdded = false;\n\n\t/**\n\t * A container above the axis that can be used to add additional stuff into\n\t * it. For example a legend, label, or an icon.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/axis-headers/} for more info\n\t * @default new Container\n\t */\n\tpublic axisHeader: Container = this.children.push(Container.new(this._root, {\n\t\tthemeTags: [\"axis\", \"header\"],\n\t\tposition: \"absolute\",\n\t\tbackground: Rectangle.new(this._root, {\n\t\t\tthemeTags: [\"header\", \"background\"],\n\t\t\tfill: this._root.interfaceColors.get(\"background\")\n\t\t})\n\t}));\n\n\tpublic _bullets: { [index: string]: AxisBullet } = {};\n\n\tprotected _dispose() {\n\t\t// these could be in other parents, so disposing just in case\n\t\tthis.gridContainer.dispose();\n\t\tthis.topGridContainer.dispose();\n\t\tthis.bulletsContainer.dispose();\n\t\tthis.labelsContainer.dispose();\n\t\tthis.axisHeader.dispose();\n\t\tsuper._dispose();\n\t}\n\n\tprotected _afterNew() {\n\t\tsuper._afterNew();\n\n\t\tthis.setPrivate(\"updateScrollbar\", true);\n\n\t\tthis._disposers.push(this.axisRanges.events.onAll((change) => {\n\t\t\tif (change.type === \"clear\") {\n\t\t\t\t$array.each(change.oldValues, (dataItem) => {\n\t\t\t\t\tthis.disposeDataItem(dataItem);\n\t\t\t\t});\n\t\t\t} else if (change.type === \"push\") {\n\t\t\t\tthis._processAxisRange(change.newValue, [\"range\"]);\n\t\t\t} else if (change.type === \"setIndex\") {\n\t\t\t\tthis._processAxisRange(change.newValue, [\"range\"]);\n\t\t\t} else if (change.type === \"insertIndex\") {\n\t\t\t\tthis._processAxisRange(change.newValue, [\"range\"]);\n\t\t\t} else if (change.type === \"removeIndex\") {\n\t\t\t\tthis.disposeDataItem(change.oldValue);\n\t\t\t} else if (change.type === \"moveIndex\") {\n\t\t\t\tthis._processAxisRange(change.value, [\"range\"]);\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Unknown IStreamEvent type\");\n\t\t\t}\n\t\t}))\n\n\t\tconst renderer = this.get(\"renderer\");\n\t\tif (renderer) {\n\t\t\trenderer.axis = this;\n\t\t\trenderer.processAxis();\n\t\t}\n\t\tthis.children.push(renderer);\n\t\tthis.ghostLabel = renderer.makeLabel(new DataItem(this, undefined, {}), []);\n\t\tthis.ghostLabel.adapters.disable(\"text\");\n\t\tthis.ghostLabel.setAll({ opacity: 0, tooltipText: undefined, tooltipHTML: undefined, interactive: false });\n\t\tthis.ghostLabel.events.disable();\n\t}\n\n\tprotected _updateFinals(_start: number, _end: number) {\n\n\t}\n\n\t/**\n\t * Zooms the axis to relative locations.\n\t *\n\t * Both `start` and `end` are relative: 0 means start of the axis, 1 - end.\n\t *\n\t * @param start Relative start\n\t * @param end Relative end\n\t * @param duration Duration of the zoom animation in milliseconds\n\t * @return Zoom animation\n\t */\n\tpublic zoom(start: number, end: number, duration?: number, priority?: \"start\" | \"end\"): Animation<this[\"_settings\"][\"start\"]> | Animation<this[\"_settings\"][\"end\"]> | undefined {\n\t\tif(this.get(\"zoomable\", true)){\n\t\t\tthis._updateFinals(start, end);\n\n\t\t\tif (this.get(\"start\") !== start || this.get(\"end\") != end) {\n\t\t\t\tlet sAnimation = this._sAnimation;\n\t\t\t\tlet eAnimation = this._eAnimation;\n\n\t\t\t\tlet maxDeviation = this.get(\"maxDeviation\", 0.5) * Math.min(1, (end - start));\n\n\t\t\t\tif (start < - maxDeviation) {\n\t\t\t\t\tstart = -maxDeviation;\n\t\t\t\t}\n\n\t\t\t\tif (end > 1 + maxDeviation) {\n\t\t\t\t\tend = 1 + maxDeviation;\n\t\t\t\t}\n\n\t\t\t\tif (start > end) {\n\t\t\t\t\t[start, end] = [end, start];\n\t\t\t\t}\n\n\t\t\t\tif (!$type.isNumber(duration)) {\n\t\t\t\t\tduration = this.get(\"interpolationDuration\", 0);\n\t\t\t\t}\n\n\t\t\t\tif (!priority) {\n\t\t\t\t\tpriority = \"end\";\n\t\t\t\t}\n\n\t\t\t\tlet maxZoomFactor = this.getPrivate(\"maxZoomFactor\", this.get(\"maxZoomFactor\", 100));\n\t\t\t\tlet maxZoomFactorReal = maxZoomFactor;\n\n\t\t\t\tif (end === 1 && start !== 0) {\n\t\t\t\t\tif (start < this.get(\"start\", 0)) {\n\t\t\t\t\t\tpriority = \"start\";\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tpriority = \"end\";\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (start === 0 && end !== 1) {\n\t\t\t\t\tif (end > this.get(\"end\", 1)) {\n\t\t\t\t\t\tpriority = \"end\";\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tpriority = \"start\";\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tlet minZoomCount = this.get(\"minZoomCount\", 0);\n\t\t\t\tlet maxZoomCount = this.get(\"maxZoomCount\", Infinity);\n\n\t\t\t\tif ($type.isNumber(minZoomCount)) {\n\t\t\t\t\tmaxZoomFactor = maxZoomFactorReal / minZoomCount;\n\t\t\t\t}\n\n\t\t\t\tlet minZoomFactor: number = 1;\n\n\t\t\t\tif ($type.isNumber(maxZoomCount)) {\n\t\t\t\t\tminZoomFactor = maxZoomFactorReal / maxZoomCount;\n\t\t\t\t}\n\n\t\t\t\t// most likely we are dragging left scrollbar grip here, so we tend to modify end\n\t\t\t\tif (priority === \"start\") {\n\t\t\t\t\tif (maxZoomCount > 0) {\n\t\t\t\t\t\t// add to the end\n\t\t\t\t\t\tif (1 / (end - start) < minZoomFactor) {\n\t\t\t\t\t\t\tend = start + 1 / minZoomFactor;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// add to the end\n\t\t\t\t\tif (1 / (end - start) > maxZoomFactor) {\n\t\t\t\t\t\tend = start + 1 / maxZoomFactor;\n\t\t\t\t\t}\n\t\t\t\t\t//unless end is > 0\n\t\t\t\t\tif (end > 1 && end - start < 1 / maxZoomFactor) {\n\t\t\t\t\t\t//end = 1;\n\t\t\t\t\t\tstart = end - 1 / maxZoomFactor;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// most likely we are dragging right, so we modify left\n\t\t\t\telse {\n\t\t\t\t\tif (maxZoomCount > 0) {\n\t\t\t\t\t\t// add to the end\n\t\t\t\t\t\tif (1 / (end - start) < minZoomFactor) {\n\t\t\t\t\t\t\tstart = end - 1 / minZoomFactor;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// remove from start\n\t\t\t\t\tif (1 / (end - start) > maxZoomFactor) {\n\t\t\t\t\t\tstart = end - 1 / maxZoomFactor;\n\t\t\t\t\t}\n\t\t\t\t\tif (start < 0 && end - start < 1 / maxZoomFactor) {\n\t\t\t\t\t\t//start = 0;\n\t\t\t\t\t\tend = start + 1 / maxZoomFactor;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (1 / (end - start) > maxZoomFactor) {\n\t\t\t\t\tend = start + 1 / maxZoomFactor;\n\t\t\t\t}\n\n\t\t\t\tif (1 / (end - start) > maxZoomFactor) {\n\t\t\t\t\tstart = end - 1 / maxZoomFactor;\n\t\t\t\t}\n\n\t\t\t\tif (maxZoomCount != null && minZoomCount != null && (start == this.get(\"start\") && end == this.get(\"end\"))) {\n\t\t\t\t\tconst chart = this.chart;\n\t\t\t\t\tif (chart) {\n\t\t\t\t\t\tchart._handleAxisSelection(this, true);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (((sAnimation && sAnimation.playing && sAnimation.to == start) || this.get(\"start\") == start) && ((eAnimation && eAnimation.playing && eAnimation.to == end) || this.get(\"end\") == end)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\n\t\t\t\tif (duration > 0) {\n\t\t\t\t\tlet easing = this.get(\"interpolationEasing\");\n\t\t\t\t\tlet sAnimation, eAnimation;\n\t\t\t\t\tif (this.get(\"start\") != start) {\n\t\t\t\t\t\tsAnimation = this.animate({ key: \"start\", to: start, duration: duration, easing: easing });\n\t\t\t\t\t}\n\t\t\t\t\tif (this.get(\"end\") != end) {\n\t\t\t\t\t\teAnimation = this.animate({ key: \"end\", to: end, duration: duration, easing: easing });\n\t\t\t\t\t}\n\n\t\t\t\t\tthis._sAnimation = sAnimation;\n\t\t\t\t\tthis._eAnimation = eAnimation;\n\n\t\t\t\t\tif (sAnimation) {\n\t\t\t\t\t\treturn sAnimation;\n\t\t\t\t\t}\n\t\t\t\t\telse if (eAnimation) {\n\t\t\t\t\t\treturn eAnimation;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthis.set(\"start\", start);\n\t\t\t\t\tthis.set(\"end\", end);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (this._sAnimation) {\n\t\t\t\t\tthis._sAnimation.stop();\n\t\t\t\t}\n\t\t\t\tif (this._eAnimation) {\n\t\t\t\t\tthis._eAnimation.stop();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * A list of series using this axis.\n\t *\n\t * @return Series\n\t */\n\tpublic get series(): Array<this[\"_seriesType\"]> {\n\t\treturn this._series;\n\t}\n\n\n\tpublic _processAxisRange(dataItem: DataItem<this[\"_dataItemSettings\"]>, themeTags: Array<string>) {\n\t\tdataItem.setRaw(\"isRange\", true);\n\t\tthis._createAssets(dataItem, themeTags);\n\t\tthis._rangesDirty = true;\n\t\tthis._prepareDataItem(dataItem);\n\n\t\tconst above = dataItem.get(\"above\");\n\t\tconst container = this.topGridContainer;\n\n\t\tconst grid = dataItem.get(\"grid\");\n\t\tif (above && grid) {\n\t\t\tcontainer.children.moveValue(grid);\n\t\t}\n\n\t\tconst fill = dataItem.get(\"axisFill\");\n\t\tif (above && fill) {\n\t\t\tcontainer.children.moveValue(fill);\n\t\t}\n\t}\n\n\tpublic _prepareDataItem(_dataItem: DataItem<this[\"_dataItemSettings\"]>, _index?: number) { }\n\n\t/**\n\t * @ignore\n\t */\n\tpublic abstract getX(_value: any, _location: number, baseValue?: any): number;\n\n\t/**\n\t * @ignore\n\t */\n\tpublic abstract getY(_value: any, _location: number, baseValue?: any): number;\n\n\t/**\n\t * @ignore\n\t */\n\tpublic abstract getDataItemCoordinateX(_dataItem: DataItem<IXYSeriesDataItem>, _field: string, _cellLocation?: number, _axisLocation?: number): number;\n\n\t/**\n\t * @ignore\n\t */\n\tpublic abstract getDataItemCoordinateY(_dataItem: DataItem<IXYSeriesDataItem>, _field: string, _cellLocation?: number, _axisLocation?: number): number;\n\n\t/**\n\t * @ignore\n\t */\n\tpublic abstract getDataItemPositionX(_dataItem: DataItem<IXYSeriesDataItem>, _field: string, _cellLocation?: number, _axisLocation?: number): number;\n\n\t/**\n\t * @ignore\n\t */\n\tpublic abstract getDataItemPositionY(_dataItem: DataItem<IXYSeriesDataItem>, _field: string, _cellLocation?: number, _axisLocation?: number): number;\n\n\t/**\n\t * @ignore\n\t */\n\tpublic markDirtyExtremes() {\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic markDirtySelectionExtremes() {\n\t}\n\n\tpublic _calculateTotals() {\n\t}\n\n\tprotected _updateAxisRanges() {\n\t\tthis._bullets = {};\n\t\tthis.axisRanges.each((axisRange) => {\n\t\t\tthis._prepareDataItem(axisRange);\n\t\t})\n\n\t\t$array.each(this._seriesAxisRanges, (axisRange) => {\n\t\t\tthis._prepareDataItem(axisRange);\n\t\t})\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic abstract baseValue(): any;\n\n\tpublic _prepareChildren() {\n\t\tsuper._prepareChildren();\n\n\t\tif (this.get(\"fixAxisSize\")) {\n\t\t\tthis.ghostLabel.set(\"visible\", true);\n\t\t}\n\t\telse {\n\t\t\tthis.ghostLabel.set(\"visible\", false);\n\t\t}\n\n\t\tif (this.isDirty(\"start\") || this.isDirty(\"end\")) {\n\t\t\tconst chart = this.chart;\n\t\t\tif (chart) {\n\t\t\t\tchart._updateCursor();\n\t\t\t}\n\n\t\t\tlet start = this.get(\"start\", 0);\n\t\t\tlet end = this.get(\"end\", 1);\n\n\t\t\tlet maxDeviation = this.get(\"maxDeviation\", 0.5) * Math.min(1, (end - start));\n\n\t\t\tif (start < -maxDeviation) {\n\t\t\t\tlet delta = start + maxDeviation;\n\t\t\t\tstart = -maxDeviation;\n\t\t\t\tthis.setRaw(\"start\", start);\n\t\t\t\tif (this.isDirty(\"end\")) {\n\t\t\t\t\tthis.setRaw(\"end\", end - delta);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (end > 1 + maxDeviation) {\n\t\t\t\tlet delta = end - 1 - maxDeviation;\n\t\t\t\tend = 1 + maxDeviation;\n\t\t\t\tthis.setRaw(\"end\", end);\n\n\t\t\t\tif (this.isDirty(\"start\")) {\n\t\t\t\t\tthis.setRaw(\"start\", start - delta);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\t\tconst renderer = this.get(\"renderer\");\n\t\trenderer._start = this.get(\"start\")!;\n\t\trenderer._end = this.get(\"end\")!;\n\t\trenderer._inversed = renderer.get(\"inversed\", false);\n\t\trenderer._axisLength = renderer.axisLength() / (renderer._end - renderer._start);\n\t\trenderer._updateLC();\n\n\t\tif (this.isDirty(\"tooltip\")) {\n\t\t\tconst tooltip = this.get(\"tooltip\");\n\t\t\tif (tooltip) {\n\t\t\t\tconst rendererTags = renderer.get(\"themeTags\");\n\t\t\t\ttooltip.addTag(\"axis\");\n\t\t\t\ttooltip.addTag(this.className.toLowerCase());\n\t\t\t\ttooltip._applyThemes();\n\n\t\t\t\tif (rendererTags) {\n\t\t\t\t\ttooltip.set(\"themeTags\", $utils.mergeTags(tooltip.get(\"themeTags\"), rendererTags));\n\t\t\t\t\ttooltip.label._applyThemes();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic _updateTooltipBounds() {\n\t\tconst tooltip = this.get(\"tooltip\")!;\n\t\tif (tooltip) {\n\t\t\tthis.get(\"renderer\").updateTooltipBounds(tooltip);\n\t\t}\n\t}\n\n\tpublic _updateBounds() {\n\t\tsuper._updateBounds();\n\t\tthis._updateTooltipBounds();\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic processChart(chart: XYChart) {\n\t\tthis.chart = chart;\n\t\tconst renderer = this.get(\"renderer\");\n\n\t\trenderer.chart = chart;\n\t\tchart.gridContainer.children.push(this.gridContainer);\n\t\tchart.topGridContainer.children.push(this.topGridContainer);\n\n\t\tchart.axisHeadersContainer.children.push(this.axisHeader);\n\n\t\tthis.on(\"start\", () => {\n\t\t\tchart._handleAxisSelection(this);\n\t\t});\n\t\tthis.on(\"end\", () => {\n\t\t\tchart._handleAxisSelection(this);\n\t\t});\n\n\t\tchart.plotContainer.onPrivate(\"width\", () => {\n\t\t\tthis.markDirtySize();\n\t\t});\n\t\tchart.plotContainer.onPrivate(\"height\", () => {\n\t\t\tthis.markDirtySize();\n\t\t});\n\n\t\tchart.processAxis(this);\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic hideDataItem(dataItem: DataItem<IAxisDataItem>): Promise<void> {\n\t\tthis._toggleFHDataItem(dataItem, true);\n\t\treturn super.hideDataItem(dataItem);\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic showDataItem(dataItem: DataItem<IAxisDataItem>): Promise<void> {\n\t\tthis._toggleFHDataItem(dataItem, false);\n\t\treturn super.showDataItem(dataItem);\n\t}\n\n\tpublic _toggleFHDataItem(dataItem: DataItem<IAxisDataItem>, forceHidden: boolean) {\n\t\tconst fh = \"forceHidden\";\n\t\tconst label = dataItem.get(\"label\");\n\t\tif (label) {\n\t\t\tlabel.set(fh, forceHidden);\n\t\t}\n\t\tconst grid = dataItem.get(\"grid\");\n\t\tif (grid) {\n\t\t\tgrid.set(fh, forceHidden);\n\t\t}\n\t\tconst tick = dataItem.get(\"tick\");\n\t\tif (tick) {\n\t\t\ttick.set(fh, forceHidden);\n\t\t}\n\t\tconst axisFill = dataItem.get(\"axisFill\");\n\t\tif (axisFill) {\n\t\t\taxisFill.set(fh, forceHidden);\n\t\t}\n\n\t\tconst bullet = dataItem.get(\"bullet\");\n\t\tif (bullet) {\n\t\t\tconst sprite = bullet.get(\"sprite\");\n\t\t\tif (sprite) {\n\t\t\t\tsprite.set(fh, forceHidden);\n\t\t\t}\n\t\t}\n\t}\n\n\n\tpublic _toggleDataItem(dataItem: DataItem<IAxisDataItem>, visible: boolean) {\n\t\tconst label = dataItem.get(\"label\");\n\t\tconst v = \"visible\";\n\t\tif (label) {\n\t\t\tlabel.setPrivate(v, visible);\n\t\t}\n\t\tconst grid = dataItem.get(\"grid\");\n\t\tif (grid) {\n\t\t\tgrid.setPrivate(v, visible);\n\t\t}\n\t\tconst tick = dataItem.get(\"tick\");\n\t\tif (tick) {\n\t\t\ttick.setPrivate(v, visible);\n\t\t}\n\t\tconst axisFill = dataItem.get(\"axisFill\");\n\t\tif (axisFill) {\n\t\t\taxisFill.setPrivate(v, visible);\n\t\t}\n\n\t\tconst bullet = dataItem.get(\"bullet\");\n\t\tif (bullet) {\n\t\t\tconst sprite = bullet.get(\"sprite\");\n\t\t\tif (sprite) {\n\t\t\t\tsprite.setPrivate(v, visible);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic abstract basePosition(): number;\n\n\tpublic _createAssets(dataItem: DataItem<this[\"_dataItemSettings\"]>, tags: Array<string>, minor?: boolean) {\n\t\tconst renderer = this.get(\"renderer\");\n\t\tlet m = \"minor\";\n\n\t\tconst label = dataItem.get(\"label\");\n\t\tif (!label) {\n\t\t\trenderer.makeLabel(dataItem, tags);\n\t\t}\n\t\telse {\n\t\t\tlet themeTags = label.get(\"themeTags\");\n\t\t\tlet remove = false;\n\t\t\tif (minor) {\n\t\t\t\tif (themeTags?.indexOf(m) == -1) {\n\t\t\t\t\tremove = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (themeTags?.indexOf(m) != -1) {\n\t\t\t\t\tremove = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (remove) {\n\t\t\t\tlabel.parent?.children.removeValue(label);\n\t\t\t\trenderer.makeLabel(dataItem, tags);\n\t\t\t\tlabel.dispose();\n\t\t\t\trenderer.labels.removeValue(label);\n\t\t\t}\n\t\t}\n\n\t\tconst grid = dataItem.get(\"grid\");\n\n\t\tif (!grid) {\n\t\t\trenderer.makeGrid(dataItem, tags);\n\t\t}\n\t\telse {\n\t\t\tlet themeTags = grid.get(\"themeTags\");\n\t\t\tlet remove = false;\n\t\t\tif (minor) {\n\t\t\t\tif (themeTags?.indexOf(m) == -1) {\n\t\t\t\t\tremove = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (themeTags?.indexOf(m) != -1) {\n\t\t\t\t\tremove = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (remove) {\n\t\t\t\tgrid.parent?.children.removeValue(grid);\n\t\t\t\trenderer.makeGrid(dataItem, tags);\n\t\t\t\tgrid.dispose();\n\t\t\t\trenderer.grid.removeValue(grid);\n\t\t\t}\n\t\t}\n\n\t\tconst tick = dataItem.get(\"tick\");\n\t\tif (!tick) {\n\t\t\trenderer.makeTick(dataItem, tags);\n\t\t}\n\t\telse {\n\t\t\tlet remove = false;\n\t\t\tlet themeTags = tick.get(\"themeTags\");\n\t\t\tif (minor) {\n\t\t\t\tif (themeTags?.indexOf(m) == -1) {\n\t\t\t\t\tremove = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (themeTags?.indexOf(m) != -1) {\n\t\t\t\t\tremove = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (remove) {\n\t\t\t\ttick.parent?.children.removeValue(tick);\n\t\t\t\trenderer.makeTick(dataItem, tags);\n\t\t\t\ttick.dispose();\n\t\t\t\trenderer.ticks.removeValue(tick);\n\t\t\t}\n\t\t}\n\n\t\tif (!minor && !dataItem.get(\"axisFill\")) {\n\t\t\trenderer.makeAxisFill(dataItem, tags);\n\t\t}\n\n\t\tthis._processBullet(dataItem);\n\t}\n\n\tprotected _processBullet(dataItem: DataItem<this[\"_dataItemSettings\"]>) {\n\t\tlet bullet = dataItem.get(\"bullet\");\n\t\tlet axisBullet = this.get(\"bullet\");\n\n\t\tif (!bullet && axisBullet && !dataItem.get(\"isRange\")) {\n\t\t\tbullet = axisBullet(this._root, this, dataItem);\n\t\t}\n\n\t\tif (bullet) {\n\t\t\tbullet.axis = this;\n\t\t\tconst sprite = bullet.get(\"sprite\");\n\n\t\t\tif (sprite) {\n\t\t\t\tsprite._setDataItem(dataItem);\n\t\t\t\tdataItem.setRaw(\"bullet\", bullet);\n\t\t\t\tif (!sprite.parent) {\n\t\t\t\t\tthis.bulletsContainer.children.push(sprite);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic _afterChanged() {\n\t\tsuper._afterChanged();\n\n\t\tconst chart = this.chart;\n\t\tif (chart) {\n\t\t\tchart._updateChartLayout();\n\t\t\tchart.axisHeadersContainer.markDirtySize();\n\t\t}\n\n\t\tthis.get(\"renderer\")._updatePositions();\n\n\t\tthis._seriesAdded = false;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic disposeDataItem(dataItem: DataItem<this[\"_dataItemSettings\"]>) {\n\t\tsuper.disposeDataItem(dataItem);\n\t\tconst renderer = this.get(\"renderer\");\n\t\tconst label = dataItem.get(\"label\");\n\t\tif (label) {\n\t\t\trenderer.labels.removeValue(label);\n\t\t\tlabel.dispose();\n\t\t}\n\t\tconst tick = dataItem.get(\"tick\");\n\t\tif (tick) {\n\t\t\trenderer.ticks.removeValue(tick);\n\t\t\ttick.dispose();\n\t\t}\n\t\tconst grid = dataItem.get(\"grid\");\n\t\tif (grid) {\n\t\t\trenderer.grid.removeValue(grid);\n\t\t\tgrid.dispose();\n\t\t}\n\t\tconst axisFill = dataItem.get(\"axisFill\");\n\t\tif (axisFill) {\n\t\t\trenderer.axisFills.removeValue(axisFill);\n\t\t\taxisFill.dispose();\n\t\t}\n\t\tconst bullet = dataItem.get(\"bullet\");\n\n\t\tif (bullet) {\n\t\t\tbullet.dispose();\n\t\t}\n\t}\n\n\tprotected _updateGhost() {\n\t\tthis.setPrivate(\"cellWidth\", this.getCellWidthPosition() * this.get(\"renderer\").axisLength());\n\t\tconst ghostLabel = this.ghostLabel;\n\t\tif (!ghostLabel.isHidden()) {\n\t\t\tconst bounds = ghostLabel.localBounds();\n\t\t\tconst gWidth = Math.ceil(bounds.right - bounds.left);\n\t\t\tlet text = ghostLabel.get(\"text\");\n\t\t\t$array.each(this.dataItems, (dataItem) => {\n\t\t\t\tconst label = dataItem.get(\"label\");\n\t\t\t\tif (label && !label.isHidden()) {\n\t\t\t\t\tconst bounds = label.localBounds();\n\t\t\t\t\tconst w = Math.ceil(bounds.right - bounds.left);\n\n\t\t\t\t\tif (w > gWidth) {\n\t\t\t\t\t\ttext = label.text._getText();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t\tghostLabel.set(\"text\", text);\n\t\t}\n\t\tlet start = this.get(\"start\", 0);\n\t\tlet end = this.get(\"end\", 1);\n\t\tthis.get(\"renderer\").updateLabel(ghostLabel, start + (end - start) * 0.5);\n\t}\n\n\tpublic _handleCursorPosition(position: number, snapToSeries?: Array<XYSeries>) {\n\t\tconst renderer = this.get(\"renderer\");\n\t\tposition = renderer.toAxisPosition(position);\n\n\t\tthis._cursorPosition = position;\n\t\tthis._snapToSeries = snapToSeries;\n\n\t\tthis.updateTooltip();\n\t}\n\n\t/**\n\t * Can be called when axis zoom changes and you need to update tooltip\n\t * position.\n\t */\n\tpublic updateTooltip() {\n\t\tconst snapToSeries = this._snapToSeries;\n\t\tlet position = this._cursorPosition;\n\t\tconst tooltip = this.get(\"tooltip\")!;\n\t\tconst renderer = this.get(\"renderer\");\n\n\t\tif ($type.isNumber(position)) {\n\n\t\t\t$array.each(this.series, (series) => {\n\t\t\t\tif (series.get(\"baseAxis\") === this) {\n\t\t\t\t\tconst dataItem = this.getSeriesItem(series, position!, this.get(\"tooltipLocation\"));\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif (snapToSeries && snapToSeries.indexOf(series) != -1) {\n\t\t\t\t\t\tseries.updateLegendMarker(dataItem);\n\t\t\t\t\t\tseries.updateLegendValue(dataItem);\n\t\t\t\t\t\tseries._settings.tooltipDataItem = dataItem;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tseries.showDataItemTooltip(dataItem);\n\t\t\t\t\t\tseries.setRaw(\"tooltipDataItem\", dataItem);\n\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t})\n\n\t\t\tif (this.get(\"snapTooltip\")) {\n\t\t\t\tposition = this.roundAxisPosition(position, this.get(\"tooltipLocation\", 0.5));\n\t\t\t}\n\t\t\t\n\t\t\tthis.setPrivateRaw(\"tooltipPosition\", position);\n\n\t\t\tif (tooltip) {\n\t\t\t\trenderer.updateTooltipBounds(tooltip);\n\n\t\t\t\tif (!$type.isNaN(position)) {\t\t\t\t\t\n\t\t\t\t\tthis._updateTooltipText(tooltip, position);\n\t\t\t\t\trenderer.positionTooltip(tooltip, position);\n\n\t\t\t\t\tif (position < this.get(\"start\", 0) || position > this.get(\"end\", 1)) {\n\t\t\t\t\t\ttooltip.hide(0);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\ttooltip.show(0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\ttooltip.hide(0);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected _updateTooltipText(tooltip: Tooltip, position: number) {\n\t\ttooltip.label.set(\"text\", this.getTooltipText(position));\n\t}\n\n\t/**\n\t * Returns text to be used in an axis tooltip for specific relative position.\n\t *\n\t * @param position Position\n\t * @param adjustPosition Adjust position\n\t * @return Tooltip text\n\t */\n\tpublic abstract getTooltipText(position: number, adjustPosition?: boolean): string | undefined;\n\n\t/**\n\t * @ignore\n\t */\n\tpublic roundAxisPosition(position: number, _location: number): number {\n\t\treturn position;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic handleCursorShow() {\n\t\tlet tooltip = this.get(\"tooltip\");\n\t\tif (tooltip) {\n\t\t\ttooltip.show();\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic handleCursorHide() {\n\t\tlet tooltip = this.get(\"tooltip\");\n\t\tif (tooltip) {\n\t\t\ttooltip.hide();\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic processSeriesDataItem(_dataItem: DataItem<IXYSeriesDataItem>, _fields: Array<string>) {\n\n\t}\n\n\tpublic _clearDirty() {\n\t\tsuper._clearDirty();\n\t\tthis._sizeDirty = false;\n\t\tthis._rangesDirty = false;\n\t}\n\n\t/**\n\t * Converts pixel coordinate to a relative position on axis.\n\t *\n\t * @param coordinate Coordinate\n\t * @return Relative position\n\t */\n\tpublic coordinateToPosition(coordinate: number): number {\n\t\tconst renderer = this.get(\"renderer\");\n\t\treturn renderer.toAxisPosition(coordinate / renderer.axisLength());\n\t}\n\n\t/**\n\t * Converts relative position of the plot area to relative position of the\n\t * axis with zoom taken into account.\n\t *\n\t * @param position Position\n\t * @return Relative position\n\t */\n\tpublic toAxisPosition(position: number): number {\n\t\treturn this.get(\"renderer\").toAxisPosition(position);\n\t}\n\n\t/**\n\t * Converts relative position of the axis to a global position taking current\n\t * zoom into account (opposite to what `toAxisPosition` does).\n\t *\n\t * @since 5.4.2\n\t * @param position Position\n\t * @return Global position\n\t */\n\tpublic toGlobalPosition(position: number): number {\n\t\treturn this.get(\"renderer\").toGlobalPosition(position);\n\t}\n\n\t/**\n\t * Adjusts position with inversed taken into account.\n\t *\n\t * @ignore\n\t */\n\tpublic fixPosition(position: number): number {\n\t\treturn this.get(\"renderer\").fixPosition(position);\n\t}\n\n\t/**\n\t * Returns a data item from series that is closest to the `position`.\n\t *\n\t * @param series Series\n\t * @param position Relative position\n\t * @return Data item\n\t */\n\tpublic abstract getSeriesItem(series: XYSeries, position: number, location?: number): DataItem<IXYSeriesDataItem> | undefined\n\n\t/**\n\t * @ignore\n\t */\n\tpublic shouldGap(_dataItem: DataItem<IXYSeriesDataItem>, _nextItem: DataItem<IXYSeriesDataItem>, _autoGapCount: number, _fieldName: string): boolean {\n\t\treturn false;\n\t}\n\n\t/**\n\t * Creates and returns an axis range object.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/axis-ranges/} for more info\n\t * @param axisDataItem Axis data item\n\t * @return Axis range\n\t */\n\tpublic createAxisRange(axisDataItem: DataItem<IAxisDataItem>): DataItem<this[\"_dataItemSettings\"]> {\n\t\treturn this.axisRanges.push(axisDataItem);\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic _groupSeriesData(_series: XYSeries) { }\n\n\t/**\n\t * Returns relative position between two grid lines of the axis.\n\t *\n\t * @return Position\n\t */\n\tpublic getCellWidthPosition(): number {\n\t\treturn 0.05;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic abstract nextPosition(_count?:number):number\n}\n","import { Text, ITextSettings, ITextPrivate } from \"./Text\";\nimport * as $math from \"../util/Math\";\nimport type { IRadialText } from \"./backend/Renderer\";\n\n/**\n * @ignore\n */\nexport interface IRadialTextSettings extends ITextSettings {\n\ttextType?: \"regular\" | \"circular\" | \"radial\" | \"aligned\" | \"adjusted\";\n\tradius?: number;\n\tstartAngle?: number;\n\tinside?: boolean;\n\torientation?: \"inward\" | \"outward\" | \"auto\";\n\tkerning?: number;\n}\n\n/**\n * @ignore\n */\nexport interface IRadialTextPrivate extends ITextPrivate {\n}\n\n/**\n * @ignore\n */\nexport class RadialText extends Text {\n\n\tdeclare public _settings: IRadialTextSettings;\n\tdeclare public _privateSettings: IRadialTextPrivate;\n\n\tpublic _display: IRadialText = this._root._renderer.makeRadialText(\"\", this.textStyle);\n\n\tprotected _afterNew() {\n\t\tsuper._afterNew();\n\t}\n\n\tpublic static className: string = \"RadialText\";\n\tpublic static classNames: Array<string> = Text.classNames.concat([RadialText.className]);\n\n\tpublic _beforeChanged() {\n\t\tsuper._beforeChanged();\n\n\t\tthis._display.clear();\n\n\t\tif (this.isDirty(\"textType\")) {\n\t\t\tthis._display.textType = this.get(\"textType\");\n\t\t\tthis.markDirtyBounds();\n\t\t}\n\n\t\tif (this.isDirty(\"radius\")) {\n\t\t\tthis._display.radius = this.get(\"radius\");\n\t\t\tthis.markDirtyBounds();\n\t\t}\n\n\t\tif (this.isDirty(\"startAngle\")) {\n\t\t\tthis._display.startAngle = (this.get(\"startAngle\", 0)! + 90) * $math.RADIANS;\n\t\t\tthis.markDirtyBounds();\n\t\t}\n\n\t\tif (this.isDirty(\"inside\")) {\n\t\t\tthis._display.inside = this.get(\"inside\");\n\t\t\tthis.markDirtyBounds();\n\t\t}\n\n\t\tif (this.isDirty(\"orientation\")) {\n\t\t\tthis._display.orientation = this.get(\"orientation\");\n\t\t\tthis.markDirtyBounds();\n\t\t}\n\n\t\tif (this.isDirty(\"kerning\")) {\n\t\t\tthis._display.kerning = this.get(\"kerning\");\n\t\t\tthis.markDirtyBounds();\n\t\t}\n\t}\n\n}\n","// import * as $object from \"../util/Object\";\nimport { p50, Percent } from \"../util/Percent\";\nimport { Label, ILabelPrivate, ILabelSettings } from \"./Label\";\nimport { RadialText } from \"./RadialText\";\n\nimport * as $math from \"../util/Math\";\nimport * as $utils from \"../util/Utils\";\n\n\nexport interface IRadialLabelSettings extends ILabelSettings {\n\n\t/**\n\t * Pixel value to adjust radius with.\n\t *\n\t * Will add to (or subtract from if negative) whatever value `baseRadius` evaluates\n\t * to.\n\t */\n\tradius?: number;\n\n\t/**\n\t * Radius of the label's position.\n\t *\n\t * Can be either set in absolute pixel value, or percent.\n\t *\n\t * Relative value, depending on the situation, will most often mean its\n\t * position within certain circular object, like a slice: 0% meaning inner\n\t * edge, and 100% - the outer edge.\n\t *\n\t * @default 100%\n\t */\n\tbaseRadius?: number | Percent;\n\n\t/**\n\t * Label anngle in degrees.\n\t *\n\t * In most cases it will be set by the chart/series and does not need to\n\t * be set manually.\n\t */\n\tlabelAngle?: number;\n\n\t/**\n\t * Should the text \"face\" inward or outward from the arc the text is\n\t * following.\n\t *\n\t * `\"auto\"` means that facing will be chosen automatically based on the angle\n\t * to enhance readbility.\n\t *\n\t * Only applies if `type = \"circluar\"`.\n\t * \n\t * @default \"auto\"\n\t */\n\torientation?: \"inward\" | \"outward\" | \"auto\";\n\n\t/**\n\t * Should label be drawn inside (`true`) or outside (`false`) the arc.\n\t *\n\t * @default false\n\t */\n\tinside?: boolean;\n\n\t/**\n\t * Label type.\n\t *\n\t * * `\"regular\"` (default) - normal horizontal label.\n\t * * `\"circular\"` - arched label.\n\t * * `\"radial\"` - label radiating from the center of the arc.\n\t * * `\"aligned\"` - horizontal label aligned with other labels horizontally.\n\t * * `\"adjusted\"` - horizontal label adjusted in postion.\n\t *\n\t * **IMPORTANT!** If the label is used in a [[PieSeries]], its `alignLabels` setting\n\t * (default: `true`) takes precedence over `textType`. If you need to set this\n\t * to anything else than `regular`, make sure you also set `alignLabels: falese` on\n\t * `PieSeries`.\n\t *\n\t * @default \"regular\"\n\t */\n\ttextType?: \"regular\" | \"circular\" | \"radial\" | \"aligned\" | \"adjusted\";\n\n\t/**\n\t * Extra spacing between characters, in pixels.\n\t *\n\t * @default 0\n\t */\n\tkerning?: number;\n\n}\n\nexport interface IRadialLabelPrivate extends ILabelPrivate {\n\n\t/**\n\t * @ignore\n\t */\n\tleft?: boolean;\n\n\t/**\n\t * @ignore\n\t */\n\tradius?: number;\n\n\t/**\n\t * @ignore\n\t */\n\tinnerRadius?: number;\n\n}\n\nexport class RadialLabel extends Label {\n\n\tdeclare public _settings: IRadialLabelSettings;\n\tdeclare public _privateSettings: IRadialLabelPrivate;\n\n\tdeclare protected _text: RadialText;\n\n\tpublic static className: string = \"RadialLabel\";\n\tpublic static classNames: Array<string> = Label.classNames.concat([RadialLabel.className]);\n\n\tprotected _flipped: boolean = false;\n\n\tprotected _afterNew() {\n\t\tthis._textKeys.push(\"textType\", \"kerning\");\n\t\tsuper._afterNew();\n\t}\n\n\n\tpublic _makeText() {\n\t\tthis._text = this.children.push(RadialText.new(this._root, {}));\n\t}\n\n\t/**\n\t * Returns base radius in pixels.\n\t * \n\t * @return Base radius\n\t */\n\tpublic baseRadius(): number {\n\t\tconst radiusPrivate = this.getPrivate(\"radius\", 0);\n\t\tconst innerRadiusPrivate = this.getPrivate(\"innerRadius\", 0);\n\t\tconst baseRadius = this.get(\"baseRadius\", 0);\n\t\treturn innerRadiusPrivate + $utils.relativeToValue(baseRadius, radiusPrivate - innerRadiusPrivate);\n\t}\n\n\t/**\n\t * Returns radius adjustment in pixels.\n\t * \n\t * @return Radius\n\t */\n\tpublic radius(): number {\n\t\tconst inside = this.get(\"inside\", false);\n\t\treturn this.baseRadius() + this.get(\"radius\", 0) * (inside ? -1 : 1);\n\t}\n\n\tpublic _updateChildren() {\n\t\tsuper._updateChildren();\n\n\t\tif (this.isDirty(\"baseRadius\") || this.isPrivateDirty(\"radius\") || this.isPrivateDirty(\"innerRadius\") || this.isDirty(\"labelAngle\") || this.isDirty(\"radius\") || this.isDirty(\"inside\") || this.isDirty(\"orientation\") || this.isDirty(\"textType\")) {\n\n\t\t\tconst textType = this.get(\"textType\", \"adjusted\");\n\n\t\t\tconst inside = this.get(\"inside\", false);\n\n\t\t\tconst orientation = this.get(\"orientation\");\n\t\t\tlet labelAngle = $math.normalizeAngle(this.get(\"labelAngle\", 0));\n\n\t\t\tthis._text.set(\"startAngle\", this.get(\"labelAngle\", 0));\n\t\t\tthis._text.set(\"inside\", inside);\n\n\t\t\tconst sin = $math.sin(labelAngle);\n\t\t\tconst cos = $math.cos(labelAngle);\n\n\t\t\tlet baseRadius = this.baseRadius();\n\t\t\tlet radius = this.radius();\n\n\t\t\tthis._display.angle = 0;\n\n\t\t\tif (textType == \"circular\") {\n\n\t\t\t\tthis.setAll({\n\t\t\t\t\tpaddingTop: 0,\n\t\t\t\t\tpaddingBottom: 0,\n\t\t\t\t\tpaddingLeft: 0,\n\t\t\t\t\tpaddingRight: 0\n\t\t\t\t});\n\n\t\t\t\tthis.setRaw(\"x\", undefined);\n\t\t\t\tthis.setRaw(\"y\", undefined);\t\t\t\t\n\n\t\t\t\t// Circular labels are handled and positioned differently\n\n\t\t\t\tthis._text.set(\"orientation\", orientation);\n\t\t\t\tthis._text.set(\"radius\", radius);\n\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (baseRadius == 0) {\n\t\t\t\t\tlabelAngle = 0;\n\t\t\t\t\tradius = 0;\n\t\t\t\t}\n\n\t\t\t\t// Positioning of radial/regular labels are teh same\n\t\t\t\tlet x = radius * cos;\n\t\t\t\tlet y = radius * sin;\n\n\t\t\t\tif (textType == \"radial\") {\n\n\t\t\t\t\tthis.setRaw(\"x\", x);\n\t\t\t\t\tthis.setRaw(\"y\", y);\n\n\t\t\t\t\tif ((labelAngle < 90) || (labelAngle > 270) || orientation != \"auto\") {\n\t\t\t\t\t\tthis._display.angle = labelAngle;// + 90;\n\t\t\t\t\t\tthis._flipped = false;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tthis._display.angle = labelAngle + 180;\n\t\t\t\t\t\tthis._flipped = true;\n\t\t\t\t\t}\n\t\t\t\t\tthis._dirty.rotation = false;\n\t\t\t\t}\n\t\t\t\telse if (textType == \"adjusted\") {\n\t\t\t\t\tthis.setRaw(\"centerX\", p50);\n\t\t\t\t\tthis.setRaw(\"centerY\", p50);\n\t\t\t\t\tthis.setRaw(\"x\", x);\n\t\t\t\t\tthis.setRaw(\"y\", y);\n\t\t\t\t}\n\t\t\t\telse if (textType == \"regular\") {\n\t\t\t\t\tthis.setRaw(\"x\", x);\n\t\t\t\t\tthis.setRaw(\"y\", y);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.markDirtyPosition();\n\t\t\tthis.markDirtyBounds();\n\t\t}\n\t}\n\n\n\tpublic _updatePosition() {\n\n\t\tconst textType = this.get(\"textType\", \"regular\");\n\t\tconst inside = this.get(\"inside\", false);\n\n\t\tlet dx = 0;\n\t\tlet dy = 0;\n\t\tlet labelAngle = this.get(\"labelAngle\", 0);\n\t\tlet bounds = this.localBounds();\n\t\tlet w = bounds.right - bounds.left;\n\t\tlet h = bounds.bottom - bounds.top;\n\n\t\tif (textType == \"radial\") {\n\t\t\tif (this._flipped) {\n\t\t\t\tlet centerX = this.get(\"centerX\");\n\t\t\t\tif (centerX instanceof Percent) {\n\t\t\t\t\tw = w * (1 - centerX.value * 2);\n\t\t\t\t}\n\n\t\t\t\tdx = w * $math.cos(labelAngle);\n\t\t\t\tdy = w * $math.sin(labelAngle);\n\t\t\t}\n\t\t}\n\t\telse if (!inside && textType == \"adjusted\") {\n\t\t\tdx = w / 2 * $math.cos(labelAngle);\n\t\t\tdy = h / 2 * $math.sin(labelAngle);\n\t\t}\n\n\n\t\tthis.setRaw(\"dx\", dx);\n\t\tthis.setRaw(\"dy\", dy);\n\n\t\tsuper._updatePosition();\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic get text(): RadialText {\n\t\treturn this._text;\n\t}\n\n}\n","import { RadialLabel, IRadialLabelSettings, IRadialLabelPrivate } from \"../../../core/render/RadialLabel\";\nimport type { IPoint } from \"../../../core/util/IPoint\";\n\nexport interface IAxisLabelRadialSettings extends IRadialLabelSettings {\n\n\t/**\n\t * Relative location of the label within the cell.\n\t *\n\t * `0` - beginning, `0.5` - middle, `1` - end.\n\t */\n\tlocation?: number;\n\n\t/**\n\t * Relative location of the label within the cell when it spans multiple\n\t * intervals.\n\t *\n\t * `0` - beginning, `0.5` - middle, `1` - end.\n\t */\n\tmultiLocation?: number;\n\n\t/**\n\t * The minimum relative position within visible axis scope the label can\n\t * appear on.\n\t *\n\t * E.g. `0.1` will mean that label will not be shown if it's closer to the\n\t * beginning of the axis than 10%.\n\t *\n\t * @default 0\n\t */\n\tminPosition?: number;\n\n\t/**\n\t * The maximum relative position within visible axis scope the label can\n\t * appear on.\n\t *\n\t * E.g. `0.9` will mean that label will not be shown if it's closer to the\n\t * end of the axis than 10%.\n\t *\n\t * @default 0\n\t */\n\tmaxPosition?: number;\n\n}\n\nexport interface IAxisLabelRadialPrivate extends IRadialLabelPrivate {\n}\n\n/**\n * Draws a label on a circular axis.\n *\n * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/#Labels} for more info\n */\nexport class AxisLabelRadial extends RadialLabel {\n\n\tdeclare public _settings: IAxisLabelRadialSettings;\n\tdeclare public _privateSettings: IAxisLabelRadialPrivate;\n\n\tpublic static className: string = \"AxisLabelRadial\";\n\tpublic static classNames: Array<string> = RadialLabel.classNames.concat([AxisLabelRadial.className]);\n\n\tpublic _tickPoints: Array<IPoint> = [];\n\n}\n","/** @ignore *//** */\n\nimport type { IPoint } from \"./IPoint\"\nimport * as $math from \"./Math\";\nimport type { IGraphics } from \"../render/backend/Renderer\";\n\n/**\n * @ignore\n */\nexport function segmentedLine(display: IGraphics, segments: Array<Array<Array<IPoint>>>) {\n\tfor (let s = 0, len = segments.length; s < len; s++) {\n\t\tconst groups = segments[s];\n\t\tif (groups.length > 0) {\n\t\t\tlet firstGroup = groups[0];\n\t\t\tif (firstGroup.length > 0) {\n\t\t\t\tlet firstPoint = firstGroup[0];\n\t\t\t\tdisplay.moveTo(firstPoint.x, firstPoint.y);\n\t\t\t\tfor (let g = 0, len = groups.length; g < len; g++) {\n\t\t\t\t\tline(display, groups[g]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * @ignore\n */\nexport function line(display: IGraphics, points: Array<IPoint>) {\n\tfor (let p = 0, len = points.length; p < len; p++) {\n\t\tconst point = points[p];\n\t\tdisplay.lineTo(point.x, point.y);\n\t}\n}\n\n/**\n * @ignore\n */\nexport function moveTo(display: IGraphics, point: IPoint) {\n\tdisplay.moveTo(point.x, point.y);\n}\n\n/**\n * @ignore\n */\nexport function clear(display: IGraphics) {\n\tdisplay.clear();\n}\n\n/**\n * @ignore\n */\nexport function smoothedSegmentedline(display: IGraphics, segments: Array<Array<Array<IPoint>>>, tensionX: number, tensionY: number) {\n\tfor (let s = 0, len = segments.length; s < len; s++) {\n\t\tconst groups = segments[s];\n\t\tif (groups.length > 0) {\n\t\t\tlet firstGroup = groups[0];\n\t\t\tif (firstGroup.length > 0) {\n\t\t\t\tlet firstPoint = firstGroup[0];\n\t\t\t\tdisplay.moveTo(firstPoint.x, firstPoint.y);\n\t\t\t\tfor (let g = 0, len = groups.length; g < len; g++) {\n\t\t\t\t\tconst points = groups[g];\n\t\t\t\t\tif (points.length > 0) {\n\t\t\t\t\t\tdisplay.lineTo(points[0].x, points[0].y)\n\t\t\t\t\t}\n\t\t\t\t\tsmoothedLine(display, points, tensionX, tensionY);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * @ignore\n */\nexport function smoothedLine(display: IGraphics, points: Array<IPoint>, tensionX: number, tensionY: number) {\n\n\tfor (let i = points.length - 1; i > 0; i--) {\n\t\tlet p0 = points[i];\n\t\tlet p1 = points[i - 1];\n\n\t\tif (Math.abs(p0.x - p1.x) < 0.1 && Math.abs(p0.y - p1.y) < 0.1) {\n\t\t\tpoints.splice(i - 1, 1);\n\t\t}\n\t}\n\n\tif (points.length < 3 || (tensionX >= 1 && tensionY >= 1)) {\n\t\tline(display, points);\n\t\treturn;\n\t}\n\n\ttensionX = 1 - tensionX + 0.00001;\n\ttensionY = 1 - tensionY + 0.00001;\n\n\tlet first = points[0];\n\tlet last = points[points.length - 1];\n\n\tlet closed: boolean = false;\n\n\tif ($math.round(first.x, 3) == $math.round(last.x) && $math.round(first.y) == $math.round(last.y)) {\n\t\tclosed = true;\n\t}\n\n\t// Can't moveTo here, as it wont be possible to have fill then.\n\tlet path: string = \"\";\n\n\tfor (let i = 0, len = points.length - 1; i < len; i++) {\n\t\tlet p0: IPoint = points[i - 1];\n\n\t\tlet p1: IPoint = points[i];\n\n\t\tlet p2: IPoint = points[i + 1];\n\n\t\tlet p3: IPoint = points[i + 2];\n\n\t\tif (i === 0) {\n\t\t\tif (closed) {\n\t\t\t\tp0 = points[len - 2];\n\t\t\t}\n\t\t\telse {\n\t\t\t\tp0 = points[0];\n\t\t\t}\n\t\t} else if (i == len - 1) {\n\t\t\tif (closed) {\n\t\t\t\tp3 = points[1];\n\t\t\t}\n\t\t\telse {\n\t\t\t\tp3 = p2;\n\t\t\t}\n\t\t}\n\n\n\t\tlet controlPointA = $math.getCubicControlPointA(p0, p1, p2, tensionX, tensionY);\n\t\tlet controlPointB = $math.getCubicControlPointB(p1, p2, p3, tensionX, tensionY);\n\n\t\tdisplay.bezierCurveTo(controlPointA.x, controlPointA.y, controlPointB.x, controlPointB.y, p2.x, p2.y);\n\t}\n\n\treturn path;\n}\n","import { Graphics, IGraphicsSettings, IGraphicsPrivate } from \"./Graphics\";\nimport type { IPoint } from \"../util/IPoint\";\nimport * as $draw from \"../util/Draw\";\n\nexport interface ILineSettings extends IGraphicsSettings {\n\n\t/**\n\t * A list of [[IPoint]] (x/y coordinates) points for the line.\n\t */\n\tpoints?: Array<IPoint>;\n\n\t/**\n\t * A list of [[IPoint]] arrays for different segments of the line.\n\t * \n\t * @since 5.1.4\n\t */\n\tsegments?: Array<Array<Array<IPoint>>>;\n}\n\nexport interface ILinePrivate extends IGraphicsPrivate {\n}\n\n/**\n * Draws a line.\n *\n * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/graphics/} for more info\n * @important\n */\nexport class Line extends Graphics {\n\n\tdeclare public _settings: ILineSettings;\n\tdeclare public _privateSettings: ILinePrivate;\n\n\tpublic static className: string = \"Line\";\n\tpublic static classNames: Array<string> = Graphics.classNames.concat([Line.className]);\n\n\tpublic _beforeChanged() {\n\t\tsuper._beforeChanged();\n\n\t\tif (this.isDirty(\"points\") || this.isDirty(\"segments\") || this._sizeDirty || this.isPrivateDirty(\"width\") || this.isPrivateDirty(\"height\")) {\n\t\t\tthis._clear = true;\n\t\t}\n\t}\n\n\tpublic _changed() {\n\t\tsuper._changed();\n\n\t\tif (this._clear) {\n\n\t\t\tconst points = this.get(\"points\");\n\t\t\tconst segments = this.get(\"segments\");\n\n\t\t\tif (points && points.length > 0) {\n\t\t\t\tlet point = points[0];\n\n\t\t\t\tthis._display.moveTo(point.x, point.y);\n\t\t\t\t$draw.segmentedLine(this._display, [[points]]);\n\t\t\t}\n\t\t\telse if (segments) {\n\t\t\t\t$draw.segmentedLine(this._display, segments);\n\t\t\t}\n\t\t\telse if (!this.get(\"draw\")) {\n\t\t\t\tlet w = this.width();\n\t\t\t\tlet h = this.height();\n\n\t\t\t\tthis._display.moveTo(0, 0);\n\t\t\t\tthis._display.lineTo(w, h);\n\t\t\t}\n\t\t}\n\t}\n}\n","import { Line, ILineSettings, ILinePrivate } from \"./Line\";\n\n\nexport interface ITickSettings extends ILineSettings {\n\n\t/**\n\t * Length in pixels.\n\t */\n\tlength?: number;\n\n\t/**\n\t * Location within target space. 0 - beginning, 1 - end.\n\t */\n\tlocation?: number;\n\n}\n\nexport interface ITickPrivate extends ILinePrivate {\n}\n\n/**\n * Draws a tick element (mostly used on axes).\n *\n * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/graphics/} for more info\n */\nexport class Tick extends Line {\n\n\tdeclare public _settings: ITickSettings;\n\tdeclare public _privateSettings: ITickPrivate;\n\n\tpublic static className: string = \"Tick\";\n\tpublic static classNames: Array<string> = Line.classNames.concat([Tick.className]);\n}\n","import type { IPoint } from \"../../../core/util/IPoint\";\n\nimport { Tick, ITickSettings, ITickPrivate } from \"../../../core/render/Tick\";\n\n\nexport interface IAxisTickSettings extends ITickSettings {\n\n\t/**\n\t * Relative location of the tick within the cell.\n\t *\n\t * `0` - beginning, `0.5` - middle, `1` - end.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/#Location_of_axis_elements} for more info\n\t */\n\tlocation?: number;\n\n\t/**\n\t * Relative location of the tick within the cell when it spans multiple\n\t * intervals.\n\t *\n\t * `0` - beginning, `0.5` - middle, `1` - end.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/#Multi_location} for more info\n\t */\n\tmultiLocation?: number;\n\n\t/**\n\t * If set to `true` the tick will be shown inside plot area.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/#Labels_ticks_inside_plot_area} for more info\n\t * @default false\n\t */\n\tinside?: boolean | undefined;\n\n\t/**\n\t * The minimum relative position within visible axis scope the tick can\n\t * appear on.\n\t *\n\t * E.g. `0.1` will mean that tick will not be shown if it's closer to the\n\t * beginning of the axis than 10%.\n\t *\n\t * @default 0\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/#Start_end_labels_and_ticks} for more info\n\t */\n\tminPosition?: number;\n\n\t/**\n\t * The maximum relative position within visible axis scope the tick can\n\t * appear on.\n\t *\n\t * E.g. `0.9` will mean that tick will not be shown if it's closer to the\n\t * end of the axis than 10%.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/#Start_end_labels_and_ticks} for more info\n\t * @default 1\n\t */\n\tmaxPosition?: number;\n\n}\n\nexport interface IAxisTickPrivate extends ITickPrivate {\n}\n\n/**\n * Draws an axis tick.\n *\n * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/#Ticks} for more info\n * @important\n */\nexport class AxisTick extends Tick {\n\n\tdeclare public _settings: IAxisTickSettings;\n\tdeclare public _privateSettings: IAxisTickPrivate;\n\n\tprotected _tickPoints: Array<IPoint> = [];\n\n\tpublic static className: string = \"AxisTick\";\n\tpublic static classNames: Array<string> = Tick.classNames.concat([AxisTick.className]);\n}\n","import { Graphics, IGraphicsPrivate, IGraphicsSettings } from \"../../../core/render/Graphics\";\n\nexport interface IGridSettings extends IGraphicsSettings {\n\n\t/**\n\t * Relative location of the grid line within the cell.\n\t *\n\t * `0` - beginning, `0.5` - middle, `1` - end.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/#Location_of_axis_elements} for more info\n\t */\n\tlocation?: number;\n\n}\n\nexport interface IGridPrivate extends IGraphicsPrivate {\n}\n\n/**\n * Creates an axis grid line.\n *\n * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/#Grid} for more info\n * @important\n */\nexport class Grid extends Graphics {\n\n\tdeclare public _settings: IGridSettings;\n\tdeclare public _privateSettings: IGridPrivate;\n\n\tpublic static className: string = \"Grid\";\n\tpublic static classNames: Array<string> = Graphics.classNames.concat([Grid.className]);\n\n\tpublic _beforeChanged() {\n\t\tsuper._beforeChanged();\n\n\t\tif (this.isPrivateDirty(\"width\") || this.isPrivateDirty(\"height\")) {\n\t\t\tthis._clear = true;\n\t\t}\n\t}\n}\n","import { Label, ILabelSettings, ILabelPrivate } from \"../../../core/render/Label\";\nimport type { IPoint } from \"../../../core/util/IPoint\";\n\nexport interface IAxisLabel extends Label {\n\n\t/**\n\t * Relative location of the label within the cell.\n\t *\n\t * `0` - beginning, `0.5` - middle, `1` - end.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/#Location_of_axis_elements} for more info\n\t */\n\tlocation?: number;\n\n\t/**\n\t * Relative location of the label within the cell when it spans multiple\n\t * intervals.\n\t *\n\t * `0` - beginning, `0.5` - middle, `1` - end.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/#Multi_location} for more info\n\t */\n\tmultiLocation?: number;\n\n\t/**\n\t * If set to `true` the label will be shown inside plot area.\n\t *\n\t * @default false\n\t */\n\tinside?: boolean | undefined;\n\n\t/**\n\t * The minimum relative position within visible axis scope the label can\n\t * appear on.\n\t *\n\t * E.g. `0.1` will mean that label will not be shown if it's closer to the\n\t * beginning of the axis than 10%.\n\t *\n\t * @default 0\n\t */\n\tminPosition?: number;\n\n\t/**\n\t * The maximum relative position within visible axis scope the label can\n\t * appear on.\n\t *\n\t * E.g. `0.9` will mean that label will not be shown if it's closer to the\n\t * end of the axis than 10%.\n\t *\n\t * @default 0\n\t */\n\tmaxPosition?: number;\n\n\t_tickPoints: Array<IPoint>;\n}\n\n\nexport interface IAxisLabelSettings extends ILabelSettings {\n\n\t/**\n\t * Relative location of the label within the cell.\n\t *\n\t * `0` - beginning, `0.5` - middle, `1` - end.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/#Location_of_axis_elements} for more info\n\t */\n\tlocation?: number;\n\n\t/**\n\t * Relative location of the label within the cell when it spans multiple\n\t * intervals.\n\t *\n\t * `0` - beginning, `0.5` - middle, `1` - end.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/#Multi_location} for more info\n\t */\n\tmultiLocation?: number;\n\n\t/**\n\t * If set to `true` the label will be shown inside plot area.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/#Labels_ticks_inside_plot_area} for more info\n\t * @default false\n\t */\n\tinside?: boolean | undefined;\n\n\t/**\n\t * The minimum relative position within visible axis scope the label can\n\t * appear on.\n\t *\n\t * E.g. `0.1` will mean that label will not be shown if it's closer to the\n\t * beginning of the axis than 10%.\n\t *\n\t * @default 0\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/#Start_end_labels_and_ticks} for more info\n\t */\n\tminPosition?: number;\n\n\t/**\n\t * The maximum relative position within visible axis scope the label can\n\t * appear on.\n\t *\n\t * E.g. `0.9` will mean that label will not be shown if it's closer to the\n\t * end of the axis than 10%.\n\t *\n\t * @default 1\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/#Start_end_labels_and_ticks} for more info\n\t */\n\tmaxPosition?: number;\n\n}\n\nexport interface IAxisLabelPrivate extends ILabelPrivate {\n}\n\n/**\n * Draws an axis label.\n *\n * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/#Labels} for more info\n * @important\n */\nexport class AxisLabel extends Label implements IAxisLabel {\n\n\tdeclare public _settings: IAxisLabelSettings;\n\tdeclare public _privateSettings: IAxisLabelPrivate;\n\n\tpublic _tickPoints: Array<IPoint> = [];\n\n\tpublic static className: string = \"AxisLabel\";\n\tpublic static classNames: Array<string> = Label.classNames.concat([AxisLabel.className]);\n}\n","import type { Sprite, ISpritePointerEvent } from \"../../../core/render/Sprite\";\nimport { Graphics, IGraphicsSettings, IGraphicsPrivate } from \"../../../core/render/Graphics\";\nimport type { Axis, IAxisDataItem } from \"./Axis\";\nimport { Template } from \"../../../core/util/Template\";\nimport { ListTemplate } from \"../../../core/util/List\";\nimport { AxisTick } from \"./AxisTick\";\nimport { Grid } from \"./Grid\";\nimport { AxisLabel } from \"./AxisLabel\";\nimport type { IPoint } from \"../../../core/util/IPoint\";\nimport type { Tooltip } from \"../../../core/render/Tooltip\";\nimport type { AxisBullet } from \"./AxisBullet\";\nimport type { XYChart } from \"../XYChart\";\nimport type { DataItem } from \"../../../core/render/Component\";\nimport * as $utils from \"../../../core/util/Utils\";\n\nexport interface IAxisRendererSettings extends IGraphicsSettings {\n\n\t/**\n\t * The minimum distance between grid lines in pixels.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/#Grid_density} for more info\n\t */\n\tminGridDistance?: number;\n\n\t/**\n\t * Re-enable display of skipped grid lines due to lack of space and as per\n\t * the `minGridDistance` setting. Not recommended for CategoryAxis with a lot of data items.\n\t *\n\t * @default false\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/#Minor_grid} for more info\n\t * @since 5.6.0\n\t */\n\tminorGridEnabled?: boolean;\n\n\t/**\n\t * Enable labels on minor grid. If you enable labels, grid will be enabled automatically.\n\t *\n\t * @default false\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/#Enabling_minor_grid_labels} for more info\n\t * @since 5.6.0\n\t */\n\tminorLabelsEnabled?: boolean;\n\n\t/**\n\t * Set to `true` to invert direction of the axis.\n\t *\n\t * @default false\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/#Inversed_axes} for more info\n\t */\n\tinversed?: boolean;\n\n\t/**\n\t * Indicates relative position where \"usable\" space of the cell starts.\n\t *\n\t * `0` - beginning, `1` - end, or anything in-between.\n\t *\n\t * @default 0\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/#Cell_start_end_locations} for more info\n\t */\n\tcellStartLocation?: number;\n\n\t/**\n\t * Indicates relative position where \"usable\" space of the cell ends.\n\t *\n\t * `0` - beginning, `1` - end, or anything in-between.\n\t *\n\t * @default 1\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/#Cell_start_end_locations} for more info\n\t */\n\tcellEndLocation?: number;\n\n\t/**\n\t * If set to `\"zoom\"` will enable axis zoom by panning it in the axis label\n\t * area.\n\t *\n\t * Works on [[AxisRendererX]] and [[AxisRendererY]] only.\n\t *\n\t * For a better result, set `maxDeviation` to `1` or so on the Axis.\n\t *\n\t * Will not work if `inside` is set to `true`.\n\t *\n\t * @since 5.0.7\n\t * @default \"none\"\n\t */\n\tpan?: \"none\" | \"zoom\"\n\n\n\t/**\n\t * Sensitivity of panning. The higher the number, the more sensitive it is.\n\t *\n\t * @default 1\n\t */\n\tpanSensitivity?: number;\n\n}\n\nexport interface IAxisRendererPrivate extends IGraphicsPrivate {\n\t/**\n\t * @ignore\n\t */\n\tletter?: \"X\" | \"Y\";\n}\n\n/**\n * Base class for an axis renderer.\n *\n * Should not be used on its own.\n *\n * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/#Axis_renderer} for more info\n */\nexport abstract class AxisRenderer extends Graphics {\n\tpublic static className: string = \"AxisRenderer\";\n\tpublic static classNames: Array<string> = Graphics.classNames.concat([AxisRenderer.className]);\n\n\t// save for quick access\n\tpublic _axisLength: number = 100;\n\tpublic _start: number = 0;\n\tpublic _end: number = 1;\n\tpublic _inversed: boolean = false;\n\n\tprotected _minSize: number = 0;\n\n\t/**\n\t * Chart the renderer is used in.\n\t */\n\tpublic chart: XYChart | undefined;\n\n\tprotected _lc = 1;\n\n\tprotected _ls = 0;\n\n\tprotected _thumbDownPoint?: IPoint;\n\n\tprotected _downStart?: number;\n\tprotected _downEnd?: number;\n\n\t/**\n\t * @ignore\n\t */\n\tpublic makeTick(dataItem: DataItem<IAxisDataItem>, themeTags: Array<string>): AxisTick {\n\t\tconst tick = this.ticks.make();\n\t\ttick._setDataItem(dataItem);\n\t\tdataItem.setRaw(\"tick\", tick);\n\t\ttick.set(\"themeTags\", $utils.mergeTags(tick.get(\"themeTags\"), themeTags));\n\t\tthis.axis.labelsContainer.children.push(tick);\n\t\tthis.ticks.push(tick);\n\t\treturn tick;\n\t}\n\n\t/**\n\t * A list of ticks in the axis.\n\t *\n\t * `ticks.template` can be used to configure ticks.\n\t *\n\t * @default new ListTemplate<AxisTick>\n\t */\n\tpublic readonly ticks: ListTemplate<AxisTick> = this.addDisposer(new ListTemplate(\n\t\tTemplate.new({}),\n\t\t() => AxisTick._new(this._root, {\n\t\t\tthemeTags: $utils.mergeTags(this.ticks.template.get(\"themeTags\", []), this.get(\"themeTags\", []))\n\t\t}, [this.ticks.template])\n\t));\n\n\t/**\n\t * @ignore\n\t */\n\tpublic makeGrid(dataItem: DataItem<IAxisDataItem>, themeTags: Array<string>): Grid {\n\t\tconst grid = this.grid.make();\n\t\tgrid._setDataItem(dataItem);\n\t\tdataItem.setRaw(\"grid\", grid);\n\t\tgrid.set(\"themeTags\", $utils.mergeTags(grid.get(\"themeTags\"), themeTags));\n\n\t\tthis.axis.gridContainer.children.push(grid);\n\t\tthis.grid.push(grid);\n\t\treturn grid;\n\t}\n\n\t/**\n\t * A list of grid elements in the axis.\n\t *\n\t * `grid.template` can be used to configure grid.\n\t *\n\t * @default new ListTemplate<Grid>\n\t */\n\tpublic readonly grid: ListTemplate<Grid> = this.addDisposer(new ListTemplate(\n\t\tTemplate.new({}),\n\t\t() => Grid._new(this._root, {\n\t\t\tthemeTags: $utils.mergeTags(this.grid.template.get(\"themeTags\", []), this.get(\"themeTags\", []))\n\t\t}, [this.grid.template])\n\t));\n\n\t/**\n\t * @ignore\n\t */\n\tpublic makeAxisFill(dataItem: DataItem<IAxisDataItem>, themeTags: Array<string>): Grid {\n\t\tconst axisFill = this.axisFills.make();\n\t\taxisFill._setDataItem(dataItem);\n\t\taxisFill.set(\"themeTags\", $utils.mergeTags(axisFill.get(\"themeTags\"), themeTags));\n\n\t\tthis.axis.gridContainer.children.push(axisFill);\n\t\tdataItem.setRaw(\"axisFill\", axisFill);\n\t\tthis.axisFills.push(axisFill);\n\t\treturn axisFill;\n\t}\n\n\t/**\n\t * A list of fills in the axis.\n\t *\n\t * `axisFills.template` can be used to configure axis fills.\n\t *\n\t * @default new ListTemplate<Graphics>\n\t */\n\tpublic readonly axisFills: ListTemplate<Graphics> = this.addDisposer(new ListTemplate(\n\t\tTemplate.new({}),\n\t\t() => Graphics._new(this._root, {\n\t\t\tthemeTags: $utils.mergeTags(this.axisFills.template.get(\"themeTags\", [\"axis\", \"fill\"]), this.get(\"themeTags\", []))\n\t\t}, [this.axisFills.template])\n\t));\n\n\t/**\n\t * @ignore\n\t */\n\tpublic makeLabel(dataItem: DataItem<IAxisDataItem>, themeTags: Array<string>): AxisLabel {\n\n\t\tconst label = this.labels.make();\n\n\t\tlabel.set(\"themeTags\", $utils.mergeTags(label.get(\"themeTags\"), themeTags));\n\t\tthis.axis.labelsContainer.children.moveValue(label, 0);\n\n\t\tlabel._setDataItem(dataItem);\n\t\tdataItem.setRaw(\"label\", label);\n\t\tthis.labels.push(label);\n\t\treturn label;\n\t}\n\n\t/**\n\t * A list of labels in the axis.\n\t *\n\t * `labels.template` can be used to configure axis labels.\n\t *\n\t * @default new ListTemplate<AxisLabel>\n\t */\n\tpublic readonly labels: ListTemplate<AxisLabel> = this.addDisposer(new ListTemplate(\n\t\tTemplate.new({}),\n\t\t() => AxisLabel._new(this._root, {\n\t\t\tthemeTags: $utils.mergeTags(this.labels.template.get(\"themeTags\", []), this.get(\"themeTags\", []))\n\t\t}, [this.labels.template])\n\t));\n\n\n\tdeclare public _settings: IAxisRendererSettings;\n\tdeclare public _privateSettings: IAxisRendererPrivate;\n\n\t/**\n\t * An [[Axis]] renderer is for.\n\t */\n\tpublic axis!: Axis<this>;\n\n\tpublic axisLength(): number {\n\t\treturn 0;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic gridCount(): number {\n\t\treturn this.axisLength() / this.get(\"minGridDistance\", 50);\n\t}\n\n\tpublic _updatePositions() {\n\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic abstract updateLabel(_label?: AxisLabel, _position?: number, _endPosition?: number, _count?: number): void;\n\n\t/**\n\t * @ignore\n\t */\n\tpublic abstract updateGrid(_grid?: Grid, _position?: number, _endPosition?: number): void;\n\n\t/**\n\t * @ignore\n\t */\n\tpublic abstract updateTick(_grid?: AxisTick, _position?: number, _endPosition?: number, _count?: number): void;\n\n\t/**\n\t * @ignore\n\t */\n\tpublic abstract updateFill(_fill?: Graphics, _position?: number, _endPosition?: number): void;\n\n\t/**\n\t * @ignore\n\t */\n\tpublic abstract updateBullet(_bullet?: AxisBullet, _position?: number, _endPosition?: number): void;\n\n\t/**\n\t * @ignore\n\t */\n\tpublic abstract positionToPoint(_position: number): IPoint;\n\n\n\t/**\n\t * A thumb Graphics to be used for panning the axis (the one which shows under the labels when hovered)\n\t */\n\tpublic readonly thumb?: Graphics;\n\n\tprotected _afterNew() {\n\t\tsuper._afterNew();\n\t\tthis.set(\"isMeasured\", false);\n\n\t\tconst thumb = this.thumb;\n\t\tif (thumb) {\n\t\t\tthis._disposers.push(thumb.events.on(\"pointerdown\", (event) => {\n\t\t\t\tthis._handleThumbDown(event);\n\t\t\t}));\n\n\t\t\tthis._disposers.push(thumb.events.on(\"globalpointerup\", (event) => {\n\t\t\t\tthis._handleThumbUp(event);\n\t\t\t}));\n\n\t\t\tthis._disposers.push(thumb.events.on(\"globalpointermove\", (event) => {\n\t\t\t\tthis._handleThumbMove(event);\n\t\t\t}));\n\t\t}\n\t}\n\n\tpublic _beforeChanged() {\n\t\tsuper._beforeChanged();\n\t\tif (this.isDirty(\"minGridDistance\")) {\n\t\t\tthis.root.events.once(\"frameended\", () => {\n\t\t\t\tthis.axis.markDirtySize();\n\t\t\t})\n\t\t}\n\t}\n\n\n\tpublic _changed() {\n\t\tsuper._changed();\n\n\t\tif (this.isDirty(\"pan\")) {\n\t\t\tconst thumb = this.thumb;\n\t\t\tif (thumb) {\n\t\t\t\tconst labelsContainer = this.axis.labelsContainer;\n\t\t\t\tconst pan = this.get(\"pan\");\n\t\t\t\tif (pan == \"zoom\") {\n\t\t\t\t\tlabelsContainer.children.push(thumb);\n\t\t\t\t}\n\t\t\t\telse if (pan == \"none\") {\n\t\t\t\t\tlabelsContainer.children.removeValue(thumb);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected _handleThumbDown(event: ISpritePointerEvent) {\n\t\tthis._thumbDownPoint = this.toLocal(event.point);\n\t\tconst axis = this.axis;\n\t\tthis._downStart = axis.get(\"start\");\n\t\tthis._downEnd = axis.get(\"end\");\n\t}\n\n\tprotected _handleThumbUp(_event: ISpritePointerEvent) {\n\t\tthis._thumbDownPoint = undefined;\n\t}\n\n\tprotected _handleThumbMove(event: ISpritePointerEvent) {\n\t\tconst downPoint = this._thumbDownPoint;\n\t\tif (downPoint) {\n\t\t\tconst point = this.toLocal(event.point);\n\n\t\t\tconst downStart = this._downStart!;\n\t\t\tconst downEnd = this._downEnd!;\n\t\t\tconst extra = this._getPan(point, downPoint) * Math.min(1, (downEnd - downStart)) / 2 * this.get(\"panSensitivity\", 1);\n\t\t\tthis.axis.zoom(downStart - extra, downEnd + extra, 0);\n\t\t}\n\t}\n\n\tprotected _getPan(_point1: IPoint, _point2: IPoint): number {\n\t\treturn 0;\n\t}\n\n\t/**\n\t * Converts relative position (0-1) on axis to a pixel coordinate.\n\t *\n\t * @param position Position (0-1)\n\t * @return Coordinate (px)\n\t */\n\tpublic positionToCoordinate(position: number): number {\n\t\tif (this._inversed) {\n\t\t\treturn (this._end - position) * this._axisLength;\n\t\t}\n\t\telse {\n\t\t\treturn (position - this._start) * this._axisLength;\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic abstract positionTooltip(_tooltip: Tooltip, _position: number): void;\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateTooltipBounds(_tooltip: Tooltip) { }\n\n\tpublic _updateSize() {\n\t\tthis.markDirty()\n\t\tthis._clear = true;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic toAxisPosition(position: number): number {\n\t\tconst start = this._start || 0;\n\t\tconst end = this._end || 1;\n\n\t\tposition = position * (end - start);\n\t\tif (!this.get(\"inversed\")) {\n\t\t\tposition = start + position;\n\t\t}\n\t\telse {\n\t\t\tposition = end - position;\n\t\t}\n\n\t\treturn position;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic toGlobalPosition(position: number): number {\n\t\tconst start = this._start || 0;\n\t\tconst end = this._end || 1;\n\n\t\tif (!this.get(\"inversed\")) {\n\t\t\tposition = position - start;\n\t\t}\n\t\telse {\n\t\t\tposition = end - position;\n\t\t}\n\n\t\tposition = position / (end - start);\n\n\t\treturn position;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic fixPosition(position: number) {\n\t\tif (this.get(\"inversed\")) {\n\t\t\treturn 1 - position;\n\t\t}\n\t\treturn position;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic _updateLC() {\n\n\t}\n\n\tprotected toggleVisibility(sprite: Sprite, position: number, minPosition: number, maxPosition: number): void {\n\t\tlet axis = this.axis;\n\n\t\tconst start = axis.get(\"start\", 0);\n\t\tconst end = axis.get(\"end\", 1);\n\n\t\tlet updatedStart = start + (end - start) * (minPosition - 0.0001);\n\t\tlet updatedEnd = start + (end - start) * (maxPosition + 0.0001);\n\n\t\tif (position < updatedStart || position > updatedEnd) {\n\t\t\tsprite.setPrivate(\"visible\", false);\n\t\t}\n\t\telse {\n\t\t\tsprite.setPrivate(\"visible\", true);\n\t\t}\n\t}\n\n\tprotected _positionTooltip(tooltip: Tooltip, point: IPoint) {\n\t\tconst chart = this.chart;\n\t\tif (chart) {\n\t\t\ttooltip.set(\"pointTo\", this._display.toGlobal(point));\n\t\t\tif (!chart.inPlot(point)) {\n\t\t\t\ttooltip.hide();\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic processAxis() { }\n}\n","import { AxisRenderer, IAxisRendererSettings, IAxisRendererPrivate } from \"./AxisRenderer\";\nimport { p100 } from \"../../../core/util/Percent\";\nimport type { IPoint } from \"../../../core/util/IPoint\";\nimport * as $type from \"../../../core/util/Type\";\nimport * as $utils from \"../../../core/util/Utils\";\nimport type { AxisLabel } from \"./AxisLabel\";\nimport type { Grid } from \"./Grid\";\nimport type { AxisTick } from \"./AxisTick\";\nimport type { Graphics } from \"../../../core/render/Graphics\";\nimport type { Tooltip } from \"../../../core/render/Tooltip\";\nimport type { Template } from \"../../../core/util/Template\";\nimport type { AxisBullet } from \"./AxisBullet\";\nimport { Rectangle } from \"../../../core/render/Rectangle\";\n\n\nexport interface IAxisRendererXSettings extends IAxisRendererSettings {\n\n\t/**\n\t * If set to `true` the axis will be drawn on the opposite side of the plot\n\t * area.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/#Axis_position} for more info\n\t * @default false\n\t */\n\topposite?: boolean;\n\n\t/**\n\t * If set to `true`, all axis elements (ticks, labels) will be drawn inside\n\t * plot area.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/#Labels_ticks_inside_plot_area} for more info\n\t * @default false\n\t */\n\tinside?: boolean;\n}\n\nexport interface IAxisRendererXPrivate extends IAxisRendererPrivate {\n}\n\n/**\n * Used to render horizontal axis.\n *\n * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/#Axis_renderer} for more info\n * @important\n */\nexport class AxisRendererX extends AxisRenderer {\n\n\tpublic static className: string = \"AxisRendererX\";\n\tpublic static classNames: Array<string> = AxisRenderer.classNames.concat([AxisRendererX.className]);\n\n\tdeclare public _settings: IAxisRendererXSettings;\n\tdeclare public _privateSettings: IAxisRendererXPrivate;\n\n\tdeclare public readonly labelTemplate: Template<AxisLabel>;\n\n\tpublic thumb: Rectangle = Rectangle.new(this._root, { width: p100, isMeasured: false, themeTags: [\"axis\", \"x\", \"thumb\"] });\n\n\tpublic _afterNew() {\n\t\tthis._settings.themeTags = $utils.mergeTags(this._settings.themeTags, [\"renderer\", \"x\"]);\n\n\t\tsuper._afterNew();\n\t\tthis.setPrivateRaw(\"letter\", \"X\");\n\n\t\tconst gridTemplate = this.grid.template;\n\t\tgridTemplate.set(\"height\", p100);\n\t\tgridTemplate.set(\"width\", 0);\n\t\tgridTemplate.set(\"draw\", (display, graphics) => {\n\t\t\tdisplay.moveTo(0, 0);\n\t\t\tdisplay.lineTo(0, graphics.height());\n\t\t});\n\n\t\tthis.set(\"draw\", (display, graphics) => {\n\t\t\tdisplay.moveTo(0, 0);\n\t\t\tdisplay.lineTo(graphics.width(), 0);\n\t\t});\n\t}\n\n\tpublic _changed() {\n\t\tsuper._changed();\n\n\t\tconst axis = this.axis;\n\t\taxis.ghostLabel.setPrivate(\"visible\", !this.get(\"inside\"));\n\t\taxis.ghostLabel.set(\"x\", -1000);\n\n\t\tconst opposite = \"opposite\"\n\t\tconst inside = \"inside\";\n\n\t\tif (this.isDirty(opposite) || this.isDirty(inside)) {\n\t\t\tconst chart = this.chart;\n\t\t\tconst axisChildren = axis.children;\n\n\t\t\tif (this.get(inside)) {\n\t\t\t\taxis.addTag(inside);\n\t\t\t}\n\t\t\telse {\n\t\t\t\taxis.removeTag(inside);\n\t\t\t}\n\n\t\t\tif (chart) {\n\t\t\t\tif (this.get(opposite)) {\n\t\t\t\t\tconst children = chart.topAxesContainer.children;\n\t\t\t\t\tif (children.indexOf(axis) == -1) {\n\t\t\t\t\t\tchildren.insertIndex(0, axis);\n\t\t\t\t\t}\n\t\t\t\t\taxis.addTag(opposite);\n\t\t\t\t\taxisChildren.moveValue(this);\n\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tconst children = chart.bottomAxesContainer.children;\n\t\t\t\t\tif (children.indexOf(axis) == -1) {\n\t\t\t\t\t\tchildren.moveValue(axis);\n\t\t\t\t\t}\n\t\t\t\t\taxis.removeTag(opposite);\n\n\t\t\t\t\taxisChildren.moveValue(this, 0);\n\n\t\t\t\t}\n\n\t\t\t\taxis.ghostLabel._applyThemes();\n\t\t\t\tthis.labels.each((label) => {\n\t\t\t\t\tlabel._applyThemes();\n\t\t\t\t})\n\t\t\t\tthis.root._markDirtyRedraw();\n\t\t\t}\n\t\t\taxis.markDirtySize();\n\t\t}\n\n\t\tthis.thumb.setPrivate(\"height\", axis.labelsContainer.height());\n\t}\n\n\n\tprotected _getPan(point1: IPoint, point2: IPoint): number {\n\t\treturn (point2.x - point1.x) / this.width();\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic toAxisPosition(position: number): number {\n\t\tconst start = this._start || 0;\n\t\tconst end = this._end || 1;\n\n\t\tposition -= this._ls;\n\n\t\tposition = position * (end - start) / this._lc;\n\t\tif (!this.get(\"inversed\")) {\n\t\t\tposition = start + position;\n\t\t}\n\t\telse {\n\t\t\tposition = end - position;\n\t\t}\n\n\t\treturn position;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic toGlobalPosition(position: number): number {\n\t\tconst start = this._start || 0;\n\t\tconst end = this._end || 1;\n\n\t\tif (!this.get(\"inversed\")) {\n\t\t\tposition = position - start;\n\t\t}\n\t\telse {\n\t\t\tposition = end - position;\n\t\t}\n\n\t\tposition = position / (end - start) * this._lc\n\n\t\tposition += this._ls;\n\n\t\treturn position;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic _updateLC() {\n\t\tconst axis = this.axis;\n\t\tconst parent = axis.parent;\n\t\tif (parent) {\n\t\t\tconst w = parent.innerWidth();\n\t\t\tthis._lc = this.axisLength() / w;\n\t\t\tthis._ls = (axis.x() - parent.get(\"paddingLeft\", 0)) / w;\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic _updatePositions() {\n\t\tconst axis = this.axis;\n\t\tconst x = axis.x() - $utils.relativeToValue(axis.get(\"centerX\", 0), axis.width()) - axis.parent!.get(\"paddingLeft\", 0);\n\t\taxis.gridContainer.set(\"x\", x);\n\t\taxis.topGridContainer.set(\"x\", x);\n\t\taxis.bulletsContainer.set(\"y\", this.y());\n\n\t\tconst chart = axis.chart;\n\t\tif (chart) {\n\t\t\tconst plotContainer = chart.plotContainer;\n\t\t\tconst axisHeader = axis.axisHeader;\n\t\t\tlet width = axis.get(\"marginLeft\", 0);\n\n\t\t\tlet x = axis.x() - width;\n\n\t\t\tconst parent = axis.parent;\n\t\t\tif (parent) {\n\t\t\t\tx -= parent.get(\"paddingLeft\", 0);\n\t\t\t}\n\n\t\t\tif (axisHeader.children.length > 0) {\n\t\t\t\twidth = axis.axisHeader.width();\n\t\t\t\taxis.set(\"marginLeft\", width + 1);\n\t\t\t}\n\t\t\telse {\n\t\t\t\taxisHeader.set(\"width\", width);\n\t\t\t}\n\t\t\taxisHeader.setAll({ x: x, y: -1, height: plotContainer.height() + 2 });\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic processAxis() {\n\t\tsuper.processAxis();\n\t\tconst axis = this.axis;\n\t\tif (axis.get(\"width\") == null) {\n\t\t\taxis.set(\"width\", p100);\n\t\t};\n\t\tconst verticalLayout = this._root.verticalLayout;\n\t\taxis.set(\"layout\", verticalLayout);\n\t\taxis.labelsContainer.set(\"width\", p100);\n\t\taxis.axisHeader.setAll({ layout: verticalLayout });\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic axisLength(): number {\n\t\treturn this.axis.width();\n\t}\n\n\t/**\n\t * Converts axis relative position to actual coordinate in pixels.\n\t *\n\t * @param position Position\n\t * @return Point\n\t */\n\tpublic positionToPoint(position: number): IPoint {\n\t\treturn { x: this.positionToCoordinate(position), y: 0 };\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateTick(tick?: AxisTick, position?: number, endPosition?: number, count?: number) {\n\t\tif (tick) {\n\t\t\tif (!$type.isNumber(position)) {\n\t\t\t\tposition = 0;\n\t\t\t}\n\n\t\t\tlet location = 0.5;\n\t\t\tif ($type.isNumber(count) && count > 1) {\n\t\t\t\tlocation = tick.get(\"multiLocation\", location)\n\t\t\t}\n\t\t\telse {\n\t\t\t\tlocation = tick.get(\"location\", location)\n\t\t\t}\n\n\t\t\tif ($type.isNumber(endPosition) && endPosition != position) {\n\t\t\t\tposition = position + (endPosition - position) * location;\n\t\t\t}\n\n\t\t\ttick.set(\"x\", this.positionToCoordinate(position));\n\n\t\t\tlet length = tick.get(\"length\", 0);\n\t\t\tconst inside = tick.get(\"inside\", this.get(\"inside\", false));\n\n\t\t\tif (this.get(\"opposite\")) {\n\t\t\t\ttick.set(\"y\", p100);\n\t\t\t\tif (!inside) {\n\t\t\t\t\tlength *= -1\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\ttick.set(\"y\", 0);\n\t\t\t\tif (inside) {\n\t\t\t\t\tlength *= -1\n\t\t\t\t}\n\t\t\t}\n\t\t\ttick.set(\"draw\", (display) => {\n\t\t\t\tdisplay.moveTo(0, 0);\n\t\t\t\tdisplay.lineTo(0, length);\n\t\t\t})\n\n\t\t\tthis.toggleVisibility(tick, position, tick.get(\"minPosition\", 0), tick.get(\"maxPosition\", 1));\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateLabel(label?: AxisLabel, position?: number, endPosition?: number, count?: number) {\n\t\tif (label) {\n\t\t\tlet location = 0.5;\n\t\t\tif ($type.isNumber(count) && count > 1) {\n\t\t\t\tlocation = label.get(\"multiLocation\", location)\n\t\t\t}\n\t\t\telse {\n\t\t\t\tlocation = label.get(\"location\", location)\n\t\t\t}\n\n\t\t\tif (!$type.isNumber(position)) {\n\t\t\t\tposition = 0;\n\t\t\t}\n\n\t\t\tconst inside = label.get(\"inside\", this.get(\"inside\", false));\n\n\t\t\tconst opposite = this.get(\"opposite\");\n\t\t\tif (opposite) {\n\t\t\t\tif (!inside) {\n\t\t\t\t\tlabel.set(\"position\", \"relative\");\n\t\t\t\t\tlabel.set(\"y\", p100);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tlabel.set(\"position\", \"absolute\");\n\t\t\t\t\tlabel.set(\"y\", 0)\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (!inside) {\n\t\t\t\t\tlabel.set(\"y\", undefined);\n\t\t\t\t\tlabel.set(\"position\", \"relative\");\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tlabel.set(\"y\", 0)\n\t\t\t\t\tlabel.set(\"position\", \"absolute\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($type.isNumber(endPosition) && endPosition != position) {\n\t\t\t\tposition = position + (endPosition - position) * location;\n\t\t\t}\n\n\t\t\tlabel.set(\"x\", this.positionToCoordinate(position));\n\t\t\tthis.toggleVisibility(label, position, label.get(\"minPosition\", 0), label.get(\"maxPosition\", 1));\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateGrid(grid?: Grid, position?: number, endPosition?: number) {\n\t\tif (grid) {\n\t\t\tif (!$type.isNumber(position)) {\n\t\t\t\tposition = 0;\n\t\t\t}\n\n\t\t\tlet location = grid.get(\"location\", 0.5);\n\t\t\tif ($type.isNumber(endPosition) && endPosition != position) {\n\t\t\t\tposition = position + (endPosition - position) * location;\n\t\t\t}\n\n\t\t\tgrid.set(\"x\", this.positionToCoordinate(position));\n\n\t\t\tthis.toggleVisibility(grid, position, 0, 1);\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateBullet(bullet?: AxisBullet, position?: number, endPosition?: number) {\n\t\tif (bullet) {\n\n\t\t\tconst sprite = bullet.get(\"sprite\");\n\t\t\tif (sprite) {\n\t\t\t\tif (!$type.isNumber(position)) {\n\t\t\t\t\tposition = 0;\n\t\t\t\t}\n\n\t\t\t\tlet location = bullet.get(\"location\", 0.5);\n\n\t\t\t\tif ($type.isNumber(endPosition) && endPosition != position) {\n\t\t\t\t\tposition = position + (endPosition - position) * location;\n\t\t\t\t}\n\n\t\t\t\tlet bulletPosition = this.axis.roundAxisPosition(position, location);\n\t\t\t\tlet previousBullet = this.axis._bullets[bulletPosition];\n\t\t\t\tlet d = -1;\n\t\t\t\tif (this.get(\"opposite\")) {\n\t\t\t\t\td = 1;\n\t\t\t\t}\n\n\t\t\t\tif (bullet.get(\"stacked\")) {\n\t\t\t\t\tif (previousBullet) {\n\t\t\t\t\t\tlet previousSprite = previousBullet.get(\"sprite\");\n\t\t\t\t\t\tif (previousSprite) {\n\t\t\t\t\t\t\tsprite.set(\"y\", previousSprite.y() + previousSprite.height() * d);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tsprite.set(\"y\", 0);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis.axis._bullets[bulletPosition] = bullet;\n\t\t\t\tsprite.set(\"x\", this.positionToCoordinate(position));\n\t\t\t\tthis.toggleVisibility(sprite, position, 0, 1);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateFill(fill?: Graphics, position?: number, endPosition?: number) {\n\t\tif (fill) {\n\t\t\tif (!$type.isNumber(position)) {\n\t\t\t\tposition = 0;\n\t\t\t}\n\t\t\tif (!$type.isNumber(endPosition)) {\n\t\t\t\tendPosition = 1;\n\t\t\t}\n\n\t\t\tlet x0 = this.positionToCoordinate(position);\n\t\t\tlet x1 = this.positionToCoordinate(endPosition);\n\n\t\t\tthis.fillDrawMethod(fill, x0, x1);\n\t\t}\n\t}\n\n\tprotected fillDrawMethod(fill: Graphics, x0: number, x1: number) {\n\t\tfill.set(\"draw\", (display) => {\n\t\t\t//display.drawRect(x0, 0, x1 - x0, this.axis!.gridContainer.height());\n\t\t\t// using for holes, so can not be rectangle\n\t\t\tconst h = this.axis!.gridContainer.height();\n\t\t\tconst w = this.width();\n\n\t\t\tif (x1 < x0) {\n\t\t\t\t[x1, x0] = [x0, x1];\n\t\t\t}\n\t\t\tif (x0 > w || x1 < 0) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t/*\n\t\t\tconst limit = 10000;\n\n\t\t\tx0 = Math.max(-limit, x0);\n\t\t\tx1 = Math.min(limit, x1);\n\t\t\t*/\n\n\t\t\tdisplay.moveTo(x0, 0);\n\t\t\tdisplay.lineTo(x1, 0);\n\t\t\tdisplay.lineTo(x1, h);\n\t\t\tdisplay.lineTo(x0, h);\n\t\t\tdisplay.lineTo(x0, 0);\n\t\t})\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic positionTooltip(tooltip: Tooltip, position: number) {\n\t\tthis._positionTooltip(tooltip, { x: this.positionToCoordinate(position), y: 0 })\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateTooltipBounds(tooltip: Tooltip) {\n\t\tconst inside = this.get(\"inside\");\n\t\tconst num = 100000;\n\n\t\tlet global = this._display.toGlobal({ x: 0, y: 0 });\n\t\tlet x = global.x;\n\t\tlet y = 0;\n\t\tlet w = this.axisLength();\n\t\tlet h = num;\n\n\t\tlet pointerOrientation: \"up\" | \"down\" = \"up\";\n\n\t\tif (this.get(\"opposite\")) {\n\t\t\tif (inside) {\n\t\t\t\tpointerOrientation = \"up\";\n\t\t\t\ty = global.y;\n\t\t\t\th = num;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpointerOrientation = \"down\";\n\t\t\t\ty = global.y - num;\n\t\t\t\th = num;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif (inside) {\n\t\t\t\tpointerOrientation = \"down\";\n\t\t\t\ty = global.y - num;\n\t\t\t\th = num;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpointerOrientation = \"up\";\n\t\t\t\ty = global.y;\n\t\t\t\th = num;\n\t\t\t}\n\t\t}\n\n\t\tconst bounds = { left: x, right: x + w, top: y, bottom: y + h };\n\t\tconst oldBounds = tooltip.get(\"bounds\");\n\n\t\tif (!$utils.sameBounds(bounds, oldBounds)) {\n\t\t\ttooltip.set(\"bounds\", bounds);\n\t\t\ttooltip.set(\"pointerOrientation\", pointerOrientation);\n\t\t}\n\t}\n}\n","import { AxisRenderer, IAxisRendererSettings, IAxisRendererPrivate } from \"./AxisRenderer\";\nimport { p100 } from \"../../../core/util/Percent\";\nimport type { IPoint } from \"../../../core/util/IPoint\";\nimport * as $type from \"../../../core/util/Type\";\nimport * as $utils from \"../../../core/util/Utils\";\nimport type { Graphics } from \"../../../core/render/Graphics\";\nimport type { AxisLabel } from \"./AxisLabel\";\nimport type { AxisBullet } from \"./AxisBullet\";\nimport type { Grid } from \"./Grid\";\nimport type { AxisTick } from \"./AxisTick\";\nimport type { Tooltip } from \"../../../core/render/Tooltip\";\nimport type { Template } from \"../../../core/util/Template\";\nimport { Rectangle } from \"../../../core/render/Rectangle\";\n\nexport interface IAxisRendererYSettings extends IAxisRendererSettings {\n\n\t/**\n\t * If set to `true` the axis will be drawn on the opposite side of the plot\n\t * area.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/#Axis_position} for more info\n\t * @default false\n\t */\n\topposite?: boolean;\n\n\t/**\n\t * If set to `true`, all axis elements (ticks, labels) will be drawn inside\n\t * plot area.\n\t *\n\t * @default false\n\t */\n\tinside?: boolean;\n}\n\nexport interface IAxisRendererYPrivate extends IAxisRendererPrivate {\n}\n\n/**\n * Used to render vertical axis.\n *\n * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/#Axis_renderer} for more info\n * @important\n */\nexport class AxisRendererY extends AxisRenderer {\n\n\tpublic static className: string = \"AxisRendererY\";\n\tpublic static classNames: Array<string> = AxisRenderer.classNames.concat([AxisRendererY.className]);\n\n\tdeclare public _settings: IAxisRendererYSettings;\n\tdeclare public _privateSettings: IAxisRendererYPrivate;\n\n\tdeclare public readonly labelTemplate: Template<AxisLabel>;\n\n\tprotected _downY?: number;\n\n\tpublic thumb: Rectangle = Rectangle.new(this._root, { height: p100, isMeasured: false, themeTags: [\"axis\", \"y\", \"thumb\"] });\n\n\tpublic _afterNew() {\n\t\tthis._settings.themeTags = $utils.mergeTags(this._settings.themeTags, [\"renderer\", \"y\"]);\n\t\tif (this._settings.opposite) {\n\t\t\tthis._settings.themeTags.push(\"opposite\");\n\t\t}\n\n\t\tsuper._afterNew();\n\t\tthis.setPrivateRaw(\"letter\", \"Y\");\n\n\t\tconst gridTemplate = this.grid.template;\n\t\tgridTemplate.set(\"width\", p100);\n\t\tgridTemplate.set(\"height\", 0);\n\t\tgridTemplate.set(\"draw\", (display, graphics) => {\n\t\t\tdisplay.moveTo(0, 0);\n\t\t\tdisplay.lineTo(graphics.width(), 0);\n\t\t});\n\n\t\tthis.set(\"draw\", (display, renderer) => {\n\t\t\tdisplay.moveTo(0, 0);\n\t\t\tdisplay.lineTo(0, renderer.height());\n\t\t});\n\t}\n\n\tprotected _getPan(point1: IPoint, point2: IPoint): number {\n\t\treturn (point1.y - point2.y) / this.height();\n\t}\n\n\tpublic _changed() {\n\t\tsuper._changed();\n\n\t\tconst axis = this.axis;\n\t\taxis.ghostLabel.setPrivate(\"visible\", !this.get(\"inside\"));\n\t\taxis.ghostLabel.set(\"y\", -1000);\n\n\t\tconst thumb = this.thumb;\n\t\tconst opposite = \"opposite\";\n\t\tconst inside = \"inside\";\n\t\tconst chart = this.chart;\n\n\t\tif (this.isDirty(opposite) || this.isDirty(inside)) {\n\n\t\t\tconst axisChildren = axis.children;\n\n\t\t\tif (this.get(inside)) {\n\t\t\t\taxis.addTag(inside);\n\t\t\t}\n\t\t\telse {\n\t\t\t\taxis.removeTag(inside);\n\t\t\t}\n\n\t\t\tif (chart) {\n\t\t\t\tif (this.get(opposite)) {\n\t\t\t\t\tconst children = chart.rightAxesContainer.children;\n\t\t\t\t\tif (children.indexOf(axis) == -1) {\n\t\t\t\t\t\tchildren.moveValue(axis, 0);\n\t\t\t\t\t}\n\t\t\t\t\taxis.addTag(opposite);\n\t\t\t\t\taxisChildren.moveValue(this, 0);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tconst children = chart.leftAxesContainer.children;\n\t\t\t\t\tif (children.indexOf(axis) == -1) {\n\t\t\t\t\t\tchildren.moveValue(axis);\n\t\t\t\t\t}\n\t\t\t\t\taxis.removeTag(opposite);\n\n\t\t\t\t\taxisChildren.moveValue(this);\n\t\t\t\t}\n\n\t\t\t\taxis.ghostLabel._applyThemes();\n\t\t\t\tthis.labels.each((label) => {\n\t\t\t\t\tlabel._applyThemes();\n\t\t\t\t})\n\t\t\t\tthis.root._markDirtyRedraw();\n\t\t\t}\n\t\t\taxis.markDirtySize();\n\t\t}\n\n\t\tconst w = axis.labelsContainer.width();\n\n\t\tif (chart) {\n\t\t\tif (this.get(opposite)) {\n\t\t\t\tthumb.set(\"centerX\", 0);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthumb.set(\"centerX\", w);\n\t\t\t}\n\t\t}\n\n\t\tthumb.setPrivate(\"width\", w);\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic processAxis() {\n\t\tsuper.processAxis();\n\t\tconst axis = this.axis;\n\t\tif (axis.get(\"height\") == null) {\n\t\t\taxis.set(\"height\", p100);\n\t\t}\n\t\tconst horizontalLayout = this._root.horizontalLayout;\n\t\taxis.set(\"layout\", horizontalLayout);\n\t\taxis.labelsContainer.set(\"height\", p100);\n\t\taxis.axisHeader.set(\"layout\", horizontalLayout);\n\t}\n\n\tpublic _updatePositions() {\n\t\tconst axis = this.axis;\n\t\tconst y = axis.y() - $utils.relativeToValue(axis.get(\"centerY\", 0), axis.height());\n\t\taxis.gridContainer.set(\"y\", y);\n\t\taxis.topGridContainer.set(\"y\", y);\n\t\taxis.bulletsContainer.set(\"x\", this.x());\n\n\t\tconst chart = axis.chart;\n\t\tif (chart) {\n\t\t\tconst plotContainer = chart.plotContainer;\n\t\t\tconst axisHeader = axis.axisHeader;\n\t\t\tlet height = axis.get(\"marginTop\", 0);\n\n\t\t\tif (axisHeader.children.length > 0) {\n\t\t\t\theight = axis.axisHeader.height();\n\t\t\t\taxis.set(\"marginTop\", height + 1);\n\t\t\t}\n\t\t\telse {\n\t\t\t\taxisHeader.set(\"height\", height);\n\t\t\t}\n\t\t\taxisHeader.setAll({ y: axis.y() - height, x: -1, width: plotContainer.width() + 2 });\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic axisLength(): number {\n\t\treturn this.axis.innerHeight();\n\t}\n\n\t/**\n\t * Converts axis relative position to actual coordinate in pixels.\n\t *\n\t * @param position Position\n\t * @return Point\n\t */\n\tpublic positionToPoint(position: number): IPoint {\n\t\treturn { x: 0, y: this.positionToCoordinate(position) };\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateLabel(label?: AxisLabel, position?: number, endPosition?: number, count?: number) {\n\t\tif (label) {\n\t\t\tif (!$type.isNumber(position)) {\n\t\t\t\tposition = 0;\n\t\t\t}\n\n\t\t\tlet location = 0.5;\n\t\t\tif ($type.isNumber(count) && count > 1) {\n\t\t\t\tlocation = label.get(\"multiLocation\", location)\n\t\t\t}\n\t\t\telse {\n\t\t\t\tlocation = label.get(\"location\", location)\n\t\t\t}\n\n\t\t\tconst opposite = this.get(\"opposite\");\n\t\t\tconst inside = label.get(\"inside\", this.get(\"inside\", false));\n\n\t\t\tif (opposite) {\n\t\t\t\tlabel.set(\"x\", 0);\n\n\t\t\t\tif (inside) {\n\t\t\t\t\tlabel.set(\"position\", \"absolute\");\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tlabel.set(\"position\", \"relative\");\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (inside) {\n\t\t\t\t\tlabel.set(\"x\", 0);\n\t\t\t\t\tlabel.set(\"position\", \"absolute\");\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tlabel.set(\"x\", undefined);\n\t\t\t\t\tlabel.set(\"position\", \"relative\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($type.isNumber(endPosition) && endPosition != position) {\n\t\t\t\tposition = position + (endPosition - position) * location;\n\t\t\t}\n\n\t\t\tlabel.set(\"y\", this.positionToCoordinate(position));\n\t\t\tthis.toggleVisibility(label, position, label.get(\"minPosition\", 0), label.get(\"maxPosition\", 1));\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateGrid(grid?: Grid, position?: number, endPosition?: number) {\n\t\tif (grid) {\n\t\t\tif (!$type.isNumber(position)) {\n\t\t\t\tposition = 0;\n\t\t\t}\n\n\t\t\tlet location = grid.get(\"location\", 0.5);\n\t\t\tif ($type.isNumber(endPosition) && endPosition != position) {\n\t\t\t\tposition = position + (endPosition - position) * location;\n\t\t\t}\n\n\t\t\tgrid.set(\"y\", this.positionToCoordinate(position));\n\t\t\tthis.toggleVisibility(grid, position, 0, 1);\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateTick(tick?: AxisTick, position?: number, endPosition?: number, count?: number) {\n\t\tif (tick) {\n\t\t\tif (!$type.isNumber(position)) {\n\t\t\t\tposition = 0;\n\t\t\t}\n\n\t\t\tlet location = 0.5;\n\t\t\tif ($type.isNumber(count) && count > 1) {\n\t\t\t\tlocation = tick.get(\"multiLocation\", location);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tlocation = tick.get(\"location\", location);\n\t\t\t}\n\n\t\t\tif ($type.isNumber(endPosition) && endPosition != position) {\n\t\t\t\tposition = position + (endPosition - position) * location;\n\t\t\t}\n\n\t\t\ttick.set(\"y\", this.positionToCoordinate(position));\n\n\t\t\tlet length = tick.get(\"length\", 0);\n\t\t\tconst inside = tick.get(\"inside\", this.get(\"inside\", false));\n\n\t\t\tif (this.get(\"opposite\")) {\n\t\t\t\ttick.set(\"x\", 0);\n\t\t\t\tif (inside) {\n\t\t\t\t\tlength *= -1\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (!inside) {\n\t\t\t\t\tlength *= -1\n\t\t\t\t}\n\t\t\t}\n\t\t\ttick.set(\"draw\", (display) => {\n\t\t\t\tdisplay.moveTo(0, 0);\n\t\t\t\tdisplay.lineTo(length, 0);\n\t\t\t})\n\n\t\t\tthis.toggleVisibility(tick, position, tick.get(\"minPosition\", 0), tick.get(\"maxPosition\", 1));\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateBullet(bullet?: AxisBullet, position?: number, endPosition?: number) {\n\t\tif (bullet) {\n\n\t\t\tconst sprite = bullet.get(\"sprite\");\n\t\t\tif (sprite) {\n\n\t\t\t\tif (!$type.isNumber(position)) {\n\t\t\t\t\tposition = 0;\n\t\t\t\t}\n\n\t\t\t\tlet location = bullet.get(\"location\", 0.5);\n\t\t\t\tif ($type.isNumber(endPosition) && endPosition != position) {\n\t\t\t\t\tposition = position + (endPosition - position) * location;\n\t\t\t\t}\n\n\n\t\t\t\tlet bulletPosition = this.axis.roundAxisPosition(position, location);\n\t\t\t\tlet previousBullet = this.axis._bullets[bulletPosition];\n\t\t\t\tlet d = 1;\n\t\t\t\tif (this.get(\"opposite\")) {\n\t\t\t\t\td = -1;\n\t\t\t\t}\n\n\t\t\t\tif (bullet.get(\"stacked\")) {\n\t\t\t\t\tif (previousBullet) {\n\t\t\t\t\t\tlet previousSprite = previousBullet.get(\"sprite\");\n\t\t\t\t\t\tif (previousSprite) {\n\t\t\t\t\t\t\tsprite.set(\"x\", previousSprite.x() + previousSprite.width() * d);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tsprite.set(\"x\", 0);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis.axis._bullets[bulletPosition] = bullet;\n\n\n\t\t\t\tsprite.set(\"y\", this.positionToCoordinate(position));\n\n\t\t\t\tthis.toggleVisibility(sprite, position, 0, 1);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateFill(fill?: Graphics, position?: number, endPosition?: number) {\n\t\tif (fill) {\n\t\t\tif (!$type.isNumber(position)) {\n\t\t\t\tposition = 0;\n\t\t\t}\n\t\t\tif (!$type.isNumber(endPosition)) {\n\t\t\t\tendPosition = 1;\n\t\t\t}\n\n\t\t\tlet y0 = this.positionToCoordinate(position);\n\t\t\tlet y1 = this.positionToCoordinate(endPosition);\n\n\t\t\tthis.fillDrawMethod(fill, y0, y1);\n\t\t}\n\t}\n\n\tprotected fillDrawMethod(fill: Graphics, y0: number, y1: number) {\n\t\tfill.set(\"draw\", (display) => {\n\t\t\t// using for holes, so can not be rectangle\n\t\t\tconst w = this.axis!.gridContainer.width();\n\t\t\tconst h = this.height();\n\n\t\t\tif (y1 < y0) {\n\t\t\t\t[y1, y0] = [y0, y1];\n\t\t\t}\n\n\t\t\tif (y0 > h || y1 < 0) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t//y0 = Math.max(0, y0);\n\t\t\t//y1 = Math.min(h, y1);\n\n\t\t\tdisplay.moveTo(0, y0);\n\t\t\tdisplay.lineTo(w, y0);\n\t\t\tdisplay.lineTo(w, y1);\n\t\t\tdisplay.lineTo(0, y1);\n\t\t\tdisplay.lineTo(0, y0);\n\t\t})\n\t}\n\n\t/**\n\t * Converts relative position (0-1) on axis to a pixel coordinate.\n\t *\n\t * @param position Position (0-1)\n\t * @return Coordinate (px)\n\t */\n\tpublic positionToCoordinate(position: number): number {\n\t\tif (!this._inversed) {\n\t\t\treturn (this._end - position) * this._axisLength;\n\t\t}\n\t\telse {\n\t\t\treturn (position - this._start) * this._axisLength;\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic positionTooltip(tooltip: Tooltip, position: number) {\n\t\tthis._positionTooltip(tooltip, { x: 0, y: this.positionToCoordinate(position) });\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateTooltipBounds(tooltip: Tooltip) {\n\t\tconst inside = this.get(\"inside\");\n\t\tconst num = 100000;\n\n\t\tlet global = this._display.toGlobal({ x: 0, y: 0 });\n\t\tlet y = global.y;\n\t\tlet x = 0;\n\t\tlet h = this.axisLength();\n\t\tlet w = num;\n\n\t\tlet pointerOrientation: \"left\" | \"right\" = \"right\";\n\n\t\tif (this.get(\"opposite\")) {\n\t\t\tif (inside) {\n\t\t\t\tpointerOrientation = \"right\";\n\t\t\t\tx = global.x - num;\n\t\t\t\tw = num;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpointerOrientation = \"left\";\n\t\t\t\tx = global.x;\n\t\t\t\tw = num;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif (inside) {\n\t\t\t\tpointerOrientation = \"left\";\n\t\t\t\tx = global.x;\n\t\t\t\tw = num;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpointerOrientation = \"right\";\n\t\t\t\tx = global.x - num;\n\t\t\t\tw = num;\n\t\t\t}\n\t\t}\n\n\t\tconst bounds = { left: x, right: x + w, top: y, bottom: y + h };\n\t\tconst oldBounds = tooltip.get(\"bounds\");\n\n\t\tif (!$utils.sameBounds(bounds, oldBounds)) {\n\t\t\ttooltip.set(\"bounds\", bounds);\n\t\t\ttooltip.set(\"pointerOrientation\", pointerOrientation);\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic _updateLC() {\n\t\tconst axis = this.axis;\n\t\tconst parent = axis.parent;\n\t\tif (parent) {\n\t\t\tconst h = parent.innerHeight();\n\t\t\tthis._lc = this.axisLength() / h;\n\t\t\tthis._ls = axis.y() / h;\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic toAxisPosition(position: number): number {\n\t\tconst start = this._start || 0;\n\t\tconst end = this._end || 1;\n\n\t\tposition -= this._ls;\n\n\t\tposition = position * (end - start) / this._lc;\n\n\t\tif (this.get(\"inversed\")) {\n\t\t\tposition = start + position;\n\t\t}\n\t\telse {\n\t\t\tposition = end - position;\n\t\t}\n\n\t\treturn position;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic toGlobalPosition(position: number): number {\n\t\tconst start = this._start || 0;\n\t\tconst end = this._end || 1;\n\n\t\tif (this.get(\"inversed\")) {\n\t\t\tposition = position - start;\n\t\t}\n\t\telse {\n\t\t\tposition = end - position;\n\t\t}\n\n\t\tposition = position / (end - start) * this._lc\n\n\t\tposition += this._ls;\n\n\t\treturn position;\n\t}\n\n\n\t/**\n\t * @ignore\n\t */\n\tpublic fixPosition(position: number) {\n\t\tif (!this.get(\"inversed\")) {\n\t\t\treturn 1 - position;\n\t\t}\n\t\treturn position;\n\t}\n\n}\n","import type { DataItem } from \"../../../core/render/Component\";\nimport type { AxisRenderer } from \"./AxisRenderer\";\nimport { Axis, IAxisSettings, IAxisPrivate, IAxisDataItem, IAxisEvents } from \"./Axis\";\nimport type { IXYSeriesDataItem, XYSeries } from \"../series/XYSeries\";\nimport * as $array from \"../../../core/util/Array\";\nimport * as $type from \"../../../core/util/Type\";\nimport * as $math from \"../../../core/util/Math\";\nimport * as $utils from \"../../../core/util/Utils\";\nimport { populateString } from \"../../../core/util/PopulateString\";\nimport type { Tooltip } from \"../../../core/render/Tooltip\";\nimport { ValueAxis } from \"./ValueAxis\";\n\nexport interface ICategoryAxisSettings<R extends AxisRenderer> extends IAxisSettings<R> {\n\n\t/**\n\t * A function that can be used to specify how to configure axis fills.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/#Axis_fills} for more info\n\t */\n\tfillRule?: (dataItem: DataItem<ICategoryAxisDataItem>, index?: number) => void;\n\n\t/**\n\t * A field in data which holds categories.\n\t */\n\tcategoryField: string;\n\n\t/**\n\t * Relative location of where axis cell starts: 0 - beginning, 1 - end.\n\t *\n\t * @default 0\n\t */\n\tstartLocation?: number;\n\n\t/**\n\t * Relative location of where axis cell ends: 0 - beginning, 1 - end.\n\t *\n\t * @default 1\n\t */\n\tendLocation?: number;\n}\n\nexport interface ICategoryAxisDataItem extends IAxisDataItem {\n\n\t/**\n\t * Named category.\n\t */\n\tcategory?: string;\n\n\t/**\n\t * Named end category (for axis items that span multiple categories, like\n\t * axis ranges).\n\t */\n\tendCategory?: string;\n\n\t/**\n\t * Index of the data item.\n\t */\n\tindex?: number;\n\n\t/**\n\t * Relative location of the category within cell: 0 - start, 1 - end.\n\t */\n\tcategoryLocation?: number;\n\n\t/**\n\t * Relative location of the end category within cell: 0 - start, 1 - end.\n\t */\n\tendCategoryLocation?: number;\n\n\t/**\n\t * A distance to shift data item relative to its original position.\n\t *\n\t * The value is 0 to 1, where 1 is full witdth of the axis.\n\t *\n\t * Can be used to sort data items without modifying order of the actual data.\n\t */\n\tdeltaPosition?: number;\n\n}\n\nexport interface ICategoryAxisPrivate extends IAxisPrivate {\n\n\t/**\n\t * Start index of the current zoom scope.\n\t */\n\tstartIndex?: number;\n\n\t/**\n\t * End index of the current zoom scope.\n\t */\n\tendIndex?: number;\n\n}\n\nexport interface ICategoryAxisEvents extends IAxisEvents {\n\n}\n\n/**\n * Creates a category axis.\n *\n * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/category-axis/} for more info\n * @important\n */\nexport class CategoryAxis<R extends AxisRenderer> extends Axis<R> {\n\tpublic static className: string = \"CategoryAxis\";\n\tpublic static classNames: Array<string> = Axis.classNames.concat([CategoryAxis.className]);\n\n\tdeclare public _settings: ICategoryAxisSettings<R>;\n\tdeclare public _privateSettings: ICategoryAxisPrivate;\n\tdeclare public _dataItemSettings: ICategoryAxisDataItem;\n\tdeclare public _events: ICategoryAxisEvents;\n\n\tprotected _frequency: number = 1;\n\n\tprotected _itemMap: { [index: string]: DataItem<ICategoryAxisDataItem> } = {};\n\n\tprotected _afterNew() {\n\t\tthis._settings.themeTags = $utils.mergeTags(this._settings.themeTags, [\"axis\"]);\n\t\tthis.fields.push(\"category\");\n\t\tthis.setPrivateRaw(\"name\", \"category\");\n\t\tthis.addTag(\"category\");\n\t\tsuper._afterNew();\n\t}\n\n\tpublic _prepareChildren() {\n\t\tsuper._prepareChildren();\n\n\t\tconst len = this.dataItems.length;\n\t\tlet i = 0;\n\t\tif (this._valuesDirty) {\n\t\t\tthis._itemMap = {};\n\t\t\t$array.each(this.dataItems, (dataItem) => {\n\t\t\t\tdataItem.setRaw(\"index\", i);\n\t\t\t\tthis._itemMap[dataItem.get(\"category\") as string] = dataItem;\n\t\t\t\ti++;\n\t\t\t})\n\n\t\t\tthis.setPrivateRaw(\"maxZoomFactor\", len);\n\t\t}\n\n\t\tthis.setPrivateRaw(\"startIndex\", Math.max(Math.round(this.get(\"start\", 0) * len), 0));\n\t\tthis.setPrivateRaw(\"endIndex\", Math.min(Math.round(this.get(\"end\", 1) * len), len));\n\n\t\tif (this._sizeDirty || this._valuesDirty || (this.isDirty(\"start\") || this.isDirty(\"end\") || this.isPrivateDirty(\"endIndex\") || this.isPrivateDirty(\"startIndex\") || this.isPrivateDirty(\"width\") || this.isPrivateDirty(\"height\"))) {\n\t\t\tif (this.dataItems.length > 0) {\n\t\t\t\tthis._handleRangeChange();\n\t\t\t\tthis._prepareAxisItems();\n\t\t\t\tthis._updateAxisRanges();\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected _handleRangeChange() {\n\t\t$array.each(this.series, (series) => {\n\t\t\tlet startCategory = this.dataItems[this.startIndex()].get(\"category\");\n\t\t\tlet endCategory = this.dataItems[this.endIndex() - 1].get(\"category\");\n\n\t\t\tlet baseAxis = series.get(\"baseAxis\");\n\t\t\tlet xAxis = series.get(\"xAxis\");\n\t\t\tlet yAxis = series.get(\"yAxis\");\n\n\t\t\tif (xAxis instanceof CategoryAxis && yAxis instanceof CategoryAxis) {\n\t\t\t\tseries._markDirtyAxes();\n\t\t\t}\n\t\t\telse if (baseAxis === this) {\n\t\t\t\tlet key: string | undefined;\n\t\t\t\tlet openKey: string | undefined;\n\t\t\t\tlet otherAxis = yAxis;\n\t\t\t\tif (xAxis === baseAxis) {\n\t\t\t\t\tif (series.get(\"categoryXField\")) {\n\t\t\t\t\t\tkey = \"categoryX\";\n\t\t\t\t\t}\n\t\t\t\t\tif (series.get(\"openCategoryXField\")) {\n\t\t\t\t\t\topenKey = \"openCategoryX\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (yAxis === baseAxis) {\n\t\t\t\t\tif (series.get(\"categoryYField\")) {\n\t\t\t\t\t\tkey = \"categoryY\";\n\t\t\t\t\t}\n\t\t\t\t\tif (series.get(\"openCategoryYField\")) {\n\t\t\t\t\t\topenKey = \"openCategoryY\";\n\t\t\t\t\t}\n\t\t\t\t\totherAxis = xAxis;\n\t\t\t\t}\n\n\t\t\t\tif (otherAxis instanceof ValueAxis) {\n\n\t\t\t\t\tif (key || openKey) {\n\t\t\t\t\t\tlet startDataItem: DataItem<IXYSeriesDataItem> | undefined;\n\t\t\t\t\t\tlet endDataItem: DataItem<IXYSeriesDataItem> | undefined;\n\n\t\t\t\t\t\tfor (let i = 0, len = series.dataItems.length; i < len; i++) {\n\t\t\t\t\t\t\tlet dataItem = series.dataItems[i];\n\t\t\t\t\t\t\tif (key) {\n\t\t\t\t\t\t\t\tif (dataItem.get(key as any) === startCategory) {\n\t\t\t\t\t\t\t\t\tstartDataItem = dataItem;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (openKey) {\n\t\t\t\t\t\t\t\tif (dataItem.get(openKey as any) === startCategory) {\n\t\t\t\t\t\t\t\t\tstartDataItem = dataItem;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tfor (let i = series.dataItems.length - 1; i >= 0; i--) {\n\t\t\t\t\t\t\tlet dataItem = series.dataItems[i];\n\t\t\t\t\t\t\tif (key) {\n\t\t\t\t\t\t\t\tif (dataItem.get(key as any) === endCategory) {\n\t\t\t\t\t\t\t\t\tendDataItem = dataItem;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (openKey) {\n\t\t\t\t\t\t\t\tif (dataItem.get(openKey as any) === endCategory) {\n\t\t\t\t\t\t\t\t\tendDataItem = dataItem;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlet startIndex = 0;\n\t\t\t\t\t\tlet endIndex = series.dataItems.length;\n\n\t\t\t\t\t\tif (startDataItem) {\n\t\t\t\t\t\t\tstartIndex = series.dataItems.indexOf(startDataItem);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (endDataItem) {\n\t\t\t\t\t\t\tendIndex = series.dataItems.indexOf(endDataItem) + 1;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tseries.setPrivate(\"startIndex\", startIndex);\n\t\t\t\t\t\tseries.setPrivate(\"endIndex\", endIndex);\n\n\t\t\t\t\t\tlet hasValue = false;\n\t\t\t\t\t\tfor (let i = startIndex; i < endIndex; i++) {\n\t\t\t\t\t\t\tconst dataItem = series.dataItems[i];\n\n\t\t\t\t\t\t\t$array.each(series.__valueXShowFields, (key) => {\n\t\t\t\t\t\t\t\tlet value = dataItem.get(<any>key);\n\t\t\t\t\t\t\t\tif (value != null) {\n\t\t\t\t\t\t\t\t\thasValue = true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\n\t\t\t\t\t\t\t$array.each(series.__valueYShowFields, (key) => {\n\t\t\t\t\t\t\t\tlet value = dataItem.get(<any>key);\n\t\t\t\t\t\t\t\tif (value != null) {\n\t\t\t\t\t\t\t\t\thasValue = true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\n\t\t\t\t\t\t\tif (hasValue) {\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tseries.setPrivate(\"outOfSelection\", !hasValue);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tseries._markDirtyAxes();\t// must be outside\n\t\t\t}\n\t\t})\n\t}\n\n\n\tprotected _prepareAxisItems() {\n\t\tconst renderer = this.get(\"renderer\");\n\t\tconst len = this.dataItems.length;\n\n\t\tlet startIndex = this.startIndex();\n\t\tif (startIndex > 0) {\n\t\t\tstartIndex--;\n\t\t}\n\n\t\tlet endIndex = this.endIndex();\n\t\tif (endIndex < len) {\n\t\t\tendIndex++;\n\t\t}\n\n\t\tconst minorLabelsEnabled = renderer.get(\"minorLabelsEnabled\");\n\t\tconst minorGridEnabled = renderer.get(\"minorGridEnabled\", minorLabelsEnabled);\n\n\t\tlet maxCount = renderer.axisLength() / Math.max(renderer.get(\"minGridDistance\")!, 1);\n\t\tlet frequency = Math.max(1, Math.min(len, Math.ceil((endIndex - startIndex) / maxCount)));\n\n\t\tstartIndex = Math.floor(startIndex / frequency) * frequency;\n\t\tthis._frequency = frequency;\n\n\t\tfor (let j = 0; j < len; j++) {\n\t\t\tthis._toggleDataItem(this.dataItems[j], false);\n\t\t}\n\n\t\tlet f = this.dataItems[startIndex].get(\"index\", 0);\n\n\t\tfor (let i = startIndex; i < endIndex; i = i + frequency) {\n\t\t\tlet dataItem = this.dataItems[i];\n\n\t\t\tthis._createAssets(dataItem, []);\n\t\t\tthis._toggleDataItem(dataItem, true);\n\n\t\t\tlet count = frequency;\n\t\t\tif (minorGridEnabled) {\n\t\t\t\tcount = 1;\n\t\t\t}\n\n\t\t\tthis._prepareDataItem(dataItem, f, count);\n\n\t\t\tf++;\n\t\t}\n\n\t\tif (renderer.get(\"minorGridEnabled\")) {\n\t\t\tfor (let i = startIndex; i < endIndex; i++) {\n\t\t\t\tlet dataItem = this.dataItems[i];\n\t\t\t\tif (i % frequency != 0) {\n\t\t\t\t\tthis._createAssets(dataItem, [\"minor\"], true);\n\t\t\t\t\tthis._toggleDataItem(dataItem, true);\n\t\t\t\t\tthis._prepareDataItem(dataItem, 0, 1);\n\n\t\t\t\t\tif (!minorLabelsEnabled) {\n\t\t\t\t\t\tdataItem.get(\"label\")?.setPrivate(\"visible\", false);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis._updateGhost();\n\t}\n\n\n\tpublic _prepareDataItem(dataItem: DataItem<this[\"_dataItemSettings\"]>, fillIndex?: number, count?: number) {\n\t\tlet renderer = this.get(\"renderer\");\n\n\t\tlet categoryLocation = dataItem.get(\"categoryLocation\", 0);\n\t\tlet endCategoryLocation = dataItem.get(\"endCategoryLocation\", 1);\n\n\t\tlet index: number | undefined = dataItem.get(\"index\");\n\n\t\tif (!$type.isNumber(index)) {\n\t\t\tindex = this.categoryToIndex(dataItem.get(\"category\")!);\n\t\t}\n\n\t\tlet position = this.indexToPosition(index, categoryLocation);\n\n\t\tlet endCategory = dataItem.get(\"endCategory\")!;\n\t\tlet endIndex: number;\n\t\tif (endCategory) {\n\t\t\tendIndex = this.categoryToIndex(endCategory);\n\t\t\tif (!$type.isNumber(endIndex)) {\n\t\t\t\tendIndex = index;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tendIndex = index;\n\t\t}\n\n\t\tlet endPosition = this.indexToPosition(endIndex, endCategoryLocation);\n\n\t\tlet fillEndIndex: number;\n\t\tlet fillEndPosition: number;\n\n\t\tif (dataItem.get(\"isRange\")) {\n\t\t\tfillEndIndex = endIndex;\n\t\t}\n\t\telse {\n\t\t\tfillEndIndex = index + this._frequency - 1;\n\t\t}\n\n\t\tfillEndPosition = this.indexToPosition(fillEndIndex, endCategoryLocation);\n\n\t\trenderer.updateLabel(dataItem.get(\"label\"), position, endPosition, count);\n\t\trenderer.updateGrid(dataItem.get(\"grid\"), position, endPosition);\n\t\trenderer.updateTick(dataItem.get(\"tick\"), position, endPosition, count);\n\t\trenderer.updateFill(dataItem.get(\"axisFill\"), position, fillEndPosition);\n\n\t\tthis._processBullet(dataItem);\n\t\trenderer.updateBullet(dataItem.get(\"bullet\"), position, endPosition);\n\n\t\tconst fillRule = this.get(\"fillRule\");\n\t\tif (fillRule) {\n\t\t\tfillRule(dataItem, fillIndex)\n\t\t}\n\t}\n\n\tpublic startIndex() {\n\t\tlet len = this.dataItems.length;\n\t\treturn Math.min(Math.max(this.getPrivate(\"startIndex\", 0), 0), len - 1);\n\t}\n\n\tpublic endIndex() {\n\t\tlet len = this.dataItems.length;\n\t\treturn Math.max(1, Math.min(this.getPrivate(\"endIndex\", len), len));\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic baseValue(): any {\n\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic basePosition() {\n\t\treturn 0;\n\t}\n\n\t/**\n\t * Returns X coordinate in pixels corresponding to specific category index.\n\t *\n\t * @param value Index\n\t * @return X coordinate\n\t */\n\tpublic getX(value: string): number {\n\t\tlet axisDataItem = this._itemMap[value];\n\t\tif (axisDataItem) {\n\t\t\treturn this._settings.renderer.positionToCoordinate(this.indexToPosition(axisDataItem.get(\"index\", 0)));\n\t\t}\n\t\treturn NaN;\n\t}\n\n\t/**\n\t * Returns Y coordinate in pixels corresponding to specific category index.\n\t *\n\t * @param value Index\n\t * @return Y coordinate\n\t */\n\tpublic getY(value: string): number {\n\t\tlet axisDataItem = this._itemMap[value];\n\t\tif (axisDataItem) {\n\t\t\treturn this._settings.renderer.positionToCoordinate(this.indexToPosition(axisDataItem.get(\"index\", 0)));\n\t\t}\n\t\treturn NaN;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic getDataItemPositionX(dataItem: DataItem<IXYSeriesDataItem>, field: string, cellLocation: number, _axisLocation?: number): number {\n\t\tconst category = dataItem.get(field as any);\n\t\tconst axisDataItem = this._itemMap[category];\n\n\t\tif (axisDataItem) {\n\t\t\treturn this.indexToPosition(axisDataItem.get(\"index\", 0), cellLocation);\n\t\t}\n\t\treturn NaN;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic getDataItemCoordinateX(dataItem: DataItem<IXYSeriesDataItem>, field: string, cellLocation: number, _axisLocation?: number): number {\n\t\treturn this._settings.renderer.positionToCoordinate(this.getDataItemPositionX(dataItem, field, cellLocation, _axisLocation));\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic getDataItemPositionY(dataItem: DataItem<IXYSeriesDataItem>, field: string, cellLocation: number, _axisLocation?: number): number {\n\t\tconst category = dataItem.get(field as any);\n\t\tconst axisDataItem = this._itemMap[category];\n\t\tif (axisDataItem) {\n\t\t\treturn this.indexToPosition(axisDataItem.get(\"index\", 0), cellLocation);\n\t\t}\n\t\treturn NaN;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic getDataItemCoordinateY(dataItem: DataItem<IXYSeriesDataItem>, field: string, cellLocation: number, _axisLocation?: number): number {\n\t\treturn this._settings.renderer.positionToCoordinate(this.getDataItemPositionY(dataItem, field, cellLocation, _axisLocation));\n\t}\n\n\t/**\n\t * Converts category index to a relative position.\n\t *\n\t * `location` indicates relative position within category: 0 - start, 1 - end.\n\t *\n\t * If not set, will use middle (0.5) of the category.\n\t *\n\t * @param index Index\n\t * @param location Location\n\t * @return Index\n\t */\n\tpublic indexToPosition(index: number, location?: number): number {\n\t\tif (!$type.isNumber(location)) {\n\t\t\tlocation = 0.5;\n\t\t}\n\n\t\tlet len = this.dataItems.length;\n\n\t\tlet startLocation = this.get(\"startLocation\", 0);\n\t\tlet endLocation = this.get(\"endLocation\", 1);\n\n\t\tlen -= startLocation;\n\t\tlen -= (1 - endLocation);\n\n\t\tlet position = (index + location - startLocation) / len;\n\n\t\tlet dataItem = this.dataItems[index];\n\t\tif (dataItem) {\n\t\t\tposition += dataItem.get(\"deltaPosition\", 0);\n\t\t}\n\n\t\treturn position;\n\t}\n\n\t/**\n\t * Returns an index of a category.\n\t *\n\t * @param category Category to look up\n\t * @return Index\n\t */\n\tpublic categoryToIndex(category: string): number {\n\t\tlet dataItem = this._itemMap[category];\n\t\tif (dataItem) {\n\t\t\treturn dataItem.get(\"index\")!;\n\t\t}\n\t\treturn NaN;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic dataItemToPosition(dataItem: DataItem<this[\"_dataItemSettings\"]>): number {\n\t\treturn this.indexToPosition(dataItem.get(\"index\")!);\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic roundAxisPosition(position: number, location: number): number {\n\t\tposition += (0.5 - location) / this.dataItems.length;\n\t\treturn this.indexToPosition(this.axisPositionToIndex(position), location);\n\t}\n\n\t/**\n\t * Returns an index of the category that corresponds to specific pixel\n\t * position within axis.\n\t *\n\t * @param position Position (px)\n\t * @return Category index\n\t */\n\tpublic axisPositionToIndex(position: number): number {\n\t\tlet len = this.dataItems.length;\n\t\treturn $math.fitToRange(Math.floor(position * len), 0, len - 1);//$math.fitToRange(Math.floor((end - start) * len * position + len * start), 0, len - 1);\n\t}\n\n\t/**\n\t * Returns text to be used in an axis tooltip for specific relative position.\n\t *\n\t * @param position Position\n\t * @return Tooltip text\n\t */\n\tpublic getTooltipText(position: number, _adjustPosition?: boolean): string | undefined {\n\t\t//@todo number formatter + tag\n\t\tconst dataItem = this.dataItems[this.axisPositionToIndex(position)];\n\t\tif (dataItem) {\n\t\t\tconst label = dataItem.get(\"label\")\n\t\t\tif (label) {\n\t\t\t\treturn populateString(label, this.get(\"tooltipText\", \"\"));\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected _updateTooltipText(tooltip: Tooltip, position: number) {\n\t\ttooltip._setDataItem(this.dataItems[this.axisPositionToIndex(position)]);\n\t\ttooltip.label.text.markDirtyText();\n\t}\n\n\t/**\n\t * Returns a data item from series that is closest to the `position`.\n\t *\n\t * @param series Series\n\t * @param position Relative position\n\t * @return Data item\n\t */\n\tpublic getSeriesItem(series: XYSeries, position: number): DataItem<IXYSeriesDataItem> | undefined {\n\t\tif (this.dataItems.length > 0) {\n\t\t\tlet fieldName = <any>(this.getPrivate(\"name\")! + this.get(\"renderer\").getPrivate(\"letter\")!);\n\t\t\tlet index = this.axisPositionToIndex(position);\n\t\t\t// try simple first\n\t\t\tlet seriesDataItem = series.dataItems[index];\n\t\t\tlet axisDataItem = this.dataItems[index];\n\t\t\tlet category = axisDataItem.get(\"category\");\n\n\t\t\tif (seriesDataItem && axisDataItem) {\n\t\t\t\tif (seriesDataItem.get(fieldName) === category) {\n\t\t\t\t\treturn seriesDataItem;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// if not found, try looking\n\t\t\tfor (let i = 0, len = series.dataItems.length; i < len; i++) {\n\t\t\t\tlet dataItem = series.dataItems[i];\n\t\t\t\tif (dataItem.get(fieldName) === category) {\n\t\t\t\t\treturn dataItem;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Zooms the axis to specific `start` and `end` indexes.\n\t *\n\t * Optional `duration` specifies duration of zoom animation in milliseconds.\n\t *\n\t * @param start Start index\n\t * @param end End index\n\t * @param duration Duration in milliseconds\n\t */\n\tpublic zoomToIndexes(start: number, end: number, duration?: number) {\n\t\tlet len = this.dataItems.length;\n\t\tthis.zoom(start / len, end / len, duration);\n\t}\n\n\tpublic zoomToCategories(startCategory: string, endCategory: string, duration?: number) {\n\t\tthis.zoomToIndexes(this.categoryToIndex(startCategory), this.categoryToIndex(endCategory) + 1, duration);\n\t}\n\n\t/**\n\t * Returns position span between start and end of a single cell in axis.\n\t *\n\t * @since 5.2.30\n\t * @return Position\n\t */\n\tpublic getCellWidthPosition(): number {\n\t\treturn this._frequency / this.dataItems.length / (this.get(\"end\", 1) - this.get(\"start\", 0));\n\t}\n\t\n\t/**\n\t * @ignore\n\t */\t\n\tpublic nextPosition(count?:number){\n\t\tif(count == null){\n\t\t\tcount = 1;\n\t\t}\n\n\t\tif(this.get(\"renderer\").getPrivate(\"letter\") == \"Y\"){\n\t\t\tcount *= -1;\n\t\t}\n\n\t\tconst position = this.getPrivate(\"tooltipPosition\", 0);\n\n\t\tconst index = $math.fitToRange(this.axisPositionToIndex(position) + count, 0, this.dataItems.length - 1);\t\t\n\t\treturn this.toGlobalPosition(this.indexToPosition(index));\n\t}\n}\n","import type { AxisRenderer } from \"./AxisRenderer\";\nimport type { IXYSeriesDataItem, XYSeries } from \"../series/XYSeries\";\n\nimport { DataItem } from \"../../../core/render/Component\";\nimport { Axis, IAxisSettings, IAxisPrivate, IAxisDataItem, IAxisEvents } from \"./Axis\";\nimport { MultiDisposer } from \"../../../core/util/Disposer\";\n\nimport * as $type from \"../../../core/util/Type\";\nimport * as $array from \"../../../core/util/Array\";\nimport * as $math from \"../../../core/util/Math\";\nimport * as $utils from \"../../../core/util/Utils\";\n\nexport interface IValueAxisSettings<R extends AxisRenderer> extends IAxisSettings<R> {\n\n\t/**\n\t * Override minimum value for the axis scale.\n\t *\n\t * NOTE: the axis might modify the minimum value to fit into its scale better,\n\t * unless `strictMinMax` is set to `true`.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/value-axis/#Custom_scope} for more info\n\t */\n\tmin?: number;\n\n\t/**\n\t * Override maximum value for the axis scale.\n\t *\n\t * NOTE: the axis might modify the maximum value to fit into its scale better,\n\t * unless `strictMinMax` is set to `true`.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/value-axis/#Custom_scope} for more info\n\t */\n\tmax?: number;\n\n\t/**\n\t * Force axis scale to be precisely at values as set in `min` and/or `max`.\n\t *\n\t * In case `min` and/or `max` is not set, the axis will fix its scale to\n\t * precise lowest and highest values available through all of the series\n\t * attached to it.\n\t *\n\t * This effectively locks the axis from auto-zooming itself when chart\n\t * is zoomed in.\n\t *\n\t * If you need to zoom to actual low/high values within currently visible\n\t * scope, use `strictMinMaxSelection` instead.\n\t *\n\t * Use `extraMin` and `extraMax` to add extra \"padding\".\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/value-axis/#Custom_scope} for more info\n\t */\n\tstrictMinMax?: boolean;\n\n\t/**\n\t * Force axis to auto-zoom to exact lowest and highest values from attached\n\t * series' data items within currently visible range.\n\t * \n\t * This is a good feature when your series is plotted from derivative values,\n\t * like `valueYChangeSelection` as it helps to avoid frequent jumping of\n\t * series to adjusted min and max of the axis.\n\t * \n\t * This will not work if strictMinMax is set to true (the axis will not zoom at all in this case).\n\t * \n\t * Use `extraMin` and `extraMax` to add extra \"padding\".\n\t *\n\t * @since 5.1.11\n\t */\n\tstrictMinMaxSelection?: boolean;\n\n\t/**\n\t * If set to `true` axis will use logarithmic scale.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/value-axis/#Logarithmic_scale} for more info\n\t */\n\tlogarithmic?: boolean;\n\n\t/**\n\t * Treat zero values as some other value.\n\t *\n\t * Useful in situations where zero would result in error, i.e. logarithmic\n\t * scale.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/value-axis/#Logarithmic_scale} for more info\n\t */\n\ttreatZeroAs?: number;\n\n\t/**\n\t * Relative extension to the automatically-calculated minimum value of the\n\t * axis scale.\n\t *\n\t * E..g. `0.1` will extend the scale by 10%, so if max value is `1000` and\n\t * minimum value is `0`, the new minimum value will be `-100`.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/value-axis/#Relative_scope_extension} for more info\n\t */\n\textraMin?: number;\n\n\t/**\n\t * Relative extension to the automatically-calculated maximum value of the\n\t * axis scale.\n\t *\n\t * E..g. `0.1` will extend the scale by 10%, so if max value is `1000`, the\n\t * axis will now show maximum value of `1100`.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/value-axis/#Relative_scope_extension} for more info\n\t */\n\textraMax?: number;\n\n\t/**\n\t * Base value, which indicates the threshold between \"positive\" and \"negative\"\n\t * values.\n\t *\n\t * @default 0\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/value-axis/#Base_value} for more info\n\t */\n\tbaseValue?: number;\n\n\t/**\n\t * Maximum number of decimals to allow in axis labels.\n\t *\n\t * This setting not only affects formatting of the labels, but also where and\n\t * how many grid/labels are placed on the axis.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/value-axis/#Label_format} for more info\n\t */\n\tmaxPrecision?: number;\n\n\t/**\n\t * A function that can be used to specify how to configure axis fills.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/#Axis_fills} for more info\n\t */\n\tfillRule?: (dataItem: DataItem<IValueAxisDataItem>) => void;\n\n\t/**\n\t * Number format to use for axis labels.\n\t *\n\t * If not set, will use format set in global number formatter.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/value-axis/#Label_format} for more info\n\t */\n\tnumberFormat?: string;\n\n\t/**\n\t * A numeric format used for numbers displayed in axis tooltip.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/value-axis/#Tooltip_number_format} for more info\n\t */\n\ttooltipNumberFormat?: string | Intl.NumberFormatOptions;\n\n\t/**\n\t * If set, will use greater precision for the axis tooltip than the one for\n\t * axis' actual labels.\n\t *\n\t * E.g. if axis displays labels with one decimal (`1.0`, `1.1`, `1.2`) setting\n\t * this setting to `1` would allow two decimals in axis tooltip, e.g. `1.15`.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/value-axis/#Tooltip_number_format} for more info\n\t */\n\textraTooltipPrecision?: number;\n\n\t/**\n\t * If your series relies on dynamically calculated values, like value\n\t * changes, percents, or total sums, set this to `true`.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/value-axis/#Calculated_values} for more info\n\t */\n\tcalculateTotals?: boolean;\n\n\t/**\n\t * This setting can be set to an instance of another [[ValueAxis]].\n\t *\n\t * If set the grid of this axis will be synced with grid of the target axis.\n\t *\n\t * NOTE: this is not 100% guaranteed to work. In some rare cases perfect\n\t * sync might not be possible.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/value-axis/#Syncing_grid} for more info\n\t */\n\tsyncWithAxis?: ValueAxis<AxisRenderer>;\n\n\t/**\n\t * If set to `false`, the axis won't be auto-zoomed to a selection (this\n\t * works only if the other axis is a `DateAxis` or a `CategoryAxis`).\n\t * \n\t * IMPORTANT: This setting will be ignored if both X and Y axes are\n\t * a `ValueAxis`.\n\t *\n\t * @since 5.2.20\n\t * @default true\n\t */\n\tautoZoom?: boolean;\n\n}\n\nexport interface IValueAxisDataItem extends IAxisDataItem {\n\n\t/**\n\t * Value of the data item.\n\t */\n\tvalue?: number;\n\n\t/**\n\t * End value for axis items that span multiple values, like axis ranges.\n\t */\n\tendValue?: number;\n\n\t/**\n\t * @ignore\n\t */\n\tlabelEndValue?: number;\n\n\t/**\n\t * If set to `true` the values fo this data item will be factored in when\n\t * calculating scale of the [[ValueAxis]]. Useful for axis ranges.\n\t * \n\t * @since 5.1.4\n\t */\n\taffectsMinMax?: boolean;\n\n}\n\nexport interface IMinMaxStep {\n\tmin: number;\n\tmax: number;\n\tstep: number;\n}\n\nexport interface IValueAxisPrivate extends IAxisPrivate {\n\n\t/**\n\t * Calculated current minimum value of the axis scale.\n\t * \n\t * @readonly\n\t */\n\tmin?: number;\n\n\t/**\n\t * Calculated current maximum value of the axis scale.\n\t * \n\t * @readonly\n\t */\n\tmax?: number;\n\n\t/**\n\t * A minimum value of the axis scale.\n\t *\n\t * Can be useful in cases where axis zoom is currently being animated, and\n\t * `min` is reflecting current intermediate value, whereas `minFinal` will\n\t * show target value.\n\t * \n\t * @readonly\n\t */\n\tminFinal?: number;\n\n\t/**\n\t * A maximum value of the axis scale.\n\t *\n\t * Can be useful in cases where axis zoom is currently being animated, and\n\t * `max` is reflecting current intermediate value, whereas `maxFinal` will\n\t * show target value.\n\t * \n\t * @readonly\n\t */\n\tmaxFinal?: number;\n\n\t/**\n\t * Calculated minimum value of the currently viewable (zoomed) scope.\n\t * \n\t * @readonly\n\t */\n\tselectionMin?: number;\n\n\t/**\n\t * Calculated maximum value of the currently viewable (zoomed) scope.\n\t * \n\t * @readonly\n\t */\n\tselectionMax?: number;\n\n\t/**\n\t * A target minimum value of the viewable value scope.\n\t *\n\t * Can be useful in cases where axis zoom is currently being animated, and\n\t * `selectionMin` is reflecting current intermediate value,\n\t * whereas `selectionMinFinal` will show target value.\n\t * \n\t * @readonly\n\t */\n\tselectionMinFinal?: number;\n\n\t/**\n\t * A target maximum value of the viewable value scope.\n\t *\n\t * Can be useful in cases where axis zoom is currently being animated, and\n\t * `selectionMax` is reflecting current intermediate value,\n\t * whereas `selectionMaxFinal` will show target value.\n\t * \n\t * @readonly\n\t */\n\tselectionMaxFinal?: number;\n\n\t/**\n\t * When selection step changes, it might change during axis zoom animation.\n\t *\n\t * `selectionStepFinal` will show what step will be when animation is\n\t * finished.\n\t * \n\t * @readonly\n\t */\n\tselectionStepFinal?: number;\n\n\t/**\n\t * Value step between grid lines.\n\t * \n\t * @readonly\n\t */\n\tstep?: number;\n\n\t/**\n\t * Decimal places used when formatting axis labels.\n\t * \n\t * @readonly\n\t */\n\tstepDecimalPlaces?: number;\n\n}\n\nexport interface IValueAxisEvents extends IAxisEvents {\n\n}\n\n/**\n * Creates a value axis.\n *\n * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/value-axis/} for more info\n * @important\n */\nexport class ValueAxis<R extends AxisRenderer> extends Axis<R> {\n\tpublic static className: string = \"ValueAxis\";\n\tpublic static classNames: Array<string> = Axis.classNames.concat([ValueAxis.className]);\n\n\tdeclare public _settings: IValueAxisSettings<R>;\n\tdeclare public _privateSettings: IValueAxisPrivate;\n\tdeclare public _dataItemSettings: IValueAxisDataItem;\n\tdeclare public _events: IValueAxisEvents;\n\n\tprotected _dirtyExtremes: boolean = false;\n\tprotected _dirtySelectionExtremes: boolean = false;\n\tprotected _dseHandled = false;\n\tprotected _deltaMinMax: number = 1;\n\tprotected _minReal: number | undefined;\n\tprotected _maxReal: number | undefined;\n\n\tprotected _minRealLog: number | undefined;\n\n\tprotected _baseValue: number = 0;\n\tprotected _syncDp?: MultiDisposer;\n\tprotected _minLogAdjusted: number = 1;\n\t/**\n\t * @ignore\n\t */\n\tpublic markDirtyExtremes() {\n\t\tthis._dirtyExtremes = true;\n\t\tthis.markDirty();\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic markDirtySelectionExtremes() {\n\t\tthis._dirtySelectionExtremes = true;\n\t\tthis.markDirty();\n\t}\n\n\tprotected _afterNew() {\n\t\tthis._settings.themeTags = $utils.mergeTags(this._settings.themeTags, [\"axis\"]);\n\t\tthis.setPrivateRaw(\"name\", \"value\");\n\t\tthis.addTag(\"value\");\n\t\tsuper._afterNew();\n\t}\n\n\tpublic _prepareChildren() {\n\t\tsuper._prepareChildren();\n\n\t\tif (this.isDirty(\"syncWithAxis\")) {\n\t\t\tlet previousValue = this._prevSettings.syncWithAxis;\n\t\t\tif (previousValue) {\n\t\t\t\tif (this._syncDp) {\n\t\t\t\t\tthis._syncDp.dispose();\n\t\t\t\t}\n\t\t\t}\n\t\t\tlet syncWithAxis = this.get(\"syncWithAxis\");\n\t\t\tif (syncWithAxis) {\n\t\t\t\tthis._syncDp = new MultiDisposer([\n\t\t\t\t\tsyncWithAxis.onPrivate(\"selectionMinFinal\", () => {\n\t\t\t\t\t\tthis._dirtySelectionExtremes = true;\n\t\t\t\t\t}),\n\t\t\t\t\tsyncWithAxis.onPrivate(\"selectionMaxFinal\", () => {\n\t\t\t\t\t\tthis._dirtySelectionExtremes = true;\n\t\t\t\t\t})\n\t\t\t\t])\n\t\t\t}\n\t\t}\n\n\t\tlet someDirty = false;\n\t\tif (this.isDirty(\"min\") || this.isDirty(\"max\") || this.isDirty(\"maxPrecision\") || this.isDirty(\"numberFormat\")) {\n\t\t\tsomeDirty = true;\n\t\t\tthis.ghostLabel.set(\"text\", \"\");\n\t\t}\n\n\t\t//if (this._dirtyExtremes || this.isPrivateDirty(\"width\") || this.isPrivateDirty(\"height\") || this.isDirty(\"min\") || this.isDirty(\"max\") || this.isDirty(\"extraMin\") || this.isDirty(\"extraMax\") || this.isDirty(\"logarithmic\") || this.isDirty(\"treatZeroAs\") || this.isDirty(\"baseValue\") || this.isDirty(\"strictMinMax\") || this.isDirty(\"maxPrecision\")) {\n\t\tif (this._sizeDirty || this._dirtyExtremes || this._valuesDirty || someDirty || this.isPrivateDirty(\"width\") || this.isPrivateDirty(\"height\") || this.isDirty(\"extraMin\") || this.isDirty(\"extraMax\") || this.isDirty(\"logarithmic\") || this.isDirty(\"treatZeroAs\") || this.isDirty(\"baseValue\") || this.isDirty(\"strictMinMax\") || this.isDirty(\"strictMinMaxSelection\")) {\n\t\t\tthis._getMinMax();\n\t\t\tthis._dirtyExtremes = false;\n\t\t}\n\t\t\n\t\tthis._handleSizeDirty();\n\n\t\tif (this._dirtySelectionExtremes && !this._isPanning && this.get(\"autoZoom\", true)) {\n\n\t\t\tconst chart = this.chart;\n\t\t\tlet getMM = false;\n\t\t\t// #1563\n\t\t\tif (chart) {\n\t\t\t\tconst letter = this.get(\"renderer\").getPrivate(\"letter\");\n\t\t\t\tif (letter == \"Y\") {\n\t\t\t\t\tchart.xAxes.each((axis) => {\n\t\t\t\t\t\tif (axis.className != \"ValueAxis\") {\n\t\t\t\t\t\t\tgetMM = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t\telse if (letter == \"X\") {\n\t\t\t\t\tchart.yAxes.each((axis) => {\n\t\t\t\t\t\tif (axis.className != \"ValueAxis\") {\n\t\t\t\t\t\t\tgetMM = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (getMM) {\n\t\t\t\tthis._getSelectionMinMax();\n\t\t\t}\n\t\t\tthis._dirtySelectionExtremes = false;\n\t\t}\n\n\t\tthis._groupData();\n\n\t\tif (this._sizeDirty || this._valuesDirty || this.isDirty(\"start\") || this.isDirty(\"end\") || this.isPrivateDirty(\"min\") || this.isPrivateDirty(\"selectionMax\") || this.isPrivateDirty(\"selectionMin\") || this.isPrivateDirty(\"max\") || this.isPrivateDirty(\"step\") || this.isPrivateDirty(\"width\") || this.isPrivateDirty(\"height\") || this.isDirty(\"logarithmic\")) {\n\t\t\tthis._handleRangeChange();\n\t\t\tthis._prepareAxisItems();\n\t\t\tthis._updateAxisRanges();\n\t\t}\n\n\t\tthis._baseValue = this.baseValue();\n\n\t}\n\n\tprotected _handleSizeDirty() {\n\t\tif (this._sizeDirty && !this._dseHandled) {\n\t\t\tthis._dirtySelectionExtremes = true;\n\t\t\tthis._dseHandled = true;\n\t\t}\n\t}\n\n\tpublic _clearDirty(): void {\n\t\tsuper._clearDirty();\n\t\tthis._dseHandled = false;\n\t}\n\n\tprotected _groupData() {\n\n\t}\n\n\tprotected _formatText(value: number) {\n\t\tconst numberFormat = this.get(\"numberFormat\");\n\t\tconst formatter = this.getNumberFormatter();\n\n\t\tlet text = \"\";\n\n\t\tif (numberFormat) {\n\t\t\ttext = formatter.format(value, numberFormat);\n\t\t}\n\t\telse {\n\t\t\ttext = formatter.format(value, undefined, this.getPrivate(\"stepDecimalPlaces\"));\n\t\t}\n\t\treturn text;\n\t}\n\n\tprotected _prepareAxisItems() {\n\t\tconst min = this.getPrivate(\"min\");\n\t\tconst max = this.getPrivate(\"max\");\n\n\t\tif ($type.isNumber(min) && $type.isNumber(max)) {\n\n\t\t\tconst logarithmic = this.get(\"logarithmic\");\n\t\t\tconst step = this.getPrivate(\"step\")!;\n\t\t\tconst selectionMin = this.getPrivate(\"selectionMin\")!;\n\t\t\tconst selectionMax = this.getPrivate(\"selectionMax\")! + step;\n\n\t\t\tlet value = selectionMin - step;\n\t\t\tlet differencePower = 1;\n\t\t\tlet minLog: number = min;\n\n\t\t\tif (logarithmic) {\n\t\t\t\tvalue = this._minLogAdjusted;\n\n\t\t\t\tif (value < selectionMin) {\n\t\t\t\t\twhile (value < selectionMin) {\n\t\t\t\t\t\tvalue += step;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tminLog = value;\n\n\t\t\t\tif (minLog <= 0) {\n\t\t\t\t\tminLog = 1;\n\t\t\t\t\tif (step < 1) {\n\t\t\t\t\t\tif ($type.isNumber(this._minRealLog)) {\n\t\t\t\t\t\t\tminLog = this._minRealLog;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tminLog = Math.pow(10, -50);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tdifferencePower = Math.log(selectionMax - step) * Math.LOG10E - Math.log(minLog) * Math.LOG10E;\n\n\t\t\t\tif (differencePower > 2) {\n\t\t\t\t\tvalue = Math.pow(10, Math.log(minLog) * Math.LOG10E - 50);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/// minor grid\n\t\t\tconst renderer = this.get(\"renderer\");\n\t\t\tconst minorLabelsEnabled = renderer.get(\"minorLabelsEnabled\");\n\t\t\tconst minorGridEnabled = renderer.get(\"minorGridEnabled\", minorLabelsEnabled);\n\n\t\t\tlet stepPower = Math.pow(10, Math.floor(Math.log(Math.abs(step)) * Math.LOG10E));\n\n\t\t\tconst stepAdjusted = Math.round(step / stepPower);\n\n\t\t\tlet minorGridCount = 2;\n\n\t\t\tif ($math.round(stepAdjusted / 5, 10) % 1 == 0) {\n\t\t\t\tminorGridCount = 5;\n\t\t\t}\n\n\t\t\tif ($math.round(stepAdjusted / 10, 10) % 1 == 0) {\n\t\t\t\tminorGridCount = 10;\n\t\t\t}\n\n\t\t\tlet minorStep = step / minorGridCount;\n\n\t\t\t// end of minor grid\n\t\t\tlet i = 0;\n\t\t\tlet m = 0;\n\t\t\tlet previous = -Infinity;\n\n\t\t\twhile (value < selectionMax) {\n\t\t\t\tlet dataItem: DataItem<this[\"_dataItemSettings\"]>;\n\t\t\t\tif (this.dataItems.length < i + 1) {\n\t\t\t\t\tdataItem = new DataItem(this, undefined, {});\n\t\t\t\t\tthis._dataItems.push(dataItem);\n\t\t\t\t\tthis.processDataItem(dataItem);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tdataItem = this.dataItems[i];\n\t\t\t\t}\n\n\t\t\t\tthis._createAssets(dataItem, []);\n\t\t\t\tthis._toggleDataItem(dataItem, true);\n\n\t\t\t\tdataItem.setRaw(\"value\", value);\n\t\t\t\tconst label = dataItem.get(\"label\");\n\t\t\t\tif (label) {\n\t\t\t\t\tlabel.set(\"text\", this._formatText(value));\n\t\t\t\t}\n\n\t\t\t\tthis._prepareDataItem(dataItem);\n\n\t\t\t\tlet nextValue = value;\n\t\t\t\tif (!logarithmic) {\n\t\t\t\t\tnextValue += step;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (differencePower > 2) {\n\t\t\t\t\t\tnextValue = Math.pow(10, Math.log(minLog) * Math.LOG10E + i - 50);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tnextValue += step;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// minor grid\n\t\t\t\tif (minorGridEnabled) {\n\t\t\t\t\tlet minorValue = value + minorStep;\n\n\t\t\t\t\tif (logarithmic) {\n\t\t\t\t\t\tif (differencePower > 2) {\n\t\t\t\t\t\t\tlet minorMinMaxStep = this._adjustMinMax(value, nextValue, 10);\n\t\t\t\t\t\t\tminorStep = minorMinMaxStep.step;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tminorValue = value + minorStep;\n\t\t\t\t\t}\n\n\t\t\t\t\twhile (minorValue < nextValue - step * 0.00000000001) {\n\t\t\t\t\t\tlet minorDataItem: DataItem<this[\"_dataItemSettings\"]>;\n\t\t\t\t\t\tif (this.minorDataItems.length < m + 1) {\n\t\t\t\t\t\t\tminorDataItem = new DataItem(this, undefined, {});\n\t\t\t\t\t\t\tthis.minorDataItems.push(minorDataItem);\n\t\t\t\t\t\t\tthis.processDataItem(minorDataItem);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tminorDataItem = this.minorDataItems[m];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthis._createAssets(minorDataItem, [\"minor\"], true);\n\t\t\t\t\t\tthis._toggleDataItem(minorDataItem, true);\n\t\t\t\t\t\tminorDataItem.setRaw(\"value\", minorValue);\n\n\t\t\t\t\t\tconst minorLabel = minorDataItem.get(\"label\");\n\t\t\t\t\t\tif (minorLabel) {\n\t\t\t\t\t\t\tif (minorLabelsEnabled) {\n\t\t\t\t\t\t\t\tminorLabel.set(\"text\", this._formatText(minorValue));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tminorLabel.setPrivate(\"visible\", false);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthis._prepareDataItem(minorDataItem);\n\t\t\t\t\t\tminorValue += minorStep;\n\t\t\t\t\t\tm++;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tvalue = nextValue;\n\n\t\t\t\tif (previous == value) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tlet stepPower = Math.pow(10, Math.floor(Math.log(Math.abs(step)) * Math.LOG10E));\n\t\t\t\tif (stepPower < 1 && !logarithmic) {\n\t\t\t\t\t// exponent is less then 1 too. Count decimals of exponent\n\t\t\t\t\tlet decCount = Math.round(Math.abs(Math.log(Math.abs(stepPower)) * Math.LOG10E)) + 2;\n\t\t\t\t\t// round value to avoid floating point issues\n\t\t\t\t\tvalue = $math.round(value, decCount);\n\t\t\t\t}\n\t\t\t\ti++;\n\n\t\t\t\tprevious = value;\n\t\t\t}\n\n\t\t\tfor (let j = i; j < this.dataItems.length; j++) {\n\t\t\t\tthis._toggleDataItem(this.dataItems[j], false);\n\t\t\t}\n\n\t\t\tfor (let j = m; j < this.minorDataItems.length; j++) {\n\t\t\t\tthis._toggleDataItem(this.minorDataItems[j], false);\n\t\t\t}\n\n\t\t\t$array.each(this.series, (series) => {\n\t\t\t\tif (series.inited) {\n\t\t\t\t\tseries._markDirtyAxes();\n\t\t\t\t}\n\t\t\t})\n\n\t\t\tthis._updateGhost();\n\t\t}\n\t}\n\n\n\tpublic _prepareDataItem(dataItem: DataItem<this[\"_dataItemSettings\"]>, count?: number) {\n\t\tlet renderer = this.get(\"renderer\");\n\t\tlet value = dataItem.get(\"value\")!;\n\t\tlet endValue = dataItem.get(\"endValue\");\n\n\t\tlet position = this.valueToPosition(value);\n\n\t\tlet endPosition = position;\n\t\tlet fillEndPosition = this.valueToPosition(value + this.getPrivate(\"step\")!);\n\n\t\tif ($type.isNumber(endValue)) {\n\t\t\tendPosition = this.valueToPosition(endValue);\n\t\t\tfillEndPosition = endPosition;\n\t\t}\n\n\t\tif (dataItem.get(\"isRange\")) {\n\t\t\tif (endValue == null) {\n\t\t\t\tfillEndPosition = position;\n\t\t\t}\n\t\t}\n\n\t\tlet labelEndPosition = endPosition;\n\n\t\tlet labelEndValue = dataItem.get(\"labelEndValue\");\n\t\tif (labelEndValue != null) {\n\t\t\tlabelEndPosition = this.valueToPosition(labelEndValue);\n\t\t}\n\n\t\trenderer.updateLabel(dataItem.get(\"label\"), position, labelEndPosition, count);\n\n\t\tconst grid = dataItem.get(\"grid\");\n\t\trenderer.updateGrid(grid, position, endPosition);\n\t\tif (grid) {\n\t\t\tif (value == this.get(\"baseValue\", 0)) {\n\t\t\t\tgrid.addTag(\"base\");\n\t\t\t\tgrid._applyThemes();\n\t\t\t}\n\t\t\telse if (grid.hasTag(\"base\")) {\n\t\t\t\tgrid.removeTag(\"base\");\n\t\t\t\tgrid._applyThemes();\n\t\t\t}\n\t\t}\n\n\t\trenderer.updateTick(dataItem.get(\"tick\"), position, labelEndPosition, count);\n\t\trenderer.updateFill(dataItem.get(\"axisFill\"), position, fillEndPosition);\n\n\t\tthis._processBullet(dataItem);\n\t\trenderer.updateBullet(dataItem.get(\"bullet\"), position, endPosition);\n\n\t\tif (!dataItem.get(\"isRange\")) {\n\t\t\tconst fillRule = this.get(\"fillRule\");\n\t\t\tif (fillRule) {\n\t\t\t\tfillRule(dataItem)\n\t\t\t}\n\t\t}\n\t}\n\n\n\tprotected _handleRangeChange() {\n\t\tlet selectionMin: number = this.positionToValue(this.get(\"start\", 0));\n\t\tlet selectionMax: number = this.positionToValue(this.get(\"end\", 1));\n\n\t\tconst gridCount = this.get(\"renderer\").gridCount();\n\t\tlet minMaxStep: IMinMaxStep = this._adjustMinMax(selectionMin, selectionMax, gridCount, true);\n\n\t\tlet stepDecimalPlaces = $utils.decimalPlaces(minMaxStep.step);\n\t\tthis.setPrivateRaw(\"stepDecimalPlaces\", stepDecimalPlaces);\n\n\t\tselectionMin = $math.round(selectionMin, stepDecimalPlaces);\n\t\tselectionMax = $math.round(selectionMax, stepDecimalPlaces);\n\n\t\tminMaxStep = this._adjustMinMax(selectionMin, selectionMax, gridCount, true);\n\n\t\tlet step = minMaxStep.step;\n\t\tselectionMin = minMaxStep.min;\n\t\tselectionMax = minMaxStep.max;\n\n\t\tif (this.getPrivate(\"selectionMin\") !== selectionMin || this.getPrivate(\"selectionMax\") !== selectionMax || this.getPrivate(\"step\") !== step) {\n\t\t\t// do not change to setPrivate, will cause SO\n\t\t\tthis.setPrivateRaw(\"selectionMin\", selectionMin);\n\t\t\tthis.setPrivateRaw(\"selectionMax\", selectionMax);\n\n\t\t\tthis.setPrivateRaw(\"step\", step);\n\t\t}\n\t}\n\n\t/**\n\t * Converts a relative position to a corresponding numeric value from axis\n\t * scale.\n\t *\n\t * @param position Relative position\n\t * @return Value\n\t */\n\tpublic positionToValue(position: number): number {\n\t\tconst min = this.getPrivate(\"min\")!;\n\t\tconst max = this.getPrivate(\"max\")!;\n\n\t\tif (!this.get(\"logarithmic\")) {\n\t\t\treturn position * (max - min) + min;\n\t\t}\n\t\telse {\n\t\t\treturn Math.pow(Math.E, (position * ((Math.log(max) * Math.LOG10E - Math.log(min) * Math.LOG10E)) + Math.log(min) * Math.LOG10E) / Math.LOG10E);\n\t\t}\n\t}\n\n\t/**\n\t * Convers value to a relative position on axis.\n\t *\n\t * @param value Value\n\t * @return Relative position\n\t */\n\tpublic valueToPosition(value: number): number {\n\n\t\tconst min = this.getPrivate(\"min\")!;\n\t\tconst max = this.getPrivate(\"max\")!;\n\n\t\tif (!this.get(\"logarithmic\")) {\n\t\t\treturn (value - min) / (max - min);\n\t\t}\n\t\telse {\n\t\t\tif (value <= 0) {\n\t\t\t\tlet treatZeroAs = this.get(\"treatZeroAs\");\n\t\t\t\tif ($type.isNumber(treatZeroAs)) {\n\t\t\t\t\tvalue = treatZeroAs;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn (Math.log(value) * Math.LOG10E - Math.log(min) * Math.LOG10E) / ((Math.log(max) * Math.LOG10E - Math.log(min) * Math.LOG10E));\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic valueToFinalPosition(value: number): number {\n\n\t\tconst min = this.getPrivate(\"minFinal\")!;\n\t\tconst max = this.getPrivate(\"maxFinal\")!;\n\n\t\tif (!this.get(\"logarithmic\")) {\n\t\t\treturn (value - min) / (max - min);\n\t\t}\n\t\telse {\n\t\t\tif (value <= 0) {\n\t\t\t\tlet treatZeroAs = this.get(\"treatZeroAs\");\n\t\t\t\tif ($type.isNumber(treatZeroAs)) {\n\t\t\t\t\tvalue = treatZeroAs;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn (Math.log(value) * Math.LOG10E - Math.log(min) * Math.LOG10E) / ((Math.log(max) * Math.LOG10E - Math.log(min) * Math.LOG10E));\n\t\t}\n\t}\n\n\t/**\n\t * Returns X coordinate in pixels corresponding to specific value.\n\t *\n\t * @param value Numeric value\n\t * @param location Location\n\t * @param baseValue Base value\n\t * @return X coordinate\n\t */\n\tpublic getX(value: number, location: number, baseValue: number) {\n\t\tvalue = baseValue + (value - baseValue) * location;\n\n\t\tconst position = this.valueToPosition(value);\n\t\treturn this._settings.renderer.positionToCoordinate(position);\n\t}\n\n\t/**\n\t * Returns X coordinate in pixels corresponding to specific value.\n\t *\n\t * @param value Numeric value\n\t * @param location Location\n\t * @param baseValue Base value\n\t * @return X coordinate\n\t */\n\tpublic getY(value: number, location: number, baseValue: number) {\n\t\tvalue = baseValue + (value - baseValue) * location;\n\n\t\tconst position = this.valueToPosition(value)\n\t\treturn this._settings.renderer.positionToCoordinate(position);\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic getDataItemCoordinateX(dataItem: DataItem<IXYSeriesDataItem>, field: string, _cellLocation: number, axisLocation: number): number {\n\t\treturn this._settings.renderer.positionToCoordinate(this.getDataItemPositionX(dataItem, field, _cellLocation, axisLocation));\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic getDataItemPositionX(dataItem: DataItem<IXYSeriesDataItem>, field: string, _cellLocation: number, axisLocation: number) {\n\t\tlet value = dataItem.get(field as any);\n\n\t\tconst stackToItem = dataItem.get(\"stackToItemX\");\n\t\tif (stackToItem) {\n\t\t\tconst series = dataItem.component as XYSeries;\n\t\t\tvalue = value * axisLocation + series.getStackedXValueWorking(dataItem, field);\n\t\t}\n\t\telse {\n\t\t\tvalue = this._baseValue + (value - this._baseValue) * axisLocation;\n\t\t}\n\n\t\treturn this.valueToPosition(value);\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic getDataItemCoordinateY(dataItem: DataItem<IXYSeriesDataItem>, field: string, _cellLocation: number, axisLocation: number): number {\n\t\treturn this._settings.renderer.positionToCoordinate(this.getDataItemPositionY(dataItem, field, _cellLocation, axisLocation));\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic getDataItemPositionY(dataItem: DataItem<IXYSeriesDataItem>, field: string, _cellLocation: number, axisLocation: number): number {\n\t\tlet value = dataItem.get(field as any);\n\n\t\tconst stackToItem = dataItem.get(\"stackToItemY\");\n\t\tif (stackToItem) {\n\t\t\tconst series = dataItem.component as XYSeries;\n\t\t\tvalue = value * axisLocation + series.getStackedYValueWorking(dataItem, field);\n\t\t}\n\t\telse {\n\t\t\tvalue = this._baseValue + (value - this._baseValue) * axisLocation;\n\t\t}\n\n\t\treturn this.valueToPosition(value);\n\t}\n\n\t/**\n\t * Returns relative position of axis' `baseValue`.\n\t *\n\t * @return Base value position\n\t */\n\tpublic basePosition(): number {\n\t\treturn this.valueToPosition(this.baseValue());\n\t}\n\n\t/**\n\t * Base value of the [[ValueAxis]], which determines positive and negative\n\t * values.\n\t *\n\t * @return Base value\n\t */\n\tpublic baseValue(): number {\n\t\tconst min = Math.min(this.getPrivate(\"minFinal\", -Infinity), this.getPrivate(\"selectionMin\", -Infinity));\n\t\tconst max = Math.max(this.getPrivate(\"maxFinal\", Infinity), this.getPrivate(\"selectionMax\", Infinity));\n\t\tlet baseValue = this.get(\"baseValue\", 0);\n\n\t\tif (baseValue < min) {\n\t\t\tbaseValue = min;\n\t\t}\n\n\t\tif (baseValue > max) {\n\t\t\tbaseValue = max\n\t\t}\n\n\t\treturn baseValue;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic cellEndValue(value: number): number {\n\t\treturn value;\n\t}\n\n\tprotected fixSmallStep(step: number): number {\n\t\t// happens because of floating point error\n\t\tif (1 + step === 1) {\n\t\t\tstep *= 2;\n\t\t\treturn this.fixSmallStep(step);\n\t\t}\n\t\treturn step;\n\t}\n\n\tprotected _fixMin(min: number) {\n\t\treturn min;\n\t}\n\n\tprotected _fixMax(max: number) {\n\t\treturn max;\n\t}\n\n\tpublic _calculateTotals() {\n\t\tif (this.get(\"calculateTotals\")) {\n\t\t\tlet series = this.series[0];\n\t\t\tif (series) {\n\t\t\t\tlet startIndex = series.startIndex();\n\n\t\t\t\tif (series.dataItems.length > 0) {\n\n\t\t\t\t\tif (startIndex > 0) {\n\t\t\t\t\t\tstartIndex--;\n\t\t\t\t\t}\n\t\t\t\t\tlet endIndex = series.endIndex();\n\t\t\t\t\tif (endIndex < series.dataItems.length) {\n\t\t\t\t\t\tendIndex++;\n\t\t\t\t\t}\n\n\t\t\t\t\tlet field: string | undefined;\n\t\t\t\t\tlet vc: string | undefined;\n\n\t\t\t\t\tif (series.get(\"yAxis\") == this) {\n\t\t\t\t\t\tfield = \"valueY\";\n\t\t\t\t\t\tvc = \"vcy\";\n\t\t\t\t\t}\n\t\t\t\t\telse if (series.get(\"xAxis\") == this) {\n\t\t\t\t\t\tfield = \"valueX\";\n\t\t\t\t\t\tvc = \"vcx\";\n\t\t\t\t\t}\n\n\t\t\t\t\tlet fieldWorking = field + \"Working\";\n\n\t\t\t\t\tif (field) {\n\t\t\t\t\t\tfor (let i = startIndex; i < endIndex; i++) {\n\t\t\t\t\t\t\tlet sum = 0;\n\t\t\t\t\t\t\tlet total = 0;\n\n\t\t\t\t\t\t\t$array.each(this.series, (series) => {\n\t\t\t\t\t\t\t\tif (!series.get(\"excludeFromTotal\")) {\n\t\t\t\t\t\t\t\t\tlet dataItem = series.dataItems[i];\n\t\t\t\t\t\t\t\t\tif (dataItem) {\n\t\t\t\t\t\t\t\t\t\tlet value = dataItem.get(fieldWorking as any) * series.get(vc as any);\n\n\t\t\t\t\t\t\t\t\t\tif (!$type.isNaN(value)) {\n\t\t\t\t\t\t\t\t\t\t\tsum += value;\n\t\t\t\t\t\t\t\t\t\t\ttotal += Math.abs(value);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\n\t\t\t\t\t\t\t$array.each(this.series, (series) => {\n\t\t\t\t\t\t\t\tif (!series.get(\"excludeFromTotal\")) {\n\t\t\t\t\t\t\t\t\tlet dataItem = series.dataItems[i];\n\t\t\t\t\t\t\t\t\tif (dataItem) {\n\t\t\t\t\t\t\t\t\t\tlet value = dataItem.get(fieldWorking as any) * series.get(vc as any);\n\n\t\t\t\t\t\t\t\t\t\tif (!$type.isNaN(value)) {\n\t\t\t\t\t\t\t\t\t\t\tdataItem.set((field + \"Total\") as any, total);\n\t\t\t\t\t\t\t\t\t\t\tdataItem.set((field + \"Sum\") as any, sum);\n\t\t\t\t\t\t\t\t\t\t\tdataItem.set((field + \"TotalPercent\") as any, value / total * 100);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected _getSelectionMinMax() {\n\t\tconst min = this.getPrivate(\"minFinal\");\n\t\tconst max = this.getPrivate(\"maxFinal\");\n\n\t\tconst minDefined = this.get(\"min\");\n\t\tconst maxDefined = this.get(\"max\");\n\n\t\tlet extraMin = this.get(\"extraMin\", 0);\n\t\tlet extraMax = this.get(\"extraMax\", 0);\n\n\t\tif (this.get(\"logarithmic\")) {\n\t\t\tif (this.get(\"extraMin\") == null) {\n\t\t\t\textraMin = 0.1;\n\t\t\t}\n\t\t\tif (this.get(\"extraMax\") == null) {\n\t\t\t\textraMax = 0.2;\n\t\t\t}\n\t\t}\n\n\t\tconst gridCount = this.get(\"renderer\").gridCount();\n\t\tconst selectionStrictMinMax = this.get(\"strictMinMaxSelection\");\n\t\tlet strictMinMax = this.get(\"strictMinMax\");\n\n\t\tif ($type.isNumber(min) && $type.isNumber(max)) {\n\t\t\tlet selectionMin = max;\n\t\t\tlet selectionMax = min;\n\n\t\t\t$array.each(this.series, (series) => {\n\t\t\t\tif (!series.get(\"ignoreMinMax\")) {\n\t\t\t\t\tlet seriesMin: number | undefined;\n\t\t\t\t\tlet seriesMax: number | undefined;\n\t\t\t\t\tconst outOfSelection = series.getPrivate(\"outOfSelection\");\n\n\t\t\t\t\tif (series.get(\"xAxis\") === this) {\n\t\t\t\t\t\tif (!outOfSelection) {\n\t\t\t\t\t\t\tlet minX = series.getPrivate(\"minX\");\n\t\t\t\t\t\t\tlet maxX = series.getPrivate(\"maxX\");\n\n\t\t\t\t\t\t\t// solves #90085\n\t\t\t\t\t\t\tif (series.startIndex() != 0 || series.endIndex() != series.dataItems.length) {\n\t\t\t\t\t\t\t\tminX = undefined;\n\t\t\t\t\t\t\t\tmaxX = undefined;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tseriesMin = series.getPrivate(\"selectionMinX\", minX);\n\t\t\t\t\t\t\tseriesMax = series.getPrivate(\"selectionMaxX\", maxX);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if (series.get(\"yAxis\") === this) {\n\t\t\t\t\t\tif (!outOfSelection) {\n\n\t\t\t\t\t\t\tlet minY = series.getPrivate(\"minY\");\n\t\t\t\t\t\t\tlet maxY = series.getPrivate(\"maxY\");\n\n\t\t\t\t\t\t\t// solves #90085\n\t\t\t\t\t\t\tif (series.startIndex() != 0 || series.endIndex() != series.dataItems.length) {\n\t\t\t\t\t\t\t\tminY = undefined;\n\t\t\t\t\t\t\t\tmaxY = undefined;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tseriesMin = series.getPrivate(\"selectionMinY\", minY);\n\t\t\t\t\t\t\tseriesMax = series.getPrivate(\"selectionMaxY\", maxY);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!series.isHidden() && !series.isShowing()) {\n\t\t\t\t\t\tif ($type.isNumber(seriesMin)) {\n\t\t\t\t\t\t\tselectionMin = Math.min(selectionMin, seriesMin);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ($type.isNumber(seriesMax)) {\n\t\t\t\t\t\t\tselectionMax = Math.max(selectionMax, seriesMax);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\n\t\t\tthis.axisRanges.each((range) => {\n\t\t\t\tif (range.get(\"affectsMinMax\")) {\n\t\t\t\t\tlet value = range.get(\"value\");\n\t\t\t\t\tif (value != null) {\n\t\t\t\t\t\tselectionMin = Math.min(selectionMin, value);\n\t\t\t\t\t\tselectionMax = Math.max(selectionMax, value);\n\t\t\t\t\t}\n\t\t\t\t\tvalue = range.get(\"endValue\");\n\t\t\t\t\tif (value != null) {\n\t\t\t\t\t\tselectionMin = Math.min(selectionMin, value);\n\t\t\t\t\t\tselectionMax = Math.max(selectionMax, value);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\n\t\t\tif (selectionMin > selectionMax) {\n\t\t\t\t[selectionMin, selectionMax] = [selectionMax, selectionMin]\n\t\t\t}\n\n\t\t\tif ($type.isNumber(minDefined)) {\n\t\t\t\tif (strictMinMax) {\n\t\t\t\t\tselectionMin = minDefined;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tselectionMin = min;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (strictMinMax) {\n\t\t\t\tif ($type.isNumber(this._minReal)) {\n\t\t\t\t\tselectionMin = this._minReal;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($type.isNumber(maxDefined)) {\n\t\t\t\tif (strictMinMax) {\n\t\t\t\t\tselectionMax = maxDefined;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tselectionMax = max;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (strictMinMax) {\n\t\t\t\tif ($type.isNumber(this._maxReal)) {\n\t\t\t\t\tselectionMax = this._maxReal;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (selectionMin === selectionMax) {\n\t\t\t\tlet smin = selectionMin;\n\t\t\t\tselectionMin -= this._deltaMinMax;\n\t\t\t\tselectionMax += this._deltaMinMax;\n\n\t\t\t\tif (selectionMin < min) {\n\t\t\t\t\tlet d = smin - min;\n\t\t\t\t\tif (d == 0) {\n\t\t\t\t\t\td = this._deltaMinMax;\n\t\t\t\t\t}\n\n\t\t\t\t\tselectionMin = smin - d;\n\t\t\t\t\tselectionMax = smin + d;\n\n\t\t\t\t\tstrictMinMax = true;\n\t\t\t\t}\n\n\t\t\t\tlet minMaxStep2 = this._adjustMinMax(selectionMin, selectionMax, gridCount, strictMinMax);\n\t\t\t\tselectionMin = minMaxStep2.min;\n\t\t\t\tselectionMax = minMaxStep2.max;\n\t\t\t}\n\n\t\t\tlet selectionMinReal = selectionMin;\n\t\t\tlet selectionMaxReal = selectionMax;\n\n\t\t\tlet delta = selectionMax - selectionMin;\n\n\t\t\tselectionMin -= delta * extraMin;\n\t\t\tselectionMax += delta * extraMax;\t\t\t\n\n\t\t\tlet minMaxStep: IMinMaxStep = this._adjustMinMax(selectionMin, selectionMax, gridCount);\n\n\t\t\tselectionMin = minMaxStep.min;\n\t\t\tselectionMax = minMaxStep.max;\n\n\t\t\tselectionMin = $math.fitToRange(selectionMin, min, max);\n\t\t\tselectionMax = $math.fitToRange(selectionMax, min, max);\n\n\t\t\t// do it for the second time !important\t\t\t\n\t\t\tminMaxStep = this._adjustMinMax(selectionMin, selectionMax, gridCount, true);\n\n\t\t\tif (!strictMinMax) {\n\t\t\t\tselectionMin = minMaxStep.min;\n\t\t\t\tselectionMax = minMaxStep.max;\n\t\t\t}\n\n\t\t\tconst syncWithAxis = this.get(\"syncWithAxis\");\n\t\t\tif (syncWithAxis) {\n\t\t\t\tminMaxStep = this._syncAxes(selectionMin, selectionMax, minMaxStep.step, syncWithAxis.getPrivate(\"selectionMinFinal\", syncWithAxis.getPrivate(\"minFinal\", 0)), syncWithAxis.getPrivate(\"selectionMaxFinal\", syncWithAxis.getPrivate(\"maxFinal\", 1)), syncWithAxis.getPrivate(\"selectionStepFinal\", syncWithAxis.getPrivate(\"step\", 1)));\n\n\t\t\t\tif (minMaxStep.min < min) {\n\t\t\t\t\tminMaxStep.min = min;\n\t\t\t\t}\n\n\t\t\t\tif (minMaxStep.max > max) {\n\t\t\t\t\tminMaxStep.max = max;\n\t\t\t\t}\n\n\t\t\t\tselectionMin = minMaxStep.min;\n\t\t\t\tselectionMax = minMaxStep.max;\n\t\t\t}\n\t\n\t\t\tif (strictMinMax) {\n\t\t\t\tif ($type.isNumber(minDefined)) {\n\t\t\t\t\tselectionMin = Math.max(selectionMin, minDefined);\n\t\t\t\t}\n\n\t\t\t\tif ($type.isNumber(maxDefined)) {\n\t\t\t\t\tselectionMax = Math.min(selectionMax, maxDefined);\n\t\t\t\t}\t\t\t\n\t\t\t}\n\n\t\t\tif (selectionStrictMinMax) {\n\t\t\t\tselectionMin = selectionMinReal - (selectionMaxReal - selectionMinReal) * extraMin;\n\t\t\t\tselectionMax = selectionMaxReal + (selectionMaxReal - selectionMinReal) * extraMax;\n\t\t\t}\n\n\t\t\tif (strictMinMax) {\n\t\t\t\tif ($type.isNumber(minDefined)) {\n\t\t\t\t\tselectionMin = minDefined;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tselectionMin = selectionMinReal;\n\t\t\t\t}\n\t\n\t\t\t\tif ($type.isNumber(maxDefined)) {\n\t\t\t\t\tselectionMax = maxDefined;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tselectionMax = selectionMaxReal;\n\t\t\t\t}\n\t\n\t\t\t\tif (selectionMax - selectionMin <= 0.00000001) {\n\t\t\t\t\tselectionMin -= this._deltaMinMax;\n\t\t\t\t\tselectionMax += this._deltaMinMax;\n\t\t\t\t}\n\t\n\t\t\t\tlet delta = selectionMax - selectionMin;\n\n\t\t\t\tselectionMin -= delta * extraMin;\n\t\t\t\tselectionMax += delta * extraMax;\n\t\t\t}\t\t\n\n\t\t\tif (this.get(\"logarithmic\")) {\n\n\t\t\t\tif (selectionMin <= 0) {\n\t\t\t\t\tselectionMin = selectionMinReal * (1 - Math.min(extraMin, 0.99));\n\t\t\t\t}\n\n\t\t\t\tif (selectionMin < min) {\n\t\t\t\t\tselectionMin = min;\n\t\t\t\t}\n\t\t\t\tif (selectionMax > max) {\n\t\t\t\t\tselectionMax = max;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tlet len = Math.min(20, Math.ceil(Math.log(this.getPrivate(\"maxZoomFactor\", 100) + 1) / Math.LN10) + 2);\n\n\t\t\tlet start = $math.round(this.valueToFinalPosition(selectionMin), len);\n\t\t\tlet end = $math.round(this.valueToFinalPosition(selectionMax), len);\n\n\t\t\tthis.setPrivateRaw(\"selectionMinFinal\", selectionMin);\n\t\t\tthis.setPrivateRaw(\"selectionMaxFinal\", selectionMax);\n\t\t\tthis.setPrivateRaw(\"selectionStepFinal\", minMaxStep.step);\n\n\t\t\tthis.zoom(start, end);\n\t\t}\n\t}\n\n\n\tprotected _getMinMax() {\n\t\tlet minDefined = this.get(\"min\");\n\t\tlet maxDefined = this.get(\"max\");\n\n\t\tlet min = Infinity;\n\t\tlet max = -Infinity;\n\n\t\tlet extraMin = this.get(\"extraMin\", 0);\n\t\tlet extraMax = this.get(\"extraMax\", 0);\n\n\t\tif (this.get(\"logarithmic\")) {\n\t\t\tif (this.get(\"extraMin\") == null) {\n\t\t\t\textraMin = 0.1;\n\t\t\t}\n\t\t\tif (this.get(\"extraMax\") == null) {\n\t\t\t\textraMax = 0.2;\n\t\t\t}\n\t\t}\n\n\t\tlet minDiff = Infinity;\n\n\t\t$array.each(this.series, (series) => {\n\t\t\tif (!series.get(\"ignoreMinMax\")) {\n\t\t\t\tlet seriesMin: number | undefined;\n\t\t\t\tlet seriesMax: number | undefined;\n\t\t\t\tif (series.get(\"xAxis\") === this) {\n\t\t\t\t\tseriesMin = series.getPrivate(\"minX\");\n\t\t\t\t\tseriesMax = series.getPrivate(\"maxX\");\n\t\t\t\t}\n\t\t\t\telse if (series.get(\"yAxis\") === this) {\n\t\t\t\t\tseriesMin = series.getPrivate(\"minY\");\n\t\t\t\t\tseriesMax = series.getPrivate(\"maxY\");\n\t\t\t\t}\n\n\t\t\t\tif ($type.isNumber(seriesMin) && $type.isNumber(seriesMax)) {\n\t\t\t\t\tmin = Math.min(min, seriesMin);\n\t\t\t\t\tmax = Math.max(max, seriesMax);\n\n\t\t\t\t\tlet diff = seriesMax - seriesMin;\n\n\t\t\t\t\tif (diff <= 0) {\n\t\t\t\t\t\tdiff = Math.abs(seriesMax / 100);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (diff < minDiff) {\n\t\t\t\t\t\tminDiff = diff;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\n\t\tthis.axisRanges.each((range) => {\n\t\t\tif (range.get(\"affectsMinMax\")) {\n\t\t\t\tlet value = range.get(\"value\");\n\t\t\t\tif (value != null) {\n\t\t\t\t\tmin = Math.min(min, value);\n\t\t\t\t\tmax = Math.max(max, value);\n\t\t\t\t}\n\t\t\t\tvalue = range.get(\"endValue\");\n\t\t\t\tif (value != null) {\n\t\t\t\t\tmin = Math.min(min, value);\n\t\t\t\t\tmax = Math.max(max, value);\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\n\t\tif (this.get(\"logarithmic\")) {\n\t\t\tlet treatZeroAs = this.get(\"treatZeroAs\");\n\t\t\tif ($type.isNumber(treatZeroAs)) {\n\t\t\t\tif (min <= 0) {\n\t\t\t\t\tmin = treatZeroAs;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (min <= 0) {\n\t\t\t\tnew Error(\"Logarithmic value axis can not have values <= 0.\");\n\t\t\t}\n\t\t}\n\n\t\tif (min === 0 && max === 0) {\n\t\t\tmax = 0.9;\n\t\t\tmin = -0.9;\n\t\t}\n\n\t\tif ($type.isNumber(minDefined)) {\n\t\t\tmin = minDefined;\n\t\t}\n\t\tif ($type.isNumber(maxDefined)) {\n\t\t\tmax = maxDefined;\n\t\t}\n\n\t\t// meaning no min/max found on series/ranges and no min/max was defined\n\t\tif (min === Infinity || max === -Infinity) {\n\t\t\tthis.setPrivate(\"minFinal\", undefined);\n\t\t\tthis.setPrivate(\"maxFinal\", undefined);\n\t\t\treturn;\n\t\t}\n\n\t\tif (min > max) {\n\t\t\t[min, max] = [max, min];\n\t\t}\n\n\t\tconst initialMin = min;\n\t\tconst initialMax = max;\n\n\t\t// adapter\n\t\tlet minAdapted = this.adapters.fold(\"min\", min);\n\t\tlet maxAdapted = this.adapters.fold(\"max\", max);\n\n\t\tthis._minRealLog = min;\n\n\t\tif ($type.isNumber(minAdapted)) {\n\t\t\tmin = minAdapted;\n\t\t}\n\n\t\tif ($type.isNumber(maxAdapted)) {\n\t\t\tmax = maxAdapted;\n\t\t}\n\n\t\t// DateAxis does some magic here\n\t\tmin = this._fixMin(min);\n\t\tmax = this._fixMax(max);\n\n\t\t// this happens if starLocation and endLocation are 0.5 and DateAxis has only one date\t\t\n\t\tif (max - min <= 1 / Math.pow(10, 15)) {\n\t\t\tif (max - min !== 0) {\n\t\t\t\tthis._deltaMinMax = (max - min) / 2;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis._getDelta(max);\n\t\t\t}\n\n\t\t\tmin -= this._deltaMinMax;\n\t\t\tmax += this._deltaMinMax;\n\t\t}\n\n\t\t// add extras\n\t\tmin -= (max - min) * extraMin;\n\t\tmax += (max - min) * extraMax;\n\n\t\tif (this.get(\"logarithmic\")) {\n\t\t\t// don't let min go below 0 if real min is >= 0\n\t\t\tif (min < 0 && initialMin >= 0) {\n\t\t\t\tmin = 0;\n\t\t\t}\n\t\t\t// don't let max go above 0 if real max is <= 0\n\t\t\tif (max > 0 && initialMax <= 0) {\n\t\t\t\tmax = 0;\n\t\t\t}\n\t\t}\n\n\t\tthis._minReal = min;\n\t\tthis._maxReal = max;\n\n\t\tlet strictMinMax = this.get(\"strictMinMax\");\n\t\tlet strictMinMaxSelection = this.get(\"strictMinMaxSelection\", false);\n\t\tif (strictMinMaxSelection) {\n\t\t\tstrictMinMax = strictMinMaxSelection;\n\t\t}\n\n\t\tlet strict = strictMinMax;\n\t\tif ($type.isNumber(maxDefined)) {\n\t\t\tstrict = true;\n\t\t}\n\n\t\tlet gridCount = this.get(\"renderer\").gridCount();\n\n\t\tlet minMaxStep: IMinMaxStep = this._adjustMinMax(min, max, gridCount, strict);\n\n\t\tmin = minMaxStep.min;\n\t\tmax = minMaxStep.max;\n\n\t\t// do it for the second time with strict true (importat!)\n\t\tminMaxStep = this._adjustMinMax(min, max, gridCount, true);\n\n\t\tmin = minMaxStep.min;\n\t\tmax = minMaxStep.max;\n\n\t\t// return min max if strict\n\t\tif (strictMinMax) {\n\t\t\tif ($type.isNumber(minDefined)) {\n\t\t\t\tmin = minDefined;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tmin = this._minReal;\n\t\t\t}\n\n\t\t\tif ($type.isNumber(maxDefined)) {\n\t\t\t\tmax = maxDefined;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tmax = this._maxReal;\n\t\t\t}\n\n\t\t\tif (max - min <= 0.00000001) {\n\t\t\t\tmin -= this._deltaMinMax;\n\t\t\t\tmax += this._deltaMinMax;\n\t\t\t}\n\n\t\t\tlet delta = max - min;\n\t\t\tmin -= delta * extraMin;\n\t\t\tmax += delta * extraMax;\n\t\t}\n\n\t\tminAdapted = this.adapters.fold(\"min\", min);\n\t\tmaxAdapted = this.adapters.fold(\"max\", max);\n\n\t\tif ($type.isNumber(minAdapted)) {\n\t\t\tmin = minAdapted;\n\t\t}\n\n\t\tif ($type.isNumber(maxAdapted)) {\n\t\t\tmax = maxAdapted;\n\t\t}\n\n\t\tif (minDiff == Infinity) {\n\t\t\tminDiff = (max - min)\n\t\t}\n\n\t\t// this is to avoid floating point number error\n\t\tlet decCount = Math.round(Math.abs(Math.log(Math.abs(max - min)) * Math.LOG10E)) + 5;\n\n\t\tmin = $math.round(min, decCount);\n\t\tmax = $math.round(max, decCount);\n\n\t\t\n\n\t\tconst syncWithAxis = this.get(\"syncWithAxis\");\n\t\tif (syncWithAxis) {\n\t\t\tminMaxStep = this._syncAxes(min, max, minMaxStep.step, syncWithAxis.getPrivate(\"minFinal\", syncWithAxis.getPrivate(\"min\", 0)), syncWithAxis.getPrivate(\"maxFinal\", syncWithAxis.getPrivate(\"max\", 1)), syncWithAxis.getPrivate(\"step\", 1));\n\t\t\tmin = minMaxStep.min;\n\t\t\tmax = minMaxStep.max;\n\t\t}\n\n\n\t\tthis.setPrivateRaw(\"maxZoomFactor\", Math.max(1, Math.ceil((max - min) / minDiff * this.get(\"maxZoomFactor\", 100))));\n\t\tthis._fixZoomFactor();\n\n\t\tif (this.get(\"logarithmic\")) {\n\t\t\tthis._minLogAdjusted = min;\n\t\t\tmin = this._minReal;\n\t\t\tmax = this._maxReal;\n\n\t\t\tif (min <= 0) {\n\t\t\t\tmin = initialMin * (1 - Math.min(extraMin, 0.99));\n\t\t\t}\n\t\t}\n\n\t\t\n\n\t\tif ($type.isNumber(min) && $type.isNumber(max)) {\n\t\t\tif (this.getPrivate(\"minFinal\") !== min || this.getPrivate(\"maxFinal\") !== max) {\n\n\t\t\t\tthis.setPrivate(\"minFinal\", min);\n\t\t\t\tthis.setPrivate(\"maxFinal\", max);\n\t\t\t\tthis._saveMinMax(min, max);\n\n\t\t\t\tconst duration = this.get(\"interpolationDuration\", 0);\n\t\t\t\tconst easing = this.get(\"interpolationEasing\");\n\n\t\t\t\tthis.animatePrivate({ key: \"min\", to: min, duration, easing });\n\t\t\t\tthis.animatePrivate({ key: \"max\", to: max, duration, easing });\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected _fixZoomFactor() {\n\t}\n\n\tprotected _getDelta(max: number) {\n\t\t// the number by which we need to raise 10 to get difference\n\t\tlet exponent: number = Math.log(Math.abs(max)) * Math.LOG10E;\n\n\t\t// here we find a number which is power of 10 and has the same count of numbers as difference has\n\t\tlet power = Math.pow(10, Math.floor(exponent));\n\n\t\t// reduce this number by 10 times\n\t\tpower = power / 10;\n\n\t\tthis._deltaMinMax = power;\n\t}\n\n\tprotected _saveMinMax(_min: number, _max: number) {\n\n\t}\n\n\n\tprotected _adjustMinMax(min: number, max: number, gridCount: number, strictMode?: boolean): IMinMaxStep {\n\t\t// will fail if 0\n\t\tif (gridCount <= 1) {\n\t\t\tgridCount = 1;\n\t\t}\n\n\t\tgridCount = Math.round(gridCount);\n\n\t\tlet initialMin: number = min;\n\t\tlet initialMax: number = max;\n\n\t\tlet difference = max - min;\n\n\t\t// in case min and max is the same, use max\n\t\tif (difference === 0) {\n\t\t\tdifference = Math.abs(max);\n\t\t}\n\n\t\t// the number by which we need to raise 10 to get difference\n\t\tlet exponent: number = Math.log(Math.abs(difference)) * Math.LOG10E;\n\n\t\t// here we find a number which is power of 10 and has the same count of numbers as difference has\n\t\tlet power = Math.pow(10, Math.floor(exponent));\n\n\t\t// reduce this number by 10 times\n\t\tpower = power / 10;\n\n\t\tlet extra: number = power;\n\t\tif (strictMode) {\n\t\t\textra = 0;\n\t\t}\n\n\t\t// round down min\n\t\tif (strictMode) {\n\t\t\tmin = Math.floor(min / power) * power;\n\t\t\t// round up max\n\t\t\tmax = Math.ceil(max / power) * power;\n\t\t}\n\t\telse {\n\t\t\tmin = Math.ceil(min / power) * power - extra;\n\t\t\t// round up max\n\t\t\tmax = Math.floor(max / power) * power + extra;\n\t\t}\n\n\t\t// don't let min go below 0 if real min is >= 0\n\t\tif (min < 0 && initialMin >= 0) {\n\t\t\tmin = 0;\n\t\t}\n\t\t// don't let max go above 0 if real max is <= 0\n\t\tif (max > 0 && initialMax <= 0) {\n\t\t\tmax = 0;\n\t\t}\n\n\t\texponent = Math.log(Math.abs(difference)) * Math.LOG10E;\n\t\tpower = Math.pow(10, Math.floor(exponent));\n\t\tpower = power / 100; // used to be 10 in v4, but this caused issue that there could be limited number of grids with even very small minGridDistance\n\n\t\t// approximate difference between two grid lines\n\t\tlet step = Math.ceil((difference / gridCount) / power) * power;\n\t\tlet stepPower = Math.pow(10, Math.floor(Math.log(Math.abs(step)) * Math.LOG10E));\n\n\t\t// the step should divide by 2, 5, and 10.\n\t\tlet stepDivisor: number = Math.ceil(step / stepPower); // number 0 - 10\n\n\n\t\tif (stepDivisor > 5) {\n\t\t\tstepDivisor = 10;\n\t\t}\n\t\telse if (stepDivisor <= 5 && stepDivisor > 2) {\n\t\t\tstepDivisor = 5;\n\t\t}\n\n\t\t// now get real step\n\t\tstep = Math.ceil(step / (stepPower * stepDivisor)) * stepPower * stepDivisor;\n\n\n\t\tlet maxPrecision = this.get(\"maxPrecision\");\n\t\tif ($type.isNumber(maxPrecision)) {\n\n\t\t\tlet ceiledStep = $math.ceil(step, maxPrecision);\n\t\t\tif (maxPrecision < Number.MAX_VALUE && step !== ceiledStep) {\n\t\t\t\tstep = ceiledStep;\n\t\t\t\tif (step == 0) {\n\t\t\t\t\tstep = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tlet decCount: number = 0;\n\t\t// in case numbers are smaller than 1\n\t\tif (stepPower < 1) {\n\t\t\t// exponent is less then 1 too. Count decimals of exponent\n\t\t\tdecCount = Math.round(Math.abs(Math.log(Math.abs(stepPower)) * Math.LOG10E)) + 1;\n\t\t\t// round step\n\t\t\tstep = $math.round(step, decCount);\n\t\t}\n\n\t\t// final min and max\n\t\tlet minCount = Math.floor(min / step);\n\n\t\tmin = $math.round(step * minCount, decCount);\n\n\t\tlet maxCount: number;\n\n\t\tif (!strictMode) {\n\t\t\tmaxCount = Math.ceil(max / step);\n\t\t}\n\t\telse {\n\t\t\tmaxCount = Math.floor(max / step);\n\t\t}\n\n\t\tif (maxCount === minCount) {\n\t\t\tmaxCount++;\n\t\t}\n\n\t\tmax = $math.round(step * maxCount, decCount);\n\n\t\tif (max < initialMax) {\n\t\t\tmax = max + step;\n\t\t}\n\n\t\tif (min > initialMin) {\n\t\t\tmin = min - step;\n\t\t}\n\n\n\t\tstep = this.fixSmallStep(step);\n\n\t\treturn { min: min, max: max, step: step };\n\t}\n\n\t/**\n\t * Returns text to be used in an axis tooltip for specific relative position.\n\t *\n\t * @param position Position\n\t * @return Tooltip text\n\t */\n\tpublic getTooltipText(position: number, _adjustPosition?: boolean): string | undefined {\n\t\tconst numberFormat = this.get(\"tooltipNumberFormat\", this.get(\"numberFormat\"));\n\t\tconst formatter = this.getNumberFormatter();\n\t\tconst extraDecimals = this.get(\"extraTooltipPrecision\", 0);\n\t\tconst decimals = this.getPrivate(\"stepDecimalPlaces\", 0) + extraDecimals;\n\t\tconst value = $math.round(this.positionToValue(position), decimals);\n\n\t\tif (numberFormat) {\n\t\t\treturn formatter.format(value, numberFormat);\n\t\t}\n\t\telse {\n\t\t\treturn formatter.format(value, undefined, decimals);\n\t\t}\n\t}\n\n\t/**\n\t * Returns a data item from series that is closest to the `position`.\n\t *\n\t * @param series Series\n\t * @param position Relative position\n\t * @return Data item\n\t */\n\tpublic getSeriesItem(series: XYSeries, position: number): DataItem<IXYSeriesDataItem> | undefined {\n\t\tlet fieldName = <any>(this.getPrivate(\"name\")! + this.get(\"renderer\").getPrivate(\"letter\")!);\n\t\tlet value = this.positionToValue(position);\n\n\t\tlet index: number | undefined = undefined;\n\t\tlet oldDiff: number;\n\t\t$array.each(series.dataItems, (dataItem, i) => {\n\t\t\tconst diff = Math.abs(dataItem.get(fieldName) - value);\n\t\t\tif (index === undefined || diff < oldDiff) {\n\t\t\t\tindex = i;\n\t\t\t\toldDiff = diff;\n\t\t\t}\n\t\t});\n\n\t\tif (index != null) {\n\t\t\treturn series.dataItems[index];\n\t\t}\n\t}\n\n\t/**\n\t * Zooms the axis to specific `start` and `end` values.\n\t *\n\t * Optional `duration` specifies duration of zoom animation in milliseconds.\n\t *\n\t * @param start Start value\n\t * @param end End value\n\t * @param duration Duration in milliseconds\n\t */\n\tpublic zoomToValues(start: number, end: number, duration?: number) {\n\t\tconst min = this.getPrivate(\"minFinal\", 0);\n\t\tconst max = this.getPrivate(\"maxFinal\", 0);\n\t\tif (this.getPrivate(\"min\") != null && this.getPrivate(\"max\") != null) {\n\t\t\tthis.zoom((start - min) / (max - min), (end - min) / (max - min), duration);\n\t\t}\n\t}\n\n\n\t/**\n\t * Syncs with a target axis.\n\t *\n\t * @param min Min\n\t * @param max Max\n\t * @param step Step\n\t */\n\tprotected _syncAxes(min: number, max: number, step: number, syncMin: number, syncMax: number, syncStep: number) {\n\t\tlet axis = this.get(\"syncWithAxis\");\n\t\tif (axis) {\n\t\t\tlet count: number = Math.round(syncMax - syncMin) / syncStep;\n\t\t\tlet currentCount = Math.round((max - min) / step);\n\n\t\t\tlet gridCount = this.get(\"renderer\").gridCount();\n\n\t\t\tif ($type.isNumber(count) && $type.isNumber(currentCount)) {\n\t\t\t\tlet synced = false;\n\t\t\t\tlet c = 0\n\t\t\t\tlet diff = (max - min) * 0.01;\n\t\t\t\tlet omin = min;\n\t\t\t\tlet omax = max;\n\t\t\t\tlet ostep = step;\n\n\t\t\t\twhile (synced != true) {\n\t\t\t\t\tsynced = this._checkSync(omin, omax, ostep, count);\n\t\t\t\t\tc++;\n\t\t\t\t\tif (c > 500) {\n\t\t\t\t\t\tsynced = true;\n\t\t\t\t\t}\n\t\t\t\t\tif (!synced) {\n\t\t\t\t\t\tif (c / 3 == Math.round(c / 3)) {\n\t\t\t\t\t\t\tomin = min - diff * c;\n\t\t\t\t\t\t\tif (min >= 0 && omin < 0) {\n\t\t\t\t\t\t\t\tomin = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tomax = max + diff * c;\n\t\t\t\t\t\t\tif (omax <= 0 && omax > 0) {\n\t\t\t\t\t\t\t\tomax = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlet minMaxStep = this._adjustMinMax(omin, omax, gridCount, true);\n\t\t\t\t\t\tomin = minMaxStep.min;\n\t\t\t\t\t\tomax = minMaxStep.max;\n\t\t\t\t\t\tostep = minMaxStep.step;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tmin = omin;\n\t\t\t\t\t\tmax = omax;\n\t\t\t\t\t\tstep = ostep;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn { min: min, max: max, step: step };\n\t}\n\n\t/**\n\t * Returns `true` if axis needs to be resunced with some other axis.\n\t */\n\tprotected _checkSync(min: number, max: number, step: number, count: number): boolean {\n\t\tlet currentCount = (max - min) / step;\n\t\tfor (let i = 1; i < count; i++) {\n\t\t\tif ($math.round(currentCount / i, 1) == count || currentCount * i == count) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\t/**\n\t * Returns relative position between two grid lines of the axis.\n\t *\n\t * @return Position\n\t */\n\tpublic getCellWidthPosition(): number {\n\t\tlet max = this.getPrivate(\"selectionMax\", this.getPrivate(\"max\"));\n\t\tlet min = this.getPrivate(\"selectionMin\", this.getPrivate(\"min\"));\n\n\t\tif ($type.isNumber(max) && $type.isNumber(min)) {\n\t\t\treturn this.getPrivate(\"step\", 1) / (max - min);\n\t\t}\n\t\treturn 0.05;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic nextPosition(count?: number) {\n\t\tif (count == null) {\n\t\t\tcount = 1;\n\t\t}\n\n\t\tif (this.get(\"renderer\").getPrivate(\"letter\") == \"Y\") {\n\t\t\tcount *= -1;\n\t\t}\n\n\t\tlet value = this.positionToValue(this.getPrivate(\"tooltipPosition\", 0));\n\t\tvalue += this.getPrivate(\"step\", 1) * count;\n\t\tvalue = $math.fitToRange(value, this.getPrivate(\"selectionMin\", 0), this.getPrivate(\"selectionMax\", 1));\n\n\t\treturn this.toGlobalPosition(this.valueToPosition(value));\n\t}\n}\n","import array from \"./array.js\";\nimport constant from \"./constant.js\";\nimport curveLinear from \"./curve/linear.js\";\nimport line from \"./line.js\";\nimport {withPath} from \"./path.js\";\nimport {x as pointX, y as pointY} from \"./point.js\";\n\nexport default function(x0, y0, y1) {\n var x1 = null,\n defined = constant(true),\n context = null,\n curve = curveLinear,\n output = null,\n path = withPath(area);\n\n x0 = typeof x0 === \"function\" ? x0 : (x0 === undefined) ? pointX : constant(+x0);\n y0 = typeof y0 === \"function\" ? y0 : (y0 === undefined) ? constant(0) : constant(+y0);\n y1 = typeof y1 === \"function\" ? y1 : (y1 === undefined) ? pointY : constant(+y1);\n\n function area(data) {\n var i,\n j,\n k,\n n = (data = array(data)).length,\n d,\n defined0 = false,\n buffer,\n x0z = new Array(n),\n y0z = new Array(n);\n\n if (context == null) output = curve(buffer = path());\n\n for (i = 0; i <= n; ++i) {\n if (!(i < n && defined(d = data[i], i, data)) === defined0) {\n if (defined0 = !defined0) {\n j = i;\n output.areaStart();\n output.lineStart();\n } else {\n output.lineEnd();\n output.lineStart();\n for (k = i - 1; k >= j; --k) {\n output.point(x0z[k], y0z[k]);\n }\n output.lineEnd();\n output.areaEnd();\n }\n }\n if (defined0) {\n x0z[i] = +x0(d, i, data), y0z[i] = +y0(d, i, data);\n output.point(x1 ? +x1(d, i, data) : x0z[i], y1 ? +y1(d, i, data) : y0z[i]);\n }\n }\n\n if (buffer) return output = null, buffer + \"\" || null;\n }\n\n function arealine() {\n return line().defined(defined).curve(curve).context(context);\n }\n\n area.x = function(_) {\n return arguments.length ? (x0 = typeof _ === \"function\" ? _ : constant(+_), x1 = null, area) : x0;\n };\n\n area.x0 = function(_) {\n return arguments.length ? (x0 = typeof _ === \"function\" ? _ : constant(+_), area) : x0;\n };\n\n area.x1 = function(_) {\n return arguments.length ? (x1 = _ == null ? null : typeof _ === \"function\" ? _ : constant(+_), area) : x1;\n };\n\n area.y = function(_) {\n return arguments.length ? (y0 = typeof _ === \"function\" ? _ : constant(+_), y1 = null, area) : y0;\n };\n\n area.y0 = function(_) {\n return arguments.length ? (y0 = typeof _ === \"function\" ? _ : constant(+_), area) : y0;\n };\n\n area.y1 = function(_) {\n return arguments.length ? (y1 = _ == null ? null : typeof _ === \"function\" ? _ : constant(+_), area) : y1;\n };\n\n area.lineX0 =\n area.lineY0 = function() {\n return arealine().x(x0).y(y0);\n };\n\n area.lineY1 = function() {\n return arealine().x(x0).y(y1);\n };\n\n area.lineX1 = function() {\n return arealine().x(x1).y(y0);\n };\n\n area.defined = function(_) {\n return arguments.length ? (defined = typeof _ === \"function\" ? _ : constant(!!_), area) : defined;\n };\n\n area.curve = function(_) {\n return arguments.length ? (curve = _, context != null && (output = curve(context)), area) : curve;\n };\n\n area.context = function(_) {\n return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), area) : context;\n };\n\n return area;\n}\n","import type { Axis } from \"../axes/Axis\";\nimport type { AxisRenderer } from \"../axes/AxisRenderer\";\n\nimport { XYSeries, IXYSeriesPrivate, IXYSeriesSettings, IXYSeriesDataItem, IXYSeriesAxisRange } from \"./XYSeries\";\nimport { Graphics } from \"../../../core/render/Graphics\";\nimport { CurveFactory, line, area } from \"d3-shape\";\nimport { Template } from \"../../../core/util/Template\";\nimport { ListTemplate } from \"../../../core/util/List\";\nimport { color } from \"../../../core/util/Color\";\nimport { DataItem } from \"../../../core/render/Component\";\nimport { Rectangle } from \"../../../core/render/Rectangle\";\nimport * as $type from \"../../../core/util/Type\";\nimport * as $array from \"../../../core/util/Array\";\nimport * as $utils from \"../../../core/util/Utils\";\n\nexport interface IPointOptions {\n}\n\nexport interface ILineSeriesDataItem extends IXYSeriesDataItem {\n}\n\nexport interface ILineSeriesSettings extends IXYSeriesSettings {\n\n\t/**\n\t * If set to `true` the line will connect over \"gaps\" - categories or time\n\t * intervals with no data.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/line-series/#Gaps} for more info\n\t * @default true\n\t */\n\tconnect?: boolean;\n\n\t/**\n\t * If there are more than `autoGapCount` base time intervals (e.g. days) with\n\t * no data, the line will break and will display gap.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/line-series/#Auto_gaps_with_dates} for more info\n\t * @default 1.1\n\t */\n\tautoGapCount?: number;\n\n\t/**\n\t * @ignore\n\t */\n\tcurveFactory?: CurveFactory;\n\n\t/**\n\t * Allows simplifying the line with many points.\n\t *\n\t * If set, the series will skip points that are closer than X pixels to each\n\t * other.\n\t *\n\t * With many data points, this allows having smoother, less cluttered lines.\n\t *\n\t * @default 0\n\t * @since 5.2.7\n\t */\n\tminDistance?: number;\n\n\n}\n\nexport interface ILineSeriesPrivate extends IXYSeriesPrivate {\n}\n\n/**\n * Interface representing a [[LineSeries]] axis range.\n *\n * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/axis-ranges/#Series_axis_ranges} for more info\n */\nexport interface ILineSeriesAxisRange extends IXYSeriesAxisRange {\n\n\t/**\n\t * A list template to use when applying line settings to the line segments covered\n\t * by an axis range.\n\t */\n\tstrokes?: ListTemplate<Graphics>;\n\n\t/**\n\t * A list template to use when applying fill settings to the fill segments covered\n\t * by an axis range.\n\t */\n\tfills?: ListTemplate<Graphics>;\n}\n\n/**\n * Used to plot line and/or area series.\n *\n * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/line-series/} for more info\n * @important\n */\nexport class LineSeries extends XYSeries {\n\n\tdeclare public _settings: ILineSeriesSettings;\n\tdeclare public _privateSettings: ILineSeriesPrivate;\n\tdeclare public _dataItemSettings: ILineSeriesDataItem;\n\tdeclare public _axisRangeType: ILineSeriesAxisRange;\n\n\tpublic static className: string = \"LineSeries\";\n\tpublic static classNames: Array<string> = XYSeries.classNames.concat([LineSeries.className]);\n\n\tprotected _endIndex!: number;\n\n\tprotected _strokeGenerator = line();\n\tprotected _fillGenerator = area();\n\n\tprotected _legendStroke?: Graphics;\n\tprotected _legendFill?: Graphics;\n\n\tprotected _afterNew() {\n\t\tthis._fillGenerator.y0(function(p: number[]) {\n\t\t\treturn p[3];\n\t\t});\n\n\t\tthis._fillGenerator.x0(function(p: number[]) {\n\t\t\treturn p[2];\n\t\t});\n\n\t\tthis._fillGenerator.y1(function(p: number[]) {\n\t\t\treturn p[1];\n\t\t});\n\n\t\tthis._fillGenerator.x1(function(p: number[]) {\n\t\t\treturn p[0];\n\t\t});\n\n\t\tsuper._afterNew();\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic makeStroke(strokes: ListTemplate<Graphics>): Graphics {\n\t\tconst stroke = this.mainContainer.children.push(strokes.make());\n\t\tstrokes.push(stroke);\n\t\treturn stroke;\n\t}\n\n\t/**\n\t * A [[TemplateList]] of all line segments in series.\n\t *\n\t * `strokes.template` can be used to set default settings for all line\n\t * segments, or to change on existing ones.\n\t *\n\t * @default new ListTemplate<Graphics>\n\t */\n\tpublic readonly strokes: ListTemplate<Graphics> = this.addDisposer(new ListTemplate(\n\t\tTemplate.new({}),\n\t\t() => Graphics._new(this._root, {\n\t\t\tthemeTags: $utils.mergeTags(this.strokes.template.get(\"themeTags\", []), [\"line\", \"series\", \"stroke\"])\n\t\t}, [this.strokes.template]),\n\t));\n\n\t/**\n\t * @ignore\n\t */\n\tpublic makeFill(fills: ListTemplate<Graphics>): Graphics {\n\t\tconst fill = this.mainContainer.children.push(fills.make());\n\t\tfills.push(fill);\n\t\treturn fill;\n\t}\n\n\t/**\n\t * A [[TemplateList]] of all segment fills in series.\n\t *\n\t * `fills.template` can be used to set default settings for all segment\n\t * fills, or to change on existing ones.\n\t *\n\t * @default new ListTemplate<Graphics>\n\t */\n\tpublic readonly fills: ListTemplate<Graphics> = this.addDisposer(new ListTemplate(\n\t\tTemplate.new({}),\n\t\t() => Graphics._new(this._root, {\n\t\t\tthemeTags: $utils.mergeTags(this.strokes.template.get(\"themeTags\", []), [\"line\", \"series\", \"fill\"])\n\t\t}, [this.fills.template]),\n\t));\n\n\t// custom set from data\n\tprotected _fillTemplate: Template<Graphics> | undefined;\n\tprotected _strokeTemplate: Template<Graphics> | undefined;\n\n\tprotected _previousPoint: Array<number> = [0, 0, 0, 0];\n\n\tprotected _dindex = 0;\n\tprotected _sindex = 0;\n\n\tpublic _updateChildren() {\n\n\t\tthis._strokeTemplate = undefined;\n\t\tthis._fillTemplate = undefined;\n\n\t\tlet xAxis = this.get(\"xAxis\");\n\t\tlet yAxis = this.get(\"yAxis\");\n\n\t\tif (this.isDirty(\"stroke\")) {\n\t\t\tconst stroke = this.get(\"stroke\");\n\t\t\tthis.strokes.template.set(\"stroke\", stroke);\n\t\t\tconst legendStroke = this._legendStroke;\n\t\t\tif (legendStroke) {\n\t\t\t\tlegendStroke.states.lookup(\"default\")!.set(\"stroke\", stroke);\n\t\t\t}\n\t\t}\n\t\tif (this.isDirty(\"fill\")) {\n\t\t\tconst fill = this.get(\"fill\");\n\t\t\tthis.fills.template.set(\"fill\", fill);\n\t\t\tconst legendFill = this._legendFill;\n\t\t\tif (legendFill) {\n\t\t\t\tlegendFill.states.lookup(\"default\")!.set(\"fill\", fill);\n\t\t\t}\n\t\t}\n\n\t\tif (this.isDirty(\"fillPattern\")) {\n\t\t\tconst fillPattern = this.get(\"fillPattern\");\n\t\t\tthis.fills.template.set(\"fillPattern\", fillPattern);\n\t\t\tconst legendFill = this._legendFill;\n\t\t\tif (legendFill) {\n\t\t\t\tlegendFill.states.lookup(\"default\")!.set(\"fillPattern\", fillPattern);\n\t\t\t}\n\t\t}\n\n\t\tif (this.isDirty(\"curveFactory\")) {\n\t\t\tconst curveFactory = this.get(\"curveFactory\")!;\n\t\t\tif (curveFactory) {\n\t\t\t\tthis._strokeGenerator.curve(curveFactory);\n\t\t\t\tthis._fillGenerator.curve(curveFactory);\n\t\t\t}\n\t\t}\n\n\t\tif (xAxis.inited && yAxis.inited) {\n\t\t\tif (this._axesDirty || this._valuesDirty || this._stackDirty || this.isDirty(\"vcx\") || this.isDirty(\"vcy\") || this._sizeDirty || this.isDirty(\"connect\") || this.isDirty(\"curveFactory\")) {\n\n\t\t\t\tthis.fills.each((fill) => {\n\t\t\t\t\tfill.setPrivate(\"visible\", false);\n\t\t\t\t})\n\n\t\t\t\tthis.strokes.each((fill) => {\n\t\t\t\t\tfill.setPrivate(\"visible\", false);\n\t\t\t\t})\n\n\t\t\t\tthis.axisRanges.each((axisRange) => {\n\t\t\t\t\tlet fills = axisRange.fills;\n\t\t\t\t\tif (fills) {\n\t\t\t\t\t\tfills.each((fill) => {\n\t\t\t\t\t\t\tfill.setPrivate(\"visible\", false);\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\n\t\t\t\t\tlet strokes = axisRange.strokes;\n\t\t\t\t\tif (strokes) {\n\t\t\t\t\t\tstrokes.each((stroke) => {\n\t\t\t\t\t\t\tstroke.setPrivate(\"visible\", false);\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t})\n\n\t\t\t\tlet startIndex = this.startIndex();\n\n\t\t\t\tlet strokeTemplateField = this.strokes.template.get(\"templateField\");\n\t\t\t\tlet fillTemplateField = this.fills.template.get(\"templateField\");\n\n\t\t\t\tlet strokeTemplateFound = true;\n\t\t\t\tlet fillTemplateFound = true;\n\n\t\t\t\tif (strokeTemplateField) {\n\t\t\t\t\tstrokeTemplateFound = false;\n\t\t\t\t}\n\t\t\t\tif (fillTemplateField) {\n\t\t\t\t\tfillTemplateFound = false;\n\t\t\t\t}\n\n\t\t\t\tfor (let i = startIndex - 1; i >= 0; i--) {\n\t\t\t\t\tlet dataItem = this.dataItems[i];\n\t\t\t\t\tlet hasValues = true;\n\t\t\t\t\tlet dataContext = dataItem.dataContext as any;\n\t\t\t\t\tif (strokeTemplateField) {\n\t\t\t\t\t\tif (dataContext[strokeTemplateField]) {\n\t\t\t\t\t\t\tstrokeTemplateFound = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (fillTemplateField) {\n\t\t\t\t\t\tif (dataContext[fillTemplateField]) {\n\t\t\t\t\t\t\tfillTemplateFound = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t$array.each(this._valueFields, (field) => {\n\t\t\t\t\t\tif (!$type.isNumber(dataItem.get(field as any))) {\n\t\t\t\t\t\t\thasValues = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t\tif (hasValues && strokeTemplateFound && fillTemplateFound) {\n\t\t\t\t\t\tstartIndex = i;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\n\t\t\t\tlet len = this.dataItems.length;\n\t\t\t\tlet endIndex = this.endIndex();\n\n\t\t\t\tif (endIndex < len) {\n\t\t\t\t\tendIndex++;\n\t\t\t\t\tfor (let i = endIndex; i < len; i++) {\n\t\t\t\t\t\tlet dataItem = this.dataItems[i];\n\t\t\t\t\t\tlet hasValues = true;\n\t\t\t\t\t\t$array.each(this._valueFields, (field) => {\n\t\t\t\t\t\t\tif (!$type.isNumber(dataItem.get(field as any))) {\n\t\t\t\t\t\t\t\thasValues = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t\tif (hasValues) {\n\t\t\t\t\t\t\tendIndex = i + 1;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (startIndex > 0) {\n\t\t\t\t\tstartIndex--;\n\t\t\t\t}\n\n\t\t\t\tthis._endIndex = endIndex;\n\n\t\t\t\tthis._clearGraphics();\n\t\t\t\tthis._sindex = 0;\n\t\t\t\tthis._dindex = startIndex;\n\t\t\t\tif (this.dataItems.length == 1) {\n\t\t\t\t\tthis._startSegment(0);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// this is done to avoid recursion with a lot of segments\n\t\t\t\t\twhile (this._dindex < endIndex - 1) {\n\t\t\t\t\t\tthis._startSegment(this._dindex);\n\t\t\t\t\t\tthis._sindex++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tthis._skipped = true;\n\t\t}\n\n\t\tsuper._updateChildren();\n\t}\n\n\tprotected _clearGraphics() {\n\t\tthis.strokes.clear();\n\t\tthis.fills.clear();\n\n\t\tthis.axisRanges.each((axisRange) => {\n\t\t\taxisRange.fills!.clear();\n\t\t\taxisRange.strokes!.clear();\n\t\t})\n\t}\n\n\tprotected _startSegment(dataItemIndex: number) {\n\t\tlet endIndex = this._endIndex;\n\t\tlet currentEndIndex = endIndex;\n\n\t\tconst autoGapCount = this.get(\"autoGapCount\")!;\n\t\tconst connect = this.get(\"connect\");\n\n\t\tconst fill = this.makeFill(this.fills);\n\n\t\tconst fillTemplate = this._fillTemplate;\n\t\tconst originalTemplate = this.fills.template;\n\t\tif (fillTemplate && fillTemplate != originalTemplate) {\n\t\t\tfill.template = fillTemplate;\n\t\t}\n\n\t\tfill.setPrivate(\"visible\", true);\n\n\t\tconst stroke = this.makeStroke(this.strokes);\n\n\t\tconst strokeTemplate = this._strokeTemplate;\n\t\tif (strokeTemplate && strokeTemplate != this.strokes.template) {\n\t\t\tstroke.template = strokeTemplate;\n\t\t}\n\n\t\tstroke.setPrivate(\"visible\", true);\n\n\t\tlet xAxis = this.get(\"xAxis\");\n\t\tlet yAxis = this.get(\"yAxis\");\n\t\tlet baseAxis = this.get(\"baseAxis\")!;\n\n\t\tlet vcx = this.get(\"vcx\", 1);\n\t\tlet vcy = this.get(\"vcy\", 1);\n\n\t\tlet xField = this._xField;\n\t\tlet yField = this._yField;\n\n\t\tlet xOpenField = this._xOpenField;\n\t\tlet yOpenField = this._yOpenField;\n\n\t\tconst xOpenFieldValue = this.get(\"openValueXField\");\n\t\tconst yOpenFieldValue = this.get(\"openValueYField\");\n\n\t\tif (!xOpenFieldValue) {\n\t\t\txOpenField = this._xField;\n\t\t}\n\n\t\tif (!yOpenFieldValue) {\n\t\t\tyOpenField = this._yField;\n\t\t}\n\n\t\tconst stacked = this.get(\"stacked\");\n\n\t\tconst basePosX = xAxis.basePosition();\n\t\tconst basePosY = yAxis.basePosition();\n\n\t\tlet baseField: string;\n\t\tif (baseAxis === yAxis) {\n\t\t\tbaseField = this._yField;\n\t\t}\n\t\telse {\n\t\t\tbaseField = this._xField;\n\t\t}\n\n\t\tconst segments: Array<Array<Array<number>>> = [];\n\t\tlet points: Array<Array<number>> = [];\n\t\tsegments.push(points);\n\n\t\tconst strokeTemplateField = this.strokes.template.get(\"templateField\");\n\t\tconst fillTemplateField = this.fills.template.get(\"templateField\");\n\n\t\tlet locationX = this.get(\"locationX\", 0.5);\n\t\tlet locationY = this.get(\"locationY\", 0.5);\n\n\t\tlet openLocationX = this.get(\"openLocationX\", locationX);\n\t\tlet openLocationY = this.get(\"openLocationY\", locationY);\n\n\t\tconst minDistance = this.get(\"minDistance\", 0);\n\n\t\tlet i: number;\n\n\t\tlet fillVisible = this.fills.template.get(\"visible\");\n\t\tif (this.axisRanges.length > 0) {\n\t\t\tfillVisible = true;\n\t\t}\n\n\t\tlet getOpen = false;\n\t\tif (stacked || xOpenFieldValue || yOpenFieldValue) {\n\t\t\tgetOpen = true;\n\t\t}\n\n\t\tconst o = {\n\t\t\tpoints, segments, stacked, getOpen, basePosX, basePosY, fillVisible, xField, yField, xOpenField, yOpenField, vcx, vcy, baseAxis, xAxis, yAxis, locationX, locationY, openLocationX, openLocationY, minDistance\n\t\t}\n\n\n\t\tlet rangeStrokeTemplate = this._strokeTemplate;\n\t\tlet rangeFillTemplate = this._fillTemplate;\n\n\t\tfor (i = dataItemIndex; i < currentEndIndex; i++) {\n\t\t\tthis._dindex = i;\n\t\t\tconst dataItem = this._dataItems[i];\n\n\t\t\tlet valueX = dataItem.get(xField as any);\n\t\t\tlet valueY = dataItem.get(yField as any);\n\n\t\t\tif (valueX == null || valueY == null) {\n\t\t\t\tif (!connect) {\n\t\t\t\t\tpoints = [];\n\t\t\t\t\tsegments.push(points);\n\t\t\t\t\to.points = points;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis._getPoints(dataItem, o);\n\t\t\t}\n\n\t\t\tif (strokeTemplateField) {\n\t\t\t\tlet strokeTemplate = (dataItem.dataContext as any)[strokeTemplateField]\n\t\t\t\tif (strokeTemplate) {\n\t\t\t\t\tif (!(strokeTemplate instanceof Template)) {\n\t\t\t\t\t\tstrokeTemplate = Template.new(strokeTemplate);\n\t\t\t\t\t}\n\n\t\t\t\t\tthis._strokeTemplate = strokeTemplate;\n\t\t\t\t\tif (i > dataItemIndex) {\n\t\t\t\t\t\tcurrentEndIndex = i;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\trangeStrokeTemplate = strokeTemplate;\n\t\t\t\t\t\tstroke.template = strokeTemplate;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (fillTemplateField) {\n\t\t\t\tlet fillTemplate = (dataItem.dataContext as any)[fillTemplateField]\n\t\t\t\tif (fillTemplate) {\n\t\t\t\t\tif (!(fillTemplate instanceof Template)) {\n\t\t\t\t\t\tfillTemplate = Template.new(fillTemplate);\n\t\t\t\t\t}\n\n\t\t\t\t\tthis._fillTemplate = fillTemplate;\n\t\t\t\t\tif (i > dataItemIndex) {\n\t\t\t\t\t\tcurrentEndIndex = i;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\trangeFillTemplate = fillTemplate;\n\t\t\t\t\t\tfill.template = fillTemplate;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!connect) {\n\t\t\t\tlet nextItem = this.dataItems[i + 1];\n\t\t\t\tif (nextItem) {\n\t\t\t\t\tif (baseAxis.shouldGap(dataItem, nextItem, autoGapCount, baseField)) {\n\t\t\t\t\t\tpoints = [];\n\t\t\t\t\t\tsegments.push(points);\n\t\t\t\t\t\to.points = points;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfill.setRaw(\"userData\", [dataItemIndex, i]);\n\t\tstroke.setRaw(\"userData\", [dataItemIndex, i]);\n\n\t\tif (i === endIndex) {\n\t\t\tthis._endLine(points, segments[0][0]);\n\t\t}\n\n\t\tif (stroke) {\n\t\t\tthis._drawStroke(stroke, segments);\n\t\t}\n\n\t\tif (fill) {\n\t\t\tthis._drawFill(fill, segments);\n\t\t}\n\n\t\tthis.axisRanges.each((axisRange) => {\n\t\t\tconst container = axisRange.container;\n\t\t\tconst fills = axisRange.fills!;\n\t\t\tconst fill = this.makeFill(fills);\n\t\t\tif (container) {\n\t\t\t\tcontainer.children.push(fill);\n\t\t\t}\n\n\t\t\tfill.setPrivate(\"visible\", true);\n\t\t\tthis._drawFill(fill, segments);\n\n\t\t\tconst strokes = axisRange.strokes!;\n\t\t\tconst stroke = this.makeStroke(strokes);\n\t\t\tif (container) {\n\t\t\t\tcontainer.children.push(stroke);\n\t\t\t}\n\n\t\t\tif (rangeStrokeTemplate && rangeStrokeTemplate != this.strokes.template) {\n\t\t\t\tstroke.template = rangeStrokeTemplate;\n\t\t\t}\n\n\t\t\tif (rangeFillTemplate && rangeFillTemplate != this.fills.template) {\n\t\t\t\tfill.template = rangeFillTemplate;\n\t\t\t}\n\n\t\t\tstroke.setPrivate(\"visible\", true);\n\t\t\tthis._drawStroke(stroke, segments);\n\n\t\t\tfill.setRaw(\"userData\", [dataItemIndex, i]);\n\t\t\tstroke.setRaw(\"userData\", [dataItemIndex, i]);\n\t\t})\n\t}\n\n\tprotected _getPoints(dataItem: DataItem<this[\"_dataItemSettings\"]>, o: { points: Array<Array<number>>, segments: number[][][], stacked: boolean | undefined, getOpen: boolean, basePosX: number, basePosY: number, fillVisible: boolean | undefined, xField: string, yField: string, xOpenField: string, yOpenField: string, vcx: number, vcy: number, baseAxis: Axis<AxisRenderer>, xAxis: Axis<AxisRenderer>, yAxis: Axis<AxisRenderer>, locationX: number, locationY: number, openLocationX: number, openLocationY: number, minDistance: number }) {\n\t\tlet points = o.points;\n\n\t\tlet itemLocationX = dataItem.get(\"locationX\", o.locationX);\n\t\tlet itemLocationY = dataItem.get(\"locationY\", o.locationY);\n\n\t\tlet xPos = o.xAxis.getDataItemPositionX(dataItem, o.xField, itemLocationX, o.vcx);\n\t\tlet yPos = o.yAxis.getDataItemPositionY(dataItem, o.yField, itemLocationY, o.vcy);\n\n\t\tif (this._shouldInclude(xPos)) {\n\n\t\t\tconst iPoint = this.getPoint(xPos, yPos);\n\t\t\tconst point = [iPoint.x, iPoint.y];\n\n\t\t\tiPoint.x += this._x;\n\t\t\tiPoint.y += this._y;\n\n\t\t\tdataItem.set(\"point\", iPoint);\n\n\t\t\tif (o.fillVisible) {\n\t\t\t\tlet xPos0: number = xPos;\n\t\t\t\tlet yPos0: number = yPos;\n\n\t\t\t\tif (o.baseAxis === o.xAxis) {\n\t\t\t\t\tyPos0 = o.basePosY;\n\t\t\t\t}\n\t\t\t\telse if (o.baseAxis === o.yAxis) {\n\t\t\t\t\txPos0 = o.basePosX;\n\t\t\t\t}\n\n\t\t\t\tif (o.getOpen) {\n\t\t\t\t\tlet valueX = dataItem.get(o.xOpenField as any);\n\t\t\t\t\tlet valueY = dataItem.get(o.yOpenField as any);\n\n\t\t\t\t\tif (valueX != null && valueY != null) {\n\t\t\t\t\t\tlet itemLocationX = dataItem.get(\"openLocationX\", o.openLocationX);\n\t\t\t\t\t\tlet itemLocationY = dataItem.get(\"openLocationY\", o.openLocationY);\n\n\t\t\t\t\t\tif (o.stacked) {\n\t\t\t\t\t\t\tlet stackToItemX = dataItem.get(\"stackToItemX\")!;\n\t\t\t\t\t\t\tlet stackToItemY = dataItem.get(\"stackToItemY\")!;\n\n\t\t\t\t\t\t\tif (stackToItemX) {\n\t\t\t\t\t\t\t\txPos0 = o.xAxis.getDataItemPositionX(stackToItemX, o.xField, itemLocationX, (stackToItemX.component as XYSeries).get(\"vcx\"));\n\t\t\t\t\t\t\t\tif ($type.isNaN(xPos0)) {\n\t\t\t\t\t\t\t\t\txPos0 = o.basePosX;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tif (o.yAxis === o.baseAxis) {\n\t\t\t\t\t\t\t\t\txPos0 = o.basePosX;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\txPos0 = o.xAxis.getDataItemPositionX(dataItem, o.xOpenField, itemLocationX, o.vcx);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (stackToItemY) {\n\t\t\t\t\t\t\t\tyPos0 = o.yAxis.getDataItemPositionY(stackToItemY, o.yField, itemLocationY, (stackToItemY.component as XYSeries).get(\"vcy\"));\n\t\t\t\t\t\t\t\tif ($type.isNaN(yPos0)) {\n\t\t\t\t\t\t\t\t\tyPos0 = o.basePosY;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tif (o.xAxis === o.baseAxis) {\n\t\t\t\t\t\t\t\t\tyPos0 = o.basePosY;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tyPos0 = o.yAxis.getDataItemPositionY(dataItem, o.yOpenField, itemLocationY, o.vcy);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\txPos0 = o.xAxis.getDataItemPositionX(dataItem, o.xOpenField, itemLocationX, o.vcx);\n\t\t\t\t\t\t\tyPos0 = o.yAxis.getDataItemPositionY(dataItem, o.yOpenField, itemLocationY, o.vcy);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tlet closeIPoint = this.getPoint(xPos0, yPos0);\n\n\t\t\t\tpoint[2] = closeIPoint.x;\n\t\t\t\tpoint[3] = closeIPoint.y;\n\t\t\t}\n\n\t\t\tif (o.minDistance > 0) {\n\t\t\t\tconst p0 = point[0];\n\t\t\t\tconst p1 = point[1];\n\t\t\t\tconst p2 = point[2];\n\t\t\t\tconst p3 = point[3];\n\n\t\t\t\tconst prev = this._previousPoint;\n\n\t\t\t\tconst pp0 = prev[0];\n\t\t\t\tconst pp1 = prev[1];\n\t\t\t\tconst pp2 = prev[2];\n\t\t\t\tconst pp3 = prev[3];\n\n\t\t\t\tif (Math.hypot(p0 - pp0, p1 - pp1) > o.minDistance || (p2 && p3 && Math.hypot(p2 - pp2, p3 - pp3) > o.minDistance)) {\n\t\t\t\t\tpoints.push(point);\n\t\t\t\t\tthis._previousPoint = point;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpoints.push(point);\n\t\t\t}\n\t\t}\n\t}\n\n\n\tprotected _endLine(_points: Array<Array<number>>, _firstPoint: Array<number>) {\n\n\t}\n\n\tprotected _drawStroke(graphics: Graphics, segments: number[][][]) {\n\t\tif (graphics.get(\"visible\") && !graphics.get(\"forceHidden\")) {\n\t\t\tgraphics.set(\"draw\", (display) => {\n\t\t\t\t$array.each(segments, (segment) => {\n\t\t\t\t\tthis._strokeGenerator.context(display as any);\n\t\t\t\t\tthis._strokeGenerator(segment as [number, number][]);\n\t\t\t\t})\n\t\t\t})\n\t\t}\n\t}\n\n\tprotected _drawFill(graphics: Graphics, segments: number[][][]) {\n\t\tif (graphics.get(\"visible\") && !graphics.get(\"forceHidden\")) {\n\t\t\tgraphics.set(\"draw\", (display) => {\n\t\t\t\t$array.each(segments, (segment) => {\n\t\t\t\t\tthis._fillGenerator.context(display as any);\n\t\t\t\t\tthis._fillGenerator(segment as [number, number][]);\n\t\t\t\t})\n\t\t\t})\n\t\t}\n\t}\n\n\tprotected _processAxisRange(axisRange: this[\"_axisRangeType\"]) {\n\t\tsuper._processAxisRange(axisRange);\n\t\taxisRange.fills = new ListTemplate(\n\t\t\tTemplate.new({}),\n\t\t\t() => Graphics._new(this._root, {\n\t\t\t\tthemeTags: $utils.mergeTags(axisRange.fills!.template.get(\"themeTags\", []), [\"line\", \"series\", \"fill\"]),\n\t\t\t}, [this.fills.template, axisRange.fills!.template]),\n\t\t);\n\n\t\taxisRange.strokes = new ListTemplate(\n\t\t\tTemplate.new({}),\n\t\t\t() => Graphics._new(this._root, {\n\t\t\t\tthemeTags: $utils.mergeTags(axisRange.strokes!.template.get(\"themeTags\", []), [\"line\", \"series\", \"stroke\"]),\n\t\t\t}, [this.strokes.template, axisRange.strokes!.template])\n\t\t);\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic createLegendMarker(_dataItem?: DataItem<this[\"_dataItemSettings\"]>) {\n\n\t\tconst legendDataItem = this.get(\"legendDataItem\");\n\n\t\tif (legendDataItem) {\n\t\t\tconst marker = legendDataItem.get(\"marker\");\n\n\t\t\tconst markerRectangle = legendDataItem.get(\"markerRectangle\");\n\t\t\tif (markerRectangle) {\n\t\t\t\tmarkerRectangle.setPrivate(\"visible\", false);\n\t\t\t}\n\n\t\t\tmarker.set(\"background\", Rectangle.new(marker._root, { fillOpacity: 0, fill: color(0x000000) }))\n\n\t\t\tconst legendStroke = marker.children.push(Graphics._new(marker._root, {\n\t\t\t\tthemeTags: [\"line\", \"series\", \"legend\", \"marker\", \"stroke\"], interactive: false\n\t\t\t}, [this.strokes.template]));\n\n\t\t\tthis._legendStroke = legendStroke;\n\n\t\t\tconst legendFill = marker.children.push(Graphics._new(marker._root, {\n\t\t\t\tthemeTags: [\"line\", \"series\", \"legend\", \"marker\", \"fill\"]\n\t\t\t}, [this.fills.template]));\n\n\t\t\tthis._legendFill = legendFill;\n\n\t\t\tconst disabledColor = this._root.interfaceColors.get(\"disabled\");\n\n\t\t\tlegendStroke.states.create(\"disabled\", { fill: disabledColor, stroke: disabledColor });\n\t\t\tlegendFill.states.create(\"disabled\", { fill: disabledColor, stroke: disabledColor });\n\n\t\t\tif (this.bullets.length > 0) {\n\t\t\t\tconst bulletFunction = this.bullets.getIndex(0);\n\t\t\t\tif (bulletFunction) {\n\t\t\t\t\tconst bullet = bulletFunction(marker._root, this, new DataItem(this, { legend: true }, {}));\n\t\t\t\t\tif (bullet) {\n\t\t\t\t\t\tconst sprite = bullet.get(\"sprite\");\n\t\t\t\t\t\tif (sprite instanceof Graphics) {\n\t\t\t\t\t\t\tsprite.states.create(\"disabled\", { fill: disabledColor, stroke: disabledColor });\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (sprite) {\n\t\t\t\t\t\t\tsprite.set(\"tooltipText\", undefined);\n\t\t\t\t\t\t\tsprite.set(\"tooltipHTML\", undefined);\n\n\t\t\t\t\t\t\tmarker.children.push(sprite);\n\t\t\t\t\t\t\tsprite.setAll({ x: marker.width() / 2, y: marker.height() / 2 });\n\n\t\t\t\t\t\t\tmarker.events.on(\"boundschanged\", ()=>{\n\t\t\t\t\t\t\t\tsprite.setAll({ x: marker.width() / 2, y: marker.height() / 2 });\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n","/**\n * @ignore\n */\nexport class MonotoneXTension {\n\n constructor(context: CanvasRenderingContext2D, tension: number) {\n this._context = context;\n this._tension = tension;\n }\n\n public _line = 0;\n public _point = 0;\n public _context: any;\n public _x0 = 0;\n public _x1 = 0;\n public _y0 = 0;\n public _y1 = 0;\n public _t0 = 0;\n\n public _tension: number = 0;\n\n public areaStart() {\n this._line = 0;\n }\n\n public areaEnd() {\n this._line = NaN;\n }\n\n public lineStart() {\n this._x0 = this._x1 =\n this._y0 = this._y1 =\n this._t0 = NaN;\n this._point = 0;\n }\n\n public lineEnd() {\n switch (this._point) {\n case 2: this._context.lineTo(this._x1, this._y1); break;\n case 3: point(this, this._t0, slope2(this, this._t0)); break;\n }\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n }\n\n public point(x: number, y: number) {\n let t1 = NaN;\n\n x = +x, y = +y;\n if (x === this._x1 && y === this._y1) return; // Ignore coincident points.\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; point(this, slope2(this, t1 = slope3(this, x, y)), t1); break;\n default: point(this, this._t0, t1 = slope3(this, x, y)); break;\n }\n\n this._x0 = this._x1, this._x1 = x;\n this._y0 = this._y1, this._y1 = y;\n this._t0 = t1;\n }\n}\n\n/**\n * @ignore\n */\nexport function curveMonotoneXTension(tension: number) {\n\n function monotoneXTension(context: any) {\n return new MonotoneXTension(context, tension);\n }\n\n return monotoneXTension;\n}\n\n/**\n * @ignore\n */\nfunction sign(x: number) {\n return x < 0 ? -1 : 1;\n}\n\n/**\n * @ignore\n */\nfunction slope3(that: MonotoneXTension, x2: number, y2: number) {\n let h0 = (that._x1 - that._x0) as any;\n let h1 = (x2 - that._x1) as any;\n let s0 = (that._y1 - that._y0) / (h0 || h1 < 0 && -0);\n let s1 = (y2 - that._y1) / (h1 || h0 < 0 && -0);\n let p = (s0 * h1 + s1 * h0) / (h0 + h1);\n return (sign(s0) + sign(s1)) * Math.min(Math.abs(s0), Math.abs(s1), 0.5 * Math.abs(p)) || 0;\n}\n\n/**\n * @ignore\n */\nfunction slope2(that: MonotoneXTension, t: number) {\n let h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}\n\n/**\n * @ignore\n */\nfunction point(that: MonotoneXTension, t0: number, t1: number) {\n let x0 = that._x0,\n y0 = that._y0,\n x1 = that._x1,\n y1 = that._y1,\n dx = (x1 - x0) / 1.5 * (1 - that._tension);\n that._context.bezierCurveTo(x0 + dx, y0 + dx * t0, x1 - dx, y1 - dx * t1, x1, y1);\n}","import { LineSeries, ILineSeriesSettings, ILineSeriesPrivate, ILineSeriesDataItem } from \"./LineSeries\";\nimport { curveMonotoneXTension } from \"../../../core/render/MonotoneXTension\";\n\n\nexport interface ISmoothedXLineSeriesDataItem extends ILineSeriesDataItem {\n\n}\n\nexport interface ISmoothedXLineSeriesSettings extends ILineSeriesSettings {\n\n\t/**\n\t * A tension force for the smoothing (0-1). The smaller the value the more\n\t * curvy the line will be.\n\t *\n\t * @default 0.5\n\t */\n\ttension?: number;\n\n}\n\nexport interface ISmoothedXLineSeriesPrivate extends ILineSeriesPrivate {\n}\n\n/**\n * Smoothed line series suitable for horizontal plots.\n *\n * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/smoothed-series/} for more info\n */\nexport class SmoothedXLineSeries extends LineSeries {\n\tpublic static className: string = \"SmoothedXLineSeries\";\n\tpublic static classNames: Array<string> = LineSeries.classNames.concat([SmoothedXLineSeries.className]);\n\n\tdeclare public _settings: ISmoothedXLineSeriesSettings;\n\tdeclare public _privateSettings: ISmoothedXLineSeriesPrivate;\n\tdeclare public _dataItemSettings: ISmoothedXLineSeriesDataItem;\n\n\tprotected _afterNew() {\n\t\tthis._setDefault(\"curveFactory\", curveMonotoneXTension(this.get(\"tension\", 0.5)) as any);\n\t\tsuper._afterNew();\n\t}\n\n\tpublic _updateChildren() {\n\t\tif (this.isDirty(\"tension\")) {\n\t\t\tthis.set(\"curveFactory\", curveMonotoneXTension(this.get(\"tension\", 0.5)) as any);\n\t\t\tthis._valuesDirty = true;\n\t\t}\n\n\t\tsuper._updateChildren();\n\t}\n}\n","import type { Axis, IAxisPrivate, IAxisDataItem } from \"../axes/Axis\";\nimport type { AxisRenderer } from \"../axes/AxisRenderer\";\nimport type { IPoint } from \"../../../core/util/IPoint\";\nimport type { Sprite } from \"../../../core/render/Sprite\";\nimport type { Bullet } from \"../../../core/render/Bullet\";\nimport type { XYChart } from \"../XYChart\";\n//import type { CategoryAxis } from \"../axes/CategoryAxis\";\nimport type { DateAxis } from \"../axes/DateAxis\";\nimport type { ITimeInterval } from \"../../../core/util/Time\";\n\nimport { DataItem } from \"../../../core/render/Component\";\nimport { Series, ISeriesSettings, ISeriesDataItem, ISeriesPrivate, ISeriesEvents } from \"../../../core/render/Series\";\nimport { List } from \"../../../core/util/List\";\nimport { Container } from \"../../../core/render/Container\";\nimport { Graphics } from \"../../../core/render/Graphics\";\n\nimport type { IDisposer } from \"../../../core/util/Disposer\";\n\nimport * as $type from \"../../../core/util/Type\";\nimport * as $object from \"../../../core/util/Object\";\nimport * as $array from \"../../../core/util/Array\";\nimport * as $utils from \"../../../core/util/Utils\";\n\n/**\n * @ignore\n */\nfunction min(left: number | undefined, right: number | undefined): number | undefined {\n\tif (left == null) {\n\t\treturn right;\n\n\t} else if (right == null) {\n\t\treturn left;\n\n\t} else if (right < left) {\n\t\treturn right;\n\n\t} else {\n\t\treturn left;\n\t}\n}\n\n/**\n * @ignore\n */\nfunction max(left: number | undefined, right: number | undefined): number | undefined {\n\tif (left == null) {\n\t\treturn right;\n\n\t} else if (right == null) {\n\t\treturn left;\n\n\t} else if (right > left) {\n\t\treturn right;\n\n\t} else {\n\t\treturn left;\n\t}\n}\n\n/**\n * Interface representing a series axis range.\n *\n * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/axis-ranges/#Series_axis_ranges} for more info\n */\nexport interface IXYSeriesAxisRange {\n\n\t/**\n\t * Related axis data item.\n\t */\n\taxisDataItem: DataItem<IAxisDataItem>;\n\n\t/**\n\t * A [[Container]] element that range's elements are placed in.\n\t */\n\tcontainer?: Container;\n\n\t/**\n\t * Target series.\n\t */\n\tseries?: XYSeries;\n\n}\n\nexport interface IXYAxisPrivate extends IAxisPrivate {\n\tmin?: number;\n\tmax?: number;\n}\n\nexport interface IXYAxis extends Axis<AxisRenderer> {\n\t_privateSettings: IXYAxisPrivate;\n}\n\nexport interface IXYSeriesEvents extends ISeriesEvents {\n\n\t/**\n\t * Kicks in when axis starts using different data set, e.g. data\n\t * of different granularit on [[DateAxis]].\n\t *\n\t * @since 5.1.1\n\t */\n\tdatasetchanged: {\n\t\tid: string\n\t}\n}\n\n/**\n * XY chart series data item.\n */\nexport interface IXYSeriesDataItem extends ISeriesDataItem {\n\tvalueX?: number;\n\tvalueXWorking?: number;\n\tvalueXChange?: number;\n\tvalueXChangePercent?: number;\n\tvalueXChangeSelection?: number;\n\tvalueXChangeSelectionPercent?: number;\n\tvalueXChangePrevious?: number;\n\tvalueXChangePreviousPercent?: number;\n\tvalueXWorkingOpen?: number;\n\tvalueXWorkingClose?: number;\n\n\tvalueY?: number;\n\tvalueYChange?: number;\n\tvalueYWorking?: number;\n\tvalueYChangePercent?: number;\n\tvalueYChangeSelection?: number;\n\tvalueYChangeSelectionPercent?: number;\n\tvalueYChangePrevious?: number;\n\tvalueYChangePreviousPercent?: number;\n\tvalueYWorkingOpen?: number;\n\tvalueYWorkingClose?: number;\n\n\topenValueX?: number;\n\topenValueXWorking?: number;\n\topenValueXChange?: number;\n\topenValueXChangePercent?: number;\n\topenValueXChangeSelection?: number;\n\topenValueXChangeSelectionPercent?: number;\n\topenValueXChangePrevious?: number;\n\topenValueXChangePreviousPercent?: number;\n\topenValueXWorkingOpen?: number;\n\topenValueXWorkingClose?: number;\n\topenValueY?: number;\n\topenValueYWorking?: number;\n\topenValueYChange?: number;\n\topenValueYChangePercent?: number;\n\topenValueYChangeSelection?: number;\n\topenValueYChangeSelectionPercent?: number;\n\topenValueYChangePrevious?: number;\n\topenValueYChangePreviousPercent?: number;\n\topenValueYWorkingOpen?: number;\n\topenValueYWorkingClose?: number;\n\n\tlowValueX?: number;\n\tlowValueXWorking?: number;\n\tlowValueXChange?: number;\n\tlowValueXChangePercent?: number;\n\tlowValueXChangeSelection?: number;\n\tlowValueXChangeSelectionPercent?: number;\n\tlowValueXChangePrevious?: number;\n\tlowValueXChangePreviousPercent?: number;\n\tlowValueXWorkingOpen?: number;\n\tlowValueXWorkingClose?: number;\n\n\thighValueX?: number;\n\thighValueXWorking?: number;\n\thighValueXChange?: number;\n\thighValueXChangePercent?: number;\n\thighValueXChangeSelection?: number;\n\thighValueXChangeSelectionPercent?: number;\n\thighValueXChangePrevious?: number;\n\thighValueXChangePreviousPercent?: number;\n\thighValueXWorkingOpen?: number;\n\thighValueXWorkingClose?: number;\n\n\tlowValueY?: number;\n\tlowValueYWorking?: number;\n\tlowValueYChange?: number;\n\tlowValueYChangePercent?: number;\n\tlowValueYChangeSelection?: number;\n\tlowValueYChangeSelectionPercent?: number;\n\tlowValueYChangePrevious?: number;\n\tlowValueYChangePreviousPercent?: number;\n\tlowValueYWorkingOpen?: number;\n\tlowValueYWorkingClose?: number;\n\n\thighValueY?: number;\n\thighValueYWorking?: number;\n\thighValueYChange?: number;\n\thighValueYChangePercent?: number;\n\thighValueYChangeSelection?: number;\n\thighValueYChangeSelectionPercent?: number;\n\thighValueYChangePrevious?: number;\n\thighValueYChangePreviousPercent?: number;\n\thighValueYWorkingOpen?: number;\n\thighValueYWorkingClose?: number;\n\n\tcategoryX?: string;\n\tcategoryY?: string;\n\n\topenCategoryX?: string;\n\topenCategoryY?: string;\n\n\tlocationX?: number;\n\tlocationY?: number;\n\n\topenLocationX?: number;\n\topenLocationY?: number;\n\n\tstackToItemX?: DataItem<IXYSeriesDataItem>;\n\tstackToItemY?: DataItem<IXYSeriesDataItem>;\n\n\tleft?: number;\n\tright?: number;\n\ttop?: number;\n\tbottom?: number;\n\n\tpoint?: IPoint;\n\n\toriginals?: Array<DataItem<IXYSeriesDataItem>>;\n}\n\nexport interface IXYSeriesSettings extends ISeriesSettings {\n\n\t/**\n\t * Minimal distance between data items in pixels.\n\t *\n\t * If data items are closer than this, bullets are turned off to avoid\n\t * overcrowding.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/#Bullets} for more info\n\t */\n\tminBulletDistance?: number;\n\n\t/**\n\t * X axis series uses.\n\t *\n\t * **IMPORTANT:** `xAxis` needs to be set when creating the series. Updating\n\t * this setting on previously created series object will not work.\n\t */\n\txAxis: IXYAxis;\n\n\t/**\n\t * Y axis series uses.\n\t *\n\t * **IMPORTANT:** `yAxis` needs to be set when creating the series. Updating\n\t * this setting on previously created series object will not work.\n\t */\n\tyAxis: IXYAxis;\n\n\t/**\n\t * If set to `true` series will be stacked to other series that also have\n\t * this setting set to `true`.\n\t *\n\t * NOTE: for series stack properly, all stacked series must have same number\n\t * of data items with the same timestamp/category.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/#Stacked_series} for more info\n\t */\n\tstacked?: boolean;\n\n\t/**\n\t * Whether to stack negative values from zero (`true`) or from whatever\n\t * previous series value is (`false`).\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/#Negative_value_stacking} for more info\n\t */\n\tstackToNegative?: boolean;\n\n\t/**\n\t * Base axis for the series.\n\t *\n\t * A base axis will dictate direction series plot.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/#Base_axis} for more info\n\t */\n\tbaseAxis?: IXYAxis;\n\n\t/**\n\t * Input data field for X value.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/#Data_fields} for more info\n\t */\n\tvalueXField?: string;\n\n\t/**\n\t * Input data field for Y value.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/#Data_fields} for more info\n\t */\n\tvalueYField?: string;\n\n\t/**\n\t * Exclude series values when calculating totals for category/interval.\n\t *\n\t * @default false\n\t */\n\texcludeFromTotal?: boolean;\n\n\t/**\n\t * Display data field for X value.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/#Data_fields} for more info\n\t */\n\tvalueXShow?: \"valueXWorking\" | \"valueXChange\" | \"valueXChangePercent\" | \"valueXChangeSelection\" | \"valueXChangeSelectionPercent\" | \"valueXChangePrevious\" | \"valueXChangePreviousPercent\" | \"valueXTotal\" | \"valueXTotalPercent\" | \"valueXSum\";\n\n\t/**\n\t * Display data field for Y value.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/#Data_fields} for more info\n\t */\n\tvalueYShow?: \"valueYWorking\" | \"valueYChange\" | \"valueYChangePercent\" | \"valueYChangeSelection\" | \"valueYChangeSelectionPercent\" | \"valueYChangePrevious\" | \"valueYChangePreviousPercent\" | \"valueYTotal\" | \"valueYTotalPercent\" | \"valueYSum\";\n\n\t/**\n\t * Indicates what aggregate value to use for collective data item, when\n\t * aggregating X values from several data items.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/date-axis/#Dynamic_data_item_grouping} for more info\n\t */\n\tvalueXGrouped?: \"open\" | \"close\" | \"low\" | \"high\" | \"average\" | \"sum\" | \"extreme\";\n\n\t/**\n\t * Indicates what aggregate value to use for collective data item, when\n\t * aggregating X values from several data items.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/date-axis/#Dynamic_data_item_grouping} for more info\n\t */\n\tvalueYGrouped?: \"open\" | \"close\" | \"low\" | \"high\" | \"average\" | \"sum\" | \"extreme\";\n\n\t/**\n\t * Input data field for X open value.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/#Data_fields} for more info\n\t */\n\topenValueXField?: string;\n\n\t/**\n\t * Input data field for X open value.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/#Data_fields} for more info\n\t */\n\topenValueYField?: string;\n\n\t/**\n\t * Display data field for X open value.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/#Data_fields} for more info\n\t */\n\topenValueXShow?: \"openValueXWorking\" | \"openValueXChange\" | \"openValueXChangePercent\" | \"openValueXChangeSelection\" | \"openValueXChangeSelectionPercent\" | \"openValueXChangePrevious\" | \"openValueXChangePreviousPercent\";\n\n\t/**\n\t * Display data field for Y open value.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/#Data_fields} for more info\n\t */\n\topenValueYShow?: \"openValueYWorking\" | \"openValueYChange\" | \"openValueYChangePercent\" | \"openValueYChangeSelection\" | \"openValueYChangeSelectionPercent\" | \"openValueYChangePrevious\" | \"openValueYChangePreviousPercent\";\n\n\t/**\n\t * Display data field for Y open value.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/date-axis/#Dynamic_data_item_grouping} for more info\n\t */\n\topenValueXGrouped?: \"open\" | \"close\" | \"low\" | \"high\" | \"average\" | \"sum\" | \"extreme\";\n\n\t/**\n\t * Display data field for Y open value.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/date-axis/#Dynamic_data_item_grouping} for more info\n\t */\n\topenValueYGrouped?: \"open\" | \"close\" | \"low\" | \"high\" | \"average\" | \"sum\" | \"extreme\";\n\n\n\n\t/**\n\t * Input data field for X low value.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/candlestick-series/} for more info\n\t */\n\tlowValueXField?: string;\n\n\t/**\n\t * Input data field for Y low value.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/candlestick-series/} for more info\n\t */\n\tlowValueYField?: string;\n\n\t/**\n\t * Input data field for X high value.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/candlestick-series/} for more info\n\t */\n\thighValueXField?: string;\n\n\t/**\n\t * Input data field for Y high value.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/candlestick-series/} for more info\n\t */\n\thighValueYField?: string;\n\n\t/**\n\t * Display data field for X low value.\n\t */\n\tlowValueXShow?: \"lowValueXWorking\" | \"lowValueXChange\" | \"lowValueXChangePercent\" | \"lowValueXChangeSelection\" | \"lowValueXChangeSelectionPercent\" | \"lowValueXChangePrevious\" | \"lowValueXChangePreviousPercent\";\n\n\t/**\n\t * Display data field for Y low value.\n\t */\n\tlowValueYShow?: \"lowValueYWorking\" | \"lowValueYChange\" | \"lowValueYChangePercent\" | \"lowValueYChangeSelection\" | \"lowValueYChangeSelectionPercent\" | \"lowValueYChangePrevious\" | \"lowValueYChangePreviousPercent\";\n\n\t/**\n\t * Indicates what aggregate value to use for collective data item, when\n\t * aggregating X low values from several data items.\n\t */\n\tlowValueXGrouped?: \"open\" | \"close\" | \"low\" | \"high\" | \"average\" | \"sum\" | \"extreme\";\n\n\t/**\n\t * Indicates what aggregate value to use for collective data item, when\n\t * aggregating Y low values from several data items.\n\t */\n\tlowValueYGrouped?: \"open\" | \"close\" | \"low\" | \"high\" | \"average\" | \"sum\" | \"extreme\";\n\n\t/**\n\t * Display data field for X high value.\n\t */\n\thighValueXShow?: \"highValueXWorking\" | \"highValueXChange\" | \"highValueXChangePercent\" | \"highValueXChangeSelection\" | \"highValueXChangeSelectionPercent\" | \"highValueXChangePrevious\" | \"highValueXChangePreviousPercent\";\n\n\t/**\n\t * Display data field for Y low value.\n\t */\n\thighValueYShow?: \"highValueYWorking\" | \"highValueYChange\" | \"highValueYChangePercent\" | \"highValueYChangeSelection\" | \"highValueYChangeSelectionPercent\" | \"highValueYChangePrevious\" | \"highValueYChangePreviousPercent\";\n\n\t/**\n\t * Indicates what aggregate value to use for collective data item, when\n\t * aggregating X high values from several data items.\n\t */\n\thighValueXGrouped?: \"open\" | \"close\" | \"high\" | \"high\" | \"average\" | \"sum\" | \"extreme\";\n\n\t/**\n\t * Indicates what aggregate value to use for collective data item, when\n\t * aggregating X high values from several data items.\n\t */\n\thighValueYGrouped?: \"open\" | \"close\" | \"high\" | \"high\" | \"average\" | \"sum\" | \"extreme\";\n\n\t/**\n\t * Horizontal location of the low data point relative to its cell.\n\t *\n\t * `0` - beginning, `0.5` - middle, `1` - end.\n\t *\n\t * @default 0.5\n\t */\n\tlowLocationX?: number;\n\n\t/**\n\t * Vertical location of the low data point relative to its cell.\n\t *\n\t * `0` - beginning, `0.5` - middle, `1` - end.\n\t *\n\t * @default 0.5\n\t */\n\tlowLocationY?: number;\n\n\t/**\n\t * Horizontal location of the high data point relative to its cell.\n\t *\n\t * `0` - beginning, `0.5` - middle, `1` - end.\n\t *\n\t * @default 0.5\n\t */\n\thighLocationX?: number;\n\n\t/**\n\t * Vertical location of the high data point relative to its cell.\n\t *\n\t * `0` - beginning, `0.5` - middle, `1` - end.\n\t *\n\t * @default 0.5\n\t */\n\thighLocationY?: number;\n\n\n\t/**\n\t * Input data field for X category.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/#Data_fields} for more info\n\t */\n\tcategoryXField?: string;\n\n\t/**\n\t * Input data field for Y category.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/#Data_fields} for more info\n\t */\n\tcategoryYField?: string;\n\n\t/**\n\t * Display data field for X category.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/#Data_fields} for more info\n\t */\n\topenCategoryXField?: string;\n\n\t/**\n\t * Display data field for Y category.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/#Data_fields} for more info\n\t */\n\topenCategoryYField?: string;\n\n\t/**\n\t * If set to `true` this series will be ignored when calculating scale of the\n\t * related axes.\n\t *\n\t * @default false\n\t */\n\tignoreMinMax?: boolean;\n\n\t/**\n\t * @ignore\n\t */\n\tvcx?: number;\n\n\t/**\n\t * @ignore\n\t */\n\tvcy?: number;\n\n\t/**\n\t * Horizontal location of the data point relative to its cell.\n\t *\n\t * `0` - beginning, `0.5` - middle, `1` - end.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/line-series/#Data_item_location} for more info\n\t * @default 0.5\n\t */\n\tlocationX?: number;\n\n\t/**\n\t * Vertical location of the data point relative to its cell.\n\t *\n\t * `0` - beginning, `0.5` - middle, `1` - end.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/line-series/#Data_item_location} for more info\n\t * @default 0.5\n\t */\n\tlocationY?: number;\n\n\t/**\n\t * Horizontal location of the open data point relative to its cell.\n\t *\n\t * `0` - beginning, `0.5` - middle, `1` - end.\n\t *\n\t * @default 0.5\n\t */\n\topenLocationX?: number;\n\n\t/**\n\t * Vertical location of the open data point relative to its cell.\n\t *\n\t * `0` - beginning, `0.5` - middle, `1` - end.\n\t *\n\t * @default 0.5\n\t */\n\topenLocationY?: number;\n\n\t/**\n\t * If set to `true` [[XYCursor]] will show closest data item from series\n\t * even if it is outside currently hovered date axis interval.\n\t *\n\t * This setting is relevant only if `baseAxis` is a date axis.\n\t */\n\tsnapTooltip?: boolean;\n\n\t/**\n\t * Text to use for series legend label when no particular category/interval\n\t * is selected.\n\t */\n\tlegendRangeLabelText?: string;\n\n\t/**\n\t * Text to use for series legend value label when no particular\n\t * category/interval is selected.\n\t */\n\tlegendRangeValueText?: string;\n\n\n\t/**\n\t * If set to `true`, series bullets will be masked by plot area.\n\t */\n\tmaskBullets?: boolean;\n\n\t/**\n\t * Whether series' tooltip should inherit its color from series or its first\n\t * bullet.\n\t *\n\t * @default \"series\"\n\t */\n\tseriesTooltipTarget?: \"series\" | \"bullet\";\n\n\t/**\n\t * Indicates horizontal position at which to show series' tooltip at.\n\t *\n\t * @default \"value\"\n\t * @since 5.0.16\n\t */\n\ttooltipPositionX?: \"open\" | \"value\" | \"low\" | \"high\";\n\n\t/**\n\t * Indicates vertical position at which to show series' tooltip at.\n\t *\n\t * @default \"value\"\n\t * @since 5.0.16\n\t */\n\ttooltipPositionY?: \"open\" | \"value\" | \"low\" | \"high\";\n\n\n\t/**\n\t * If set to `true` data items for this series won't be grouped even if\n\t * the `groupData: true` is set on a related [[DateAxis]].\n\t * \n\t * @since 5.0.19\n\t */\n\tgroupDataDisabled?: boolean;\n\n\t/**\n\t * A [[DataItem]] that is being used for current tooltip, e.g. by a chart\n\t * cursor.\n\t *\n\t * @since 5.1.2\n\t */\n\ttooltipDataItem?: DataItem<IXYSeriesDataItem>\n\n\t/**\n\t * If set to `true`, when data is grouped, the `originals` setting of the\n\t * group data items will be populated by the original (source) data items\n\t * that fall into the group.\n\t *\n\t * Please note that if `groupDataCallback` is set, this setting is ignored\n\t * as originals will always be included, regardless of the value.\n\t *\n\t * @since 5.1.11\n\t * @default false\n\t */\n\tgroupDataWithOriginals?: boolean;\n\n\t/**\n\t * A custom function to call when grouping data items.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/date-axis/#Custom_aggregation_functions} for more info\n\t * @since 5.1.11\n\t */\n\tgroupDataCallback?: (dataItem: DataItem<IXYSeriesDataItem>, interval: ITimeInterval) => void;\n\n}\n\nexport interface IXYSeriesPrivate extends ISeriesPrivate {\n\n\tminX?: number;\n\tmaxX?: number;\n\n\tminY?: number;\n\tmaxY?: number;\n\n\tselectionMinX?: number;\n\tselectionMaxX?: number;\n\n\tselectionMinY?: number;\n\tselectionMaxY?: number;\n\n\tvalueXAverage?: number;\n\tvalueXCount?: number;\n\tvalueXSum?: number;\n\tvalueXAbsoluteSum?: number;\n\tvalueXLow?: number;\n\tvalueXHigh?: number;\n\tvalueXOpen?: number;\n\tvalueXClose?: number;\n\n\tvalueYAverage?: number;\n\tvalueYCount?: number;\n\tvalueYSum?: number;\n\tvalueYAbsoluteSum?: number;\n\tvalueYLow?: number;\n\tvalueYHigh?: number;\n\tvalueYOpen?: number;\n\tvalueYClose?: number;\n\n\tvalueXAverageSelection?: number;\n\tvalueXCountSelection?: number;\n\tvalueXSumSelection?: number;\n\tvalueXAbsoluteSumSelection?: number;\n\tvalueXLowSelection?: number;\n\tvalueXHighSelection?: number;\n\tvalueXOpenSelection?: number;\n\tvalueXCloseSelection?: number;\n\n\tvalueYAverageSelection?: number;\n\tvalueYCountSelection?: number;\n\tvalueYSumSelection?: number;\n\tvalueYAbsoluteSumSelection?: number;\n\tvalueYLowSelection?: number;\n\tvalueYHighSelection?: number;\n\tvalueYOpenSelection?: number;\n\tvalueYCloseSelection?: number;\n\n\topenValueXAverage?: number;\n\topenValueXCount?: number;\n\topenValueXSum?: number;\n\topenValueXAbsoluteSum?: number;\n\topenValueXLow?: number;\n\topenValueXHigh?: number;\n\topenValueXOpen?: number;\n\topenValueXClose?: number;\n\n\topenValueYAverage?: number;\n\topenValueYCount?: number;\n\topenValueYSum?: number;\n\topenValueYAbsoluteSum?: number;\n\topenValueYLow?: number;\n\topenValueYHigh?: number;\n\topenValueYOpen?: number;\n\topenValueYClose?: number;\n\n\topenValueXAverageSelection?: number;\n\topenValueXCountSelection?: number;\n\topenValueXSumSelection?: number;\n\topenValueXAbsoluteSumSelection?: number;\n\topenValueXLowSelection?: number;\n\topenValueXHighSelection?: number;\n\topenValueXOpenSelection?: number;\n\topenValueXCloseSelection?: number;\n\n\topenValueYAverageSelection?: number;\n\topenValueYCountSelection?: number;\n\topenValueYSumSelection?: number;\n\topenValueYAbsoluteSumSelection?: number;\n\topenValueYLowSelection?: number;\n\topenValueYHighSelection?: number;\n\topenValueYOpenSelection?: number;\n\topenValueYCloseSelection?: number;\n\n\tlowValueXAverage?: number;\n\tlowValueXCount?: number;\n\tlowValueXSum?: number;\n\tlowValueXAbsoluteSum?: number;\n\tlowValueXLow?: number;\n\tlowValueXHigh?: number;\n\tlowValueXlow?: number;\n\tlowValueXClose?: number;\n\n\tlowValueYAverage?: number;\n\tlowValueYCount?: number;\n\tlowValueYSum?: number;\n\tlowValueYAbsoluteSum?: number;\n\tlowValueYLow?: number;\n\tlowValueYHigh?: number;\n\tlowValueYlow?: number;\n\tlowValueYClose?: number;\n\n\tlowValueXAverageSelection?: number;\n\tlowValueXCountSelection?: number;\n\tlowValueXSumSelection?: number;\n\tlowValueXAbsoluteSumSelection?: number;\n\tlowValueXLowSelection?: number;\n\tlowValueXHighSelection?: number;\n\tlowValueXlowSelection?: number;\n\tlowValueXCloseSelection?: number;\n\n\tlowValueYAverageSelection?: number;\n\tlowValueYCountSelection?: number;\n\tlowValueYSumSelection?: number;\n\tlowValueYAbsoluteSumSelection?: number;\n\tlowValueYLowSelection?: number;\n\tlowValueYHighSelection?: number;\n\tlowValueYlowSelection?: number;\n\tlowValueYCloseSelection?: number;\n\n\thighValueXAverage?: number;\n\thighValueXCount?: number;\n\thighValueXSum?: number;\n\thighValueXAbsoluteSum?: number;\n\thighValueXLow?: number;\n\thighValueXHigh?: number;\n\thighValueXhigh?: number;\n\thighValueXClose?: number;\n\n\thighValueYAverage?: number;\n\thighValueYCount?: number;\n\thighValueYSum?: number;\n\thighValueYAbsoluteSum?: number;\n\thighValueYLow?: number;\n\thighValueYHigh?: number;\n\thighValueYhigh?: number;\n\thighValueYClose?: number;\n\n\thighValueXAverageSelection?: number;\n\thighValueXCountSelection?: number;\n\thighValueXSumSelection?: number;\n\thighValueXAbsoluteSumSelection?: number;\n\thighValueXLowSelection?: number;\n\thighValueXHighSelection?: number;\n\thighValueXhighSelection?: number;\n\thighValueXCloseSelection?: number;\n\n\thighValueYAverageSelection?: number;\n\thighValueYCountSelection?: number;\n\thighValueYSumSelection?: number;\n\thighValueYAbsoluteSumSelection?: number;\n\thighValueYLowSelection?: number;\n\thighValueYHighSelection?: number;\n\thighValueYhighSelection?: number;\n\thighValueYCloseSelection?: number;\n\n\toutOfSelection?: boolean;\n\n\tdoNotUpdateLegend?: boolean;\n}\n\n\n/**\n * A base class for all XY chart series.\n *\n * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/} for more info\n */\nexport abstract class XYSeries extends Series {\n\tpublic static className: string = \"XYSeries\";\n\tpublic static classNames: Array<string> = Series.classNames.concat([XYSeries.className]);\n\n\tdeclare public _settings: IXYSeriesSettings;\n\tdeclare public _privateSettings: IXYSeriesPrivate;\n\tdeclare public _dataItemSettings: IXYSeriesDataItem;\n\tdeclare public _axisRangeType: IXYSeriesAxisRange;\n\tdeclare public _events: IXYSeriesEvents;\n\n\tprotected _xField!: string;\n\tprotected _yField!: string;\n\tprotected _xOpenField!: string;\n\tprotected _yOpenField!: string;\n\n\tprotected _xLowField!: string;\n\tprotected _xHighField!: string;\n\tprotected _yLowField!: string;\n\tprotected _yHighField!: string;\n\n\tprotected _axesDirty: boolean = false;\n\tpublic _stackDirty: boolean = false;\n\n\tprotected _selectionProcessed = false;\n\n\tdeclare public chart: XYChart | undefined;\n\n\tpublic _dataSets: { [index: string]: Array<DataItem<IXYSeriesDataItem>> } = {};\n\n\tpublic _mainContainerMask: Graphics | undefined;\n\n\tprotected _x: number = 0;\n\tprotected _y: number = 0;\n\n\tpublic _bullets: { [index: string]: Sprite } = {};\n\n\t/**\n\t * A [[Container]] that us used to put series' elements in.\n\t *\n\t * @default Container.new()\n\t */\n\tpublic readonly mainContainer: Container = this.children.push(Container.new(this._root, {}));\n\n\t/**\n\t * A list of axis ranges that affect the series.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/axis-ranges/} for more info\n\t */\n\tpublic readonly axisRanges: List<this[\"_axisRangeType\"]> = new List();\n\n\tprotected _skipped: boolean = false;\n\n\tprotected _couldStackTo: Array<XYSeries> = [];\n\n\tprotected _reallyStackedTo: { [index: number]: XYSeries } = {};\n\n\tpublic _stackedSeries: { [index: number]: XYSeries } = {};\n\n\tprotected _aLocationX0: number = 0;\n\tprotected _aLocationX1: number = 1;\n\tprotected _aLocationY0: number = 0;\n\tprotected _aLocationY1: number = 1;\n\n\tprotected _showBullets: boolean = true;\n\n\tprotected valueXFields = [\n\t\t\"valueX\",\n\t\t\"openValueX\",\n\t\t\"lowValueX\",\n\t\t\"highValueX\"\n\t];\n\n\tprotected valueYFields = [\n\t\t\"valueY\",\n\t\t\"openValueY\",\n\t\t\"lowValueY\",\n\t\t\"highValueY\"\n\t];\n\n\tpublic _valueXFields!: Array<string>;\n\tpublic _valueYFields!: Array<string>;\n\n\t// used for full min/max\n\tprotected _valueXShowFields!: Array<string>;\n\tprotected _valueYShowFields!: Array<string>;\n\n\t// used for selection (uses working)\n\tpublic __valueXShowFields!: Array<string>;\n\tpublic __valueYShowFields!: Array<string>;\n\n\tprotected _emptyDataItem = new DataItem(this, undefined, {});\n\n\tpublic _dataSetId?: string;\n\n\tprotected _tooltipFieldX?: string;\n\tprotected _tooltipFieldY?: string;\n\n\tpublic _posXDp?: IDisposer;\n\tpublic _posYDp?: IDisposer;\n\n\tprotected _afterNew() {\n\t\tthis.fields.push(\"categoryX\", \"categoryY\", \"openCategoryX\", \"openCategoryY\");\n\t\tthis.valueFields.push(\"valueX\", \"valueY\", \"openValueX\", \"openValueY\", \"lowValueX\", \"lowValueY\", \"highValueX\", \"highValueY\");\n\n\t\tthis._setRawDefault(\"vcx\", 1);\n\t\tthis._setRawDefault(\"vcy\", 1);\n\t\t// this can't go to themes, as data might be parsed before theme\n\t\tthis._setRawDefault(\"valueXShow\", \"valueXWorking\");\n\t\tthis._setRawDefault(\"valueYShow\", \"valueYWorking\");\n\n\t\tthis._setRawDefault(\"openValueXShow\", \"openValueXWorking\");\n\t\tthis._setRawDefault(\"openValueYShow\", \"openValueYWorking\");\n\n\t\tthis._setRawDefault(\"lowValueXShow\", \"lowValueXWorking\");\n\t\tthis._setRawDefault(\"lowValueYShow\", \"lowValueYWorking\");\n\n\t\tthis._setRawDefault(\"highValueXShow\", \"highValueXWorking\");\n\t\tthis._setRawDefault(\"highValueYShow\", \"highValueYWorking\");\n\n\t\tthis._setRawDefault(\"lowValueXGrouped\", \"low\");\n\t\tthis._setRawDefault(\"lowValueYGrouped\", \"low\");\n\n\t\tthis._setRawDefault(\"highValueXGrouped\", \"high\");\n\t\tthis._setRawDefault(\"highValueYGrouped\", \"high\");\n\n\n\n\t\tsuper._afterNew();\n\n\t\tthis.set(\"maskContent\", true);\n\n\t\tthis._disposers.push(this.axisRanges.events.onAll((change) => {\n\t\t\tif (change.type === \"clear\") {\n\t\t\t\t$array.each(change.oldValues, (axisRange) => {\n\t\t\t\t\tthis._removeAxisRange(axisRange);\n\t\t\t\t});\n\t\t\t} else if (change.type === \"push\") {\n\t\t\t\tthis._processAxisRange(change.newValue);\n\t\t\t} else if (change.type === \"setIndex\") {\n\t\t\t\tthis._processAxisRange(change.newValue);\n\t\t\t} else if (change.type === \"insertIndex\") {\n\t\t\t\tthis._processAxisRange(change.newValue);\n\t\t\t} else if (change.type === \"removeIndex\") {\n\t\t\t\tthis._removeAxisRange(change.oldValue);\n\t\t\t} else if (change.type === \"moveIndex\") {\n\t\t\t\tthis._processAxisRange(change.value);\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Unknown IStreamEvent type\");\n\t\t\t}\n\t\t}))\n\n\t\tthis.states.create(\"hidden\", <any>{ opacity: 1, visible: false });\n\n\t\tthis.onPrivate(\"startIndex\", ()=>{\n\t\t\tthis.root.events.once(\"frameended\", ()=>{\n\t\t\t\tthis.updateLegendValue();\t\t\t\n\t\t\t})\t\t\t\n\t\t})\n\n\t\tthis.onPrivate(\"endIndex\", ()=>{\t\t\t\n\t\t\tthis.root.events.once(\"frameended\", ()=>{\n\t\t\t\tthis.updateLegendValue();\t\t\t\n\t\t\t})\n\t\t})\t\t\n\n\t\tthis._makeFieldNames();\n\t}\n\n\tprotected _processAxisRange(axisRange: this[\"_axisRangeType\"]) {\n\t\tconst container = Container.new(this._root, {});\n\t\taxisRange.container = container;\n\t\tthis.children.push(container);\n\n\t\taxisRange.series = this;\n\n\t\tconst axisDataItem = axisRange.axisDataItem;\n\t\taxisDataItem.setRaw(\"isRange\", true);\n\n\t\tconst axis = <Axis<AxisRenderer>>axisDataItem.component;\n\t\tif (axis) {\n\t\t\taxis._processAxisRange(axisDataItem, [\"range\", \"series\"]);\n\n\t\t\tconst bullet = axisDataItem.get(\"bullet\");\n\t\t\tif (bullet) {\n\t\t\t\tconst sprite = bullet.get(\"sprite\");\n\t\t\t\tif (sprite) {\n\t\t\t\t\tsprite.setPrivate(\"visible\", false);\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst axisFill = axisDataItem.get(\"axisFill\");\n\t\t\tif (axisFill) {\n\t\t\t\tcontainer.set(\"mask\", axisFill);\n\t\t\t}\n\t\t\taxis._seriesAxisRanges.push(axisDataItem);\n\t\t}\n\t}\n\n\tprotected _removeAxisRange(axisRange: this[\"_axisRangeType\"]) {\n\t\tconst axisDataItem = axisRange.axisDataItem;\n\t\tconst axis = <Axis<AxisRenderer>>axisDataItem.component;\n\t\taxis.disposeDataItem(axisDataItem);\n\n\t\t$array.remove(axis._seriesAxisRanges, axisDataItem);\n\n\t\tconst container = axisRange.container;\n\t\tif (container) {\n\t\t\tcontainer.dispose();\n\t\t}\n\t}\n\n\tprotected _updateFields() {\n\t\tsuper._updateFields();\n\n\t\tthis._valueXFields = [];\n\t\tthis._valueYFields = [];\n\t\tthis._valueXShowFields = [];\n\t\tthis._valueYShowFields = [];\n\n\t\tthis.__valueXShowFields = [];\n\t\tthis.__valueYShowFields = [];\n\n\t\tif (this.valueXFields) {\n\t\t\t$array.each(this.valueXFields as Array<keyof this[\"_settings\"]>, (key) => {\n\t\t\t\tconst field = this.get(<any>(key + \"Field\"));\n\t\t\t\tif (field) {\n\t\t\t\t\tthis._valueXFields.push(<any>key);\n\t\t\t\t\tlet field = this.get(<any>(key + \"Show\"));\n\t\t\t\t\tthis.__valueXShowFields.push(field);\n\n\t\t\t\t\tif (field.indexOf(\"Working\") != -1) {\n\t\t\t\t\t\tthis._valueXShowFields.push(field.split(\"Working\")[0]);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tthis._valueXShowFields.push(field);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tif (this.valueYFields) {\n\t\t\t$array.each(this.valueYFields as Array<keyof this[\"_settings\"]>, (key) => {\n\t\t\t\tconst field = this.get(<any>(key + \"Field\"));\n\n\t\t\t\tif (field) {\n\t\t\t\t\tthis._valueYFields.push(<any>key);\n\t\t\t\t\tlet field = this.get(<any>(key + \"Show\"));\n\t\t\t\t\tthis.__valueYShowFields.push(field);\n\n\t\t\t\t\tif (field.indexOf(\"Working\") != -1) {\n\t\t\t\t\t\tthis._valueYShowFields.push(field.split(\"Working\")[0]);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tthis._valueYShowFields.push(field);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tprotected _dispose() {\n\t\tsuper._dispose();\n\n\t\tthis._bullets = {};\n\t\tconst chart = this.chart;\n\t\tif (chart) {\n\t\t\tchart.series.removeValue(this);\n\t\t}\n\n\t\t$array.removeFirst(this.get(\"xAxis\").series, this);\n\t\t$array.removeFirst(this.get(\"yAxis\").series, this);\n\t}\n\n\t// TODO use SelectKeys<this[\"_privateSettings\"], number | undefined>\n\tprotected _min<Key extends keyof this[\"_privateSettings\"]>(key: Key, value: number | undefined) {\n\t\tlet newValue = min(this.getPrivate(key) as any, value);\n\t\tthis.setPrivate(key, newValue as any);\n\t}\n\n\t// TODO use SelectKeys<this[\"_privateSettings\"], number | undefined>\n\tprotected _max<Key extends keyof this[\"_privateSettings\"]>(key: Key, value: number | undefined) {\n\t\tlet newValue = max(this.getPrivate(key) as any, value);\n\t\tthis.setPrivate(key, newValue as any);\n\t}\n\n\tprotected _shouldMakeBullet(dataItem: DataItem<this[\"_dataItemSettings\"]>): boolean {\n\n\t\tconst xAxis = this.get(\"xAxis\");\n\t\tconst yAxis = this.get(\"yAxis\");\n\t\tconst baseAxis = this.get(\"baseAxis\");\n\n\t\tif (!xAxis.inited || !yAxis.inited) {\n\t\t\treturn false\n\t\t}\n\t\tconst minBulletDistance = this.get(\"minBulletDistance\", 0);\n\t\tif (minBulletDistance > 0) {\n\t\t\tlet startIndex = this.startIndex();\n\t\t\tlet endIndex = this.endIndex();\n\n\t\t\tlet count = endIndex - startIndex;\n\n\t\t\tif (xAxis == baseAxis) {\n\t\t\t\tif (xAxis.get(\"renderer\").axisLength() / count < minBulletDistance / 5) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (yAxis == baseAxis) {\n\t\t\t\tif (yAxis.get(\"renderer\").axisLength() / count < minBulletDistance / 5) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (dataItem.get(this._xField as any) != null && dataItem.get(this._yField as any) != null) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tprotected _makeFieldNames() {\n\t\tconst xAxis = this.get(\"xAxis\");\n\t\tconst yAxis = this.get(\"yAxis\");\n\t\tconst xName = xAxis.getPrivate(\"name\")!;\n\t\tconst xCapName = $utils.capitalizeFirst(xName);\n\n\t\tconst yName = yAxis.getPrivate(\"name\")!;\n\t\tconst yCapName = $utils.capitalizeFirst(yName);\n\n\t\tconst xLetter = xAxis.get(\"renderer\").getPrivate(\"letter\")!\n\t\tconst yLetter = yAxis.get(\"renderer\").getPrivate(\"letter\")!\n\n\t\tconst open = \"open\";\n\t\tconst low = \"low\";\n\t\tconst high = \"high\";\n\t\tconst show = \"Show\";\n\n\t\tif (xAxis.className === \"ValueAxis\") {\n\t\t\tthis._xField = this.get(<any>(xName + xLetter! + show));\n\t\t\tthis._xOpenField = this.get(<any>(open + xCapName + xLetter! + show));\n\t\t\tthis._xLowField = this.get(<any>(low + xCapName + xLetter! + show));\n\t\t\tthis._xHighField = this.get(<any>(high + xCapName + xLetter! + show));\n\t\t}\n\t\telse {\n\t\t\tthis._xField = <any>(xName + xLetter!);\n\t\t\tthis._xOpenField = <any>(open + xCapName + xLetter!);\n\t\t\tthis._xLowField = <any>(low + xCapName + xLetter!);\n\t\t\tthis._xHighField = <any>(high + xCapName + xLetter!);\n\t\t}\n\n\t\tif (yAxis.className === \"ValueAxis\") {\n\t\t\tthis._yField = this.get(<any>(yName + yLetter! + show));\n\t\t\tthis._yOpenField = this.get(<any>(open + yCapName + yLetter! + show));\n\t\t\tthis._yLowField = this.get(<any>(low + yCapName + yLetter! + show));\n\t\t\tthis._yHighField = this.get(<any>(high + yCapName + yLetter! + show));\n\t\t}\n\t\telse {\n\t\t\tthis._yField = <any>(yName + yLetter!);\n\t\t\tthis._yOpenField = <any>(open + yCapName + yLetter!);\n\t\t\tthis._yLowField = <any>(low + yCapName + yLetter!);\n\t\t\tthis._yHighField = <any>(high + yCapName + yLetter!);\n\t\t}\n\t}\n\n\tprotected _fixVC() {\n\t\tconst xAxis = this.get(\"xAxis\");\n\t\tconst yAxis = this.get(\"yAxis\");\n\t\tconst baseAxis = this.get(\"baseAxis\");\n\t\tconst hiddenState = this.states.lookup(\"hidden\");\n\t\tconst sequencedInterpolation = this.get(\"sequencedInterpolation\");\n\n\t\tif (hiddenState) {\n\t\t\tlet value = 0;\n\t\t\tif (sequencedInterpolation) {\n\t\t\t\tvalue = 0.999999999999; // makes animate, good for stacked\n\t\t\t}\n\n\t\t\tif (xAxis === baseAxis) {\n\t\t\t\thiddenState.set(\"vcy\", value);\n\t\t\t}\n\t\t\telse if (yAxis === baseAxis) {\n\t\t\t\thiddenState.set(\"vcx\", value);\n\t\t\t}\n\t\t\telse {\n\t\t\t\thiddenState.set(\"vcy\", value);\n\t\t\t\thiddenState.set(\"vcx\", value);\n\t\t\t}\n\t\t}\n\t}\n\n\n\tprotected _handleMaskBullets() {\n\t\tif (this.isDirty(\"maskBullets\")) {\n\t\t\tthis.bulletsContainer.set(\"maskContent\", this.get(\"maskBullets\"));\n\t\t}\n\t}\n\n\tpublic _fixPosition() {\n\t\tconst xAxis = this.get(\"xAxis\");\n\t\tconst yAxis = this.get(\"yAxis\");\n\n\t\tthis.set(\"x\", xAxis.x() - $utils.relativeToValue(xAxis.get(\"centerX\", 0), xAxis.width()) - xAxis.parent!.get(\"paddingLeft\", 0));\n\t\tthis.set(\"y\", yAxis.y() - $utils.relativeToValue(yAxis.get(\"centerY\", 0), yAxis.height()) - yAxis.parent!.get(\"paddingTop\", 0));\n\n\t\tthis.bulletsContainer.set(\"y\", this.y());\n\t\tthis.bulletsContainer.set(\"x\", this.x());\n\t}\n\n\n\tpublic _prepareChildren() {\n\t\tsuper._prepareChildren();\n\n\t\tthis._bullets = {};\n\n\t\tif (this.isDirty(\"valueYShow\") || this.isDirty(\"valueXShow\") || this.isDirty(\"openValueYShow\") || this.isDirty(\"openValueXShow\") || this.isDirty(\"lowValueYShow\") || this.isDirty(\"lowValueXShow\") || this.isDirty(\"highValueYShow\") || this.isDirty(\"highValueXShow\")) {\n\t\t\tthis._updateFields();\n\t\t\tthis._makeFieldNames();\n\t\t\tthis._valuesDirty = true;\n\t\t}\n\n\t\tif (this.isDirty(\"xAxis\") || this.isDirty(\"yAxis\")) {\n\t\t\tthis._valuesDirty = true;\n\t\t}\n\n\t\tthis.set(\"width\", this.get(\"xAxis\").width());\n\t\tthis.set(\"height\", this.get(\"yAxis\").height());\n\n\t\tthis._handleMaskBullets();\n\n\t\tconst xAxis = this.get(\"xAxis\");\n\t\tconst yAxis = this.get(\"yAxis\");\n\t\tconst baseAxis = this.get(\"baseAxis\");\n\n\t\tconst tooltipPositionX = this.get(\"tooltipPositionX\");\n\t\tlet tooltipFieldX: string;\n\n\t\tswitch (tooltipPositionX) {\n\t\t\tcase \"open\":\n\t\t\t\ttooltipFieldX = this._xOpenField;\n\t\t\t\tbreak;\n\t\t\tcase \"low\":\n\t\t\t\ttooltipFieldX = this._xLowField;\n\t\t\t\tbreak;\n\t\t\tcase \"high\":\n\t\t\t\ttooltipFieldX = this._xHighField;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\ttooltipFieldX = this._xField;\n\t\t}\n\t\tthis._tooltipFieldX = tooltipFieldX;\n\n\t\tconst tooltipPositionY = this.get(\"tooltipPositionY\");\n\t\tlet tooltipFieldY: string;\n\t\tswitch (tooltipPositionY) {\n\t\t\tcase \"open\":\n\t\t\t\ttooltipFieldY = this._yOpenField;\n\t\t\t\tbreak;\n\t\t\tcase \"low\":\n\t\t\t\ttooltipFieldY = this._yLowField;\n\t\t\t\tbreak;\n\t\t\tcase \"high\":\n\t\t\t\ttooltipFieldY = this._yHighField;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\ttooltipFieldY = this._yField;\n\t\t}\n\t\tthis._tooltipFieldY = tooltipFieldY;\n\n\t\tif (this.isDirty(\"baseAxis\")) {\n\t\t\tthis._fixVC();\n\t\t}\n\n\n\t\tthis._fixPosition();\n\n\t\tconst stacked = this.get(\"stacked\");\n\n\t\tif (this.isDirty(\"stacked\")) {\n\t\t\tif (stacked) {\n\t\t\t\tif (this._valuesDirty && !this._dataProcessed) {\n\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthis._stack();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis._unstack();\n\t\t\t}\n\t\t}\n\n\t\tif (this._valuesDirty && !this._dataProcessed) {\n\t\t\tthis._dataProcessed = true;\n\n\t\t\tif (stacked) {\n\t\t\t\tthis._stack();\n\t\t\t}\n\n\t\t\t$array.each(this.dataItems, (dataItem) => {\n\t\t\t\t$array.each(this._valueXShowFields, (key) => {\n\t\t\t\t\tlet value = dataItem.get(<any>key);\n\t\t\t\t\tif (value != null) {\n\t\t\t\t\t\tif (stacked) {\n\t\t\t\t\t\t\tvalue += this.getStackedXValue(dataItem, key);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthis._min(\"minX\", value);\n\t\t\t\t\t\tthis._max(\"maxX\", value);\n\t\t\t\t\t}\n\t\t\t\t})\n\n\t\t\t\t$array.each(this._valueYShowFields, (key) => {\n\t\t\t\t\tlet value = dataItem.get(<any>key);\n\t\t\t\t\tif (value != null) {\n\t\t\t\t\t\tif (stacked) {\n\t\t\t\t\t\t\tvalue += this.getStackedYValue(dataItem, key);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthis._min(\"minY\", value);\n\t\t\t\t\t\tthis._max(\"maxY\", value);\n\t\t\t\t\t}\n\t\t\t\t})\n\n\t\t\t\txAxis.processSeriesDataItem(dataItem, this._valueXFields);\n\t\t\t\tyAxis.processSeriesDataItem(dataItem, this._valueYFields);\n\t\t\t})\n\n\t\t\txAxis._seriesValuesDirty = true;\n\t\t\tyAxis._seriesValuesDirty = true;\n\n\t\t\tif (!this.get(\"ignoreMinMax\")) {\n\t\t\t\tif (this.isPrivateDirty(\"minX\") || this.isPrivateDirty(\"maxX\")) {\n\t\t\t\t\txAxis.markDirtyExtremes();\n\t\t\t\t}\n\t\t\t\tif (this.isPrivateDirty(\"minY\") || this.isPrivateDirty(\"maxY\")) {\n\t\t\t\t\tyAxis.markDirtyExtremes();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis._markStakedDirtyStack();\n\n\t\t\t//this.updateLegendMarker(undefined); // causes legend marker to change color instantly when on\n\t\t\tif (!this.get(\"tooltipDataItem\")) {\n\t\t\t\tthis.updateLegendValue(undefined);\n\t\t\t}\n\t\t}\n\n\t\tif (this.isDirty(\"vcx\") || this.isDirty(\"vcy\")) {\n\t\t\tthis._markStakedDirtyStack();\n\t\t}\n\n\t\tif (!this._dataGrouped) {\n\t\t\txAxis._groupSeriesData(this);\n\t\t\tyAxis._groupSeriesData(this);\n\t\t\tthis._dataGrouped = true;\n\t\t}\n\n\t\tif (this._valuesDirty || this.isPrivateDirty(\"startIndex\") || this.isPrivateDirty(\"adjustedStartIndex\") || this.isPrivateDirty(\"endIndex\") || this.isDirty(\"vcx\") || this.isDirty(\"vcy\") || this._stackDirty || this._sizeDirty) {\n\t\t\tlet startIndex = this.startIndex();\n\t\t\tlet endIndex = this.endIndex();\n\t\t\tlet minBulletDistance = this.get(\"minBulletDistance\", 0);\n\t\t\tif (minBulletDistance > 0 && baseAxis) {\n\t\t\t\tif (baseAxis.get(\"renderer\").axisLength() / (endIndex - startIndex) > minBulletDistance) {\n\t\t\t\t\tthis._showBullets = true;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthis._showBullets = false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ((this._psi != startIndex || this._pei != endIndex || this.isDirty(\"vcx\") || this.isDirty(\"vcy\") || this.isPrivateDirty(\"adjustedStartIndex\") || this._stackDirty || this._valuesDirty) && !this._selectionProcessed) {\n\t\t\t\tthis._selectionProcessed = true;\n\n\t\t\t\tconst vcx = this.get(\"vcx\", 1);\n\t\t\t\tconst vcy = this.get(\"vcy\", 1);\n\t\t\t\tconst stacked = this.get(\"stacked\", false);\n\t\t\t\tconst outOfSelection = this.getPrivate(\"outOfSelection\");\n\n\t\t\t\tif (baseAxis === xAxis || !baseAxis) {\n\t\t\t\t\tyAxis._calculateTotals();\n\t\t\t\t\tthis.setPrivateRaw(\"selectionMinY\", undefined);\n\t\t\t\t\tthis.setPrivateRaw(\"selectionMaxY\", undefined);\n\t\t\t\t\tif (!outOfSelection) {\n\t\t\t\t\t\tfor (let i = startIndex; i < endIndex; i++) {\n\t\t\t\t\t\t\tthis.processYSelectionDataItem(this.dataItems[i], vcy, stacked);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tyAxis.markDirtySelectionExtremes();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (baseAxis === yAxis || !baseAxis) {\n\t\t\t\t\txAxis._calculateTotals();\n\t\t\t\t\tthis.setPrivateRaw(\"selectionMinX\", undefined);\n\t\t\t\t\tthis.setPrivateRaw(\"selectionMaxX\", undefined);\n\t\t\t\t\tif (!outOfSelection) {\n\t\t\t\t\t\tfor (let i = startIndex; i < endIndex; i++) {\n\t\t\t\t\t\t\tthis.processXSelectionDataItem(this.dataItems[i], vcx, stacked);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tyAxis.markDirtySelectionExtremes();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (baseAxis === xAxis || !baseAxis) {\n\t\t\t\t\tif (this.get(\"valueYShow\") !== \"valueYWorking\") {\n\t\t\t\t\t\tconst selectionMinY = this.getPrivate(\"selectionMinY\");\n\t\t\t\t\t\tif (selectionMinY != null) {\n\t\t\t\t\t\t\tthis.setPrivateRaw(\"minY\", selectionMinY);\n\t\t\t\t\t\t\tyAxis.markDirtyExtremes();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst selectionMaxY = this.getPrivate(\"selectionMaxY\");\n\t\t\t\t\t\tif (selectionMaxY != null) {\n\t\t\t\t\t\t\tthis.setPrivateRaw(\"maxY\", selectionMaxY);\n\t\t\t\t\t\t\tyAxis.markDirtyExtremes();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (baseAxis === yAxis || !baseAxis) {\n\t\t\t\t\tif (this.get(\"valueXShow\") !== \"valueXWorking\") {\n\t\t\t\t\t\tconst selectionMinX = this.getPrivate(\"selectionMinX\");\n\t\t\t\t\t\tif (selectionMinX != null) {\n\t\t\t\t\t\t\tthis.setPrivateRaw(\"minX\", selectionMinX);\n\t\t\t\t\t\t\tyAxis.markDirtyExtremes();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst selectionMaxX = this.getPrivate(\"selectionMaxX\")\n\t\t\t\t\t\tif (selectionMaxX != null) {\n\t\t\t\t\t\t\tthis.setPrivateRaw(\"maxX\", selectionMaxX);\n\t\t\t\t\t\t\txAxis.markDirtyExtremes();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (this.isPrivateDirty(\"selectionMinX\") || this.isPrivateDirty(\"selectionMaxX\")) {\n\t\t\t\t\txAxis.markDirtySelectionExtremes();\n\t\t\t\t}\n\n\t\t\t\tif (this.isPrivateDirty(\"selectionMinY\") || this.isPrivateDirty(\"selectionMaxY\")) {\n\t\t\t\t\tyAxis.markDirtySelectionExtremes();\n\t\t\t\t}\n\t\t\t\t// this.updateLegendValue(undefined); flickers while panning\n\t\t\t}\n\t\t}\n\t}\n\n\n\tprotected _makeRangeMask() {\n\t\tif (this.axisRanges.length > 0) {\n\t\t\tlet mainContainerMask = this._mainContainerMask;\n\t\t\tif (mainContainerMask == null) {\n\t\t\t\tmainContainerMask = this.children.push(Graphics.new(this._root, {}));\n\t\t\t\tthis._mainContainerMask = mainContainerMask;\n\n\t\t\t\tmainContainerMask.set(\"draw\", (display, target) => {\n\t\t\t\t\tconst parent = this.parent;\n\t\t\t\t\tif (parent) {\n\t\t\t\t\t\tconst w = this._root.container.width();\n\t\t\t\t\t\tconst h = this._root.container.height();\n\t\t\t\t\t\tdisplay.moveTo(-w, -h);\n\t\t\t\t\t\tdisplay.lineTo(-w, h * 2);\n\t\t\t\t\t\tdisplay.lineTo(w * 2, h * 2);\n\t\t\t\t\t\tdisplay.lineTo(w * 2, -h);\n\t\t\t\t\t\tdisplay.lineTo(-w, -h);\n\n\n\t\t\t\t\t\tthis.axisRanges.each((axisRange) => {\n\t\t\t\t\t\t\tconst fill = axisRange.axisDataItem.get(\"axisFill\");\n\n\t\t\t\t\t\t\tif (parent) {\n\t\t\t\t\t\t\t\tif (fill) {\n\t\t\t\t\t\t\t\t\tlet draw = fill.get(\"draw\");\n\t\t\t\t\t\t\t\t\tif (draw) {\n\t\t\t\t\t\t\t\t\t\tdraw(display, target);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t\tthis.mainContainer._display.mask = mainContainerMask!._display;\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tmainContainerMask.markDirty();\n\t\t\tmainContainerMask._markDirtyKey(\"fill\");\n\t\t}\n\t\telse {\n\t\t\tthis.mainContainer._display.mask = null;\n\t\t}\n\t}\n\n\n\tpublic _updateChildren() {\n\t\tsuper._updateChildren();\n\n\t\t// save for performance\n\t\tthis._x = this.x();\n\t\tthis._y = this.y();\n\t\tthis._makeRangeMask();\n\t}\n\n\tprotected _stack() {\n\t\tconst chart = this.chart;\n\t\tif (chart) {\n\t\t\tconst seriesIndex = chart.series.indexOf(this);\n\n\t\t\tthis._couldStackTo = [];\n\n\t\t\tif (seriesIndex > 0) {\n\t\t\t\tlet series: XYSeries;\n\n\t\t\t\tfor (let i = seriesIndex - 1; i >= 0; i--) {\n\t\t\t\t\tseries = chart.series.getIndex(i)!;\n\t\t\t\t\tif (series.get(\"xAxis\") === this.get(\"xAxis\") && series.get(\"yAxis\") === this.get(\"yAxis\") && series.className === this.className) {\n\t\t\t\t\t\tthis._couldStackTo.push(series);\n\t\t\t\t\t\tif (!series.get(\"stacked\")) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis._stackDataItems();\n\t\t}\n\t}\n\n\tpublic _unstack() {\n\n\t\t$object.each(this._reallyStackedTo, (_key, value) => {\n\t\t\tdelete (value._stackedSeries[this.uid]);\n\t\t})\n\n\t\tthis._reallyStackedTo = {};\n\t\t$array.each(this.dataItems, (dataItem) => {\n\t\t\tdataItem.setRaw(\"stackToItemY\", undefined);\n\t\t\tdataItem.setRaw(\"stackToItemX\", undefined);\n\t\t})\n\t}\n\n\tprotected _stackDataItems() {\n\t\t// this works only with the same number of data @todo: search by date/category?\n\t\tconst baseAxis = this.get(\"baseAxis\");\n\t\tconst xAxis = this.get(\"xAxis\");\n\t\tconst yAxis = this.get(\"yAxis\");\n\n\t\tlet field: \"valueX\" | \"valueY\";\n\t\tlet stackToItemKey: \"stackToItemX\" | \"stackToItemY\";\n\t\tif (baseAxis === xAxis) {\n\t\t\tfield = \"valueY\";\n\t\t\tstackToItemKey = \"stackToItemY\";\n\t\t}\n\t\telse if (baseAxis === yAxis) {\n\t\t\tfield = \"valueX\";\n\t\t\tstackToItemKey = \"stackToItemX\";\n\t\t}\n\n\t\tlet len = this._couldStackTo.length;\n\t\tlet index = 0;\n\t\tconst stackToNegative = this.get(\"stackToNegative\");\n\n\t\tthis._reallyStackedTo = {};\n\n\t\t$array.each(this.dataItems, (dataItem) => {\n\t\t\tfor (let s = 0; s < len; s++) {\n\t\t\t\tlet stackToSeries = this._couldStackTo[s];\n\t\t\t\tlet stackToItem = stackToSeries.dataItems[index];\n\t\t\t\tlet value = dataItem.get(field);\n\n\t\t\t\tif (stackToItem) {\n\t\t\t\t\tlet stackValue = stackToItem.get(field);\n\t\t\t\t\tif (stackToNegative) {\n\t\t\t\t\t\tif ($type.isNumber(value)) {\n\t\t\t\t\t\t\tif ($type.isNumber(stackValue)) {\n\t\t\t\t\t\t\t\tif (value >= 0 && stackValue >= 0) {\n\t\t\t\t\t\t\t\t\tdataItem.setRaw(stackToItemKey, stackToItem);\n\t\t\t\t\t\t\t\t\tthis._reallyStackedTo[stackToSeries.uid] = stackToSeries;\n\t\t\t\t\t\t\t\t\tstackToSeries._stackedSeries[this.uid] = this;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (value < 0 && stackValue < 0) {\n\t\t\t\t\t\t\t\t\tdataItem.setRaw(stackToItemKey, stackToItem);\n\t\t\t\t\t\t\t\t\tthis._reallyStackedTo[stackToSeries.uid] = stackToSeries;\n\t\t\t\t\t\t\t\t\tstackToSeries._stackedSeries[this.uid] = this;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif ($type.isNumber(value) && $type.isNumber(stackValue)) {\n\t\t\t\t\t\t\tdataItem.setRaw(stackToItemKey, stackToItem);\n\t\t\t\t\t\t\tthis._reallyStackedTo[stackToSeries.uid] = stackToSeries;\n\t\t\t\t\t\t\tstackToSeries._stackedSeries[this.uid] = this;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tindex++;\n\t\t})\n\t}\n\n\tprotected processXSelectionDataItem(dataItem: DataItem<this[\"_dataItemSettings\"]>, vcx: number, stacked: boolean) {\n\t\t$array.each(this.__valueXShowFields, (key) => {\n\t\t\tlet value = dataItem.get(<any>key);\n\t\t\tif (value != null) {\n\t\t\t\tif (stacked) {\n\t\t\t\t\tvalue += this.getStackedXValueWorking(dataItem, key);\n\t\t\t\t}\n\n\t\t\t\tthis._min(\"selectionMinX\", value);\n\t\t\t\tthis._max(\"selectionMaxX\", value * vcx);\n\t\t\t}\n\t\t})\n\t}\n\n\tprotected processYSelectionDataItem(dataItem: DataItem<this[\"_dataItemSettings\"]>, vcy: number, stacked: boolean) {\n\t\t$array.each(this.__valueYShowFields, (key) => {\n\n\t\t\tlet value = dataItem.get(<any>key);\n\t\t\tif (value != null) {\n\t\t\t\tif (stacked) {\n\t\t\t\t\tvalue += this.getStackedYValueWorking(dataItem, key);\n\t\t\t\t}\n\n\t\t\t\tthis._min(\"selectionMinY\", value);\n\t\t\t\tthis._max(\"selectionMaxY\", value * vcy);\n\t\t\t}\n\t\t})\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic getStackedYValueWorking(dataItem: DataItem<IXYSeriesDataItem>, key: string): number {\n\t\tconst stackToItem = dataItem.get(\"stackToItemY\");\n\n\t\tif (stackToItem) {\n\t\t\tconst stackedToSeries = stackToItem.component as XYSeries;\n\n\t\t\treturn stackToItem.get(key as any, 0) * stackedToSeries.get(\"vcy\", 1) + this.getStackedYValueWorking(stackToItem, key);\n\t\t}\n\t\treturn 0;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic getStackedXValueWorking(dataItem: DataItem<IXYSeriesDataItem>, key: string): number {\n\t\tconst stackToItem = dataItem.get(\"stackToItemX\");\n\n\t\tif (stackToItem) {\n\t\t\tconst stackedToSeries = stackToItem.component as XYSeries;\n\t\t\treturn stackToItem.get(key as any, 0) * stackedToSeries.get(\"vcx\", 1) + this.getStackedXValueWorking(stackToItem, key);\n\t\t}\n\t\treturn 0;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic getStackedYValue(dataItem: DataItem<IXYSeriesDataItem>, key: string): number {\n\t\tconst stackToItem = dataItem.get(\"stackToItemY\");\n\n\t\tif (stackToItem) {\n\t\t\treturn stackToItem.get(key as any, 0) + this.getStackedYValue(stackToItem, key);\n\t\t}\n\t\treturn 0;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic getStackedXValue(dataItem: DataItem<IXYSeriesDataItem>, key: string): number {\n\t\tconst stackToItem = dataItem.get(\"stackToItemX\");\n\n\t\tif (stackToItem) {\n\t\t\treturn stackToItem.get(key as any, 0) + this.getStackedXValue(stackToItem, key);\n\t\t}\n\t\treturn 0;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic createLegendMarker(_dataItem?: DataItem<this[\"_dataItemSettings\"]>) {\n\t\tthis.updateLegendMarker();\n\t}\n\n\tpublic _markDirtyAxes() {\n\t\tthis._axesDirty = true;\n\t\tthis.markDirty();\n\t}\n\n\tpublic _markDataSetDirty() {\n\t\tthis._afterDataChange();\n\t\tthis._valuesDirty = true;\n\t\tthis._dataProcessed = false;\n\t\tthis._aggregatesCalculated = false;\n\t\tthis.markDirty();\n\t}\n\n\tpublic _clearDirty() {\n\t\tsuper._clearDirty();\n\t\tthis._axesDirty = false;\n\t\tthis._selectionProcessed = false;\n\t\tthis._stackDirty = false;\n\t\tthis._dataProcessed = false;\n\t}\n\n\tpublic _positionBullet(bullet: Bullet) {\n\t\tlet sprite = bullet.get(\"sprite\");\n\t\tif (sprite) {\n\t\t\tlet dataItem = sprite.dataItem as DataItem<this[\"_dataItemSettings\"]>;\n\n\t\t\tlet locationX = bullet.get(\"locationX\", dataItem.get(\"locationX\", 0.5));\n\t\t\tlet locationY = bullet.get(\"locationY\", dataItem.get(\"locationY\", 0.5));\n\n\t\t\tlet xAxis = this.get(\"xAxis\");\n\t\t\tlet yAxis = this.get(\"yAxis\");\n\n\t\t\tlet positionX = xAxis.getDataItemPositionX(dataItem, this._xField, locationX, this.get(\"vcx\", 1));\n\t\t\tlet positionY = yAxis.getDataItemPositionY(dataItem, this._yField, locationY, this.get(\"vcy\", 1))\n\n\t\t\tlet point = this.getPoint(positionX, positionY);\n\n\t\t\tlet left = dataItem.get(\"left\", point.x);\n\t\t\tlet right = dataItem.get(\"right\", point.x);\n\t\t\tlet top = dataItem.get(\"top\", point.y);\n\t\t\tlet bottom = dataItem.get(\"bottom\", point.y);\n\n\t\t\tlet x = 0;\n\t\t\tlet y = 0;\n\n\t\t\tlet w = right - left;\n\t\t\tlet h = bottom - top;\n\n\t\t\tif (this._shouldShowBullet(positionX, positionY)) {\n\t\t\t\tsprite.setPrivate(\"visible\", !bullet.getPrivate(\"hidden\"));\n\n\t\t\t\tlet field = bullet.get(\"field\");\n\n\t\t\t\tconst baseAxis = this.get(\"baseAxis\");\n\t\t\t\tconst xAxis = this.get(\"xAxis\");\n\t\t\t\tconst yAxis = this.get(\"yAxis\");\n\n\t\t\t\tif (field != undefined) {\n\t\t\t\t\tlet realField: string | undefined;\n\n\t\t\t\t\tif (baseAxis == xAxis) {\n\t\t\t\t\t\tif (field == \"value\") {\n\t\t\t\t\t\t\trealField = this._yField;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (field == \"open\") {\n\t\t\t\t\t\t\trealField = this._yOpenField;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (field == \"high\") {\n\t\t\t\t\t\t\trealField = this._yHighField;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (field == \"low\") {\n\t\t\t\t\t\t\trealField = this._yLowField;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (realField) {\n\t\t\t\t\t\t\tpositionY = yAxis.getDataItemPositionY(dataItem, realField as any, 0, this.get(\"vcy\", 1))\n\n\t\t\t\t\t\t\tpoint = yAxis.get(\"renderer\").positionToPoint(positionY);\n\n\t\t\t\t\t\t\ty = point.y;\n\t\t\t\t\t\t\tx = left + w * locationX;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (field == \"value\") {\n\t\t\t\t\t\t\trealField = this._xField;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (field == \"open\") {\n\t\t\t\t\t\t\trealField = this._xOpenField;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (field == \"high\") {\n\t\t\t\t\t\t\trealField = this._xHighField;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (field == \"low\") {\n\t\t\t\t\t\t\trealField = this._xLowField;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (realField) {\n\t\t\t\t\t\t\tpositionX = xAxis.getDataItemPositionX(dataItem, realField as any, 0, this.get(\"vcx\", 1));\n\n\t\t\t\t\t\t\tpoint = xAxis.get(\"renderer\").positionToPoint(positionX);\n\n\t\t\t\t\t\t\tx = point.x;\n\t\t\t\t\t\t\ty = bottom - h * locationY;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tx = left + w * locationX;\n\t\t\t\t\ty = bottom - h * locationY;\n\t\t\t\t}\n\n\t\t\t\tconst stacked = bullet.get(\"stacked\");\n\t\t\t\tif (stacked) {\n\t\t\t\t\tconst chart = this.chart;\n\t\t\t\t\tif (baseAxis == xAxis) {\n\t\t\t\t\t\tlet previousBullet = this._bullets[positionX + \"_\" + positionY];\n\t\t\t\t\t\tif (previousBullet) {\n\t\t\t\t\t\t\tlet previousBounds = previousBullet.bounds();\n\t\t\t\t\t\t\tlet bounds = sprite.localBounds();\n\t\t\t\t\t\t\tlet yo = y;\n\t\t\t\t\t\t\ty = previousBounds.top;\n\n\t\t\t\t\t\t\tif (stacked == \"down\") {\n\t\t\t\t\t\t\t\ty = previousBounds.bottom - bounds.top;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if (stacked == \"auto\") {\n\t\t\t\t\t\t\t\tif (chart) {\n\t\t\t\t\t\t\t\t\tif (yo < chart.plotContainer.height() / 2) {\n\t\t\t\t\t\t\t\t\t\ty = previousBounds.bottom - bounds.top;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\ty += bounds.bottom;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\ty += bounds.bottom;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis._bullets[positionX + \"_\" + positionY] = sprite;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tlet previousBullet = this._bullets[positionX + \"_\" + positionY];\n\t\t\t\t\t\tif (previousBullet) {\n\t\t\t\t\t\t\tlet previousBounds = previousBullet.bounds();\n\t\t\t\t\t\t\tlet bounds = sprite.localBounds();\n\t\t\t\t\t\t\tlet xo = x;\n\t\t\t\t\t\t\tx = previousBounds.right;\n\n\t\t\t\t\t\t\tif (stacked == \"down\") {\n\t\t\t\t\t\t\t\tx = previousBounds.left - bounds.right;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if (stacked == \"auto\") {\n\t\t\t\t\t\t\t\tif (chart) {\n\t\t\t\t\t\t\t\t\tif (xo < chart.plotContainer.width() / 2) {\n\t\t\t\t\t\t\t\t\t\tx = previousBounds.left - bounds.right;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\tx -= bounds.left;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tx -= bounds.left;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthis._bullets[positionX + \"_\" + positionY] = sprite;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (sprite.isType(\"Label\")) {\n\t\t\t\t\tsprite.setPrivate(\"maxWidth\", Math.abs(w));\n\t\t\t\t\tsprite.setPrivate(\"maxHeight\", Math.abs(h));\n\t\t\t\t}\n\n\t\t\t\tsprite.setAll({ x, y });\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsprite.setPrivate(\"visible\", false);\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected _shouldShowBullet(_positionX: number, _positionY: number): boolean {\n\t\treturn this._showBullets;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic setDataSet(id: string) {\n\t\tif (this._dataSets[id]) {\n\t\t\tthis._handleDataSetChange();\n\t\t\tthis._dataItems = this._dataSets[id];\n\t\t\tthis._markDataSetDirty();\n\t\t\tthis._dataSetId = id;\n\n\t\t\tconst type = \"datasetchanged\";\n\t\t\tif (this.events.isEnabled(type)) {\n\t\t\t\tthis.events.dispatch(type, { type: type, target: this, id: id });\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic resetGrouping() {\n\t\t$object.each(this._dataSets, (_key, dataSet) => {\n\t\t\tif (dataSet != this._mainDataItems) {\n\t\t\t\t$array.each(dataSet, (dataItem) => {\n\t\t\t\t\tthis.disposeDataItem(dataItem);\n\t\t\t\t})\n\t\t\t}\n\t\t})\n\t\tthis._dataSets = {};\n\t\tthis._dataItems = this.mainDataItems;\n\t}\n\n\tprotected _handleDataSetChange() {\n\t\t$array.each(this._dataItems, (dataItem) => {\n\t\t\tlet bullets = dataItem.bullets;\n\t\t\tif (bullets) {\n\t\t\t\t$array.each(bullets, (bullet) => {\n\t\t\t\t\tif (bullet) {\n\t\t\t\t\t\tlet sprite = bullet.get(\"sprite\");\n\t\t\t\t\t\tif (sprite) {\n\t\t\t\t\t\t\tsprite.setPrivate(\"visible\", false);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\t\t})\n\n\t\tthis._selectionProcessed = false; // for totals to be calculated\n\t}\n\n\t/**\n\t * Shows hidden series.\n\t *\n\t * @param duration Duration of animation in milliseconds\n\t * @return Animation promise\n\t */\n\tpublic async show(duration?: number): Promise<void> {\n\t\tthis._fixVC();\n\t\tlet promises: Array<Promise<any>> = [];\n\t\tpromises.push(super.show(duration).then(() => {\n\t\t\tthis._isShowing = false;\n\t\t\tlet xAxis = this.get(\"xAxis\");\n\t\t\tlet yAxis = this.get(\"yAxis\");\n\t\t\tlet baseAxis = this.get(\"baseAxis\");\n\t\t\tif (yAxis !== baseAxis) {\n\t\t\t\tyAxis.markDirtySelectionExtremes();\n\t\t\t}\n\t\t\tif (xAxis !== baseAxis) {\n\t\t\t\txAxis.markDirtySelectionExtremes();\n\t\t\t}\n\t\t}));\n\t\tpromises.push(this.bulletsContainer.show(duration));\n\t\tpromises.push(this._sequencedShowHide(true, duration));\n\t\tawait Promise.all(promises);\n\t}\n\n\t/**\n\t * Hides series.\n\t *\n\t * @param duration Duration of animation in milliseconds\n\t * @return Animation promise\n\t */\n\tpublic async hide(duration?: number): Promise<void> {\n\t\tthis._fixVC();\n\t\tlet promises: Promise<any>[] = [];\n\t\tpromises.push(super.hide(duration).then(() => {\n\t\t\tthis._isHiding = false;\n\t\t}));\n\t\tpromises.push(this.bulletsContainer.hide(duration));\n\t\tpromises.push(this._sequencedShowHide(false, duration));\n\t\tawait Promise.all(promises);\n\t}\n\n\t/**\n\t * Shows series's data item.\n\t *\n\t * @param dataItem Data item\n\t * @param duration Animation duration in milliseconds\n\t * @return Promise\n\t */\n\tpublic async showDataItem(dataItem: DataItem<this[\"_dataItemSettings\"]>, duration?: number): Promise<void> {\n\t\tconst promises = [super.showDataItem(dataItem, duration)];\n\n\t\tif (!$type.isNumber(duration)) {\n\t\t\tduration = this.get(\"stateAnimationDuration\", 0);\n\t\t}\n\n\t\tconst easing = this.get(\"stateAnimationEasing\");\n\n\t\t$array.each(this._valueFields, (key) => {\n\t\t\tpromises.push(dataItem.animate({ key: key + \"Working\" as any, to: dataItem.get(key as any), duration: duration!, easing: easing }).waitForStop());\n\t\t})\n\n\t\tawait Promise.all(promises);\n\t}\n\n\t/**\n\t * Hides series's data item.\n\t *\n\t * @param dataItem Data item\n\t * @param duration Animation duration in milliseconds\n\t * @return Promise\n\t */\n\tpublic async hideDataItem(dataItem: DataItem<this[\"_dataItemSettings\"]>, duration?: number): Promise<void> {\n\t\tconst promises = [super.hideDataItem(dataItem, duration)];\n\n\t\tconst hiddenState = this.states.create(\"hidden\", {})\n\n\t\tif (!$type.isNumber(duration)) {\n\t\t\tduration = hiddenState.get(\"stateAnimationDuration\", this.get(\"stateAnimationDuration\", 0));\n\t\t}\n\n\t\tconst easing = hiddenState.get(\"stateAnimationEasing\", this.get(\"stateAnimationEasing\"));\n\n\t\tconst xAxis = this.get(\"xAxis\");\n\t\tconst yAxis = this.get(\"yAxis\");\n\t\tconst baseAxis = this.get(\"baseAxis\");\n\t\tconst stacked = this.get(\"stacked\");\n\n\t\tif (baseAxis === xAxis || !baseAxis) {\n\n\t\t\t$array.each(this._valueYFields, (key) => {\n\t\t\t\tlet min = yAxis.getPrivate(\"min\");\n\t\t\t\tlet baseValue = yAxis.baseValue();\n\n\t\t\t\tif ($type.isNumber(min) && min > baseValue) {\n\t\t\t\t\tbaseValue = min;\n\t\t\t\t}\n\t\t\t\tif (stacked) {\n\t\t\t\t\tbaseValue = 0;\n\t\t\t\t}\n\n\t\t\t\tlet value = dataItem.get(key as any);\n\t\t\t\tif (value != null) {\n\t\t\t\t\tpromises.push(dataItem.animate({ key: key + \"Working\" as any, to: baseValue, duration: duration!, easing: easing }).waitForStop());\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\t\tif (baseAxis === yAxis || !baseAxis) {\n\n\t\t\tlet min = xAxis.getPrivate(\"min\");\n\t\t\tlet baseValue = xAxis.baseValue();\n\t\t\tif ($type.isNumber(min) && min > baseValue) {\n\t\t\t\tbaseValue = min;\n\t\t\t}\n\t\t\tif (stacked) {\n\t\t\t\tbaseValue = 0;\n\t\t\t}\n\n\t\t\t$array.each(this._valueXFields, (key) => {\n\t\t\t\tlet value = dataItem.get(key as any);\n\t\t\t\tif (value != null) {\n\t\t\t\t\tpromises.push(dataItem.animate({ key: key + \"Working\" as any, to: baseValue, duration: duration!, easing: easing }).waitForStop());\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\n\t\tawait Promise.all(promises);\n\t}\n\n\tpublic _markDirtyStack() {\n\t\tthis._stackDirty = true;\n\t\tthis.markDirty();\n\t\tthis._markStakedDirtyStack();\n\t}\n\n\tprotected _markStakedDirtyStack() {\n\t\tconst stackedSeries = this._stackedSeries;\n\t\tif (stackedSeries) {\n\n\t\t\t$object.each(stackedSeries, (_key, value) => {\n\t\t\t\tif (!value._stackDirty) {\n\t\t\t\t\tvalue._markDirtyStack();\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\t}\n\n\tpublic _afterChanged() {\n\t\tsuper._afterChanged();\n\t\tif (this._skipped) {\n\t\t\tthis._markDirtyAxes();\n\t\t\tthis._skipped = false;\n\t\t}\n\t}\n\n\t/**\n\t * Shows a tooltip for specific data item.\n\t *\n\t * @param dataItem Data item\n\t */\n\tpublic showDataItemTooltip(dataItem: DataItem<this[\"_dataItemSettings\"]> | undefined) {\n\t\tif (!this.getPrivate(\"doNotUpdateLegend\")) {\n\t\t\tthis.updateLegendMarker(dataItem);\n\t\t\tthis.updateLegendValue(dataItem);\n\t\t}\n\n\t\tconst tooltip = this.get(\"tooltip\");\n\n\t\tif (tooltip) {\n\t\t\tif (!this.isHidden() && this.get(\"visible\")) {\n\t\t\t\ttooltip._setDataItem(dataItem);\n\n\t\t\t\tif (dataItem) {\n\t\t\t\t\tlet locationX = this.get(\"locationX\", 0);\n\t\t\t\t\tlet locationY = this.get(\"locationY\", 1);\n\n\t\t\t\t\tlet itemLocationX = dataItem.get(\"locationX\", locationX);\n\t\t\t\t\tlet itemLocationY = dataItem.get(\"locationY\", locationY);\n\n\t\t\t\t\tconst xAxis = this.get(\"xAxis\");\n\t\t\t\t\tconst yAxis = this.get(\"yAxis\");\n\n\t\t\t\t\tconst vcx = this.get(\"vcx\", 1);\n\t\t\t\t\tconst vcy = this.get(\"vcy\", 1);\n\n\t\t\t\t\tconst xPos = xAxis.getDataItemPositionX(dataItem, this._tooltipFieldX!, this._aLocationX0 + (this._aLocationX1 - this._aLocationX0) * itemLocationX, vcx);\n\t\t\t\t\tconst yPos = yAxis.getDataItemPositionY(dataItem, this._tooltipFieldY!, this._aLocationY0 + (this._aLocationY1 - this._aLocationY0) * itemLocationY, vcy);\n\n\t\t\t\t\tconst point = this.getPoint(xPos, yPos);\n\n\t\t\t\t\tlet show = true;\n\t\t\t\t\t$array.each(this._valueFields, (field) => {\n\t\t\t\t\t\tif (dataItem.get(field as any) == null) {\n\t\t\t\t\t\t\tshow = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\n\t\t\t\t\tif (show) {\n\t\t\t\t\t\tconst chart = this.chart;\n\t\t\t\t\t\tif (chart && chart.inPlot(point)) {\n\t\t\t\t\t\t\ttooltip.label.text.markDirtyText();\n\t\t\t\t\t\t\ttooltip.set(\"tooltipTarget\", this._getTooltipTarget(dataItem));\n\t\t\t\t\t\t\ttooltip.set(\"pointTo\", this._display.toGlobal({ x: point.x, y: point.y }));\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\ttooltip._setDataItem(undefined);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\ttooltip._setDataItem(undefined);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.hideTooltip();\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic hideTooltip(): Promise<void> | undefined {\n\t\tconst tooltip = this.get(\"tooltip\");\n\t\tif (tooltip) {\n\t\t\ttooltip.set(\"tooltipTarget\", this);\n\t\t}\n\t\treturn super.hideTooltip();\n\t}\n\n\tprotected _getTooltipTarget(dataItem: DataItem<this[\"_dataItemSettings\"]>): Sprite {\n\t\tif (this.get(\"seriesTooltipTarget\") == \"bullet\") {\n\t\t\tconst bullets = dataItem.bullets;\n\t\t\tif (bullets && bullets.length > 0) {\n\t\t\t\tconst bullet = bullets[0];\n\t\t\t\tconst sprite = bullet.get(\"sprite\");\n\t\t\t\tif (sprite) {\n\t\t\t\t\treturn sprite;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn this;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateLegendValue(dataItem?: DataItem<this[\"_dataItemSettings\"]> | undefined) {\n\t\tconst legendDataItem = this.get(\"legendDataItem\");\n\n\t\tif (legendDataItem) {\n\n\t\t\tconst label = legendDataItem.get(\"label\");\n\t\t\tif (label) {\n\t\t\t\tlet txt = \"\";\n\t\t\t\tif (dataItem) {\n\t\t\t\t\tlabel._setDataItem(dataItem);\n\t\t\t\t\ttxt = this.get(\"legendLabelText\", label.get(\"text\", this.get(\"name\", \"\")));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tlabel._setDataItem(this._emptyDataItem);\n\t\t\t\t\ttxt = this.get(\"legendRangeLabelText\", this.get(\"legendLabelText\", label.get(\"text\", this.get(\"name\", \"\"))));\n\t\t\t\t}\n\n\t\t\t\tlabel.set(\"text\", txt);\n\t\t\t}\n\n\t\t\tconst valueLabel = legendDataItem.get(\"valueLabel\");\n\t\t\tif (valueLabel) {\n\t\t\t\tlet txt = \"\";\n\t\t\t\tif (dataItem) {\n\t\t\t\t\tvalueLabel._setDataItem(dataItem);\n\t\t\t\t\ttxt = this.get(\"legendValueText\", valueLabel.get(\"text\", \"\"));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tvalueLabel._setDataItem(this._emptyDataItem);\n\t\t\t\t\ttxt = this.get(\"legendRangeValueText\", valueLabel.get(\"text\", \"\"));\n\t\t\t\t}\n\n\t\t\t\tvalueLabel.set(\"text\", txt);\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected _getItemReaderLabel(): string {\n\t\tlet text = \"X: {\" + this._xField;\n\t\tif (this.get(\"xAxis\").isType<DateAxis<any>>(\"DateAxis\")) {\n\t\t\ttext += \".formatDate()\";\n\t\t}\n\t\ttext += \"}; Y: {\" + this._yField;\n\t\tif (this.get(\"yAxis\").isType<DateAxis<any>>(\"DateAxis\")) {\n\t\t\ttext += \".formatDate()\";\n\t\t}\n\t\ttext += \"}\";\n\t\treturn text;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic getPoint(positionX: number, positionY: number): IPoint {\n\t\tlet x = this.get(\"xAxis\").get(\"renderer\").positionToCoordinate(positionX);\n\t\tlet y = this.get(\"yAxis\").get(\"renderer\").positionToCoordinate(positionY);\n\n\t\t// if coordinate is super big, canvas fails to draw line, capping to some big number (won't make any visual difference)\n\t\tlet max = 999999999;\n\t\tif (y < -max) {\n\t\t\ty = -max;\n\t\t}\n\t\tif (y > max) {\n\t\t\ty = max;\n\t\t}\n\n\t\tif (x < -max) {\n\t\t\tx = -max;\n\t\t}\n\t\tif (x > max) {\n\t\t\tx = max;\n\t\t}\n\n\t\treturn { x: x, y: y };\n\t}\n\n\tprotected _shouldInclude(_position: number): boolean {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic handleCursorHide() {\n\t\tthis.hideTooltip();\n\t\tthis.updateLegendValue(undefined);\n\t\tthis.updateLegendMarker(undefined);\n\t}\n\n\tprotected _afterDataChange() {\n\t\tsuper._afterDataChange();\n\t\tthis.get(\"xAxis\")._markDirtyKey(\"start\");\n\t\tthis.get(\"yAxis\")._markDirtyKey(\"start\");\n\t\tthis.resetExtremes();\n\t}\n\n\n\t/**\n\t * Resets cached axis scale values.\n\t */\n\tpublic resetExtremes() {\n\t\tthis.setPrivate(\"selectionMinX\", undefined);\n\t\tthis.setPrivate(\"selectionMaxX\", undefined);\n\t\tthis.setPrivate(\"selectionMinY\", undefined);\n\t\tthis.setPrivate(\"selectionMaxY\", undefined);\n\n\t\tthis.setPrivate(\"minX\", undefined);\n\t\tthis.setPrivate(\"minY\", undefined);\n\t\tthis.setPrivate(\"maxX\", undefined);\n\t\tthis.setPrivate(\"maxY\", undefined);\n\t}\n\n\t/**\n\t * Creates and returns an axis range object.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/axis-ranges/} for more info\n\t * @param axisDataItem Axis data item\n\t * @return Axis range\n\t */\n\tpublic createAxisRange(axisDataItem: DataItem<IAxisDataItem>): this[\"_axisRangeType\"] {\n\t\treturn this.axisRanges.push({\n\t\t\taxisDataItem: axisDataItem\n\t\t})\n\t}\n\n\t/**\n\t * A list of series's main (ungrouped) data items.\n\t *\n\t * @return Data items\n\t */\n\tpublic get mainDataItems(): Array<DataItem<this[\"_dataItemSettings\"]>> {\n\t\treturn this._mainDataItems;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic _adjustStartIndex(index: number): number {\n\t\tconst xAxis = this.get(\"xAxis\");\n\t\tconst baseAxis = this.get(\"baseAxis\");\n\n\t\tif (baseAxis == xAxis && xAxis.isType<DateAxis<any>>(\"DateAxis\")) {\n\t\t\tconst baseDuration = xAxis.baseDuration();\n\t\t\tconst minSelection = xAxis.getPrivate(\"selectionMin\", xAxis.getPrivate(\"min\", 0));\n\t\t\tconst dl = baseDuration * this.get(\"locationX\", 0.5);\n\n\t\t\tlet value = -Infinity;\n\n\t\t\twhile (value < minSelection) {\n\t\t\t\tconst dataItem = this.dataItems[index];\n\t\t\t\tif (dataItem) {\n\t\t\t\t\tconst open = dataItem.open;\n\t\t\t\t\tif (open) {\n\t\t\t\t\t\tvalue = open[\"valueX\"];\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tvalue = dataItem.get(\"valueX\", 0);\n\t\t\t\t\t}\n\t\t\t\t\tvalue += dl;\n\n\t\t\t\t\tif (value < minSelection) {\n\t\t\t\t\t\tindex++;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn index;\n\t}\n}\n","\r\n/**\r\n * @ignore\r\n */\r\nexport class Registry {\r\n\t/**\r\n\t * Currently running version of amCharts.\r\n\t */\r\n\treadonly version: string = \"5.10.9\";\r\n\r\n\t/**\r\n\t * List of applied licenses.\r\n\t * @ignore\r\n\t */\r\n\tlicenses: String[] = [];\r\n\r\n\t/**\r\n\t * Entities that have their `id` setting set.\r\n\t */\r\n\tentitiesById: { [index: string]: any } = {};\r\n\r\n\t/**\r\n\t * All created [[Root]] elements.\r\n\t */\r\n\trootElements: any[] = [];\r\n\r\n}\r\n\r\n/**\r\n\t* @ignore\r\n */\r\nexport const registry = new Registry();\r\n\r\n/**\r\n * Adds a license, e.g.:\r\n *\r\n * ```TypeScript\r\n * am5.addLicense(\"xxxxxxxx\");\r\n * ```\r\n * ```JavaScript\r\n * am5.addLicense(\"xxxxxxxx\");\r\n * ```\r\n *\r\n * Multiple licenses can be added to cover for multiple products.\r\n *\r\n * @param license License key\r\n */\r\nexport function addLicense(license: string): void {\r\n\tregistry.licenses.push(license);\r\n}\r\n\r\n\r\n/**\r\n * Disposes all [[Root]] elements.\r\n */\r\nexport function disposeAllRootElements(): void {\r\n\tlet root;\r\n\twhile(root = registry.rootElements.pop()) {\r\n\t\troot.dispose();\r\n\t}\r\n}\r\n\r\n/**\r\n * Finds and returns a `Root` element assigned to a container with `id`.\r\n * \r\n * @param id Container ID\r\n * @return Root\r\n * @since 5.9.2\r\n */\r\nexport function getRootById(id: string): any {\r\n\tlet found;\r\n\tregistry.rootElements.forEach((item) => {\r\n\t\tif (item.dom.id == id) {\r\n\t\t\tfound = item;\r\n\t\t}\r\n\t});\r\n\treturn found;\r\n}","import type { IAnimation } from \"./util/Animation\";\nimport type { Entity } from \"./util/Entity\";\nimport type { Sprite } from \"./render/Sprite\";\nimport type { Theme } from \"./Theme\";\nimport type { IPoint } from \"./util/IPoint\";\nimport type { IRenderer, IPointerEvent } from \"./render/backend/Renderer\";\nimport type { Timezone } from \"./util/Timezone\";\n\nimport { AnimationState } from \"./util/Animation\";\nimport { Container } from \"./render/Container\";\nimport { Text } from \"./render/Text\";\nimport { HorizontalLayout } from \"./render/HorizontalLayout\";\nimport { VerticalLayout } from \"./render/VerticalLayout\";\nimport { GridLayout } from \"./render/GridLayout\";\nimport { IDisposer, Disposer } from \"./util/Disposer\";\nimport { ResizeSensor } from \"./util/ResizeSensor\";\nimport { InterfaceColors } from \"./util/InterfaceColors\";\nimport { Graphics } from \"./render/Graphics\";\nimport { Rectangle } from \"./render/Rectangle\";\nimport { Tooltip } from \"./render/Tooltip\";\nimport { NumberFormatter } from \"./util/NumberFormatter\";\nimport { DateFormatter } from \"./util/DateFormatter\";\nimport { DurationFormatter } from \"./util/DurationFormatter\";\nimport { ILocale, Language } from \"./util/Language\";\nimport { Events, EventDispatcher } from \"./util/EventDispatcher\";\nimport { DefaultTheme } from \"../themes/DefaultTheme\";\nimport { CanvasRenderer } from \"./render/backend/CanvasRenderer\";\nimport { p100, percent, isPercent, Percent } from \"./util/Percent\";\nimport { color } from \"./util/Color\";\nimport { populateString } from \"./util/PopulateString\";\nimport { registry } from \"./Registry\";\n\nimport * as $order from \"./util/Order\";\nimport * as $array from \"./util/Array\";\nimport * as $object from \"./util/Object\";\nimport * as $utils from \"./util/Utils\";\nimport * as $type from \"./util/Type\";\n\n\nimport en from \"../../locales/en\";\n\n\nfunction rAF(fps: number | undefined, callback: (currentTime: number) => void): void {\n\tif (fps == null) {\n\t\trequestAnimationFrame(callback);\n\n\t} else {\n\t\tsetTimeout(() => {\n\t\t\trequestAnimationFrame(callback);\n\t\t}, 1000 / fps);\n\t}\n}\n\n\n/**\n * @ignore\n */\ninterface IParent extends Entity {\n\t_prepareChildren(): void;\n\t_updateChildren(): void;\n}\n\ninterface IBounds extends Entity {\n\tdepth(): number;\n\t_updateBounds(): void;\n}\n\n\nexport interface ISize {\n\twidth: number,\n\theight: number,\n}\n\n\nexport interface IRootEvents {\n\tframestarted: {\n\t\ttimestamp: number;\n\t};\n\tframeended: {\n\t\ttimestamp: number;\n\t};\n}\n\n\nexport interface IRootSettings {\n\n\t/**\n\t * Indicates whether chart should use \"safe\" resolution on some memory-limiting\n\t * platforms such as Safari.\n\t *\n\t * @default true\n\t */\n\tuseSafeResolution?: boolean;\n\n\t/**\n\t * Allows defining margins around chart area for tooltips to go outside the\n\t * chart itself.\n\t *\n\t * @since 5.2.24\n\t */\n\ttooltipContainerBounds?: { top: number, left: number, right: number, bottom: number };\n\n\t/**\n\t * Set to `false` to disable all accessibility features.\n\t *\n\t * NOTE: once disabled, accessibility cannot be re-enabled on a live `Root` object.\n\t *\n\t * @default true\n\t * @since 5.3.0\n\t */\n\taccessible?: boolean;\n\n\t/**\n\t * If set to `true`, the parent inner `<div>` element will become a focusable\n\t * element.\n\t *\n\t * @since 5.3.17\n\t * @default false\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/accessibility/#Accessibility_of_Root_element} for more info\n\t */\n\tfocusable?: boolean;\n\n\t/**\n\t * Distance between focused element and its highlight square in pixels.\n\t *\n\t * @since 5.6.0\n\t * @default 2\n\t */\n\tfocusPadding?: number;\n\n\t/**\n\t * If set to some string, it will be used as inner `<div>` ARIA-LABEL.\n\t *\n\t * Should be used in conjuction with `focusable`.\n\t *\n\t * @since 5.3.17\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/accessibility/#Accessibility_of_Root_element} for more info\n\t */\n\tariaLabel?: string;\n\n\t/**\n\t * Allows setting a \"role\" for the inner `<div>`.\n\t *\n\t * @since 5.3.17\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/accessibility/#Accessibility_of_Root_element} for more info\n\t */\n\trole?: string;\n\n\t/**\n\t * Allows for specifying a custom width / height for the chart.\n\t *\n\t * This function will be called automatically when the chart is resized.\n\t */\n\tcalculateSize?: (dimensions: DOMRect) => ISize;\n}\n\n\n// TODO implement Disposer\n/**\n * Root element of the chart.\n *\n * @see {@link https://www.amcharts.com/docs/v5/getting-started/#Root_element} for more info\n */\nexport class Root implements IDisposer {\n\n\t/**\n\t * A reference to original chart container (div element).\n\t */\n\tpublic dom: HTMLElement;\n\tpublic _inner: HTMLElement;\n\n\tprotected _settings: IRootSettings;\n\tprotected _isDirty: boolean = false;\n\tprotected _isDirtyParents: boolean = false;\n\tprotected _isDirtyAnimation: boolean = false;\n\tprotected _dirty: { [id: number]: Entity } = {};\n\tprotected _dirtyParents: { [id: number]: IParent } = {};\n\tprotected _dirtyBounds: { [id: number]: IBounds } = {};\n\tprotected _dirtyPositions: { [id: number]: Sprite } = {};\n\n\tprotected _ticker: ((currentTime: number) => void) | null = null;\n\tprotected _tickers: Array<(currentTime: number) => void> = [];\n\n\tprotected _updateTick: boolean = true;\n\n\t/**\n\t * Root's event dispatcher.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/events/} for more info\n\t */\n\tpublic events: EventDispatcher<Events<this, IRootEvents>> = new EventDispatcher();\n\n\t/**\n\t * @ignore\n\t * @todo needs description\n\t */\n\tpublic animationTime: number | null = null;\n\n\tprivate _animations: Array<IAnimation> = [];\n\n\tpublic _renderer: IRenderer;\n\n\tpublic _rootContainer!: Container;\n\n\t/**\n\t * Main content container.\n\t */\n\tpublic container!: Container;\n\n\t/**\n\t * A [[Container]] used to display tooltips in.\n\t */\n\tpublic tooltipContainer!: Container\n\tprotected _tooltipContainerSettings!: { top: number, left: number, right: number, bottom: number };\n\n\tpublic _tooltip!: Tooltip;\n\n\t// Locale-related\n\n\t/**\n\t * @ignore\n\t */\n\tpublic language: Language = Language.new(this, {});\n\n\t/**\n\t * Locale used by the chart.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/locales/}\n\t */\n\tpublic locale: ILocale = en;\n\n\t// Date-time related\n\n\t/**\n\t * Use UTC when formatting date/time.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/formatters/formatting-dates/#utc-and-time-zones} for more info\n\t */\n\tpublic utc: boolean = false;\n\n\t/**\n\t * If set, will format date/time in specific time zone.\n\t *\n\t * The value should be named time zone, e.g.:\n\t * `\"America/Vancouver\"`, `\"Australia/Sydney\"`, `\"UTC\"`.\n\t *\n\t * NOTE: Using time zone feature may noticeable affect performance of the\n\t * chart, especially with large data sets, since every single date will need\n\t * to be recalculated.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/getting-started/root-element/#time-zone} for more info\n\t * @since 5.1.0\n\t */\n\tpublic timezone?: Timezone;\n\n\t/**\n\t * The maximum FPS that the Root will run at.\n\t *\n\t * If `undefined` it will run at the highest FPS.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/getting-started/root-element/#Performance} for more info\n\t */\n\tpublic fps: number | undefined;\n\n\t/**\n\t * Number formatter.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/formatters/formatting-numbers/} for more info\n\t */\n\tpublic numberFormatter: NumberFormatter = NumberFormatter.new(this, {});\n\n\t/**\n\t * Date/time formatter.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/formatters/formatting-dates/} for more info\n\t */\n\tpublic dateFormatter: DateFormatter = DateFormatter.new(this, {});\n\n\t/**\n\t * Duration formatter.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/formatters/formatting-dates/} for more info\n\t */\n\tpublic durationFormatter: DurationFormatter = DurationFormatter.new(this, {});\n\n\n\t// Accessibility\n\n\t/**\n\t * Global tab index for using for the whole chart\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/accessibility/} for more info\n\t */\n\tpublic tabindex: number = 0;\n\n\t//@todo maybe make this better\n\tprotected _tabindexes: Sprite[] = [];\n\n\tprotected _a11yD: boolean = false;\n\tprotected _focusElementDirty: boolean = false;\n\tprotected _focusElementContainer: HTMLDivElement | undefined;\n\tprotected _focusedSprite: Sprite | undefined;\n\tprotected _isShift: boolean | undefined;\n\tprotected _keyboardDragPoint: IPoint | undefined;\n\tprotected _tooltipElementContainer: HTMLDivElement | undefined;\n\tprotected _readerAlertElement: HTMLDivElement | undefined;\n\n\tpublic _logo?: Container;\n\n\tpublic _tooltipDiv: HTMLDivElement | undefined;\n\n\t/**\n\t * Used for dynamically-created CSS and JavaScript with strict source policies.\n\t */\n\tpublic nonce?: string;\n\n\t/**\n\t * Special color set to be used for various controls.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/#Interface_colors} for more info\n\t */\n\tpublic interfaceColors: InterfaceColors;\n\n\t/**\n\t * An instance of vertical layout object that can be used to set `layout` setting\n\t * of a [[Container]].\n\t *\n\t * @default VerticalLayout.new()\n\t */\n\tpublic verticalLayout: VerticalLayout = VerticalLayout.new(this, {});\n\n\t/**\n\t * An instance of horizontal layout object that can be used to set `layout` setting\n\t * of a [[Container]].\n\t *\n\t * @default HorizontalLayout.new()\n\t */\n\tpublic horizontalLayout: VerticalLayout = HorizontalLayout.new(this, {});\n\n\t/**\n\t * An instance of grid layout object that can be used to set `layout` setting\n\t * of a [[Container]].\n\t *\n\t * @default VerticalLayout.new()\n\t */\n\tpublic gridLayout: VerticalLayout = GridLayout.new(this, {});\n\n\tpublic _paused: boolean = false;\n\n\t/**\n\t * Indicates whether chart should resized automatically when parent container\n\t * width and/or height changes.\n\t *\n\t * If disabled (`autoResize = false`) you can make the chart resize manually\n\t * by calling root element's `resize()` method.\n\t */\n\tpublic autoResize: boolean = true;\n\n\tprotected _fontHash: string = \"\";\n\n\tprotected _isDisposed: boolean = false;\n\tprotected _disposers: Array<IDisposer> = [];\n\n\tprotected _resizeSensorDisposer?: IDisposer;\n\n\tpublic _tooltips: Array<Tooltip> = [];\n\n\tprotected _htmlElementContainer: HTMLDivElement | undefined;\n\tprotected _htmlEnabledContainers: Container[] = [];\n\n\tprotected constructor(id: string | HTMLElement, settings: IRootSettings = {}, isReal: boolean) {\n\n\t\tif (!isReal) {\n\t\t\tthrow new Error(\"You cannot use `new Class()`, instead use `Class.new()`\");\n\t\t}\n\n\t\tthis._settings = settings;\n\n\t\tif (settings.accessible == false) {\n\t\t\tthis._a11yD = true;\n\t\t}\n\n\t\tif (settings.useSafeResolution == null) {\n\t\t\tsettings.useSafeResolution = true;\n\t\t}\n\n\t\tlet resolution;\n\n\t\tif (settings.useSafeResolution) {\n\t\t\tresolution = $utils.getSafeResolution();\n\t\t}\n\n\t\tthis._renderer = new CanvasRenderer(resolution);\n\n\t\tlet dom: HTMLElement | null;\n\n\t\tif (id instanceof HTMLElement) {\n\t\t\tdom = id;\n\t\t}\n\t\telse {\n\t\t\tdom = document.getElementById(id);\n\t\t}\n\n\t\t$array.each(registry.rootElements, (root) => {\n\t\t\tif (root.dom === dom) {\n\t\t\t\tthrow new Error(\"You cannot have multiple Roots on the same DOM node\");\n\t\t\t}\n\t\t});\n\n\t\tthis.interfaceColors = InterfaceColors.new(this, {});\n\n\t\tif (dom === null) {\n\t\t\tthrow new Error(\"Could not find HTML element with id `\" + id + \"`\");\n\t\t}\n\n\t\tthis.dom = dom;\n\n\t\tlet inner: HTMLDivElement = document.createElement(\"div\");\n\t\tinner.style.position = \"relative\";\n\t\tinner.style.width = \"100%\";\n\t\tinner.style.height = \"100%\";\n\t\tdom.appendChild(inner);\n\n\t\tconst tooltipContainerBounds = settings.tooltipContainerBounds;\n\t\tif (tooltipContainerBounds) {\n\t\t\tthis._tooltipContainerSettings = tooltipContainerBounds;\n\t\t}\n\n\t\tthis._inner = inner;\n\n\t\tthis._updateComputedStyles();\n\n\t\tregistry.rootElements.push(this);\n\t}\n\n\n\tpublic static new(id: string | HTMLElement, settings?: IRootSettings): Root {\n\t\tconst root = new Root(id, settings, true);\n\t\troot._init();\n\t\treturn root;\n\t}\n\n\tpublic moveDOM(id: string | HTMLElement): void {\n\t\tlet dom: HTMLElement | null;\n\n\t\tif (id instanceof HTMLElement) {\n\t\t\tdom = id;\n\t\t}\n\t\telse {\n\t\t\tdom = document.getElementById(id);\n\t\t}\n\n\t\tif (dom) {\n\t\t\twhile (this.dom.childNodes.length > 0) {\n\t\t\t\tdom.appendChild(this.dom.childNodes[0]);\n\t\t\t}\n\t\t\tthis.dom = dom;\n\t\t\tthis._initResizeSensor();\n\t\t\tthis.resize();\n\t\t}\n\n\t}\n\n\n\tprotected _handleLogo(): void {\n\t\tif (this._logo) {\n\t\t\tconst w = this.dom.offsetWidth;\n\t\t\tconst h = this.dom.offsetHeight;\n\t\t\tif ((w <= 150) || (h <= 60)) {\n\t\t\t\tthis._logo.hide();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis._logo.show();\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic _showBranding(): void {\n\t\tif (!this._logo) {\n\t\t\tconst logo = this.tooltipContainer.children.push(Container.new(this, {\n\t\t\t\tinteractive: true,\n\t\t\t\tinteractiveChildren: false,\n\t\t\t\tposition: \"absolute\",\n\t\t\t\tsetStateOnChildren: true,\n\t\t\t\tpaddingTop: 9,\n\t\t\t\tpaddingRight: 9,\n\t\t\t\tpaddingBottom: 9,\n\t\t\t\tpaddingLeft: 9,\n\t\t\t\tscale: .6,\n\t\t\t\ty: percent(100),\n\t\t\t\tcenterY: p100,\n\t\t\t\ttooltipText: \"Created using amCharts 5\",\n\t\t\t\ttooltipX: p100,\n\t\t\t\tcursorOverStyle: \"pointer\",\n\t\t\t\tbackground: Rectangle.new(this, {\n\t\t\t\t\tfill: color(0x474758),\n\t\t\t\t\tfillOpacity: 0,\n\t\t\t\t\ttooltipY: 5\n\t\t\t\t})\n\t\t\t}));\n\n\t\t\tconst tooltip = Tooltip.new(this, {\n\t\t\t\tpointerOrientation: \"horizontal\",\n\t\t\t\tpaddingTop: 4,\n\t\t\t\tpaddingRight: 7,\n\t\t\t\tpaddingBottom: 4,\n\t\t\t\tpaddingLeft: 7\n\t\t\t});\n\t\t\ttooltip.label.setAll({\n\t\t\t\tfontSize: 12\n\t\t\t});\n\t\t\ttooltip.get(\"background\")!.setAll({\n\t\t\t\tfill: this.interfaceColors.get(\"background\"),\n\t\t\t\tstroke: this.interfaceColors.get(\"grid\"),\n\t\t\t\tstrokeOpacity: 0.3\n\t\t\t})\n\t\t\tlogo.set(\"tooltip\", tooltip);\n\n\t\t\tlogo.events.on(\"click\", () => {\n\t\t\t\twindow.open(\"https://www.amcharts.com/\", \"_blank\");\n\t\t\t});\n\n\t\t\tlogo.states.create(\"hover\", {});\n\n\t\t\tconst m = logo.children.push(Graphics.new(this, {\n\t\t\t\tstroke: color(0xcccccc),\n\t\t\t\tstrokeWidth: 3,\n\t\t\t\tsvgPath: \"M5 25 L13 25h13.6c3.4 0 6 0 10.3-4.3s5.2-12 8.6-12c3.4 0 4.3 8.6 7.7 8.6M83.4 25H79.8c-3.4 0-6 0-10.3-4.3s-5.2-12-8.6-12-4.3 8.6-7.7 8.6\"\n\t\t\t}));\n\n\t\t\tm.states.create(\"hover\", { stroke: color(0x3CABFF) });\n\n\t\t\tconst a = logo.children.push(Graphics.new(this, {\n\t\t\t\tstroke: color(0x888888),\n\t\t\t\tstrokeWidth: 3,\n\t\t\t\tsvgPath: \"M83.4 25h-31C37 25 39.5 4.4 28.4 4.4S18.9 24.2 4.3 25H0\"\n\t\t\t}));\n\n\t\t\ta.states.create(\"hover\", { stroke: color(0x474758) });\n\n\t\t\t//logo.set(\"tooltip\", this._tooltip);\n\t\t\t//logo.setPrivate(\"tooltipTarget\", logo.get(\"background\"));\n\t\t\tthis._logo = logo;\n\n\t\t\tthis._handleLogo();\n\t\t}\n\t}\n\n\tprotected _getRealSize(): DOMRect {\n\t\treturn this.dom.getBoundingClientRect();\n\t}\n\n\tprotected _getCalculatedSize(rect: DOMRect): ISize {\n\t\tif (this._settings.calculateSize) {\n\t\t\treturn this._settings.calculateSize(rect);\n\n\t\t} else {\n\t\t\treturn {\n\t\t\t\twidth: rect.width,\n\t\t\t\theight: rect.height,\n\t\t\t};\n\t\t}\n\t}\n\n\tprotected _init(): void {\n\n\t\tconst settings = this._settings;\n\t\tif (settings.accessible !== false) {\n\t\t\tif (settings.focusable) {\n\t\t\t\tthis._inner.setAttribute(\"focusable\", \"true\");\n\t\t\t\tthis._inner.setAttribute(\"tabindex\", this.tabindex + \"\");\n\t\t\t}\n\n\t\t\tif (settings.ariaLabel) {\n\t\t\t\tthis._inner.setAttribute(\"aria-label\", settings.ariaLabel);\n\t\t\t}\n\n\t\t\tif (settings.role) {\n\t\t\t\tthis._inner.setAttribute(\"role\", settings.role);\n\t\t\t}\n\t\t}\n\n\t\tconst renderer = this._renderer;\n\n\t\tconst rect = this._getRealSize();\n\t\tconst size = this._getCalculatedSize(rect);\n\n\t\tconst width = Math.floor(size.width);\n\t\tconst height = Math.floor(size.height);\n\n\t\tconst realWidth = Math.floor(rect.width);\n\t\tconst realHeight = Math.floor(rect.height);\n\n\t\tconst rootContainer = Container.new(this, {\n\t\t\tvisible: true,\n\t\t\twidth: width,\n\t\t\theight: height,\n\t\t});\n\t\tthis._rootContainer = rootContainer;\n\t\tthis._rootContainer._defaultThemes.push(DefaultTheme.new(this));\n\n\t\tconst container = rootContainer.children.push(Container.new(this, { visible: true, width: p100, height: p100 }));\n\t\tthis.container = container;\n\n\t\trenderer.resize(realWidth, realHeight, width, height);\n\n\t\t//@todo: better appendChild - refer\n\t\tthis._inner.appendChild(renderer.view);\n\n\t\t// TODO: TMP TMP TMP for testing only, remove\n\t\t//renderer.debugGhostView = true;\n\n\t\tthis._initResizeSensor();\n\n\t\t// HTML content holder\n\t\tconst htmlElementContainer = document.createElement(\"div\");\n\t\tthis._htmlElementContainer = htmlElementContainer;\n\t\thtmlElementContainer.className = \"am5-html-container\";\n\t\thtmlElementContainer.style.position = \"absolute\";\n\t\thtmlElementContainer.style.pointerEvents = \"none\";\n\t\tif (!this._tooltipContainerSettings) {\n\t\t\thtmlElementContainer.style.overflow = \"hidden\";\n\t\t}\n\t\tthis._inner.appendChild(htmlElementContainer);\n\n\t\tif (this._a11yD !== true) {\n\n\t\t\t// Create element which is used to make announcements to screen reader\n\t\t\tconst readerAlertElement = document.createElement(\"div\");\n\t\t\treaderAlertElement.className = \"am5-reader-container\";\n\t\t\treaderAlertElement.setAttribute(\"role\", \"alert\");\n\t\t\t// readerAlertElement.style.zIndex = \"-100000\";\n\t\t\t// readerAlertElement.style.opacity = \"0\";\n\t\t\t// readerAlertElement.style.top = \"0\";\n\t\t\treaderAlertElement.style.position = \"absolute\";\n\t\t\treaderAlertElement.style.width = \"1px\";\n\t\t\treaderAlertElement.style.height = \"1px\";\n\t\t\treaderAlertElement.style.overflow = \"hidden\";\n\t\t\treaderAlertElement.style.clip = \"rect(1px, 1px, 1px, 1px)\";\n\t\t\tthis._readerAlertElement = readerAlertElement;\n\t\t\tthis._inner.appendChild(this._readerAlertElement);\n\n\t\t\tconst focusElementContainer = document.createElement(\"div\");\n\t\t\tfocusElementContainer.className = \"am5-focus-container\";\n\t\t\tfocusElementContainer.style.position = \"absolute\";\n\t\t\tfocusElementContainer.style.pointerEvents = \"none\";\n\t\t\tfocusElementContainer.style.top = \"0px\";\n\t\t\tfocusElementContainer.style.left = \"0px\";\n\t\t\tfocusElementContainer.style.overflow = \"hidden\";\n\t\t\tfocusElementContainer.style.width = width + \"px\";\n\t\t\tfocusElementContainer.style.height = height + \"px\";\n\n\t\t\tfocusElementContainer.setAttribute(\"role\", \"graphics-document\");\n\n\t\t\t$utils.setInteractive(focusElementContainer, false);\n\t\t\tthis._focusElementContainer = focusElementContainer;\n\t\t\tthis._inner.appendChild(this._focusElementContainer);\n\n\t\t\tconst tooltipElementContainer = document.createElement(\"div\");\n\t\t\tthis._tooltipElementContainer = tooltipElementContainer;\n\t\t\ttooltipElementContainer.className = \"am5-tooltip-container\";\n\t\t\tthis._inner.appendChild(tooltipElementContainer);\n\n\t\t\t// Add keyboard events for accessibility, e.g. simulating drag with arrow\n\t\t\t// keys and click with ENTER\n\t\t\tif ($utils.supports(\"keyboardevents\")) {\n\n\t\t\t\tthis._disposers.push($utils.addEventListener(window, \"keydown\", (ev: KeyboardEvent) => {\n\t\t\t\t\tconst eventKey = $utils.getEventKey(ev);\n\t\t\t\t\tif (eventKey == \"Shift\") {\n\t\t\t\t\t\tthis._isShift = true;\n\t\t\t\t\t}\n\t\t\t\t\telse if (eventKey == \"Tab\") {\n\t\t\t\t\t\tthis._isShift = ev.shiftKey;\n\t\t\t\t\t}\n\t\t\t\t}));\n\n\t\t\t\tthis._disposers.push($utils.addEventListener(window, \"keyup\", (ev: KeyboardEvent) => {\n\t\t\t\t\tconst eventKey = $utils.getEventKey(ev);\n\t\t\t\t\tif (eventKey == \"Shift\") {\n\t\t\t\t\t\tthis._isShift = false;\n\t\t\t\t\t}\n\t\t\t\t}));\n\n\t\t\t\tthis._disposers.push($utils.addEventListener(focusElementContainer, \"click\", () => {\n\t\t\t\t\t// Some screen readers convert ENTER (and some SPACE) press whil on\n\t\t\t\t\t// focused element to a \"click\" event, preventing actual \"keydown\"\n\t\t\t\t\t// event from firing. We're using this \"click\" event to still\n\t\t\t\t\t// generate internal click events.\n\t\t\t\t\tconst focusedSprite = this._focusedSprite;\n\t\t\t\t\tif (focusedSprite) {\n\t\t\t\t\t\tconst announceText = focusedSprite.get(\"clickAnnounceText\", \"\");\n\t\t\t\t\t\tif (announceText !== \"\") {\n\t\t\t\t\t\t\tthis.readerAlert(announceText);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst downEvent = renderer.getEvent(new MouseEvent(\"click\"));\n\t\t\t\t\t\tfocusedSprite.events.dispatch(\"click\", {\n\t\t\t\t\t\t\ttype: \"click\",\n\t\t\t\t\t\t\toriginalEvent: downEvent.event,\n\t\t\t\t\t\t\tpoint: downEvent.point,\n\t\t\t\t\t\t\tsimulated: true,\n\t\t\t\t\t\t\ttarget: focusedSprite\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}));\n\n\t\t\t\tthis._disposers.push($utils.addEventListener(focusElementContainer, \"keydown\", (ev: KeyboardEvent) => {\n\t\t\t\t\tconst focusedSprite = this._focusedSprite;\n\t\t\t\t\tif (focusedSprite) {\n\t\t\t\t\t\tif (ev.key == \"Escape\") {\n\t\t\t\t\t\t\t// ESC pressed - lose current focus\n\t\t\t\t\t\t\t$utils.blur();\n\t\t\t\t\t\t\tthis._focusedSprite = undefined;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlet dragOffsetX = 0;\n\t\t\t\t\t\tlet dragOffsetY = 0;\n\t\t\t\t\t\t// TODO: figure out if using bogus MouseEvent is fine, or it will\n\t\t\t\t\t\t// fail on some platforms\n\t\t\t\t\t\tconst eventKey = $utils.getEventKey(ev);\n\t\t\t\t\t\tswitch (eventKey) {\n\t\t\t\t\t\t\tcase \"Enter\":\n\t\t\t\t\t\t\tcase \" \":\n\t\t\t\t\t\t\t\tconst announceText = focusedSprite.get(\"clickAnnounceText\", \"\");\n\t\t\t\t\t\t\t\tif (announceText !== \"\") {\n\t\t\t\t\t\t\t\t\tthis.readerAlert(announceText);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (eventKey == \" \" && focusedSprite.get(\"role\") != \"checkbox\") {\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tev.preventDefault();\n\t\t\t\t\t\t\t\tconst downEvent = renderer.getEvent(new MouseEvent(\"mouse\"));\n\t\t\t\t\t\t\t\tfocusedSprite.events.dispatch(\"click\", {\n\t\t\t\t\t\t\t\t\ttype: \"click\",\n\t\t\t\t\t\t\t\t\toriginalEvent: downEvent.event,\n\t\t\t\t\t\t\t\t\tpoint: downEvent.point,\n\t\t\t\t\t\t\t\t\tsimulated: true,\n\t\t\t\t\t\t\t\t\ttarget: focusedSprite\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\tcase \"ArrowLeft\":\n\t\t\t\t\t\t\t\tdragOffsetX = -6;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"ArrowRight\":\n\t\t\t\t\t\t\t\tdragOffsetX = 6;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"ArrowUp\":\n\t\t\t\t\t\t\t\tdragOffsetY = -6;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"ArrowDown\":\n\t\t\t\t\t\t\t\tdragOffsetY = 6;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (dragOffsetX != 0 || dragOffsetY != 0) {\n\t\t\t\t\t\t\tev.preventDefault();\n\n\t\t\t\t\t\t\tif (!focusedSprite.isDragging()) {\n\t\t\t\t\t\t\t\t// Start dragging\n\t\t\t\t\t\t\t\tthis._keyboardDragPoint = {\n\t\t\t\t\t\t\t\t\tx: 0,\n\t\t\t\t\t\t\t\t\ty: 0\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tconst downEvent = renderer.getEvent(new MouseEvent(\"mousedown\", {\n\t\t\t\t\t\t\t\t\tclientX: 0,\n\t\t\t\t\t\t\t\t\tclientY: 0\n\t\t\t\t\t\t\t\t}));\n\n\t\t\t\t\t\t\t\tdownEvent.point = {\n\t\t\t\t\t\t\t\t\tx: 0,\n\t\t\t\t\t\t\t\t\ty: 0\n\t\t\t\t\t\t\t\t};\n\n\t\t\t\t\t\t\t\tif (focusedSprite.events.isEnabled(\"pointerdown\")) {\n\t\t\t\t\t\t\t\t\tfocusedSprite.events.dispatch(\"pointerdown\", {\n\t\t\t\t\t\t\t\t\t\ttype: \"pointerdown\",\n\t\t\t\t\t\t\t\t\t\toriginalEvent: downEvent.event,\n\t\t\t\t\t\t\t\t\t\tpoint: downEvent.point,\n\t\t\t\t\t\t\t\t\t\tsimulated: true,\n\t\t\t\t\t\t\t\t\t\ttarget: focusedSprite\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t// Move focus marker\n\t\t\t\t\t\t\t\t//this._positionFocusElement(focusedSprite);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Move incrementally\n\t\t\t\t\t\t\tconst dragPoint = this._keyboardDragPoint!;\n\t\t\t\t\t\t\tdragPoint.x += dragOffsetX;\n\t\t\t\t\t\t\tdragPoint.y += dragOffsetY;\n\t\t\t\t\t\t\tconst moveEvent = renderer.getEvent(new MouseEvent(\"mousemove\", {\n\t\t\t\t\t\t\t\tclientX: dragPoint.x,\n\t\t\t\t\t\t\t\tclientY: dragPoint.y\n\t\t\t\t\t\t\t}), false);\n\n\t\t\t\t\t\t\tif (focusedSprite.events.isEnabled(\"globalpointermove\")) {\n\t\t\t\t\t\t\t\tfocusedSprite.events.dispatch(\"globalpointermove\", {\n\t\t\t\t\t\t\t\t\ttype: \"globalpointermove\",\n\t\t\t\t\t\t\t\t\toriginalEvent: moveEvent.event,\n\t\t\t\t\t\t\t\t\tpoint: moveEvent.point,\n\t\t\t\t\t\t\t\t\tsimulated: true,\n\t\t\t\t\t\t\t\t\ttarget: focusedSprite\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}));\n\n\t\t\t\tthis._disposers.push($utils.addEventListener(focusElementContainer, \"keyup\", (ev: KeyboardEvent) => {\n\t\t\t\t\tif (this._focusedSprite) {\n\t\t\t\t\t\tconst focusedSprite = this._focusedSprite;\n\t\t\t\t\t\tconst eventKey = $utils.getEventKey(ev);\n\t\t\t\t\t\tswitch (eventKey) {\n\t\t\t\t\t\t\tcase \"ArrowLeft\":\n\t\t\t\t\t\t\tcase \"ArrowRight\":\n\t\t\t\t\t\t\tcase \"ArrowUp\":\n\t\t\t\t\t\t\tcase \"ArrowDown\":\n\t\t\t\t\t\t\t\tif (focusedSprite.isDragging()) {\n\t\t\t\t\t\t\t\t\t// Simulate drag stop\n\t\t\t\t\t\t\t\t\tconst dragPoint = this._keyboardDragPoint!;\n\t\t\t\t\t\t\t\t\tconst upEvent = renderer.getEvent(new MouseEvent(\"mouseup\", {\n\t\t\t\t\t\t\t\t\t\tclientX: dragPoint.x,\n\t\t\t\t\t\t\t\t\t\tclientY: dragPoint.y\n\t\t\t\t\t\t\t\t\t}));\n\n\t\t\t\t\t\t\t\t\tif (focusedSprite.events.isEnabled(\"globalpointerup\")) {\n\t\t\t\t\t\t\t\t\t\tfocusedSprite.events.dispatch(\"globalpointerup\", {\n\t\t\t\t\t\t\t\t\t\t\ttype: \"globalpointerup\",\n\t\t\t\t\t\t\t\t\t\t\toriginalEvent: upEvent.event,\n\t\t\t\t\t\t\t\t\t\t\tpoint: upEvent.point,\n\t\t\t\t\t\t\t\t\t\t\tsimulated: true,\n\t\t\t\t\t\t\t\t\t\t\ttarget: focusedSprite\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//this._positionFocusElement(focusedSprite);\n\t\t\t\t\t\t\t\t\tthis._keyboardDragPoint = undefined;\n\t\t\t\t\t\t\t\t\t// @todo dispatch mouseup event instead of calling dragStop?\n\t\t\t\t\t\t\t\t\t// this._dispatchEvent(\"globalpointerup\", target, upEvent);\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse if (focusedSprite.get(\"focusableGroup\")) {\n\t\t\t\t\t\t\t\t\t// Find next item in focusable group\n\t\t\t\t\t\t\t\t\tconst group = focusedSprite.get(\"focusableGroup\");\n\t\t\t\t\t\t\t\t\tconst items = this._tabindexes.filter((item) => {\n\t\t\t\t\t\t\t\t\t\treturn item.get(\"focusableGroup\") == group && item.getPrivate(\"focusable\") !== false && item.isVisibleDeep() ? true : false;\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\tlet index = items.indexOf(focusedSprite);\n\t\t\t\t\t\t\t\t\tconst lastIndex = items.length - 1;\n\t\t\t\t\t\t\t\t\tindex += (eventKey == \"ArrowRight\" || eventKey == \"ArrowDown\") ? 1 : -1;\n\t\t\t\t\t\t\t\t\tif (index < 0) {\n\t\t\t\t\t\t\t\t\t\tindex = lastIndex;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse if (index > lastIndex) {\n\t\t\t\t\t\t\t\t\t\tindex = 0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t$utils.focus(items[index].getPrivate(\"focusElement\")!.dom);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"Tab\":\n\t\t\t\t\t\t\t\tconst group = focusedSprite.get(\"focusableGroup\");\n\t\t\t\t\t\t\t\tif (group && this._isShift) {\n\t\t\t\t\t\t\t\t\tthis._focusNext(focusedSprite.getPrivate(\"focusElement\")!.dom, -1, group);\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}));\n\t\t\t}\n\t\t}\n\n\t\tthis._startTicker();\n\t\tthis.setThemes([]);\n\n\t\tthis._addTooltip();\n\n\t\tif (!this._hasLicense()) {\n\t\t\tthis._showBranding();\n\t\t}\n\t}\n\n\tprivate _initResizeSensor(): void {\n\t\tif (this._resizeSensorDisposer) {\n\t\t\tthis._resizeSensorDisposer.dispose();\n\t\t}\n\t\tthis._resizeSensorDisposer = new ResizeSensor(this.dom, () => {\n\t\t\tif (this.autoResize) {\n\t\t\t\tthis.resize();\n\t\t\t}\n\t\t});\n\t\tthis._disposers.push(this._resizeSensorDisposer);\n\t}\n\n\t/**\n\t * If automatic resizing of char is disabled (`root.autoResize = false`), it\n\t * can be resized manually by calling this method.\n\t */\n\tpublic resize(): void {\n\t\tconst rect = this._getRealSize();\n\t\tconst size = this._getCalculatedSize(rect);\n\t\tconst w = Math.floor(size.width);\n\t\tconst h = Math.floor(size.height);\n\n\t\tif (w > 0 && h > 0) {\n\t\t\tconst realWidth = Math.floor(rect.width);\n\t\t\tconst realHeight = Math.floor(rect.height);\n\n\t\t\tconst htmlElementContainer = this._htmlElementContainer!;\n\t\t\thtmlElementContainer.style.width = w + \"px\";\n\t\t\thtmlElementContainer.style.height = h + \"px\";\n\n\t\t\tif (this._a11yD !== true) {\n\t\t\t\tconst focusElementContainer = this._focusElementContainer!;\n\t\t\t\tfocusElementContainer.style.width = w + \"px\";\n\t\t\t\tfocusElementContainer.style.height = h + \"px\";\n\t\t\t}\n\n\t\t\tthis._renderer.resize(realWidth, realHeight, w, h);\n\n\t\t\tconst rootContainer = this._rootContainer;\n\n\t\t\trootContainer.setPrivate(\"width\", w);\n\t\t\trootContainer.setPrivate(\"height\", h);\n\t\t\tthis._render();\n\t\t\tthis._handleLogo();\n\t\t}\n\t}\n\n\tprivate _render() {\n\t\tthis._renderer.render(this._rootContainer._display);\n\n\t\tif (this._focusElementDirty) {\n\t\t\tthis._updateCurrentFocus();\n\t\t\tthis._focusElementDirty = false;\n\t\t}\n\t}\n\n\tprivate _runTickers(currentTime: number) {\n\t\t$array.each(this._tickers, (f) => {\n\t\t\tf(currentTime);\n\t\t});\n\t}\n\n\tprivate _runAnimations(currentTime: number): boolean {\n\t\tlet running = 0;\n\n\t\t$array.keepIf(this._animations, (animation) => {\n\t\t\tconst state = animation._runAnimation(currentTime);\n\n\t\t\tif (state === AnimationState.Stopped) {\n\t\t\t\treturn false;\n\n\t\t\t} else if (state === AnimationState.Playing) {\n\t\t\t\t++running;\n\t\t\t\treturn true;\n\n\t\t\t} else {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t});\n\n\t\tthis._isDirtyAnimation = false;\n\n\t\treturn running === 0;\n\t}\n\n\tprivate _runDirties() {\n\t\t//console.log(\"tick **************************************************************\");\n\t\tlet allParents: { [id: number]: IParent } = {};\n\n\t\twhile (this._isDirtyParents) {\n\t\t\t// This must be before calling _prepareChildren\n\t\t\tthis._isDirtyParents = false;\n\n\t\t\t$object.keys(this._dirtyParents).forEach((key) => {\n\t\t\t\tconst parent = this._dirtyParents[key];\n\n\t\t\t\tdelete this._dirtyParents[key];\n\n\t\t\t\tif (!parent.isDisposed()) {\n\t\t\t\t\tallParents[parent.uid] = parent;\n\t\t\t\t\tparent._prepareChildren();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\t$object.keys(allParents).forEach((key) => {\n\t\t\tallParents[key]._updateChildren();\n\t\t});\n\n\n\t\tconst objects: Array<Entity> = [];\n\n\t\t//\t\tconsole.log(\"_beforeChanged\")\n\t\t$object.keys(this._dirty).forEach((key) => {\n\t\t\tconst entity = this._dirty[key];\n\n\t\t\tif (entity.isDisposed()) {\n\t\t\t\tdelete this._dirty[entity.uid];\n\n\t\t\t} else {\n\t\t\t\tobjects.push(entity);\n\t\t\t\tentity._beforeChanged();\n\t\t\t}\n\t\t});\n\n\t\t//\t\tconsole.log(\"_changed\")\n\t\tobjects.forEach((entity) => {\n\t\t\tentity._changed();\n\t\t\tdelete this._dirty[entity.uid];\n\t\t\tentity._clearDirty();\n\t\t});\n\n\t\tthis._isDirty = false;\n\n\t\tconst depths: { [id: number]: number } = {};\n\t\tconst bounds: Array<IBounds> = [];\n\n\t\t$object.keys(this._dirtyBounds).forEach((key) => {\n\t\t\tconst entity = this._dirtyBounds[key];\n\n\t\t\tdelete this._dirtyBounds[key];\n\n\t\t\tif (!entity.isDisposed()) {\n\t\t\t\tdepths[entity.uid] = entity.depth();\n\t\t\t\tbounds.push(entity);\n\t\t\t}\n\t\t});\n\n\t\tthis._positionHTMLElements();\n\n\t\t// High depth -> low depth\n\t\tbounds.sort((x, y) => {\n\t\t\treturn $order.compare(depths[y.uid], depths[x.uid]);\n\t\t});\n\n\t\t//\t\tconsole.log(\"_updateBounds\")\n\t\tbounds.forEach((entity) => {\n\t\t\tentity._updateBounds();\n\t\t});\n\n\t\t//\t\tconsole.log(\"_updatePosition\")\n\t\tconst dirtyPositions = this._dirtyPositions;\n\t\t$object.keys(dirtyPositions).forEach((key) => {\n\t\t\tconst sprite = dirtyPositions[key];\n\n\t\t\tdelete dirtyPositions[key];\n\n\t\t\tif (!sprite.isDisposed()) {\n\t\t\t\tsprite._updatePosition();\n\t\t\t}\n\t\t});\n\n\t\t//\t\tconsole.log(\"_afterChanged\")\n\t\tobjects.forEach((entity) => {\n\t\t\tentity._afterChanged();\n\t\t});\n\t}\n\n\tprivate _renderFrame(currentTime: number): boolean {\n\t\tif (this._updateTick) {\n\t\t\tif (this.events.isEnabled(\"framestarted\")) {\n\t\t\t\tthis.events.dispatch(\"framestarted\", {\n\t\t\t\t\ttype: \"framestarted\",\n\t\t\t\t\ttarget: this,\n\t\t\t\t\ttimestamp: currentTime,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tthis._checkComputedStyles();\n\t\t\tthis._runTickers(currentTime);\n\n\t\t\tconst animationDone = this._runAnimations(currentTime);\n\n\t\t\tthis._runDirties();\n\t\t\tthis._render();\n\t\t\tthis._renderer.resetImageArray();\n\t\t\tthis._positionHTMLElements();\n\n\t\t\tif (this.events.isEnabled(\"frameended\")) {\n\t\t\t\tthis.events.dispatch(\"frameended\", {\n\t\t\t\t\ttype: \"frameended\",\n\t\t\t\t\ttarget: this,\n\t\t\t\t\ttimestamp: currentTime,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\treturn this._tickers.length === 0 &&\n\t\t\t\tanimationDone &&\n\t\t\t\t!this._isDirtyAnimation &&\n\t\t\t\t!this._isDirty;\n\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\tpublic _runTicker(currentTime: number, now?: boolean) {\n\t\tif (!this.isDisposed()) {\n\t\t\tthis.animationTime = currentTime;\n\n\t\t\tconst done = this._renderFrame(currentTime);\n\n\t\t\t// No more work to do\n\t\t\tif (done) {\n\t\t\t\tthis._ticker = null;\n\t\t\t\tthis.animationTime = null;\n\n\t\t\t} else {\n\t\t\t\tif (!this._paused) {\n\t\t\t\t\tif (now) {\n\t\t\t\t\t\tthis._ticker!\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\trAF(this.fps, this._ticker!);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic _runTickerNow(timeout: number = 10000) {\n\t\tif (!this.isDisposed()) {\n\t\t\tconst endTime = performance.now() + timeout;\n\n\t\t\tfor (; ;) {\n\t\t\t\tconst currentTime = performance.now();\n\n\t\t\t\tif (currentTime >= endTime) {\n\t\t\t\t\tthis.animationTime = null;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tthis.animationTime = currentTime;\n\n\t\t\t\tconst done = this._renderFrame(currentTime);\n\n\t\t\t\tif (done) {\n\t\t\t\t\tthis.animationTime = null;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate _startTicker() {\n\t\tif (this._ticker === null) {\n\t\t\tthis.animationTime = null;\n\n\t\t\tthis._ticker = (currentTime) => {\n\t\t\t\tthis._runTicker(currentTime);\n\t\t\t};\n\n\t\t\trAF(this.fps, this._ticker!);\n\t\t}\n\t}\n\n\t/**\n\t * Returns whether the root is updating or not.\n\t */\n\tpublic get updateTick(): boolean {\n\t\treturn this._updateTick;\n\t}\n\n\t/**\n\t * Enables or disables the root updating.\n\t */\n\tpublic set updateTick(value: boolean) {\n\t\tthis._updateTick = value;\n\n\t\tif (value) {\n\t\t\tthis._startTicker();\n\t\t}\n\t}\n\n\tpublic _addDirtyEntity(entity: Entity) {\n\t\tthis._isDirty = true;\n\n\t\tif (this._dirty[entity.uid] === undefined) {\n\t\t\tthis._dirty[entity.uid] = entity;\n\t\t}\n\n\t\tthis._startTicker();\n\t}\n\n\tpublic _addDirtyParent(parent: IParent) {\n\t\tthis._isDirty = true;\n\t\tthis._isDirtyParents = true;\n\n\t\tif (this._dirtyParents[parent.uid] === undefined) {\n\t\t\tthis._dirtyParents[parent.uid] = parent;\n\t\t}\n\n\t\tthis._startTicker();\n\t}\n\n\tpublic _addDirtyBounds(entity: IBounds) {\n\t\tthis._isDirty = true;\n\n\t\tif (this._dirtyBounds[entity.uid] === undefined) {\n\t\t\tthis._dirtyBounds[entity.uid] = entity;\n\t\t}\n\n\t\tthis._startTicker();\n\t}\n\n\tpublic _addDirtyPosition(sprite: Sprite) {\n\t\tthis._isDirty = true;\n\n\t\tif (this._dirtyPositions[sprite.uid] === undefined) {\n\t\t\tthis._dirtyPositions[sprite.uid] = sprite;\n\t\t}\n\n\t\tthis._startTicker();\n\t}\n\n\tpublic _addAnimation(animation: IAnimation) {\n\t\tthis._isDirtyAnimation = true;\n\n\t\t// TODO use numeric id instead\n\t\tif (this._animations.indexOf(animation) === -1) {\n\t\t\tthis._animations.push(animation);\n\t\t}\n\n\t\tthis._startTicker();\n\t}\n\n\tpublic _markDirty() {\n\t\tthis._isDirty = true;\n\t}\n\n\tpublic _markDirtyRedraw() {\n\t\tthis.events.once(\"frameended\", () => {\n\t\t\tthis._isDirty = true;\n\t\t\tthis._startTicker();\n\t\t})\n\t}\n\n\tpublic eachFrame(f: (currentTime: number) => void): IDisposer {\n\t\tthis._tickers.push(f);\n\t\tthis._startTicker();\n\n\t\treturn new Disposer(() => {\n\t\t\t$array.removeFirst(this._tickers, f);\n\t\t});\n\t}\n\n\tpublic markDirtyGlobal(container?: Container): void {\n\t\tif (!container) {\n\t\t\tcontainer = this.container;\n\t\t}\n\t\tcontainer.walkChildren((child) => {\n\t\t\tif (child instanceof Container) {\n\t\t\t\tthis.markDirtyGlobal(child);\n\t\t\t}\n\t\t\tchild.markDirty();\n\t\t\tchild.markDirtyBounds();\n\t\t});\n\t}\n\n\t/**\n\t * Returns width of the target container, in pixels.\n\t *\n\t * @return Width\n\t */\n\tpublic width(): number {\n\t\t// TODO make this more efficient, maybe just return the renderer's width ?\n\t\treturn Math.floor(this._getCalculatedSize(this._getRealSize()).width);\n\t}\n\n\t/**\n\t * Returns height of the target container, in pixels.\n\t *\n\t * @return Height\n\t */\n\tpublic height(): number {\n\t\t// TODO make this more efficient, maybe just return the renderer's height ?\n\t\treturn Math.floor(this._getCalculatedSize(this._getRealSize()).height);\n\t}\n\n\t/**\n\t * Disposes root and all the content in it.\n\t */\n\tpublic dispose(): void {\n\t\tif (!this._isDisposed) {\n\t\t\tthis._isDisposed = true;\n\n\t\t\tthis._rootContainer.dispose();\n\t\t\tthis._renderer.dispose();\n\t\t\tthis.horizontalLayout.dispose();\n\t\t\tthis.verticalLayout.dispose();\n\t\t\tthis.interfaceColors.dispose();\n\n\t\t\t$array.each(this._disposers, (x) => {\n\t\t\t\tx.dispose();\n\t\t\t});\n\n\t\t\tif (this._inner) {\n\t\t\t\t$utils.removeElement(this._inner);\n\t\t\t}\n\n\t\t\t$array.remove(registry.rootElements, this);\n\t\t}\n\t}\n\n\t/**\n\t * Returns `true` if root element is disposed.\n\t *\n\t * @return Disposed?\n\t */\n\tpublic isDisposed(): boolean {\n\t\treturn this._isDisposed;\n\t}\n\n\t/**\n\t * Triggers screen reader read out a message.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/accessibility/} for more info\n\t * @param text Alert text\n\t */\n\tpublic readerAlert(text: string): void {\n\t\tif (this._a11yD !== true) {\n\t\t\tthis._readerAlertElement!.innerHTML = $utils.stripTags(text);\n\t\t}\n\t}\n\n\t/**\n\t * Sets themes to be used for the chart.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/themes/} for more info\n\t * @param themes A list of themes\n\t */\n\tpublic setThemes(themes: Array<Theme>): void {\n\t\tthis._rootContainer.set(\"themes\", themes);\n\n\t\t// otherwise new themes are not applied\n\t\tconst tooltipContainer = this.tooltipContainer;\n\t\tif (tooltipContainer) {\n\t\t\ttooltipContainer._applyThemes();\n\t\t}\n\n\t\t// @todo review this\n\t\tconst interfaceColors = this.interfaceColors;\n\t\tif (interfaceColors) {\n\t\t\tinterfaceColors._applyThemes();\n\t\t}\n\n\n\t}\n\n\tprotected _addTooltip() {\n\t\tif (!this.tooltipContainer) {\n\t\t\tconst tooltipContainerSettings = this._tooltipContainerSettings;\n\t\t\tconst tooltipContainer = this._rootContainer.children.push(Container.new(this, {\n\t\t\t\tposition: \"absolute\",\n\t\t\t\tisMeasured: false,\n\t\t\t\twidth: p100,\n\t\t\t\theight: p100,\n\t\t\t\tlayer: tooltipContainerSettings ? 35 : 30,\n\t\t\t\tlayerMargin: tooltipContainerSettings ? tooltipContainerSettings : undefined\n\t\t\t}));\n\t\t\tthis.tooltipContainer = tooltipContainer;\n\n\t\t\tconst tooltip = Tooltip.new(this, {});\n\t\t\tthis.container.set(\"tooltip\", tooltip);\n\t\t\ttooltip.hide(0);\n\t\t\tthis._tooltip = tooltip;\n\t\t}\n\t}\n\n\t/**\n\t * Accesibility\n\t */\n\n\tpublic _registerTabindexOrder(target: Sprite): void {\n\t\tif (this._a11yD == true) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (target.get(\"focusable\")) {\n\t\t\t$array.pushOne(this._tabindexes, target);\n\t\t}\n\t\telse {\n\t\t\t$array.remove(this._tabindexes, target);\n\t\t}\n\t\tthis._invalidateTabindexes();\n\t}\n\n\tpublic _unregisterTabindexOrder(target: Sprite): void {\n\t\tif (this._a11yD == true) {\n\t\t\treturn;\n\t\t}\n\n\t\t$array.remove(this._tabindexes, target);\n\t\tthis._invalidateTabindexes();\n\t}\n\n\tpublic _invalidateTabindexes(): void {\n\t\tif (this._a11yD == true) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._tabindexes.sort((a: Sprite, b: Sprite) => {\n\t\t\tconst aindex = a.get(\"tabindexOrder\", 0);\n\t\t\tconst bindex = b.get(\"tabindexOrder\", 0);\n\t\t\tif (aindex == bindex) {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\telse if (aindex > bindex) {\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t});\n\n\t\tconst groups: Array<string | number> = [];\n\t\t$array.each(this._tabindexes, (item, index) => {\n\t\t\tif (!item.getPrivate(\"focusElement\")) {\n\t\t\t\tthis._makeFocusElement(index, item);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis._moveFocusElement(index, item);\n\t\t\t}\n\t\t\tconst group = item.get(\"focusableGroup\");\n\t\t\tif (group && item.getPrivate(\"focusable\") !== false) {\n\t\t\t\tif (groups.indexOf(group) !== -1) {\n\t\t\t\t\t// Non-first element in the group, make it not directly focusable\n\t\t\t\t\titem.getPrivate(\"focusElement\")!.dom.setAttribute(\"tabindex\", \"-1\");\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tgroups.push(group);\n\t\t\t\t}\n\t\t\t}\n\n\t\t});\n\n\t}\n\n\tpublic _updateCurrentFocus(): void {\n\t\tif (this._a11yD == true) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._focusedSprite) {\n\t\t\tthis._decorateFocusElement(this._focusedSprite);\n\t\t\tthis._positionFocusElement(this._focusedSprite);\n\t\t}\n\t}\n\n\tpublic _decorateFocusElement(target: Sprite, focusElement?: HTMLDivElement): void {\n\n\t\tif (this._a11yD == true) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Decorate with proper accessibility attributes\n\t\tif (!focusElement) {\n\t\t\tfocusElement = target.getPrivate(\"focusElement\")!.dom;\n\t\t}\n\n\t\tif (!focusElement) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst role = target.get(\"role\");\n\t\tif (role) {\n\t\t\tfocusElement.setAttribute(\"role\", role);\n\t\t}\n\t\telse {\n\t\t\tfocusElement.removeAttribute(\"role\");\n\t\t}\n\n\t\tconst ariaLabel = target.get(\"ariaLabel\");\n\t\tif (ariaLabel) {\n\t\t\tconst label = populateString(target, ariaLabel);\n\t\t\tfocusElement.setAttribute(\"aria-label\", label);\n\t\t}\n\t\telse {\n\t\t\tfocusElement.removeAttribute(\"aria-label\");\n\t\t}\n\n\t\tconst ariaLive = target.get(\"ariaLive\");\n\t\tif (ariaLive) {\n\t\t\tfocusElement.setAttribute(\"aria-live\", ariaLive);\n\t\t}\n\t\telse {\n\t\t\tfocusElement.removeAttribute(\"aria-live\");\n\t\t}\n\n\t\tconst ariaChecked = target.get(\"ariaChecked\");\n\t\tif (ariaChecked != null && role && [\"checkbox\", \"option\", \"radio\", \"menuitemcheckbox\", \"menuitemradio\", \"treeitem\"].indexOf(role) !== -1) {\n\t\t\tfocusElement.setAttribute(\"aria-checked\", ariaChecked ? \"true\" : \"false\");\n\t\t}\n\t\telse {\n\t\t\tfocusElement.removeAttribute(\"aria-checked\");\n\t\t}\n\n\t\tconst ariaCurrent = target.get(\"ariaCurrent\");\n\t\tif (ariaCurrent != null) {\n\t\t\tfocusElement.setAttribute(\"aria-current\", ariaCurrent);\n\t\t}\n\t\telse {\n\t\t\tfocusElement.removeAttribute(\"aria-current\");\n\t\t}\n\n\t\tconst ariaSelected = target.get(\"ariaSelected\");\n\t\tif (ariaSelected != null && role && [\"gridcell\", \"option\", \"row\", \"tab\", \"columnheader\", \"rowheader\", \"treeitem\"].indexOf(role) !== -1) {\n\t\t\tfocusElement.setAttribute(\"aria-selected\", ariaSelected ? \"true\" : \"false\");\n\t\t}\n\t\telse {\n\t\t\tfocusElement.removeAttribute(\"aria-selected\");\n\t\t}\n\n\t\tif (target.get(\"ariaHidden\")) {\n\t\t\tfocusElement.setAttribute(\"aria-hidden\", \"true\");\n\t\t}\n\t\telse {\n\t\t\tfocusElement.removeAttribute(\"aria-hidden\");\n\t\t}\n\n\t\tconst ariaOrientation = target.get(\"ariaOrientation\");\n\t\tif (ariaOrientation) {\n\t\t\tfocusElement.setAttribute(\"aria-orientation\", ariaOrientation);\n\t\t}\n\t\telse {\n\t\t\tfocusElement.removeAttribute(\"aria-orientation\");\n\t\t}\n\n\t\tconst ariaValueNow = target.get(\"ariaValueNow\");\n\t\tif (ariaValueNow) {\n\t\t\tfocusElement.setAttribute(\"aria-valuenow\", ariaValueNow);\n\t\t}\n\t\telse {\n\t\t\tfocusElement.removeAttribute(\"aria-valuenow\");\n\t\t}\n\n\t\tconst ariaValueMin = target.get(\"ariaValueMin\");\n\t\tif (ariaValueMin) {\n\t\t\tfocusElement.setAttribute(\"aria-valuemin\", ariaValueMin);\n\t\t}\n\t\telse {\n\t\t\tfocusElement.removeAttribute(\"aria-valuemin\");\n\t\t}\n\n\t\tconst ariaValueMax = target.get(\"ariaValueMax\");\n\t\tif (ariaValueMax) {\n\t\t\tfocusElement.setAttribute(\"aria-valuemax\", ariaValueMax);\n\t\t}\n\t\telse {\n\t\t\tfocusElement.removeAttribute(\"aria-valuemax\");\n\t\t}\n\n\t\tconst ariaValueText = target.get(\"ariaValueText\");\n\t\tif (ariaValueText) {\n\t\t\tfocusElement.setAttribute(\"aria-valuetext\", ariaValueText);\n\t\t}\n\t\telse {\n\t\t\tfocusElement.removeAttribute(\"aria-valuetext\");\n\t\t}\n\n\t\tconst ariaControls = target.get(\"ariaControls\");\n\t\tif (ariaControls) {\n\t\t\tfocusElement.setAttribute(\"aria-controls\", ariaControls);\n\t\t}\n\t\telse {\n\t\t\tfocusElement.removeAttribute(\"aria-controls\");\n\t\t}\n\n\t\tif (target.get(\"visible\") && target.get(\"opacity\") !== 0 && target.get(\"role\") != \"tooltip\" && !target.isHidden() && target.getPrivate(\"focusable\") !== false) {\n\t\t\tif (focusElement.getAttribute(\"tabindex\") != \"-1\") {\n\t\t\t\tfocusElement.setAttribute(\"tabindex\", \"\" + this.tabindex);\n\t\t\t}\n\t\t\tfocusElement.removeAttribute(\"aria-hidden\");\n\t\t}\n\t\telse {\n\t\t\tfocusElement.removeAttribute(\"tabindex\");\n\t\t\tfocusElement.setAttribute(\"aria-hidden\", \"true\");\n\t\t}\n\t}\n\n\tpublic _makeFocusElement(index: number, target: Sprite): void {\n\n\t\tif (target.getPrivate(\"focusElement\") || this._a11yD == true) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Init\n\t\tconst focusElement = document.createElement(\"div\");\n\t\tif (target.get(\"role\") != \"tooltip\") {\n\t\t\tfocusElement.tabIndex = this.tabindex;\n\t\t}\n\t\tfocusElement.style.position = \"absolute\";\n\t\t$utils.setInteractive(focusElement, false);\n\n\t\tconst disposers: Array<IDisposer> = [];\n\n\t\ttarget.setPrivate(\"focusElement\", {\n\t\t\tdom: focusElement,\n\t\t\tdisposers,\n\t\t});\n\n\t\tthis._decorateFocusElement(target);\n\n\t\tdisposers.push($utils.addEventListener(focusElement, \"focus\", (ev: FocusEvent) => {\n\t\t\tthis._handleFocus(ev);\n\t\t}));\n\n\t\tdisposers.push($utils.addEventListener(focusElement, \"blur\", (ev: FocusEvent) => {\n\t\t\tthis._handleBlur(ev);\n\t\t}));\n\n\t\tthis._moveFocusElement(index, target);\n\n\t}\n\n\tpublic _removeFocusElement(target: Sprite): void {\n\t\tif (this._a11yD == true) {\n\t\t\treturn;\n\t\t}\n\n\t\t$array.remove(this._tabindexes, target);\n\t\tconst focusElement = target.getPrivate(\"focusElement\");\n\t\tif (focusElement) {\n\t\t\tconst container = this._focusElementContainer!;\n\t\t\tcontainer.removeChild(focusElement.dom);\n\t\t\t$array.each(focusElement.disposers, (x) => {\n\t\t\t\tx.dispose();\n\t\t\t});\n\t\t}\n\t}\n\n\tpublic _hideFocusElement(target: Sprite): void {\n\t\tif (this._a11yD == true) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst focusElement = target.getPrivate(\"focusElement\")!;\n\t\tfocusElement.dom.style.display = \"none\";\n\t}\n\n\tprotected _moveFocusElement(index: number, target: Sprite): void {\n\t\tif (this._a11yD == true) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Get container\n\t\tconst container = this._focusElementContainer!;\n\t\tconst focusElement = target.getPrivate(\"focusElement\")!.dom;\n\n\t\tif (focusElement === this._focusElementContainer!.children[index]) {\n\t\t\t// Nothing to do\n\t\t\treturn;\n\t\t}\n\n\t\tconst next = this._focusElementContainer!.children[index + 1];\n\t\tif (next) {\n\t\t\tcontainer.insertBefore(focusElement, next);\n\t\t}\n\t\telse {\n\t\t\tcontainer.append(focusElement);\n\t\t}\n\t}\n\n\tprotected _positionFocusElement(target: Sprite): void {\n\t\tif (this._a11yD == true || target == undefined) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst bounds = target.globalBounds();\n\n\t\tlet width = bounds.right == bounds.left ? target.width() : bounds.right - bounds.left;\n\t\tlet height = bounds.top == bounds.bottom ? target.height() : bounds.bottom - bounds.top;\n\n\t\tconst padding = this._settings.focusPadding !== undefined ? this._settings.focusPadding : 2;\n\n\t\tlet x = bounds.left - padding;\n\t\tlet y = bounds.top - padding;\n\n\t\tif (width < 0) {\n\t\t\tx += width;\n\t\t\twidth = Math.abs(width);\n\t\t}\n\n\t\tif (height < 0) {\n\t\t\ty += height;\n\t\t\theight = Math.abs(height);\n\t\t}\n\n\t\tconst focusElement = target.getPrivate(\"focusElement\")!.dom;\n\t\tfocusElement.style.top = y + \"px\";\n\t\tfocusElement.style.left = x + \"px\";\n\t\tfocusElement.style.width = (width + padding * 2) + \"px\";\n\t\tfocusElement.style.height = (height + padding * 2) + \"px\";\n\n\t}\n\n\tprotected _getSpriteByFocusElement(target: any): Sprite | undefined {\n\t\tlet found: Sprite | undefined;\n\t\t$array.eachContinue(this._tabindexes, (item, _index) => {\n\t\t\tif (item.getPrivate(\"focusElement\")!.dom === target) {\n\t\t\t\tfound = item;\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t});\n\t\treturn found;\n\t}\n\n\tprotected _handleFocus(ev: FocusEvent): void {\n\t\tif (this._a11yD == true) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Get element\n\t\t//const focused = this._tabindexes[index];\n\t\tconst focused = this._getSpriteByFocusElement(ev.target);\n\n\t\tif (!focused) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Jump over hidden elements\n\t\tif (!focused.isVisibleDeep()) {\n\t\t\tthis._focusNext(<HTMLDivElement>ev.target, this._isShift ? -1 : 1);\n\t\t\treturn;\n\t\t}\n\n\t\t// Size and position\n\t\tthis._positionFocusElement(focused);\n\t\t//this._decorateFocusElement(focused);\n\n\t\tthis._focusedSprite = focused;\n\n\t\tif (focused.events.isEnabled(\"focus\")) {\n\t\t\tfocused.events.dispatch(\"focus\", {\n\t\t\t\ttype: \"focus\",\n\t\t\t\toriginalEvent: ev,\n\t\t\t\ttarget: focused\n\t\t\t});\n\t\t}\n\t}\n\n\tprotected _focusNext(el: HTMLDivElement, direction: 1 | -1, group?: string | number): void {\n\t\tif (this._a11yD == true) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst focusableElements = Array.from(document.querySelectorAll([\n\t\t\t'a[href]',\n\t\t\t'area[href]',\n\t\t\t'button:not([disabled])',\n\t\t\t'details',\n\t\t\t'input:not([disabled])',\n\t\t\t'iframe:not([disabled])',\n\t\t\t'select:not([disabled])',\n\t\t\t'textarea:not([disabled])',\n\t\t\t'[contentEditable=\"\"]',\n\t\t\t'[contentEditable=\"true\"]',\n\t\t\t'[contentEditable=\"TRUE\"]',\n\t\t\t'[tabindex]:not([tabindex^=\"-\"])',\n\t\t\t//':not([disabled])'\n\t\t].join(',')));\n\n\t\tlet index = focusableElements.indexOf(el) + direction;\n\n\t\tif (index < 0) {\n\t\t\tindex = focusableElements.length - 1;\n\t\t}\n\t\telse if (index >= focusableElements.length) {\n\t\t\tindex = 0;\n\t\t}\n\n\t\tconst targetElement = (<HTMLDivElement>focusableElements[index]);\n\n\t\tif (group && direction == -1) {\n\t\t\tconst target = this._getSpriteByFocusElement(targetElement);\n\t\t\tif (target && target.get(\"focusableGroup\") == group) {\n\t\t\t\tthis._focusNext(targetElement, direction);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\ttargetElement.focus();\n\t}\n\n\tprotected _handleBlur(ev: FocusEvent): void {\n\t\tif (this._a11yD == true) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst focused = this._focusedSprite;\n\t\tif (focused && !focused.isDisposed() && focused.events.isEnabled(\"blur\")) {\n\t\t\tfocused.events.dispatch(\"blur\", {\n\t\t\t\ttype: \"blur\",\n\t\t\t\toriginalEvent: ev,\n\t\t\t\ttarget: focused\n\t\t\t});\n\t\t}\n\t\tthis._focusedSprite = undefined;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateTooltip(target: Text): void {\n\t\tif (this._a11yD == true) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst text = $utils.stripTags(target._getText());\n\t\tlet tooltipElement = target.getPrivate(\"tooltipElement\");\n\t\tif (target.get(\"role\") == \"tooltip\" && text != \"\") {\n\t\t\tif (!tooltipElement) {\n\t\t\t\ttooltipElement = this._makeTooltipElement(target);\n\t\t\t}\n\t\t\tif (tooltipElement.innerHTML != text) {\n\t\t\t\ttooltipElement.innerHTML = text!;\n\t\t\t}\n\t\t\ttooltipElement.setAttribute(\"aria-hidden\", target.isVisibleDeep() ? \"false\" : \"true\");\n\t\t}\n\t\telse if (tooltipElement) {\n\t\t\ttooltipElement.remove();\n\t\t\ttarget.removePrivate(\"tooltipElement\");\n\t\t}\n\t}\n\n\tpublic _makeTooltipElement(target: Text): HTMLDivElement {\n\t\tconst container = this._tooltipElementContainer!;\n\t\tconst tooltipElement = document.createElement(\"div\");\n\t\ttooltipElement.style.position = \"absolute\";\n\t\ttooltipElement.style.width = \"1px\";\n\t\ttooltipElement.style.height = \"1px\";\n\t\ttooltipElement.style.overflow = \"hidden\";\n\t\ttooltipElement.style.clip = \"rect(1px, 1px, 1px, 1px)\";\n\n\t\t$utils.setInteractive(tooltipElement, false);\n\n\t\tthis._decorateFocusElement(target, tooltipElement);\n\t\tcontainer.append(tooltipElement);\n\t\ttarget.setPrivate(\"tooltipElement\", tooltipElement);\n\n\t\treturn tooltipElement;\n\t}\n\n\tpublic _removeTooltipElement(target: Text): void {\n\t\tif (this._a11yD == true) {\n\t\t\treturn;\n\t\t}\n\t\tconst tooltipElement = target.getPrivate(\"tooltipElement\");\n\t\tif (tooltipElement) {\n\t\t\tconst parent = tooltipElement.parentElement;\n\t\t\tif (parent) {\n\t\t\t\tparent.removeChild(tooltipElement);\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic _invalidateAccessibility(target: Sprite): void {\n\t\tif (this._a11yD == true) {\n\t\t\treturn;\n\t\t}\n\t\tthis._focusElementDirty = true;\n\t\tconst focusElement = target.getPrivate(\"focusElement\");\n\t\tif (target.get(\"focusable\")) {\n\t\t\tif (focusElement) {\n\t\t\t\tthis._decorateFocusElement(target);\n\t\t\t\tthis._positionFocusElement(target);\n\t\t\t}\n\t\t\t// else {\n\t\t\t// \tthis._renderer._makeFocusElement(0, this);\n\t\t\t// }\n\t\t}\n\t\telse if (focusElement) {\n\t\t\tthis._removeFocusElement(target);\n\t\t}\n\t\t//this.updateCurrentFocus();\n\t}\n\n\t/**\n\t * Returns `true` if `target` is currently focused.\n\t *\n\t * @param target Target\n\t * @return Focused?\n\t */\n\tpublic focused(target: Sprite): boolean {\n\t\treturn this._focusedSprite === target;\n\t}\n\n\t/**\n\t * Converts document coordinates to coordinates withing root element.\n\t *\n\t * @param point Document point\n\t * @return Root point\n\t */\n\tpublic documentPointToRoot(point: IPoint): IPoint {\n\t\tconst rect = this._getRealSize();\n\t\tconst size = this._getCalculatedSize(rect);\n\n\t\tconst scaleWidth = size.width / rect.width;\n\t\tconst scaleHeight = size.height / rect.height;\n\n\t\treturn {\n\t\t\tx: (point.x - rect.left) * scaleWidth,\n\t\t\ty: (point.y - rect.top) * scaleHeight,\n\t\t};\n\t}\n\n\t/**\n\t * Converts root coordinates to document\n\t *\n\t * @param point Document point\n\t * @return Root point\n\t */\n\tpublic rootPointToDocument(point: IPoint): IPoint {\n\t\tconst rect = this._getRealSize();\n\t\tconst size = this._getCalculatedSize(rect);\n\n\t\tconst scaleWidth = size.width / rect.width;\n\t\tconst scaleHeight = size.height / rect.height;\n\n\t\treturn {\n\t\t\tx: (point.x / scaleWidth) + rect.left,\n\t\t\ty: (point.y / scaleHeight) + rect.top\n\t\t};\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic addDisposer<T extends IDisposer>(disposer: T): T {\n\t\tthis._disposers.push(disposer);\n\t\treturn disposer;\n\t}\n\n\tprotected _updateComputedStyles(): boolean {\n\t\tconst styles = window.getComputedStyle(this.dom);\n\t\tlet fontHash = \"\";\n\t\t$object.each(styles, (key, val) => {\n\t\t\tif ($type.isString(key) && key.match(/^font/)) {\n\t\t\t\tfontHash += val;\n\t\t\t}\n\t\t})\n\t\tconst changed = fontHash != this._fontHash;\n\t\tif (changed) {\n\t\t\tthis._fontHash = fontHash;\n\t\t}\n\t\treturn changed;\n\t}\n\n\tprotected _checkComputedStyles(): void {\n\t\tif (this._updateComputedStyles()) {\n\t\t\tthis._invalidateLabelBounds(this.container);\n\t\t}\n\t}\n\n\tprotected _invalidateLabelBounds(target: Sprite): void {\n\t\tif (target instanceof Container) {\n\t\t\ttarget.children.each((child) => {\n\t\t\t\tthis._invalidateLabelBounds(child);\n\t\t\t});\n\t\t}\n\t\telse if (target instanceof Text) {\n\t\t\ttarget.markDirtyBounds();\n\t\t}\n\t}\n\n\t/**\n\t * To all the clever heads out there. Yes, we did not make any attempts to\n\t * scramble this.\n\t *\n\t * This is a part of a tool meant for our users to manage their commercial\n\t * licenses for removal of amCharts branding from charts.\n\t *\n\t * The only legit way to do so is to purchase a commercial license for amCharts:\n\t * https://www.amcharts.com/online-store/\n\t *\n\t * Removing or altering this code, or disabling amCharts branding in any other\n\t * way is against the license and thus illegal.\n\t */\n\tprotected _hasLicense(): boolean {\n\t\tfor (let i = 0; i < registry.licenses.length; i++) {\n\t\t\tif (registry.licenses[i].match(/^AM5C.{5,}/i)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\tpublic _licenseApplied(): void {\n\t\tif (this._logo) {\n\t\t\tthis._logo.set(\"forceHidden\", true);\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic get debugGhostView(): boolean {\n\t\treturn this._renderer.debugGhostView;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic set debugGhostView(value: boolean) {\n\t\tthis._renderer.debugGhostView = value;\n\t}\n\n\t/**\n\t * Set this to `true` if you need chart to require first a tap onto it before\n\t * touch gesture related functionality like zoom/pan is turned on.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/getting-started/root-element/#Touch_related_options} for more info\n\t * @default false\n\t * @since 5.2.9\n\t * @param value Needs a tap to activate touch functions\n\t */\n\tpublic set tapToActivate(value: boolean) {\n\t\tthis._renderer.tapToActivate = value;\n\t}\n\n\t/**\n\t * @return Needs a tap to activate touch functions\n\t */\n\tpublic get tapToActivate(): boolean {\n\t\treturn this._renderer.tapToActivate;\n\t}\n\n\t/**\n\t * If `tapToActivate` is set to `true`, this setting will determine number\n\t * of milliseconds the chart will stay \"active\", before releasing the\n\t * controls back to the page.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/getting-started/root-element/#Touch_related_options} for more info\n\t * @default 3000\n\t * @since 5.2.9\n\t * @param value Timeout\n\t */\n\tpublic set tapToActivateTimeout(value: number) {\n\t\tthis._renderer.tapToActivateTimeout = value;\n\t}\n\n\t/**\n\t * @return Timeout\n\t */\n\tpublic get tapToActivateTimeout(): number {\n\t\treturn this._renderer.tapToActivateTimeout;\n\t}\n\n\tpublic _makeHTMLElement(target: Container): HTMLDivElement {\n\n\t\t// Get container\n\t\tconst container = this._htmlElementContainer!;\n\n\t\t// Init\n\t\tconst htmlElement = document.createElement(\"div\");\n\t\ttarget.setPrivate(\"htmlElement\", htmlElement);\n\n\t\t//htmlElement.tabIndex = this.tabindex;\n\t\thtmlElement.style.position = \"absolute\";\n\t\thtmlElement.style.overflow = \"auto\";\n\t\thtmlElement.style.boxSizing = \"border-box\";\n\t\t$utils.setInteractive(htmlElement, target.get(\"interactive\", false));\n\n\t\t// Translate events\n\t\tif (target.events.isEnabled(\"click\")) {\n\t\t\t$utils.setInteractive(htmlElement, true);\n\t\t\tthis._disposers.push($utils.addEventListener<PointerEvent | MouseEvent>(htmlElement, \"click\", (ev: IPointerEvent) => {\n\t\t\t\tconst downEvent = this._renderer.getEvent(ev);\n\t\t\t\ttarget.events.dispatch(\"click\", {\n\t\t\t\t\ttype: \"click\",\n\t\t\t\t\toriginalEvent: downEvent.event,\n\t\t\t\t\tpoint: downEvent.point,\n\t\t\t\t\tsimulated: false,\n\t\t\t\t\ttarget: target\n\t\t\t\t});\n\t\t\t}));\n\t\t}\n\n\t\tthis._positionHTMLElement(target);\n\n\t\tcontainer.append(htmlElement);\n\n\t\t$array.pushOne(this._htmlEnabledContainers, target);\n\n\t\treturn htmlElement;\n\t}\n\n\tpublic _positionHTMLElements(): void {\n\t\t$array.each(this._htmlEnabledContainers, (target) => {\n\t\t\tthis._positionHTMLElement(target);\n\t\t});\n\t}\n\n\tpublic _positionHTMLElement(target: Container): void {\n\t\tconst htmlElement = target.getPrivate(\"htmlElement\");\n\t\tif (htmlElement) {\n\n\t\t\t// Translate settings\n\t\t\tconst visualSettings = [\n\t\t\t\t\"paddingTop\",\n\t\t\t\t\"paddingRight\",\n\t\t\t\t\"paddingBottom\",\n\t\t\t\t\"paddingLeft\",\n\t\t\t\t\"minWidth\",\n\t\t\t\t\"minHeight\",\n\t\t\t\t\"maxWidth\",\n\t\t\t\t\"maxHeight\"\n\t\t\t];\n\t\t\t$array.each(visualSettings, (setting: any) => {\n\t\t\t\tconst value = target.get(setting);\n\t\t\t\tif (value) {\n\t\t\t\t\thtmlElement.style[setting] = value + \"px\";\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\thtmlElement.style[setting] = \"\";\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tconst strtingSettings = [\n\t\t\t\t\"fontFamily\",\n\t\t\t\t\"fontSize\",\n\t\t\t\t\"fontStyle\",\n\t\t\t\t\"fontWeight\",\n\t\t\t\t\"fontStyle\",\n\t\t\t\t\"fontVariant\",\n\t\t\t\t\"textDecoration\"\n\t\t\t];\n\t\t\t$array.each(strtingSettings, (setting: any) => {\n\t\t\t\tconst value = target.get(setting);\n\t\t\t\tif (value) {\n\t\t\t\t\thtmlElement.style[setting] = value + \"\";\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\thtmlElement.style[setting] = \"\";\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// Init and reset scale / rotation\n\t\t\tconst scale = target.compositeScale() || 1;\n\t\t\tconst rotation = target.compositeRotation() || 0;\n\t\t\thtmlElement.style.transform = \"\";\n\t\t\thtmlElement.style.transformOrigin = \"\";\n\n\t\t\t// Deal with opacity\n\t\t\tconst opacity = target.compositeOpacity();\n\t\t\tsetTimeout(() => {\n\t\t\t\thtmlElement.style.opacity = opacity + \"\";\n\t\t\t}, 10);\n\n\t\t\tconst visible = target.isVisibleDeep();\n\t\t\tif (visible) {\n\t\t\t\thtmlElement.style.display = \"block\";\n\t\t\t}\n\n\t\t\t// Deal with position\n\t\t\t// const bounds = target.globalBounds();\n\t\t\t// htmlElement.style.top = (bounds.top) + \"px\";\n\t\t\t// htmlElement.style.left = (bounds.left) + \"px\";\n\t\t\tlet pos = {\n\t\t\t\tx: target.x() + target.get(\"dx\", 0),\n\t\t\t\ty: target.y() + target.get(\"dy\", 0)\n\t\t\t}\n\t\t\tif (target.parent) {\n\t\t\t\tpos = target.parent.toGlobal(pos)\n\t\t\t}\n\t\t\thtmlElement.style.top = pos.y + \"px\";\n\t\t\thtmlElement.style.left = pos.x + \"px\";\n\n\t\t\t// Use width/height if those are set\n\t\t\tconst width = target.get(\"width\");\n\t\t\tconst height = target.get(\"height\");\n\n\t\t\tlet w: number = 0;\n\t\t\tlet h: number = 0;\n\n\t\t\tif (width) {\n\t\t\t\tw = target.width();\n\t\t\t}\n\n\t\t\tif (height) {\n\t\t\t\th = target.height();\n\t\t\t}\n\n\n\t\t\tif (!width || !height) {\n\t\t\t\thtmlElement.style.position = \"fixed\";\n\t\t\t\thtmlElement.style.width = \"\";\n\t\t\t\thtmlElement.style.height = \"\";\n\t\t\t\tconst bbox = htmlElement.getBoundingClientRect();\n\t\t\t\thtmlElement.style.position = \"absolute\";\n\t\t\t\tif (!width) w = bbox.width;\n\t\t\t\tif (!height) h = bbox.height;\n\n\t\t\t\tlet lw = w / scale;\n\t\t\t\tlet lh = h / scale;\n\n\t\t\t\tlet cx = target.get(\"centerX\", 0);\n\t\t\t\tlet cy = target.get(\"centerY\", 0);\n\n\t\t\t\tlet ll = 0;\n\t\t\t\tlet lr = 0;\n\t\t\t\tlet lt = 0;\n\t\t\t\tlet lb = 0;\n\n\t\t\t\tif (cx instanceof Percent) {\n\t\t\t\t\tll = -cx.value * lw;\n\t\t\t\t\tlr = (1 - cx.value) * lw;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tll = -cx;\n\t\t\t\t\tlr = lw - cx;\n\t\t\t\t}\n\n\t\t\t\tif (cy instanceof Percent) {\n\t\t\t\t\tlt = -cy.value * lh;\n\t\t\t\t\tlb = (1 - cy.value) * lh;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tlt = -cy;\n\t\t\t\t\tlb = lh - cy;\n\t\t\t\t}\n\n\t\t\t\ttarget._localBounds = { left: ll, right: lr, top: lt, bottom: lb };\n\n\t\t\t\tlet previousBounds = target._adjustedLocalBounds;\n\t\t\t\tlet newBounds = target._display.getAdjustedBounds(target._localBounds);\n\t\t\t\ttarget._adjustedLocalBounds = newBounds;\n\n\t\t\t\t// compare each value of the bounds\n\t\t\t\tif (previousBounds.left !== newBounds.left || previousBounds.right !== newBounds.right || previousBounds.top !== newBounds.top || previousBounds.bottom !== newBounds.bottom) {\n\t\t\t\t\ttarget.markDirtyBounds();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (w > 0) {\n\t\t\t\thtmlElement.style.minWidth = (w) + \"px\";\n\t\t\t}\n\t\t\tif (h > 0) {\n\t\t\t\thtmlElement.style.minHeight = (h) + \"px\";\n\t\t\t}\n\n\t\t\t// Hide or show\n\t\t\tif (!visible || opacity == 0) {\n\t\t\t\thtmlElement.style.display = \"none\";\n\t\t\t}\n\n\t\t\t// Center position\n\t\t\tconst x = target.get(\"centerX\", 0);\n\t\t\tconst originX = isPercent(x) ? (x as Percent).percent + \"%\" : x + \"px\";\n\t\t\tconst y = target.get(\"centerY\", 0);\n\t\t\tconst originY = isPercent(y) ? (y as Percent).percent + \"%\" : y + \"px\";\n\n\t\t\tif (x || y) {\n\t\t\t\thtmlElement.style.transform = \"translate(-\" + originX + \", -\" + originY + \")\" + htmlElement.style.transform;\n\t\t\t}\n\n\t\t\t// Deal with scale\n\t\t\tif (scale != 1) {\n\t\t\t\thtmlElement.style.transform += \"scale(\" + scale + \")\";\n\t\t\t}\n\n\t\t\tif (rotation != 0) {\n\t\t\t\thtmlElement.style.transform += \" rotate(\" + rotation + \"deg)\";\n\t\t\t}\n\n\t\t\tif (htmlElement.style.transform != \"\") {\n\t\t\t\thtmlElement.style.transformOrigin = originX + \" \" + originY;\n\t\t\t\t//htmlElement.style.transformOrigin = \"0% 0%\";\n\t\t\t}\n\n\n\t\t}\n\t}\n\n\tpublic _setHTMLContent(target: Container, html: string): void {\n\t\tlet htmlElement = target.getPrivate(\"htmlElement\");\n\t\tif (!htmlElement) {\n\t\t\thtmlElement = this._makeHTMLElement(target);\n\t\t}\n\t\tif (htmlElement.innerHTML != html) {\n\t\t\thtmlElement.innerHTML = html;\n\t\t}\n\t}\n\n\tpublic _removeHTMLContent(target: Container): void {\n\t\tlet htmlElement = target.getPrivate(\"htmlElement\");\n\t\tif (htmlElement) {\n\t\t\tthis._htmlElementContainer!.removeChild(htmlElement);\n\t\t\ttarget.removePrivate(\"htmlElement\");\n\t\t}\n\t\t$array.remove(this._htmlEnabledContainers, target);\n\t}\n}\n","import type { Entity } from \"./util/Entity\";\nimport { Template } from \"./util/Template\";\nimport type { Root } from \"./Root\";\nimport type { IClasses } from \"./Classes\";\nimport * as $order from \"./util/Order\";\nimport * as $array from \"./util/Array\";\n\nexport interface IRule<A extends Entity> {\n\ttags: Array<string>;\n\ttemplate: Template<A>;\n}\n\n/**\n * A base class for an amCharts theme.\n *\n * @see {@link https://www.amcharts.com/docs/v5/concepts/themes/} for more info\n * @important\n */\nexport class Theme {\n\n\tprotected _root!: Root;\n\n\t/**\n\t * Use this method to create an instance of this class.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/getting-started/#New_element_syntax} for more info\n\t * @param root Root element\n\t * @param settings Settings\n\t * @param template Template\n\t * @return Instantiated object\n\t */\n\tstatic new<T extends typeof Theme>(this: T, root: Root): InstanceType<T> {\n\t\tconst x = (new this(root, true)) as InstanceType<T>;\n\t\tx.setupDefaultRules();\n\t\treturn x;\n\t}\n\n\tconstructor(root: Root, isReal:boolean) {\n\t\tthis._root = root;\n\t\tif (!isReal) {\n\t\t\tthrow new Error(\"You cannot use `new Class()`, instead use `Class.new()`\");\n\t\t}\n\t}\n\n\tprotected setupDefaultRules(): void {}\n\n\tprotected _rules: { [type: string]: Array<IRule<Entity>>; } = {};\n\n\t/**\n\t * Looks up the rules for a specific theme class.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/themes/} for more info\n\t * @param themeClass Theme class\n\t * @return Array<IRule<A>>\n\t */\n\tpublic _lookupRules<A extends Entity>(themeClass: string): Array<IRule<A>> | undefined {\n\t\treturn this._rules[themeClass] as unknown as Array<IRule<A>> | undefined;\n\t}\n\n\t/**\n\t * Creates a [[Template]] for specific theme class and tags.\n\t *\n\t * NOTE: the difference from `rule()` is that `ruleRaw()` does not do any\n\t * type checks.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/themes/} for more info\n\t * @param themeClass Theme class\n\t * @param themeTags Theme tags\n\t * @return Template\n\t */\n\tpublic ruleRaw<A extends Entity>(themeClass: string, themeTags: Array<string> = []): Template<A> {\n\t\tlet rules = this._rules[themeClass];\n\n\t\tif (!rules) {\n\t\t\trules = this._rules[themeClass] = [];\n\t\t}\n\n\t\tthemeTags.sort($order.compare);\n\n\t\tconst { index, found } = $array.getSortedIndex(rules, (x) => {\n\t\t\tconst order = $order.compare(x.tags.length, themeTags.length);\n\n\t\t\tif (order === 0) {\n\t\t\t\treturn $order.compareArray(x.tags, themeTags, $order.compare);\n\n\t\t\t} else {\n\t\t\t\treturn order;\n\t\t\t}\n\t\t});\n\n\t\tif (found) {\n\t\t\treturn rules[index].template as Template<A>;\n\n\t\t} else {\n\t\t\tconst template = Template.new<A>({});\n\n\t\t\trules.splice(index, 0, {\n\t\t\t\ttags: themeTags,\n\t\t\t\ttemplate,\n\t\t\t});\n\n\t\t\treturn template;\n\t\t}\n\t}\n\n\t/**\n\t * Creates a [[Template]] for specific theme class and tags.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/themes/} for more info\n\t * @param themeClass Theme class\n\t * @param themeTags Theme tags\n\t * @return Template\n\t */\n\tpublic rule<K extends keyof IClasses>(themeClass: K, themeTags: Array<string> = []): Template<IClasses[K]> {\n\t\treturn this.ruleRaw(themeClass, themeTags) as Template<IClasses[K]>;\n\t}\n}\n","import { Entity, IEntitySettings, IEntityPrivate } from \"../../core/util/Entity\";\nimport type { Sprite } from \"../../core/render/Sprite\";\nimport type { Series } from \"../../core/render/Series\";\n\nexport interface IBulletSettings extends IEntitySettings {\n\n\t/**\n\t * Horizontal location within target element.\n\t *\n\t * 0 - left, 1 - right, or anything inbetweeen.\n\t */\n\tlocationX?: number;\n\n\t/**\n\t * Vertical location within target element.\n\t *\n\t * 0 - top, 1 - bottom, or anything inbetweeen.\n\t */\n\tlocationY?: number;\n\n\t/**\n\t * A visual element of the bullet.\n\t */\n\tsprite: Sprite;\n\n\t/**\n\t * If set to `true`, the bullet will redraw its `sprite` element whenever\n\t * anything in its parent series changes.\n\t *\n\t * @default false\n\t */\n\tdynamic?: boolean;\n\n\t/**\n\t * If set to `true`, the bullet will be automatically rotated to face\n\t * direction of line it is attached to.\n\t *\n\t * NOTE: Works only in [[Flow]] and [[MapPointSeries]] (when [[MapPoint]] is\n\t * attached to a [[MapLine]]).\n\t *\n\t * @default false\n\t */\n\tautoRotate?: boolean;\n\n\t/**\n\t * If `autoRotate` is set to `true`, value of `autoRotateAngle` will be added\n\t * to the automatically-calculated angle.\n\t */\n\tautoRotateAngle?: number;\n\n\t/**\n\t * If a field will be set, the bullet will be located at exact value of that field, not paying atention to locationY/locationX. Works with XYSeries\tonly.\n\t * If `field` is set, bullet will be placed at the specific data value, ignoring\n\t * any `locationX` and `locationY` settings.\n\t *\n\t * **IMPORTANT: this setting works with [[XYSeries]] only.**\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/bullets/#By_data_field} for more info\n\t * @since 5.6.0\n\t */\n\tfield?: \"open\" | \"high\" | \"low\" | \"value\";\n\n\t/**\n\t * If set, will stack bullets instead of overlapping them.\n\t *\n\t * * `\"up` - stacks bullets upwards.\n\t * * `\"down` - stacks bullets downwards.\n\t * * `\"auto` - stacks bullets in the direction that offers more space.\n\t * \n\t * **IMPORTANT: this setting works with [[XYSeries]] only.**\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/bullets/#Stacked_bullets} for more info\n\t * @since 5.6.0\n\t */\n\tstacked?: \"up\" | \"down\" | \"auto\";\n}\n\nexport interface IBulletPrivate extends IEntityPrivate {\n\thidden?: boolean;\n}\n\n/**\n * A universal placeholder for bullet elements.\n *\n * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/bullets/} for more info\n */\nexport class Bullet extends Entity {\n\tpublic static className: string = \"Bullet\";\n\tpublic static classNames: Array<string> = Entity.classNames.concat([Bullet.className]);\n\n\tdeclare public _settings: IBulletSettings;\n\tdeclare public _privateSettings: IBulletPrivate;\n\n\t// used by MapPolygons where one data item can have multiple bullets of the same kind\n\tpublic _index?: number;\n\n\t/**\n\t * Target series object if it's a bullet for series.\n\t */\n\tpublic series: Series | undefined;\n\n\tprotected _afterNew() {\n\t\t// Applying themes because bullet will not have parent\n\t\tsuper._afterNewApplyThemes();\n\t}\n\n\tpublic _beforeChanged() {\n\t\tsuper._beforeChanged();\n\n\t\tif (this.isDirty(\"sprite\")) {\n\t\t\tconst sprite = this.get(\"sprite\");\n\t\t\tif (sprite) {\n\t\t\t\tsprite.setAll({ position: \"absolute\", role: \"figure\" });\n\t\t\t\tthis._disposers.push(sprite);\n\t\t\t}\n\t\t}\n\n\t\tif (this.isDirty(\"locationX\") || this.isDirty(\"locationY\")) {\n\t\t\tif (this.series) {\n\t\t\t\tthis.series._positionBullet(this);\n\t\t\t}\n\t\t}\n\t}\n}\n","import type { Label } from \"../render/Label\";\nimport type { Graphics } from \"../render/Graphics\";\n\nimport { RoundedRectangle } from \"../render/RoundedRectangle\";\nimport { Container, IContainerPrivate, IContainerSettings } from \"./Container\";\n\nimport * as $utils from \"../../core/util/Utils\";\n\nexport interface IButtonSettings extends IContainerSettings {\n\n\t/**\n\t * A [[Label]] element for the button to show as a label.\n\t */\n\tlabel?: Label;\n\n\t/**\n\t * A [[Graphics]] element for the button to show as icon.\n\t */\n\ticon?: Graphics;\n\n}\n\nexport interface IButtonPrivate extends IContainerPrivate {\n}\n\n/**\n * Draws an interactive button.\n *\n * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/buttons/} for more info\n * @important\n */\nexport class Button extends Container {\n\tprotected _afterNew() {\n\t\tthis._settings.themeTags = $utils.mergeTags(this._settings.themeTags, [\"button\"]);\n\n\t\tsuper._afterNew();\n\n\t\tif (!this._settings.background) {\n\t\t\tthis.set(\"background\", RoundedRectangle.new(this._root, {\n\t\t\t\tthemeTags: $utils.mergeTags(this._settings.themeTags, [\"background\"])\n\t\t\t}));\n\t\t}\n\n\t\tthis.setPrivate(\"trustBounds\", true);\n\t}\n\n\tdeclare public _settings: IButtonSettings;\n\tdeclare public _privateSettings: IButtonPrivate;\n\n\tpublic static className: string = \"Button\";\n\tpublic static classNames: Array<string> = Container.classNames.concat([Button.className]);\n\n\n\tpublic _prepareChildren() {\n\t\tsuper._prepareChildren();\n\n\t\tif (this.isDirty(\"icon\")) {\n\t\t\tconst previous = this._prevSettings.icon;\n\t\t\tconst icon = this.get(\"icon\")!;\n\t\t\tif (icon !== previous) {\n\t\t\t\tthis._disposeProperty(\"icon\");\n\n\t\t\t\tif (previous) {\n\t\t\t\t\tprevious.dispose();\n\t\t\t\t}\n\t\t\t\tif (icon) {\n\t\t\t\t\tthis.children.push(icon);\n\t\t\t\t}\n\n\t\t\t\tthis._prevSettings.icon = icon;\n\t\t\t}\n\t\t}\n\n\t\tif (this.isDirty(\"label\")) {\n\t\t\tconst previous = this._prevSettings.label;\n\t\t\tconst label = this.get(\"label\")!;\n\t\t\tif (label !== previous) {\n\t\t\t\tthis._disposeProperty(\"label\");\n\t\t\t\tif (previous) {\n\t\t\t\t\tprevious.dispose();\n\t\t\t\t}\n\n\t\t\t\tif (label) {\n\t\t\t\t\tthis.children.push(label);\n\t\t\t\t}\n\n\t\t\t\tthis._prevSettings.label = label;\n\t\t\t}\n\t\t}\n\t}\n}\n","import { Graphics, IGraphicsSettings, IGraphicsPrivate } from \"./Graphics\";\n\nexport interface ICircleSettings extends IGraphicsSettings {\n\n\t/**\n\t * Circle radius in pixels.\n\t */\n\tradius?: number;\n\n}\n\nexport interface ICirclePrivate extends IGraphicsPrivate {\n}\n\n/**\n * Draws a circle.\n *\n * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/graphics/} for more info\n * @important\n */\nexport class Circle extends Graphics {\n\n\tdeclare public _settings: ICircleSettings;\n\tdeclare public _privateSettings: ICirclePrivate;\n\n\tpublic static className: string = \"Circle\";\n\tpublic static classNames: Array<string> = Graphics.classNames.concat([Circle.className]);\n\n\tpublic _afterNew(){\n\t\tsuper._afterNew();\n\t\tthis._display.isMeasured = true;\n\t\tthis.setPrivateRaw(\"trustBounds\", true);\n\t}\t\n\n\tpublic _beforeChanged() {\n\t\tsuper._beforeChanged();\n\n\t\tif (this.isDirty(\"radius\")) {\n\t\t\tthis._clear = true;\n\t\t}\n\t}\n\n\tpublic _changed() {\n\t\tsuper._changed();\n\n\t\tif (this._clear) {\n\t\t\tthis._display.drawCircle(0, 0, Math.abs(this.get(\"radius\", 10)));\n\t\t}\n\t}\n}\n","import type { ICounterRef } from \"./Counter\";\nimport { List } from \"./List\";\nimport type { DataProcessor } from \"./DataProcessor\";\n\n/**\n * Defines interface for a [[List]] with a data processor.\n */\nexport interface IDataWithProcessor {\n\n\t/**\n\t * An optional processor for data.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/data/#Pre_processing_data} for more info\n\t */\n\tprocessor?: DataProcessor;\n\n}\n\n/**\n * A [[List]] that holds components data.\n * \n * @see {@link https://www.amcharts.com/docs/v5/concepts/data/} for more info\n */\nexport class ListData<T> extends List<T> implements ICounterRef, IDataWithProcessor {\n\n\t/**\n\t * @ignore\n\t */\n\tpublic incrementRef(): void { }\n\n\t/**\n\t * @ignore\n\t */\n\tpublic decrementRef(): void { }\n\n\t/**\n\t * An optional processor for data.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/data/#Pre_processing_data} for more info\n\t */\n\tpublic processor?: DataProcessor;\n\n\tprotected _onPush(newValue: T) {\n\t\tif (this.processor) {\n\t\t\tthis.processor.processRow(newValue);\n\t\t}\n\t\tsuper._onPush(newValue);\n\t}\n\n\tprotected _onInsertIndex(index: number, newValue: T) {\n\t\tif (this.processor) {\n\t\t\tthis.processor.processRow(newValue);\n\t\t}\n\t\tsuper._onInsertIndex(index, newValue);\n\t}\n\n\tprotected _onSetIndex(index: number, oldValue: T, newValue: T) {\n\t\tif (this.processor) {\n\t\t\tthis.processor.processRow(newValue);\n\t\t}\n\t\tsuper._onSetIndex(index, oldValue, newValue);\n\t}\n}\n\n/**\n * @deprecated\n * @todo remove\n */\nexport class JsonData<T> implements ICounterRef, IDataWithProcessor {\n\tpublic incrementRef(): void { }\n\tpublic decrementRef(): void { }\n\n\tpublic processor?: DataProcessor;\n\tprotected _value: T;\n\n\tconstructor(value: T) {\n\t\tthis._value = value;\n\t}\n\n\t// TODO: how do we go about calling processor here?\n\n}\n","import { Settings } from \"../util/Entity\";\nimport { Container, IContainerSettings, IContainerPrivate, IContainerEvents } from \"./Container\";\nimport { ListData } from \"../util/Data\";\nimport * as $array from \"../util/Array\";\nimport * as $object from \"../util/Object\";\nimport type * as $ease from \"../util/Ease\";\nimport type { Bullet } from \"./Bullet\";\n\n/**\n * A base element that holds data bit (data item) for any [[Component]].\n */\nexport class DataItem<P extends IComponentDataItem> extends Settings {\n\tdeclare public _settings: P;\n\n\t/**\n\t * A data item's owener [[Component]].\n\t */\n\tpublic component: Component;\n\n\t/**\n\t * A reference to actual item in source data this item is based on.\n\t */\n\tpublic dataContext: unknown;\n\n\t/**\n\t * @todo requires description\n\t */\n\tpublic bullets: Array<Bullet> | undefined;\n\n\t/**\n\t * A set of \"open\" values.\n\t */\n\tpublic open: { [index: string]: any } | undefined;\n\n\t/**\n\t * A set of \"close\" values.\n\t */\n\tpublic close: { [index: string]: any } | undefined;\n\n\tconstructor(component: Component, dataContext: unknown, settings: P) {\n\t\tsuper(settings);\n\n\t\tthis.dataContext = dataContext;\n\t\tthis.component = component;\n\t\tthis._settings.visible = true;\n\t\tthis._checkDirty();\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic markDirty(): void {\n\t\tthis.component.markDirtyValues(this);\n\t}\n\n\tpublic _startAnimation(): void {\n\t\tthis.component._root._addAnimation(this);\n\t}\n\n\tprotected _animationTime(): number | null {\n\t\treturn this.component._root.animationTime;\n\t}\n\n\tprotected _dispose() {\n\t\tif (this.component) {\n\t\t\tthis.component.disposeDataItem(this);\n\t\t}\n\t\tsuper._dispose();\n\t}\n\n\t/**\n\t * Shows a data item that's currently hidden.\n\t */\n\tpublic show(duration?: number) {\n\t\tthis.setRaw(\"visible\", true);\n\t\tif (this.component) {\n\t\t\tthis.component.showDataItem(this, duration);\n\t\t}\n\t}\n\n\t/**\n\t * Hides a data item that's currently visible.\n\t */\n\tpublic hide(duration?: number) {\n\t\tthis.setRaw(\"visible\", false);\n\t\tif (this.component) {\n\t\t\tthis.component.hideDataItem(this, duration);\n\t\t}\n\t}\n\n\tpublic isHidden() {\n\t\treturn !this.get(\"visible\");\n\t}\n}\n\n\nexport interface IComponentDataItem {\n\tvisible?: boolean;\n}\n\nexport interface IComponentSettings extends IContainerSettings {\n\n\t/**\n\t * A duration of the animation from one setting value to another, in\n\t * milliseconds.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/animations/#Animating_data_values} for more info\n\t */\n\tinterpolationDuration?: number;\n\n\t/**\n\t * Easing function to use for cross setting value animations.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/animations/#Easing_functions} for more info\n\t */\n\tinterpolationEasing?: $ease.Easing;\n\n}\n\nexport interface IComponentPrivate extends IContainerPrivate {\n}\n\nexport interface IComponentEvents extends IContainerEvents {\n\tdatavalidated: {}\n}\n\n/**\n * A base class for elements that make use of data.\n */\nexport abstract class Component extends Container {\n\tpublic static className: string = \"Component\";\n\tpublic static classNames: Array<string> = Container.classNames.concat([Component.className]);\n\n\tdeclare public _settings: IComponentSettings;\n\tdeclare public _privateSettings: IComponentPrivate;\n\tdeclare public _dataItemSettings: IComponentDataItem;\n\tdeclare public _events: IComponentEvents;\n\n\tprotected _data: ListData<unknown> = new ListData();\n\n\tprotected _dataItems: Array<DataItem<this[\"_dataItemSettings\"]>> = [];\n\n\tpublic _mainDataItems = this._dataItems;\n\n\tprotected valueFields: Array<string> = [];\n\tprotected fields: Array<string> = [\"id\"];\n\n\tprotected _valueFields!: Array<string>;\n\tprotected _valueFieldsF!: { [index: string]: { fieldKey: string, workingKey: string } };\n\n\tprotected _fields!: Array<string>;\n\tprotected _fieldsF!: { [index: string]: string };\n\n\tpublic _valuesDirty: boolean = false;\n\n\tprotected _dataChanged: boolean = false;\n\n\tprotected _dataGrouped = false;\n\n\t/**\n\t * Indicates if the component has already been initialized.\n\t */\n\tpublic inited: boolean = false;\n\n\t/**\n\t * Component's data.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/data/} for more info\n\t */\n\tpublic set data(data: ListData<unknown>) {\n\t\tdata.incrementRef();\n\t\tthis._data.decrementRef();\n\t\tthis._data = data;\n\t}\n\n\t/**\n\t * @return Data\n\t */\n\tpublic get data(): ListData<unknown> {\n\t\treturn this._data;\n\t}\n\n\tprotected _dispose() {\n\t\tsuper._dispose();\n\t\tthis._data.decrementRef();\n\t}\n\n\tprotected _onDataClear() {\n\n\t}\n\n\tprotected _afterNew() {\n\t\tsuper._afterNew();\n\n\t\tthis._data.incrementRef();\n\t\tthis._updateFields();\n\n\t\tthis._disposers.push(this.data.events.onAll((change) => {\n\t\t\tconst dataItems = this._mainDataItems;\n\t\t\tthis.markDirtyValues();\n\t\t\tthis._markDirtyGroup();\n\t\t\tthis._dataChanged = true;\n\t\t\tif (change.type === \"clear\") {\n\t\t\t\t$array.each(dataItems, (dataItem) => {\n\t\t\t\t\tdataItem.dispose();\n\t\t\t\t});\n\n\t\t\t\tdataItems.length = 0;\n\t\t\t\tthis._onDataClear();\n\t\t\t} else if (change.type === \"push\") {\n\t\t\t\tconst dataItem = new DataItem(this, change.newValue, this._makeDataItem(change.newValue));\n\t\t\t\tdataItems.push(dataItem);\n\t\t\t\tthis.processDataItem(dataItem);\n\n\t\t\t} else if (change.type === \"setIndex\") {\n\t\t\t\tconst dataItem = dataItems[change.index];\n\t\t\t\tconst properties = this._makeDataItem(change.newValue);\n\t\t\t\tif (dataItem.bullets && dataItem.bullets.length == 0) {\n\t\t\t\t\tdataItem.bullets = undefined;\n\t\t\t\t}\n\n\t\t\t\t$object.keys(properties).forEach((key) => {\n\t\t\t\t\tdataItem.animate({\n\t\t\t\t\t\tkey: key,\n\t\t\t\t\t\tto: properties[key],\n\t\t\t\t\t\tduration: this.get(\"interpolationDuration\", 0),\n\t\t\t\t\t\teasing: this.get(\"interpolationEasing\"),\n\t\t\t\t\t});\n\t\t\t\t});\n\n\t\t\t\tdataItem.dataContext = change.newValue;\n\n\t\t\t} else if (change.type === \"insertIndex\") {\n\t\t\t\tconst dataItem = new DataItem(this, change.newValue, this._makeDataItem(change.newValue));\n\t\t\t\tdataItems.splice(change.index, 0, dataItem);\n\t\t\t\tthis.processDataItem(dataItem);\n\n\t\t\t} else if (change.type === \"removeIndex\") {\n\t\t\t\tconst dataItem = dataItems[change.index];\n\t\t\t\tdataItem.dispose();\n\t\t\t\tdataItems.splice(change.index, 1);\n\n\t\t\t} else if (change.type === \"moveIndex\") {\n\t\t\t\tconst dataItem = dataItems[change.oldIndex];\n\t\t\t\tdataItems.splice(change.oldIndex, 1);\n\t\t\t\tdataItems.splice(change.newIndex, 0, dataItem);\n\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Unknown IStreamEvent type\");\n\t\t\t}\n\n\t\t\tthis._afterDataChange();\n\t\t}));\n\t}\n\n\tprotected _updateFields() {\n\t\tif (this.valueFields) {\n\t\t\tthis._valueFields = [];\n\t\t\tthis._valueFieldsF = {};\n\n\t\t\t$array.each(this.valueFields as Array<keyof this[\"_settings\"]>, (key) => {\n\t\t\t\tconst field = this.get(<any>(key + \"Field\"));\n\t\t\t\tif (field) {\n\t\t\t\t\tthis._valueFields.push(<any>key);\n\t\t\t\t\tthis._valueFieldsF[key as string] = { fieldKey: key + \"Field\", workingKey: key + \"Working\" };\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tif (this.fields) {\n\t\t\tthis._fields = [];\n\t\t\tthis._fieldsF = {};\n\n\t\t\t$array.each(this.fields as Array<keyof this[\"_settings\"]>, (key) => {\n\t\t\t\tconst field = this.get(<any>(key + \"Field\"));\n\t\t\t\tif (field) {\n\t\t\t\t\tthis._fields.push(<any>key);\n\t\t\t\t\tthis._fieldsF[key as string] = key + \"Field\";\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\t/**\n\t * A list of component's data items.\n\t *\n\t * @return Data items\n\t */\n\tpublic get dataItems(): Array<DataItem<this[\"_dataItemSettings\"]>> {\n\t\treturn this._dataItems;\n\t}\n\n\tprotected processDataItem(_dataItem: DataItem<this[\"_dataItemSettings\"]>) { }\n\n\n\tpublic _makeDataItem(data: unknown): this[\"_dataItemSettings\"] {\n\t\t//const output: this[\"_dataItemSettings\"] = {};\n\t\tconst output: any = {}; // temporary to solve error\n\t\tif (this._valueFields) {\n\t\t\t$array.each(this._valueFields, (key) => {\n\t\t\t\tconst field = this.get(<any>(this._valueFieldsF[key].fieldKey));\n\t\t\t\toutput[key] = (data as any)[field];\n\n\t\t\t\toutput[this._valueFieldsF[key].workingKey] = output[key];\n\t\t\t});\n\t\t}\n\t\tif (this._fields) {\n\t\t\t$array.each(this._fields, (key) => {\n\t\t\t\tconst field = this.get(<any>(this._fieldsF[key]));\n\t\t\t\toutput[key] = (data as any)[field];\n\t\t\t});\n\t\t}\n\n\t\treturn output;\n\t}\n\n\t/**\n\t * Creates a new data item and processes it.\n\t * \n\t * @param data Data item settings\n\t * @param dataContext Data context\n\t * @return New data item\n\t */\n\tpublic makeDataItem(data: this[\"_dataItemSettings\"], dataContext?: any): DataItem<this[\"_dataItemSettings\"]> {\n\t\tlet dataItem = new DataItem(this, dataContext, data);\n\t\tthis.processDataItem(dataItem);\n\t\treturn dataItem;\n\t}\n\n\t/**\n\t * Adds new explicit data item to series.\n\t * \n\t * @param data Data item settings\n\t * @param dataContext Data context\n\t * @return New data item\n\t */\n\tpublic pushDataItem(data: this[\"_dataItemSettings\"], dataContext?: any): DataItem<this[\"_dataItemSettings\"]> {\n\t\tconst dataItem = this.makeDataItem(data, dataContext);\n\t\tthis._mainDataItems.push(dataItem);\n\t\treturn dataItem;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic disposeDataItem(_dataItem: DataItem<this[\"_dataItemSettings\"]>) {\n\n\t}\n\n\t/**\n\t * Shows component's data item.\n\t *\n\t * @param dataItem Data item\n\t * @param _duration Animation duration in milliseconds\n\t * @return Promise\n\t */\n\tpublic async showDataItem(dataItem: DataItem<this[\"_dataItemSettings\"]>, _duration?: number): Promise<void> {\n\t\tdataItem.set(\"visible\", true);\n\t}\n\n\t/**\n\t * Hides component's data item.\n\t *\n\t * @param dataItem Data item\n\t * @param _duration Animation duration in milliseconds\n\t * @return Promise\n\t */\n\tpublic async hideDataItem(dataItem: DataItem<this[\"_dataItemSettings\"]>, _duration?: number): Promise<void> {\n\t\tdataItem.set(\"visible\", false);\n\t}\n\n\tpublic _clearDirty() {\n\t\tsuper._clearDirty();\n\t\tthis._valuesDirty = false;\n\t}\n\n\tprotected _afterDataChange() {\n\n\t}\n\n\tpublic _afterChanged() {\n\t\tsuper._afterChanged();\n\t\tif (this._dataChanged) {\n\t\t\tconst type = \"datavalidated\";\n\t\t\tif (this.events.isEnabled(type)) {\n\t\t\t\tthis.events.dispatch(type, { type: type, target: this });\n\t\t\t}\n\t\t\tthis._dataChanged = false;\n\t\t}\n\n\t\tthis.inited = true;\n\t}\n\n\t/**\n\t * Forces a repaint of the element which relies on data.\n\t *\n\t * @since 5.0.21\n\t */\n\tpublic markDirtyValues(_dataItem?: DataItem<this[\"_dataItemSettings\"]>) {\n\t\tthis.markDirty();\n\t\tthis._valuesDirty = true;\n\t}\n\n\tpublic _markDirtyGroup() {\n\t\tthis._dataGrouped = false;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic markDirtySize() {\n\t\tthis._sizeDirty = true;\n\t\tthis.markDirty();\n\t}\n\n}\n","import { List } from \"./List\";\nimport type { IDisposer } from \"./Disposer\";\nimport type { Container } from \"../render/Container\";\nimport type { Sprite } from \"../render/Sprite\";\nimport * as $array from \"./Array\";\n\n/**\n * A version of [[List]] to hold children of the [[Container]].\n *\n * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/containers/} for more info\n */\nexport class Children<A extends Sprite> extends List<A> implements IDisposer {\n\tprivate _disposed: boolean = false;\n\tprivate _container: Container;\n\tprivate _events: IDisposer;\n\n\tpublic constructor(container: Container) {\n\t\tsuper();\n\n\t\tthis._container = container;\n\n\t\tthis._events = this.events.onAll((change) => {\n\t\t\tif (change.type === \"clear\") {\n\t\t\t\t$array.each(change.oldValues, (x) => {\n\t\t\t\t\tthis._onRemoved(x);\n\t\t\t\t});\n\n\t\t\t} else if (change.type === \"push\") {\n\t\t\t\tthis._onInserted(change.newValue);\n\n\t\t\t} else if (change.type === \"setIndex\") {\n\t\t\t\tthis._onRemoved(change.oldValue);\n\t\t\t\tthis._onInserted(change.newValue, change.index);\n\n\t\t\t} else if (change.type === \"insertIndex\") {\n\t\t\t\tthis._onInserted(change.newValue, change.index);\n\n\t\t\t} else if (change.type === \"removeIndex\") {\n\t\t\t\tthis._onRemoved(change.oldValue);\n\n\t\t\t} else if (change.type === \"moveIndex\") {\n\t\t\t\tthis._onRemoved(change.value);\n\t\t\t\tthis._onInserted(change.value, change.newIndex);\n\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Unknown IListEvent type\");\n\t\t\t}\n\t\t});\n\t}\n\n\tprotected _onInserted(child: A, index?: number) {\n\t\tchild._setParent(this._container, true);\n\t\tconst childrenDisplay = this._container._childrenDisplay;\n\t\tif (index === undefined) {\n\t\t\tchildrenDisplay.addChild(child._display);\n\n\t\t} else {\n\t\t\tchildrenDisplay.addChildAt(child._display, index);\n\t\t}\n\t}\n\n\tprotected _onRemoved(child: A) {\n\t\tthis._container._childrenDisplay.removeChild(child._display);\n\t\tthis._container.markDirtyBounds();\n\t\tthis._container.markDirty();\n\t}\n\n\t/**\n\t * Returns `true` if obejct is disposed.\n\t */\n\tpublic isDisposed(): boolean {\n\t\treturn this._disposed;\n\t}\n\n\t/**\n\t * Permanently dispose this object.\n\t */\n\tpublic dispose() {\n\t\tif (!this._disposed) {\n\t\t\tthis._disposed = true;\n\n\t\t\tthis._events.dispose();\n\n\t\t\t$array.each(this.values, (child) => {\n\t\t\t\tchild.dispose();\n\t\t\t});\n\t\t}\n\t}\n}\n","import type { Graphics } from \"./Graphics\";\nimport type { Layout } from \"./Layout\";\nimport type { IContainer } from \"./backend/Renderer\";\nimport type { IBounds } from \"../util/IBounds\";\nimport type { Scrollbar } from \"./Scrollbar\";\nimport type { DataItem, IComponentDataItem } from \"./Component\";\n\nimport { Children } from \"../util/Children\";\nimport { Percent } from \"../util/Percent\";\nimport { Sprite, ISpriteSettings, ISpritePrivate, ISpriteEvents } from \"./Sprite\";\nimport { Rectangle } from \"./Rectangle\";\nimport { HorizontalLayout } from \"./HorizontalLayout\";\nimport { VerticalLayout } from \"./VerticalLayout\";\nimport { GridLayout } from \"./GridLayout\";\nimport { populateString } from \"../util/PopulateString\";\nimport type { IDisposer } from \"../util/Disposer\";\n\nimport * as $array from \"../util/Array\";\nimport * as $type from \"../util/Type\";\nimport * as $utils from \"../util/Utils\";\n\nexport interface IContainerSettings extends ISpriteSettings {\n\n\t/**\n\t * Left padding in pixels.\n\t */\n\tpaddingLeft?: number;\n\n\t/**\n\t * Right padding in pixels.\n\t */\n\tpaddingRight?: number;\n\n\t/**\n\t * Top padding in pixels.\n\t */\n\tpaddingTop?: number;\n\n\t/**\n\t * Bottom padding in pixels.\n\t */\n\tpaddingBottom?: number;\n\n\t/**\n\t * Background element.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/containers/#Background} for more info\n\t */\n\tbackground?: Graphics;\n\n\t/**\n\t * A method to layout\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/containers/#Layout} for more info\n\t */\n\tlayout?: Layout | null;\n\n\t/**\n\t * An element to use as a container's mask (clipping region).\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/containers/#Masks} for more info\n\t */\n\tmask?: Graphics | null;\n\n\t/**\n\t * If set to `true` all content going outside the bounds of the container\n\t * will be clipped.\n\t */\n\tmaskContent?: boolean;\n\n\t/**\n\t * If set to `true` all descendants - not just direct children, but every\n\t * element in it - will become \"interactive\".\n\t */\n\tinteractiveChildren?: boolean;\n\n\t/**\n\t * If set to `true`, applying a state on a container will also apply the same\n\t * state on its children.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/containers/#States} for more info\n\t */\n\tsetStateOnChildren?: boolean;\n\n\t/**\n\t * Setting this to an instance of [[Scrollbar]] will enable vertical\n\t * scrolling of content if it does not fit into the Container.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/containers/#Scrollbar} for more info\n\t */\n\tverticalScrollbar?: Scrollbar;\n\n\t/**\n\t * If set to `true` its children will be laid out in opposite order.\n\t *\n\t * @since 5.1.1\n\t */\n\treverseChildren?: boolean;\n\n\t/**\n\t * HTML content of the container.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/html-content/} for more info\n\t * @since 5.2.11\n\t */\n\thtml?: string;\n\n}\n\nexport interface IContainerEvents extends ISpriteEvents {\n}\n\nexport interface IContainerPrivate extends ISpritePrivate {\n\t/**\n\t * A `<div>` element used for HTML content of the `Container`.\n\t */\n\thtmlElement?: HTMLDivElement;\n}\n\n/**\n * A basic element that can have child elements, maintain their layout, and\n * have a background.\n *\n * It can have any [[Sprite]] element as a child, from very basic shapes, to\n * full-fledged charts.\n *\n * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/containers/} for more info\n * @important\n */\nexport class Container extends Sprite {\n\n\tdeclare public _settings: IContainerSettings;\n\tdeclare public _privateSettings: IContainerPrivate;\n\tdeclare public _events: IContainerEvents;\n\n\tpublic _display: IContainer = this._root._renderer.makeContainer();\n\n\tpublic _childrenDisplay: IContainer = this._root._renderer.makeContainer();\n\n\t/**\n\t * List of Container's child elements.\n\t */\n\tpublic children: Children<Sprite> = new Children(this);\n\n\tpublic _percentageSizeChildren: Array<Sprite> = [];\n\tpublic _percentagePositionChildren: Array<Sprite> = [];\n\n\tpublic static className: string = \"Container\";\n\tpublic static classNames: Array<string> = Sprite.classNames.concat([Container.className]);\n\n\tpublic _prevWidth: number = 0;\n\tpublic _prevHeight: number = 0;\n\n\tprotected _contentWidth: number = 0;\n\tprotected _contentHeight: number = 0;\n\n\tprotected _contentMask: Rectangle | undefined;\n\n\tprotected _vsbd0: IDisposer | undefined;\n\tprotected _vsbd1: IDisposer | undefined;\n\n\tprotected _afterNew() {\n\t\tsuper._afterNew();\n\t\tthis._display.addChild(this._childrenDisplay);\n\t}\n\n\tprotected _dispose() {\n\t\t$array.eachReverse(this.allChildren(), (child) => {\n\t\t\tchild.dispose();\n\t\t});\n\n\t\tif (this.getPrivate(\"htmlElement\")) {\n\t\t\tthis._root._removeHTMLContent(this);\n\t\t}\n\n\t\tsuper._dispose();\n\t}\n\n\tpublic _changed() {\n\t\tsuper._changed();\n\n\t\tif (this.isDirty(\"interactiveChildren\")) {\n\t\t\tthis._display.interactiveChildren = this.get(\"interactiveChildren\", false);\n\t\t}\n\n\t\tif (this.isDirty(\"layout\")) {\n\t\t\tthis._prevWidth = 0;\n\t\t\tthis._prevHeight = 0;\n\t\t\tthis.markDirtyBounds();\n\t\t\tif (this._prevSettings.layout) {\n\t\t\t\tthis.children.each((child) => {\n\t\t\t\t\tchild.removePrivate(\"x\");\n\t\t\t\t\tchild.removePrivate(\"y\");\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\n\t\tif (this.isDirty(\"paddingTop\") || this.isDirty(\"paddingBottom\") || this.isDirty(\"paddingLeft\") || this.isDirty(\"paddingRight\")) {\n\t\t\tthis.children.each((child) => {\n\t\t\t\tchild.markDirtyPosition();\n\t\t\t})\n\t\t}\n\n\t\tif (this.isDirty(\"maskContent\")) {\n\n\t\t\tconst childrenDisplay = this._childrenDisplay;\n\n\t\t\tlet contentMask = this._contentMask;\n\t\t\tif (this.get(\"maskContent\")) {\n\t\t\t\tif (!contentMask) {\n\t\t\t\t\tcontentMask = Rectangle.new(this._root, {\n\t\t\t\t\t\tx: -.5,\n\t\t\t\t\t\ty: -.5,\n\t\t\t\t\t\twidth: this.width() + 1,\n\t\t\t\t\t\theight: this.height() + 1\n\t\t\t\t\t});\n\t\t\t\t\tthis._contentMask = contentMask;\n\t\t\t\t\tchildrenDisplay.addChildAt(contentMask._display, 0);\n\t\t\t\t\tchildrenDisplay.mask = contentMask._display;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (contentMask) {\n\t\t\t\t\tchildrenDisplay.removeChild(contentMask._display);\n\t\t\t\t\tchildrenDisplay.mask = null;\n\t\t\t\t\tcontentMask.dispose();\n\t\t\t\t\tthis._contentMask = undefined;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic _updateSize() {\n\t\tsuper._updateSize();\n\n\t\t$array.each(this._percentageSizeChildren, (child) => {\n\t\t\tchild._updateSize();\n\t\t});\n\n\t\t$array.each(this._percentagePositionChildren, (child) => {\n\t\t\tchild.markDirtyPosition();\n\t\t\tchild._updateSize();\n\t\t});\n\n\t\tthis.updateBackground();\n\t}\n\n\tprotected updateBackground() {\n\t\tconst background = this.get(\"background\");\n\t\tlet bounds = this._localBounds;\n\n\t\tif (bounds && !this.isHidden()) {\n\t\t\tlet x = bounds.left;\n\t\t\tlet y = bounds.top;\n\t\t\tlet w = bounds.right - x;\n\t\t\tlet h = bounds.bottom - y;\n\n\t\t\tlet maxWidth = this.get(\"maxWidth\");\n\t\t\tlet maxHeight = this.get(\"maxHeight\");\n\n\t\t\tif (maxHeight) {\n\t\t\t\tif (h > maxHeight) {\n\t\t\t\t\th = maxHeight;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (maxWidth) {\n\t\t\t\tif (w > maxWidth) {\n\t\t\t\t\tw = maxWidth;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tlet width = this.width();\n\t\t\tlet height = this.height();\n\n\t\t\tif (background) {\n\t\t\t\tbackground.setAll({ width: w, height: h, x: x, y: y });\n\t\t\t\tif (this._display.interactive) {\n\t\t\t\t\tbackground._display.interactive = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst contentMask = this._contentMask;\n\t\t\tif (contentMask) {\n\t\t\t\tcontentMask.setAll({ width: width + 1, height: height + 1 });\n\t\t\t}\n\n\t\t\tconst verticalScrollbar = this.get(\"verticalScrollbar\")!;\n\t\t\tif (verticalScrollbar) {\n\t\t\t\tverticalScrollbar.set(\"height\", height);\n\t\t\t\tverticalScrollbar.set(\"x\", width - verticalScrollbar.width() - verticalScrollbar.get(\"marginRight\", 0));\n\t\t\t\tverticalScrollbar.set(\"end\", verticalScrollbar.get(\"start\", 0) + height / this._contentHeight);\n\n\t\t\t\tconst bg = verticalScrollbar.get(\"background\");\n\t\t\t\tif (bg) {\n\t\t\t\t\tbg.setAll({ width: verticalScrollbar.width(), height: height })\n\t\t\t\t}\n\n\t\t\t\tlet visible = true;\n\t\t\t\tif (this._contentHeight <= height) {\n\t\t\t\t\tvisible = false;\n\t\t\t\t}\n\t\t\t\tverticalScrollbar.setPrivate(\"visible\", visible);\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic _applyThemes(force: boolean = false): boolean {\n\t\tif (super._applyThemes(force)) {\n\t\t\tthis.eachChildren((child) => {\n\t\t\t\tchild._applyThemes(force);\n\t\t\t});\n\n\t\t\treturn true;\n\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tpublic _applyState(name: string): void {\n\t\tsuper._applyState(name);\n\n\t\tif (this.get(\"setStateOnChildren\")) {\n\t\t\tthis.eachChildren((child) => {\n\t\t\t\tchild.states.apply(name);\n\t\t\t});\n\t\t}\n\t}\n\n\tpublic _applyStateAnimated(name: string, duration?: number): void {\n\t\tsuper._applyStateAnimated(name, duration);\n\n\t\tif (this.get(\"setStateOnChildren\")) {\n\t\t\tthis.eachChildren((child) => {\n\t\t\t\tchild.states.applyAnimate(name, duration);\n\t\t\t});\n\t\t}\n\t}\n\n\t/**\n\t * Returns container's inner width (width without padding) in pixels.\n\t *\n\t * @return Inner width (px)\n\t */\n\tpublic innerWidth(): number {\n\t\treturn this.width() - this.get(\"paddingRight\", 0) - this.get(\"paddingLeft\", 0);\n\t}\n\n\t/**\n\t * Returns container's inner height (height without padding) in pixels.\n\t *\n\t * @return Inner height (px)\n\t */\n\tpublic innerHeight(): number {\n\t\treturn this.height() - this.get(\"paddingTop\", 0) - this.get(\"paddingBottom\", 0);\n\t}\n\n\tpublic _getBounds() {\n\t\tif (!this.get(\"html\")) {\n\t\t\tlet width = this.get(\"width\");\n\t\t\tlet height = this.get(\"height\");\n\n\t\t\tlet pWidth = this.getPrivate(\"width\");\n\t\t\tlet pHeight = this.getPrivate(\"height\");\n\n\t\t\tlet bounds: IBounds = {\n\t\t\t\tleft: 0,\n\t\t\t\ttop: 0,\n\t\t\t\tright: this.width(),\n\t\t\t\tbottom: this.height()\n\t\t\t};\n\n\t\t\tlet layout = this.get(\"layout\");\n\t\t\tlet horizontal = false;\n\t\t\tlet vertical = false;\n\t\t\tif (layout instanceof HorizontalLayout || layout instanceof GridLayout) {\n\t\t\t\thorizontal = true;\n\t\t\t}\n\n\t\t\tif (layout instanceof VerticalLayout) {\n\t\t\t\tvertical = true;\n\t\t\t}\n\n\t\t\tif ((width != null || pWidth != null) && (height != null || pHeight != null) && !this.get(\"verticalScrollbar\")) {\n\t\t\t\t// void\n\t\t\t}\n\t\t\telse {\n\t\t\t\tlet m = Number.MAX_VALUE;\n\n\t\t\t\tlet l = m;\n\t\t\t\tlet r = -m;\n\t\t\t\tlet t = m;\n\t\t\t\tlet b = -m;\n\n\t\t\t\tconst paddingLeft = this.get(\"paddingLeft\", 0);\n\t\t\t\tconst paddingTop = this.get(\"paddingTop\", 0);\n\t\t\t\tconst paddingRight = this.get(\"paddingRight\", 0);\n\t\t\t\tconst paddingBottom = this.get(\"paddingBottom\", 0);\n\n\t\t\t\tthis.children.each((child) => {\n\t\t\t\t\tif (child.get(\"position\") != \"absolute\" && child.get(\"isMeasured\")) {\n\t\t\t\t\t\tlet childBounds = child.adjustedLocalBounds();\n\t\t\t\t\t\tlet childX = child.x();\n\t\t\t\t\t\tlet childY = child.y();\n\t\t\t\t\t\tlet cl = childX + childBounds.left;\n\t\t\t\t\t\tlet cr = childX + childBounds.right;\n\t\t\t\t\t\tlet ct = childY + childBounds.top;\n\t\t\t\t\t\tlet cb = childY + childBounds.bottom;\n\n\t\t\t\t\t\tif (horizontal) {\n\t\t\t\t\t\t\tcl -= child.get(\"marginLeft\", 0);\n\t\t\t\t\t\t\tcr += child.get(\"marginRight\", 0);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (vertical) {\n\t\t\t\t\t\t\tct -= child.get(\"marginTop\", 0);\n\t\t\t\t\t\t\tcb += child.get(\"marginBottom\", 0);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (cl < l) {\n\t\t\t\t\t\t\tl = cl;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (cr > r) {\n\t\t\t\t\t\t\tr = cr;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (ct < t) {\n\t\t\t\t\t\t\tt = ct;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (cb > b) {\n\t\t\t\t\t\t\tb = cb;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\n\t\t\t\tif (l == m) {\n\t\t\t\t\tl = 0;\n\t\t\t\t}\n\n\t\t\t\tif (r == -m) {\n\t\t\t\t\tr = 0;\n\t\t\t\t}\n\n\t\t\t\tif (t == m) {\n\t\t\t\t\tt = 0;\n\t\t\t\t}\n\n\t\t\t\tif (b == -m) {\n\t\t\t\t\tb = 0;\n\t\t\t\t}\n\n\t\t\t\tbounds.left = l - paddingLeft;\n\t\t\t\tbounds.top = t - paddingTop;\n\t\t\t\tbounds.right = r + paddingRight;\n\t\t\t\tbounds.bottom = b + paddingBottom;\n\n\t\t\t\tconst minWidth = this.get(\"minWidth\");\n\n\t\t\t\tif ($type.isNumber(minWidth) && minWidth > 0) {\n\t\t\t\t\tif (bounds.right - bounds.left < minWidth) {\n\t\t\t\t\t\tif (bounds.right >= minWidth) {\n\t\t\t\t\t\t\tbounds.left = bounds.right - minWidth;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tbounds.right = bounds.left + minWidth;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tconst minHeight = this.get(\"minHeight\");\n\n\t\t\t\tif ($type.isNumber(minHeight) && minHeight > 0) {\n\t\t\t\t\tif (bounds.bottom - bounds.top < minHeight) {\n\t\t\t\t\t\tif (bounds.bottom >= minHeight) {\n\t\t\t\t\t\t\tbounds.top = bounds.bottom - minHeight;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tbounds.bottom = bounds.top + minHeight;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis._contentWidth = bounds.right - bounds.left;\n\t\t\tthis._contentHeight = bounds.bottom - bounds.top;\n\n\t\t\tif ($type.isNumber(width)) {\n\t\t\t\tbounds.left = 0;\n\t\t\t\tbounds.right = width;\n\t\t\t}\n\n\t\t\tif ($type.isNumber(pWidth)) {\n\t\t\t\tbounds.left = 0;\n\t\t\t\tbounds.right = pWidth;\n\t\t\t}\n\n\t\t\tif ($type.isNumber(height)) {\n\t\t\t\tbounds.top = 0;\n\t\t\t\tbounds.bottom = height;\n\t\t\t}\n\n\t\t\tif ($type.isNumber(pHeight)) {\n\t\t\t\tbounds.top = 0;\n\t\t\t\tbounds.bottom = pHeight;\n\t\t\t}\n\n\t\t\tthis._localBounds = bounds;\n\t\t}\n\t\telse {\n\t\t\tlet bounds = this._localBounds;\n\t\t\tif (bounds) {\n\t\t\t\tthis._contentWidth = bounds.right - bounds.left;\n\t\t\t\tthis._contentHeight = bounds.bottom - bounds.top;\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic _updateBounds() {\n\t\tconst layout = this.get(\"layout\");\n\n\t\tif (layout) {\n\t\t\tlayout.updateContainer(this);\n\t\t}\n\n\t\tsuper._updateBounds();\n\n\t\tthis.updateBackground();\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic markDirty(): void {\n\t\tsuper.markDirty();\n\t\tthis._root._addDirtyParent(this);\n\t}\n\n\tpublic _prepareChildren() {\n\t\tconst innerWidth = this.innerWidth();\n\t\tconst innerHeight = this.innerHeight();\n\n\t\tif (innerWidth != this._prevWidth || innerHeight != this._prevHeight) {\n\t\t\tlet layout = this.get(\"layout\");\n\t\t\tlet horizontal = false;\n\t\t\tlet vertical = false;\n\t\t\tif (layout) {\n\t\t\t\tif (layout instanceof HorizontalLayout || layout instanceof GridLayout) {\n\t\t\t\t\thorizontal = true;\n\t\t\t\t}\n\t\t\t\tif (layout instanceof VerticalLayout) {\n\t\t\t\t\tvertical = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$array.each(this._percentageSizeChildren, (child) => {\n\t\t\t\tif (!horizontal) {\n\t\t\t\t\tlet width = child.get(\"width\");\n\t\t\t\t\tif (width instanceof Percent) {\n\t\t\t\t\t\tchild.setPrivate(\"width\", width.value * innerWidth);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!vertical) {\n\t\t\t\t\tlet height = child.get(\"height\");\n\t\t\t\t\tif (height instanceof Percent) {\n\t\t\t\t\t\tchild.setPrivate(\"height\", height.value * innerHeight);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\n\t\t\t$array.each(this._percentagePositionChildren, (child) => {\n\t\t\t\tchild.markDirtyPosition();\n\t\t\t\tchild.markDirtyBounds();\n\t\t\t})\n\n\t\t\tthis._prevWidth = innerWidth;\n\t\t\tthis._prevHeight = innerHeight;\n\n\t\t\tthis._sizeDirty = true;\n\t\t\tthis.updateBackground();\n\t\t}\n\n\t\tthis._handleStates();\n\t}\n\n\tpublic _updateHTMLContent() {\n\t\tconst html = this.get(\"html\");\n\t\tif (html && html !== \"\") {\n\t\t\tthis._root._setHTMLContent(this, populateString(this, this.get(\"html\", \"\")));\n\t\t}\n\t\telse {\n\t\t\tthis._root._removeHTMLContent(this);\n\t\t}\n\t\tthis._root._positionHTMLElement(this);\n\t}\n\n\t/**\n\t * If scrolling is enabled on the Container (by adding `verticalScrollbar`)\n\t * the Container will scroll in such way so that target element becomes\n\t * visible if its currently outside of view.\n\t * \n\t * @param child Target child\n\t * @since 5.10.5\n\t */\n\tpublic scrollToChild(child: Sprite) {\n\t\tconst verticalScrollbar = this.get(\"verticalScrollbar\")!;\n\t\tif (verticalScrollbar) {\n\t\t\tlet y = child.y();\n\t\t\tlet h = this.innerHeight();\n\t\t\tlet ch = child.height();\n\t\t\tlet contentH = this._contentHeight;\n\t\t\tlet max = 1 - (h - ch / 2) / contentH;\n\n\t\t\tif (y + ch * .7 + this._childrenDisplay.y > h || y - ch * .3 + this._childrenDisplay.y < 0) {\n\t\t\t\tlet pos = Math.max(0, Math.min(max, (y - ch / 2) / contentH));\n\t\t\t\tverticalScrollbar.animate({ key: \"start\", to: pos, duration: verticalScrollbar.get(\"animationDuration\", 0), easing: verticalScrollbar.get(\"animationEasing\") });\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic _updateChildren() {\n\n\n\t\tif (this.isDirty(\"html\")) {\n\t\t\tthis._updateHTMLContent();\n\t\t}\n\n\t\tif (this.isDirty(\"verticalScrollbar\")) {\n\t\t\tconst verticalScrollbar = this.get(\"verticalScrollbar\")!;\n\t\t\tif (verticalScrollbar) {\n\t\t\t\tverticalScrollbar._setParent(this);\n\n\t\t\t\tverticalScrollbar.startGrip.setPrivate(\"visible\", false);\n\t\t\t\tverticalScrollbar.endGrip.setPrivate(\"visible\", false);\n\n\t\t\t\tthis.set(\"maskContent\", true);\n\t\t\t\tthis.set(\"paddingRight\", verticalScrollbar.width() + verticalScrollbar.get(\"marginRight\", 0) + verticalScrollbar.get(\"marginLeft\", 0));\n\n\t\t\t\tlet background = this.get(\"background\");\n\n\t\t\t\tif (!background) {\n\t\t\t\t\tbackground = this.set(\"background\", Rectangle.new(this._root, {\n\t\t\t\t\t\tthemeTags: [\"background\"],\n\t\t\t\t\t\tfillOpacity: 0,\n\t\t\t\t\t\tfill: this._root.interfaceColors.get(\"alternativeBackground\")\n\t\t\t\t\t}));\n\t\t\t\t}\n\n\t\t\t\tthis._vsbd0 = this.events.on(\"wheel\", (event) => {\n\t\t\t\t\tconst wheelEvent = event.originalEvent;\n\n\t\t\t\t\t// Ignore wheel event if it is happening on a non-chart element, e.g. if\n\t\t\t\t\t// some page element is over the chart.\n\t\t\t\t\tif ($utils.isLocalEvent(wheelEvent, this)) {\n\t\t\t\t\t\twheelEvent.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tlet shiftY = wheelEvent.deltaY / 5000;\n\t\t\t\t\tconst start = verticalScrollbar.get(\"start\", 0);\n\t\t\t\t\tconst end = verticalScrollbar.get(\"end\", 1);\n\n\t\t\t\t\tif (start + shiftY <= 0) {\n\t\t\t\t\t\tshiftY = -start;\n\t\t\t\t\t}\n\t\t\t\t\tif (end + shiftY >= 1) {\n\t\t\t\t\t\tshiftY = 1 - end;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (start + shiftY >= 0 && end + shiftY <= 1) {\n\t\t\t\t\t\tverticalScrollbar.set(\"start\", start + shiftY);\n\t\t\t\t\t\tverticalScrollbar.set(\"end\", end + shiftY);\n\t\t\t\t\t}\n\n\t\t\t\t})\n\n\t\t\t\tthis._disposers.push(this._vsbd0);\n\n\t\t\t\tthis._vsbd1 = verticalScrollbar.events.on(\"rangechanged\", () => {\n\t\t\t\t\tlet h = this._contentHeight;\n\t\t\t\t\tconst childrenDisplay = this._childrenDisplay;\n\t\t\t\t\tconst contentMask = this._contentMask;\n\n\t\t\t\t\tchildrenDisplay.y = -verticalScrollbar.get(\"start\", 0) * h;\n\t\t\t\t\tchildrenDisplay.markDirtyLayer();\n\n\t\t\t\t\tif (contentMask) {\n\t\t\t\t\t\tcontentMask._display.y = -childrenDisplay.y;\n\t\t\t\t\t\tchildrenDisplay.mask = contentMask._display;\n\t\t\t\t\t}\n\t\t\t\t})\n\n\t\t\t\tthis._disposers.push(this._vsbd1);\n\n\t\t\t\tthis._display.addChild(verticalScrollbar._display);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tconst previous = this._prevSettings.verticalScrollbar\n\t\t\t\tif (previous) {\n\t\t\t\t\tthis._display.removeChild(previous._display);\n\t\t\t\t\tif (this._vsbd0) {\n\t\t\t\t\t\tthis._vsbd0.dispose();\n\t\t\t\t\t}\n\t\t\t\t\tif (this._vsbd1) {\n\t\t\t\t\t\tthis._vsbd1.dispose();\n\t\t\t\t\t}\n\t\t\t\t\tconst childrenDisplay = this._childrenDisplay;\n\t\t\t\t\tchildrenDisplay.y = 0;\n\n\t\t\t\t\tthis.setPrivate(\"height\", undefined);\n\t\t\t\t\tthis.set(\"maskContent\", false);\n\t\t\t\t\tthis.set(\"paddingRight\", undefined);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (this.isDirty(\"background\")) {\n\t\t\t// TODO maybe this should dispose ?\n\t\t\tconst previous = this._prevSettings[\"background\"];\n\t\t\tif (previous) {\n\t\t\t\tthis._display.removeChild(previous._display);\n\t\t\t}\n\n\t\t\tconst background = this.get(\"background\");\n\t\t\tif (background instanceof Sprite) {\n\t\t\t\tbackground.set(\"isMeasured\", false);\n\t\t\t\tbackground._setParent(this);\n\t\t\t\tthis._display.addChildAt(background._display, 0);\n\t\t\t}\n\t\t}\n\n\t\tif (this.isDirty(\"mask\")) {\n\n\t\t\tconst mask = this.get(\"mask\");\n\n\t\t\tconst previous = this._prevSettings[\"mask\"];\n\t\t\tif (previous) {\n\t\t\t\tthis._display.removeChild(previous._display);\n\t\t\t\tif (previous != mask) {\n\t\t\t\t\tprevious.dispose();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (mask) {\n\t\t\t\tconst parent = mask.parent;\n\t\t\t\tif (parent) {\n\t\t\t\t\tparent.children.removeValue(mask);\n\t\t\t\t}\n\n\t\t\t\tmask._setParent(this);\n\t\t\t\tthis._display.addChildAt(mask._display, 0);\n\t\t\t\tthis._childrenDisplay.mask = mask._display;\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic _processTemplateField(): void {\n\t\tsuper._processTemplateField();\n\t\tthis.children.each((child) => {\n\t\t\tchild._processTemplateField();\n\t\t})\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic walkChildren(f: (child: Sprite) => void): void {\n\t\tthis.children.each((child) => {\n\t\t\tif (child instanceof Container) {\n\t\t\t\tchild.walkChildren(f);\n\t\t\t}\n\t\t\tf(child);\n\t\t});\n\t}\n\n\tpublic eachChildren(f: (child: Sprite) => void): void {\n\t\tconst background = this.get(\"background\");\n\t\tif (background) {\n\t\t\tf(background);\n\t\t}\n\n\t\tconst verticalScrollbar = this.get(\"verticalScrollbar\");\n\t\tif (verticalScrollbar) {\n\t\t\tf(verticalScrollbar);\n\t\t}\n\n\t\tconst mask = this.get(\"mask\");\n\t\tif (mask) {\n\t\t\tf(mask);\n\t\t}\n\n\t\tthis.children.values.forEach((child) => {\n\t\t\tf(child);\n\t\t});\n\t}\n\n\tpublic allChildren(): Array<Sprite> {\n\t\tconst output: Array<Sprite> = [];\n\n\t\tthis.eachChildren((x) => {\n\t\t\toutput.push(x);\n\t\t});\n\n\t\treturn output;\n\t}\n\n\tpublic _setDataItem(dataItem?: DataItem<IComponentDataItem>): void {\n\t\tconst updated = (dataItem !== this._dataItem);\n\t\tsuper._setDataItem(dataItem);\n\t\tconst html = this.get(\"html\", \"\");\n\t\tif (html && html !== \"\" && updated) {\n\t\t\tthis._root._setHTMLContent(this, populateString(this, html));\n\t\t}\n\t}\n}\n","import type { IGraphics, IPattern } from \"../backend/Renderer\";\nimport type { Color } from \"../../util/Color\";\n\nimport { Entity, IEntitySettings, IEntityPrivate, IEntityEvents } from \"../../util/Entity\";\n\nexport interface IPatternSettings extends IEntitySettings {\n\n\t/**\n\t * Rotation of patterm in degrees. Supported values: -90 to 90.\n\t *\n\t * @default 0\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/patterns/#Rotation} for more info\n\t */\n\trotation?: number;\n\n\t/**\n\t * How pattern tiles are repeated when filling the area.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/patterns/#Repetition} for more info\n\t */\n\trepetition?: \"repeat\" | \"repeat-x\" | \"repeat-y\" | \"no-repeat\";\n\n\t/**\n\t * Width of the pattern tile, in pixels.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/patterns/#Sizing_patterns} for more info\n\t */\n\twidth?: number;\n\n\t/**\n\t * Width of the pattern tile, in pixels.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/patterns/#Sizing_patterns} for more info\n\t */\n\theight?: number;\n\n\t/**\n\t * Color of the pattern shape.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/patterns/#Colors} for more info\n\t */\n\tcolor?: Color;\n\n\t/**\n\t * Opacity of the pattern shape.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/patterns/#Colors} for more info\n\t */\n\tcolorOpacity?: number;\n\n\t/**\n\t * Width of the pattern's line elements.\n\t *\n\t * @default 1\n\t */\n\tstrokeWidth?: number;\n\n\t/**\n\t * Stroke (border or line) dash settings.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/#Dashed_lines} for more information\n\t */\n\tstrokeDasharray?: number[] | number;\n\n\t/**\n\t * Stroke (border or line) dash offset.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/#Dashed_lines} for more information\n\t */\n\tstrokeDashoffset?: number;\n\n\t/**\n\t * Color to fill gaps between pattern shapes.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/patterns/#Colors} for more info\n\t */\n\tfill?: Color;\n\n\t/**\n\t * Opacity of the fill for gaps between pattern shapes.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/patterns/#Colors} for more info\n\t */\n\tfillOpacity?: number;\n\n\t/**\n\t * @ignore\n\t */\n\tcolorInherited?: boolean;\n\n\t/**\n\t * @ignore\n\t */\n\tfillInherited?: boolean;\n}\n\nexport interface IPatternPrivate extends IEntityPrivate {\n}\n\nexport interface IPatternEvents extends IEntityEvents {\n}\n\n/**\n * Base class for patterns.\n *\n * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/patterns/} for more info\n */\nexport class Pattern extends Entity {\n\tprotected _afterNew() {\n\t\t// Applying themes because pattern will not have parent\n\t\tsuper._afterNewApplyThemes();\n\t}\n\n\tdeclare public _settings: IPatternSettings;\n\tdeclare public _privateSettings: IPatternPrivate;\n\n\tpublic static className: string = \"Pattern\";\n\tpublic static classNames: Array<string> = Entity.classNames.concat([Pattern.className]);\n\n\tpublic _display: IGraphics = this._root._renderer.makeGraphics();\n\tpublic _backgroundDisplay: IGraphics = this._root._renderer.makeGraphics();\n\n\tprotected _clear = false;\n\n\tprotected _pattern: IPattern | undefined | null;\n\n\tpublic get pattern(): IPattern | undefined | null {\n\t\treturn this._pattern;\n\t}\n\n\tprotected _draw(): void { }\n\n\tpublic _beforeChanged() {\n\t\tsuper._beforeChanged();\n\n\t\tif (this.isDirty(\"repetition\") || this.isDirty(\"width\") || this.isDirty(\"height\") || this.isDirty(\"rotation\") || this.isDirty(\"strokeWidth\") || this.isDirty(\"strokeDasharray\") || this.isDirty(\"strokeDashoffset\") || this.isDirty(\"colorOpacity\") || this.isDirty(\"fillOpacity\")) {\n\t\t\tthis._clear = true;\n\t\t}\n\n\t\tthis._checkDirtyFill();\n\t}\n\n\tprotected _checkDirtyFill() {\n\t\tif (this.isDirty(\"color\") || this.isDirty(\"fill\")) {\n\t\t\tthis._clear = true;\n\t\t}\n\t}\n\n\tpublic _changed() {\n\t\tsuper._changed();\n\n\t\tif (this._clear) {\n\t\t\tconst repetition = this.get(\"repetition\", \"\");\n\t\t\tconst width = this.get(\"width\", 100);\n\t\t\tconst height = this.get(\"height\", 100);\n\t\t\tconst fill = this.get(\"fill\");\n\t\t\tconst fillOpacity = this.get(\"fillOpacity\", 1);\n\n\t\t\tconst backgroundDisplay = this._backgroundDisplay;\n\t\t\tconst display = this._display;\n\n\t\t\tdisplay.clear();\n\t\t\tbackgroundDisplay.clear();\n\n\t\t\tif (fill && (fillOpacity > 0)) {\n\t\t\t\tbackgroundDisplay.beginFill(fill, fillOpacity);\n\t\t\t\tbackgroundDisplay.drawRect(0, 0, width, height);\n\t\t\t\tbackgroundDisplay.endFill();\n\t\t\t}\n\n\t\t\tdisplay.angle = this.get(\"rotation\", 0);\n\t\t\t//display.pivot = { x: width / 2, y: height / 2 };\n\t\t\tthis._draw();\n\n\t\t\tthis._pattern = this._root._renderer.createPattern(display, backgroundDisplay, repetition, width, height);\n\t\t}\n\n\t\tthis._clear = false;\n\t}\n}\n","import { Pattern, IPatternSettings, IPatternPrivate, IPatternEvents } from \"./Pattern\";\n\nexport interface IPicturePatternSettings extends IPatternSettings {\n\n\t/**\n\t * A source URI of the image.\n\t *\n\t * Can be relative or absolute URL, or data-uri.\n\t */\n\tsrc?: string;\n\n\t/**\n\t * How pattern should be sized:\n\t *\n\t * * `\"image\"` (default) - pattern will be sized to actual image dimensions.\n\t * * `\"pattern\"` - image will sized to image dimensions.\n\t * * `\"none\"` - image will be placed in the pattern, regardless of either dimensions.\n\t * \n\t * @default \"image\"\n\t */\n\tfit?: \"image\" | \"pattern\" | \"none\";\n\n\t/**\n\t * Center images.\n\t *\n\t * @default true\n\t */\n\tcentered?: boolean;\n\n\n\n\tcanvas?: HTMLCanvasElement;\n\n}\n\nexport interface IPicturePatternPrivate extends IPatternPrivate {\n}\n\nexport interface IPicturePatternEvents extends IPatternEvents {\n\n\t/**\n\t * Invoked when related image is loaded.\n\t */\n\tloaded: {};\n\n}\n\n/**\n * Picture pattern.\n *\n * @since 5.2.15\n *\n * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/patterns/} for more info\n */\nexport class PicturePattern extends Pattern {\n\tdeclare public _settings: IPicturePatternSettings;\n\tdeclare public _privateSettings: IPicturePatternPrivate;\n\tdeclare public _events: IPicturePatternEvents;\n\n\tpublic static className: string = \"PicturePattern\";\n\tpublic static classNames: Array<string> = Pattern.classNames.concat([PicturePattern.className]);\n\n\tpublic _image: HTMLImageElement | undefined;\n\n\tpublic _beforeChanged() {\n\t\tsuper._beforeChanged();\n\n\t\tthis._clear = true;\n\n\t\tif (this.isDirty(\"src\")) {\n\t\t\tthis._load();\n\t\t}\n\n\t\tconst canvas = this.get(\"canvas\");\n\t\tif (canvas) {\n\t\t\tthis.set(\"width\", canvas.width);\n\t\t\tthis.set(\"height\", canvas.height)\n\t\t}\n\t}\n\n\tprotected _draw() {\n\t\tsuper._draw();\n\n\t\tconst colorOpacity = this.get(\"colorOpacity\");\n\t\tif (colorOpacity !== undefined) {\n\t\t\tthis._display.alpha = Math.max(0, colorOpacity);\n\t\t}\n\n\t\tconst image = this._image;\n\t\tif (image) {\n\t\t\tconst patternWidth = this.get(\"width\", 100);\n\t\t\tconst patternHeight = this.get(\"height\", 100);\n\n\t\t\t// Fit\n\t\t\tconst fit = this.get(\"fit\", \"image\");\n\t\t\tlet width = 0;\n\t\t\tlet height = 0;\n\t\t\tif (fit == \"pattern\") {\n\t\t\t\twidth = patternWidth;\n\t\t\t\theight = patternHeight;\n\t\t\t\tthis.markDirty();\n\t\t\t}\n\t\t\telse {\n\t\t\t\twidth = image.width;\n\t\t\t\theight = image.height;\n\t\t\t\tif (fit == \"image\") {\n\t\t\t\t\tthis.set(\"width\", width);\n\t\t\t\t\tthis.set(\"height\", height);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Position\n\t\t\tconst centered = this.get(\"centered\", true);\n\t\t\tlet x = 0;\n\t\t\tlet y = 0;\n\t\t\tif (centered) {\n\t\t\t\tx = patternWidth / 2 - width / 2;\n\t\t\t\ty = patternHeight / 2 - height / 2;\n\t\t\t}\n\t\t\tthis._display.image(image, width, height, x, y);\n\t\t}\n\n\t\tconst canvas = this.get(\"canvas\");\n\t\tif (canvas) {\n\t\t\tthis._display.image(canvas, canvas.width, canvas.height, 0, 0);\n\t\t}\n\n\t}\n\n\tprotected _load() {\n\t\tconst src = this.get(\"src\");\n\t\tif (src) {\n\t\t\tconst image = new Image();\n\t\t\t//image.crossOrigin = \"Anonymous\";\n\t\t\timage.src = src!;\n\t\t\timage.decode().then(() => {\n\t\t\t\tthis._image = image;\n\t\t\t\tthis._draw();\n\t\t\t\tif (this.events.isEnabled(\"loaded\")) {\n\t\t\t\t\tthis.events.dispatch(\"loaded\", { type: \"loaded\", target: this });\n\t\t\t\t}\n\t\t\t}).catch((_error: any) => {\n\t\t\t\t// TODO: maybe raise error?\n\t\t\t});\n\t\t}\n\t}\n\n}","import type { Color } from \"../util/Color\";\nimport type { Pattern } from \"../render/patterns/Pattern\";\nimport type { Gradient } from \"../render/gradients/Gradient\";\n\nimport { PicturePattern } from \"../render/patterns/PicturePattern\";\nimport { ISpriteSettings, ISpritePrivate, ISpriteEvents, Sprite } from \"./Sprite\";\nimport { IGraphics, BlendMode } from \"./backend/Renderer\";\n\nimport * as $type from \"../util/Type\";\nimport * as $array from \"../util/Array\";\n\n\nexport const visualSettings = [\"fill\", \"fillOpacity\", \"stroke\", \"strokeWidth\", \"strokeOpacity\", \"fillPattern\", \"strokePattern\", \"fillGradient\", \"strokeGradient\", \"strokeDasharray\", \"strokeDashoffset\", \"shadowBlur\", \"shadowColor\", \"shadowOpacity\", \"shadowOffsetX\", \"shadowOffsetY\", \"blur\", \"sepia\", \"invert\", \"brightness\", \"hue\", \"contrast\", \"saturate\"];\n\nexport interface IGraphicsSettings extends ISpriteSettings {\n\n\t/**\n\t * Fill color.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/} for more information\n\t */\n\tfill?: Color;\n\n\t/**\n\t * Stroke (border or line) color.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/} for more information\n\t */\n\tstroke?: Color;\n\n\t/**\n\t * Fill pattern.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/patterns/} for more information\n\t */\n\tfillPattern?: Pattern;\n\n\t/**\n\t * Stroke (border or line) pattern.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/patterns/} for more information\n\t */\n\tstrokePattern?: Pattern;\n\n\t/**\n\t * Fill gradient.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/gradients/} for more information\n\t */\n\tfillGradient?: Gradient;\n\n\t/**\n\t * Stroke (border or line) gradient.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/gradients/} for more information\n\t */\n\tstrokeGradient?: Gradient;\n\n\t/**\n\t * Stroke (border or line) dash settings.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/#Dashed_lines} for more information\n\t */\n\tstrokeDasharray?: number[] | number;\n\n\t/**\n\t * Stroke (border or line) dash offset.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/#Dashed_lines} for more information\n\t */\n\tstrokeDashoffset?: number;\n\n\t/**\n\t * Opacity of the fill. 0 - fully transparent; 1 - fully opaque.\n\t */\n\tfillOpacity?: number;\n\n\t/**\n\t * Opacity of the stroke (border or line). 0 - fully transparent; 1 - fully opaque.\n\t */\n\tstrokeOpacity?: number;\n\n\t/**\n\t * Width of the stroke (border or line) in pixels.\n\t */\n\tstrokeWidth?: number;\n\n\t/**\n\t * Indicates if stroke of a Graphics should stay the same when it's scale changes. Note, this doesn't take into account parent container scale changes.\n\t * @default false\n\t */\n\tnonScalingStroke?: boolean;\n\n\t/**\n\t * Drawing function.\n\t *\n\t * Must use renderer (`display` parameter) methods to draw.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/graphics/#Custom_draw_functions} for more info\n\t */\n\tdraw?: (display: IGraphics, graphics: Graphics) => void;\n\n\t/**\n\t * Rendering mode.\n\t *\n\t * @default BlendMode.NORMAL (\"source-over\")\n\t * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/globalCompositeOperation} for more information\n\t * @ignore\n\t */\n\tblendMode?: BlendMode;\n\n\t/**\n\t * Draw a shape using an SVG path.\n\t *\n\t * @see {@link https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths} for more information\n\t */\n\tsvgPath?: string;\n\n\t/**\n\t * Color of the element's shadow.\n\t *\n\t * For this to work at least one of the following needs to be set as well:\n\t * `shadowBlur`, `shadowOffsetX`, `shadowOffsetY`.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/shadows/} for more info\n\t */\n\tshadowColor?: Color | null;\n\n\t/**\n\t * Blurriness of the the shadow.\n\t *\n\t * The bigger the number, the more blurry shadow will be.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/shadows/} for more info\n\t */\n\tshadowBlur?: number;\n\n\t/**\n\t * Horizontal shadow offset in pixels.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/shadows/} for more info\n\t */\n\tshadowOffsetX?: number;\n\n\t/**\n\t * Vertical shadow offset in pixels.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/shadows/} for more info\n\t */\n\tshadowOffsetY?: number;\n\n\t/**\n\t * Opacity of the shadow (0-1).\n\t *\n\t * If not set, will use the same as `fillOpacity` of the element.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/shadows/} for more info\n\t */\n\tshadowOpacity?: number;\n\n\t/**\n\t * A method to be used on anchor points (joints) of the multi-point line.\n\t *\n\t * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/lineJoin} for more info\n\t * @default \"miter\"\n\t * @since 5.2.10\n\t */\n\tlineJoin?: \"miter\" | \"round\" | \"bevel\";\n\n\t/**\n\t * This setting determines the shape used to draw the end points of lines.\n\t *\n\t * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/lineCap} for more info\n\t * @default \"butt\"\n\t * @since 5.10.8\n\t */\n\tlineCap?: \"butt\" | \"round\" | \"square\";\n}\n\nexport interface IGraphicsPrivate extends ISpritePrivate {\n\n}\n\nexport interface IGraphicsEvents extends ISpriteEvents {\n\n}\n\n/**\n * Base class used for drawing shapes.\n *\n * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/graphics/} for more info\n * @important\n */\nexport class Graphics extends Sprite {\n\n\tdeclare public _settings: IGraphicsSettings;\n\tdeclare public _privateSettings: IGraphicsPrivate;\n\tdeclare public _events: IGraphicsEvents;\n\n\tpublic _display: IGraphics = this._root._renderer.makeGraphics();\n\n\tprotected _clear = false;\n\n\tpublic static className: string = \"Graphics\";\n\tpublic static classNames: Array<string> = Sprite.classNames.concat([Graphics.className]);\n\n\tpublic _beforeChanged() {\n\t\tsuper._beforeChanged();\n\n\t\tif (this.isDirty(\"draw\") || this.isDirty(\"svgPath\")) {\n\t\t\tthis.markDirtyBounds();\n\t\t}\n\n\t\tif (this.isDirty(\"fill\") || this.isDirty(\"stroke\") || this.isDirty(\"visible\") || this.isDirty(\"forceHidden\") || this.isDirty(\"scale\") || this.isDirty(\"fillGradient\") || this.isDirty(\"strokeGradient\") || this.isDirty(\"fillPattern\") || this.isDirty(\"strokePattern\") || this.isDirty(\"fillOpacity\") || this.isDirty(\"strokeOpacity\") || this.isDirty(\"strokeWidth\") || this.isDirty(\"draw\") || this.isDirty(\"blendMode\") || this.isDirty(\"strokeDasharray\") || this.isDirty(\"strokeDashoffset\") || this.isDirty(\"svgPath\") || this.isDirty(\"lineJoin\") || this.isDirty(\"lineCap\") || this.isDirty(\"shadowColor\") || this.isDirty(\"shadowBlur\") || this.isDirty(\"shadowOffsetX\") || this.isDirty(\"shadowOffsetY\")) {\n\t\t\tthis._clear = true;\n\t\t}\n\n\t\tthis._display.crisp = this.get(\"crisp\", false);\n\n\t\tif (this.isDirty(\"fillGradient\")) {\n\t\t\tconst gradient = this.get(\"fillGradient\");\n\t\t\tif (gradient) {\n\t\t\t\tthis._display.isMeasured = true;\n\t\t\t\tconst gradientTarget = gradient.get(\"target\");\n\t\t\t\tif (gradientTarget) {\n\t\t\t\t\tthis._disposers.push(gradientTarget.events.on(\"boundschanged\", () => {\n\t\t\t\t\t\tthis._markDirtyKey(\"fill\");\n\t\t\t\t\t}))\n\t\t\t\t\tthis._disposers.push(\n\t\t\t\t\t\tgradientTarget.events.on(\"positionchanged\", () => {\n\t\t\t\t\t\t\tthis._markDirtyKey(\"fill\");\n\t\t\t\t\t\t}))\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (this.isDirty(\"strokeGradient\")) {\n\t\t\tconst gradient = this.get(\"strokeGradient\");\n\t\t\tif (gradient) {\n\t\t\t\tthis._display.isMeasured = true;\n\t\t\t\tconst gradientTarget = gradient.get(\"target\");\n\t\t\t\tif (gradientTarget) {\n\t\t\t\t\tthis._disposers.push(\n\t\t\t\t\t\tgradientTarget.events.on(\"boundschanged\", () => {\n\t\t\t\t\t\t\tthis._markDirtyKey(\"stroke\");\n\t\t\t\t\t\t}))\n\t\t\t\t\tthis._disposers.push(\n\t\t\t\t\t\tgradientTarget.events.on(\"positionchanged\", () => {\n\t\t\t\t\t\t\tthis._markDirtyKey(\"stroke\");\n\t\t\t\t\t\t}))\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic _changed() {\n\t\tsuper._changed();\n\n\t\tif (this._clear) {\n\t\t\tthis.markDirtyBounds();\n\t\t\tthis.markDirtyLayer();\n\t\t\tthis._display.clear();\n\n\t\t\tlet strokeDasharray = this.get(\"strokeDasharray\");\n\t\t\tif ($type.isNumber(strokeDasharray)) {\n\t\t\t\tif (strokeDasharray < 0.5) {\n\t\t\t\t\tstrokeDasharray = [0];\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tstrokeDasharray = [strokeDasharray]\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis._display.setLineDash(strokeDasharray as number[]);\n\n\t\t\tconst strokeDashoffset = this.get(\"strokeDashoffset\");\n\t\t\tif (strokeDashoffset) {\n\t\t\t\tthis._display.setLineDashOffset(strokeDashoffset);\n\t\t\t}\n\n\t\t\tconst blendMode = this.get(\"blendMode\", BlendMode.NORMAL);\n\t\t\tthis._display.blendMode = blendMode;\n\n\t\t\tconst draw = this.get(\"draw\");\n\n\t\t\tif (draw && typeof draw === \"function\") {\n\t\t\t\tdraw(this._display, this);\n\t\t\t}\n\n\t\t\tconst svgPath = this.get(\"svgPath\");\n\t\t\tif (svgPath != null) {\n\t\t\t\tthis._display.svgPath(svgPath!);\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic _afterChanged() {\n\t\tsuper._afterChanged();\n\n\t\tif (this._clear) {\n\t\t\tconst fill = this.get(\"fill\");\n\t\t\tconst fillGradient = this.get(\"fillGradient\");\n\t\t\tconst fillPattern = this.get(\"fillPattern\");\n\t\t\tconst fillOpacity = this.get(\"fillOpacity\");\n\n\t\t\tconst stroke = this.get(\"stroke\");\n\t\t\tconst strokeGradient = this.get(\"strokeGradient\");\n\t\t\tconst strokePattern = this.get(\"strokePattern\");\n\n\t\t\tconst shadowColor = this.get(\"shadowColor\");\n\t\t\tconst shadowBlur = this.get(\"shadowBlur\");\n\t\t\tconst shadowOffsetX = this.get(\"shadowOffsetX\");\n\t\t\tconst shadowOffsetY = this.get(\"shadowOffsetY\");\n\t\t\tconst shadowOpacity = this.get(\"shadowOpacity\");\n\n\t\t\tif (shadowColor && (shadowBlur || shadowOffsetX || shadowOffsetY)) {\n\t\t\t\tthis._display.shadow(shadowColor, shadowBlur, shadowOffsetX, shadowOffsetY, shadowOpacity);\n\t\t\t}\n\n\t\t\tif (fill && !fillGradient) {\n\t\t\t\tthis._display.beginFill(fill, fillOpacity);\n\t\t\t\tthis._display.endFill();\n\t\t\t}\n\n\t\t\tif (fillGradient) {\n\t\t\t\tif (fill) {\n\t\t\t\t\tconst stops = fillGradient.get(\"stops\", []);\n\t\t\t\t\tif (stops.length) {\n\t\t\t\t\t\t$array.each(stops, (stop: any) => {\n\t\t\t\t\t\t\tif ((!stop.color || stop.colorInherited) && fill) {\n\t\t\t\t\t\t\t\tstop.color = fill;\n\t\t\t\t\t\t\t\tstop.colorInherited = true;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (stop.opacity == null || stop.opacityInherited) {\n\t\t\t\t\t\t\t\tstop.opacity = fillOpacity;\n\t\t\t\t\t\t\t\tstop.opacityInherited = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tconst gradient = fillGradient.getFill(this);\n\t\t\t\tif (gradient) {\n\t\t\t\t\tthis._display.beginFill(gradient, fillOpacity);\n\t\t\t\t\tthis._display.endFill();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (fillPattern) {\n\t\t\t\tconst pattern = fillPattern.pattern;\n\t\t\t\tif (pattern) {\n\t\t\t\t\tthis._display.beginFill(pattern, fillOpacity);\n\t\t\t\t\tthis._display.endFill();\n\n\t\t\t\t\tif (fillPattern instanceof PicturePattern) {\n\t\t\t\t\t\tfillPattern.events.once(\"loaded\", () => {\n\t\t\t\t\t\t\tthis._clear = true;\n\t\t\t\t\t\t\tthis.markDirty();\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (stroke || strokeGradient || strokePattern) {\n\t\t\t\tconst strokeOpacity = this.get(\"strokeOpacity\");\n\t\t\t\tlet strokeWidth = this.get(\"strokeWidth\", 1);\n\n\t\t\t\tif (this.get(\"nonScalingStroke\")) {\n\t\t\t\t\tstrokeWidth = strokeWidth / this.get(\"scale\", 1)\n\t\t\t\t}\n\n\t\t\t\tif (this.get(\"crisp\")) {\n\t\t\t\t\tstrokeWidth /= this._root._renderer.resolution;\n\t\t\t\t}\n\n\t\t\t\tconst lineJoin = this.get(\"lineJoin\");\n\t\t\t\tconst lineCap = this.get(\"lineCap\");\n\n\t\t\t\tif (stroke && !strokeGradient) {\n\t\t\t\t\tthis._display.lineStyle(strokeWidth, stroke, strokeOpacity, lineJoin, lineCap);\n\t\t\t\t\tthis._display.endStroke();\n\t\t\t\t}\n\n\n\t\t\t\tif (strokeGradient) {\n\t\t\t\t\tconst stops = strokeGradient.get(\"stops\", []);\n\t\t\t\t\tif (stops.length) {\n\t\t\t\t\t\t$array.each(stops, (stop: any) => {\n\t\t\t\t\t\t\tif ((!stop.color || stop.colorInherited) && stroke) {\n\t\t\t\t\t\t\t\tstop.color = stroke;\n\t\t\t\t\t\t\t\tstop.colorInherited = true;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (stop.opacity == null || stop.opacityInherited) {\n\t\t\t\t\t\t\t\tstop.opacity = strokeOpacity;\n\t\t\t\t\t\t\t\tstop.opacityInherited = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\n\t\t\t\t\tconst gradient = strokeGradient.getFill(this);\n\t\t\t\t\tif (gradient) {\n\t\t\t\t\t\tthis._display.lineStyle(strokeWidth, gradient, strokeOpacity, lineJoin, lineCap);\n\t\t\t\t\t\tthis._display.endStroke();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (strokePattern) {\n\t\t\t\t\t/*\n\t\t\t\t\tlet changed = false;\n\t\t\t\t\t\n\t\t\t\t\tif (stroke && (!strokePattern.get(\"color\") || strokePattern.get(\"colorInherited\"))) {\n\t\t\t\t\t\tstrokePattern.set(\"color\", stroke);\n\t\t\t\t\t\tstrokePattern.set(\"colorInherited\", true);\n\t\t\t\t\t\tchanged = true;\n\t\t\t\t\t}\n\t\t\t\t\tif (changed) {\n\t\t\t\t\t\t// @todo: is this OK?\n\t\t\t\t\t\tstrokePattern._changed();\n\t\t\t\t\t}\n\t\t\t\t\t*/\n\t\t\t\t\tlet pattern = strokePattern.pattern;\n\n\t\t\t\t\tif (pattern) {\n\t\t\t\t\t\tthis._display.lineStyle(strokeWidth, pattern, strokeOpacity, lineJoin, lineCap);\n\t\t\t\t\t\tthis._display.endStroke();\n\n\t\t\t\t\t\tif (strokePattern instanceof PicturePattern) {\n\t\t\t\t\t\t\tstrokePattern.events.once(\"loaded\", () => {\n\t\t\t\t\t\t\t\tthis._clear = true;\n\t\t\t\t\t\t\t\tthis.markDirty();\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (this.getPrivate(\"showingTooltip\")) {\n\t\t\t\tthis.showTooltip();\n\t\t\t}\n\t\t}\n\n\t\tthis._clear = false;\n\t}\n\n}\n","import { Layout, ILayoutSettings, ILayoutPrivate, eachChildren } from \"./Layout\";\nimport * as $array from \"../util/Array\";\nimport * as $math from \"../util/Math\";\nimport type { Container } from \"./Container\";\n\n\nexport interface IGridLayoutSettings extends ILayoutSettings {\n\n\t/**\n\t * If set to `true` all columns in the grid will be equal width.\n\t *\n\t * @default false\n\t */\n\tfixedWidthGrid?: boolean;\n\n\t/**\n\t * Maximum number of columns in the grid.\n\t */\n\tmaxColumns?: number;\n\n}\n\nexport interface IGridLayoutPrivate extends ILayoutPrivate {\n}\n\n/**\n * A grid children layout for [[Container]].\n *\n * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/containers/#Layout} for more info\n */\nexport class GridLayout extends Layout {\n\n\tpublic static className: string = \"GridLayout\";\n\tpublic static classNames: Array<string> = Layout.classNames.concat([GridLayout.className]);\n\n\tdeclare public _settings: IGridLayoutSettings;\n\tdeclare public _privateSettings: IGridLayoutPrivate;\n\n\n\tprotected _afterNew() {\n\t\tthis._setRawDefault(\"maxColumns\", Number.MAX_VALUE);\n\t\tsuper._afterNew();\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateContainer(container: Container): void {\n\t\tlet paddingLeft = container.get(\"paddingLeft\", 0);\n\t\tlet paddingRight = container.get(\"paddingRight\", 0);\n\t\tlet paddingTop = container.get(\"paddingTop\", 0);\n\n\t\tlet availableWidth = container.maxWidth() - paddingLeft - paddingRight;\n\n\t\tlet minCellWidth = availableWidth;\n\t\tlet maxCellWidth = 1;\n\n\t\teachChildren(container, (child) => {\n\t\t\tif(child.get(\"visible\") && child.getPrivate(\"visible\") && !child.get(\"forceHidden\")){\n\t\t\t\tif (child.get(\"position\") != \"absolute\") {\n\t\t\t\t\tlet childWidth = child.width();\n\n\t\t\t\t\tif (childWidth < minCellWidth) {\n\t\t\t\t\t\tminCellWidth = childWidth;\n\t\t\t\t\t}\n\t\t\t\t\tif (childWidth > maxCellWidth) {\n\t\t\t\t\t\tmaxCellWidth = childWidth;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tminCellWidth = $math.fitToRange(minCellWidth, 1, availableWidth);\n\t\tmaxCellWidth = $math.fitToRange(maxCellWidth, 1, availableWidth);\n\n\t\tlet columnCount = 1;\n\t\tif (this.get(\"fixedWidthGrid\")) {\n\t\t\tcolumnCount = availableWidth / maxCellWidth;\n\t\t}\n\t\telse {\n\t\t\tcolumnCount = availableWidth / minCellWidth;\n\t\t}\n\n\t\tcolumnCount = Math.max(1, Math.floor(columnCount));\n\t\tcolumnCount = Math.min(this.get(\"maxColumns\", Number.MAX_VALUE), columnCount);\n\n\t\tlet columnWidths = this.getColumnWidths(container, columnCount, maxCellWidth, availableWidth);\n\n\t\tlet prevY = paddingTop;\n\n\t\tlet column = 0;\n\t\tlet maxColumnHeight = 0;\n\n\t\tcolumnCount = columnWidths.length;\n\n\t\tlet prevX = paddingLeft;\n\n\t\teachChildren(container, (child) => {\n\t\t\tif (child.get(\"position\") == \"relative\" && child.isVisible()) {\n\t\t\t\tconst marginTop = child.get(\"marginTop\", 0);\n\t\t\t\tconst marginBottom = child.get(\"marginBottom\", 0);\n\n\t\t\t\tlet bounds = child.adjustedLocalBounds();\n\n\t\t\t\tlet marginLeft = child.get(\"marginLeft\", 0);\n\t\t\t\tlet marginRight = child.get(\"marginRight\", 0);\n\t\t\t\tlet x = prevX + marginLeft - bounds.left;\n\t\t\t\tlet y = prevY + marginTop - bounds.top;\n\n\t\t\t\tchild.setPrivate(\"x\", x);\n\t\t\t\tchild.setPrivate(\"y\", y);\n\n\t\t\t\tprevX += columnWidths[column] + marginRight;\n\n\t\t\t\tmaxColumnHeight = Math.max(maxColumnHeight, child.height() + marginTop + marginBottom);\n\n\t\t\t\tcolumn++;\n\n\t\t\t\tif (column >= columnCount) {\n\t\t\t\t\tcolumn = 0;\n\t\t\t\t\tprevX = paddingLeft;\n\t\t\t\t\tprevY += maxColumnHeight;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic getColumnWidths(container: Container, columnCount: number, maxCellWidth: number, availableWidth: number): number[] {\n\t\tlet totalWidth = 0;\n\t\tlet columnWidths: Array<number> = [];\n\t\tlet column = 0;\n\n\t\teachChildren(container, (child) => {\n\t\t\tlet bounds = child.adjustedLocalBounds();\n\t\t\tif (child.get(\"position\") != \"absolute\" && child.isVisible()) {\n\t\t\t\tif (this.get(\"fixedWidthGrid\")) {\n\t\t\t\t\tcolumnWidths[column] = maxCellWidth;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tcolumnWidths[column] = Math.max(columnWidths[column] | 0, bounds.right - bounds.left + child.get(\"marginLeft\", 0) + child.get(\"marginRight\", 0));\n\t\t\t\t}\n\n\t\t\t\tif (column < container.children.length - 1) {\n\t\t\t\t\tcolumn++;\n\t\t\t\t\tif (column == columnCount) {\n\t\t\t\t\t\tcolumn = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t$array.each(columnWidths, (w) => {\n\t\t\ttotalWidth += w;\n\t\t})\n\n\t\tif (totalWidth > availableWidth) {\n\t\t\tif (columnCount > 2) {\n\t\t\t\tcolumnCount -= 1;\n\t\t\t\treturn this.getColumnWidths(container, columnCount, maxCellWidth, availableWidth);\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn [availableWidth];\n\t\t\t}\n\t\t}\n\n\t\treturn columnWidths;\n\t}\n}\n","import { Layout, eachChildren } from \"./Layout\";\nimport * as $type from \"../util/Type\";\nimport { Percent } from \"../util/Percent\";\nimport type { Container } from \"./Container\";\n\n/**\n * A horizontal children layout for [[Container]].\n *\n * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/containers/#Layout} for more info\n */\nexport class HorizontalLayout extends Layout {\n\n\tpublic static className: string = \"HorizontalLayout\";\n\tpublic static classNames: Array<string> = Layout.classNames.concat([HorizontalLayout.className]);\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateContainer(container: Container): void {\n\n\t\tlet paddingLeft = container.get(\"paddingLeft\", 0);\n\n\t\tlet availableWidth = container.innerWidth();\n\n\t\tlet totalPercent = 0;\n\n\t\teachChildren(container, (child) => {\n\t\t\tif (child.isVisible()) {\n\t\t\t\tif (child.get(\"position\") == \"relative\") {\n\t\t\t\t\tlet childWidth = child.get(\"width\");\n\t\t\t\t\tif (childWidth instanceof Percent) {\n\t\t\t\t\t\ttotalPercent += childWidth.value;\n\n\t\t\t\t\t\tlet w = availableWidth * childWidth.value;\n\t\t\t\t\t\tlet minWidth = child.get(\"minWidth\", child.getPrivate(\"minWidth\", -Infinity));\n\t\t\t\t\t\tif (minWidth > w) {\n\t\t\t\t\t\t\tavailableWidth -= minWidth;\n\t\t\t\t\t\t\ttotalPercent -= childWidth.value;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlet maxWidth = child.get(\"maxWidth\", child.getPrivate(\"maxWidth\", Infinity));\n\t\t\t\t\t\tif (w > maxWidth) {\n\t\t\t\t\t\t\tavailableWidth -= maxWidth;\n\t\t\t\t\t\t\ttotalPercent -= childWidth.value;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (!$type.isNumber(childWidth)) {\n\t\t\t\t\t\t\tchildWidth = child.width();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tavailableWidth -= childWidth + child.get(\"marginLeft\", 0) + child.get(\"marginRight\", 0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tif (availableWidth <= 0 || availableWidth == Infinity) {\n\t\t\tavailableWidth = .1;\n\t\t}\n\n\t\t//if (availableWidth > 0) {\n\t\teachChildren(container, (child) => {\n\t\t\tif (child.isVisible()) {\n\t\t\t\tif (child.get(\"position\") == \"relative\") {\n\t\t\t\t\tlet childWidth = child.get(\"width\");\n\t\t\t\t\tif (childWidth instanceof Percent) {\n\t\t\t\t\t\tlet privateWidth = availableWidth * childWidth.value / totalPercent - child.get(\"marginLeft\", 0) - child.get(\"marginRight\", 0);\n\t\t\t\t\t\tlet minWidth = child.get(\"minWidth\", child.getPrivate(\"minWidth\", -Infinity));\n\t\t\t\t\t\tlet maxWidth = child.get(\"maxWidth\", child.getPrivate(\"maxWidth\", Infinity));\n\t\t\t\t\t\tprivateWidth = Math.min(Math.max(minWidth, privateWidth), maxWidth);\n\n\t\t\t\t\t\tchild.setPrivate(\"width\", privateWidth);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (child._prevSettings.width instanceof Percent) {\n\t\t\t\t\t\t\tchild.setPrivate(\"width\", undefined);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t//}\n\n\t\tlet prevX = paddingLeft;\n\n\t\teachChildren(container, (child) => {\n\n\t\t\tif (child.get(\"position\") == \"relative\") {\n\t\t\t\tif (child.isVisible()) {\n\t\t\t\t\tlet bounds = child.adjustedLocalBounds();\n\t\t\t\t\tlet marginLeft = child.get(\"marginLeft\", 0);\n\t\t\t\t\tlet marginRight = child.get(\"marginRight\", 0);\n\n\t\t\t\t\tlet maxWidth = child.get(\"maxWidth\");\n\n\t\t\t\t\tlet left = bounds.left;\n\t\t\t\t\tlet right = bounds.right;\n\t\t\t\t\tif (maxWidth) {\n\t\t\t\t\t\tif (right - left > maxWidth) {\n\t\t\t\t\t\t\tright = left + maxWidth\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tlet x = prevX + marginLeft - left;\n\t\t\t\t\tchild.setPrivate(\"x\", x);\n\t\t\t\t\tprevX = x + right + marginRight;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tchild.setPrivate(\"x\", undefined);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}\n","import type { Color } from \"../util/Color\";\nimport type { Percent } from \"../util/Percent\";\nimport type { DataItem, IComponentDataItem } from \"./Component\";\nimport type { Gradient } from \"../render/gradients/Gradient\";\n\nimport { Text } from \"../render/Text\";\nimport { p50, p100 } from \"../util/Percent\";\nimport { Container, IContainerPrivate, IContainerSettings, IContainerEvents } from \"./Container\";\n\nimport * as $array from \"../../core/util/Array\";\nimport * as $type from \"../../core/util/Type\";\n\n\nexport interface ILabelSettings extends IContainerSettings {\n\n\t/**\n\t * Labels' text.\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/formatters/text-styling/} for text styling info\n\t * \n\t */\n\ttext?: string;\n\n\t/**\n\t * Text color.\n\t */\n\tfill?: Color;\n\n\t/**\n\t * Text opacity.\n\t *\n\t * @default 1\n\t * @ince 5.2.39\n\t */\n\tfillOpacity?: number;\n\n\t/**\n\t * Fill gradient.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/gradients/} for more information\n\t * @since 5.10.1\n\t */\n\tfillGradient?: Gradient;\n\n\t/**\n\t * Alignment.\n\t */\n\ttextAlign?: \"start\" | \"end\" | \"left\" | \"right\" | \"center\";\n\n\t/**\n\t * Font family to use for the label.\n\t *\n\t * Multiple fonts can be separated by commas.\n\t */\n\tfontFamily?: string;\n\n\t/**\n\t * Font size in misc any supported CSS format (pixel, point, em, etc.).\n\t */\n\tfontSize?: string | number;\n\n\t/**\n\t * Font weight.\n\t */\n\tfontWeight?: \"normal\" | \"bold\" | \"bolder\" | \"lighter\" | \"100\" | \"200\" | \"300\" | \"400\" | \"500\" | \"600\" | \"700\" | \"800\" | \"900\";\n\n\t/**\n\t * Font style.\n\t */\n\tfontStyle?: \"normal\" | \"italic\" | \"oblique\";\n\n\t/**\n\t * Font variant.\n\t */\n\tfontVariant?: \"normal\" | \"small-caps\";\n\n\t/**\n\t * Text decoration.\n\t *\n\t * Supported options `\"underline\"`, `\"line-through\"`.\n\t *\n\t * @since 5.0.15\n\t */\n\ttextDecoration?: \"underline\" | \"line-through\";\n\n\t/**\n\t * Line height in percent or absolute pixels.\n\t */\n\tlineHeight?: Percent | number;\n\n\t/**\n\t * How mouch of the height should be considered to go below baseline.\n\t *\n\t * @default 0.19\n\t */\n\tbaselineRatio?: number;\n\n\t/**\n\t * Opacity of the label.\n\t *\n\t * 0 - fully transparent; 1 - fully opaque.\n\t */\n\topacity?: number;\n\n\t/**\n\t * Text direction.\n\t *\n\t * @default \"ltr\"\n\t */\n\tdirection?: \"ltr\" | \"rtl\";\n\n\t/**\n\t * A base line to use when aligning text chunks vertically.\n\t */\n\ttextBaseline?: \"top\" | \"hanging\" | \"middle\" | \"alphabetic\" | \"ideographic\" | \"bottom\";\n\n\t/**\n\t * How to handle labels that do not fit into its designated space.\n\t *\n\t * LIMITATIONS: on circular labels, the only values supported are `\"hide\"` and\n\t * `\"truncate\"`. The latter will ignore `breakWords` setting.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/labels/#Oversized_text} for more info\n\t */\n\toversizedBehavior?: \"none\" | \"hide\" | \"fit\" | \"wrap\" | \"wrap-no-break\" | \"truncate\";\n\n\t/**\n\t * Whether words can be broken when truncating or wrapping text.\n\t *\n\t * @default false\n\t */\n\tbreakWords?: boolean;\n\n\t/**\n\t * Ellipsis characters to use when truncating text.\n\t *\n\t * Will use Unicode ellipsis symbol (`\"…\"`) by default, which might not be\n\t * available in all fonts. If ellipsis looks broken, use different\n\t * characters. E.g.:\n\t *\n\t * ```TypeScript\n\t * label.set(\"ellipsis\", \"...\");\n\t * ```\n\t * ```JavaScript\n\t * label.set(\"ellipsis\", \"...\");\n\t * ```\n\t *\n\t *\n\t * @default \"…\"\n\t */\n\tellipsis?: string;\n\n\t/**\n\t * Minimum relative scale allowed for label when scaling down\n\t * when `oversizedBehavior` is set to `\"fit\"`.\n\t *\n\t * If fitting the label would require it to scale beyond `minScale` it would\n\t * be hidden instead.\n\t */\n\tminScale?: number;\n\n\t/**\n\t * If set to `true` the label will parse `text` for data placeholders and\n\t * will try to populate them with actual data.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/labels/#Data_placeholders} for more info\n\t */\n\tpopulateText?: boolean;\n\n\t/**\n\t * If set to `true`, will ignore in-line formatting blocks and will display\n\t * text exactly as it is.\n\t *\n\t * @default false\n\t */\n\tignoreFormatting?: boolean;\n\n\t/**\n\t * Color of the element's shadow.\n\t *\n\t * For this to work at least one of the following needs to be set as well:\n\t * `shadowBlur`, `shadowOffsetX`, `shadowOffsetY`.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/shadows/} for more info\n\t */\n\tshadowColor?: Color | null;\n\n\t/**\n\t * Blurriness of the the shadow.\n\t *\n\t * The bigger the number, the more blurry shadow will be.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/shadows/} for more info\n\t */\n\tshadowBlur?: number;\n\n\t/**\n\t * Horizontal shadow offset in pixels.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/shadows/} for more info\n\t */\n\tshadowOffsetX?: number;\n\n\t/**\n\t * Vertical shadow offset in pixels.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/shadows/} for more info\n\t */\n\tshadowOffsetY?: number;\n\n\t/**\n\t * Opacity of the shadow (0-1).\n\t *\n\t * If not set, will use the same as `fillOpacity` of the element.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/shadows/} for more info\n\t */\n\tshadowOpacity?: number;\n\n\t/**\n\t * Maximum number of characters to allow in label.\n\t *\n\t * If the `text` is longer than `maxChars`, the text will be truncated\n\t * using the `breakWords` and `ellipsis` settings.\n\t * \n\t * @since 5.7.2\n\t */\n\tmaxChars?: number;\n\n\t// The following migh be supported some day:\n\t// padding?: number;\n\t// stroke?: number;\n\t// strokeThickness?: number;\n\t// trim?: number;\n\t// wordWrap?: boolean;\n\t// leading?: number;\n\t// letterSpacing?: number;\n}\n\nexport interface ILabelPrivate extends IContainerPrivate {\n}\n\nexport interface ILabelEvents extends IContainerEvents {\n}\n\n/**\n * Creates a label with support for in-line styling and data bindings.\n *\n * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/labels/} for more info\n */\nexport class Label extends Container {\n\n\tdeclare public _settings: ILabelSettings;\n\tdeclare public _privateSettings: ILabelPrivate;\n\tdeclare public _events: ILabelEvents;\n\n\tprotected _text!: Text;\n\n\tprotected _textKeys: Array<string> = [\n\t\t\"text\",\n\t\t\"fill\",\n\t\t\"fillGradient\",\n\t\t\"fillOpacity\",\n\t\t\"textAlign\",\n\t\t\"fontFamily\",\n\t\t\"fontSize\",\n\t\t\"fontStyle\",\n\t\t\"fontWeight\",\n\t\t\"fontStyle\",\n\t\t\"fontVariant\",\n\t\t\"textDecoration\",\n\t\t\"shadowColor\",\n\t\t\"shadowBlur\",\n\t\t\"shadowOffsetX\",\n\t\t\"shadowOffsetY\",\n\t\t\"shadowOpacity\",\n\t\t// \"leading\",\n\t\t// \"letterSpacing\",\n\t\t\"lineHeight\",\n\t\t\"baselineRatio\",\n\t\t//\"padding\",\n\t\t// \"stroke\",\n\t\t// \"strokeThickness\",\n\t\t// \"trim\",\n\t\t// \"wordWrap\",\n\t\t\"direction\",\n\t\t\"textBaseline\",\n\t\t\"oversizedBehavior\",\n\t\t\"breakWords\",\n\t\t\"ellipsis\",\n\t\t\"minScale\",\n\t\t\"populateText\",\n\t\t\"role\",\n\t\t\"ignoreFormatting\",\n\t\t\"maxChars\",\n\t\t\"ariaLabel\"\n\t];\n\n\tpublic static className: string = \"Label\";\n\tpublic static classNames: Array<string> = Container.classNames.concat([Label.className]);\n\n\t/**\n\t * @ignore Text is not to be used directly\n\t */\n\tpublic get text(): Text {\n\t\treturn this._text;\n\t}\n\n\tprotected _afterNew() {\n\t\tsuper._afterNew();\n\n\t\tthis._makeText();\n\n\t\t$array.each(this._textKeys, (property) => {\n\t\t\tconst propValue = this.get(property as any);\n\t\t\tif (propValue != undefined) {\n\t\t\t\tthis._text.set(property as any, propValue);\n\t\t\t}\n\t\t});\n\n\t\tif (this.get(\"html\", \"\") !== \"\") {\n\t\t\tthis._text.set(\"text\", \"\");\n\t\t}\n\n\t\tthis.onPrivate(\"maxWidth\", () => {\n\t\t\tthis._setMaxDimentions();\n\t\t});\n\n\t\tthis.onPrivate(\"maxHeight\", () => {\n\t\t\tthis._setMaxDimentions();\n\t\t});\n\t}\n\n\tpublic _makeText() {\n\t\tthis._text = this.children.push(Text.new(this._root, {}));\n\t}\n\n\tpublic _updateChildren() {\n\t\tsuper._updateChildren();\n\n\t\tconst text = this._text;\n\n\t\t$array.each(this._textKeys, (property) => {\n\t\t\tthis._text.set(property as any, this.get(property as any));\n\t\t})\n\n\t\tif (this.isDirty(\"maxWidth\") || this.isDirty(\"maxHeight\") || this.isDirty(\"rotation\")) {\n\t\t\tthis._setMaxDimentions();\n\t\t}\n\n\t\t// Do not show regular text if HTML is used\n\t\tif (this.get(\"html\", \"\") !== \"\") {\n\t\t\ttext.set(\"text\", \"\");\n\t\t}\n\t\telse {\n\t\t\ttext.set(\"text\", this.get(\"text\"));\n\t\t\tthis._maybeUpdateHTMLColor();\n\t\t}\n\n\t\tif (this.isDirty(\"fill\") || this.isDirty(\"fillGradient\")) {\n\t\t\tthis._maybeUpdateHTMLColor();\n\t\t}\n\n\t\tif (this.isDirty(\"textAlign\") || this.isDirty(\"width\")) {\n\t\t\tconst textAlign = this.get(\"textAlign\");\n\t\t\tlet x: number | Percent | undefined;\n\t\t\tif (this.get(\"width\") != null) {\n\t\t\t\tif (textAlign == \"right\") {\n\t\t\t\t\tx = p100;\n\t\t\t\t}\n\t\t\t\telse if (textAlign == \"center\") {\n\t\t\t\t\tx = p50;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tx = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (textAlign == \"left\" || textAlign == \"start\") {\n\t\t\t\t\tx = this.get(\"paddingLeft\", 0);\n\t\t\t\t}\n\t\t\t\telse if (textAlign == \"right\" || textAlign == \"end\") {\n\t\t\t\t\tx = -this.get(\"paddingRight\", 0);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\ttext.set(\"x\", x);\n\t\t}\n\n\t\tconst background = this.get(\"background\");\n\t\tif (background) {\n\t\t\tbackground.setPrivate(\"visible\", text._display.textVisible);\n\t\t}\n\t}\n\n\tprotected _maybeUpdateHTMLColor() {\n\t\tconst htmlElement = this.getPrivate(\"htmlElement\");\n\t\tif (htmlElement && this.get(\"fill\")) {\n\t\t\thtmlElement.style.color = this.get(\"fill\")!.toCSSHex();\n\t\t\t//@todo support gradient\n\t\t}\n\t}\n\n\tprotected _setMaxDimentions() {\n\t\tconst rotation = this.get(\"rotation\");\n\t\tconst vertical = rotation == 90 || rotation == 270 || rotation == -90;\n\t\tconst text = this._text;\n\n\t\tconst maxWidth = this.get(\"maxWidth\", this.getPrivate(\"maxWidth\", Infinity));\n\t\tif ($type.isNumber(maxWidth)) {\n\t\t\ttext.set(vertical ? \"maxHeight\" : \"maxWidth\", maxWidth - this.get(\"paddingTop\", 0) - this.get(\"paddingBottom\", 0));\n\t\t}\n\t\telse {\n\t\t\ttext.set(vertical ? \"maxHeight\" : \"maxWidth\", undefined);\n\t\t}\n\n\t\tconst maxHeight = this.get(\"maxHeight\", this.getPrivate(\"maxHeight\", Infinity));\n\t\tif ($type.isNumber(maxHeight)) {\n\t\t\ttext.set(vertical ? \"maxWidth\" : \"maxHeight\", maxHeight - this.get(\"paddingLeft\", 0) - this.get(\"paddingRight\", 0));\n\t\t}\n\t\telse {\n\t\t\ttext.set(vertical ? \"maxWidth\" : \"maxHeight\", undefined);\n\t\t}\n\n\t\tthis.root.events.once(\"frameended\", () => {\n\t\t\ttext.markDirtyBounds();\n\t\t});\n\t}\n\n\tpublic _setDataItem(dataItem?: DataItem<IComponentDataItem>): void {\n\t\tsuper._setDataItem(dataItem);\n\t\tthis._markDirtyKey(\"text\")\n\t\tconst text = this._text;\n\t\tif (text.get(\"populateText\")) {\n\t\t\ttext.markDirtyText();\n\t\t}\n\t\tconst html = this.get(\"html\");\n\t\tif (html && html !== \"\") {\n\t\t\tthis._updateHTMLContent();\n\t\t}\n\t}\n\n\t/**\n\t * Returns text with populated placeholders and formatting if `populateText` is\n\t * set to `true`.\n\t *\n\t * @return Populated text\n\t */\n\tpublic getText(): string {\n\t\treturn this._text._getText();\n\t}\n\n\t/**\n\t * Returns \"aria-label\" text with populated placeholders and formatting\n\t * if `populateText` is set to `true`.\n\t *\n\t * @return Populated text\n\t */\n\tpublic getAccessibleText(): string {\n\t\treturn this._text._getAccessibleText();\n\t}\n}\n","import type { Container } from \"./Container\";\nimport type { Sprite } from \"./Sprite\";\nimport { Entity, IEntitySettings, IEntityPrivate } from \"../util/Entity\";\n\nexport interface ILayoutSettings extends IEntitySettings {\n}\n\nexport interface ILayoutPrivate extends IEntityPrivate {\n}\n\nexport function eachChildren(container: Container, f: (sprite: Sprite) => void): void {\n if (container.get(\"reverseChildren\", false)) {\n container.children.eachReverse(f);\n } else {\n container.children.each(f);\n }\n}\n\n/**\n * Base class for [[Container]] layouts.\n */\nexport abstract class Layout extends Entity {\n\tdeclare public _settings: ILayoutSettings;\n\tdeclare public _privateSettings: ILayoutPrivate;\n\n\tpublic static className: string = \"Layout\";\n\tpublic static classNames: Array<string> = Entity.classNames.concat([Layout.className]);\n\n\t/**\n\t * @ignore\n\t */\n\tpublic abstract updateContainer(_container: Container): void;\n}\n","import { Graphics, IGraphicsSettings, IGraphicsPrivate } from \"./Graphics\";\n\nexport interface IRectangleSettings extends IGraphicsSettings {\n}\n\nexport interface IRectanglePrivate extends IGraphicsPrivate {\n}\n\n/**\n * Draws a rectangle.\n *\n * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/graphics/} for more info\n * @important\n */\nexport class Rectangle extends Graphics {\n\n\tdeclare public _settings: IRectangleSettings;\n\tdeclare public _privateSettings: IRectanglePrivate;\n\n\tpublic static className: string = \"Rectangle\";\n\tpublic static classNames: Array<string> = Graphics.classNames.concat([Rectangle.className]);\n\n\tpublic _afterNew(){\n\t\tsuper._afterNew();\n\t\tthis._display.isMeasured = true;\n\t\tthis.setPrivateRaw(\"trustBounds\", true);\n\t}\n\n\tpublic _beforeChanged() {\n\t\tsuper._beforeChanged();\n\n\t\tif (this.isDirty(\"width\") || this.isDirty(\"height\") || this.isPrivateDirty(\"width\") || this.isPrivateDirty(\"height\")) {\n\t\t\tthis._clear = true;\n\t\t}\n\t}\n\n\tpublic _changed() {\n\t\tsuper._changed();\n\n\t\tif (this._clear && !this.get(\"draw\")) {\n\t\t\tthis._draw();\n\t\t}\n\t}\n\n\tprotected _draw() {\n\t\tthis._display.drawRect(0, 0, this.width(), this.height());\n\t}\n\n\tpublic _updateSize() {\n\t\tthis.markDirty()\n\t\tthis._clear = true;\n\t}\n}\n","import * as $type from \"../util/Type\";\nimport * as $math from \"../util/Math\";\nimport * as $utils from \"../util/Utils\";\nimport { Rectangle, IRectangleSettings, IRectanglePrivate } from \"./Rectangle\";\n\n\nexport interface IRoundedRectangleSettings extends IRectangleSettings {\n\n\t/**\n\t * Radius of the top-left corner in pixels.\n\t */\n\tcornerRadiusTL?: number;\n\n\t/**\n\t * Radius of the top-right corner in pixels.\n\t */\n\tcornerRadiusTR?: number;\n\n\t/**\n\t * Radius of the botttom-right corner in pixels.\n\t */\n\tcornerRadiusBR?: number;\n\n\t/**\n\t * Radius of the bottom-left corner in pixels.\n\t */\n\tcornerRadiusBL?: number;\n\n}\n\nexport interface IRoundedRectanglePrivate extends IRectanglePrivate {\n}\n\n/**\n * Draws a rectangle with rounded corners.\n *\n * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/graphics/} for more info\n * @important\n */\nexport class RoundedRectangle extends Rectangle {\n\n\tdeclare public _settings: IRoundedRectangleSettings;\n\tdeclare public _privateSettings: IRoundedRectanglePrivate;\n\n\tpublic static className: string = \"RoundedRectangle\";\n\tpublic static classNames: Array<string> = Rectangle.classNames.concat([RoundedRectangle.className]);\n\n\tpublic _beforeChanged() {\n\t\tsuper._beforeChanged();\n\n\t\tif (this.isDirty(\"cornerRadiusTL\") || this.isDirty(\"cornerRadiusTR\") || this.isDirty(\"cornerRadiusBR\") || this.isDirty(\"cornerRadiusBL\")) {\n\t\t\tthis._clear = true;\n\t\t}\n\t}\n\n\tpublic _draw() {\n\t\tlet width = this.width();\n\t\tlet height = this.height();\n\n\t\tlet w = width;\n\t\tlet h = height;\n\n\t\tlet wSign = w / Math.abs(width);\n\t\tlet hSign = h / Math.abs(height);\n\n\t\tif ($type.isNumber(w) && $type.isNumber(h)) {\n\n\t\t\tlet minSide = Math.min(w, h) / 2;\n\n\t\t\tlet crtl = $utils.relativeToValue(this.get(\"cornerRadiusTL\", 8), minSide);\n\t\t\tlet crtr = $utils.relativeToValue(this.get(\"cornerRadiusTR\", 8), minSide);\n\t\t\tlet crbr = $utils.relativeToValue(this.get(\"cornerRadiusBR\", 8), minSide);\n\t\t\tlet crbl = $utils.relativeToValue(this.get(\"cornerRadiusBL\", 8), minSide);\n\n\t\t\tlet maxcr = Math.min(Math.abs(w / 2), Math.abs(h / 2));\n\n\t\t\tcrtl = $math.fitToRange(crtl, 0, maxcr);\n\t\t\tcrtr = $math.fitToRange(crtr, 0, maxcr);\n\t\t\tcrbr = $math.fitToRange(crbr, 0, maxcr);\n\t\t\tcrbl = $math.fitToRange(crbl, 0, maxcr);\n\n\t\t\tconst display = this._display;\n\t\t\tdisplay.moveTo(crtl * wSign, 0);\n\t\t\tdisplay.lineTo(w - crtr * wSign, 0);\n\t\t\tif (crtr > 0) {\n\t\t\t\tdisplay.arcTo(w, 0, w, crtr * hSign, crtr);\n\t\t\t}\n\t\t\tdisplay.lineTo(w, h - crbr * hSign);\n\t\t\tif (crbr > 0) {\n\t\t\t\tdisplay.arcTo(w, h, w - crbr * wSign, h, crbr);\n\t\t\t}\n\t\t\tdisplay.lineTo(crbl * wSign, h);\n\t\t\tif (crbl > 0) {\n\t\t\t\tdisplay.arcTo(0, h, 0, h - crbl * hSign, crbl);\n\t\t\t}\n\t\t\tdisplay.lineTo(0, crtl * hSign);\n\t\t\tif (crtl > 0) {\n\t\t\t\tdisplay.arcTo(0, 0, crtl * wSign, 0, crtl);\n\t\t\t}\n\t\t\tdisplay.closePath();\n\t\t}\n\t}\n}\n","import { Container, IContainerSettings, IContainerPrivate, IContainerEvents } from \"../../core/render/Container\";\nimport { p100 } from \"../../core/util/Percent\";\n\nexport interface IChartSettings extends IContainerSettings {\n}\n\nexport interface IChartPrivate extends IContainerPrivate {\n}\n\nexport interface IChartEvents extends IContainerEvents {\n}\n\n/**\n * A base class for all charts.\n */\nexport abstract class Chart extends Container {\n\tpublic static className: string = \"Chart\";\n\tpublic static classNames: Array<string> = Container.classNames.concat([Chart.className]);\n\n\tdeclare public _settings: IChartSettings;\n\tdeclare public _privateSettings: IChartPrivate;\n\tdeclare public _events: IChartEvents;\n\n\t/**\n\t * A [[Container]] chart places its elements in.\n\t * \n\t * @default Container.new()\n\t */\n\tpublic readonly chartContainer: Container = this.children.push(Container.new(this._root, { width: p100, height: p100, interactiveChildren: false }));\n\n\t/**\n\t * A [[Container]] chart places its bullets in.\n\t * \n\t * @default Container.new()\n\t */\n\tpublic readonly bulletsContainer: Container = Container.new(this._root, { interactiveChildren: false, isMeasured: false, position: \"absolute\", width: p100, height: p100 });\n\n}","import { Chart, IChartSettings, IChartPrivate, IChartEvents } from \"./Chart\";\nimport { Container } from \"../../core/render/Container\";\nimport { ListAutoDispose } from \"../../core/util/List\";\nimport { p100 } from \"../../core/util/Percent\";\n\nimport type { ColorSet } from \"../../core/util/ColorSet\";\nimport type { PatternSet } from \"../../core/util/PatternSet\";\nimport type { Series } from \"./Series\";\n\nimport * as $array from \"../../core/util/Array\";\n\nexport interface ISerialChartSettings extends IChartSettings {\n\n\t/**\n\t * A [[ColorSet]] to use when asigning colors for series.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/#Series_colors} for more info\n\t */\n\tcolors?: ColorSet;\n\n\t/**\n\t * A [[PatternSet]] to use when asigning patterns for series.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/patterns/#Pattern_sets} for more info\n\t * @since 5.10.0\n\t */\n\tpatterns?: PatternSet;\n\n}\n\nexport interface ISerialChartPrivate extends IChartPrivate {\n}\n\nexport interface ISerialChartEvents extends IChartEvents {\n}\n\n/**\n * A base class for all series-based charts.\n */\nexport abstract class SerialChart extends Chart {\n\tpublic static className: string = \"SerialChart\";\n\tpublic static classNames: Array<string> = Chart.classNames.concat([SerialChart.className]);\n\n\tdeclare public _settings: ISerialChartSettings;\n\tdeclare public _privateSettings: ISerialChartPrivate;\n\tdeclare public _seriesType: Series;\n\tdeclare public _events: ISerialChartEvents;\n\n\t/**\n\t * A [[Container]] where chart will store all series.\n\t *\n\t * @default Container.new()\n\t */\n\tpublic readonly seriesContainer: Container = Container.new(this._root, { width: p100, height: p100, isMeasured: false });\n\n\t/**\n\t * A list of chart's series.\n\t */\n\tpublic readonly series: ListAutoDispose<this[\"_seriesType\"]> = new ListAutoDispose();\n\n\tprotected _afterNew() {\n\t\tsuper._afterNew();\n\n\t\tthis._disposers.push(this.series);\n\n\t\tconst children = this.seriesContainer.children;\n\n\t\tthis._disposers.push(this.series.events.onAll((change) => {\n\t\t\tif (change.type === \"clear\") {\n\t\t\t\t$array.each(change.oldValues, (series) => {\n\t\t\t\t\tthis._removeSeries(series);\n\t\t\t\t})\n\t\t\t\tconst colors = this.get(\"colors\");\n\t\t\t\tif (colors) {\n\t\t\t\t\tcolors.reset();\n\t\t\t\t}\n\n\t\t\t\tconst patterns = this.get(\"patterns\");\n\t\t\t\tif (patterns) {\n\t\t\t\t\tpatterns.reset();\n\t\t\t\t}\n\n\t\t\t} else if (change.type === \"push\") {\n\t\t\t\tchildren.moveValue(change.newValue);\n\t\t\t\tthis._processSeries(change.newValue);\n\t\t\t} else if (change.type === \"setIndex\") {\n\t\t\t\tchildren.setIndex(change.index, change.newValue);\n\t\t\t\tthis._processSeries(change.newValue);\n\t\t\t} else if (change.type === \"insertIndex\") {\n\t\t\t\tchildren.insertIndex(change.index, change.newValue);\n\t\t\t\tthis._processSeries(change.newValue);\n\t\t\t} else if (change.type === \"removeIndex\") {\n\t\t\t\tthis._removeSeries(change.oldValue);\n\t\t\t} else if (change.type === \"moveIndex\") {\n\t\t\t\tchildren.moveValue(change.value, change.newIndex);\n\t\t\t\tthis._processSeries(change.value);\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Unknown IListEvent type\");\n\t\t\t}\n\t\t}));\n\t}\n\n\tprotected _processSeries(series: this[\"_seriesType\"]) {\n\t\tseries.chart = this;\n\t\tseries._placeBulletsContainer(this);\n\t}\n\n\tprotected _removeSeries(series: this[\"_seriesType\"]) {\n\t\tif (!series.isDisposed()) {\n\t\t\tthis.seriesContainer.children.removeValue(series);\n\t\t\tseries._removeBulletsContainer();\n\t\t}\n\t}\n}\n","import type { Root } from \"../../core/Root\";\nimport type { Chart } from \"./Chart\";\nimport type { Bullet } from \"./Bullet\";\nimport type { Graphics } from \"../../core/render/Graphics\";\nimport type { ILegendDataItem } from \"./Legend\";\nimport type { Template } from \"../../core/util/Template\";\nimport type { Sprite } from \"../../core/render/Sprite\";\nimport type { Pattern } from \"./patterns/Pattern\";\n\nimport { Component, IComponentSettings, IComponentPrivate, DataItem, IComponentEvents, IComponentDataItem } from \"../../core/render/Component\";\nimport { List } from \"../../core/util/List\";\nimport { Color } from \"../../core/util/Color\";\nimport { percentInterpolate } from \"../../core/util/Animation\";\nimport { Percent } from \"../../core/util/Percent\";\nimport { p100 } from \"../../core/util/Percent\";\nimport { Container } from \"../../core/render/Container\";\nimport { Label } from \"../../core/render/Label\";\n//import { Animations } from \"../../core/util/Animation\";\n\nimport * as $array from \"../../core/util/Array\";\nimport * as $type from \"../../core/util/Type\";\nimport * as $time from \"../../core/util/Time\";\n\n/**\n * Defines interface for a heat rule.\n *\n * @see {@link https://www.amcharts.com/docs/v5/concepts/settings/heat-rules/} for more info\n */\nexport interface IHeatRule {\n\n\t/**\n\t * Target template.\n\t */\n\ttarget: Template<any>;\n\n\t/**\n\t * The setting value to use for items if the lowest value.\n\t */\n\tmin?: any;\n\n\t/**\n\t * The setting value to use for items if the highest value.\n\t */\n\tmax?: any;\n\n\t/**\n\t * The setting value to use for items which do not have value at all.\n\t */\n\tneutral?: any;\n\n\t/**\n\t * Which data field to use when determining item's value.\n\t */\n\tdataField: string;\n\n\t/**\n\t * A setting key to set.\n\t */\n\tkey?: string;\n\n\t/**\n\t * Custom lowest value.\n\t */\n\tminValue?: number;\n\n\t/**\n\t * Custom highest value.\n\t */\n\tmaxValue?: number;\n\n\t/**\n\t * Use logarithmic scale when calculating intermediate setting values.\n\t *\n\t * @default false\n\t */\n\tlogarithmic?: boolean;\n\n\t/**\n\t * A custom function that will set target element's settings.\n\t *\n\t * Can be used to do custom manipulation on complex objects requiring more\n\t * than modifying a setting.\n\t */\n\tcustomFunction?: (target: Sprite, minValue: number, maxValue: number, value?: any) => void;\n\n}\n\n\nexport interface ISeriesDataItem extends IComponentDataItem {\n\tid?: string;\n\tvalue?: number;\n\tvalueWorking?:number;\n\tvalueChange?: number;\n\tvalueChangePercent?: number;\n\tvalueChangeSelection?: number;\n\tvalueChangeSelectionPercent?: number;\n\tvalueChangePrevious?: number;\n\tvalueChangePreviousPercent?: number;\n\tvalueWorkingOpen?: number;\n\tvalueWorkingClose?: number;\n\n\tcustomValue?: number;\n\tcustomValueWorking?:number;\n\tcustomValueChange?: number;\n\tcustomValueChangePercent?: number;\n\tcustomValueChangeSelection?: number;\n\tcustomValueChangeSelectionPercent?: number;\n\tcustomValueChangePrevious?: number;\n\tcustomValueChangePreviousPercent?: number;\n}\n\nexport interface ISeriesSettings extends IComponentSettings {\n\n\t/**\n\t * Name of the series.\n\t */\n\tname?: string;\n\n\t/**\n\t * A key to look up in data for an id of the data item.\n\t */\n\tidField?: string;\n\n\t/**\n\t * A key to look up in data for a numeric value of the data item.\n\t *\n\t * Some series use it to display its elements. It can also be used in heat\n\t * rules.\n\t */\n\tvalueField?: string;\n\n\t/**\n\t * A key to look up in data for a numeric customValue of the data item.\n\t *\n\t * Usually used for storing additional numeric information and heat rules.\n\t */\n\tcustomValueField?: string;\t\n\n\t/**\n\t * A text template to be used for label in legend.\n\t */\n\tlegendLabelText?: string;\n\n\t/**\n\t * A text template to be used for value label in legend.\n\t */\n\tlegendValueText?: string;\n\n\t/**\n\t * If set to `true` the series initial animation will be played item by item\n\t * rather than all at once.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/animations/#Animation_of_series} for more info\n\t */\n\tsequencedInterpolation?:boolean;\n\n\t/**\n\t * A delay in milliseconds to wait before starting animation of next data\n\t * item.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/animations/#Animation_of_series} for more info\n\t */\n\tsequencedDelay?:number;\n\n\t/**\n\t * A list of heat rules to apply on series elements.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/settings/heat-rules/} for more info\n\t */\n\theatRules?:IHeatRule[];\n\n\t/**\n\t * If set to `true`, series will calculate aggregate values, e.g. change\n\t * percent, high, low, etc.\n\t *\n\t * Do not enable unless you are using such aggregate values in tooltips,\n\t * display data fields, heat rules, or similar.\n\t */\n\tcalculateAggregates?: boolean;\n\n\t/**\n\t * Series stroke color.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/#Series_colors} for more info\n\t */\n\tstroke?: Color;\n\n\t/**\n\t * Series fill color.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/#Series_colors} for more info\n\t */\n\tfill?: Color;\n\n\t/**\n\t * Series fill pattern.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/patterns/} for more info\n\t * @since 5.10.0\n\t */\n\tfillPattern?: Pattern;\n\n\t/**\n\t * A data item representing series in a [[Legend]].\n\t *\n\t * @readonly\n\t */\n\tlegendDataItem?: DataItem<ILegendDataItem>;\n\n}\n\nexport interface ISeriesPrivate extends IComponentPrivate {\n\n\t/**\n\t * @ignore\n\t */\n\tchart?: Chart;\n\tstartIndex?: number;\n\tendIndex?: number;\n\tadjustedStartIndex?:number;\n\n\tvalueAverage?: number;\n\tvalueCount?: number;\n\tvalueSum?: number;\n\tvalueAbsoluteSum?: number;\n\tvalueLow?: number;\n\tvalueHigh?: number;\n\tvalueOpen?: number;\n\tvalueClose?: number;\n\n\tcustomValueAverage?: number;\n\tcustomValueCount?: number;\n\tcustomValueSum?: number;\n\tcustomValueAbsoluteSum?: number;\n\tcustomValueLow?: number;\n\tcustomValueHigh?: number;\n\tcustomValueOpen?: number;\n\tcustomValueClose?: number;\t\n\n\tbaseValueSeries?: Series;\n}\n\nexport interface ISeriesEvents extends IComponentEvents {\n\n}\n\n/**\n * A base class for all series.\n */\nexport abstract class Series extends Component {\n\tpublic static className: string = \"Series\";\n\tpublic static classNames: Array<string> = Component.classNames.concat([Series.className]);\n\n\tdeclare public _settings: ISeriesSettings;\n\tdeclare public _privateSettings: ISeriesPrivate;\n\tdeclare public _dataItemSettings: ISeriesDataItem;\n\tdeclare public _events: ISeriesEvents;\n\n\tprotected _aggregatesCalculated: boolean = false;\n\tprotected _selectionAggregatesCalculated: boolean = false;\n\tprotected _dataProcessed: boolean = false;\n\n\tprotected _psi: number | undefined;\n\tprotected _pei: number | undefined;\n\n\t/**\n\t * A chart series belongs to.\n\t */\n\tpublic chart:Chart | undefined;\n\n\t/**\n\t * List of bullets to use for the series.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/bullets/} for more info\n\t */\n\tpublic bullets: List<<D extends DataItem<this[\"_dataItemSettings\"]>>(root: Root, series:Series, dataItem: D) => Bullet | undefined> = new List();\n\n\t/**\n\t * A [[Container]] series' bullets are stored in.\n\t *\n\t * @default Container.new()\n\t */\n\tpublic readonly bulletsContainer: Container = Container.new(this._root, {width:p100, height:p100, position:\"absolute\"});\n\n\tprotected _afterNew() {\n\t\tthis.valueFields.push(\"value\", \"customValue\");\n\n\t\tsuper._afterNew();\n\n\t\tthis.setPrivate(\"customData\", {});\n\n\t\tthis._disposers.push(this.bullets.events.onAll((change) => {\n\t\t\tif (change.type === \"clear\") {\n\t\t\t\tthis._handleBullets(this.dataItems);\n\t\t\t} else if (change.type === \"push\") {\n\t\t\t\tthis._handleBullets(this.dataItems);\n\t\t\t} else if (change.type === \"setIndex\") {\n\t\t\t\tthis._handleBullets(this.dataItems);\n\t\t\t} else if (change.type === \"insertIndex\") {\n\t\t\t\tthis._handleBullets(this.dataItems);\n\t\t\t} else if (change.type === \"removeIndex\") {\n\t\t\t\tthis._handleBullets(this.dataItems);\n\t\t\t} else if (change.type === \"moveIndex\") {\n\t\t\t\tthis._handleBullets(this.dataItems);\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Unknown IListEvent type\");\n\t\t\t}\n\t\t}));\n\t}\n\n\tprotected _dispose(){\n\t\tthis.bulletsContainer.dispose(); // can be in a different parent\n\t\tsuper._dispose();\n\t}\n\n\tpublic startIndex():number {\n\t\tlet len = this.dataItems.length;\n\t\treturn Math.min(this.getPrivate(\"startIndex\", 0), len);\n\t}\n\n\tpublic endIndex():number {\n\t\tlet len = this.dataItems.length;\n\t\treturn Math.min(this.getPrivate(\"endIndex\", len), len)\n\t}\n\n\tprotected _handleBullets(dataItems:Array<DataItem<this[\"_dataItemSettings\"]>>){\n\t\t$array.each(dataItems, (dataItem)=>{\n\t\t\tconst bullets = dataItem.bullets;\n\t\t\tif(bullets){\n\t\t\t\t$array.each(bullets, (bullet)=>{\n\t\t\t\t\tbullet.dispose();\n\t\t\t\t})\n\n\t\t\t\tdataItem.bullets = undefined;\n\t\t\t}\n\t\t})\n\n\t\tthis.markDirtyValues();\n\t}\n\n\t/**\n\t * Looks up and returns a data item by its ID.\n\t *\n\t * @param id ID\n\t * @return Data item\n\t */\n\tpublic getDataItemById(id: string): DataItem<this[\"_dataItemSettings\"]> | undefined {\n\t\treturn $array.find(this.dataItems, (dataItem: any) => {\n\t\t\treturn dataItem.get(\"id\") == id;\n\t\t})\n\t}\n\n\tprotected _makeBullets(dataItem: DataItem<this[\"_dataItemSettings\"]>) {\n\t\tif(this._shouldMakeBullet(dataItem)){\n\t\t\tdataItem.bullets = [];\n\n\t\t\tthis.bullets.each((bulletFunction) => {\n\t\t\t\tthis._makeBullet(dataItem, bulletFunction);\n\t\t\t})\n\t\t}\n\t}\n\n\tprotected _shouldMakeBullet(_dataItem: DataItem<this[\"_dataItemSettings\"]>):boolean{\n\t\treturn true;\n\t}\n\n\tprotected _makeBullet(dataItem: DataItem<this[\"_dataItemSettings\"]>, bulletFunction:(root: Root, series:Series, dataItem: DataItem<this[\"_dataItemSettings\"]>) => Bullet | undefined, index?:number):Bullet | undefined{\n\t\tconst bullet = bulletFunction(this._root, this, dataItem);\n\t\tif(bullet){\n\t\t\tbullet._index = index;\n\t\t\tthis._makeBulletReal(dataItem, bullet);\n\t\t}\n\t\treturn bullet;\n\t}\n\n\tprotected _makeBulletReal(dataItem: DataItem<this[\"_dataItemSettings\"]>, bullet:Bullet){\n\t\tlet sprite = bullet.get(\"sprite\");\n\n\t\tif (sprite) {\n\t\t\tsprite._setDataItem(dataItem);\n\t\t\tsprite.setRaw(\"position\", \"absolute\");\n\t\t\tthis.bulletsContainer.children.push(sprite);\n\t\t}\n\t\tbullet.series = this;\n\t\tdataItem.bullets!.push(bullet);\n\t}\n\n\t/**\n\t * Adds bullet directly to a data item.\n\t *\n\t * Please note: method accepts [[Bullet]] instance as a paramter, not a\n\t * reference to a function.\n\t *\n\t * You should add Bullet instance, not a method like you do it on series.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/bullets/#Adding_directly_to_data_item} for more info\n\t * @since 5.6.0\n\t *\n\t * @param dataItem Target data item\n\t * @param bullet Bullet instance\n\t */\n\tpublic addBullet(dataItem:DataItem<this[\"_dataItemSettings\"]>, bullet:Bullet){\n\t\tif(!dataItem.bullets){\n\t\t\tdataItem.bullets = [];\n\t\t}\n\t\tif(bullet){\n\t\t\tthis._makeBulletReal(dataItem, bullet);\n\t\t}\n\t}\t\n\n\tpublic _clearDirty() {\n\t\tsuper._clearDirty();\n\t\tthis._aggregatesCalculated = false;\n\t\tthis._selectionAggregatesCalculated = false;\n\t}\n\n\tpublic _prepareChildren(){\n\t\tsuper._prepareChildren();\n\n\t\tlet startIndex = this.startIndex();\n\t\tlet endIndex = this.endIndex();\n\n\t\tif(this.isDirty(\"name\")){\n\t\t\tthis.updateLegendValue();\n\t\t}\n\n\t\tif(this.isDirty(\"heatRules\")){\n\t\t\tthis._valuesDirty = true;\n\t\t}\n\n\t\tif(this.isPrivateDirty(\"baseValueSeries\")){\n\t\t\tconst baseValueSeries = this.getPrivate(\"baseValueSeries\");\n\t\t\tif(baseValueSeries){\n\t\t\t\tthis._disposers.push(baseValueSeries.onPrivate(\"startIndex\", ()=>{\n\t\t\t\t\tthis.markDirtyValues();\n\t\t\t\t}))\n\t\t\t}\n\t\t}\n\n\t\tconst calculateAggregates = this.get(\"calculateAggregates\");\n\t\tif(calculateAggregates){\n\t\t\tif (this._valuesDirty && !this._dataProcessed) {\n\t\t\t\tif (!this._aggregatesCalculated) {\n\t\t\t\t\tthis._calculateAggregates(0, this.dataItems.length);\n\t\t\t\t\tthis._aggregatesCalculated = true;\n\t\t\t\t\tif(startIndex != 0){\n\t\t\t\t\t\tthis._psi = undefined;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ((this._psi != startIndex || this._pei != endIndex || this.isPrivateDirty(\"adjustedStartIndex\")) && !this._selectionAggregatesCalculated) {\n\t\t\t\tif (startIndex === 0 && endIndex === this.dataItems.length && this._aggregatesCalculated) {\n\t\t\t\t\t// void\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthis._calculateAggregates(startIndex, endIndex);\n\t\t\t\t}\n\n\t\t\t\tthis._selectionAggregatesCalculated = true;\n\t\t\t}\n\t\t}\n\n\t\tif(this.isDirty(\"tooltip\")){\n\t\t\tlet tooltip = this.get(\"tooltip\");\n\t\t\tif(tooltip){\n\t\t\t\ttooltip.hide(0);\n\t\t\t\ttooltip.set(\"tooltipTarget\", this);\n\t\t\t}\n\t\t}\n\n\t\tif (this.isDirty(\"fill\") || this.isDirty(\"stroke\")) {\n\n\t\t\tlet markerRectangle: Graphics | undefined;\n\t\t\tconst legendDataItem = this.get(\"legendDataItem\");\n\t\t\tif (legendDataItem) {\n\t\t\t\tmarkerRectangle = legendDataItem.get(\"markerRectangle\");\n\n\t\t\t\tif (markerRectangle) {\n\t\t\t\t\tif(this.isVisible()){\n\t\t\t\t\t\tif (this.isDirty(\"stroke\")) {\n\t\t\t\t\t\t\tlet stroke = this.get(\"stroke\");\n\t\t\t\t\t\t\tmarkerRectangle.set(\"stroke\", stroke);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (this.isDirty(\"fill\")) {\n\t\t\t\t\t\t\tlet fill = this.get(\"fill\");\n\t\t\t\t\t\t\tmarkerRectangle.set(\"fill\", fill);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.updateLegendMarker(undefined);\n\t\t}\n\n\n\t\tif (this.bullets.length > 0) {\n\t\t\tlet startIndex = this.startIndex();\n\t\t\tlet endIndex = this.endIndex();\n\n\t\t\tif(endIndex < this.dataItems.length){\n\t\t\t\tendIndex++;\n\t\t\t}\n\n\t\t\tfor (let i = startIndex; i < endIndex; i++) {\n\t\t\t\tlet dataItem = this.dataItems[i];\n\t\t\t\tif (!dataItem.bullets) {\n\t\t\t\t\tthis._makeBullets(dataItem);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic _adjustStartIndex(index:number):number{\n\t\treturn index;\n\t}\n\n\tprotected _calculateAggregates(startIndex: number, endIndex: number) {\n\t\tlet fields = this._valueFields;\n\n\t\tif (!fields) {\n\t\t\tthrow new Error(\"No value fields are set for the series.\");\n\t\t}\n\n\t\tconst sum: { [index: string]: number } = {};\n\t\tconst absSum: { [index: string]: number } = {};\n\t\tconst count: { [index: string]: number } = {};\n\t\tconst low: { [index: string]: number } = {};\n\t\tconst high: { [index: string]: number } = {};\n\t\tconst open: { [index: string]: number } = {};\n\t\tconst close: { [index: string]: number } = {};\n\t\tconst average: { [index: string]: number } = {};\n\t\tconst previous: { [index: string]: number } = {};\n\n\t\t$array.each(fields, (key) => {\n\t\t\tsum[key] = 0;\n\t\t\tabsSum[key] = 0;\n\t\t\tcount[key] = 0;\n\t\t})\n\n\t\t$array.each(fields, (key) => {\n\t\t\tlet change = key + \"Change\";\n\t\t\tlet changePercent = key + \"ChangePercent\";\n\t\t\tlet changePrevious = key + \"ChangePrevious\";\n\t\t\tlet changePreviousPercent = key + \"ChangePreviousPercent\";\n\t\t\tlet changeSelection = key + \"ChangeSelection\";\n\t\t\tlet changeSelectionPercent = key + \"ChangeSelectionPercent\";\n\n\t\t\tlet openKey = \"valueY\";\n\n\t\t\tif(key == \"valueX\" || key == \"openValueX\" || key == \"lowValueX\" || key == \"highValueX\"){\n\t\t\t\topenKey = \"valueX\";\n\t\t\t}\n\n\t\t\tconst baseValueSeries = this.getPrivate(\"baseValueSeries\");\n\t\t\tconst adjustedStartIndex = this.getPrivate(\"adjustedStartIndex\", startIndex);\n\n\t\t\tfor (let i = adjustedStartIndex; i < endIndex; i++) {\n\t\t\t\tconst dataItem = this.dataItems[i];\n\t\t\t\tif(dataItem){\n\t\t\t\t\tlet value = dataItem.get(<any>key)\n\n\t\t\t\t\tif (value != null) {\n\t\t\t\t\t\tcount[key]++;\n\t\t\t\t\t\tsum[key] += value;\n\n\t\t\t\t\t\tabsSum[key] += Math.abs(value);\n\n\t\t\t\t\t\taverage[key] = sum[key] / count[key];\n\n\t\t\t\t\t\tif (low[key] > value || low[key] == null) {\n\t\t\t\t\t\t\tlow[key] = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (high[key] < value || high[key] == null) {\n\t\t\t\t\t\t\thigh[key] = value;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tclose[key] = value;\n\n\t\t\t\t\t\tif (open[key] == null) {\n\t\t\t\t\t\t\topen[key] = value;\n\t\t\t\t\t\t\tprevious[key] = value;\n\n\t\t\t\t\t\t\tif(baseValueSeries){\n\t\t\t\t\t\t\t\topen[openKey] = baseValueSeries._getBase(openKey);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (startIndex === 0) {\n\t\t\t\t\t\t\tdataItem.setRaw(<any>(change), value - open[openKey]);\n\t\t\t\t\t\t\tdataItem.setRaw(<any>(changePercent), (value - open[openKey]) / open[openKey] * 100);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tdataItem.setRaw(<any>(changePrevious), value - previous[openKey]);\n\t\t\t\t\t\tdataItem.setRaw(<any>(changePreviousPercent), (value - previous[openKey]) / previous[openKey] * 100);\n\t\t\t\t\t\tdataItem.setRaw(<any>(changeSelection), value - open[openKey]);\n\t\t\t\t\t\tdataItem.setRaw(<any>(changeSelectionPercent), (value - open[openKey]) / open[openKey] * 100);\n\n\t\t\t\t\t\tprevious[key] = value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(endIndex < this.dataItems.length - 1){\n\t\t\t\tconst dataItem = this.dataItems[endIndex];\n\t\t\t\tif(dataItem){\n\t\t\t\t\tlet value = dataItem.get(<any>key)\n\t\t\t\t\tdataItem.setRaw(<any>(changePrevious), value - previous[openKey]);\n\t\t\t\t\tdataItem.setRaw(<any>(changePreviousPercent), (value - previous[openKey]) / previous[openKey] * 100);\n\t\t\t\t\tdataItem.setRaw(<any>(changeSelection), value - open[openKey]);\n\t\t\t\t\tdataItem.setRaw(<any>(changeSelectionPercent), (value - open[openKey]) / open[openKey] * 100);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(startIndex > 0){\n\t\t\t\tstartIndex--;\n\t\t\t}\n\n\t\t\tdelete previous[key];\n\n\t\t\tfor (let i = startIndex; i < adjustedStartIndex; i++) {\n\t\t\t\tconst dataItem = this.dataItems[i];\n\t\t\t\tif(dataItem){\n\t\n\t\t\t\t\tlet value = dataItem.get(<any>key);\n\n\t\t\t\t\tif (previous[key] == null) {\n\t\t\t\t\t\tprevious[key] = value;\n\t\t\t\t\t}\t\t\t\t\n\t\t\n\t\t\t\t\tif (value != null) {\n\t\t\t\t\t\tdataItem.setRaw(<any>(changePrevious), value - previous[openKey]);\n\t\t\t\t\t\tdataItem.setRaw(<any>(changePreviousPercent), (value - previous[openKey]) / previous[openKey] * 100);\n\t\t\t\t\t\tdataItem.setRaw(<any>(changeSelection), value - open[openKey]);\n\t\t\t\t\t\tdataItem.setRaw(<any>(changeSelectionPercent), (value - open[openKey]) / open[openKey] * 100);\n\t\t\n\t\t\t\t\t\tprevious[key] = value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\n\t\t$array.each(fields, (key) => {\n\t\t\tthis.setPrivate(<any>(key + \"AverageSelection\"), average[key]);\n\t\t\tthis.setPrivate(<any>(key + \"CountSelection\"), count[key]);\n\t\t\tthis.setPrivate(<any>(key + \"SumSelection\"), sum[key]);\n\t\t\tthis.setPrivate(<any>(key + \"AbsoluteSumSelection\"), absSum[key]);\n\t\t\tthis.setPrivate(<any>(key + \"LowSelection\"), low[key]);\n\t\t\tthis.setPrivate(<any>(key + \"HighSelection\"), high[key]);\n\t\t\tthis.setPrivate(<any>(key + \"OpenSelection\"), open[key]);\n\t\t\tthis.setPrivate(<any>(key + \"CloseSelection\"), close[key]);\n\t\t})\n\n\t\tif (startIndex === 0 && endIndex === this.dataItems.length) {\n\t\t\t$array.each(fields, (key) => {\n\t\t\t\tthis.setPrivate(<any>(key + \"Average\"), average[key]);\n\t\t\t\tthis.setPrivate(<any>(key + \"Count\"), count[key]);\n\t\t\t\tthis.setPrivate(<any>(key + \"Sum\"), sum[key]);\n\t\t\t\tthis.setPrivate(<any>(key + \"AbsoluteSum\"), absSum[key]);\n\t\t\t\tthis.setPrivate(<any>(key + \"Low\"), low[key]);\n\t\t\t\tthis.setPrivate(<any>(key + \"High\"), high[key]);\n\t\t\t\tthis.setPrivate(<any>(key + \"Open\"), open[key]);\n\t\t\t\tthis.setPrivate(<any>(key + \"Close\"), close[key]);\n\t\t\t})\n\t\t}\n\t}\n\n\tpublic _updateChildren() {\n\t\tsuper._updateChildren();\n\n\t\tthis._psi = this.startIndex();\n\t\tthis._pei = this.endIndex();\n\n\t\tif(this.isDirty(\"visible\")){\n\t\t\tthis.bulletsContainer.set(\"visible\", this.get(\"visible\"));\n\t\t}\n\n\n\t\t// Apply heat rules\n\t\tconst rules = this.get(\"heatRules\");\n\n\t\tif (this._valuesDirty && rules && rules.length > 0) {\n\t\t\t$array.each(rules, (rule) => {\n\t\t\t\tconst minValue = rule.minValue || this.getPrivate(<any>(rule.dataField + \"Low\")) || 0;\n\t\t\t\tconst maxValue = rule.maxValue || this.getPrivate(<any>(rule.dataField + \"High\")) || 0;\n\n\t\t\t\t$array.each(rule.target._entities, (target) => {\n\n\t\t\t\t\tconst value = target.dataItem.get(rule.dataField);\n\n\t\t\t\t\tif (!$type.isNumber(value)) {\n\t\t\t\t\t\tif(rule.neutral){\n\t\t\t\t\t\t\ttarget.set(rule.key, rule.neutral);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst states = target.states;\n\t\t\t\t\t\tif(states){\n\t\t\t\t\t\t\tconst defaultState = states.lookup(\"default\");\n\t\t\t\t\t\t\tif(defaultState && rule.neutral){\n\t\t\t\t\t\t\t\tdefaultState.set(rule.key, rule.neutral);\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(!rule.customFunction){\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (rule.customFunction) {\n\t\t\t\t\t\trule.customFunction.call(this, target, minValue, maxValue, value);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tlet percent: number;\n\t\t\t\t\t\tif (rule.logarithmic) {\n\t\t\t\t\t\t\tpercent = (Math.log(value) * Math.LOG10E - Math.log(minValue) * Math.LOG10E) / ((Math.log(maxValue) * Math.LOG10E - Math.log(minValue) * Math.LOG10E));\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tpercent = (value - minValue) / (maxValue - minValue);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ($type.isNumber(value) && (!$type.isNumber(percent) || Math.abs(percent) == Infinity)) {\n\t\t\t\t\t\t\tpercent = 0.5;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// fixes problems if all values are the same\n\t\t\t\t\t\tlet propertyValue;\n\t\t\t\t\t\tif ($type.isNumber(rule.min)) {\n\t\t\t\t\t\t\tpropertyValue = rule.min + (rule.max - rule.min) * percent;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (rule.min instanceof Color) {\n\t\t\t\t\t\t\tpropertyValue = Color.interpolate(percent, rule.min, rule.max);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (rule.min instanceof Percent) {\n\t\t\t\t\t\t\tpropertyValue = percentInterpolate(percent, rule.min, rule.max);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ttarget.set(rule.key, propertyValue);\n\t\t\t\t\t\tconst states = target.states;\n\t\t\t\t\t\tif(states){\n\t\t\t\t\t\t\tconst defaultState = states.lookup(\"default\");\n\t\t\t\t\t\t\tif(defaultState){\n\t\t\t\t\t\t\t\tdefaultState.set(rule.key, propertyValue);\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\n\t\tif(this.get(\"visible\")){\n\t\t\tlet count = this.dataItems.length;\n\t\t\tlet startIndex = this.startIndex();\n\t\t\tlet endIndex = this.endIndex();\n\n\t\t\tif(endIndex < count){\n\t\t\t\tendIndex++;\n\t\t\t}\n\t\t\tif(startIndex > 0){\n\t\t\t\tstartIndex--;\n\t\t\t}\n\n\t\t\tfor (let i = 0; i < startIndex; i++) {\n\t\t\t\tthis._hideBullets(this.dataItems[i]);\n\t\t\t}\n\n\t\t\tfor (let i = startIndex; i < endIndex; i++) {\n\t\t\t\tthis._positionBullets(this.dataItems[i]);\n\t\t\t}\n\n\t\t\tfor (let i = endIndex; i < count; i++) {\n\t\t\t\tthis._hideBullets(this.dataItems[i]);\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic _positionBullets(dataItem: DataItem<this[\"_dataItemSettings\"]>){\n\t\tif(dataItem.bullets){\n\t\t\t$array.each(dataItem.bullets, (bullet) => {\n\t\t\t\tthis._positionBullet(bullet);\n\t\t\t\tconst sprite = bullet.get(\"sprite\");\n\n\t\t\t\tif(bullet.get(\"dynamic\")){\n\n\t\t\t\t\tif(sprite){\n\t\t\t\t\t\tsprite._markDirtyKey(\"fill\" as any);\n\t\t\t\t\t\tsprite.markDirtySize();\n\t\t\t\t\t}\n\t\t\t\t\tif(sprite instanceof Container){\n\t\t\t\t\t\tsprite.walkChildren((child)=>{\n\t\t\t\t\t\t\tchild._markDirtyKey(\"fill\" as any);\n\t\t\t\t\t\t\tchild.markDirtySize();\n\n\t\t\t\t\t\t\tif(child instanceof Label){\n\t\t\t\t\t\t\t\tchild.text.markDirtyText();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(sprite instanceof Label && sprite.get(\"populateText\" as any)){\n\t\t\t\t\tsprite.text.markDirtyText();\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\t}\n\n\tprotected _hideBullets(dataItem: DataItem<this[\"_dataItemSettings\"]>) {\n\t\tif (dataItem.bullets) {\n\t\t\t$array.each(dataItem.bullets, (bullet) => {\n\t\t\t\tlet sprite = bullet.get(\"sprite\");\n\t\t\t\tif (sprite) {\n\t\t\t\t\tsprite.setPrivate(\"visible\", false);\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\t}\n\n\tpublic _positionBullet(_bullet: Bullet) {\n\t}\n\n\tpublic _placeBulletsContainer(chart:Chart){\n\t\tchart.bulletsContainer.children.moveValue(this.bulletsContainer);\n\t}\n\n\tpublic _removeBulletsContainer(){\n\t\tconst bulletsContainer = this.bulletsContainer;\n\t\tif(bulletsContainer.parent){\n\t\t\tbulletsContainer.parent.children.removeValue(bulletsContainer)\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic disposeDataItem(dataItem: DataItem<this[\"_dataItemSettings\"]>) {\n\t\t//super.disposeDataItem(dataItem); // does nothing\n\n\t\tconst bullets = dataItem.bullets;\n\n\t\tif(bullets){\n\t\t\t$array.each(bullets, (bullet)=>{\n\t\t\t\tbullet.dispose();\n\t\t\t})\n\t\t}\n\t}\n\n\tprotected _getItemReaderLabel(): string {\n\t\treturn \"\";\n\t}\n\n\t/**\n\t * Shows series's data item.\n\t *\n\t * @param dataItem Data item\n\t * @param duration Animation duration in milliseconds\n\t * @return Promise\n\t */\n\tpublic async showDataItem(dataItem: DataItem<this[\"_dataItemSettings\"]>, duration?: number): Promise<void> {\n\t\tconst promises = [super.showDataItem(dataItem, duration)];\n\t\tconst bullets = dataItem.bullets;\n\t\tif(bullets){\n\t\t\t$array.each(bullets, (bullet)=>{\n\t\t\t\tconst sprite = bullet.get(\"sprite\");\n\t\t\t\tif(sprite){\n\t\t\t\t\tpromises.push(sprite.show(duration));\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\t\tawait Promise.all(promises);\n\t}\n\n\t/**\n\t * Hides series's data item.\n\t *\n\t * @param dataItem Data item\n\t * @param duration Animation duration in milliseconds\n\t * @return Promise\n\t */\n\tpublic async hideDataItem(dataItem: DataItem<this[\"_dataItemSettings\"]>, duration?: number): Promise<void> {\n\t\tconst promises = [super.hideDataItem(dataItem, duration)];\n\t\tconst bullets = dataItem.bullets;\n\t\tif(bullets){\n\t\t\t$array.each(bullets, (bullet)=>{\n\t\t\t\tconst sprite = bullet.get(\"sprite\");\n\t\t\t\tif(sprite){\t\t\t\t\t\n\t\t\t\t\tpromises.push(sprite.hide(duration));\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\t\tawait Promise.all(promises);\n\t}\n\n\n\tprotected async _sequencedShowHide(show: boolean, duration?: number): Promise<void> {\n\t\tif (this.get(\"sequencedInterpolation\")) {\n\n\t\t\tif (!$type.isNumber(duration)) {\n\t\t\t\tduration = this.get(\"interpolationDuration\", 0);\n\t\t\t}\n\n\t\t\tif (duration > 0) {\n\t\t\t\tconst startIndex = this.startIndex();\n\t\t\t\tconst endIndex = this.endIndex();\n\n\t\t\t\tawait Promise.all($array.map(this.dataItems, async (dataItem, i) => {\n\t\t\t\t\tlet realDuration = duration || 0;\n\n\t\t\t\t\tif (i < startIndex - 10 || i > endIndex + 10) {\n\t\t\t\t\t\trealDuration = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t//let delay = this.get(\"sequencedDelay\", 0) * i + realDuration * (i - startIndex) / (endIndex - startIndex);\n\t\t\t\t\tlet delay = this.get(\"sequencedDelay\", 0) + realDuration / (endIndex - startIndex);\n\n\t\t\t\t\tawait $time.sleep(delay * (i - startIndex));\n\n\t\t\t\t\tif (show) {\n\t\t\t\t\t\tawait this.showDataItem(dataItem, realDuration);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tawait this.hideDataItem(dataItem, realDuration);\n\t\t\t\t\t}\n\t\t\t\t}));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tawait Promise.all($array.map(this.dataItems, (dataItem) => {\n\t\t\t\t\tif (show) {\n\t\t\t\t\t\treturn this.showDataItem(dataItem, 0);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\treturn this.hideDataItem(dataItem, 0);\n\t\t\t\t\t}\n\t\t\t\t}));\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateLegendValue(dataItem?: DataItem<this[\"_dataItemSettings\"]>) {\n\t\tif(dataItem){\n\t\t\tconst legendDataItem = dataItem.get(\"legendDataItem\" as any) as DataItem<ILegendDataItem>;\n\n\t\t\tif (legendDataItem) {\n\t\t\t\tconst valueLabel = legendDataItem.get(\"valueLabel\");\n\t\t\t\tif (valueLabel) {\n\t\t\t\t\tconst text = valueLabel.text;\n\t\t\t\t\tlet txt = \"\";\n\t\t\t\t\tvalueLabel._setDataItem(dataItem);\n\t\t\t\t\ttxt = this.get(\"legendValueText\", text.get(\"text\", \"\"));\n\n\t\t\t\t\tvalueLabel.set(\"text\", txt);\n\t\t\t\t\ttext.markDirtyText();\n\t\t\t\t}\n\n\t\t\t\tconst label = legendDataItem.get(\"label\");\n\t\t\t\tif (label) {\n\t\t\t\t\tconst text = label.text;\n\t\t\t\t\tlet txt = \"\";\n\t\t\t\t\tlabel._setDataItem(dataItem);\n\t\t\t\t\ttxt = this.get(\"legendLabelText\", text.get(\"text\", \"\"));\n\n\t\t\t\t\tlabel.set(\"text\", txt);\n\t\t\t\t\ttext.markDirtyText();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateLegendMarker(_dataItem?: DataItem<this[\"_dataItemSettings\"]>) {\n\t}\n\n\tprotected _onHide(){\n\t\tsuper._onHide();\n\n\t\tconst tooltip = this.getTooltip();\n\t\tif(tooltip){\n\t\t\ttooltip.hide();\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic hoverDataItem(_dataItem: DataItem<this[\"_dataItemSettings\"]>) {}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic unhoverDataItem(_dataItem: DataItem<this[\"_dataItemSettings\"]>) {}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic _getBase(key: any): number {\n\t\tconst dataItem = this.dataItems[this.startIndex()];\n\t\tif (dataItem) {\n\t\t\treturn dataItem.get(key);\n\t\t}\n\t\treturn 0;\n\t}\n}\n","import { Graphics, IGraphicsSettings, IGraphicsPrivate } from \"./Graphics\";\nimport * as $type from \"../util/Type\";\nimport { Percent } from \"../util/Percent\";\nimport type { IPoint } from \"../util/IPoint\";\nimport { arc } from \"d3-shape\";\nimport * as $math from \"../util/Math\";\n\nexport interface ISliceSettings extends IGraphicsSettings {\n\n\t/**\n\t * Radius in pixels.\n\t */\n\tradius?: number;\n\n\t/**\n\t * Slice \"width\" in degrees.\n\t */\n\tarc?: number;\n\n\t/**\n\t * Inner radius of the slice in pixels.\n\t */\n\tinnerRadius?: number;\n\n\t/**\n\t * Start angle in degrees.\n\t */\n\tstartAngle?: number;\n\n\t/**\n\t * Slice corner radius in pixels.\n\t */\n\tcornerRadius?: number;\n\n\t/**\n\t * Slice \"pull out\" radius in pixels.\n\t */\n\tshiftRadius?: number;\n\n\t/**\n\t * Number of pixels to add to whatever slice's `radius` value is. Negative\n\t * numbers can also be used.\n\t */\n\tdRadius?: number;\n\n\t/**\n\t * Number of pixels to add to whatever slice's `innerRadius` value is.\n\t * Negative numbers can also be used.\n\t */\n\tdInnerRadius?: number;\n\n}\n\nexport interface ISlicePrivate extends IGraphicsPrivate {\n}\n\n/**\n * Draws a slice shape.\n *\n * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/graphics/} for more info\n */\nexport class Slice extends Graphics {\n\n\tdeclare public _settings: ISliceSettings;\n\tdeclare public _privateSettings: ISlicePrivate;\n\n\tpublic static className: string = \"Slice\";\n\tpublic static classNames: Array<string> = Graphics.classNames.concat([Slice.className]);\n\n\t/**\n\t * @ignore\n\t */\n\tpublic ix: number = 0;\n\n\t/**\n\t * @ignore\n\t */\n\tpublic iy: number = 0;\n\n\tprotected _generator = arc();\n\n\tpublic _getTooltipPoint(): IPoint {\n\t\tlet tooltipX = this.get(\"tooltipX\");\n\t\tlet tooltipY = this.get(\"tooltipY\");\n\n\t\tlet x = 0;\n\t\tlet y = 0;\n\n\t\tif ($type.isNumber(tooltipX)) {\n\t\t\tx = tooltipX;\n\t\t}\n\n\t\tif ($type.isNumber(tooltipY)) {\n\t\t\ty = tooltipY;\n\t\t}\n\n\t\tlet radius = this.get(\"radius\", 0);\n\t\tlet innerRadius = this.get(\"innerRadius\", 0);\n\n\t\tlet dRadius = this.get(\"dRadius\", 0);\n\t\tlet dInnerRadius = this.get(\"dInnerRadius\", 0);\n\n\t\tradius += dRadius;\n\t\tinnerRadius += dInnerRadius;\n\n\t\tif (innerRadius < 0) {\n\t\t\tinnerRadius = radius + innerRadius;\n\t\t}\n\n\t\tif (tooltipX instanceof Percent) {\n\t\t\tx = this.ix * (innerRadius + (radius - innerRadius) * tooltipX.value)\n\t\t}\n\n\t\tif (tooltipY instanceof Percent) {\n\t\t\ty = this.iy * (innerRadius + (radius - innerRadius) * tooltipY.value)\n\t\t}\n\n\t\tif (this.get(\"arc\") >= 360 && innerRadius == 0) {\n\t\t\tx = 0;\n\t\t\ty = 0;\n\t\t}\n\n\n\t\treturn { x, y };\n\t}\n\tpublic _beforeChanged() {\n\t\tsuper._beforeChanged();\n\n\t\tif (this.isDirty(\"radius\") || this.isDirty(\"arc\") || this.isDirty(\"innerRadius\") || this.isDirty(\"startAngle\") || this.isDirty(\"dRadius\") || this.isDirty(\"dInnerRadius\") || this.isDirty(\"cornerRadius\") || this.isDirty(\"shiftRadius\")) {\n\t\t\tthis._clear = true;\n\t\t}\n\t}\n\n\tpublic _changed() {\n\t\tsuper._changed();\n\n\t\tif (this._clear) {\n\t\t\tlet startAngle = this.get(\"startAngle\", 0);\n\t\t\tlet arc = this.get(\"arc\", 0);\n\t\t\tconst generator = this._generator;\n\n\t\t\tif(arc < 0){\n\t\t\t\tstartAngle = startAngle + arc;\n\t\t\t\tarc = arc * -1;\n\t\t\t}\n\n\t\t\tif(arc > 0.1){ // this fixes bug with full circle when arc is very small\n\t\t\t\tgenerator.cornerRadius(this.get(\"cornerRadius\", 0));\n\t\t\t}\n\t\t\tgenerator.context(this._display as any);\n\n\t\t\tlet radius = this.get(\"radius\", 0);\n\t\t\tlet innerRadius = this.get(\"innerRadius\", 0);\n\n\t\t\tlet dRadius = this.get(\"dRadius\", 0);\n\t\t\tlet dInnerRadius = this.get(\"dInnerRadius\", 0);\n\n\t\t\tradius += dRadius;\n\t\t\tinnerRadius += dInnerRadius;\t\t\t\n\n\t\t\tif (innerRadius < 0) {\n\t\t\t\tinnerRadius = radius + innerRadius;\n\t\t\t}\n\n\t\t\tgenerator({ innerRadius: innerRadius, outerRadius: radius, startAngle: (startAngle + 90) * $math.RADIANS, endAngle: (startAngle + arc + 90) * $math.RADIANS });\n\n\t\t\tlet middleAngle = startAngle + arc / 2;\n\n\t\t\tthis.ix = $math.cos(middleAngle);\n\t\t\tthis.iy = $math.sin(middleAngle);\n\n\t\t\tconst shiftRadius = this.get(\"shiftRadius\", 0);\n\t\t\tthis.setRaw(\"dx\", this.ix * shiftRadius);\n\t\t\tthis.setRaw(\"dy\", this.iy * shiftRadius);\t\t\t\n\t\t\tthis.markDirtyPosition();\n\t\t}\n\t}\n}\n","import type { Animation } from \"../util/Entity\";\nimport type { Time } from \"../util/Animation\";\n\nimport { RoundedRectangle } from \"../render/RoundedRectangle\";\nimport { Container, IContainerPrivate, IContainerSettings, IContainerEvents } from \"./Container\";\nimport { Graphics } from \"./Graphics\";\nimport { Button } from \"./Button\";\n\nimport * as $type from \"../util/Type\";\nimport * as $utils from \"../util/Utils\";\n\nexport interface IScrollbarSettings extends IContainerSettings {\n\n\t/**\n\t * Orientation of the scrollbar.\n\t */\n\torientation: \"horizontal\" | \"vertical\";\n\n\t/**\n\t * Relative start of the selected range, with 0 meaning beginning, and 1 the\n\t * end.\n\t */\n\tstart?: number;\n\n\t/**\n\t * Relative end of the selected range, with 0 meaning beginning, and 1 the\n\t * end.\n\t */\n\tend?: number;\n\n\t/**\n\t * Number of milliseconds to play scroll animations for.\n\t */\n\tanimationDuration?: number;\n\n\t/**\n\t * Easing function to use for animations.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/animations/#Easing_functions} for more info\n\t */\n\tanimationEasing?: (t: Time) => Time;\n\n}\n\nexport interface IScrollbarPrivate extends IContainerPrivate {\n\n\t/**\n\t * @ignore\n\t */\n\tisBusy?: boolean;\n\n\t/**\n\t * @ignore\n\t */\n\tpositionTextFunction?: (position: number) => string;\n\n}\n\nexport interface IScrollbarEvents extends IContainerEvents {\n\n\t/**\n\t * Invoked when range of the selection changes.\n\t */\n\trangechanged: { start: number, end: number, grip?: \"start\" | \"end\" };\n\n\treleased:{};\n}\n\n/**\n * A control that allows zooming chart's axes, or other uses requiring range\n * selection.\n *\n * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/scrollbars/} for more info\n */\nexport class Scrollbar extends Container {\n\n\tpublic _addOrientationClass() {\n\t\tthis._settings.themeTags = $utils.mergeTags(this._settings.themeTags, [\"scrollbar\", this._settings.orientation]);\n\t\tif (!this._settings.background) {\n\t\t\tthis._settings.background = RoundedRectangle.new(this._root, {\n\t\t\t\tthemeTags: $utils.mergeTags(this._settings.themeTags, [\"main\", \"background\"])\n\t\t\t});\n\t\t}\n\t}\n\n\tdeclare public _settings: IScrollbarSettings;\n\tdeclare public _privateSettings: IScrollbarPrivate;\n\tdeclare public _events: IScrollbarEvents;\n\n\tpublic static className: string = \"Scrollbar\";\n\tpublic static classNames: Array<string> = Container.classNames.concat([Scrollbar.className]);\n\n\t/**\n\t * A thumb elment - a draggable square between the grips, used for panning\n\t * the selection.\n\t */\n\tpublic thumb: RoundedRectangle = this._makeThumb();\n\n\t/**\n\t * Start grip button.\n\t */\n\tpublic startGrip: Button = this._makeButton();\n\n\t/**\n\t * End grip button.\n\t */\n\tpublic endGrip: Button = this._makeButton();\n\n\tprotected _thumbBusy: boolean = false;\n\n\tprotected _startDown: boolean = false;\n\n\tprotected _endDown: boolean = false;\n\n\tprotected _thumbDown: boolean = false;\n\n\tprotected _gripDown?: \"start\" | \"end\";\n\n\tprotected _makeButton(): Button {\n\t\treturn this.children.push(Button.new(this._root, {\n\t\t\tthemeTags: [\"resize\", \"button\", this.get(\"orientation\")], icon: Graphics.new(this._root, {\n\t\t\t\tthemeTags: [\"icon\"]\n\t\t\t})\n\t\t}));\n\t}\n\n\tprotected _makeThumb(): RoundedRectangle {\n\t\treturn this.children.push(RoundedRectangle.new(this._root, {\n\t\t\tthemeTags: [\"thumb\", this.get(\"orientation\")]\n\t\t}));\n\t}\n\n\tprotected _handleAnimation(animation: Animation<any>) {\n\t\tif (animation) {\n\t\t\tthis._disposers.push(\n\t\t\t\tanimation.events.on(\"stopped\", () => {\n\t\t\t\t\tthis.setPrivateRaw(\"isBusy\", false);\n\t\t\t\t\tthis._thumbBusy = false;\n\t\t\t\t})\n\t\t\t)\n\t\t}\n\t}\n\n\tprotected _afterNew() {\n\t\tthis._addOrientationClass();\n\t\tsuper._afterNew();\n\n\t\tconst startGrip = this.startGrip;\n\t\tconst endGrip = this.endGrip;\n\t\tconst thumb = this.thumb;\n\t\tconst background = this.get(\"background\");\n\n\t\tif (background) {\n\t\t\tthis._disposers.push(\n\t\t\t\tbackground.events.on(\"click\", (event) => {\n\t\t\t\t\tthis.setPrivateRaw(\"isBusy\", true);\n\t\t\t\t\tconst point = this._display.toLocal(event.point);\n\n\t\t\t\t\tconst w = this.width();\n\t\t\t\t\tconst h = this.height();\n\n\t\t\t\t\tconst orientation = this.get(\"orientation\");\n\n\t\t\t\t\tlet newMiddle: number;\n\n\t\t\t\t\tif (orientation == \"vertical\") {\n\t\t\t\t\t\tnewMiddle = (point.y - thumb.height() / 2) / h;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tnewMiddle = (point.x - thumb.width() / 2) / w;\n\t\t\t\t\t}\n\n\t\t\t\t\tlet newCoordinate: number;\n\t\t\t\t\tlet key: \"x\" | \"y\";\n\n\t\t\t\t\tif (orientation == \"vertical\") {\n\t\t\t\t\t\tnewCoordinate = newMiddle * h;\n\t\t\t\t\t\tkey = \"y\";\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tnewCoordinate = newMiddle * w;\n\t\t\t\t\t\tkey = \"x\";\n\t\t\t\t\t}\n\n\n\t\t\t\t\tconst duration = this.get(\"animationDuration\", 0);\n\t\t\t\t\tif (duration > 0) {\n\t\t\t\t\t\tthis._thumbBusy = true;\n\t\t\t\t\t\tthis._handleAnimation(this.thumb.animate({ key: key, to: newCoordinate, duration: duration, easing: this.get(\"animationEasing\") }));\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tthis.thumb.set(key, newCoordinate);\n\t\t\t\t\t\tthis._root.events.once(\"frameended\", () => {\n\t\t\t\t\t\t\tthis.setPrivateRaw(\"isBusy\", false);\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t)\n\t\t}\n\n\t\tthis._disposers.push(thumb.events.on(\"dblclick\", (event) => {\n\n\t\t\tif (!$utils.isLocalEvent(event.originalEvent, this)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst duration = this.get(\"animationDuration\", 0);\n\t\t\tconst easing = this.get(\"animationEasing\");\n\n\t\t\tthis.animate({ key: \"start\", to: 0, duration: duration, easing: easing });\n\t\t\tthis.animate({ key: \"end\", to: 1, duration: duration, easing: easing });\n\t\t}));\n\n\t\tthis._disposers.push(startGrip.events.on(\"pointerdown\", () => {\n\t\t\tthis.setPrivateRaw(\"isBusy\", true);\n\t\t\tthis._startDown = true;\n\t\t\tthis._gripDown = \"start\";\n\t\t}))\n\n\t\tthis._disposers.push(endGrip.events.on(\"pointerdown\", () => {\n\t\t\tthis.setPrivateRaw(\"isBusy\", true);\n\t\t\tthis._endDown = true;\n\t\t\tthis._gripDown = \"end\";\n\t\t}))\n\n\t\tthis._disposers.push(thumb.events.on(\"pointerdown\", () => {\n\t\t\tthis.setPrivateRaw(\"isBusy\", true);\n\t\t\tthis._thumbDown = true;\n\t\t\tthis._gripDown = undefined;\n\t\t}))\n\n\t\tthis._disposers.push(startGrip.events.on(\"globalpointerup\", () => {\n\t\t\tif (this._startDown) {\n\t\t\t\tthis.setPrivateRaw(\"isBusy\", false);\n\t\t\t\tthis._released();\n\t\t\t}\n\t\t\tthis._startDown = false;\n\t\t}))\n\n\t\tthis._disposers.push(endGrip.events.on(\"globalpointerup\", () => {\n\t\t\tif (this._endDown) {\n\t\t\t\tthis.setPrivateRaw(\"isBusy\", false);\n\t\t\t\tthis._released();\n\t\t\t}\n\t\t\tthis._endDown = false;\n\t\t}))\n\n\t\tthis._disposers.push(thumb.events.on(\"globalpointerup\", () => {\n\t\t\tif (this._thumbDown) {\n\t\t\t\tthis.setPrivateRaw(\"isBusy\", false);\n\t\t\t\tthis._released();\n\t\t\t}\n\t\t\tthis._thumbDown = false;\n\t\t}))\n\n\t\tthis._disposers.push(startGrip.on(\"x\", () => {\n\t\t\tthis._updateThumb();\n\t\t}));\n\n\t\tthis._disposers.push(endGrip.on(\"x\", () => {\n\t\t\tthis._updateThumb();\n\t\t}));\n\n\t\tthis._disposers.push(startGrip.on(\"y\", () => {\n\t\t\tthis._updateThumb();\n\t\t}));\n\n\t\tthis._disposers.push(endGrip.on(\"y\", () => {\n\t\t\tthis._updateThumb();\n\t\t}));\n\n\t\tthis._disposers.push(thumb.events.on(\"positionchanged\", () => {\n\t\t\tthis._updateGripsByThumb();\n\t\t}));\n\n\t\tif (this.get(\"orientation\") == \"vertical\") {\n\t\t\tstartGrip.set(\"x\", 0);\n\t\t\tendGrip.set(\"x\", 0);\n\n\t\t\tthis._disposers.push(thumb.adapters.add(\"y\", (value) => {\n\t\t\t\treturn Math.max(Math.min(Number(value), this.height() - thumb.height()), 0);\n\t\t\t}))\n\n\t\t\tthis._disposers.push(thumb.adapters.add(\"x\", (_value) => {\n\t\t\t\treturn this.width() / 2;\n\t\t\t}))\n\n\t\t\tthis._disposers.push(startGrip.adapters.add(\"x\", (_value) => {\n\t\t\t\treturn this.width() / 2;\n\t\t\t}))\n\n\t\t\tthis._disposers.push(endGrip.adapters.add(\"x\", (_value) => {\n\t\t\t\treturn this.width() / 2;\n\t\t\t}))\n\n\t\t\tthis._disposers.push(startGrip.adapters.add(\"y\", (value) => {\n\t\t\t\treturn Math.max(Math.min(Number(value), this.height()), 0);\n\t\t\t}))\n\n\t\t\tthis._disposers.push(endGrip.adapters.add(\"y\", (value) => {\n\t\t\t\treturn Math.max(Math.min(Number(value), this.height()), 0);\n\t\t\t}))\n\t\t}\n\t\telse {\n\t\t\tstartGrip.set(\"y\", 0);\n\t\t\tendGrip.set(\"y\", 0);\n\n\t\t\tthis._disposers.push(thumb.adapters.add(\"x\", (value) => {\n\t\t\t\treturn Math.max(Math.min(Number(value), this.width() - thumb.width()), 0);\n\t\t\t}))\n\n\t\t\tthis._disposers.push(thumb.adapters.add(\"y\", (_value) => {\n\t\t\t\treturn this.height() / 2;\n\t\t\t}))\n\n\t\t\tthis._disposers.push(startGrip.adapters.add(\"y\", (_value) => {\n\t\t\t\treturn this.height() / 2;\n\t\t\t}))\n\n\t\t\tthis._disposers.push(endGrip.adapters.add(\"y\", (_value) => {\n\t\t\t\treturn this.height() / 2;\n\t\t\t}))\n\n\t\t\tthis._disposers.push(startGrip.adapters.add(\"x\", (value) => {\n\t\t\t\treturn Math.max(Math.min(Number(value), this.width()), 0);\n\t\t\t}))\n\n\t\t\tthis._disposers.push(endGrip.adapters.add(\"x\", (value) => {\n\t\t\t\treturn Math.max(Math.min(Number(value), this.width()), 0);\n\t\t\t}))\n\t\t}\n\t}\n\n\tpublic _updateChildren() {\n\t\tsuper._updateChildren();\n\n\t\tif (this.isDirty(\"end\") || this.isDirty(\"start\") || this._sizeDirty) {\n\t\t\tthis.updateGrips();\n\t\t}\n\t}\n\n\tpublic _changed() {\n\t\tsuper._changed();\n\t\tif (this.isDirty(\"start\") || this.isDirty(\"end\")) {\n\t\t\tconst eventType = \"rangechanged\";\n\t\t\tif (this.events.isEnabled(eventType)) {\n\t\t\t\tthis.events.dispatch(eventType, { type: eventType, target: this, start: this.get(\"start\", 0), end: this.get(\"end\", 1), grip: this._gripDown });\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected _released(){\n\t\tconst eventType = \"released\";\n\t\tif (this.events.isEnabled(eventType)) {\n\t\t\tthis.events.dispatch(eventType, { type: eventType, target: this });\n\t\t}\t\t\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateGrips() {\n\t\tconst startGrip = this.startGrip;\n\t\tconst endGrip = this.endGrip;\n\n\t\tconst orientation = this.get(\"orientation\");\n\t\tconst height = this.height();\n\t\tconst width = this.width();\n\n\t\tif (orientation == \"vertical\") {\n\t\t\tstartGrip.set(\"y\", height * this.get(\"start\", 0));\n\t\t\tendGrip.set(\"y\", height * this.get(\"end\", 1));\n\t\t}\n\t\telse {\n\t\t\tstartGrip.set(\"x\", width * this.get(\"start\", 0));\n\t\t\tendGrip.set(\"x\", width * this.get(\"end\", 1));\n\t\t}\n\n\t\tconst valueFunction = this.getPrivate(\"positionTextFunction\");\n\t\tconst from = Math.round(this.get(\"start\", 0) * 100);\n\t\tconst to = Math.round(this.get(\"end\", 0) * 100);\n\t\tlet fromValue: string;\n\t\tlet toValue: string;\n\t\tif (valueFunction) {\n\t\t\tfromValue = valueFunction.call(this, this.get(\"start\", 0));\n\t\t\ttoValue = valueFunction.call(this, this.get(\"end\", 0));\n\t\t}\n\t\telse {\n\t\t\tfromValue = from + \"%\";\n\t\t\ttoValue = to + \"%\";\n\t\t}\n\n\t\tstartGrip.set(\"ariaLabel\", this._t(\"From %1\", undefined, fromValue));\n\t\tstartGrip.set(\"ariaValueNow\", \"\" + from);\n\t\tstartGrip.set(\"ariaValueText\", from + \"%\");\n\n\t\tstartGrip.set(\"ariaValueMin\", \"0\");\n\t\tstartGrip.set(\"ariaValueMax\", \"100\");\n\n\t\tendGrip.set(\"ariaLabel\", this._t(\"To %1\", undefined, toValue));\n\t\tendGrip.set(\"ariaValueNow\", \"\" + to);\n\t\tendGrip.set(\"ariaValueText\", to + \"%\");\n\n\t\tendGrip.set(\"ariaValueMin\", \"0\");\n\t\tendGrip.set(\"ariaValueMax\", \"100\");\n\t}\n\n\tprotected _updateThumb() {\n\t\tconst thumb = this.thumb;\n\t\tconst startGrip = this.startGrip;\n\t\tconst endGrip = this.endGrip;\n\n\t\tconst height = this.height();\n\t\tconst width = this.width();\n\n\t\tlet x0 = startGrip.x();\n\t\tlet x1 = endGrip.x();\n\n\t\tlet y0 = startGrip.y();\n\t\tlet y1 = endGrip.y();\n\n\t\tlet start: number = 0;\n\t\tlet end: number = 1;\n\n\t\tif (this.get(\"orientation\") == \"vertical\") {\n\t\t\tif ($type.isNumber(y0) && $type.isNumber(y1)) {\n\t\t\t\tif (!this._thumbBusy && !thumb.isDragging()) {\n\t\t\t\t\tthumb.set(\"height\", y1 - y0);\n\t\t\t\t\tthumb.set(\"y\", y0);\n\t\t\t\t}\n\t\t\t\tstart = y0 / height;\n\t\t\t\tend = y1 / height;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif ($type.isNumber(x0) && $type.isNumber(x1)) {\n\t\t\t\tif (!this._thumbBusy && !thumb.isDragging()) {\n\t\t\t\t\tthumb.set(\"width\", x1 - x0);\n\t\t\t\t\tthumb.set(\"x\", x0);\n\t\t\t\t}\n\t\t\t\tstart = x0 / width;\n\t\t\t\tend = x1 / width;\n\t\t\t}\n\t\t}\n\n\t\tif (this.getPrivate(\"isBusy\") && (this.get(\"start\") != start || this.get(\"end\") != end)) {\n\t\t\tthis.set(\"start\", start);\n\t\t\tthis.set(\"end\", end);\n\t\t}\n\n\t\tconst valueFunction = this.getPrivate(\"positionTextFunction\");\n\t\tconst from = Math.round(this.get(\"start\", 0) * 100);\n\t\tconst to = Math.round(this.get(\"end\", 0) * 100);\n\t\tlet fromValue: string;\n\t\tlet toValue: string;\n\t\tif (valueFunction) {\n\t\t\tfromValue = valueFunction.call(this, this.get(\"start\", 0));\n\t\t\ttoValue = valueFunction.call(this, this.get(\"end\", 0));\n\t\t}\n\t\telse {\n\t\t\tfromValue = from + \"%\";\n\t\t\ttoValue = to + \"%\";\n\t\t}\n\n\t\tthumb.set(\"ariaLabel\", this._t(\"From %1 to %2\", undefined, fromValue, toValue));\n\t\tthumb.set(\"ariaValueNow\", \"\" + from);\n\t\tthumb.set(\"ariaValueText\", from + \"%\");\n\t}\n\n\n\tprotected _updateGripsByThumb() {\n\n\t\tconst thumb = this.thumb;\n\t\tconst startGrip = this.startGrip;\n\t\tconst endGrip = this.endGrip;\n\n\t\tif (this.get(\"orientation\") == \"vertical\") {\n\t\t\tconst thumbSize = thumb.height();\n\t\t\tstartGrip.set(\"y\", thumb.y());\n\t\t\tendGrip.set(\"y\", thumb.y() + thumbSize);\n\t\t}\n\t\telse {\n\t\t\tconst thumbSize = thumb.width();\n\t\t\tstartGrip.set(\"x\", thumb.x());\n\t\t\tendGrip.set(\"x\", thumb.x() + thumbSize);\n\t\t}\n\t}\n}\n","import { Scrollbar, IScrollbarPrivate, IScrollbarSettings, IScrollbarEvents } from \"./Scrollbar\";\r\n\r\nexport interface ISliderSettings extends IScrollbarSettings {\r\n}\r\n\r\nexport interface ISliderPrivate extends IScrollbarPrivate {\r\n}\r\n\r\nexport interface ISliderEvents extends IScrollbarEvents {\r\n}\r\n\r\n/**\r\n * A control that allows zooming chart's axes, or other uses requiring range\r\n * selection.\r\n */\r\nexport class Slider extends Scrollbar {\r\n\r\n\tdeclare public _settings: ISliderSettings;\r\n\tdeclare public _privateSettings: ISliderPrivate;\r\n\tdeclare public _events: ISliderEvents;\r\n\r\n\tpublic static className: string = \"Slider\";\r\n\tpublic static classNames: Array<string> = Scrollbar.classNames.concat([Slider.className]);\r\n\r\n\r\n\tprotected _afterNew() {\r\n\t\tthis._addOrientationClass();\r\n\t\tsuper._afterNew();\r\n\r\n\t\tthis.endGrip.setPrivate(\"visible\", false);\r\n\t\tthis.thumb.setPrivate(\"visible\", false);\r\n\t}\r\n\r\n\t/**\r\n\t * @ignore\r\n\t */\r\n\tpublic updateGrips() {\r\n\t\tsuper.updateGrips();\r\n\t\tconst startGrip = this.startGrip;\r\n\t\tthis.endGrip.setAll({ x: startGrip.x(), y: startGrip.y() });\r\n\t\tthis.setRaw(\"end\", this.get(\"start\"));\r\n\t}\r\n}\r\n","import type { IDisplayObject, IRendererEvents, IRendererEvent, IPointerEvent, IMargin } from \"./backend/Renderer\";\nimport type { IBounds } from \"../util/IBounds\";\nimport type { Container } from \"./Container\";\nimport type { IAccessibilitySettings } from \"../util/Accessibility\";\nimport type { NumberFormatter } from \"../util/NumberFormatter\";\nimport type { DateFormatter } from \"../util/DateFormatter\";\nimport type { DurationFormatter } from \"../util/DurationFormatter\";\nimport type { DataItem, IComponentDataItem } from \"./Component\";\nimport type { Graphics } from \"./Graphics\";\nimport type { IPoint } from \"../util/IPoint\";\nimport type { ListTemplate } from \"../util/List\";\n\nimport type { Tooltip } from \"./Tooltip\";\nimport { Entity, IEntitySettings, IEntityPrivate, IEntityEvents } from \"../util/Entity\";\nimport { Template } from \"../util/Template\";\nimport { Percent } from \"../util/Percent\";\nimport { EventDispatcher, Events, EventListener } from \"../util/EventDispatcher\";\nimport { IDisposer, MultiDisposer, CounterDisposer } from \"../util/Disposer\";\nimport { waitForAnimations } from \"../util/Animation\";\n\nimport * as $utils from \"../util/Utils\";\nimport * as $array from \"../util/Array\";\nimport * as $type from \"../util/Type\";\nimport * as $object from \"../util/Object\";\nimport * as $math from \"../util/Math\";\n//import { populateString } from \"../util/PopulateString\";\n\n\n/**\n * An [[EventDispatcher]] for [[Sprite]].\n *\n * @see {@link https://www.amcharts.com/docs/v5/concepts/events/} for more info\n */\nclass SpriteEventDispatcher<Target, E extends Events<Target, ISpriteEvents>> extends EventDispatcher<E> {\n\tprotected static RENDERER_EVENTS: { [K in keyof IRendererEvents]?: <E extends Events<Sprite, ISpriteEvents>>(this: SpriteEventDispatcher<Sprite, E>, event: IRendererEvents[K]) => void } = {\n\t\t\"click\": function (event) {\n\t\t\tif (this.isEnabled(\"click\") && !this._sprite.isDragging() && this._sprite._hasDown() && !this._sprite._hasMoved(this._makePointerEvent(\"click\", event))) {\n\t\t\t\tthis.dispatch(\"click\", this._makePointerEvent(\"click\", event));\n\t\t\t}\n\t\t},\n\n\t\t\"rightclick\": function (event) {\n\t\t\tif (this.isEnabled(\"rightclick\")) {\n\t\t\t\tthis.dispatch(\"rightclick\", this._makePointerEvent(\"rightclick\", event));\n\t\t\t}\n\t\t},\n\n\t\t\"middleclick\": function (event) {\n\t\t\tif (this.isEnabled(\"middleclick\")) {\n\t\t\t\tthis.dispatch(\"middleclick\", this._makePointerEvent(\"middleclick\", event));\n\t\t\t}\n\t\t},\n\n\t\t\"dblclick\": function (event) {\n\t\t\tthis.dispatchParents(\"dblclick\", this._makePointerEvent(\"dblclick\", event));\n\t\t},\n\n\t\t\"pointerover\": function (event) {\n\n\t\t\tconst sprite = this._sprite;\n\t\t\tlet dispatch = true;\n\n\t\t\tif (sprite.getPrivate(\"trustBounds\")) {\n\t\t\t\tsprite._getBounds()\n\t\t\t\tconst bounds = sprite.globalBounds();\n\n\t\t\t\tif (sprite.isType<Graphics>(\"Graphics\")) {\n\t\t\t\t\tconst strokeWidth = sprite.get(\"strokeWidth\", 1) / 2;\n\t\t\t\t\tif (strokeWidth >= 1) {\n\t\t\t\t\t\tbounds.left -= strokeWidth;\n\t\t\t\t\t\tbounds.right += strokeWidth;\n\t\t\t\t\t\tbounds.top -= strokeWidth;\n\t\t\t\t\t\tbounds.bottom += strokeWidth;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (!$math.inBounds(event.point, bounds)) {\n\t\t\t\t\tdispatch = false;\n\t\t\t\t\tsprite._root._renderer.removeHovering(sprite._display);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (dispatch && this.isEnabled(\"pointerover\")) {\n\t\t\t\tthis.dispatch(\"pointerover\", this._makePointerEvent(\"pointerover\", event));\n\t\t\t}\n\t\t},\n\n\t\t\"pointerout\": function (event) {\n\t\t\tif (this.isEnabled(\"pointerout\")) {\n\t\t\t\tthis.dispatch(\"pointerout\", this._makePointerEvent(\"pointerout\", event));\n\t\t\t}\n\t\t},\n\n\t\t\"pointerdown\": function (event) {\n\t\t\tthis.dispatchParents(\"pointerdown\", this._makePointerEvent(\"pointerdown\", event));\n\t\t},\n\n\t\t\"pointerup\": function (event) {\n\t\t\tif (this.isEnabled(\"pointerup\")) {\n\t\t\t\tthis.dispatch(\"pointerup\", this._makePointerEvent(\"pointerup\", event));\n\t\t\t}\n\t\t},\n\n\t\t\"globalpointerup\": function (event) {\n\t\t\tif (this.isEnabled(\"globalpointerup\")) {\n\t\t\t\tthis.dispatch(\"globalpointerup\", this._makePointerEvent(\"globalpointerup\", event));\n\t\t\t}\n\t\t},\n\n\t\t\"globalpointermove\": function (event) {\n\t\t\tif (this.isEnabled(\"globalpointermove\")) {\n\t\t\t\tthis.dispatch(\"globalpointermove\", this._makePointerEvent(\"globalpointermove\", event));\n\t\t\t}\n\t\t},\n\n\t\t\"wheel\": function (event) {\n\t\t\tthis.dispatchParents(\"wheel\", {\n\t\t\t\ttype: \"wheel\",\n\t\t\t\ttarget: this._sprite,\n\t\t\t\toriginalEvent: event.event,\n\t\t\t\tpoint: event.point,\n\t\t\t});\n\t\t},\n\t};\n\n\tprotected _sprite: Sprite;\n\n\tprotected _rendererDisposers: { [K in keyof IRendererEvents]?: CounterDisposer } = {};\n\n\tprotected _dispatchParents: boolean = true;\n\n\tconstructor(sprite: Sprite) {\n\t\tsuper();\n\t\tthis._sprite = sprite;\n\t}\n\n\tprotected _makePointerEvent<K extends keyof E>(key: K, event: IRendererEvent<IPointerEvent>): ISpritePointerEvent & { type: K } {\n\t\treturn {\n\t\t\ttype: key,\n\t\t\toriginalEvent: event.event,\n\t\t\tpoint: event.point,\n\t\t\tsimulated: event.simulated,\n\t\t\tnative: event.native,\n\t\t\ttarget: this._sprite\n\t\t};\n\t}\n\n\tprotected _onRenderer<Key extends keyof IRendererEvents>(key: Key, dispatch: (this: this, event: IRendererEvents[Key]) => void): IDisposer {\n\t\t// TODO: is this OK? it'd be good not to require to set this on each individual element\n\t\tthis._sprite.set(\"interactive\", true);\n\t\tthis._sprite._display.interactive = true;\n\n\t\tlet events = this._rendererDisposers[key];\n\n\t\tif (events === undefined) {\n\t\t\tconst disposer = this._sprite._display.on(key, (e) => {\n\t\t\t\tdispatch.call(this, e);\n\t\t\t});\n\n\t\t\tevents = this._rendererDisposers[key] = new CounterDisposer(() => {\n\t\t\t\tdelete this._rendererDisposers[key];\n\t\t\t\tdisposer.dispose();\n\t\t\t});\n\t\t}\n\n\t\treturn events.increment();\n\t}\n\n\tprotected _on<C, Key extends keyof E>(once: boolean, type: Key | null, callback: any, context: C, shouldClone: boolean, dispatch: (type: Key, event: E[Key]) => void): EventListener {\n\t\tconst info = super._on(once, type, callback, context, shouldClone, dispatch);\n\n\t\tconst rendererEvent = (SpriteEventDispatcher.RENDERER_EVENTS as any)[type];\n\t\tif (rendererEvent !== undefined) {\n\t\t\tinfo.disposer = new MultiDisposer([\n\t\t\t\tinfo.disposer,\n\t\t\t\tthis._onRenderer(type as any, rendererEvent),\n\t\t\t]);\n\t\t}\n\n\t\treturn info;\n\t}\n\n\t/**\n\t * Will stop any bubbling up of the event to element's parents.\n\t *\n\t * Should be called in an event handler, e.g.:\n\t *\n\t * ```TypeScript\n\t * element.events.on(\"pointerdown\", function(ev) {\n\t * // Do something here and prevent from \"pointerdown\" bubbling up\n\t * // ...\n\t * ev.target.events.stopParentDispatch();\n\t * });\n\t * ```\n\t * ```JavaScript\n\t * element.events.on(\"pointerdown\", function(ev) {\n\t * // Do something here and prevent from \"pointerdown\" bubbling up\n\t * // ...\n\t * ev.target.events.stopParentDispatch();\n\t * });\n\t * ```\n\t */\n\tpublic stopParentDispatch() {\n\t\tthis._dispatchParents = false;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic dispatchParents<Key extends keyof E>(type: Key, event: E[Key]): void {\n\t\tconst old = this._dispatchParents;\n\n\t\tthis._dispatchParents = true;\n\n\t\ttry {\n\t\t\tthis.dispatch(type, event);\n\n\t\t\tif (this._dispatchParents && this._sprite.parent) {\n\t\t\t\tthis._sprite.parent.events.dispatchParents(type as any, event);\n\t\t\t}\n\n\t\t} finally {\n\t\t\tthis._dispatchParents = old;\n\t\t}\n\t}\n}\n\n\nexport interface ISpriteSettings extends IEntitySettings, IAccessibilitySettings {\n\n\t/**\n\t * X position relative to parent.\n\t */\n\tx?: number | Percent | null;\n\n\t/**\n\t * Y position relative to parent.\n\t */\n\ty?: number | Percent | null;\n\n\t/**\n\t * Element's absolute width in pixels (numeric value) or relative width to\n\t * parent ([[Percent]]);\n\t */\n\twidth?: number | Percent | null;\n\n\t/**\n\t * Element's absolute height in pixels (numeric value) or relative height to\n\t * parent ([[Percent]]);\n\t */\n\theight?: number | Percent | null;\n\n\t/**\n\t * Maximum allowed width in pixels.\n\t */\n\tmaxWidth?: number | null;\n\n\t/**\n\t * Maximum allowed height in pixels.\n\t */\n\tmaxHeight?: number | null;\n\n\t/**\n\t * Minimum allowed width in pixels.\n\t */\n\tminWidth?: number | null;\n\n\t/**\n\t * Minimum allowed height in pixels.\n\t */\n\tminHeight?: number | null;\n\n\t/**\n\t * Opacity. 0 - fully transparent; 1 - fully opaque.\n\t */\n\topacity?: number;\n\n\t/**\n\t * Rotation in degrees.\n\t */\n\trotation?: number;\n\n\t/**\n\t * Scale.\n\t *\n\t * Setting to a value less than 1 will shrink object.\n\t */\n\tscale?: number;\n\n\t/**\n\t * X coordinate of the center of the element relative to itself.\n\t *\n\t * Center coordinates will affect placement as well as rotation pivot point.\n\t */\n\tcenterX?: number | Percent;\n\n\t/**\n\t * Y coordinate of the center of the element relative to itself.\n\t *\n\t * Center coordinates will affect placement as well as rotation pivot point.\n\t */\n\tcenterY?: number | Percent;\n\n\t/**\n\t * Left margin in pixels.\n\t */\n\tmarginLeft?: number;\n\n\t/**\n\t * Right margin in pixels.\n\t */\n\tmarginRight?: number;\n\n\t/**\n\t * Top margin in pixels.\n\t */\n\tmarginTop?: number;\n\n\t/**\n\t * Bottom margin in pixels.\n\t */\n\tmarginBottom?: number;\n\n\t/**\n\t * Is element visible?\n\t */\n\tvisible?: boolean;\n\n\t/**\n\t * Positioning of the element.\n\t *\n\t * `\"absolute\"` means element will not participate in parent layout scheme,\n\t * and will be positioned solely accoridng its `x` and `y` settings.\n\t */\n\tposition?: \"absolute\" | \"relative\";\n\n\t/**\n\t * Horizontal shift in pixels. Can be negative to shift leftward.\n\t */\n\tdx?: number;\n\n\t/**\n\t * Vertical shift in pixels. Can be negative to shift upward.\n\t */\n\tdy?: number;\n\n\t/**\n\t * Should this element accept user interaction events?\n\t */\n\tinteractive?: boolean;\n\n\t/**\n\t * Text to show in a tooltip when hovered.\n\t */\n\ttooltipText?: string;\n\n\t/**\n\t * HTML content to show in a tooltip when hovered.\n\t *\n\t * @since 5.2.11\n\t */\n\ttooltipHTML?: string;\n\n\t/**\n\t * Tooltip pointer X coordinate relative to the element itself.\n\t */\n\ttooltipX?: number | Percent;\n\n\t/**\n\t * Tooltip pointer Y coordinate relative to the element itself.\n\t */\n\ttooltipY?: number | Percent;\n\n\t/**\n\t * [[Tooltip]] instance.\n\t */\n\ttooltip?: Tooltip;\n\n\t/**\n\t * Tooltip position.\n\t */\n\ttooltipPosition?: \"fixed\" | \"pointer\";\n\n\t/**\n\t * If set to `false` element will not be measured and cannot participate in\n\t * layout schemes.\n\t */\n\tisMeasured?: boolean;\n\n\t/**\n\t * Allows binding element's settings to data.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/settings/template-fields/} for more info\n\t */\n\ttemplateField?: string;\n\n\t/**\n\t * If set to `true`, user will be able to drag this element. It will also\n\t * disable default drag events over the area of this element.\n\t */\n\tdraggable?: boolean;\n\n\t/**\n\t * If set to `true`, mouse wheel events will be triggered over the element. It\n\t * will also disable page scrolling using mouse wheel when pointer is over\n\t * the element.\n\t */\n\twheelable?: boolean;\n\n\t/**\n\t * An instance of [[NumberFormatter]] that should be used instead of global\n\t * formatter object.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/using-formatters/} for more info\n\t */\n\tnumberFormatter?: NumberFormatter | undefined;\n\n\t/**\n\t * An instance of [[DateFormatter]] that should be used instead of global\n\t * formatter object.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/using-formatters/} for more info\n\t */\n\tdateFormatter?: DateFormatter | undefined;\n\n\t/**\n\t * An instance of [[DurationFormatter]] that should be used instead of global\n\t * formatter object.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/using-formatters/} for more info\n\t */\n\tdurationFormatter?: DurationFormatter | undefined;\n\n\t/**\n\t * If set, element will toggle specified boolean setting between `true` and\n\t * `false` when clicked/touched.\n\t */\n\ttoggleKey?: \"disabled\" | \"active\" | \"none\" | undefined;\n\n\t/**\n\t * Indicates if element is currently active.\n\t */\n\tactive?: boolean;\n\n\t/**\n\t * Indicates if element is disabled.\n\t */\n\tdisabled?: boolean;\n\n\t/**\n\t * An SVG filter to apply to the element.\n\t *\n\t * IMPORTANT: SVG filters are not supported in some browsers, e.g. Safari.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/filters/#SVG_filters} for more info\n\t * @ignore todo: figure out if we still need this\n\t */\n\tfilter?: string;\n\n\t/**\n\t * A named mouse cursor style to show when hovering this element.\n\t *\n\t * @see {@link https://developer.mozilla.org/en-US/docs/Web/CSS/cursor} for more info\n\t */\n\tcursorOverStyle?: string;\n\n\t/**\n\t * If set to `false` this element will not appear in exported snapshots of\n\t * the chart.\n\t */\n\texportable?: boolean;\n\n\t/**\n\t * Numeric layer to put element in.\n\t *\n\t * Elements with higher number will appear in front of the ones with lower\n\t * numer.\n\t *\n\t * If not set, will inherit layer from its ascendants.\n\t */\n\tlayer?: number;\n\n\t/**\n\t * Margins for the layer.\n\t *\n\t * Can be used to make the layer larger/or smaller than default chart size.\n\t *\n\t * @since @5.2.39\n\t */\n\tlayerMargin?: IMargin;\n\n\t/**\n\t * If set to `true` the element will be hidden regardless of `visible` or\n\t * even if `show()` is called.\n\t */\n\tforceHidden?: boolean;\n\n\t/**\n\t * If set to `true` the element will be inactive - absolutely oblivious\n\t * to all interactions, even if there are related events set, or\n\t * the `interactive: true` is set.\n\t *\n\t * @since 5.0.21\n\t */\n\tforceInactive?: boolean;\n\n\t/**\n\t * Defines when tooltip is shown over the element.\n\t *\n\t * Available options:\n\t * * `\"hover\"` (default) - tooltip is shown when element is hovered by a pointer or touched. It is hidden as soon as element is not hovered anymore, or touch occurs outside it.\n\t * * `\"always\"` - a tooltip will always be shown over the element, without any interactions. Please note that if you need to show tooltips for multiple elements at the same time, you need to explicitly create a `Tooltip` instance and set element's `tooltip` setting with it.\n\t * * '\"click\"' - a tooltip will only appear when target element is clicked/tapped. Tooltip will hide when clicking anywhere else on the page.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/tooltips/#Sticky_tooltips} for more info\n\t * @default \"hover\"\n\t * @since 5.0.16\n\t */\n\tshowTooltipOn?: \"hover\" | \"always\" | \"click\";\n\n\t/**\n\t * If set to `true`, an element will try to draw itself in such way, that it\n\t * looks crisp on screen, with minimal anti-aliasing.\n\t *\n\t * It will round x/y position so it is positioned fine \"on pixel\".\n\t *\n\t * It will also adjust `strokeWidth` based on device pixel ratio or zoom,\n\t * so the line might look thinner than expected.\n\t *\n\t * NOTE: this is might not universally work, especially when set on several\n\t * objects that are supposed to fit perfectly with each other.\n\t *\n\t * @default false\n\t * @since 5.3.0\n\t */\n\tcrisp?: boolean;\n\n\t/**\n\t * Apply blur filter.\n\t *\n\t * Ranges of values in pixels: `0` to `X`.\n\t *\n\t * IMPORTANT: This setting is not supported in Safari browsers.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/filters/} for more info\n\t * @since 5.5.0\n\t */\n\tblur?: number;\n\n\t/**\n\t * Modifty visual brightness.\n\t *\n\t * Range of values: `0` to `1`.\n\t *\n\t * IMPORTANT: This setting is not supported in Safari browsers.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/filters/} for more info\n\t * @since 5.5.0\n\t */\n\tbrightness?: number;\n\n\t/**\n\t * Modify contrast.\n\t *\n\t * Range of values: `0` to `1`.\n\t *\n\t * IMPORTANT: This setting is not supported in Safari browsers.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/filters/} for more info\n\t * @since 5.5.0\n\t */\n\tcontrast?: number;\n\n\t/**\n\t * Modify saturation.\n\t *\n\t * Range of values in pixels: `0` to `X`.\n\t *\n\t * * `0` - grayscale\n\t * * `1` - no changes\n\t * * `>1` - more saturated\n\t *\n\t * IMPORTANT: This setting is not supported in Safari browsers.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/filters/} for more info\n\t * @since 5.5.0\n\t */\n\tsaturate?: number;\n\n\t/**\n\t * Apply sepia filter.\n\t *\n\t * Range of values: `0` (no changes) to `1` (complete sepia).\n\t *\n\t * IMPORTANT: This setting is not supported in Safari browsers.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/filters/} for more info\n\t * @since 5.5.0\n\t */\n\tsepia?: number;\n\n\t/**\n\t * Invert colors.\n\t *\n\t * Range of values: `0` (no changes) to `1` (completely inverted colors).\n\t *\n\t * IMPORTANT: This setting is not supported in Safari browsers.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/filters/} for more info\n\t * @since 5.5.0\n\t */\n\tinvert?: number;\n\n\t/**\n\t * Rotate HUE colors in degrees.\n\t *\n\t * Range of values: `0` to `360`.\n\t *\n\t * IMPORTANT: This setting is not supported in Safari browsers.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/filters/} for more info\n\t * @since 5.5.0\n\t */\n\thue?: number;\n\n}\n\nexport interface ISpritePrivate extends IEntityPrivate {\n\t/**\n\t * @ignore\n\t */\n\tcustomData?: any;\n\n\t/**\n\t * @ignore\n\t */\n\tx?: number;\n\n\t/**\n\t * @ignore\n\t */\n\ty?: number;\n\n\t/**\n\t * @ignore\n\t */\n\twidth?: number;\n\n\t/**\n\t * @ignore\n\t */\n\theight?: number;\n\n\t/**\n\t * @ignore\n\t */\n\tvisible?: boolean;\n\n\t/**\n\t * Is element currently showing a tooltip?\n\t */\n\tshowingTooltip?: boolean;\n\n\t/**\n\t * @ignore\n\t */\n\ttouchHovering?: boolean;\n\n\t/**\n\t * @ignore\n\t */\n\tfocusElement?: {\n\t\tdom: HTMLDivElement,\n\t\tdisposers: Array<IDisposer>,\n\t};\n\n\t/**\n\t * An element tooltip should inherit its colors from.\n\t */\n\ttooltipTarget?: Graphics;\n\n\t/**\n\t * @ignore\n\t */\n\tlist?: ListTemplate<Sprite>;\n\n\t/**\n\t * @ignore\n\t */\n\tmaxWidth?: number | null;\n\n\t/**\n\t * @ignore\n\t */\n\tmaxHeight?: number | null;\n\n\t/**\n\t * @ignore\n\t */\n\tminWidth?: number | null;\n\n\t/**\n\t * @ignore\n\t */\n\tminHeight?: number | null;\n\n\t/**\n\t * If set to `false`, its tabindex will be set to -1, so it does not get\n\t * focused with TAB, regardless whether its public setting `focusable` is\n\t * set to `true`.\n\t *\n\t * @since 5.3.16\n\t */\n\tfocusable?: boolean;\n\n\t/**\n\t * If set to `true`, the sprite will check if a mouse pointer is within\n\t * its bounds before dispatching pointer events.\n\t *\n\t * This helps to solve ghost tooltips problem that sometimes appear while\n\t * moving the pointer over interactive objects.\n\t *\n\t * This is set to `true` by default on `Rectangle` and `Circle`.\n\t *\n\t * @since 5.5.0\n\t */\n\ttrustBounds?: boolean;\n\n}\n\n/**\n * An interface defining event objects that originate from pinter interactions.\n */\nexport interface ISpritePointerEvent {\n\n\t/**\n\t * Original event object that caused the interaction, e.g. [[MouseEvent]].\n\t */\n\toriginalEvent: IPointerEvent;\n\n\t/**\n\t * A point where event originated.\n\t */\n\tpoint: IPoint;\n\n\t/**\n\t * Is it a simulated event, e.g. if the event was generated by code rather\n\t * then actual user interaction.\n\t */\n\tsimulated: boolean;\n\n\t/**\n\t * Whether event originated in chart's container or its children.\n\t */\n\tnative?: boolean;\n\n\t/**\n\t * The element on which the event occurred.\n\t */\n\ttarget: Sprite;\n\n}\n\nexport interface ISpriteEvents extends IEntityEvents {\n\n\t/**\n\t * Invoked when element's data item changes.\n\t */\n\tdataitemchanged: {\n\t\toldDataItem: DataItem<IComponentDataItem> | undefined,\n\t\tnewDataItem: DataItem<IComponentDataItem> | undefined\n\t};\n\n\t/**\n\t * Invoked when element's position (X/Y) changes.\n\t */\n\tpositionchanged: {};\n\n\t/**\n\t * Invoked when element's bounds change due to any manipulation to it.\n\t */\n\tboundschanged: {};\n\n\t/**\n\t * Invoked when element dragging starts.\n\t */\n\tdragstart: ISpritePointerEvent;\n\n\t/**\n\t * Invoked when element dragging stops.\n\t */\n\tdragstop: ISpritePointerEvent;\n\n\t/**\n\t * Invoked when element ois being dragged.\n\t */\n\tdragged: ISpritePointerEvent;\n\n\t/**\n\t * Invoked when element is clicked or tapped.\n\t */\n\tclick: ISpritePointerEvent;\n\n\t/**\n\t * Invoked when element is clicked width the right mouse button.\n\t */\n\trightclick: ISpritePointerEvent;\n\n\t/**\n\t * Invoked when element is clicked with the middle mouse button.\n\t */\n\tmiddleclick: ISpritePointerEvent;\n\n\t/**\n\t * Invoked when element is doubleclicked or tapped twice quickly.\n\t */\n\tdblclick: ISpritePointerEvent;\n\n\t/**\n\t * Invoked when pointer moves over the element.\n\t */\n\tpointerover: ISpritePointerEvent;\n\n\t/**\n\t * Invoked when pointer moves outside the element.\n\t */\n\tpointerout: ISpritePointerEvent;\n\n\t/**\n\t * Invoked when pointer button is pressed or touch starts over the element.\n\t */\n\tpointerdown: ISpritePointerEvent;\n\n\t/**\n\t * Invoked when pointer button is released or touch stops over the element.\n\t */\n\tpointerup: ISpritePointerEvent;\n\n\t/**\n\t * Invoked when pointer button is released or touch stops in the window, even\n\t * outside of the element or even chart area.\n\t */\n\tglobalpointerup: ISpritePointerEvent;\n\n\t/**\n\t * Invoked when pointer is moving anywhere in the window, even outside of the\n\t * element or even chart area.\n\t */\n\tglobalpointermove: ISpritePointerEvent;\n\n\t/**\n\t * Invoked when mouse wheel is spinned while pointer is over the element.\n\t */\n\twheel: {\n\t\toriginalEvent: WheelEvent;\n\t\tpoint: IPoint;\n\t};\n\n\t/**\n\t * Invoked when element gains focus.\n\t */\n\tfocus: {\n\t\toriginalEvent: FocusEvent;\n\t\ttarget: Sprite;\n\t};\n\n\t/**\n\t * Invoked when element loses focus.\n\t */\n\tblur: {\n\t\toriginalEvent: FocusEvent;\n\t\ttarget: Sprite;\n\t};\n\n}\n\n/**\n * A base class for all visual elements.\n *\n * @important\n */\nexport abstract class Sprite extends Entity {\n\tdeclare public _settings: ISpriteSettings;\n\tdeclare public _privateSettings: ISpritePrivate;\n\tdeclare public _events: ISpriteEvents;\n\n\tdeclare public events: SpriteEventDispatcher<this, Events<this, this[\"_events\"]>>;\n\n\tpublic abstract _display: IDisplayObject;\n\n\tpublic _adjustedLocalBounds: IBounds = { left: 0, right: 0, top: 0, bottom: 0 };\n\n\tpublic _localBounds: IBounds = { left: 0, right: 0, top: 0, bottom: 0 };\n\n\tpublic static className: string = \"Sprite\";\n\tpublic static classNames: Array<string> = Entity.classNames.concat([Sprite.className]);\n\n\tpublic _parent: Container | undefined;\n\tprotected _dataItem: DataItem<IComponentDataItem> | undefined;\n\n\tprotected _templateField: Template<this> | undefined;\n\n\tprotected _sizeDirty: boolean = false;\n\n\t// Will be true only when dragging\n\tpublic _isDragging: boolean = false;\n\n\t// The event when the dragging starts\n\tprotected _dragEvent: ISpritePointerEvent | undefined;\n\n\t// The position when dragging starts\n\tprotected _dragPoint: IPoint | undefined;\n\n\tprotected _isHidden: boolean = false;\n\n\tprotected _isShowing: boolean = false;\n\n\tprotected _isHiding: boolean = false;\n\n\tprotected _isDown: boolean = false;\n\tpublic _downPoint: IPoint | undefined;\n\n\tpublic _downPoints: { [index: number]: IPoint } = {};\n\n\tpublic _toggleDp: IDisposer | undefined;\n\n\tprotected _dragDp: MultiDisposer | undefined;\n\n\tprotected _tooltipDp: MultiDisposer | undefined;\n\n\tprotected _hoverDp: MultiDisposer | undefined;\n\n\tprotected _focusDp: MultiDisposer | undefined;\n\n\tprotected _tooltipMoveDp: IDisposer | undefined;\n\n\tprotected _tooltipPointerDp: MultiDisposer | undefined;\n\n\tprotected _statesHandled: boolean = false;\n\n\tprotected _afterNew() {\n\t\tthis.setPrivateRaw(\"visible\", true);\n\t\tsuper._afterNew();\n\t}\n\n\t/**\n\t * Marks some setting as dirty. Could be used to trigger adapter.\n\t * @param key \n\t */\n\tpublic markDirtyKey<Key extends keyof this[\"_settings\"]>(key: Key) {\n\t\tthis._markDirtyKey(key);\n\t}\n\n\tpublic _markDirtyKey<Key extends keyof this[\"_settings\"]>(key: Key) {\n\t\tsuper._markDirtyKey(key);\n\t\tif (key == \"x\" || key == \"y\" || key == \"dx\" || key == \"dy\") {\n\t\t\tthis.markDirtyBounds();\n\t\t\tthis._addPercentagePositionChildren();\n\t\t\tthis.markDirtyPosition();\n\t\t}\n\t}\n\n\tpublic _markDirtyPrivateKey<Key extends keyof this[\"_privateSettings\"]>(key: Key) {\n\t\tsuper._markDirtyPrivateKey(key);\n\t\tif (key == \"x\" || key == \"y\") {\n\t\t\tthis.markDirtyPosition();\n\t\t}\n\t}\n\n\tprotected _removeTemplateField(): void {\n\t\tif (this._templateField) {\n\t\t\tthis._templateField._removeObjectTemplate(this);\n\t\t}\n\t}\n\n\tprotected _createEvents(): SpriteEventDispatcher<this, Events<this, this[\"_events\"]>> {\n\t\treturn new SpriteEventDispatcher(this);\n\t}\n\n\tpublic _processTemplateField(): void {\n\t\tlet template;\n\n\t\tconst field = this.get(\"templateField\");\n\n\t\tif (field) {\n\t\t\tconst dataItem = this.dataItem;\n\t\t\tif (dataItem) {\n\t\t\t\tconst context = dataItem.dataContext;\n\t\t\t\tif (context) {\n\t\t\t\t\ttemplate = (context as any)[field];\n\n\t\t\t\t\tif (!(template instanceof Template) && template) {\n\t\t\t\t\t\ttemplate = Template.new(template);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (this._templateField !== template) {\n\t\t\tthis._removeTemplateField();\n\n\t\t\tthis._templateField = template;\n\n\t\t\tif (template) {\n\t\t\t\ttemplate._setObjectTemplate(this);\n\t\t\t}\n\n\t\t\tthis._applyTemplates();\n\t\t}\n\t}\n\n\t// TODO change this to run before the element is added to the parent, so that way\n\t// it doesn't need to apply the themes twice\n\tpublic _setDataItem(dataItem?: DataItem<IComponentDataItem>): void {\n\t\tconst oldDataItem = this._dataItem\n\t\tthis._dataItem = dataItem;\n\t\tthis._processTemplateField();\n\t\tconst eventType = \"dataitemchanged\";\n\t\tif (dataItem != oldDataItem) {\n\t\t\tif (this.events.isEnabled(eventType)) {\n\t\t\t\tthis.events.dispatch(eventType, {\n\t\t\t\t\ttype: eventType,\n\t\t\t\t\ttarget: this,\n\t\t\t\t\toldDataItem: oldDataItem,\n\t\t\t\t\tnewDataItem: dataItem\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * A [[DataItem]] used for this element.\n\t *\n\t * NOTE: data item is being assigned automatically in most cases where it\n\t * matters. Use this accessor to set data item only if you know what you're\n\t * doing.\n\t *\n\t * @param value Data item\n\t */\n\tpublic set dataItem(value: DataItem<IComponentDataItem> | undefined) {\n\t\tthis._setDataItem(value);\n\t}\n\n\t/**\n\t * @return DataItem\n\t */\n\tpublic get dataItem(): DataItem<IComponentDataItem> | undefined {\n\t\tif (this._dataItem) {\n\t\t\treturn this._dataItem;\n\n\t\t} else {\n\t\t\tlet parent = this._parent;\n\n\t\t\twhile (parent) {\n\t\t\t\tif (parent._dataItem) {\n\t\t\t\t\treturn parent._dataItem;\n\n\t\t\t\t} else {\n\t\t\t\t\tparent = parent._parent;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected _addPercentageSizeChildren() {\n\t\tlet parent = this.parent;\n\t\tif (parent) {\n\t\t\tif (this.get(\"width\") instanceof Percent || this.get(\"height\") instanceof Percent) {\n\t\t\t\t$array.pushOne(parent._percentageSizeChildren, this);\n\t\t\t} else {\n\t\t\t\t$array.removeFirst(parent._percentageSizeChildren, this);\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected _addPercentagePositionChildren() {\n\t\tlet parent = this.parent;\n\t\tif (parent) {\n\t\t\tif (this.get(\"x\") instanceof Percent || this.get(\"y\") instanceof Percent) {\n\t\t\t\t$array.pushOne(parent._percentagePositionChildren, this);\n\t\t\t} else {\n\t\t\t\t$array.removeFirst(parent._percentagePositionChildren, this);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic markDirtyPosition() {\n\t\tthis._root._addDirtyPosition(this);\n\t}\n\n\tprotected updatePivotPoint() {\n\t\tconst bounds = this._localBounds;\n\t\tif (bounds) {\n\t\t\tconst centerX = this.get(\"centerX\");\n\t\t\tif (centerX != null) {\n\t\t\t\tthis._display.pivot.x = bounds.left + $utils.relativeToValue(centerX!, bounds.right - bounds.left);\n\t\t\t}\n\n\t\t\tconst centerY = this.get(\"centerY\");\n\t\t\tif (centerY != null) {\n\t\t\t\tthis._display.pivot.y = bounds.top + $utils.relativeToValue(centerY!, bounds.bottom - bounds.top);\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic _beforeChanged() {\n\t\tsuper._beforeChanged();\n\n\t\t// handling states in beforeChanged, otherwise states is not applied without animated theme\n\t\tthis._handleStates();\n\n\t\tif (this.isDirty(\"tooltip\")) {\n\t\t\tconst previous = this._prevSettings.tooltip;\n\t\t\tif (previous) {\n\t\t\t\tprevious.dispose();\n\t\t\t}\n\t\t}\n\n\t\tif (this.isDirty(\"layer\") || this.isDirty(\"layerMargin\")) {\n\t\t\tthis._display.setLayer(this.get(\"layer\"), this.get(\"layerMargin\"));\n\t\t\tthis.markDirtyLayer();\n\t\t}\n\n\t\tif (this.isDirty(\"tooltipPosition\")) {\n\t\t\tconst tooltipMoveDp = this._tooltipMoveDp;\n\t\t\tif (tooltipMoveDp) {\n\t\t\t\ttooltipMoveDp.dispose();\n\t\t\t\tthis._tooltipMoveDp = undefined;\n\t\t\t}\n\n\t\t\tconst tooltipPointerDp = this._tooltipPointerDp;\n\t\t\tif (tooltipPointerDp) {\n\t\t\t\ttooltipPointerDp.dispose();\n\t\t\t\tthis._tooltipPointerDp = undefined;\n\t\t\t}\n\n\t\t\tif (this.get(\"tooltipPosition\") == \"pointer\") {\n\n\t\t\t\tif (this.isHover()) {\n\t\t\t\t\tthis._tooltipMoveDp = this.events.on(\"globalpointermove\", (e) => {\n\t\t\t\t\t\tthis.showTooltip(e.point);\n\t\t\t\t\t})\n\t\t\t\t}\n\n\t\t\t\tthis._tooltipPointerDp = new MultiDisposer([\n\t\t\t\t\tthis.events.on(\"pointerover\", () => {\n\t\t\t\t\t\tthis._tooltipMoveDp = this.events.on(\"globalpointermove\", (e) => {\n\t\t\t\t\t\t\tthis.showTooltip(e.point);\n\t\t\t\t\t\t})\n\t\t\t\t\t}),\n\n\t\t\t\t\tthis.events.on(\"pointerout\", () => {\n\t\t\t\t\t\tconst tooltipMoveDp = this._tooltipMoveDp;\n\t\t\t\t\t\tif (tooltipMoveDp) {\n\t\t\t\t\t\t\ttooltipMoveDp.dispose();\n\t\t\t\t\t\t\tthis._tooltipMoveDp = undefined;\n\t\t\t\t\t\t}\n\t\t\t\t\t})])\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected _handleStates() {\n\t\tif (!this._statesHandled) {\n\t\t\tif (this.isDirty(\"active\")) {\n\t\t\t\tif (this.get(\"active\")) {\n\t\t\t\t\tthis.states.applyAnimate(\"active\");\n\t\t\t\t\tthis.set(\"ariaChecked\", true);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (!this.isHidden()) {\n\t\t\t\t\t\tthis.states.applyAnimate(\"default\");\n\t\t\t\t\t}\n\t\t\t\t\tthis.set(\"ariaChecked\", false);\n\t\t\t\t}\n\t\t\t\tthis.markDirtyAccessibility();\n\t\t\t}\n\n\t\t\tif (this.isDirty(\"disabled\")) {\n\t\t\t\tif (this.get(\"disabled\")) {\n\t\t\t\t\tthis.states.applyAnimate(\"disabled\");\n\t\t\t\t\tthis.set(\"ariaChecked\", false);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (!this.isHidden()) {\n\t\t\t\t\t\tthis.states.applyAnimate(\"default\");\n\t\t\t\t\t}\n\t\t\t\t\tthis.set(\"ariaChecked\", true);\n\t\t\t\t}\n\t\t\t\tthis.markDirtyAccessibility();\n\t\t\t}\n\t\t\tthis._statesHandled = true;\n\t\t}\n\t}\n\n\tpublic _changed() {\n\t\tsuper._changed();\n\n\t\tconst display = this._display;\n\t\tconst events = this.events;\n\n\t\tif (this.isDirty(\"draggable\")) {\n\t\t\tconst draggable = this.get(\"draggable\");\n\t\t\tif (draggable) {\n\t\t\t\tthis.set(\"interactive\", true);\n\n\t\t\t\tthis._dragDp = new MultiDisposer([\n\t\t\t\t\tevents.on(\"pointerdown\", (ev) => {\n\t\t\t\t\t\tthis.dragStart(ev);\n\t\t\t\t\t}),\n\n\t\t\t\t\tevents.on(\"globalpointermove\", (ev) => {\n\t\t\t\t\t\tthis.dragMove(ev);\n\t\t\t\t\t}),\n\n\t\t\t\t\tevents.on(\"globalpointerup\", (ev) => {\n\t\t\t\t\t\tthis.dragStop(ev);\n\t\t\t\t\t})])\n\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (this._dragDp) {\n\t\t\t\t\tthis._dragDp.dispose();\n\t\t\t\t\tthis._dragDp = undefined;\n\t\t\t\t}\n\t\t\t}\n\t\t\tdisplay.cancelTouch = draggable ? true : false;\n\t\t}\n\n\t\tif (this.isDirty(\"tooltipText\") || this.isDirty(\"tooltipHTML\") || this.isDirty(\"showTooltipOn\")) {\n\t\t\tconst tooltipText = this.get(\"tooltipText\");\n\t\t\tconst tooltipHTML = this.get(\"tooltipHTML\");\n\t\t\tconst showTooltipOn = this.get(\"showTooltipOn\", \"hover\");\n\t\t\tif (this._tooltipDp) {\n\t\t\t\tthis._tooltipDp.dispose();\n\t\t\t\tthis._tooltipDp = undefined;\n\t\t\t}\n\t\t\tif (tooltipText || tooltipHTML) {\n\t\t\t\tif (showTooltipOn == \"click\") {\n\t\t\t\t\tthis._tooltipDp = new MultiDisposer([\n\t\t\t\t\t\tevents.on(\"click\", () => {\n\t\t\t\t\t\t\tthis.setTimeout(() => {\n\t\t\t\t\t\t\t\tconst tooltip = this.getTooltip();\n\t\t\t\t\t\t\t\tif (tooltip && !tooltip.isHidden() && tooltip.get(\"tooltipTarget\") === this) {\n\t\t\t\t\t\t\t\t\tthis.hideTooltip();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tthis.showTooltip();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}, 10);\n\t\t\t\t\t\t}),\n\t\t\t\t\t\t$utils.addEventListener(document, \"click\", (_ev: MouseEvent) => {\n\t\t\t\t\t\t\tthis.hideTooltip();\n\t\t\t\t\t\t})\n\t\t\t\t\t]);\n\t\t\t\t\tthis._disposers.push(this._tooltipDp);\n\t\t\t\t}\n\t\t\t\telse if (showTooltipOn == \"always\") {\n\t\t\t\t\t// nothing\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthis._tooltipDp = new MultiDisposer([\n\t\t\t\t\t\tevents.on(\"pointerover\", () => {\n\t\t\t\t\t\t\tthis.showTooltip();\n\t\t\t\t\t\t}),\n\t\t\t\t\t\tevents.on(\"pointerout\", () => {\n\t\t\t\t\t\t\tthis.hideTooltip();\n\t\t\t\t\t\t})\n\t\t\t\t\t]);\n\t\t\t\t\tthis._disposers.push(this._tooltipDp);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (this.isDirty(\"toggleKey\")) {\n\t\t\tlet toggleKey = this.get(\"toggleKey\") as any;\n\t\t\tif (toggleKey && toggleKey != \"none\") {\n\t\t\t\tthis._toggleDp = events.on(\"click\", () => {\n\t\t\t\t\tif (!this._isDragging) {\n\t\t\t\t\t\tthis.set(toggleKey, !this.get(toggleKey));\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (this._toggleDp) {\n\t\t\t\t\tthis._toggleDp.dispose();\n\t\t\t\t\tthis._toggleDp = undefined;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\t\tif (this.isDirty(\"opacity\")) {\n\t\t\tdisplay.alpha = Math.max(0, this.get(\"opacity\", 1));\n\t\t\tif (this.get(\"focusable\")) {\n\t\t\t\tthis.markDirtyAccessibility();\n\t\t\t}\n\t\t}\n\n\t\tif (this.isDirty(\"rotation\")) {\n\t\t\tthis.markDirtyBounds();\n\t\t\tdisplay.angle = this.get(\"rotation\", 0);\n\t\t}\n\n\t\tif (this.isDirty(\"scale\")) {\n\t\t\tthis.markDirtyBounds();\n\t\t\tdisplay.scale = this.get(\"scale\", 0);\n\t\t}\n\n\t\tif (this.isDirty(\"centerX\") || this.isDirty(\"centerY\")) {\n\t\t\tthis.markDirtyBounds();\n\t\t\tthis.updatePivotPoint();\n\t\t}\n\n\t\tif (this.isDirty(\"visible\") || this.isPrivateDirty(\"visible\") || this.isDirty(\"forceHidden\")) {\n\t\t\tif (!this.get(\"visible\") || !this.getPrivate(\"visible\") || this.get(\"forceHidden\")) {\n\t\t\t\tdisplay.visible = false;\n\t\t\t\tthis.hideTooltip();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tdisplay.visible = true;\n\t\t\t}\n\n\t\t\tthis.markDirtyBounds();\n\t\t\tif (this.get(\"focusable\")) {\n\t\t\t\tthis.markDirtyAccessibility();\n\t\t\t}\n\t\t}\n\n\t\tif (this.isDirty(\"width\") || this.isDirty(\"height\")) {\n\t\t\tthis.markDirtyBounds();\n\t\t\tthis._addPercentageSizeChildren();\n\n\t\t\tconst parent = this.parent;\n\t\t\tif (parent) {\n\t\t\t\tif ((this.isDirty(\"width\") && this.get(\"width\") instanceof Percent) || (this.isDirty(\"height\") && this.get(\"height\") instanceof Percent)) {\n\t\t\t\t\tparent.markDirty();\n\t\t\t\t\tparent._prevWidth = 0;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis._sizeDirty = true;\n\t\t}\n\n\t\tif (this.isDirty(\"maxWidth\") || this.isDirty(\"maxHeight\") || this.isPrivateDirty(\"width\") || this.isPrivateDirty(\"height\") || this.isDirty(\"minWidth\") || this.isDirty(\"minHeight\") || this.isPrivateDirty(\"maxWidth\") || this.isPrivateDirty(\"maxHeight\") || this.isPrivateDirty(\"minWidth\") || this.isPrivateDirty(\"minHeight\") || this.isDirty(\"marginLeft\") || this.isDirty(\"marginTop\") || this.isDirty(\"marginRight\") || this.isDirty(\"marginBottom\")) {\n\t\t\tthis.markDirtyBounds();\n\t\t\tthis._sizeDirty = true;\n\t\t}\n\n\t\tif (this._sizeDirty) {\n\t\t\tthis._updateSize();\n\t\t}\n\n\t\tif (this.isDirty(\"wheelable\")) {\n\t\t\tconst wheelable = this.get(\"wheelable\");\n\t\t\tif (wheelable) {\n\t\t\t\tthis.set(\"interactive\", true);\n\t\t\t}\n\t\t\tdisplay.wheelable = wheelable ? true : false;\n\t\t}\n\n\t\t// Accessibility\n\t\tif (this.isDirty(\"tabindexOrder\") || this.isDirty(\"focusableGroup\")) {\n\t\t\tif (this.get(\"focusable\")) {\n\t\t\t\tthis._root._registerTabindexOrder(this);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis._root._unregisterTabindexOrder(this);\n\t\t\t}\n\t\t}\n\n\t\tif (this.isDirty(\"filter\")) {\n\t\t\t//this.markDirtyBounds();\n\t\t\tdisplay.filter = this.get(\"filter\");\n\t\t}\n\n\t\tlet filter = this.get(\"filter\", \"\");\n\n\t\tif (this.isDirty(\"blur\")) {\n\t\t\tconst blur = this.get(\"blur\", 0);\n\t\t\tif (blur != 0) {\n\t\t\t\tfilter += \" blur(\" + blur + \"px)\";\n\t\t\t}\n\t\t}\n\n\t\tif (this.isDirty(\"saturate\")) {\n\t\t\tconst saturate = this.get(\"saturate\", 1);\n\t\t\tif (saturate != 1) {\n\t\t\t\tfilter += \" saturate(\" + saturate + \")\";\n\t\t\t}\n\t\t}\n\n\t\tif (this.isDirty(\"brightness\")) {\n\t\t\tconst brightness = this.get(\"brightness\", 1);\n\t\t\tif (brightness != 1) {\n\t\t\t\tfilter += \" brightness(\" + brightness + \")\";\n\t\t\t}\n\t\t}\n\n\t\tif (this.isDirty(\"contrast\")) {\n\t\t\tconst contrast = this.get(\"contrast\", 1);\n\t\t\tif (contrast != 1) {\n\t\t\t\tfilter += \" contrast(\" + contrast + \")\";\n\t\t\t}\n\t\t}\n\n\t\tif (this.isDirty(\"sepia\")) {\n\t\t\tconst sepia = this.get(\"sepia\", 0);\n\t\t\tif (sepia != 0) {\n\t\t\t\tfilter += \" sepia(\" + sepia + \")\";\n\t\t\t}\n\t\t}\n\n\t\tif (this.isDirty(\"hue\")) {\n\t\t\tconst hue = this.get(\"hue\", 0);\n\t\t\tif (hue != 0) {\n\t\t\t\tfilter += \" hue-rotate(\" + hue + \"deg)\";\n\t\t\t}\n\t\t}\n\n\t\tif (this.isDirty(\"invert\")) {\n\t\t\tconst invert = this.get(\"invert\", 0);\n\t\t\tif (invert != 0) {\n\t\t\t\tfilter += \" invert(\" + invert + \")\";\n\t\t\t}\n\t\t}\n\n\n\t\tif (filter) {\n\t\t\tdisplay.filter = filter;\n\t\t}\n\n\t\tif (this.isDirty(\"cursorOverStyle\")) {\n\t\t\tdisplay.cursorOverStyle = this.get(\"cursorOverStyle\");\n\t\t}\n\n\t\tif (this.isDirty(\"hoverOnFocus\")) {\n\t\t\tif (this.get(\"hoverOnFocus\")) {\n\t\t\t\tthis._focusDp = new MultiDisposer([\n\t\t\t\t\tevents.on(\"focus\", () => {\n\t\t\t\t\t\t// TODO: proper hover, not just tooltip\n\t\t\t\t\t\tthis.showTooltip();\n\t\t\t\t\t}),\n\n\t\t\t\t\tevents.on(\"blur\", () => {\n\t\t\t\t\t\t// TODO: proper hover, not just tooltip\n\t\t\t\t\t\tthis.hideTooltip();\n\t\t\t\t\t})]);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (this._focusDp) {\n\t\t\t\t\tthis._focusDp.dispose();\n\t\t\t\t\tthis._focusDp = undefined;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (this.isDirty(\"focusable\")) {\n\t\t\tif (this.get(\"focusable\")) {\n\t\t\t\tthis._root._registerTabindexOrder(this);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis._root._unregisterTabindexOrder(this);\n\t\t\t}\n\t\t\tthis.markDirtyAccessibility();\n\t\t\tthis._disposers.push(events.on(\"blur\", () => {\n\t\t\t\tthis.setPrivateRaw(\"touchHovering\", false);\n\t\t\t}));\n\t\t}\n\n\t\tif (this.isPrivateDirty(\"focusable\")) {\n\t\t\tthis.markDirtyAccessibility();\n\t\t}\n\n\t\tif (this.isDirty(\"role\") || this.isDirty(\"ariaLive\") || this.isDirty(\"ariaChecked\") || this.isDirty(\"ariaHidden\") || this.isDirty(\"ariaOrientation\") || this.isDirty(\"ariaValueNow\") || this.isDirty(\"ariaValueMin\") || this.isDirty(\"ariaValueMax\") || this.isDirty(\"ariaValueText\") || this.isDirty(\"ariaLabel\") || this.isDirty(\"ariaControls\")) {\n\t\t\t// display.accessibility.ariaLabel = populateString(this, this.get(\"ariaLabel\", \"\"));\n\t\t\t// @todo make sure ariaLabel gets populated in Root\n\t\t\tthis.markDirtyAccessibility();\n\t\t}\n\n\t\tif (this.isDirty(\"exportable\")) {\n\t\t\tdisplay.exportable = this.get(\"exportable\");\n\t\t}\n\n\t\tif (this.isDirty(\"interactive\")) {\n\t\t\tconst events = this.events;\n\t\t\tif (this.get(\"interactive\") && !events.isDisposed()) {\n\t\t\t\tthis._hoverDp = new MultiDisposer([\n\t\t\t\t\tevents.on(\"click\", (ev) => {\n\t\t\t\t\t\tif ($utils.isTouchEvent(ev.originalEvent)) {\n\t\t\t\t\t\t\tif (!this.getPrivate(\"touchHovering\")) {\n\t\t\t\t\t\t\t\tthis.setTimeout(() => {\n\t\t\t\t\t\t\t\t\tthis._handleOver();\n\t\t\t\t\t\t\t\t\tif (this.get(\"tooltipText\") || this.get(\"tooltipHTML\")) {\n\t\t\t\t\t\t\t\t\t\tthis.showTooltip();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tthis.setPrivateRaw(\"touchHovering\", true);\n\t\t\t\t\t\t\t\t\tthis.events.dispatch(\"pointerover\", {\n\t\t\t\t\t\t\t\t\t\ttype: \"pointerover\",\n\t\t\t\t\t\t\t\t\t\ttarget: ev.target,\n\t\t\t\t\t\t\t\t\t\toriginalEvent: ev.originalEvent,\n\t\t\t\t\t\t\t\t\t\tpoint: ev.point,\n\t\t\t\t\t\t\t\t\t\tsimulated: ev.simulated\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t}, 10)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}),\n\n\t\t\t\t\tevents.on(\"globalpointerup\", (ev) => {\n\t\t\t\t\t\tif ($utils.isTouchEvent(ev.originalEvent)) {\n\t\t\t\t\t\t\tif (this.getPrivate(\"touchHovering\")) {\n\t\t\t\t\t\t\t\tthis._handleOut();\n\t\t\t\t\t\t\t\tif (this.get(\"tooltipText\") || this.get(\"tooltipHTML\")) {\n\t\t\t\t\t\t\t\t\tthis.hideTooltip();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tthis.setPrivateRaw(\"touchHovering\", false);\n\t\t\t\t\t\t\t\tthis.events.dispatch(\"pointerout\", {\n\t\t\t\t\t\t\t\t\ttype: \"pointerout\",\n\t\t\t\t\t\t\t\t\ttarget: ev.target,\n\t\t\t\t\t\t\t\t\toriginalEvent: ev.originalEvent,\n\t\t\t\t\t\t\t\t\tpoint: ev.point,\n\t\t\t\t\t\t\t\t\tsimulated: ev.simulated\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (this._isDown) {\n\t\t\t\t\t\t\tthis._handleUp(ev);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//this._isDown = false;\n\t\t\t\t\t}),\n\n\t\t\t\t\tevents.on(\"pointerover\", () => {\n\t\t\t\t\t\tthis._handleOver();\n\t\t\t\t\t}),\n\n\t\t\t\t\tevents.on(\"pointerout\", () => {\n\t\t\t\t\t\tthis._handleOut();\n\t\t\t\t\t}),\n\n\t\t\t\t\tevents.on(\"pointerdown\", (e) => {\n\t\t\t\t\t\tthis._handleDown(e);\n\t\t\t\t\t})\n\t\t\t\t])\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis._display.interactive = false;\n\t\t\t\tif (this._hoverDp) {\n\t\t\t\t\tthis._hoverDp.dispose();\n\t\t\t\t\tthis._hoverDp = undefined;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (this.isDirty(\"forceInactive\")) {\n\t\t\tthis._display.inactive = this.get(\"forceInactive\", null);\n\t\t}\n\n\t\tif (this.get(\"showTooltipOn\") == \"always\" && this._display.visible) {\n\t\t\tthis.showTooltip();\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t * @todo should this be user-accessible?\n\t */\n\tpublic dragStart(e: ISpritePointerEvent) {\n\t\tthis._dragEvent = e;\n\t\tthis.events.stopParentDispatch();\n\t}\n\n\t/**\n\t * @ignore\n\t * @todo should this be user-accessible?\n\t */\n\tpublic dragStop(e: ISpritePointerEvent) {\n\t\tthis._dragEvent = undefined;\n\t\tthis._dragPoint = undefined;\n\t\tthis.events.stopParentDispatch();\n\n\t\tif (this._isDragging) {\n\t\t\tthis._isDragging = false;\n\n\t\t\tconst type = \"dragstop\";\n\t\t\tif (this.events.isEnabled(type)) {\n\t\t\t\tthis.events.dispatch(type, {\n\t\t\t\t\ttype: type,\n\t\t\t\t\ttarget: this,\n\t\t\t\t\toriginalEvent: e.originalEvent,\n\t\t\t\t\tpoint: e.point,\n\t\t\t\t\tsimulated: e.simulated,\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected _handleOver() {\n\t\tif (!this.isHidden()) {\n\t\t\tif (this.get(\"active\") && this.states.lookup(\"hoverActive\")) {\n\t\t\t\tthis.states.applyAnimate(\"hoverActive\");\n\t\t\t}\n\t\t\telse if (this.get(\"disabled\") && this.states.lookup(\"hoverDisabled\")) {\n\t\t\t\tthis.states.applyAnimate(\"hoverDisabled\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.states.applyAnimate(\"hover\");\n\t\t\t}\n\t\t\tif (this.get(\"draggable\") && this._isDown && this.states.lookup(\"down\")) {\n\t\t\t\tthis.states.applyAnimate(\"down\");\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected _handleOut() {\n\t\tif (!this.isHidden()) {\n\t\t\tif (this.get(\"active\") && this.states.lookup(\"active\")) {\n\t\t\t\tthis.states.applyAnimate(\"active\");\n\t\t\t}\n\t\t\telse if (this.get(\"disabled\") && this.states.lookup(\"disabled\")) {\n\t\t\t\tthis.states.applyAnimate(\"disabled\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (this.states.lookup(\"hover\") || this.states.lookup(\"hoverActive\")) {\n\t\t\t\t\tthis.states.applyAnimate(\"default\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (this.get(\"draggable\") && this._isDown && this.states.lookup(\"down\")) {\n\t\t\t\tthis.states.applyAnimate(\"down\");\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected _handleUp(e: ISpritePointerEvent) {\n\t\tif (!this.isHidden()) {\n\t\t\tif (this.get(\"active\") && this.states.lookup(\"active\")) {\n\t\t\t\tthis.states.applyAnimate(\"active\");\n\t\t\t}\n\t\t\telse if (this.get(\"disabled\") && this.states.lookup(\"disabled\")) {\n\t\t\t\tthis.states.applyAnimate(\"disabled\");\n\t\t\t}\n\t\t\telse if (this.states.lookup(\"down\")) {\n\t\t\t\tif (this.isHover()) {\n\t\t\t\t\tthis.states.applyAnimate(\"hover\");\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthis.states.applyAnimate(\"default\");\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t\t// @todo remove this once migrated to _downPoints\n\t\t\tthis._downPoint = undefined;\n\n\t\t\tconst pointerId = $utils.getPointerId(e.originalEvent);\n\t\t\tdelete this._downPoints[pointerId];\n\n\t\t\tif ($object.keys(this._downPoints).length == 0) {\n\t\t\t\tthis._isDown = false;\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic _hasMoved(e: ISpritePointerEvent): boolean {\n\t\t// @todo remove this once migrated to _downPoints\n\t\t// if (this._downPoint) {\n\t\t// \tconst x = Math.abs(this._downPoint.x - e.point.x);\n\t\t// \tconst y = Math.abs(this._downPoint.y - e.point.y);\n\t\t// \treturn (x > 5) || (y > 5);\n\t\t// }\n\n\t\tconst pointerId = $utils.getPointerId(e.originalEvent);\n\t\tconst downPoint = this._downPoints[pointerId];\n\t\tif (downPoint) {\n\t\t\tconst x = Math.abs(downPoint.x - e.point.x);\n\t\t\tconst y = Math.abs(downPoint.y - e.point.y);\n\t\t\treturn (x > 5) || (y > 5);\n\t\t}\n\n\t\treturn false;\n\t}\n\n\tpublic _hasDown(): boolean {\n\t\treturn $object.keys(this._downPoints).length > 0;\n\t}\n\n\tprotected _handleDown(e: ISpritePointerEvent) {\n\n\t\tconst parent = this.parent;\n\t\tif (parent && !this.get(\"draggable\")) {\n\t\t\tparent._handleDown(e);\n\t\t}\n\n\t\tif (this.get(\"interactive\") && !this.isHidden()) {\n\t\t\tif (this.states.lookup(\"down\")) {\n\t\t\t\tthis.states.applyAnimate(\"down\");\n\t\t\t}\n\t\t\tthis._downPoint = {\n\t\t\t\tx: e.point.x,\n\t\t\t\ty: e.point.y\n\t\t\t};\n\n\n\t\t\t// @todo remove this once migrated to _downPoints\n\t\t\tthis._isDown = true;\n\n\t\t\tconst pointerId = $utils.getPointerId(e.originalEvent);\n\t\t\tthis._downPoints[pointerId] = {\n\t\t\t\tx: e.point.x,\n\t\t\t\ty: e.point.y\n\t\t\t};\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t * @todo should this be user-accessible?\n\t */\n\tpublic dragMove(e: ISpritePointerEvent) {\n\t\tlet dragEvent = this._dragEvent;\n\n\t\tif (dragEvent) {\n\n\t\t\tif (dragEvent.simulated && !e.simulated) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tlet angle = 0;\n\n\t\t\tlet parent = this.parent;\n\t\t\tlet scale = 1;\n\n\t\t\twhile (parent != null) {\n\t\t\t\tangle += parent.get(\"rotation\", 0);\n\t\t\t\tparent = parent.parent;\n\t\t\t\tif (parent) {\n\t\t\t\t\tscale *= parent.get(\"scale\", 1);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tlet x = (e.point.x - dragEvent.point.x) / scale;\n\t\t\tlet y = (e.point.y - dragEvent.point.y) / scale;\n\n\t\t\tconst events = this.events;\n\n\t\t\tif (dragEvent.simulated && !this._isDragging) {\n\t\t\t\tthis._isDragging = true;\n\t\t\t\tthis._dragEvent = e;\n\n\t\t\t\tthis._dragPoint = {\n\t\t\t\t\tx: this.x(),\n\t\t\t\t\ty: this.y()\n\t\t\t\t};\n\n\t\t\t\tconst type = \"dragstart\";\n\t\t\t\tif (events.isEnabled(type)) {\n\t\t\t\t\tevents.dispatch(type, {\n\t\t\t\t\t\ttype: type,\n\t\t\t\t\t\ttarget: this,\n\t\t\t\t\t\toriginalEvent: e.originalEvent,\n\t\t\t\t\t\tpoint: e.point,\n\t\t\t\t\t\tsimulated: e.simulated,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (this._isDragging) {\n\t\t\t\tlet dragPoint = this._dragPoint!;\n\n\t\t\t\tthis.set(\"x\", dragPoint.x + x * $math.cos(angle) + y * $math.sin(angle));\n\t\t\t\tthis.set(\"y\", dragPoint.y + y * $math.cos(angle) - x * $math.sin(angle));\n\n\t\t\t\tconst type = \"dragged\";\n\t\t\t\tif (events.isEnabled(type)) {\n\t\t\t\t\tevents.dispatch(type, {\n\t\t\t\t\t\ttype: type,\n\t\t\t\t\t\ttarget: this,\n\t\t\t\t\t\toriginalEvent: e.originalEvent,\n\t\t\t\t\t\tpoint: e.point,\n\t\t\t\t\t\tsimulated: e.simulated,\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tif (Math.hypot(x, y) > 5) {\n\t\t\t\t\tthis._isDragging = true;\n\t\t\t\t\tthis._dragEvent = e;\n\n\t\t\t\t\tthis._dragPoint = {\n\t\t\t\t\t\tx: this.x(),\n\t\t\t\t\t\ty: this.y()\n\t\t\t\t\t};\n\n\t\t\t\t\tconst type = \"dragstart\";\n\t\t\t\t\tif (events.isEnabled(type)) {\n\t\t\t\t\t\tevents.dispatch(type, {\n\t\t\t\t\t\t\ttype: type,\n\t\t\t\t\t\t\ttarget: this,\n\t\t\t\t\t\t\toriginalEvent: e.originalEvent,\n\t\t\t\t\t\t\tpoint: e.point,\n\t\t\t\t\t\t\tsimulated: e.simulated\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic _updateSize() {\n\n\t}\n\n\tpublic _getBounds() {\n\t\tthis._localBounds = this._display.getLocalBounds();\n\t}\n\n\t/**\n\t * Returns depth (how deep in the hierachy of the content tree) of this\n\t * element.\n\t *\n\t * @return Depth\n\t */\n\tpublic depth(): number {\n\t\tlet self: Container | undefined = this.parent;\n\t\tlet depth = 0;\n\n\t\twhile (true) {\n\t\t\tif (self) {\n\t\t\t\t++depth;\n\t\t\t\tself = self.parent;\n\n\t\t\t} else {\n\t\t\t\treturn depth;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic markDirtySize(): void {\n\t\tthis._sizeDirty = true;\n\t\tthis.markDirty();\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic markDirtyBounds(): void {\n\t\tconst display = this._display;\n\t\tif (this.get(\"isMeasured\")) {\n\t\t\tthis._root._addDirtyBounds(this);\n\t\t\tdisplay.isMeasured = true;\n\t\t\tdisplay.invalidateBounds();\n\n\t\t\tconst parent = this.parent;\n\n\t\t\tif (parent && this.get(\"position\") != \"absolute\") {\n\t\t\t\tif (parent.get(\"width\") == null || parent.get(\"height\") == null || parent.get(\"layout\")) {\n\t\t\t\t\tparent.markDirtyBounds();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (this.get(\"focusable\") && this.isFocus()) {\n\t\t\t\tthis.markDirtyAccessibility();\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic markDirtyAccessibility(): void {\n\t\t//if (this._root.focused(this)) {\n\t\tthis._root._invalidateAccessibility(this);\n\t\t//}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic markDirtyLayer() {\n\t\t//this._display.markDirtyLayer(this.isDirty(\"opacity\") || this.isDirty(\"visible\")); https://codepen.io/team/amcharts/pen/gOWZPmP <- problems\n\t\tthis._display.markDirtyLayer(true);\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic markDirty() {\n\t\tsuper.markDirty();\n\t\tthis.markDirtyLayer();\n\t}\n\n\tpublic _updateBounds() {\n\t\tconst oldBounds = this._adjustedLocalBounds;\n\n\t\tlet newBounds: IBounds;\n\n\t\t// if display.visible == false, it still returns bounds\n\t\tif (!this.get(\"visible\") || !this.getPrivate(\"visible\") || this.get(\"forceHidden\")) {\n\t\t\tnewBounds = {\n\t\t\t\tleft: 0,\n\t\t\t\tright: 0,\n\t\t\t\ttop: 0,\n\t\t\t\tbottom: 0\n\t\t\t};\n\t\t\tthis._localBounds = newBounds;\n\t\t\tthis._adjustedLocalBounds = newBounds;\n\t\t}\n\t\telse {\n\t\t\tthis._getBounds();\n\t\t\tthis._fixMinBounds(this._localBounds);\n\t\t\tthis.updatePivotPoint();\n\t\t\tthis._adjustedLocalBounds = this._display.getAdjustedBounds(this._localBounds);\n\t\t\tnewBounds = this._adjustedLocalBounds!;\n\t\t}\n\n\t\tif (!oldBounds || (oldBounds.left !== newBounds.left || oldBounds.top !== newBounds.top || oldBounds.right !== newBounds.right || oldBounds.bottom !== newBounds.bottom)) {\n\t\t\tconst eventType = \"boundschanged\";\n\t\t\tif (this.events.isEnabled(eventType)) {\n\t\t\t\tthis.events.dispatch(eventType, { type: eventType, target: this });\n\t\t\t}\n\t\t\tif (this.parent) {\n\t\t\t\tthis.parent.markDirty();\n\t\t\t\tthis.parent.markDirtyBounds();\n\t\t\t}\n\n\t\t\t// Update tooltip position together with the Sprite\n\t\t\tif (this.getPrivate(\"showingTooltip\")) {\n\t\t\t\tthis.showTooltip();\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic _fixMinBounds(bounds: IBounds) {\n\t\tlet minWidth = this.get(\"minWidth\", this.getPrivate(\"minWidth\"));\n\t\tlet minHeight = this.get(\"minHeight\", this.getPrivate(\"minHeight\"));\n\n\t\tif ($type.isNumber(minWidth)) {\n\t\t\tif (bounds.right - bounds.left < minWidth) {\n\t\t\t\tbounds.right = bounds.left + minWidth;\n\t\t\t}\n\t\t}\n\n\t\tif ($type.isNumber(minHeight)) {\n\t\t\tif (bounds.bottom - bounds.top < minHeight) {\n\t\t\t\tbounds.bottom = bounds.top + minHeight;\n\t\t\t}\n\t\t}\n\n\t\tlet privateWidth = this.getPrivate(\"width\");\n\t\tlet privateHeight = this.getPrivate(\"height\");\n\n\t\tif ($type.isNumber(privateWidth)) {\n\t\t\tif (privateWidth > 0) {\n\t\t\t\tbounds.right = bounds.left + privateWidth;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tbounds.left = bounds.right + privateWidth;\n\t\t\t}\n\t\t}\n\n\t\tif ($type.isNumber(privateHeight)) {\n\t\t\tif (privateHeight > 0) {\n\t\t\t\tbounds.bottom = bounds.top + privateHeight;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tbounds.top = bounds.bottom + privateHeight;\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected _removeParent(parent: Container | undefined) {\n\t\tif (parent) {\n\t\t\tparent.children.removeValue(this);\n\t\t\t$array.removeFirst(parent._percentageSizeChildren, this);\n\t\t\t$array.removeFirst(parent._percentagePositionChildren, this);\n\t\t}\n\t}\n\n\tpublic _clearDirty() {\n\t\tsuper._clearDirty();\n\t\tthis._sizeDirty = false;\n\t\tthis._statesHandled = false;\n\t}\n\n\t/**\n\t * Simulate hover over element.\n\t */\n\tpublic hover() {\n\t\tif (!this.isDisposed()) {\n\t\t\tthis.showTooltip();\n\t\t\tthis._handleOver();\n\t\t}\n\t}\n\n\t/**\n\t * Simulate unhover over element.\n\t */\n\tpublic unhover(): void {\n\t\tif (!this.isDisposed()) {\n\t\t\tthis.hideTooltip();\n\t\t\tthis._handleOut();\n\t\t}\n\t}\n\n\t/**\n\t * Shows element's [[Tooltip]].\n\t */\n\tpublic showTooltip(point?: IPoint): Promise<void> | undefined {\n\t\tif (!this.isDisposed()) {\n\t\t\tconst tooltip = this.getTooltip();\n\t\t\tconst tooltipText = this.get(\"tooltipText\");\n\t\t\tconst tooltipHTML = this.get(\"tooltipHTML\");\n\n\t\t\tif ((tooltipText || tooltipHTML) && tooltip) {\n\t\t\t\tconst tooltipPosition = this.get(\"tooltipPosition\");\n\t\t\t\tconst tooltipTarget = this.getPrivate(\"tooltipTarget\", this);\n\n\t\t\t\tif (tooltipPosition == \"fixed\" || !point) {\n\t\t\t\t\tthis._display._setMatrix();\n\t\t\t\t\tpoint = this.toGlobal(tooltipTarget._getTooltipPoint());\n\t\t\t\t}\n\n\t\t\t\ttooltip.set(\"pointTo\", point);\n\t\t\t\ttooltip.set(\"tooltipTarget\", tooltipTarget);\n\n\t\t\t\tif (!tooltip.get(\"x\")) {\n\t\t\t\t\ttooltip.set(\"x\", point.x);\n\t\t\t\t}\n\t\t\t\tif (!tooltip.get(\"y\")) {\n\t\t\t\t\ttooltip.set(\"y\", point.y);\n\t\t\t\t}\n\n\t\t\t\tif (tooltipText) {\n\t\t\t\t\ttooltip.label.set(\"text\", tooltipText);\n\t\t\t\t}\n\t\t\t\tif (tooltipHTML) {\n\t\t\t\t\ttooltip.label.set(\"html\", tooltipHTML);\n\t\t\t\t}\n\t\t\t\tconst dataItem = this.dataItem;\n\t\t\t\tif (dataItem) {\n\t\t\t\t\ttooltip.label._setDataItem(dataItem);\n\t\t\t\t}\n\n\t\t\t\tif (this.get(\"showTooltipOn\") == \"always\" && (point.x < 0 || point.x > this._root.width() || point.y < 0 || point.y > this._root.height())) {\n\t\t\t\t\tthis.hideTooltip();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\ttooltip.label.text.markDirtyText();\n\t\t\t\tconst promise = tooltip.show();\n\t\t\t\tthis.setPrivateRaw(\"showingTooltip\", true);\n\t\t\t\treturn promise;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Hides element's [[Tooltip]].\n\t */\n\tpublic hideTooltip(): Promise<void> | undefined {\n\t\tconst tooltip = this.getTooltip();\n\t\tif (tooltip) {\n\t\t\tif (tooltip.get(\"tooltipTarget\") == this.getPrivate(\"tooltipTarget\", this) || this.get(\"tooltip\") == tooltip) {\n\t\t\t\tlet timeout = tooltip.get(\"keepTargetHover\") && tooltip.get(\"stateAnimationDuration\", 0) == 0 ? 400 : undefined;\n\t\t\t\tconst promise = tooltip.hide(timeout);\n\t\t\t\tthis.setPrivateRaw(\"showingTooltip\", false);\n\t\t\t\treturn promise;\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic _getTooltipPoint(): IPoint {\n\t\tconst bounds = this._localBounds!;\n\n\t\tif (bounds) {\n\t\t\tlet x = 0;\n\t\t\tlet y = 0;\n\n\t\t\tif (!this.get(\"isMeasured\")) {\n\t\t\t\tx = $utils.relativeToValue(this.get(\"tooltipX\", 0), this.width());\n\t\t\t\ty = $utils.relativeToValue(this.get(\"tooltipY\", 0), this.height());\n\t\t\t}\n\t\t\telse {\n\t\t\t\tx = bounds.left + $utils.relativeToValue(this.get(\"tooltipX\", 0), bounds.right - bounds.left);\n\t\t\t\ty = bounds.top + $utils.relativeToValue(this.get(\"tooltipY\", 0), bounds.bottom - bounds.top);\n\t\t\t}\n\n\t\t\treturn { x, y };\n\t\t}\n\t\treturn { x: 0, y: 0 };\n\t}\n\n\t/**\n\t * Returns [[Tooltip]] used for this element.\n\t *\n\t * @return Tooltip\n\t */\n\tpublic getTooltip(): Tooltip | undefined {\n\t\tlet tooltip = this.get(\"tooltip\");\n\t\tif (!tooltip) {\n\t\t\tlet parent = this.parent;\n\t\t\tif (parent) {\n\t\t\t\treturn parent.getTooltip();\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\treturn tooltip;\n\t\t}\n\t}\n\n\tpublic _updatePosition() {\n\n\t\tconst parent = this.parent;\n\n\t\tlet dx = this.get(\"dx\", 0);\n\t\tlet dy = this.get(\"dy\", 0);\n\n\t\tlet x = this.get(\"x\");\n\t\tlet _x = this.getPrivate(\"x\");\n\n\t\tlet xx = 0;\n\t\tlet yy = 0;\n\n\t\tconst position = this.get(\"position\");\n\n\t\tif (x instanceof Percent) {\n\t\t\tif (parent) {\n\t\t\t\tx = parent.innerWidth() * x.value + parent.get(\"paddingLeft\", 0);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tx = 0;\n\t\t\t}\n\t\t}\n\t\tif ($type.isNumber(x)) {\n\t\t\txx = x + dx;\n\t\t}\n\t\telse {\n\t\t\tif (_x != null) {\n\t\t\t\txx = _x;\n\t\t\t}\n\t\t\telse if (parent) {\n\t\t\t\tif (position == \"relative\") {\n\t\t\t\t\txx = parent.get(\"paddingLeft\", 0) + dx;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\t\tlet y = this.get(\"y\");\n\t\tlet _y = this.getPrivate(\"y\");\n\n\t\tif (y instanceof Percent) {\n\t\t\tif (parent) {\n\t\t\t\ty = parent.innerHeight() * y.value + parent.get(\"paddingTop\", 0);\n\t\t\t}\n\t\t\telse {\n\t\t\t\ty = 0;\n\t\t\t}\n\t\t}\n\t\tif ($type.isNumber(y)) {\n\t\t\tyy = y + dy;\n\t\t}\n\t\telse {\n\t\t\tif (_y != null) {\n\t\t\t\tyy = _y;\n\t\t\t}\n\t\t\telse if (parent) {\n\t\t\t\tif (position == \"relative\") {\n\t\t\t\t\tyy = parent.get(\"paddingTop\", 0) + dy;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst display = this._display;\n\n\t\tif (display.x != xx || display.y != yy) {\n\t\t\tdisplay.invalidateBounds();\n\t\t\tdisplay.x = xx;\n\t\t\tdisplay.y = yy;\n\n\t\t\tconst eventType = \"positionchanged\";\n\t\t\tif (this.events.isEnabled(eventType)) {\n\t\t\t\tthis.events.dispatch(eventType, { type: eventType, target: this });\n\t\t\t}\n\t\t}\n\n\t\t// Update tooltip position together with the Sprite\n\t\tif (this.getPrivate(\"showingTooltip\")) {\n\t\t\tthis.showTooltip();\n\t\t}\n\t}\n\n\t/**\n\t * Returns element's actual X position in pixels.\n\t *\n\t * @return X (px)\n\t */\n\tpublic x(): number {\n\t\tlet x = this.get(\"x\");\n\t\tlet _x = this.getPrivate(\"x\");\n\n\t\tconst parent = this.parent;\n\t\tif (parent) {\n\t\t\tif (x instanceof Percent) {\n\t\t\t\treturn $utils.relativeToValue(x, parent.innerWidth()) + parent.get(\"paddingLeft\", 0);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (!$type.isNumber(x)) {\n\t\t\t\t\tif (_x != null) {\n\t\t\t\t\t\treturn _x;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\treturn parent.get(\"paddingLeft\", this._display.x)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\treturn x;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this._display.x;\n\t}\n\n\t/**\n\t * Returns element's actual Y position in pixels.\n\t *\n\t * @return Y (px)\n\t */\n\tpublic y(): number {\n\n\t\tlet _y = this.getPrivate(\"y\");\n\n\t\tif (_y != null) {\n\t\t\treturn _y;\n\t\t}\n\n\t\tlet y = this.get(\"y\");\n\t\tconst parent = this.parent;\n\n\t\tif (parent) {\n\t\t\tif (y instanceof Percent) {\n\t\t\t\treturn $utils.relativeToValue(y, parent.innerHeight()) + parent.get(\"paddingTop\", 0);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (!$type.isNumber(y)) {\n\t\t\t\t\tif (_y != null) {\n\t\t\t\t\t\treturn _y;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\treturn parent.get(\"paddingTop\", this._display.y)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\treturn y;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this._display.y;\n\t}\n\n\tprotected _dispose() {\n\t\tsuper._dispose();\n\t\tthis._display.dispose();\n\t\tthis._removeTemplateField();\n\t\tthis._removeParent(this.parent);\n\t\tthis._root._removeFocusElement(this);\n\n\t\tconst tooltip = this.get(\"tooltip\");\n\t\tif (tooltip) {\n\t\t\ttooltip.dispose();\n\t\t}\n\n\t\tthis.markDirty();\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic adjustedLocalBounds(): IBounds {\n\t\tthis._fixMinBounds(this._adjustedLocalBounds);\n\t\treturn this._adjustedLocalBounds;\n\t}\n\n\t/**\n\t * Returns local coordinates of the element's bounds.\n\t *\n\t * @ignore\n\t * @return Global bounds\n\t */\n\tpublic localBounds(): IBounds {\n\t\treturn this._localBounds;\n\t}\n\n\t/**\n\t * Returns adjusted local coordinates of the element's bounds.\n\t *\n\t * @ignore\n\t * @return Global bounds\n\t */\n\tpublic bounds(): IBounds {\n\t\tconst bounds = this._adjustedLocalBounds;\n\t\tconst x = this.x();\n\t\tconst y = this.y();\n\t\treturn { left: bounds.left + x, right: bounds.right + x, top: bounds.top + y, bottom: bounds.bottom + y };\n\t}\n\n\t/**\n\t * Returns global coordinates of the element's bounds.\n\t *\n\t * @ignore\n\t * @return Global bounds\n\t */\n\tpublic globalBounds(): IBounds {\n\t\tconst bounds = this.localBounds();\n\n\t\tconst p0 = this.toGlobal({ x: bounds.left, y: bounds.top });\n\t\tconst p1 = this.toGlobal({ x: bounds.right, y: bounds.top });\n\t\tconst p2 = this.toGlobal({ x: bounds.right, y: bounds.bottom });\n\t\tconst p3 = this.toGlobal({ x: bounds.left, y: bounds.bottom });\n\n\t\treturn {\n\t\t\tleft: Math.min(p0.x, p1.x, p2.x, p3.x),\n\t\t\ttop: Math.min(p0.y, p1.y, p2.y, p3.y),\n\t\t\tright: Math.max(p0.x, p1.x, p2.x, p3.x),\n\t\t\tbottom: Math.max(p0.y, p1.y, p2.y, p3.y)\n\t\t}\n\t}\n\n\tprotected _onShow(_duration?: number) {\n\n\t}\n\n\tprotected _onHide(_duration?: number) {\n\n\t}\n\n\t/**\n\t * Plays initial reveal animation regardless if element is currently hidden\n\t * or visible.\n\t *\n\t * @param duration Duration of the animation in milliseconds\n\t * @param delay Delay showing of the element by X milliseconds\n\t * @return Promise\n\t */\n\tpublic async appear(duration?: number, delay?: number): Promise<void> {\n\t\tawait this.hide(0);\n\t\tif (delay) {\n\t\t\treturn new Promise<void>((success, _error) => {\n\t\t\t\tthis.setTimeout(() => {\n\t\t\t\t\tsuccess(this.show(duration));\n\t\t\t\t}, delay);\n\t\t\t});\n\n\t\t}\n\t\telse {\n\t\t\treturn this.show(duration);\n\t\t}\n\t}\n\n\t/**\n\t * Shows currently hidden element and returns a `Promise` which completes\n\t * when all showing animations are finished.\n\t *\n\t * ```TypeScript\n\t * series.show().then(function(ev) {\n\t * console.log(\"Series is now fully visible\");\n\t * })\n\t * ```\n\t * ```JavaScript\n\t * series.show().then(function(ev) {\n\t * console.log(\"Series is now fully visible\");\n\t * })\n\t * ```\n\t *\n\t * @return Promise\n\t */\n\tpublic async show(duration?: number): Promise<void> {\n\t\tif (!this._isShowing) {\n\t\t\tthis._isHidden = false;\n\t\t\tthis._isShowing = true;\n\t\t\tthis._isHiding = false;\n\n\t\t\tif (this.states.lookup(\"default\")!.get(\"visible\")) {\n\t\t\t\tthis.set(\"visible\", true);\n\t\t\t}\n\t\t\tthis._onShow(duration);\n\n\t\t\tconst animations = this.states.applyAnimate(\"default\", duration);\n\t\t\tawait waitForAnimations(animations);\n\n\t\t\tthis._isShowing = false;\n\t\t}\n\t}\n\n\t/**\n\t * Hides the element and returns a `Promise` which completes when all hiding\n\t * animations are finished.\n\t *\n\t * ```TypeScript\n\t * series.hide().then(function(ev) {\n\t * console.log(\"Series finished hiding\");\n\t * })\n\t * ```\n\t * ```JavaScript\n\t * series.hide().then(function(ev) {\n\t * console.log(\"Series finished hiding\");\n\t * })\n\t * ```\n\t *\n\t * @return Promise\n\t */\n\tpublic async hide(duration?: number): Promise<void> {\n\t\tif (!this._isHiding && !this._isHidden) {\n\t\t\tthis._isHiding = true;\n\t\t\tthis._isShowing = false;\n\t\t\tlet state = this.states.lookup(\"hidden\");\n\t\t\tif (!state) {\n\t\t\t\tstate = this.states.create(\"hidden\", {\n\t\t\t\t\t\"opacity\": 0,\n\t\t\t\t\t\"visible\": false\n\t\t\t\t});\n\t\t\t}\n\t\t\tthis._isHidden = true;\n\t\t\tthis._onHide(duration);\n\n\t\t\tconst animations = this.states.applyAnimate(\"hidden\", duration);\n\n\t\t\tawait waitForAnimations(animations);\n\n\t\t\tthis._isHiding = false;\n\t\t}\n\t}\n\n\t/**\n\t * Returns `true` if this element is currently hidden.\n\t *\n\t * @return Is hidden?\n\t */\n\tpublic isHidden(): boolean {\n\t\treturn this._isHidden;\n\t}\n\n\t/**\n\t * Returns `true` if this element is currently animating to a default state.\n\t *\n\t * @return Is showing?\n\t */\n\tpublic isShowing(): boolean {\n\t\treturn this._isShowing;\n\t}\n\n\t/**\n\t * Returns `true` if this element is currently animating to a hidden state.\n\t *\n\t * @return Is hiding?\n\t */\n\tpublic isHiding(): boolean {\n\t\treturn this._isHiding;\n\t}\n\n\t/**\n\t * Returns `true` if this element is currently hovered by a pointer.\n\t *\n\t * @return Is hovered?\n\t */\n\tpublic isHover(): boolean {\n\t\treturn this._display.hovering();\n\t}\n\n\t/**\n\t * Returns `true` if this element does currently have focus.\n\t *\n\t * @return Is focused?\n\t */\n\tpublic isFocus(): boolean {\n\t\treturn this._root.focused(this);\n\t}\n\n\t/**\n\t * Returns `true` if this element is currently being dragged.\n\t *\n\t * @return Is dragged?\n\t */\n\tpublic isDragging(): boolean {\n\t\treturn this._isDragging;\n\t}\n\n\t/**\n\t * Returns `false` if if either public or private setting `visible` is set\n\t * to `false`, or `forceHidden` is set to `true`.\n\t *\n\t * @return Visible?\n\t */\n\tpublic isVisible(): boolean {\n\t\tif (this.get(\"visible\") && this.getPrivate(\"visible\") && !this.get(\"forceHidden\")) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\t/**\n\t * Same as `isVisible()`, except it checks all ascendants, too.\n\t *\n\t * @since 5.2.7\n\t * @return Visible?\n\t */\n\tpublic isVisibleDeep(): boolean {\n\t\treturn this._parent ? (this._parent.isVisibleDeep() && this.isVisible()) : this.isVisible();\n\t}\n\n\t/**\n\t * Returns an actual opacity of the element, taking into account all parents.\n\t *\n\t * @return Opacity\n\t * @since 5.2.11\n\t */\n\tpublic compositeOpacity(): number {\n\t\tconst opacity = this.get(\"opacity\", 1);\n\t\treturn this._parent ? (this._parent.compositeOpacity() * opacity) : opacity;\n\t}\n\n\t/**\n\t * Returns an actual scale of the element, taking into account all parents.\n\t *\n\t * @return Opacity\n\t * @since 5.9.2\n\t */\n\tpublic compositeScale(): number {\n\t\tconst scale = this.get(\"scale\", 1);\n\t\treturn this._parent ? (this._parent.compositeScale() * scale) : scale;\n\t}\n\n\t/**\n\t * Returns an actual roation of the element, taking into account all parents.\n\t *\n\t * @return Opacity\n\t * @since 5.9.2\n\t */\n\tpublic compositeRotation(): number {\n\t\tconst rotation = this.get(\"rotation\", 0);\n\t\treturn this._parent ? (this._parent.compositeRotation() + rotation) : rotation;\n\t}\n\n\t/**\n\t * Returns width of this element in pixels.\n\t *\n\t * @return Width (px)\n\t */\n\tpublic width(): number {\n\t\tlet width = this.get(\"width\");\n\t\tlet maxWidth = this.get(\"maxWidth\", this.getPrivate(\"maxWidth\"));\n\t\tlet minWidth = this.get(\"minWidth\", this.getPrivate(\"minWidth\"));\n\t\tlet privateWidth = this.getPrivate(\"width\");\n\t\tlet w = 0;\n\n\t\tif ($type.isNumber(privateWidth)) {\n\t\t\tw = privateWidth;\n\t\t}\n\t\telse {\n\t\t\tif (width == null) {\n\t\t\t\tif (this._adjustedLocalBounds) {\n\t\t\t\t\tw = this._adjustedLocalBounds.right - this._adjustedLocalBounds.left;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (width instanceof Percent) {\n\t\t\t\t\tconst parent = this.parent;\n\t\t\t\t\tif (parent) {\n\t\t\t\t\t\tw = parent.innerWidth() * width.value;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tw = this._root.width() * width.value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if ($type.isNumber(width)) {\n\t\t\t\t\tw = width;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ($type.isNumber(minWidth)) {\n\t\t\tw = Math.max(minWidth, w);\n\t\t}\n\t\tif ($type.isNumber(maxWidth)) {\n\t\t\tw = Math.min(maxWidth, w);\n\t\t}\n\n\t\treturn w;\n\t}\n\n\t/**\n\t * Returns maximum allowed width of this element in pixels.\n\t *\n\t * @return Maximum width (px)\n\t */\n\tpublic maxWidth(): number {\n\t\tlet maxWidth = this.get(\"maxWidth\", this.getPrivate(\"maxWidth\"));\n\t\tif ($type.isNumber(maxWidth)) {\n\t\t\treturn maxWidth;\n\t\t}\n\t\telse {\n\t\t\tlet width = this.get(\"width\")\n\t\t\tif ($type.isNumber(width)) {\n\t\t\t\treturn width;\n\t\t\t}\n\t\t}\n\t\tconst parent = this.parent;\n\t\tif (parent) {\n\t\t\treturn parent.innerWidth();\n\t\t}\n\t\treturn this._root.width();\n\t}\n\n\t/**\n\t * Returns maximum allowed height of this element in pixels.\n\t *\n\t * @return Maximum height (px)\n\t */\n\tpublic maxHeight(): number {\n\t\tlet maxHeight = this.get(\"maxHeight\", this.getPrivate(\"maxHeight\"));\n\t\tif ($type.isNumber(maxHeight)) {\n\t\t\treturn maxHeight;\n\t\t}\n\t\telse {\n\t\t\tlet height = this.get(\"height\")\n\t\t\tif ($type.isNumber(height)) {\n\t\t\t\treturn height;\n\t\t\t}\n\t\t}\n\t\tconst parent = this.parent;\n\t\tif (parent) {\n\t\t\treturn parent.innerHeight();\n\t\t}\n\t\treturn this._root.height();\n\t}\n\n\t/**\n\t * Returns height of this element in pixels.\n\t *\n\t * @return Height (px)\n\t */\n\tpublic height(): number {\n\t\tlet height = this.get(\"height\");\n\t\tlet maxHeight = this.get(\"maxHeight\", this.getPrivate(\"maxHeight\"));\n\t\tlet minHeight = this.get(\"minHeight\", this.getPrivate(\"minHeight\"));\n\t\tlet privateHeight = this.getPrivate(\"height\");\n\t\tlet h = 0;\n\n\t\tif ($type.isNumber(privateHeight)) {\n\t\t\th = privateHeight;\n\t\t}\n\t\telse {\n\t\t\tif (height == null) {\n\t\t\t\tif (this._adjustedLocalBounds) {\n\t\t\t\t\th = this._adjustedLocalBounds.bottom - this._adjustedLocalBounds.top;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (height instanceof Percent) {\n\t\t\t\t\tconst parent = this.parent;\n\t\t\t\t\tif (parent) {\n\t\t\t\t\t\th = parent.innerHeight() * height.value;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\th = this._root.height() * height.value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if ($type.isNumber(height)) {\n\t\t\t\t\th = height;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ($type.isNumber(minHeight)) {\n\t\t\th = Math.max(minHeight, h);\n\t\t}\n\t\tif ($type.isNumber(maxHeight)) {\n\t\t\th = Math.min(maxHeight, h);\n\t\t}\n\n\t\treturn h;\n\t}\n\n\tprotected _findStaticTemplate(f: (template: Template<this>) => boolean): Template<this> | undefined {\n\t\t// templateField overrides template\n\t\tif (this._templateField && f(this._templateField)) {\n\t\t\treturn this._templateField;\n\t\t}\n\n\t\treturn super._findStaticTemplate(f);\n\t}\n\n\tpublic _walkParents(f: (parent: Sprite) => void): void {\n\t\tif (this._parent) {\n\t\t\tthis._walkParent(f);\n\t\t}\n\t}\n\n\tprotected _walkParent(f: (parent: Sprite) => void): void {\n\t\tif (this._parent) {\n\t\t\tthis._parent._walkParent(f);\n\t\t}\n\n\t\tf(this);\n\t}\n\n\t/**\n\t * Parent [[Container]] of this element.\n\t *\n\t * @return Parent container\n\t */\n\tpublic get parent(): Container | undefined {\n\t\treturn this._parent;\n\t}\n\n\tpublic _setParent(parent: Container, updateChildren: boolean = false) {\n\t\tconst prevParent = this._parent;\n\t\tif (parent !== prevParent) {\n\t\t\tthis.markDirtyBounds();\n\n\t\t\tparent.markDirty();\n\n\t\t\tthis._parent = parent;\n\n\t\t\tif (updateChildren) {\n\t\t\t\tthis._removeParent(prevParent);\n\n\t\t\t\tif (parent) {\n\t\t\t\t\tthis._addPercentageSizeChildren();\n\t\t\t\t\tthis._addPercentagePositionChildren();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.markDirtyPosition();\n\t\t\tthis._applyThemes();\n\t\t}\n\t}\n\n\t/**\n\t * Returns an instance of [[NumberFormatter]] used in this element.\n\t *\n\t * If this element does not have it set, global one form [[Root]] is used.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/using-formatters/} for more info\n\t * @return NumberFormatter instace\n\t */\n\tpublic getNumberFormatter(): NumberFormatter {\n\t\treturn this.get(\"numberFormatter\", this._root.numberFormatter);\n\t}\n\n\t/**\n\t * Returns an instance of [[DateFormatter]] used in this element.\n\t *\n\t * If this element does not have it set, global one form [[Root]] is used.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/using-formatters/} for more info\n\t * @return DateFormatter instace\n\t */\n\tpublic getDateFormatter(): DateFormatter {\n\t\treturn this.get(\"dateFormatter\", this._root.dateFormatter);\n\t}\n\n\t/**\n\t * Returns an instance of [[DurationFormatter]] used in this element.\n\t *\n\t * If this element does not have it set, global one form [[Root]] is used.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/using-formatters/} for more info\n\t * @return DurationFormatter instace\n\t */\n\tpublic getDurationFormatter(): DurationFormatter {\n\t\treturn this.get(\"durationFormatter\", this._root.durationFormatter);\n\t}\n\n\t/**\n\t * Converts X/Y coordinate within this element to a global coordinate.\n\t *\n\t * @param point Local coordinate\n\t * @return Global coordinate\n\t */\n\tpublic toGlobal(point: IPoint): IPoint {\n\t\treturn this._display.toGlobal(point);\n\t}\n\n\t/**\n\t * Converts global X/Y coordinate to a coordinate within this element.\n\t *\n\t * @param point Global coordinate\n\t * @return Local coordinate\n\t */\n\tpublic toLocal(point: IPoint): IPoint {\n\t\treturn this._display.toLocal(point);\n\t}\n\n\tpublic _getDownPoint(): IPoint | undefined {\n\t\tconst id = this._getDownPointId();\n\t\tif (id) {\n\t\t\treturn this._downPoints[id];\n\t\t}\n\n\t}\n\n\tpublic _getDownPointId(): number | undefined {\n\t\tif (this._downPoints) {\n\t\t\treturn $object.keysOrdered(this._downPoints, (a, b) => {\n\t\t\t\tif (a > b) {\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\t\t\t\tif (a < b) {\n\t\t\t\t\treturn -1;\n\t\t\t\t}\n\t\t\t\treturn 0;\n\t\t\t})[0];\n\t\t}\n\t}\n\n\t/**\n\t * Moves sprite to the end of the parent's children array.\n\t *\n\t * Depending on `layout` setting of the parten container, it may effect the\n\t * positioning or overlapping order of the elements.\n\t */\n\tpublic toFront() {\n\t\tconst parent = this.parent;\n\t\tif (parent) {\n\t\t\tparent.children.moveValue(this, parent.children.length - 1);\n\t\t}\n\t}\n\n\t/**\n\t * Moves sprite to the beginning of the parent's children array.\n\t *\n\t * Depending on `layout` setting of the parten container, it may effect the\n\t * positioning or overlapping order of the elements.\n\t */\n\tpublic toBack() {\n\t\tconst parent = this.parent;\n\t\tif (parent) {\n\t\t\tparent.children.moveValue(this, 0);\n\t\t}\n\t}\n\n}\n","import type { Color } from \"../util/Color\";\nimport type { Percent } from \"../util/Percent\";\nimport type { IText } from \"./backend/Renderer\";\nimport type { IBounds } from \"../util/IBounds\";\nimport type { DataItem, IComponentDataItem } from \"./Component\";\nimport type { NumberFormatter } from \"../util/NumberFormatter\";\nimport type { DateFormatter } from \"../util/DateFormatter\";\nimport type { DurationFormatter } from \"../util/DurationFormatter\";\nimport type { Gradient } from \"../render/gradients/Gradient\";\n\nimport { Sprite, ISpriteSettings, ISpritePrivate } from \"./Sprite\";\nimport { populateString } from \"../util/PopulateString\";\n\nimport * as $array from \"../util/Array\";\nimport * as $utils from \"../util/Utils\";\nimport { Disposer } from \"../util/Disposer\";\n\n/**\n * @ignore Text is an internal class. Use Label instead.\n */\nexport interface ITextSettings extends ISpriteSettings {\n\ttext?: string;\n\tfill?: Color;\n\n\t/**\n\t * Fill gradient.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/gradients/} for more information\n\t * @since 5.10.1\n\t */\n\tfillGradient?: Gradient;\n\n\tfillOpacity?: number;\n\ttextAlign?: \"start\" | \"end\" | \"left\" | \"right\" | \"center\";\n\tfontFamily?: string;\n\tfontSize?: string | number;\n\tfontWeight?: \"normal\" | \"bold\" | \"bolder\" | \"lighter\" | \"100\" | \"200\" | \"300\" | \"400\" | \"500\" | \"600\" | \"700\" | \"800\" | \"900\"\n\tfontStyle?: \"normal\" | \"italic\" | \"oblique\";\n\tfontVariant?: \"normal\" | \"small-caps\";\n\ttextDecoration?: \"underline\" | \"line-through\";\n\tshadowColor?: Color | null;\n\tshadowBlur?: number;\n\tshadowOffsetX?: number;\n\tshadowOffsetY?: number;\n\tshadowOpacity?: number;\n\t// leading?: number;\n\t// letterSpacing?: number;\n\tlineHeight?: Percent | number;\n\tbaselineRatio?: number;\n\t// stroke?: number;\n\t// strokeThickness?: number;\n\t// trim?: number;\n\t// wordWrap?: boolean;\n\topacity?: number;\n\tdirection?: \"ltr\" | \"rtl\";\n\ttextBaseline?: \"top\" | \"hanging\" | \"middle\" | \"alphabetic\" | \"ideographic\" | \"bottom\";\n\toversizedBehavior?: \"none\" | \"hide\" | \"fit\" | \"wrap\" | \"wrap-no-break\" | \"truncate\";\n\tbreakWords?: boolean;\n\tellipsis?: string;\n\tminScale?: number;\n\tpopulateText?: boolean;\n\tignoreFormatting?: boolean;\n\tmaxChars?: number;\n}\n\n/**\n * @ignore\n */\nexport interface ITextPrivate extends ISpritePrivate {\n\n\t/**\n\t * @ignore\n\t */\n\ttooltipElement?: HTMLDivElement;\n\n}\n\n/**\n * @ignore Text is an internal class. Use Label instead.\n */\nexport class Text extends Sprite {\n\n\tdeclare public _settings: ITextSettings;\n\tdeclare public _privateSettings: ITextPrivate;\n\n\tpublic textStyle = this._root._renderer.makeTextStyle();\n\n\tpublic _display: IText = this._root._renderer.makeText(\"\", this.textStyle);\n\n\tprotected _textStyles: Array<keyof ITextSettings> = [\n\t\t\"textAlign\",\n\t\t\"fontFamily\",\n\t\t\"fontSize\",\n\t\t\"fontStyle\",\n\t\t\"fontWeight\",\n\t\t\"fontStyle\",\n\t\t\"fontVariant\",\n\t\t\"textDecoration\",\n\t\t\"shadowColor\",\n\t\t\"shadowBlur\",\n\t\t\"shadowOffsetX\",\n\t\t\"shadowOffsetY\",\n\t\t\"shadowOpacity\",\n\t\t// \"leading\",\n\t\t// \"letterSpacing\",\n\t\t\"lineHeight\",\n\t\t\"baselineRatio\",\n\t\t//\"padding\",\n\t\t// \"stroke\",\n\t\t// \"strokeThickness\",\n\t\t// \"trim\",\n\t\t// \"wordWrap\",\n\t\t\"direction\",\n\t\t\"textBaseline\",\n\t\t\"oversizedBehavior\",\n\t\t\"breakWords\",\n\t\t\"ellipsis\",\n\t\t\"minScale\",\n\t\t\"maxChars\"\n\t];\n\n\tprotected _originalScale: number | undefined;\n\n\tpublic static className: string = \"Text\";\n\tpublic static classNames: Array<string> = Sprite.classNames.concat([Text.className]);\n\n\tpublic _updateBounds(): void {\n\t\tif (!this.get(\"text\")) {\n\n\t\t\tlet newBounds: IBounds = {\n\t\t\t\tleft: 0,\n\t\t\t\tright: 0,\n\t\t\t\ttop: 0,\n\t\t\t\tbottom: 0,\n\t\t\t};\n\t\t\tthis._adjustedLocalBounds = newBounds;\n\t\t}\n\t\telse {\n\t\t\tsuper._updateBounds();\n\t\t\tlet fillGradient = this.get(\"fillGradient\");\n\t\t\tif (fillGradient) {\n\t\t\t\tthis._display.style.fill = fillGradient.getFill(this);\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic _changed() {\n\t\tsuper._changed();\n\n\t\tthis._display.clear();\n\n\t\tlet textStyle = <any>this.textStyle;\n\n\t\tif (this.isDirty(\"opacity\")) {\n\t\t\tlet opacity = this.get(\"opacity\", 1);\n\t\t\tthis._display.alpha = opacity;\n\t\t}\n\n\t\tif (this.isDirty(\"text\") || this.isDirty(\"populateText\")) {\n\t\t\tthis._display.text = this._getText();\n\n\t\t\tthis.markDirtyBounds();\n\t\t\tif (this.get(\"role\") == \"tooltip\") {\n\t\t\t\tthis._root.updateTooltip(this);\n\t\t\t}\n\t\t}\n\n\t\tif (this.isPrivateDirty(\"tooltipElement\")) {\n\t\t\tconst tooltipElement = this.getPrivate(\"tooltipElement\");\n\t\t\tif (tooltipElement) {\n\t\t\t\tthis._disposers.push(new Disposer(() => {\n\t\t\t\t\tthis._root._removeTooltipElement(this);\n\t\t\t\t}));\n\t\t\t}\n\t\t}\n\n\t\tif (this.isDirty(\"width\")) {\n\t\t\ttextStyle.wordWrapWidth = this.width();\n\t\t\tthis.markDirtyBounds();\n\t\t}\n\n\t\tif (this.isDirty(\"oversizedBehavior\")) {\n\t\t\ttextStyle.oversizedBehavior = this.get(\"oversizedBehavior\", \"none\");\n\t\t\tthis.markDirtyBounds();\n\t\t}\n\n\t\tif (this.isDirty(\"breakWords\")) {\n\t\t\ttextStyle.breakWords = this.get(\"breakWords\", false);\n\t\t\tthis.markDirtyBounds();\n\t\t}\n\n\t\tif (this.isDirty(\"ellipsis\")) {\n\t\t\ttextStyle.ellipsis = this.get(\"ellipsis\");\n\t\t\tthis.markDirtyBounds();\n\t\t}\n\n\t\tif (this.isDirty(\"ignoreFormatting\")) {\n\t\t\ttextStyle.ignoreFormatting = this.get(\"ignoreFormatting\", false);\n\t\t\tthis.markDirtyBounds();\n\t\t}\n\n\t\tif (this.isDirty(\"minScale\")) {\n\t\t\ttextStyle.minScale = this.get(\"minScale\", 0);\n\t\t\tthis.markDirtyBounds();\n\t\t}\n\n\t\tif (this.isDirty(\"fill\") || this.isDirty(\"fillGradient\")) {\n\t\t\tconst fill = this.get(\"fill\");\n\t\t\tconst fillGradient = this.get(\"fillGradient\");\n\t\t\tconst fillOpacity = this.get(\"fillOpacity\");\n\t\t\tif (fillGradient) {\n\t\t\t\tif (fill) {\n\t\t\t\t\tconst stops = fillGradient.get(\"stops\", []);\n\t\t\t\t\tif (stops.length) {\n\t\t\t\t\t\t$array.each(stops, (stop: any) => {\n\t\t\t\t\t\t\tif ((!stop.color || stop.colorInherited) && fill) {\n\t\t\t\t\t\t\t\tstop.color = fill;\n\t\t\t\t\t\t\t\tstop.colorInherited = true;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (stop.opacity == null || stop.opacityInherited) {\n\t\t\t\t\t\t\t\tstop.opacity = fillOpacity;\n\t\t\t\t\t\t\t\tstop.opacityInherited = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ttextStyle.fill = fillGradient.getFill(this);\n\t\t\t}\n\t\t\telse if (fill) {\n\t\t\t\ttextStyle.fill = fill;\n\t\t\t}\n\t\t}\n\n\t\tif (this.isDirty(\"fillOpacity\")) {\n\t\t\tlet fillOpacity = this.get(\"fillOpacity\", 1);\n\t\t\tif (fillOpacity) {\n\t\t\t\ttextStyle.fillOpacity = fillOpacity;\n\t\t\t}\n\t\t}\n\n\t\tif (this.isDirty(\"maxWidth\") || this.isPrivateDirty(\"maxWidth\")) {\n\t\t\ttextStyle.maxWidth = this.get(\"maxWidth\", this.getPrivate(\"maxWidth\"));\n\t\t\tthis.markDirtyBounds();\n\t\t}\n\n\t\tif (this.isDirty(\"maxHeight\") || this.isPrivateDirty(\"maxHeight\")) {\n\t\t\ttextStyle.maxHeight = this.get(\"maxHeight\", this.getPrivate(\"maxHeight\"));\n\t\t\tthis.markDirtyBounds();\n\t\t}\n\n\t\t$array.each(this._textStyles, (styleName) => {\n\t\t\tif (this._dirty[styleName]) {\n\t\t\t\ttextStyle[styleName] = this.get(styleName);\n\t\t\t\tthis.markDirtyBounds();\n\t\t\t}\n\t\t})\n\n\t\ttextStyle[\"fontSize\"] = this.get(\"fontSize\");\n\t\ttextStyle[\"fontFamily\"] = this.get(\"fontFamily\");\n\t\tthis._display.style = textStyle;\n\n\t\tif (this.isDirty(\"role\") && this.get(\"role\") == \"tooltip\") {\n\t\t\tthis._root.updateTooltip(this);\n\t\t}\n\t}\n\n\tpublic _getText(): string {\n\t\tlet text = this.get(\"text\", \"\");\n\t\tif (this.get(\"maxChars\")) {\n\t\t\ttext = $utils.truncateTextWithEllipsis(text, this.get(\"maxChars\", 100000000), this.get(\"breakWords\"), this.get(\"ellipsis\"));\n\t\t}\n\t\treturn this.get(\"populateText\") ? populateString(this, text) : text;\n\t}\n\n\tpublic _getAccessibleText(): string {\n\t\tconst ariaLabel = this.get(\"ariaLabel\");\n\t\tif (ariaLabel !== undefined) {\n\t\t\treturn this.get(\"populateText\") ? populateString(this, ariaLabel) : ariaLabel;\n\t\t}\n\t\treturn this._getText();\n\t}\n\n\t/**\n\t * Forces the text to be re-evaluated and re-populated.\n\t */\n\tpublic markDirtyText(): void {\n\t\tthis._display.text = this._getText();\n\t\tif (this.get(\"role\") == \"tooltip\") {\n\t\t\tthis._root.updateTooltip(this);\n\t\t}\n\t\tthis.markDirtyBounds();\n\t\tthis.markDirty();\n\t}\n\n\tpublic _setDataItem(dataItem?: DataItem<IComponentDataItem>): void {\n\t\tsuper._setDataItem(dataItem);\n\t\tif (this.get(\"populateText\")) {\n\t\t\tthis.markDirtyText();\n\t\t}\n\t}\n\n\tpublic getNumberFormatter(): NumberFormatter {\n\t\tif (this.parent) {\n\t\t\treturn this.parent.getNumberFormatter();\n\t\t}\n\t\telse {\n\t\t\treturn super.getNumberFormatter();\n\t\t}\n\t}\n\n\tpublic getDateFormatter(): DateFormatter {\n\t\tif (this.parent) {\n\t\t\treturn this.parent.getDateFormatter();\n\t\t}\n\t\telse {\n\t\t\treturn super.getDateFormatter();\n\t\t}\n\t}\n\n\tpublic getDurationFormatter(): DurationFormatter {\n\t\tif (this.parent) {\n\t\t\treturn this.parent.getDurationFormatter();\n\t\t}\n\t\telse {\n\t\t\treturn super.getDurationFormatter();\n\t\t}\n\t}\n}\n","import { Graphics, IGraphicsSettings, IGraphicsPrivate } from \"./Graphics\";\nimport * as $math from \"../util/Math\";\n\nexport interface IPointedRectangleSettings extends IGraphicsSettings {\n\n\t/**\n\t * A width of the pinter's (stem's) thick end (base) in pixels.\n\t */\n\tpointerBaseWidth?: number;\n\n\t/**\n\t * A length of the pinter (stem) in pixels.\n\t */\n\tpointerLength?: number;\n\n\t/**\n\t * X coordinate the shape is pointing to.\n\t */\n\tpointerX?: number;\n\n\t/**\n\t * Y coordinate the shape is pointing to.\n\t */\n\tpointerY?: number;\n\n\t/**\n\t * Corner radius in pixels.\n\t */\n\tcornerRadius?: number;\n}\n\nexport interface IPointedRectanglePrivate extends IGraphicsPrivate {\n}\n\n/**\n * Draws a rectangle with a pointer.\n *\n * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/graphics/} for more info\n * @important\n */\nexport class PointedRectangle extends Graphics {\n\n\tdeclare public _settings: IPointedRectangleSettings;\n\tdeclare public _privateSettings: IPointedRectanglePrivate;\n\n\tpublic static className: string = \"PointedRectangle\";\n\tpublic static classNames: Array<string> = Graphics.classNames.concat([PointedRectangle.className]);\n\n\tpublic _beforeChanged() {\n\t\tsuper._beforeChanged();\n\n\t\tif (this.isDirty(\"pointerBaseWidth\") || this.isDirty(\"cornerRadius\") || this.isDirty(\"pointerLength\") || this.isDirty(\"pointerX\") || this.isDirty(\"pointerY\") || this.isDirty(\"width\") || this.isDirty(\"height\")) {\n\t\t\tthis._clear = true;\n\t\t}\n\t}\n\n\tpublic _changed() {\n\t\tsuper._changed();\n\n\t\tif (this._clear) {\n\n\t\t\tthis.markDirtyBounds();\n\n\t\t\tlet w = this.width();\n\t\t\tlet h = this.height();\n\n\t\t\tif (w > 0 && h > 0) {\n\t\t\t\tlet cr = this.get(\"cornerRadius\", 8);\n\t\t\t\tcr = $math.fitToRange(cr, 0, Math.min(w / 2, h / 2));\n\n\t\t\t\tlet x = this.get(\"pointerX\", 0);\n\t\t\t\tlet y = this.get(\"pointerY\", 0);\n\t\t\t\tlet bwh = this.get(\"pointerBaseWidth\", 15) / 2;\n\n\t\t\t\t// corner coordinates\n\t\t\t\t// top left\n\t\t\t\tlet xtl = 0;\n\t\t\t\tlet ytl = 0;\n\t\t\t\t// top right\n\t\t\t\tlet xtr = w;\n\t\t\t\tlet ytr = 0;\n\t\t\t\t// bottom right\n\t\t\t\tlet xbr = w;\n\t\t\t\tlet ybr = h;\n\t\t\t\t// bottom left\n\t\t\t\tlet xbl = 0;\n\t\t\t\tlet ybl = h;\n\n\t\t\t\t// find stem base side: http://$math.stackexchange.com/questions/274712/calculate-on-which-side-of-straign-line-is-dot-located\n\t\t\t\t// d=(x−x1)(y2−y1)−(y−y1)(x2−x1)\n\t\t\t\tlet d1 = (x - xtl) * (ybr - ytl) - (y - ytl) * (xbr - xtl);\n\t\t\t\tlet d2 = (x - xbl) * (ytr - ybl) - (y - ybl) * (xtr - xbl);\n\n\t\t\t\tconst display = this._display;\n\t\t\t\t// top\n\t\t\t\tdisplay.moveTo(cr, 0);\n\n\t\t\t\tif (d1 > 0 && d2 > 0) {\n\t\t\t\t\tlet stemX = Math.round($math.fitToRange(x, cr + bwh, w - bwh - cr));\n\t\t\t\t\ty = $math.fitToRange(y, -Infinity, 0);\n\n\t\t\t\t\tdisplay.lineTo(stemX - bwh, 0);\n\t\t\t\t\tdisplay.lineTo(x, y);\n\t\t\t\t\tdisplay.lineTo(stemX + bwh, 0);\n\t\t\t\t}\n\n\t\t\t\tdisplay.lineTo(w - cr, 0);\n\t\t\t\tdisplay.arcTo(w, 0, w, cr, cr);\n\n\t\t\t\t// right\n\t\t\t\tif (d1 > 0 && d2 < 0) {\n\t\t\t\t\tlet stemY = Math.round($math.fitToRange(y, cr + bwh, h - bwh - cr));\n\t\t\t\t\tx = $math.fitToRange(x, w, Infinity);\n\t\t\t\t\tdisplay.lineTo(w, cr);\n\t\t\t\t\tdisplay.lineTo(w, Math.max(stemY - bwh, cr));\n\t\t\t\t\tdisplay.lineTo(x, y);\n\t\t\t\t\tdisplay.lineTo(w, stemY + bwh);\n\t\t\t\t}\n\t\t\t\tdisplay.lineTo(w, h - cr);\n\t\t\t\tdisplay.arcTo(w, h, w - cr, h, cr);\n\n\t\t\t\t// bottom\n\t\t\t\tif (d1 < 0 && d2 < 0) {\n\t\t\t\t\tlet stemX = Math.round($math.fitToRange(x, cr + bwh, w - bwh - cr));\n\t\t\t\t\ty = $math.fitToRange(y, h, Infinity);\n\n\t\t\t\t\tdisplay.lineTo(w - cr, h);\n\t\t\t\t\tdisplay.lineTo(stemX + bwh, h);\n\t\t\t\t\tdisplay.lineTo(x, y);\n\t\t\t\t\tdisplay.lineTo(stemX - bwh, h);\n\t\t\t\t}\n\t\t\t\tdisplay.lineTo(cr, h)\n\t\t\t\tdisplay.arcTo(0, h, 0, h - cr, cr);\n\n\n\t\t\t\t// left\n\t\t\t\tif (d1 < 0 && d2 > 0) {\n\t\t\t\t\tlet stemY = Math.round($math.fitToRange(y, cr + bwh, h - cr - bwh));\n\t\t\t\t\tx = $math.fitToRange(x, -Infinity, 0);\n\t\t\t\t\tdisplay.lineTo(0, h - cr);\n\t\t\t\t\tdisplay.lineTo(0, stemY + bwh);\n\t\t\t\t\tdisplay.lineTo(x, y);\n\t\t\t\t\tdisplay.lineTo(0, Math.max(stemY - bwh, cr));\n\t\t\t\t}\n\t\t\t\tdisplay.lineTo(0, cr);\n\t\t\t\tdisplay.arcTo(0, 0, cr, 0, cr);\n\t\t\t\tdisplay.closePath();\n\t\t\t}\n\t\t}\n\t}\n}\n","import type { IBounds } from \"../util/IBounds\";\nimport type { IPoint } from \"../util/IPoint\";\nimport type { Pattern } from \"../render/patterns/Pattern\";\nimport type { Time } from \"../util/Animation\";\nimport type { Sprite } from \"../render/Sprite\";\nimport type { Graphics } from \"../render/Graphics\";\nimport type { IPointerEvent } from \"../render/backend/Renderer\";\nimport type { DataItem, IComponentDataItem } from \"./Component\";\nimport type { Root } from \"../Root\";\nimport type { Template } from \"../util/Template\";\nimport type { Entity } from \"../util/Entity\";\n\nimport { MultiDisposer, IDisposer } from \"../util/Disposer\";\nimport { Label } from \"../render/Label\";\nimport { PointedRectangle } from \"../render/PointedRectangle\";\nimport { Container, IContainerPrivate, IContainerSettings } from \"./Container\";\nimport { Percent } from \"../util/Percent\";\nimport { Color } from \"../util/Color\";\n\nimport * as $math from \"../util/Math\";\nimport * as $array from \"../util/Array\";\nimport * as $utils from \"../util/Utils\";\n\n\nexport interface ITooltipSettings extends IContainerSettings {\n\n\t/**\n\t * Text to use for tooltip's label.\n\t */\n\tlabelText?: string;\n\n\t/**\n\t * HTML content to use for tooltip's label.\n\t *\n\t * @since 5.2.11\n\t */\n\tlabelHTML?: string;\n\n\t/**\n\t * A screen reader content for the label.\n\t *\n\t * Used in conjuction with `readerAnnounce`. If it is set to `true`, and\n\t * `labelAriaLabel` is set, its contents will be read out by a screen reader\n\t * when tooltip is shown or its data item changes.\n\t *\n\t * Otherwise, regular `labelText` (or `text` set directly on tooltip label) will\n\t * be used for scree reader announcement.\n\t *\n\t * @since 5.9.2\n\t */\n\tlabelAriaLabel?: string;\n\n\t/**\n\t * A direction of the tooltip pointer.\n\t *\n\t * https://www.amcharts.com/docs/v5/concepts/common-elements/tooltips/#Orientation\n\t */\n\tpointerOrientation?: \"left\" | \"right\" | \"up\" | \"down\" | \"vertical\" | \"horizontal\";\n\n\t/**\n\t * If set to `true` will use the same `fill` color for its background as\n\t * its `tooltipTarget`.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/tooltips/#Colors} for more info\n\t * @default false\n\t */\n\tgetFillFromSprite?: boolean;\n\n\t/**\n\t * If set to `true` will use the same `fill` color as its `tooltipTarget`.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/tooltips/#Colors} for more info\n\t * @default false\n\t */\n\tgetLabelFillFromSprite?: boolean;\n\n\t/**\n\t * If set to `true` will use the same `stroke` color as its `tooltipTarget`.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/tooltips/#Colors} for more info\n\t * @default false\n\t */\n\tgetStrokeFromSprite?: boolean;\n\n\t/**\n\t * Screen bounds to constrain the tooltip within.\n\t */\n\tbounds?: IBounds;\n\n\t/**\n\t * If set to `true` tooltip will adjust its text color for better visibility\n\t * on its background.\n\t *\n\t * @default true\n\t */\n\tautoTextColor?: boolean;\n\n\t/**\n\t * Screen coordinates the tooltip show point to.\n\t */\n\tpointTo?: IPoint;\n\n\t/**\n\t * Duration in milliseconds for tooltip position change, e.g. when tooltip\n\t * is jumping from one target to another.\n\t */\n\tanimationDuration?: number;\n\n\t/**\n\t * Easing function for tooltip animation.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/animations/#Easing_functions} for more info\n\t */\n\tanimationEasing?: (t: Time) => Time;\n\n\t/**\n\t * A target element tooltip is shown fow.\n\t */\n\ttooltipTarget?: Sprite;\n\n\t/**\n\t * If set to `true`, tooltip's target element will considered to be hovered\n\t * when mouse pointer is over tooltip itself.\n\t *\n\t * @since 5.2.14\n\t */\n\tkeepTargetHover?: boolean;\n\n\t/**\n\t * If set to `true` the tooltip contents will be read out by a screen reader\n\t * when displayed or changed.\n\t *\n\t * @default false\n\t * @since 5.9.2\n\t */\n\treaderAnnounce?: boolean;\n\n}\n\nexport interface ITooltipPrivate extends IContainerPrivate {\n}\n\n/**\n * Creates a tooltip.\n *\n * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/tooltips/} for more info\n * @important\n */\nexport class Tooltip extends Container {\n\n\tpublic _fx: number = 0;\n\tpublic _fy: number = 0;\n\n\tdeclare public _settings: ITooltipSettings;\n\tdeclare public _privateSettings: ITooltipPrivate;\n\n\tprotected _label!: Label;\n\tpublic static className: string = \"Tooltip\";\n\tpublic static classNames: Array<string> = Container.classNames.concat([Tooltip.className]);\n\n\tprotected _fillDp: IDisposer | undefined;\n\tprotected _strokeDp: IDisposer | undefined;\n\tprotected _labelDp: IDisposer | undefined;\n\n\tprotected _w: number = 0;\n\tprotected _h: number = 0;\n\n\tprotected _keepHoverDp: MultiDisposer | undefined;\n\tprotected _htmlContentHovered: boolean = false;\n\n\tconstructor(root: Root, settings: Entity[\"_settings\"], isReal: boolean, templates: Array<Template<Entity>> = []) {\n\t\tsuper(root, settings, isReal, templates);\n\t}\n\n\tprotected _afterNew() {\n\t\tthis._settings.themeTags = $utils.mergeTags(this._settings.themeTags, [\"tooltip\"]);\n\n\t\tsuper._afterNew();\n\n\t\tconst background: Graphics = this._setDefaultFn(\"background\", () => {\n\t\t\treturn PointedRectangle.new(this._root, {});\n\t\t});\n\n\t\tbackground.set(\"themeTags\", [\"tooltip\", \"background\"]);\n\n\t\tthis._label = this.children.push(Label.new(this._root, {}));\n\n\t\tthis._disposers.push(this._label.events.on(\"boundschanged\", () => {\n\t\t\tthis._updateBackground();\n\t\t}))\n\n\t\tthis._disposers.push(this.on(\"bounds\", () => {\n\t\t\tthis._updateBackground();\n\t\t}))\n\n\t\tthis._updateTextColor();\n\n\t\tthis._root.tooltipContainer.children.push(this);\n\t\tthis.hide(0);\n\n\t\tthis._disposers.push(this.label.onPrivate(\"htmlElement\", (htmlElement) => {\n\t\t\tif (htmlElement) {\n\t\t\t\tthis._disposers.push($utils.addEventListener(htmlElement, \"pointerover\", (_ev) => {\n\t\t\t\t\tthis._htmlContentHovered = true;\n\t\t\t\t}));\n\t\t\t\tthis._disposers.push($utils.addEventListener(htmlElement, \"pointerout\", (_ev) => {\n\t\t\t\t\tthis._htmlContentHovered = false;\n\t\t\t\t}));\n\t\t\t}\n\t\t}))\n\n\t\tthis.on(\"visible\", (_ev) => {\n\t\t\tthis._handleReaderAnnouncement();\n\t\t});\n\n\t\tthis.label.events.on(\"dataitemchanged\", (_ev) => {\n\t\t\tthis._handleReaderAnnouncement();\n\t\t});\n\n\t\tthis._root._tooltips.push(this);\n\t}\n\n\tprotected _handleReaderAnnouncement() {\n\t\tif (this.get(\"readerAnnounce\") && this.isVisibleDeep()) {\n\t\t\tthis._root.readerAlert(this.label.getAccessibleText());\n\t\t}\n\t}\n\n\t/**\n\t * A [[Label]] element for the tooltip.\n\t *\n\t * @readonly\n\t * @return Label\n\t */\n\tpublic get label(): Label {\n\t\treturn this._label;\n\t}\n\n\t/**\n\t * Permanently disposes the tooltip.\n\t */\n\tprotected _dispose() {\n\t\tsuper._dispose();\n\t\t$array.remove(this._root._tooltips, this);\n\t}\n\n\tpublic _updateChildren() {\n\t\tsuper._updateChildren();\n\n\t\tif (this.isDirty(\"pointerOrientation\") || this.isPrivateDirty(\"minWidth\") || this.isPrivateDirty(\"minHeight\")) {\n\t\t\tthis.get(\"background\")!._markDirtyKey(\"width\");\n\t\t}\n\n\t\tconst labelText = this.get(\"labelText\");\n\t\tif (labelText != null) {\n\t\t\tthis.label.set(\"text\", this.get(\"labelText\"));\n\t\t}\n\t\tconst labelHTML = this.get(\"labelHTML\");\n\t\tif (labelHTML != null) {\n\t\t\tthis.label.set(\"html\", this.get(\"labelHTML\"));\n\t\t}\n\t\tconst labelAriaLabel = this.get(\"labelAriaLabel\");\n\t\tif (labelAriaLabel != null) {\n\t\t\tthis.label.set(\"ariaLabel\", this.get(\"labelAriaLabel\"));\n\t\t}\n\t}\n\n\tpublic _changed() {\n\t\tsuper._changed();\n\n\t\tif (this.isDirty(\"pointTo\") || this.isDirty(\"pointerOrientation\")) {\n\t\t\t// can't compare to previous, as sometimes pointTo is set twice (when pointer moves, so the position won't be udpated)\n\t\t\tthis._updateBackground();\n\t\t}\n\n\t\tif (this.isDirty(\"tooltipTarget\")) {\n\t\t\tthis.updateBackgroundColor();\n\t\t}\n\n\t\tif (this.isDirty(\"keepTargetHover\")) {\n\t\t\tconst keephover = this.get(\"keepTargetHover\");\n\t\t\tif (keephover) {\n\t\t\t\tconst bg = this.get(\"background\")!;\n\t\t\t\tthis._keepHoverDp = new MultiDisposer([\n\t\t\t\t\tbg.events.on(\"pointerover\", (_ev) => {\n\t\t\t\t\t\tlet target = this.get(\"tooltipTarget\");\n\t\t\t\t\t\tif (target) {\n\t\t\t\t\t\t\tif (target.parent && target.parent.getPrivate(\"tooltipTarget\") == target) {\n\t\t\t\t\t\t\t\ttarget = target.parent;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttarget.hover();\n\t\t\t\t\t\t}\n\t\t\t\t\t}),\n\t\t\t\t\tbg.events.on(\"pointerout\", (_ev) => {\n\t\t\t\t\t\tlet target = this.get(\"tooltipTarget\");\n\t\t\t\t\t\tif (target) {\n\t\t\t\t\t\t\tif (target.parent && target.parent.getPrivate(\"tooltipTarget\") == target) {\n\t\t\t\t\t\t\t\ttarget = target.parent;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (!this._htmlContentHovered) {\n\t\t\t\t\t\t\t\ttarget.unhover();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t]);\n\n\t\t\t\tthis.label.onPrivate(\"htmlElement\", (htmlElement: any) => {\n\t\t\t\t\tif (this._keepHoverDp && htmlElement) {\n\t\t\t\t\t\tthis._keepHoverDp.disposers.push($utils.addEventListener<PointerEvent | MouseEvent>(htmlElement, \"pointerleave\", (ev: IPointerEvent) => {\n\t\t\t\t\t\t\tconst outEvent = this.root._renderer.getEvent(ev);\n\t\t\t\t\t\t\tbg.events.dispatch(\"pointerout\", {\n\t\t\t\t\t\t\t\ttype: \"pointerout\",\n\t\t\t\t\t\t\t\toriginalEvent: outEvent.event,\n\t\t\t\t\t\t\t\tpoint: outEvent.point,\n\t\t\t\t\t\t\t\tsimulated: false,\n\t\t\t\t\t\t\t\ttarget: bg\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}));\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (this._keepHoverDp) {\n\t\t\t\t\tthis._keepHoverDp.dispose();\n\t\t\t\t\tthis._keepHoverDp = undefined;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected _onShow() {\n\t\tsuper._onShow();\n\t\tthis.updateBackgroundColor();\n\t}\n\n\n\tpublic updateBackgroundColor() {\n\t\tlet tooltipTarget = this.get(\"tooltipTarget\");\n\t\tconst background = this.get(\"background\");\n\t\tlet fill: Color | undefined;\n\t\tlet stroke: Color | undefined;\n\n\n\t\tif (tooltipTarget && background) {\n\n\t\t\tfill = tooltipTarget.get(\"fill\" as any);\n\t\t\tstroke = tooltipTarget.get(\"stroke\" as any);\n\n\t\t\tif (fill == null) {\n\t\t\t\tfill = stroke;\n\t\t\t}\n\n\t\t\tif (this.get(\"getFillFromSprite\")) {\n\n\t\t\t\tif (this._fillDp) {\n\t\t\t\t\tthis._fillDp.dispose();\n\t\t\t\t}\n\n\t\t\t\tif (fill != null) {\n\t\t\t\t\tbackground.set(\"fill\", fill as any);\n\t\t\t\t}\n\n\t\t\t\tthis._fillDp = tooltipTarget.on(\"fill\" as any, (fill) => {\n\t\t\t\t\tif (fill != null) {\n\t\t\t\t\t\tbackground.set(\"fill\", fill as any);\n\t\t\t\t\t\tthis._updateTextColor(fill);\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\tthis._disposers.push(this._fillDp);\n\t\t\t}\n\n\t\t\tif (this.get(\"getStrokeFromSprite\")) {\n\n\t\t\t\tif (this._strokeDp) {\n\t\t\t\t\tthis._strokeDp.dispose();\n\t\t\t\t}\n\n\t\t\t\tif (fill != null) {\n\t\t\t\t\tbackground.set(\"stroke\", fill as any);\n\t\t\t\t}\n\n\t\t\t\tthis._strokeDp = tooltipTarget.on(\"fill\" as any, (fill) => {\n\t\t\t\t\tif (fill != null) {\n\t\t\t\t\t\tbackground.set(\"stroke\", fill as any);\n\t\t\t\t\t}\n\t\t\t\t})\n\n\t\t\t\tthis._disposers.push(this._strokeDp);\n\t\t\t}\n\n\t\t\tif (this.get(\"getLabelFillFromSprite\")) {\n\n\t\t\t\tif (this._labelDp) {\n\t\t\t\t\tthis._labelDp.dispose();\n\t\t\t\t}\n\n\t\t\t\tif (fill != null) {\n\t\t\t\t\tthis.label.set(\"fill\", fill as any);\n\t\t\t\t}\n\n\t\t\t\tthis._labelDp = tooltipTarget.on(\"fill\" as any, (fill) => {\n\t\t\t\t\tif (fill != null) {\n\t\t\t\t\t\tthis.label.set(\"fill\", fill as any);\n\t\t\t\t\t}\n\t\t\t\t})\n\n\t\t\t\tthis._disposers.push(this._labelDp);\n\t\t\t}\n\t\t}\n\n\t\tthis._updateTextColor(fill);\n\t}\n\n\n\tprotected _updateTextColor(fill?: Color | Pattern) {\n\t\tif (this.get(\"autoTextColor\")) {\n\t\t\tif (fill == null) {\n\t\t\t\tfill = this.get(\"background\")!.get(\"fill\") as Color;\n\t\t\t}\n\n\t\t\tif (fill == null) {\n\t\t\t\tfill = this._root.interfaceColors.get(\"background\");\n\t\t\t}\n\n\t\t\tif (fill instanceof Color) {\n\t\t\t\tthis.label.set(\"fill\", Color.alternative(fill, this._root.interfaceColors.get(\"alternativeText\"), this._root.interfaceColors.get(\"text\")));\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic _setDataItem(dataItem?: DataItem<IComponentDataItem>): void {\n\t\tsuper._setDataItem(dataItem);\n\t\tthis.label._setDataItem(dataItem);\n\t}\n\n\n\tprotected _updateBackground() {\n\t\tsuper.updateBackground();\n\t\tconst parent = this._root.container;\n\n\t\tif (parent) {\n\n\t\t\tlet cw = 0.5;\n\t\t\tlet ch = 0.5;\n\n\t\t\tlet centerX = this.get(\"centerX\");\n\t\t\tif (centerX instanceof Percent) {\n\t\t\t\tcw = centerX.value;\n\t\t\t}\n\n\t\t\tlet centerY = this.get(\"centerY\");\n\t\t\tif (centerY instanceof Percent) {\n\t\t\t\tch = centerY.value;\n\t\t\t}\n\n\t\t\tlet parentW = parent.width();\n\t\t\tlet parentH = parent.height();\n\n\t\t\tlet tooltipContainer = this.parent;\n\t\t\tlet xx = 0;\n\t\t\tlet yy = 0;\n\t\t\tif (tooltipContainer) {\n\t\t\t\txx = tooltipContainer.x();\n\t\t\t\tyy = tooltipContainer.y();\n\n\t\t\t\tconst layerMargin = tooltipContainer.get(\"layerMargin\");\n\t\t\t\tif (layerMargin) {\n\t\t\t\t\txx += layerMargin.left || 0;\n\t\t\t\t\tyy += layerMargin.top || 0;\n\t\t\t\t\tparentW += (layerMargin.left || 0) + (layerMargin.right || 0);\n\t\t\t\t\tparentH += (layerMargin.top || 0) + (layerMargin.bottom || 0);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst bounds = this.get(\"bounds\", { left: -xx, top: -yy, right: parentW - xx, bottom: parentH - yy });\n\n\t\t\tthis._updateBounds();\n\n\t\t\tlet w = this.width();\n\t\t\tlet h = this.height();\n\n\t\t\t// use old w and h,as when tooltip is hidden, these are 0 and unneeded animation happens\n\t\t\tif (w === 0) {\n\t\t\t\tw = this._w;\n\t\t\t}\n\n\t\t\tif (h === 0) {\n\t\t\t\th = this._h;\n\t\t\t}\n\n\t\t\tlet pointTo = this.get(\"pointTo\", { x: parentW / 2, y: parentH / 2 });\n\t\t\tlet x = pointTo.x;\n\t\t\tlet y = pointTo.y;\n\n\t\t\tlet pointerOrientation = this.get(\"pointerOrientation\");\n\n\t\t\tlet background = this.get(\"background\");\n\t\t\tlet pointerLength = 0;\n\t\t\tlet bgStrokeSizeY = 0;\n\t\t\tlet bgStrokeSizeX = 0;\n\n\t\t\tif (background instanceof PointedRectangle) {\n\t\t\t\tpointerLength = background.get(\"pointerLength\", 0);\n\t\t\t\tbgStrokeSizeY = background.get(\"strokeWidth\", 0) / 2;\n\t\t\t\tbgStrokeSizeX = bgStrokeSizeY;\n\t\t\t\tbackground.set(\"width\", w);\n\t\t\t\tbackground.set(\"height\", h);\n\t\t\t}\n\n\t\t\tlet pointerX = 0;\n\t\t\tlet pointerY = 0;\n\n\t\t\tlet boundsW = bounds.right - bounds.left;\n\t\t\tlet boundsH = bounds.bottom - bounds.top;\n\n\n\t\t\t// horizontal\n\t\t\tif (pointerOrientation == \"horizontal\" || pointerOrientation == \"left\" || pointerOrientation == \"right\") {\n\t\t\t\tbgStrokeSizeY = 0;\n\t\t\t\tif (pointerOrientation == \"horizontal\") {\n\t\t\t\t\tif (x > bounds.left + boundsW / 2) {\n\t\t\t\t\t\tx -= (w * (1 - cw) + pointerLength);\n\t\t\t\t\t\tbgStrokeSizeX *= -1;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tx += (w * cw + pointerLength);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (pointerOrientation == \"left\") {\n\t\t\t\t\tx += (w * (1 - cw) + pointerLength);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tx -= (w * cw + pointerLength);\n\t\t\t\t\tbgStrokeSizeX *= -1;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// vertical pointer\n\t\t\telse {\n\t\t\t\tbgStrokeSizeX = 0;\n\t\t\t\tif (pointerOrientation == \"vertical\") {\n\t\t\t\t\tif (y > bounds.top + h / 2 + pointerLength) {\n\t\t\t\t\t\ty -= (h * (1 - ch) + pointerLength);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\ty += (h * ch + pointerLength);\n\t\t\t\t\t\tbgStrokeSizeY *= -1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (pointerOrientation == \"down\") {\n\t\t\t\t\ty -= (h * (1 - ch) + pointerLength);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\ty += (h * ch + pointerLength);\n\t\t\t\t\tbgStrokeSizeY *= -1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tx = $math.fitToRange(x, bounds.left + w * cw, bounds.left + boundsW - w * (1 - cw)) + bgStrokeSizeX;\n\t\t\ty = $math.fitToRange(y, bounds.top + h * ch, bounds.top + boundsH - h * (1 - ch)) - bgStrokeSizeY;\n\n\t\t\tpointerX = pointTo.x - x + w * cw + bgStrokeSizeX;\n\t\t\tpointerY = pointTo.y - y + h * ch - bgStrokeSizeY;\n\n\t\t\tthis._fx = x;\n\t\t\tthis._fy = y;\n\n\t\t\tconst animationDuration = this.get(\"animationDuration\", 0);\n\n\t\t\tif (animationDuration > 0 && this.get(\"visible\") && this.get(\"opacity\") > 0.1) {\n\t\t\t\tconst animationEasing = this.get(\"animationEasing\");\n\t\t\t\tthis.animate({ key: \"x\", to: x, duration: animationDuration, easing: animationEasing });\n\t\t\t\tthis.animate({ key: \"y\", to: y, duration: animationDuration, easing: animationEasing });\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.set(\"x\", x);\n\t\t\t\tthis.set(\"y\", y);\n\t\t\t}\n\n\t\t\tif (background instanceof PointedRectangle) {\n\t\t\t\tbackground.set(\"pointerX\", pointerX);\n\t\t\t\tbackground.set(\"pointerY\", pointerY);\n\t\t\t}\n\n\t\t\tif (w > 0) {\n\t\t\t\tthis._w = w;\n\t\t\t}\n\t\t\tif (h > 0) {\n\t\t\t\tthis._h = h;\n\t\t\t}\n\t\t}\n\t}\n}\n","import { Layout, eachChildren } from \"./Layout\";\nimport * as $type from \"../util/Type\";\nimport { Percent } from \"../util/Percent\";\nimport type { Container } from \"./Container\";\n\n\n/**\n * A vertical children layout for [[Container]].\n *\n * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/containers/#Layout} for more info\n */\nexport class VerticalLayout extends Layout {\n\n\tpublic static className: string = \"VerticalLayout\";\n\tpublic static classNames: Array<string> = Layout.classNames.concat([VerticalLayout.className]);\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateContainer(container: Container): void {\n\t\tlet paddingTop = container.get(\"paddingTop\", 0);\n\n\t\tlet availableHeight = container.innerHeight();\n\t\tlet totalPercent = 0;\n\n\t\teachChildren(container, (child) => {\n\t\t\tif (child.isVisible()) {\n\t\t\t\tif (child.get(\"position\") == \"relative\") {\n\t\t\t\t\tlet childHeight = child.get(\"height\");\n\t\t\t\t\tif (childHeight instanceof Percent) {\n\t\t\t\t\t\ttotalPercent += childHeight.value;\n\n\t\t\t\t\t\tlet h = availableHeight * childHeight.value;\n\t\t\t\t\t\tlet minHeight = child.get(\"minHeight\", child.getPrivate(\"minHeight\", -Infinity));\n\t\t\t\t\t\tif (minHeight > h) {\n\t\t\t\t\t\t\tavailableHeight -= minHeight;\n\t\t\t\t\t\t\ttotalPercent -= childHeight.value;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlet maxHeight = child.get(\"maxHeight\", child.getPrivate(\"maxHeight\", Infinity));\n\t\t\t\t\t\tif (h > maxHeight) {\n\t\t\t\t\t\t\tavailableHeight -= maxHeight;\n\t\t\t\t\t\t\ttotalPercent -= childHeight.value;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (!$type.isNumber(childHeight)) {\n\t\t\t\t\t\t\tchildHeight = child.height();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tavailableHeight -= childHeight + child.get(\"marginTop\", 0) + child.get(\"marginBottom\", 0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\n\t\tif (availableHeight <= 0 || availableHeight == Infinity) {\n\t\t\tavailableHeight = .1;\n\t\t}\n\n\t\t//if (availableHeight > 0) {\n\t\teachChildren(container, (child) => {\n\t\t\tif (child.isVisible()) {\n\t\t\t\tif (child.get(\"position\") == \"relative\") {\n\t\t\t\t\tlet childHeight = child.get(\"height\");\n\n\t\t\t\t\tif (childHeight instanceof Percent) {\n\t\t\t\t\t\tlet privateHeight = availableHeight * childHeight.value / totalPercent - child.get(\"marginTop\", 0) - child.get(\"marginBottom\", 0);\n\n\t\t\t\t\t\tlet minHeight = child.get(\"minHeight\", child.getPrivate(\"minHeight\", -Infinity));\n\t\t\t\t\t\tlet maxHeight = child.get(\"maxHeight\", child.getPrivate(\"maxHeight\", Infinity));\n\t\t\t\t\t\tprivateHeight = Math.min(Math.max(minHeight, privateHeight), maxHeight);\n\n\t\t\t\t\t\tchild.setPrivate(\"height\", privateHeight);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif(child._prevSettings.height instanceof Percent){\n\t\t\t\t\t\t\tchild.setPrivate(\"height\", undefined);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t//}\n\n\t\tlet prevY = paddingTop;\n\n\t\teachChildren(container, (child) => {\n\t\t\tif (child.get(\"position\") == \"relative\") {\n\t\t\t\tif (child.isVisible()) {\n\t\t\t\t\tlet bounds = child.adjustedLocalBounds();\n\t\t\t\t\tlet marginTop = child.get(\"marginTop\", 0);\n\n\t\t\t\t\tlet top = bounds.top;\n\t\t\t\t\tlet bottom = bounds.bottom;\n\n\t\t\t\t\tlet maxHeight = child.get(\"maxHeight\");\n\t\t\t\t\tif (maxHeight) {\n\t\t\t\t\t\tif (bottom - top > maxHeight) {\n\t\t\t\t\t\t\tbottom = top + maxHeight;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tlet marginBottom = child.get(\"marginBottom\", 0);\n\t\t\t\t\tlet y = prevY + marginTop - top;\n\t\t\t\t\tchild.setPrivate(\"y\", y);\n\t\t\t\t\tprevY = y + bottom + marginBottom;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tchild.setPrivate(\"y\", undefined);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}\n","var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar TAU = Math.PI * 2;\n\nvar mapToEllipse = function mapToEllipse(_ref, rx, ry, cosphi, sinphi, centerx, centery) {\n var x = _ref.x,\n y = _ref.y;\n\n x *= rx;\n y *= ry;\n\n var xp = cosphi * x - sinphi * y;\n var yp = sinphi * x + cosphi * y;\n\n return {\n x: xp + centerx,\n y: yp + centery\n };\n};\n\nvar approxUnitArc = function approxUnitArc(ang1, ang2) {\n // If 90 degree circular arc, use a constant\n // as derived from http://spencermortensen.com/articles/bezier-circle\n var a = ang2 === 1.5707963267948966 ? 0.551915024494 : ang2 === -1.5707963267948966 ? -0.551915024494 : 4 / 3 * Math.tan(ang2 / 4);\n\n var x1 = Math.cos(ang1);\n var y1 = Math.sin(ang1);\n var x2 = Math.cos(ang1 + ang2);\n var y2 = Math.sin(ang1 + ang2);\n\n return [{\n x: x1 - y1 * a,\n y: y1 + x1 * a\n }, {\n x: x2 + y2 * a,\n y: y2 - x2 * a\n }, {\n x: x2,\n y: y2\n }];\n};\n\nvar vectorAngle = function vectorAngle(ux, uy, vx, vy) {\n var sign = ux * vy - uy * vx < 0 ? -1 : 1;\n\n var dot = ux * vx + uy * vy;\n\n if (dot > 1) {\n dot = 1;\n }\n\n if (dot < -1) {\n dot = -1;\n }\n\n return sign * Math.acos(dot);\n};\n\nvar getArcCenter = function getArcCenter(px, py, cx, cy, rx, ry, largeArcFlag, sweepFlag, sinphi, cosphi, pxp, pyp) {\n var rxsq = Math.pow(rx, 2);\n var rysq = Math.pow(ry, 2);\n var pxpsq = Math.pow(pxp, 2);\n var pypsq = Math.pow(pyp, 2);\n\n var radicant = rxsq * rysq - rxsq * pypsq - rysq * pxpsq;\n\n if (radicant < 0) {\n radicant = 0;\n }\n\n radicant /= rxsq * pypsq + rysq * pxpsq;\n radicant = Math.sqrt(radicant) * (largeArcFlag === sweepFlag ? -1 : 1);\n\n var centerxp = radicant * rx / ry * pyp;\n var centeryp = radicant * -ry / rx * pxp;\n\n var centerx = cosphi * centerxp - sinphi * centeryp + (px + cx) / 2;\n var centery = sinphi * centerxp + cosphi * centeryp + (py + cy) / 2;\n\n var vx1 = (pxp - centerxp) / rx;\n var vy1 = (pyp - centeryp) / ry;\n var vx2 = (-pxp - centerxp) / rx;\n var vy2 = (-pyp - centeryp) / ry;\n\n var ang1 = vectorAngle(1, 0, vx1, vy1);\n var ang2 = vectorAngle(vx1, vy1, vx2, vy2);\n\n if (sweepFlag === 0 && ang2 > 0) {\n ang2 -= TAU;\n }\n\n if (sweepFlag === 1 && ang2 < 0) {\n ang2 += TAU;\n }\n\n return [centerx, centery, ang1, ang2];\n};\n\nvar arcToBezier = function arcToBezier(_ref2) {\n var px = _ref2.px,\n py = _ref2.py,\n cx = _ref2.cx,\n cy = _ref2.cy,\n rx = _ref2.rx,\n ry = _ref2.ry,\n _ref2$xAxisRotation = _ref2.xAxisRotation,\n xAxisRotation = _ref2$xAxisRotation === undefined ? 0 : _ref2$xAxisRotation,\n _ref2$largeArcFlag = _ref2.largeArcFlag,\n largeArcFlag = _ref2$largeArcFlag === undefined ? 0 : _ref2$largeArcFlag,\n _ref2$sweepFlag = _ref2.sweepFlag,\n sweepFlag = _ref2$sweepFlag === undefined ? 0 : _ref2$sweepFlag;\n\n var curves = [];\n\n if (rx === 0 || ry === 0) {\n return [];\n }\n\n var sinphi = Math.sin(xAxisRotation * TAU / 360);\n var cosphi = Math.cos(xAxisRotation * TAU / 360);\n\n var pxp = cosphi * (px - cx) / 2 + sinphi * (py - cy) / 2;\n var pyp = -sinphi * (px - cx) / 2 + cosphi * (py - cy) / 2;\n\n if (pxp === 0 && pyp === 0) {\n return [];\n }\n\n rx = Math.abs(rx);\n ry = Math.abs(ry);\n\n var lambda = Math.pow(pxp, 2) / Math.pow(rx, 2) + Math.pow(pyp, 2) / Math.pow(ry, 2);\n\n if (lambda > 1) {\n rx *= Math.sqrt(lambda);\n ry *= Math.sqrt(lambda);\n }\n\n var _getArcCenter = getArcCenter(px, py, cx, cy, rx, ry, largeArcFlag, sweepFlag, sinphi, cosphi, pxp, pyp),\n _getArcCenter2 = _slicedToArray(_getArcCenter, 4),\n centerx = _getArcCenter2[0],\n centery = _getArcCenter2[1],\n ang1 = _getArcCenter2[2],\n ang2 = _getArcCenter2[3];\n\n // If 'ang2' == 90.0000000001, then `ratio` will evaluate to\n // 1.0000000001. This causes `segments` to be greater than one, which is an\n // unecessary split, and adds extra points to the bezier curve. To alleviate\n // this issue, we round to 1.0 when the ratio is close to 1.0.\n\n\n var ratio = Math.abs(ang2) / (TAU / 4);\n if (Math.abs(1.0 - ratio) < 0.0000001) {\n ratio = 1.0;\n }\n\n var segments = Math.max(Math.ceil(ratio), 1);\n\n ang2 /= segments;\n\n for (var i = 0; i < segments; i++) {\n curves.push(approxUnitArc(ang1, ang2));\n ang1 += ang2;\n }\n\n return curves.map(function (curve) {\n var _mapToEllipse = mapToEllipse(curve[0], rx, ry, cosphi, sinphi, centerx, centery),\n x1 = _mapToEllipse.x,\n y1 = _mapToEllipse.y;\n\n var _mapToEllipse2 = mapToEllipse(curve[1], rx, ry, cosphi, sinphi, centerx, centery),\n x2 = _mapToEllipse2.x,\n y2 = _mapToEllipse2.y;\n\n var _mapToEllipse3 = mapToEllipse(curve[2], rx, ry, cosphi, sinphi, centerx, centery),\n x = _mapToEllipse3.x,\n y = _mapToEllipse3.y;\n\n return { x1: x1, y1: y1, x2: x2, y2: y2, x: x, y: y };\n });\n};\n\nexport default arcToBezier;","/** @ignore *//** */\n\nimport {\n\tIRenderer, IContainer, IDisplayObject, IGraphics, IRendererEvents, IMargin,\n\tIText, ITextStyle, IRadialText, IPicture, IRendererEvent, ILayer, ICanvasOptions, BlendMode, IPointerEvent, Id\n} from \"./Renderer\";\nimport type { IBounds } from \"../../util/IBounds\";\nimport type { IPoint } from \"../../util/IPoint\";\nimport { Color } from \"../../util/Color\";\nimport { Matrix } from \"../../util/Matrix\";\nimport { Percent, percent } from \"../../util/Percent\";\n//import { Throttler } from \"../../util/Throttler\";\nimport { ArrayDisposer, Disposer, DisposerClass, IDisposer, CounterDisposer, MultiDisposer } from \"../../util/Disposer\";\nimport { TextFormatter, ITextChunk } from \"../../util/TextFormatter\";\nimport * as $utils from \"../../util/Utils\";\nimport * as $array from \"../../util/Array\";\nimport * as $object from \"../../util/Object\";\nimport * as $type from \"../../util/Type\";\nimport * as $math from \"../../util/Math\";\nimport arcToBezier from 'svg-arc-to-cubic-bezier';\n\n\n/**\n * @ignore\n */\nfunction checkArgs(name: string, actual: number, expected: number) {\n\tif (actual !== expected) {\n\t\tthrow new Error(\"Required \" + expected + \" arguments for \" + name + \" but got \" + actual);\n\t}\n}\n\n/**\n * @ignore\n */\nfunction checkMinArgs(name: string, actual: number, expected: number) {\n\tif (actual < expected) {\n\t\tthrow new Error(\"Required at least \" + expected + \" arguments for \" + name + \" but got \" + actual);\n\t}\n}\n\n/**\n * @ignore\n */\nfunction checkEvenArgs(name: string, actual: number, expected: number) {\n\tcheckMinArgs(name, actual, expected);\n\n\tif ((actual % expected) !== 0) {\n\t\tthrow new Error(\"Arguments for \" + name + \" must be in pairs of \" + expected);\n\t}\n}\n\n/**\n * @ignore\n * This splits the flag so that way 0017 will be processed as 0 0 17\n *\n * This is important for weird paths like `M17 5A1 1 0 0017 30 1 1 0 0017 5`\n */\nfunction splitArcFlags(args: Array<string>) {\n\tfor (let i = 0; i < args.length; i += 7) {\n\t\tlet index = i + 3;\n\t\tlet flag = args[index];\n\n\t\tif (flag.length > 1) {\n\t\t\tconst a = /^([01])([01])(.*)$/.exec(flag);\n\n\t\t\tif (a !== null) {\n\t\t\t\targs.splice(index, 0, a[1]);\n\t\t\t\t++index;\n\n\t\t\t\targs.splice(index, 0, a[2]);\n\t\t\t\t++index;\n\n\t\t\t\tif (a[3].length > 0) {\n\t\t\t\t\targs[index] = a[3];\n\n\t\t\t\t} else {\n\t\t\t\t\targs.splice(index, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t++index;\n\n\t\tflag = args[index];\n\n\t\tif (flag.length > 1) {\n\t\t\tconst a = /^([01])(.+)$/.exec(flag);\n\n\t\t\tif (a !== null) {\n\t\t\t\targs.splice(index, 0, a[1]);\n\t\t\t\t++index;\n\n\t\t\t\targs[index] = a[2];\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * @ignore\n */\nfunction assertBinary(value: number): 0 | 1 {\n\tif (value === 0 || value === 1) {\n\t\treturn value;\n\n\t} else {\n\t\tthrow new Error(\"Flag must be 0 or 1\");\n\t}\n}\n\n// 1 -> 0xffffff * (2 / 2)\n// 2 -> 0xffffff * (1 / 2)\n//\n// 3 -> 0xffffff * (3 / 4)\n// 4 -> 0xffffff * (1 / 4)\n//\n// 5 -> 0xffffff * (7 / 8)\n// 6 -> 0xffffff * (5 / 8)\n// 7 -> 0xffffff * (3 / 8)\n// 8 -> 0xffffff * (1 / 8)\n//\n// 9 -> 0xffffff * (15 / 16)\n// 10 -> 0xffffff * (13 / 16)\n// 11 -> 0xffffff * (11 / 16)\n// 12 -> 0xffffff * (9 / 16)\n// 13 -> 0xffffff * (7 / 16)\n// 14 -> 0xffffff * (5 / 16)\n// 15 -> 0xffffff * (3 / 16)\n// 16 -> 0xffffff * (1 / 16)\n// @todo remove this old color distribution algo if the new one pans out\n/*function distributeId(id: number): number {\n\tif (id === 1) {\n\t\treturn 0x000001;\n\n\t} else {\n\t\t// Finds the closest power of 2\n\t\tconst base = Math.pow(2, Math.ceil(Math.log(id) / Math.log(2)));\n\n\t\t// Translates the id into an odd fraction index\n\t\tconst index = ((base - id) * 2) + 1;\n\n\t\t// TODO is Math.round correct ?\n\t\treturn Math.round(0xffffff * (index / base));\n\t}\n}*/\n\n/**\n * Function by smeans:\n * https://lowcode.life/generating-unique-contrasting-colors-in-javascript/\n * @ignore\n */\nfunction distributeId(id: number): number {\n\tconst rgb = [0, 0, 0];\n\n\tfor (let i = 0; i < 24; i++) {\n\t\trgb[i % 3] <<= 1;\n\t\trgb[i % 3] |= id & 0x01;\n\t\tid >>= 1;\n\t}\n\n\treturn (rgb[0] | 0) + (rgb[1] << 8) + (rgb[2] << 16);\n}\n\n/**\n * @ignore\n */\nfunction eachTargets(hitTarget: CanvasDisplayObject, f: (target: CanvasDisplayObject) => boolean): void {\n\tfor (; ;) {\n\t\tif (hitTarget.interactive) {\n\t\t\tif (!f(hitTarget)) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (hitTarget._parent) {\n\t\t\thitTarget = hitTarget._parent;\n\n\t\t} else {\n\t\t\tbreak;\n\t\t}\n\t}\n}\n\n// TODO feature detection for mouse/touch/pointer\n/**\n * @ignore\n */\nfunction onPointerEvent(element: EventTarget, name: string, f: (event: Array<IPointerEvent>, target: Node | null) => void): IDisposer {\n\treturn $utils.addEventListener(element, $utils.getRendererEvent(name), (event: MouseEvent | TouchEvent) => {\n\t\tconst target = $utils.getEventTarget(event);\n\n\t\tlet touches = (<any>event).touches;\n\t\tif (touches) {\n\t\t\tif (touches.length == 0) {\n\t\t\t\ttouches = (<any>event).changedTouches;\n\t\t\t}\n\n\t\t\tf($array.copy(<TouchList>touches), target);\n\n\t\t} else {\n\t\t\tf([<MouseEvent>event], target);\n\t\t}\n\t});\n}\n\n/**\n * @ignore\n */\nfunction isTainted(image: HTMLImageElement): boolean {\n\tconst canvas = document.createElement(\"canvas\");\n\tcanvas.width = 1;\n\tcanvas.height = 1;\n\tconst context = canvas.getContext(\"2d\", { willReadFrequently: true })! as CanvasRenderingContext2D;\n\tcontext.drawImage(image, 0, 0, 1, 1);\n\n\ttry {\n\t\tcontext.getImageData(0, 0, 1, 1);\n\t\treturn false;\n\t}\n\tcatch (err) {\n\t\tconsole.warn(\"Image \\\"\" + image.src + \"\\\" is loaded from different host and is not covered by CORS policy. For more information about the implications read here: https://www.amcharts.com/docs/v5/concepts/cors\");\n\t\treturn true;\n\t}\n}\n\n/**\n * This is needed to workaround a bug in iOS which causes it to not GC canvas elements.\n *\n * @ignore\n */\nfunction clearCanvas(view: HTMLCanvasElement) {\n\tview.width = 0;\n\tview.height = 0;\n\tview.style.width = \"0px\";\n\tview.style.height = \"0px\";\n}\n\n\n/**\n * Aligns the coordinate to the pixel, so it renders crisp\n *\n * @ignore\n */\nfunction crisp(x: number): number {\n\treturn Math.floor(x) + .5;\n}\n\n/**\n * @ignore\n */\nexport class CanvasPivot implements IPoint {\n\tprotected _x: number = 0;\n\tprotected _y: number = 0;\n\n\tget x(): number {\n\t\treturn this._x;\n\t}\n\n\tget y(): number {\n\t\treturn this._y;\n\t}\n\n\tset x(value: number) {\n\t\tthis._x = value;\n\t}\n\n\tset y(value: number) {\n\t\tthis._y = value;\n\t}\n}\n\n\ninterface IStatus {\n\tlayer: CanvasLayer;\n\tinactive: boolean | null;\n}\n\n/**\n * @ignore\n */\nexport class CanvasDisplayObject extends DisposerClass implements IDisplayObject, IDisposer {\n\tpublic _layer?: CanvasLayer;\n\n\tpublic mask: CanvasGraphics | null = null;\n\tpublic visible: boolean = true;\n\tpublic exportable?: boolean = true;\n\tpublic interactive: boolean = false;\n\tpublic inactive: boolean | null = null;\n\tpublic wheelable: boolean = false;\n\tpublic cancelTouch: boolean = false;\n\tpublic isMeasured: boolean = false;\n\tpublic buttonMode: boolean = false;\n\tpublic alpha: number = 1;\n\tpublic compoundAlpha: number = 1;\n\tpublic angle: number = 0;\n\tpublic scale: number = 1;\n\tpublic x: number = 0;\n\tpublic y: number = 0;\n\tpublic crisp: boolean = false;\n\tpublic pivot: CanvasPivot = new CanvasPivot();\n\n\tpublic filter?: string;\n\n\tpublic cursorOverStyle?: string;\n\tpublic _replacedCursorStyle?: string;\n\n\tpublic _localMatrix: Matrix = new Matrix();\n\tpublic _matrix: Matrix = new Matrix();\n\t// TODO can this be replaced with _localMatrix ?\n\tprotected _uMatrix: Matrix = new Matrix();\n\n\tpublic _renderer: CanvasRenderer;\n\tpublic _parent: CanvasContainer | undefined;\n\n\tprotected _localBounds: IBounds | undefined;\n\tprotected _bounds: IBounds | undefined;\n\tpublic _colorId: string | undefined;\n\n\tconstructor(renderer: CanvasRenderer) {\n\t\tsuper();\n\t\tthis._renderer = renderer;\n\t}\n\n\tprotected subStatus(status: IStatus): IStatus {\n\t\treturn {\n\t\t\tinactive: (this.inactive == null ? status.inactive : this.inactive),\n\t\t\tlayer: this._layer || status.layer,\n\t\t};\n\t}\n\n\tprotected _dispose(): void {\n\t\tthis._renderer._removeObject(this);\n\t\tthis.getLayer().dirty = true;\n\t}\n\n\tpublic getCanvas(): HTMLCanvasElement {\n\t\treturn this.getLayer().view;\n\t}\n\n\tpublic getLayer(): CanvasLayer {\n\t\tlet self: CanvasDisplayObject = this;\n\n\t\tfor (; ;) {\n\t\t\tif (self._layer) {\n\t\t\t\treturn self._layer;\n\n\t\t\t} else if (self._parent) {\n\t\t\t\tself = self._parent;\n\n\t\t\t} else {\n\t\t\t\treturn this._renderer.defaultLayer;\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic setLayer(order: number | undefined, margin: IMargin | undefined): void {\n\t\tif (order == null) {\n\t\t\tthis._layer = undefined;\n\n\t\t} else {\n\t\t\tconst visible = true;\n\t\t\tthis._layer = this._renderer.getLayer(order, visible);\n\t\t\tthis._layer.visible = visible;\n\t\t\tthis._layer.margin = margin;\n\t\t\tif (margin) {\n\t\t\t\t$utils.setInteractive(this._layer.view, false);\n\t\t\t}\n\n\t\t\tthis._renderer._ghostLayer.setMargin(this._renderer.layers);\n\n\t\t\tif (this._parent) {\n\t\t\t\tthis._parent.registerChildLayer(this._layer);\n\t\t\t}\n\n\t\t\tthis._layer.dirty = true;\n\t\t\tthis._renderer.resizeLayer(this._layer);\n\t\t\tthis._renderer.resizeGhost();\n\t\t}\n\t}\n\n\tpublic markDirtyLayer(): void {\n\t\tthis.getLayer().dirty = true;\n\t}\n\n\tpublic clear(): void {\n\t\tthis.invalidateBounds();\n\t}\n\n\tpublic invalidateBounds(): void {\n\t\tthis._localBounds = undefined;\n\t}\n\n\tpublic _addBounds(_bounds: IBounds): void { }\n\n\tprotected _getColorId(): string {\n\t\tif (this._colorId === undefined) {\n\t\t\tthis._colorId = this._renderer.paintId(this);\n\t\t}\n\n\t\treturn this._colorId;\n\t}\n\n\tprotected _isInteractive(status: IStatus): boolean {\n\t\treturn !status.inactive && (this.interactive || this._renderer._forceInteractive > 0);\n\t}\n\n\tprotected _isInteractiveMask(status: IStatus): boolean {\n\t\treturn this._isInteractive(status);\n\t}\n\n\tpublic contains(child: CanvasDisplayObject): boolean {\n\t\tfor (; ;) {\n\t\t\tif (child === this) {\n\t\t\t\treturn true;\n\n\t\t\t} else if (child._parent) {\n\t\t\t\tchild = child._parent;\n\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\n\ttoGlobal(point: IPoint): IPoint {\n\t\treturn this._matrix.apply(point);\n\t}\n\n\ttoLocal(point: IPoint): IPoint {\n\t\treturn this._matrix.applyInverse(point);\n\t}\n\n\tpublic getLocalMatrix(): Matrix {\n\t\tthis._uMatrix.setTransform(0, 0, this.pivot.x, this.pivot.y, this.angle * Math.PI / 180, this.scale);\n\t\treturn this._uMatrix;\n\t}\n\n\tgetLocalBounds(): IBounds {\n\t\tif (!this._localBounds) {\n\n\t\t\tconst bn = 10000000;\n\t\t\tthis._localBounds = {\n\t\t\t\tleft: bn,\n\t\t\t\ttop: bn,\n\t\t\t\tright: -bn,\n\t\t\t\tbottom: -bn\n\t\t\t};\n\n\t\t\tthis._addBounds(this._localBounds);\n\t\t}\n\t\treturn this._localBounds;\n\t}\n\n\tgetAdjustedBounds(bounds: IBounds): IBounds {\n\t\tthis._setMatrix();\n\n\t\tconst matrix = this.getLocalMatrix();\n\n\t\tconst p0 = matrix.apply({ x: bounds.left, y: bounds.top });\n\t\tconst p1 = matrix.apply({ x: bounds.right, y: bounds.top });\n\t\tconst p2 = matrix.apply({ x: bounds.right, y: bounds.bottom });\n\t\tconst p3 = matrix.apply({ x: bounds.left, y: bounds.bottom });\n\n\t\treturn {\n\t\t\tleft: Math.min(p0.x, p1.x, p2.x, p3.x),\n\t\t\ttop: Math.min(p0.y, p1.y, p2.y, p3.y),\n\t\t\tright: Math.max(p0.x, p1.x, p2.x, p3.x),\n\t\t\tbottom: Math.max(p0.y, p1.y, p2.y, p3.y)\n\t\t}\n\t}\n\n\ton<C, Key extends keyof IRendererEvents>(key: Key, callback: (this: C, event: IRendererEvents[Key]) => void, context?: C): IDisposer {\n\t\tif (this.interactive) {\n\t\t\treturn this._renderer._addEvent(this, key, callback, context);\n\n\t\t} else {\n\t\t\treturn new Disposer(() => { });\n\t\t}\n\t}\n\n\tpublic _setMatrix(): void {\n\t\t// TODO only calculate this if it has actually changed\n\t\tthis._localMatrix.setTransform(\n\t\t\tthis.x,\n\t\t\tthis.y,\n\t\t\tthis.pivot.x,\n\t\t\tthis.pivot.y,\n\t\t\t// Converts degrees to radians\n\t\t\tthis.angle * Math.PI / 180,\n\t\t\tthis.scale\n\t\t);\n\n\t\tthis._matrix.copyFrom(this._localMatrix);\n\n\t\tif (this._parent) {\n\t\t\t// TODO only calculate this if it has actually changed\n\t\t\tthis._matrix.prepend(this._parent._matrix);\n\t\t}\n\t}\n\n\tpublic _transform(context: CanvasRenderingContext2D, resolution: number): void {\n\t\tconst m = this._matrix;\n\t\tlet tx = m.tx * resolution;\n\t\tlet ty = m.ty * resolution;\n\t\tif (this.crisp) {\n\t\t\ttx = crisp(tx);\n\t\t\tty = crisp(ty);\n\t\t}\n\n\t\tcontext.setTransform(\n\t\t\tm.a * resolution,\n\t\t\tm.b * resolution,\n\t\t\tm.c * resolution,\n\t\t\tm.d * resolution,\n\t\t\ttx,\n\t\t\tty)\n\n\t}\n\n\tpublic _transformMargin(context: CanvasRenderingContext2D, resolution: number, margin: IMargin): void {\n\t\tconst m = this._matrix;\n\t\tcontext.setTransform(\n\t\t\tm.a * resolution,\n\t\t\tm.b * resolution,\n\t\t\tm.c * resolution,\n\t\t\tm.d * resolution,\n\t\t\t(m.tx + margin.left) * resolution,\n\t\t\t(m.ty + margin.top) * resolution\n\t\t);\n\t}\n\n\tpublic _transformLayer(context: CanvasRenderingContext2D, resolution: number, layer: CanvasLayer): void {\n\t\tif (layer.margin) {\n\t\t\tthis._transformMargin(context, layer.scale || resolution, layer.margin);\n\n\t\t} else {\n\t\t\tthis._transform(context, layer.scale || resolution);\n\t\t}\n\t}\n\n\tpublic render(status: IStatus): void {\n\t\tif (this.visible && (this.exportable !== false || !this._renderer._omitTainted)) {\n\t\t\tthis._setMatrix();\n\n\t\t\tconst subStatus = this.subStatus(status);\n\n\t\t\tconst resolution = this._renderer.resolution;\n\n\t\t\tconst layers = this._renderer.layers;\n\t\t\tconst ghostLayer = this._renderer._ghostLayer;\n\t\t\tconst ghostContext = ghostLayer.context;\n\n\t\t\tconst mask = this.mask;\n\t\t\tif (mask) {\n\t\t\t\tmask._setMatrix();\n\t\t\t}\n\n\t\t\t// TODO improve this\n\t\t\t$array.each(layers, (layer) => {\n\t\t\t\tif (layer) {\n\t\t\t\t\tconst context = layer.context;\n\t\t\t\t\tcontext.save();\n\n\t\t\t\t\t// We must apply the mask before we transform the element\n\t\t\t\t\tif (mask) {\n\t\t\t\t\t\tmask._transformLayer(context, resolution, layer);\n\t\t\t\t\t\tmask._runPath(context);\n\t\t\t\t\t\tcontext.clip();\n\t\t\t\t\t}\n\n\t\t\t\t\tcontext.globalAlpha = this.compoundAlpha * this.alpha;\n\n\t\t\t\t\tthis._transformLayer(context, resolution, layer);\n\n\t\t\t\t\tif (this.filter) {\n\t\t\t\t\t\tcontext.filter = this.filter;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tghostContext.save();\n\n\t\t\t// We must apply the mask before we transform the element\n\t\t\tif (mask && this._isInteractiveMask(subStatus)) {\n\t\t\t\tmask._transformMargin(ghostContext, resolution, ghostLayer.margin);\n\t\t\t\tmask._runPath(ghostContext);\n\t\t\t\tghostContext.clip();\n\t\t\t}\n\n\t\t\tthis._transformMargin(ghostContext, resolution, ghostLayer.margin);\n\n\t\t\tthis._render(subStatus);\n\n\t\t\tghostContext.restore();\n\n\t\t\t$array.each(layers, (layer) => {\n\t\t\t\tif (layer) {\n\t\t\t\t\tlayer.context.restore();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tprotected _render(status: IStatus): void {\n\t\tif (this.exportable === false) {\n\t\t\tstatus.layer.tainted = true;\n\t\t}\n\t}\n\n\thovering(): boolean {\n\t\treturn this._renderer._hovering.has(this);\n\t}\n\n\tdragging(): boolean {\n\t\treturn this._renderer._dragging.some((x) => x.value === this);\n\t}\n\n\n\tpublic shouldCancelTouch(): boolean {\n\t\tconst renderer = this._renderer;\n\t\tif (renderer.tapToActivate && !renderer._touchActive) {\n\t\t\treturn false;\n\t\t}\n\t\tif (this.cancelTouch) {\n\t\t\treturn true;\n\t\t}\n\t\telse if (this._parent) {\n\t\t\treturn this._parent.shouldCancelTouch();\n\t\t}\n\t\treturn false;\n\t}\n\n}\n\n/**\n * @ignore\n */\nexport class CanvasContainer extends CanvasDisplayObject implements IContainer {\n\tpublic interactiveChildren: boolean = true;\n\tprivate _childLayers?: CanvasLayer[];\n\n\tprotected _children: Array<CanvasDisplayObject> = [];\n\n\tprotected _isInteractiveMask(status: IStatus): boolean {\n\t\treturn this.interactiveChildren || super._isInteractiveMask(status);\n\t}\n\n\taddChild(child: CanvasDisplayObject): void {\n\t\tchild._parent = this;\n\t\tthis._children.push(child);\n\t\tif (child._layer) {\n\t\t\tthis.registerChildLayer(child._layer);\n\t\t}\n\t}\n\n\taddChildAt(child: CanvasDisplayObject, index: number): void {\n\t\tchild._parent = this;\n\t\tthis._children.splice(index, 0, child);\n\t\tif (child._layer) {\n\t\t\tthis.registerChildLayer(child._layer);\n\t\t}\n\t}\n\n\tremoveChild(child: CanvasDisplayObject): void {\n\t\tchild._parent = undefined;\n\t\t$array.removeFirst(this._children, child);\n\t}\n\n\tprotected _render(status: IStatus): void {\n\t\tsuper._render(status);\n\n\t\tconst renderer = this._renderer;\n\n\t\tif (this.interactive && this.interactiveChildren) {\n\t\t\t++renderer._forceInteractive;\n\t\t}\n\n\t\t$array.each(this._children, (child) => {\n\t\t\tchild.compoundAlpha = this.compoundAlpha * this.alpha;\n\t\t\tchild.render(status);\n\t\t});\n\n\t\tif (this.interactive && this.interactiveChildren) {\n\t\t\t--renderer._forceInteractive;\n\t\t}\n\t}\n\n\tregisterChildLayer(layer: CanvasLayer): void {\n\t\tif (!this._childLayers) {\n\t\t\tthis._childLayers = [];\n\t\t}\n\t\t$array.pushOne(this._childLayers, layer);\n\t\tif (this._parent) {\n\t\t\tthis._parent.registerChildLayer(layer);\n\t\t}\n\t}\n\n\tpublic markDirtyLayer(deep: boolean = false): void {\n\t\tsuper.markDirtyLayer();\n\t\tif (deep && this._childLayers) {\n\t\t\t$array.each(this._childLayers, (layer) => layer.dirty = true);\n\t\t}\n\t}\n\n\tprotected _dispose() {\n\t\tsuper._dispose();\n\t\tif (this._childLayers) {\n\t\t\t$array.each(this._childLayers, (layer) => {\n\t\t\t\tlayer.dirty = true;\n\t\t\t});\n\t\t}\n\t}\n}\n\n/**\n * @ignore\n */\nfunction setPoint(bounds: IBounds, point: IPoint): void {\n\tbounds.left = Math.min(bounds.left, point.x);\n\tbounds.top = Math.min(bounds.top, point.y);\n\tbounds.right = Math.max(bounds.right, point.x);\n\tbounds.bottom = Math.max(bounds.bottom, point.y);\n}\n\n/**\n * @ignore\n */\nabstract class Op {\n\tpublic colorize(_context: CanvasRenderingContext2D, _forceColor: string | undefined): void { }\n\n\tpublic colorizeGhost(context: CanvasRenderingContext2D, forceColor: string | undefined): void {\n\t\tthis.colorize(context, forceColor);\n\t}\n\n\tpublic path(_context: CanvasRenderingContext2D): void { }\n\n\tpublic pathGhost(context: CanvasRenderingContext2D): void {\n\t\tthis.path(context);\n\t}\n\n\tpublic addBounds(_bounds: IBounds): void { }\n}\n\n/**\n * @ignore\n */\nclass BeginPath extends Op {\n\tpublic colorize(context: CanvasRenderingContext2D, _forceColor: string | undefined): void {\n\t\tcontext.beginPath();\n\t}\n}\n\n/**\n * @ignore\n */\nclass BeginFill extends Op {\n\tconstructor(public color: string | CanvasGradient | CanvasPattern) { super(); }\n\n\tpublic colorize(context: CanvasRenderingContext2D, forceColor: string | undefined): void {\n\t\tif (forceColor !== undefined) {\n\t\t\tcontext.fillStyle = forceColor;\n\n\t\t} else {\n\t\t\tcontext.fillStyle = this.color;\n\t\t}\n\t}\n}\n\n/**\n * @ignore\n */\nclass EndFill extends Op {\n\tconstructor(public clearShadow: boolean) { super(); }\n\tpublic colorize(context: CanvasRenderingContext2D, _forceColor: string | undefined): void {\n\t\tcontext.fill();\n\t\tif (this.clearShadow) {\n\t\t\tcontext.shadowColor = \"\";\n\t\t\tcontext.shadowBlur = 0;\n\t\t\tcontext.shadowOffsetX = 0;\n\t\t\tcontext.shadowOffsetY = 0;\n\t\t}\n\t}\n}\n\n/**\n * @ignore\n */\nclass EndStroke extends Op {\n\tpublic colorize(context: CanvasRenderingContext2D, _forceColor: string | undefined): void {\n\t\tcontext.stroke();\n\t}\n}\n\n/**\n * @ignore\n */\nclass LineStyle extends Op {\n\tconstructor(public width: number, public color: string | CanvasGradient | CanvasPattern, public lineJoin?: \"miter\" | \"round\" | \"bevel\", public lineCap?: \"butt\" | \"round\" | \"square\") { super(); }\n\n\tpublic colorize(context: CanvasRenderingContext2D, forceColor: string | undefined): void {\n\t\tif (forceColor !== undefined) {\n\t\t\tcontext.strokeStyle = forceColor;\n\n\t\t} else {\n\t\t\tcontext.strokeStyle = this.color;\n\t\t}\n\n\t\tcontext.lineWidth = this.width;\n\t\tif (this.lineJoin) {\n\t\t\tcontext.lineJoin = this.lineJoin;\n\t\t}\n\n\t\tif (this.lineCap) {\n\t\t\tcontext.lineCap = this.lineCap;\n\t\t}\n\t}\n}\n\n/**\n * @ignore\n */\nclass LineDash extends Op {\n\tconstructor(public dash: number[]) { super(); }\n\n\tpublic colorize(context: CanvasRenderingContext2D, _forceColor: string | undefined): void {\n\t\tcontext.setLineDash(this.dash);\n\t}\n}\n\n/**\n * @ignore\n */\nclass LineDashOffset extends Op {\n\tconstructor(public dashOffset: number) { super(); }\n\n\tpublic colorize(context: CanvasRenderingContext2D, _forceColor: string | undefined): void {\n\t\tcontext.lineDashOffset = this.dashOffset;\n\t}\n}\n\n/**\n * @ignore\n */\nclass DrawRect extends Op {\n\tconstructor(public x: number, public y: number, public width: number, public height: number) { super(); }\n\n\tpublic path(context: CanvasRenderingContext2D): void {\n\t\tcontext.rect(this.x, this.y, this.width, this.height);\n\t}\n\n\tpublic addBounds(bounds: IBounds): void {\n\t\tconst l = this.x;\n\t\tconst t = this.y;\n\t\tconst r = l + this.width;\n\t\tconst b = t + this.height;\n\n\t\tsetPoint(bounds, { x: l, y: t });\n\t\tsetPoint(bounds, { x: r, y: t });\n\t\tsetPoint(bounds, { x: l, y: b });\n\t\tsetPoint(bounds, { x: r, y: b });\n\t}\n}\n\n/**\n * @ignore\n */\nclass DrawCircle extends Op {\n\tconstructor(public x: number, public y: number, public radius: number) { super(); }\n\n\tpublic path(context: CanvasRenderingContext2D): void {\n\t\tcontext.moveTo(this.x + this.radius, this.y);\n\t\tcontext.arc(this.x, this.y, this.radius, 0, 2 * Math.PI);\n\t}\n\n\t// TODO handle skewing and rotation\n\tpublic addBounds(bounds: IBounds): void {\n\t\tsetPoint(bounds, { x: this.x - this.radius, y: this.y - this.radius });\n\t\tsetPoint(bounds, { x: this.x + this.radius, y: this.y + this.radius });\n\t}\n}\n\n/**\n * @ignore\n */\nclass DrawEllipse extends Op {\n\tconstructor(public x: number, public y: number, public radiusX: number, public radiusY: number) { super(); }\n\n\tpublic path(context: CanvasRenderingContext2D): void {\n\t\tcontext.ellipse(0, 0, this.radiusX, this.radiusY, 0, 0, Math.PI * 2);\n\t}\n\n\t// TODO handle skewing and rotation\n\tpublic addBounds(bounds: IBounds): void {\n\t\tsetPoint(bounds, { x: this.x - this.radiusX, y: this.y - this.radiusY });\n\t\tsetPoint(bounds, { x: this.x + this.radiusX, y: this.y + this.radiusY });\n\t}\n}\n\n/**\n * @ignore\n */\nclass Arc extends Op {\n\tconstructor(\n\t\tpublic cx: number,\n\t\tpublic cy: number,\n\t\tpublic radius: number,\n\t\tpublic startAngle: number,\n\t\tpublic endAngle: number,\n\t\tpublic anticlockwise: boolean,\n\t) { super(); }\n\n\tpublic path(context: CanvasRenderingContext2D): void {\n\t\tif (this.radius > 0) {\n\t\t\tcontext.arc(this.cx, this.cy, this.radius, this.startAngle, this.endAngle, this.anticlockwise);\n\t\t}\n\t}\n\n\tpublic addBounds(bounds: IBounds): void {\n\t\tlet arcBounds = $math.getArcBounds(this.cx, this.cy, this.startAngle * $math.DEGREES, this.endAngle * $math.DEGREES, this.radius);\n\t\tsetPoint(bounds, { x: arcBounds.left, y: arcBounds.top });\n\t\tsetPoint(bounds, { x: arcBounds.right, y: arcBounds.bottom });\n\t}\n}\n\n/**\n * @ignore\n */\nclass ArcTo extends Op {\n\tconstructor(\n\t\tpublic x1: number,\n\t\tpublic y1: number,\n\t\tpublic x2: number,\n\t\tpublic y2: number,\n\t\tpublic radius: number,\n\t) { super(); }\n\n\tpublic path(context: CanvasRenderingContext2D): void {\n\t\tif (this.radius > 0) {\n\t\t\tcontext.arcTo(this.x1, this.y1, this.x2, this.y2, this.radius);\n\t\t}\n\t}\n\n\t// TODO: add points\n\tpublic addBounds(_bounds: IBounds): void {\n\t\t/*\n\t\t// not finished\n\t\thttps://math.stackexchange.com/questions/1781438/finding-the-center-of-a-circle-given-two-points-and-a-radius-algebraically\n\n\t\tif (prevPoint) {\n\t\t\tlet x1 = prevPoint.x;\n\t\t\tlet y1 = prevPoint.y;\n\t\t\tlet x2 = this.x2;\n\t\t\tlet y2 = this.y2;\n\t\t\tlet r = this.radius;\n\n\t\t\tlet xa = (x2 - x1) / 2;\n\t\t\tlet ya = (y2 - y1) / 2;\n\n\t\t\tlet x0 = x1 + xa;\n\t\t\tlet y0 = y1 + ya;\n\n\t\t\tlet a = Math.hypot(xa, ya);\n\t\t\tlet b = Math.sqrt(r * r - a * a);\n\n\t\t\tlet cx = x0 + b * ya / a;\n\t\t\tlet cy = y0 - b * xa / a;\n\n\t\t\tconsole.log(cx, cy);\n\t\t}*/\n\t}\n}\n\n/**\n * @ignore\n */\nclass LineTo extends Op {\n\tconstructor(public x: number, public y: number) { super(); }\n\n\tpublic path(context: CanvasRenderingContext2D): void {\n\t\tcontext.lineTo(this.x, this.y);\n\t}\n\n\tpublic addBounds(bounds: IBounds): void {\n\t\tsetPoint(bounds, { x: this.x, y: this.y });\n\t}\n}\n\n/**\n * @ignore\n */\nclass MoveTo extends Op {\n\tconstructor(public x: number, public y: number) { super(); }\n\n\tpublic path(context: CanvasRenderingContext2D): void {\n\t\tcontext.moveTo(this.x, this.y);\n\t}\n\n\tpublic addBounds(bounds: IBounds): void {\n\t\tsetPoint(bounds, { x: this.x, y: this.y });\n\t}\n}\n\n/**\n * @ignore\n */\nclass ClosePath extends Op {\n\tpublic path(context: CanvasRenderingContext2D): void {\n\t\tcontext.closePath();\n\t}\n}\n\n/**\n * @ignore\n */\nclass BezierCurveTo extends Op {\n\tconstructor(\n\t\tpublic cpX: number,\n\t\tpublic cpY: number,\n\t\tpublic cpX2: number,\n\t\tpublic cpY2: number,\n\t\tpublic toX: number,\n\t\tpublic toY: number,\n\t) { super(); }\n\n\tpublic path(context: CanvasRenderingContext2D): void {\n\t\tcontext.bezierCurveTo(this.cpX, this.cpY, this.cpX2, this.cpY2, this.toX, this.toY);\n\t}\n\n\t// TODO: OK?\n\tpublic addBounds(bounds: IBounds): void {\n\t\tsetPoint(bounds, { x: this.cpX, y: this.cpY });\n\t\tsetPoint(bounds, { x: this.cpX2, y: this.cpY2 });\n\t\tsetPoint(bounds, { x: this.toX, y: this.toY });\n\t}\n}\n\n/**\n * @ignore\n */\nclass QuadraticCurveTo extends Op {\n\tconstructor(\n\t\tpublic cpX: number,\n\t\tpublic cpY: number,\n\t\tpublic toX: number,\n\t\tpublic toY: number,\n\t) { super(); }\n\n\tpublic path(context: CanvasRenderingContext2D): void {\n\t\tcontext.quadraticCurveTo(this.cpX, this.cpY, this.toX, this.toY);\n\t}\n\n\t// TODO: OK?\n\tpublic addBounds(bounds: IBounds): void {\n\t\tsetPoint(bounds, { x: this.cpX, y: this.cpY });\n\t\tsetPoint(bounds, { x: this.toX, y: this.toY });\n\t}\n}\n\n/**\n * @ignore\n */\nclass Shadow extends Op {\n\tconstructor(\n\t\tpublic color: string,\n\t\tpublic blur: number,\n\t\tpublic offsetX: number,\n\t\tpublic offsetY: number,\n\t\tpublic opacity?: number\n\t) { super(); }\n\n\tpublic colorize(context: CanvasRenderingContext2D, _forceColor: string | undefined): void {\n\t\tif (this.opacity) {\n\t\t\tcontext.fillStyle = this.color;\n\t\t}\n\t\tcontext.shadowColor = this.color;\n\t\tcontext.shadowBlur = this.blur;\n\t\tcontext.shadowOffsetX = this.offsetX;\n\t\tcontext.shadowOffsetY = this.offsetY;\n\t}\n\n\tpublic colorizeGhost(_context: CanvasRenderingContext2D, _forceColor: string | undefined): void {}\n}\n\n/**\n * @ignore\n */\nclass GraphicsImage extends Op {\n\tconstructor(\n\t\tpublic image: HTMLImageElement | HTMLCanvasElement,\n\t\tpublic width: number,\n\t\tpublic height: number,\n\t\tpublic x: number,\n\t\tpublic y: number\n\t) { super(); }\n\n\tpublic path(context: CanvasRenderingContext2D): void {\n\t\tcontext.drawImage(this.image, this.x, this.y, this.width, this.height);\n\t}\n\n\t// TODO: OK?\n\tpublic addBounds(bounds: IBounds): void {\n\t\tsetPoint(bounds, { x: this.x, y: this.y });\n\t\tsetPoint(bounds, { x: this.width, y: this.height });\n\t}\n}\n\n/**\n * @ignore\n */\nexport class CanvasGraphics extends CanvasDisplayObject implements IGraphics {\n\tprotected _operations: Array<Op> = [];\n\n\tpublic blendMode: BlendMode = BlendMode.NORMAL;\n\n\tprotected _hasShadows: boolean = false;\n\tprotected _fillAlpha?: number;\n\tprotected _strokeAlpha?: number;\n\n\tclear(): void {\n\t\tsuper.clear();\n\t\tthis._operations.length = 0;\n\t}\n\n\tprotected _pushOp(op: Op): void {\n\t\tthis._operations.push(op);\n\t}\n\n\tbeginFill(color?: Color | CanvasGradient | CanvasPattern, alpha: number = 1): void {\n\t\tthis._fillAlpha = alpha;\n\t\tif (color) {\n\t\t\tif (color instanceof Color) {\n\t\t\t\tthis._pushOp(new BeginFill(color.toCSS(alpha)));\n\n\t\t\t} else {\n\t\t\t\tthis.isMeasured = true;\n\t\t\t\tthis._pushOp(new BeginFill(color));\n\t\t\t}\n\t\t} else {\n\t\t\tthis._pushOp(new BeginFill(\"rgba(0, 0, 0, \" + alpha + \")\"));\n\t\t}\n\t}\n\n\tendFill(): void {\n\t\tthis._pushOp(new EndFill(this._hasShadows));\n\t}\n\n\tendStroke(): void {\n\t\tthis._pushOp(new EndStroke());\n\t}\n\n\tbeginPath(): void {\n\t\tthis._pushOp(new BeginPath());\n\t}\n\n\tlineStyle(width: number = 0, color?: Color | CanvasGradient | CanvasPattern, alpha: number = 1, lineJoin?: \"miter\" | \"round\" | \"bevel\", lineCap?: \"butt\" | \"round\" | \"square\"): void {\n\t\tthis._strokeAlpha = alpha;\n\t\tif (color) {\n\t\t\tif (color instanceof Color) {\n\t\t\t\tthis._pushOp(new LineStyle(width, color.toCSS(alpha), lineJoin, lineCap));\n\t\t\t} else {\n\t\t\t\tthis._pushOp(new LineStyle(width, color, lineJoin, lineCap));\n\t\t\t}\n\t\t} else {\n\t\t\tthis._pushOp(new LineStyle(width, \"rgba(0, 0, 0, \" + alpha + \")\", lineJoin, lineCap));\n\t\t}\n\t}\n\n\tsetLineDash(dash?: number[]): void {\n\t\tthis._pushOp(new LineDash(dash ? dash : []));\n\t}\n\n\tsetLineDashOffset(dashOffset: number = 0): void {\n\t\tthis._pushOp(new LineDashOffset(dashOffset));\n\t}\n\n\tdrawRect(x: number, y: number, width: number, height: number): void {\n\t\tthis._pushOp(new DrawRect(x, y, width, height));\n\t}\n\n\tdrawCircle(x: number, y: number, radius: number): void {\n\t\tthis._pushOp(new DrawCircle(x, y, radius));\n\t}\n\n\tdrawEllipse(x: number, y: number, radiusX: number, radiusY: number): void {\n\t\tthis._pushOp(new DrawEllipse(x, y, radiusX, radiusY));\n\t}\n\n\tarc(cx: number, cy: number, radius: number, startAngle: number, endAngle: number, anticlockwise: boolean = false): void {\n\t\tthis._pushOp(new Arc(cx, cy, radius, startAngle, endAngle, anticlockwise));\n\t}\n\n\tarcTo(x1: number, y1: number, x2: number, y2: number, radius: number): void {\n\t\tthis._pushOp(new ArcTo(x1, y1, x2, y2, radius));\n\t}\n\n\tlineTo(x: number, y: number): void {\n\t\tthis._pushOp(new LineTo(x, y));\n\t}\n\n\tmoveTo(x: number, y: number): void {\n\t\tthis._pushOp(new MoveTo(x, y));\n\t}\n\n\tbezierCurveTo(cpX: number, cpY: number, cpX2: number, cpY2: number, toX: number, toY: number): void {\n\t\tthis._pushOp(new BezierCurveTo(cpX, cpY, cpX2, cpY2, toX, toY));\n\t}\n\n\tquadraticCurveTo(cpX: number, cpY: number, toX: number, toY: number): void {\n\t\tthis._pushOp(new QuadraticCurveTo(cpX, cpY, toX, toY));\n\t}\n\n\tclosePath(): void {\n\t\tthis._pushOp(new ClosePath());\n\t}\n\n\tshadow(color: Color, blur: number = 0, offsetX: number = 0, offsetY: number = 0, opacity?: number): void {\n\t\tthis._hasShadows = true;\n\t\tthis._pushOp(new Shadow(opacity ? color.toCSS(opacity) : color.toCSS(this._fillAlpha || this._strokeAlpha), blur, offsetX, offsetY));\n\t}\n\n\timage(image: HTMLImageElement | HTMLCanvasElement, width: number, height: number, x: number, y: number): void {\n\t\tthis._pushOp(new GraphicsImage(image, width, height, x, y));\n\t}\n\n\t// https://svgwg.org/svg2-draft/paths.html#DProperty\n\t// TODO better error checking\n\tsvgPath(path: string): void {\n\t\tlet x = 0;\n\t\tlet y = 0;\n\t\tlet cpx: number | null = null;\n\t\tlet cpy: number | null = null;\n\t\tlet qcpx: number | null = null;\n\t\tlet qcpy: number | null = null;\n\n\t\tconst SEGMENTS_REGEXP = /([MmZzLlHhVvCcSsQqTtAa])([^MmZzLlHhVvCcSsQqTtAa]*)/g;\n\t\tconst ARGS_REGEXP = /[\\u0009\\u0020\\u000A\\u000C\\u000D]*([\\+\\-]?[0-9]*\\.?[0-9]+(?:[eE][\\+\\-]?[0-9]+)?)[\\u0009\\u0020\\u000A\\u000C\\u000D]*,?/g;\n\n\t\tlet match;\n\n\t\twhile ((match = SEGMENTS_REGEXP.exec(path)) !== null) {\n\t\t\tconst name = match[1];\n\t\t\tconst rest = match[2];\n\n\t\t\tconst args: Array<string> = [];\n\n\t\t\twhile ((match = ARGS_REGEXP.exec(rest)) !== null) {\n\t\t\t\targs.push(match[1]);\n\t\t\t}\n\n\t\t\t// Reset control point\n\t\t\tif (name !== \"S\" && name !== \"s\" && name !== \"C\" && name !== \"c\") {\n\t\t\t\tcpx = null;\n\t\t\t\tcpy = null;\n\t\t\t}\n\n\t\t\t// Reset control point\n\t\t\tif (name !== \"Q\" && name !== \"q\" && name !== \"T\" && name !== \"t\") {\n\t\t\t\tqcpx = null;\n\t\t\t\tqcpy = null;\n\t\t\t}\n\n\t\t\tswitch (name) {\n\t\t\t\tcase \"M\":\n\t\t\t\t\tcheckEvenArgs(name, args.length, 2);\n\t\t\t\t\tx = +args[0];\n\t\t\t\t\ty = +args[1];\n\t\t\t\t\tthis.moveTo(x, y);\n\n\t\t\t\t\tfor (let i = 2; i < args.length; i += 2) {\n\t\t\t\t\t\tx = +args[i];\n\t\t\t\t\t\ty = +args[i + 1];\n\t\t\t\t\t\tthis.lineTo(x, y);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"m\":\n\t\t\t\t\tcheckEvenArgs(name, args.length, 2);\n\t\t\t\t\tx += +args[0];\n\t\t\t\t\ty += +args[1];\n\t\t\t\t\tthis.moveTo(x, y);\n\n\t\t\t\t\tfor (let i = 2; i < args.length; i += 2) {\n\t\t\t\t\t\tx += +args[i];\n\t\t\t\t\t\ty += +args[i + 1];\n\t\t\t\t\t\tthis.lineTo(x, y);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"L\":\n\t\t\t\t\tcheckEvenArgs(name, args.length, 2);\n\t\t\t\t\tfor (let i = 0; i < args.length; i += 2) {\n\t\t\t\t\t\tx = +args[i];\n\t\t\t\t\t\ty = +args[i + 1];\n\t\t\t\t\t\tthis.lineTo(x, y);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"l\":\n\t\t\t\t\tcheckEvenArgs(name, args.length, 2);\n\t\t\t\t\tfor (let i = 0; i < args.length; i += 2) {\n\t\t\t\t\t\tx += +args[i];\n\t\t\t\t\t\ty += +args[i + 1];\n\t\t\t\t\t\tthis.lineTo(x, y);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"H\":\n\t\t\t\t\tcheckMinArgs(name, args.length, 1);\n\t\t\t\t\tfor (let i = 0; i < args.length; ++i) {\n\t\t\t\t\t\tx = +args[i];\n\t\t\t\t\t\tthis.lineTo(x, y);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"h\":\n\t\t\t\t\tcheckMinArgs(name, args.length, 1);\n\t\t\t\t\tfor (let i = 0; i < args.length; ++i) {\n\t\t\t\t\t\tx += +args[i];\n\t\t\t\t\t\tthis.lineTo(x, y);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"V\":\n\t\t\t\t\tcheckMinArgs(name, args.length, 1);\n\t\t\t\t\tfor (let i = 0; i < args.length; ++i) {\n\t\t\t\t\t\ty = +args[i];\n\t\t\t\t\t\tthis.lineTo(x, y);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"v\":\n\t\t\t\t\tcheckMinArgs(name, args.length, 1);\n\t\t\t\t\tfor (let i = 0; i < args.length; ++i) {\n\t\t\t\t\t\ty += +args[i];\n\t\t\t\t\t\tthis.lineTo(x, y);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"C\":\n\t\t\t\t\tcheckEvenArgs(name, args.length, 6);\n\t\t\t\t\tfor (let i = 0; i < args.length; i += 6) {\n\t\t\t\t\t\tconst x1 = +args[i];\n\t\t\t\t\t\tconst y1 = +args[i + 1];\n\t\t\t\t\t\tcpx = +args[i + 2];\n\t\t\t\t\t\tcpy = +args[i + 3];\n\t\t\t\t\t\tx = +args[i + 4];\n\t\t\t\t\t\ty = +args[i + 5];\n\t\t\t\t\t\tthis.bezierCurveTo(x1, y1, cpx, cpy, x, y);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"c\":\n\t\t\t\t\tcheckEvenArgs(name, args.length, 6);\n\t\t\t\t\tfor (let i = 0; i < args.length; i += 6) {\n\t\t\t\t\t\tconst x1 = +args[i] + x;\n\t\t\t\t\t\tconst y1 = +args[i + 1] + y;\n\t\t\t\t\t\tcpx = +args[i + 2] + x;\n\t\t\t\t\t\tcpy = +args[i + 3] + y;\n\t\t\t\t\t\tx += +args[i + 4];\n\t\t\t\t\t\ty += +args[i + 5];\n\t\t\t\t\t\tthis.bezierCurveTo(x1, y1, cpx, cpy, x, y);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"S\":\n\t\t\t\t\tcheckEvenArgs(name, args.length, 4);\n\t\t\t\t\tif (cpx === null || cpy === null) {\n\t\t\t\t\t\tcpx = x;\n\t\t\t\t\t\tcpy = y;\n\t\t\t\t\t}\n\t\t\t\t\tfor (let i = 0; i < args.length; i += 4) {\n\t\t\t\t\t\tconst x1 = 2 * x - cpx;\n\t\t\t\t\t\tconst y1 = 2 * y - cpy;\n\t\t\t\t\t\tcpx = +args[i];\n\t\t\t\t\t\tcpy = +args[i + 1];\n\t\t\t\t\t\tx = +args[i + 2];\n\t\t\t\t\t\ty = +args[i + 3];\n\t\t\t\t\t\tthis.bezierCurveTo(x1, y1, cpx, cpy, x, y);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"s\":\n\t\t\t\t\tcheckEvenArgs(name, args.length, 4);\n\t\t\t\t\tif (cpx === null || cpy === null) {\n\t\t\t\t\t\tcpx = x;\n\t\t\t\t\t\tcpy = y;\n\t\t\t\t\t}\n\t\t\t\t\tfor (let i = 0; i < args.length; i += 4) {\n\t\t\t\t\t\tconst x1 = 2 * x - cpx;\n\t\t\t\t\t\tconst y1 = 2 * y - cpy;\n\t\t\t\t\t\tcpx = +args[i] + x;\n\t\t\t\t\t\tcpy = +args[i + 1] + y;\n\t\t\t\t\t\tx += +args[i + 2];\n\t\t\t\t\t\ty += +args[i + 3];\n\t\t\t\t\t\tthis.bezierCurveTo(x1, y1, cpx, cpy, x, y);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"Q\":\n\t\t\t\t\tcheckEvenArgs(name, args.length, 4);\n\t\t\t\t\tfor (let i = 0; i < args.length; i += 4) {\n\t\t\t\t\t\tqcpx = +args[i];\n\t\t\t\t\t\tqcpy = +args[i + 1];\n\t\t\t\t\t\tx = +args[i + 2];\n\t\t\t\t\t\ty = +args[i + 3];\n\t\t\t\t\t\tthis.quadraticCurveTo(qcpx, qcpy, x, y);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"q\":\n\t\t\t\t\tcheckEvenArgs(name, args.length, 4);\n\t\t\t\t\tfor (let i = 0; i < args.length; i += 4) {\n\t\t\t\t\t\tqcpx = +args[i] + x;\n\t\t\t\t\t\tqcpy = +args[i + 1] + y;\n\t\t\t\t\t\tx += +args[i + 2];\n\t\t\t\t\t\ty += +args[i + 3];\n\t\t\t\t\t\tthis.quadraticCurveTo(qcpx, qcpy, x, y);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"T\":\n\t\t\t\t\tcheckEvenArgs(name, args.length, 2);\n\t\t\t\t\tif (qcpx === null || qcpy === null) {\n\t\t\t\t\t\tqcpx = x;\n\t\t\t\t\t\tqcpy = y;\n\t\t\t\t\t}\n\t\t\t\t\tfor (let i = 0; i < args.length; i += 2) {\n\t\t\t\t\t\tqcpx = 2 * x - qcpx;\n\t\t\t\t\t\tqcpy = 2 * y - qcpy;\n\t\t\t\t\t\tx = +args[i];\n\t\t\t\t\t\ty = +args[i + 1];\n\t\t\t\t\t\tthis.quadraticCurveTo(qcpx, qcpy, x, y);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"t\":\n\t\t\t\t\tcheckEvenArgs(name, args.length, 2);\n\t\t\t\t\tif (qcpx === null || qcpy === null) {\n\t\t\t\t\t\tqcpx = x;\n\t\t\t\t\t\tqcpy = y;\n\t\t\t\t\t}\n\t\t\t\t\tfor (let i = 0; i < args.length; i += 2) {\n\t\t\t\t\t\tqcpx = 2 * x - qcpx;\n\t\t\t\t\t\tqcpy = 2 * y - qcpy;\n\t\t\t\t\t\tx += +args[i];\n\t\t\t\t\t\ty += +args[i + 1];\n\t\t\t\t\t\tthis.quadraticCurveTo(qcpx, qcpy, x, y);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"A\":\n\t\t\t\tcase \"a\":\n\t\t\t\t\tconst relative = (name === \"a\");\n\n\t\t\t\t\tsplitArcFlags(args);\n\t\t\t\t\tcheckEvenArgs(name, args.length, 7);\n\n\t\t\t\t\tfor (let i = 0; i < args.length; i += 7) {\n\t\t\t\t\t\tlet cx = +args[i + 5];\n\t\t\t\t\t\tlet cy = +args[i + 6];\n\n\t\t\t\t\t\tif (relative) {\n\t\t\t\t\t\t\tcx += x;\n\t\t\t\t\t\t\tcy += y;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst bs = arcToBezier({\n\t\t\t\t\t\t\tpx: x,\n\t\t\t\t\t\t\tpy: y,\n\t\t\t\t\t\t\trx: +args[i],\n\t\t\t\t\t\t\try: +args[i + 1],\n\t\t\t\t\t\t\txAxisRotation: +args[i + 2],\n\t\t\t\t\t\t\tlargeArcFlag: assertBinary(+args[i + 3]),\n\t\t\t\t\t\t\tsweepFlag: assertBinary(+args[i + 4]),\n\t\t\t\t\t\t\tcx,\n\t\t\t\t\t\t\tcy,\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\t$array.each(bs, (b) => {\n\t\t\t\t\t\t\tthis.bezierCurveTo(b.x1, b.y1, b.x2, b.y2, b.x, b.y);\n\t\t\t\t\t\t\tx = b.x;\n\t\t\t\t\t\t\ty = b.y;\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"Z\":\n\t\t\t\tcase \"z\":\n\t\t\t\t\tcheckArgs(name, args.length, 0);\n\t\t\t\t\tthis.closePath();\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\n\tpublic _runPath(context: CanvasRenderingContext2D): void {\n\t\tcontext.beginPath();\n\n\t\t$array.each(this._operations, (op) => {\n\t\t\top.path(context);\n\t\t});\n\t}\n\n\tprotected _render(status: IStatus): void {\n\t\tsuper._render(status);\n\n\t\tconst layerDirty = status.layer.dirty;\n\t\tconst interactive = this._isInteractive(status);\n\n\t\tif (layerDirty || interactive) {\n\n\t\t\tconst context = status.layer.context;\n\t\t\tconst ghostContext = this._renderer._ghostLayer.context;\n\n\t\t\tif (layerDirty) {\n\t\t\t\tcontext.globalCompositeOperation = this.blendMode;\n\n\t\t\t\tcontext.beginPath();\n\t\t\t}\n\n\t\t\tlet color: string | undefined;\n\n\t\t\tif (interactive) {\n\t\t\t\tghostContext.beginPath();\n\t\t\t\tcolor = this._getColorId();\n\t\t\t}\n\n\t\t\t$array.each(this._operations, (op) => {\n\t\t\t\tif (layerDirty) {\n\t\t\t\t\top.path(context);\n\t\t\t\t\top.colorize(context, undefined);\n\t\t\t\t}\n\n\t\t\t\tif (interactive) {\n\t\t\t\t\top.pathGhost(ghostContext);\n\t\t\t\t\top.colorizeGhost(ghostContext, color);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tpublic renderDetached(context: CanvasRenderingContext2D): void {\n\t\tif (this.visible) {\n\t\t\tthis._setMatrix();\n\n\t\t\tcontext.save();\n\n\t\t\t// We must apply the mask before we transform the element\n\t\t\tconst mask = this.mask;\n\t\t\tif (mask) {\n\t\t\t\tmask._setMatrix();\n\t\t\t\tmask._transform(context, 1);\n\t\t\t\tmask._runPath(context);\n\t\t\t\tcontext.clip();\n\t\t\t}\n\n\t\t\t// TODO handle compoundAlpha somehow ?\n\t\t\tcontext.globalAlpha = this.compoundAlpha * this.alpha;\n\n\t\t\tthis._transform(context, 1);\n\n\t\t\tif (this.filter) {\n\t\t\t\tcontext.filter = this.filter;\n\t\t\t}\n\n\t\t\tcontext.globalCompositeOperation = this.blendMode;\n\n\t\t\tcontext.beginPath();\n\n\t\t\t$array.each(this._operations, (op) => {\n\t\t\t\top.path(context);\n\t\t\t\top.colorize(context, undefined);\n\t\t\t});\n\n\t\t\tcontext.restore();\n\t\t}\n\t}\n\n\tpublic _addBounds(bounds: IBounds): void {\n\t\tif (this.visible && this.isMeasured) {\n\t\t\t$array.each(this._operations, (op) => {\n\t\t\t\top.addBounds(bounds);\n\t\t\t});\n\t\t}\n\t}\n}\n\n/**\n * @ignore\n */\ninterface ILineChunk {\n\tstyle: string | undefined,\n\tfill: Color | undefined,\n\ttext: string,\n\twidth: number,\n\theight: number,\n\tleft: number,\n\tright: number,\n\tascent: number,\n\toffsetX: number,\n\toffsetY: number,\n\ttextDecoration: string | undefined,\n\tverticalAlign?: \"baseline\" | \"sub\" | \"super\"\n}\n\n/**\n * @ignore\n */\ninterface ILine {\n\toffsetY: number,\n\tascent: number,\n\twidth: number,\n\theight: number,\n\tleft: number,\n\tright: number,\n\ttextChunks: Array<ILineChunk>,\n}\n\n/**\n * @ignore\n */\nexport class CanvasText extends CanvasDisplayObject implements IText {\n\tpublic text: string;\n\tpublic style: CanvasTextStyle;\n\tpublic resolution: number = 1;\n\tpublic textVisible: boolean = true;\n\tpublic truncated?: boolean;\n\n\tprotected _textInfo: Array<ILine> | undefined;\n\tprotected _originalScale?: number = 1;\n\n\tconstructor(renderer: CanvasRenderer, text: string, style: CanvasTextStyle) {\n\t\tsuper(renderer);\n\t\tthis.text = text;\n\t\tthis.style = style;\n\t}\n\n\tpublic invalidateBounds(): void {\n\t\tsuper.invalidateBounds();\n\t\tthis._textInfo = undefined;\n\t}\n\n\tprivate _shared(context: CanvasRenderingContext2D) {\n\t\tif (this.style.textAlign) {\n\t\t\tcontext.textAlign = this.style.textAlign;\n\t\t}\n\n\t\tif (this.style.direction) {\n\t\t\tcontext.direction = this.style.direction;\n\t\t}\n\n\t\tif (this.style.textBaseline) {\n\t\t\tcontext.textBaseline = this.style.textBaseline;\n\t\t}\n\n\t}\n\n\tprotected _prerender(status: IStatus, ignoreGhost = false, ignoreFontWeight = false): void {\n\t\tsuper._render(status);\n\n\t\tconst context = status.layer.context;\n\t\tconst ghostContext = this._renderer._ghostLayer.context;\n\n\t\t// Font style\n\n\t\tconst style = this.style;\n\t\tlet fontStyle = this._getFontStyle(undefined, ignoreFontWeight);\n\n\t\tcontext.font = fontStyle;\n\t\tif (this._isInteractive(status) && !ignoreGhost) {\n\t\t\tghostContext.font = fontStyle;\n\t\t}\n\n\t\t// Other parameters\n\t\tif (style.fill) {\n\t\t\tif (style.fill instanceof Color) {\n\t\t\t\tcontext.fillStyle = style.fill.toCSS(style.fillOpacity != undefined ? style.fillOpacity : 1);\n\t\t\t} else {\n\t\t\t\tcontext.fillStyle = style.fill;\n\t\t\t}\n\t\t}\n\n\t\tif (style.shadowColor) {\n\t\t\tstatus.layer.context.shadowColor = style.shadowColor.toCSS(style.shadowOpacity || 1);\n\t\t}\n\t\tif (style.shadowBlur) {\n\t\t\tstatus.layer.context.shadowBlur = style.shadowBlur;\n\t\t}\n\t\tif (style.shadowOffsetX) {\n\t\t\tstatus.layer.context.shadowOffsetX = style.shadowOffsetX;\n\t\t}\n\t\tif (style.shadowOffsetY) {\n\t\t\tstatus.layer.context.shadowOffsetY = style.shadowOffsetY;\n\t\t}\n\n\t\tthis._shared(context);\n\n\t\tif (this._isInteractive(status) && !ignoreGhost) {\n\t\t\tghostContext.fillStyle = this._getColorId();\n\t\t\tthis._shared(ghostContext);\n\t\t}\n\t}\n\n\tprotected _getFontStyle(style2?: ITextStyle, ignoreFontWeight = false): string {\n\n\t\t// Process defaults\n\t\tconst style = this.style;\n\t\tlet fontStyle: string[] = [];\n\n\t\tif (style2 && style2.fontVariant) {\n\t\t\tfontStyle.push(style2.fontVariant);\n\t\t}\n\t\telse if (style.fontVariant) {\n\t\t\tfontStyle.push(style.fontVariant);\n\t\t}\n\n\t\tif (!ignoreFontWeight) {\n\t\t\tif (style2 && style2.fontWeight) {\n\t\t\t\tfontStyle.push(style2.fontWeight);\n\t\t\t}\n\t\t\telse if (style.fontWeight) {\n\t\t\t\tfontStyle.push(style.fontWeight);\n\t\t\t}\n\t\t}\n\n\t\tif (style2 && style2.fontStyle) {\n\t\t\tfontStyle.push(style2.fontStyle);\n\t\t}\n\t\telse if (style.fontStyle) {\n\t\t\tfontStyle.push(style.fontStyle);\n\t\t}\n\n\t\tif (style2 && style2.fontSize) {\n\t\t\tif ($type.isNumber(style2.fontSize)) {\n\t\t\t\tstyle2.fontSize = style2.fontSize + \"px\";\n\t\t\t}\n\t\t\tfontStyle.push(style2.fontSize);\n\t\t}\n\t\telse if (style.fontSize) {\n\t\t\tif ($type.isNumber(style.fontSize)) {\n\t\t\t\tstyle.fontSize = style.fontSize + \"px\";\n\t\t\t}\n\t\t\tfontStyle.push(style.fontSize);\n\t\t}\n\n\t\tif (style2 && style2.fontFamily) {\n\t\t\tfontStyle.push(style2.fontFamily);\n\t\t}\n\t\telse if (style.fontFamily) {\n\t\t\tfontStyle.push(style.fontFamily);\n\t\t}\n\t\telse if (fontStyle.length) {\n\t\t\tfontStyle.push(\"Arial\");\n\t\t}\n\n\t\treturn fontStyle.join(\" \");\n\t}\n\n\tprotected _render(status: IStatus): void {\n\t\t// We need measurements in order to properly position text for alignment\n\t\tif (!this._textInfo) {\n\t\t\tthis._measure(status);\n\t\t}\n\n\t\tif (this.textVisible) {\n\n\t\t\tconst interactive = this._isInteractive(status);\n\t\t\tconst context = status.layer.context;\n\t\t\tconst layerDirty = status.layer.dirty;\n\t\t\tconst ghostContext = this._renderer._ghostLayer.context;\n\n\t\t\tcontext.save();\n\t\t\tghostContext.save();\n\t\t\tthis._prerender(status);\n\n\t\t\t// const lines = this.text.toString().replace(/\\r/g, \"\").split(/\\n/);\n\t\t\t// const x = this._localBounds && (this._localBounds.left < 0) ? Math.abs(this._localBounds.left) : 0;\n\n\t\t\t// Process text info produced by _measure()\n\t\t\t$array.each(this._textInfo!, (line, _index) => {\n\t\t\t\t$array.each(line.textChunks, (chunk, _index) => {\n\n\t\t\t\t\t// Set style\n\t\t\t\t\tif (chunk.style) {\n\t\t\t\t\t\tcontext.save();\n\t\t\t\t\t\tghostContext.save();\n\n\t\t\t\t\t\tcontext.font = chunk.style;\n\t\t\t\t\t\tif (this._isInteractive(status)) {\n\t\t\t\t\t\t\tghostContext.font = chunk.style;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (chunk.fill) {\n\t\t\t\t\t\tcontext.save();\n\t\t\t\t\t\tcontext.fillStyle = chunk.fill.toCSS();\n\t\t\t\t\t\t// Color does not affect ghostContext so we not set it\n\t\t\t\t\t}\n\n\t\t\t\t\t// Draw text\n\t\t\t\t\tif (layerDirty) {\n\t\t\t\t\t\tcontext.fillText(chunk.text, chunk.offsetX, line.offsetY + chunk.offsetY);\n\t\t\t\t\t}\n\n\t\t\t\t\t// Draw underline\n\t\t\t\t\tif (chunk.textDecoration == \"underline\" || chunk.textDecoration == \"line-through\") {\n\n\t\t\t\t\t\tlet thickness = 1;\n\t\t\t\t\t\tlet offset = 1;\n\t\t\t\t\t\tlet fontSize = chunk.height;\n\n\t\t\t\t\t\tconst oversizedBehavior = this.style.oversizedBehavior || \"\";\n\t\t\t\t\t\tif ([\"truncate\", \"wrap\", \"wrap-no-break\"].indexOf(oversizedBehavior) > -1) {\n\t\t\t\t\t\t\t// Measure actual width of the text so the line fits\n\t\t\t\t\t\t\tconst metrics = this._measureText(chunk.text, context);\n\t\t\t\t\t\t\tchunk.width = metrics.actualBoundingBoxLeft + metrics.actualBoundingBoxRight;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlet offsetX = chunk.offsetX;\n\t\t\t\t\t\tswitch (this.style.textAlign) {\n\t\t\t\t\t\t\tcase \"right\":\n\t\t\t\t\t\t\tcase \"end\":\n\t\t\t\t\t\t\t\toffsetX -= chunk.width;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"center\":\n\t\t\t\t\t\t\t\toffsetX -= chunk.width / 2;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (chunk.style) {\n\t\t\t\t\t\t\tconst format = TextFormatter.getTextStyle(chunk.style);\n\t\t\t\t\t\t\tswitch (format.fontWeight) {\n\t\t\t\t\t\t\t\tcase \"bolder\":\n\t\t\t\t\t\t\t\tcase \"bold\":\n\t\t\t\t\t\t\t\tcase \"700\":\n\t\t\t\t\t\t\t\tcase \"800\":\n\t\t\t\t\t\t\t\tcase \"900\":\n\t\t\t\t\t\t\t\t\tthickness = 2;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (fontSize) {\n\t\t\t\t\t\t\toffset = fontSize / 20;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlet y: number;\n\n\t\t\t\t\t\tif (chunk.textDecoration == \"line-through\") {\n\t\t\t\t\t\t\ty = thickness + line.offsetY + chunk.offsetY - chunk.height / 2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\ty = thickness + offset * 1.5 + line.offsetY + chunk.offsetY;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tcontext.save();\n\t\t\t\t\t\tcontext.beginPath();\n\t\t\t\t\t\tif (chunk.fill) {\n\t\t\t\t\t\t\tcontext.strokeStyle = chunk.fill.toCSS();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (this.style.fill && this.style.fill instanceof Color) {\n\t\t\t\t\t\t\tcontext.strokeStyle = this.style.fill.toCSS();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcontext.lineWidth = thickness * offset;\n\t\t\t\t\t\tcontext.moveTo(offsetX, y);\n\t\t\t\t\t\tcontext.lineTo(offsetX + chunk.width, y);\n\t\t\t\t\t\tcontext.stroke();\n\t\t\t\t\t\tcontext.restore();\n\t\t\t\t\t}\n\n\t\t\t\t\tif (interactive && this.interactive) {\n\t\t\t\t\t\t// Draw text in ghost canvas ONLY if it is set as interactive\n\t\t\t\t\t\t// explicitly. This way we avoid hit test anomalies caused by anti\n\t\t\t\t\t\t// aliasing of text.\n\t\t\t\t\t\tghostContext.fillText(chunk.text, chunk.offsetX, line.offsetY + chunk.offsetY);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (chunk.fill) {\n\t\t\t\t\t\tcontext.restore();\n\t\t\t\t\t\t// Color does not affect ghostContext so we not set it\n\t\t\t\t\t}\n\n\t\t\t\t\t// Reset style\n\t\t\t\t\tif (chunk.style) {\n\t\t\t\t\t\tcontext.restore();\n\t\t\t\t\t\tghostContext.restore();\n\t\t\t\t\t}\n\n\t\t\t\t});\n\t\t\t});\n\n\t\t\tcontext.restore();\n\t\t\tghostContext.restore();\n\t\t}\n\t}\n\n\tpublic _addBounds(bounds: IBounds): void {\n\t\tif (this.visible && this.isMeasured) {\n\t\t\t//if (this._textVisible) {\n\t\t\tconst x = this._measure({\n\t\t\t\tinactive: this.inactive,\n\t\t\t\tlayer: this.getLayer(),\n\t\t\t});\n\t\t\tsetPoint(bounds, { x: x.left, y: x.top });\n\t\t\tsetPoint(bounds, { x: x.right, y: x.bottom });\n\t\t\t//}\n\t\t}\n\t}\n\n\tprotected _ignoreFontWeight(): boolean {\n\t\treturn /apple/i.test(navigator.vendor);\n\t}\n\n\tpublic _measure(status: IStatus): IBounds {\n\t\tconst context = status.layer.context;\n\t\tconst ghostContext = this._renderer._ghostLayer.context;\n\t\tconst rtl = this.style.direction == \"rtl\";\n\n\t\t// Reset text info\n\t\tthis._textInfo = [];\n\n\t\t// Init\n\t\tconst oversizedBehavior = this.style.oversizedBehavior;\n\t\tconst maxWidth = this.style.maxWidth!;\n\n\t\tconst truncate = $type.isNumber(maxWidth) && oversizedBehavior == \"truncate\";\n\t\tconst wrap = $type.isNumber(maxWidth) && (oversizedBehavior == \"wrap\" || oversizedBehavior == \"wrap-no-break\");\n\n\t\t// Pre-render\n\t\tcontext.save();\n\t\tghostContext.save();\n\t\tthis._prerender(status, true, this._ignoreFontWeight());\n\n\t\t// Get default font metrix\n\t\tconst refText = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 \";\n\n\t\t// Split up text into lines\n\t\tconst lines = this.text.toString().replace(/\\r/g, \"\").split(/\\n/);\n\t\tlet styleRestored = true;\n\t\tlet minX = 0;\n\t\tlet maxX = 0;\n\n\t\t// Iterate through the lines\n\t\tlet offsetY = 0;\n\t\tlet currentStyle: string | undefined;\n\t\t$array.each(lines, (line, _index) => {\n\n\t\t\t// Split up line into format/value chunks\n\t\t\tlet chunks: ITextChunk[];\n\t\t\tif (line == \"\") {\n\t\t\t\tchunks = [{\n\t\t\t\t\ttype: \"value\",\n\t\t\t\t\ttext: \"\"\n\t\t\t\t}];\n\t\t\t}\n\t\t\telse {\n\t\t\t\tchunks = TextFormatter.chunk(line, false, this.style.ignoreFormatting);\n\t\t\t}\n\n\t\t\twhile (chunks.length > 0) {\n\n\t\t\t\t// Init line object\n\t\t\t\tlet lineInfo: ILine = {\n\t\t\t\t\toffsetY: offsetY,\n\t\t\t\t\tascent: 0,\n\t\t\t\t\twidth: 0,\n\t\t\t\t\theight: 0,\n\t\t\t\t\tleft: 0,\n\t\t\t\t\tright: 0,\n\t\t\t\t\ttextChunks: []\n\t\t\t\t};\n\n\t\t\t\t// Measure reference text\n\t\t\t\tconst metrics = this._measureText(refText, context);\n\n\t\t\t\tconst height = metrics.actualBoundingBoxAscent + metrics.actualBoundingBoxDescent;\n\t\t\t\tlineInfo.height = height;\n\t\t\t\tlineInfo.ascent = metrics.actualBoundingBoxAscent;\n\n\t\t\t\tlet currentFormat: string;\n\t\t\t\tlet currentDecoration: string | undefined = this.style.textDecoration;\n\t\t\t\tlet currentFill: Color | undefined;\n\t\t\t\tlet currentChunkWidth: number | undefined;\n\t\t\t\tlet skipFurtherText = false;\n\t\t\t\tlet firstTextChunk = true;\n\t\t\t\tlet leftoverChunks: Array<ITextChunk> = [];\n\t\t\t\tlet currentVerticalAlign: \"baseline\" | \"sub\" | \"super\" | undefined;\n\t\t\t\t//let offsetX = 0;\n\t\t\t\t//let chunk;\n\n\t\t\t\t//while(chunk = chunks.shift()) {\n\t\t\t\t$array.eachContinue(chunks, (chunk, index) => {\n\n\t\t\t\t\t// Format chunk\n\t\t\t\t\tif (chunk.type == \"format\") {\n\t\t\t\t\t\tif (chunk.text == \"[/]\") {\n\t\t\t\t\t\t\tif (!styleRestored) {\n\t\t\t\t\t\t\t\tcontext.restore();\n\t\t\t\t\t\t\t\tghostContext.restore();\n\t\t\t\t\t\t\t\tstyleRestored = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcurrentFill = undefined;\n\t\t\t\t\t\t\tcurrentStyle = undefined;\n\t\t\t\t\t\t\tcurrentChunkWidth = undefined;\n\t\t\t\t\t\t\tcurrentDecoration = this.style.textDecoration;\n\t\t\t\t\t\t\tcurrentVerticalAlign = undefined\n\t\t\t\t\t\t\tcurrentFormat = chunk.text;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\tif (!styleRestored) {\n\t\t\t\t\t\t\t\tcontext.restore();\n\t\t\t\t\t\t\t\tghostContext.restore();\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tlet format = TextFormatter.getTextStyle(chunk.text);\n\t\t\t\t\t\t\tconst fontStyle = this._getFontStyle(format);\n\t\t\t\t\t\t\tcontext.save();\n\t\t\t\t\t\t\tghostContext.save();\n\t\t\t\t\t\t\tcontext.font = fontStyle;\n\t\t\t\t\t\t\tcurrentStyle = fontStyle;\n\t\t\t\t\t\t\tcurrentFormat = chunk.text;\n\t\t\t\t\t\t\tif (format.textDecoration) {\n\t\t\t\t\t\t\t\tcurrentDecoration = format.textDecoration;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (format.fill) {\n\t\t\t\t\t\t\t\tcurrentFill = <Color>format.fill;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ((<any>format).width) {\n\t\t\t\t\t\t\t\tcurrentChunkWidth = $type.toNumber((<any>format).width);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (format.verticalAlign) {\n\t\t\t\t\t\t\t\tcurrentVerticalAlign = format.verticalAlign;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tstyleRestored = false;\n\n\t\t\t\t\t\t\t// Measure reference text after change of format\n\t\t\t\t\t\t\tconst metrics = this._measureText(refText, context);\n\t\t\t\t\t\t\tconst height = metrics.actualBoundingBoxAscent + metrics.actualBoundingBoxDescent;\n\t\t\t\t\t\t\tif (height > lineInfo.height) {\n\t\t\t\t\t\t\t\tlineInfo.height = height;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (metrics.actualBoundingBoxAscent > lineInfo.ascent) {\n\t\t\t\t\t\t\t\tlineInfo.ascent = metrics.actualBoundingBoxAscent;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Text chunk\n\t\t\t\t\telse if (chunk.type == \"value\" && !skipFurtherText) {\n\n\t\t\t\t\t\t// Measure\n\t\t\t\t\t\tconst metrics = this._measureText(chunk.text, context);\n\t\t\t\t\t\tlet chunkWidth = metrics.actualBoundingBoxLeft + metrics.actualBoundingBoxRight;\n\n\t\t\t\t\t\t// Check for fit\n\t\t\t\t\t\tif (truncate) {\n\n\t\t\t\t\t\t\tthis.truncated = undefined;\n\n\t\t\t\t\t\t\t// Break words?\n\t\t\t\t\t\t\tlet breakWords = firstTextChunk || this.style.breakWords || false;\n\n\t\t\t\t\t\t\t// Measure ellipsis and check if it fits\n\t\t\t\t\t\t\tconst ellipsis = this.style.ellipsis || \"\";\n\t\t\t\t\t\t\tconst ellipsisMetrics = this._measureText(ellipsis, context);\n\t\t\t\t\t\t\tconst ellipsisWidth = ellipsisMetrics.actualBoundingBoxLeft + ellipsisMetrics.actualBoundingBoxRight;\n\n\t\t\t\t\t\t\t// Check fit\n\t\t\t\t\t\t\tif ((lineInfo.width + chunkWidth) > maxWidth) {\n\t\t\t\t\t\t\t\tconst excessWidth = maxWidth - lineInfo.width - ellipsisWidth;\n\t\t\t\t\t\t\t\tchunk.text = this._truncateText(context, chunk.text, excessWidth, breakWords);\n\t\t\t\t\t\t\t\tchunk.text += ellipsis;\n\t\t\t\t\t\t\t\tskipFurtherText = true;\n\t\t\t\t\t\t\t\tthis.truncated = true;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (wrap) {\n\t\t\t\t\t\t\t// Check fit\n\t\t\t\t\t\t\tif ((lineInfo.width + chunkWidth) > maxWidth) {\n\t\t\t\t\t\t\t\tconst excessWidth = maxWidth - lineInfo.width;\n\t\t\t\t\t\t\t\tconst tmpText = this._truncateText(\n\t\t\t\t\t\t\t\t\tcontext,\n\t\t\t\t\t\t\t\t\tchunk.text,\n\t\t\t\t\t\t\t\t\texcessWidth,\n\t\t\t\t\t\t\t\t\tfalse,\n\t\t\t\t\t\t\t\t\t(firstTextChunk && this.style.oversizedBehavior != \"wrap-no-break\")\n\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\tif (tmpText == \"\") {\n\t\t\t\t\t\t\t\t\t// Unable to fit a single letter - hide the whole label\n\t\t\t\t\t\t\t\t\tthis.textVisible = true;\n\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t//skipFurtherText = true;\n\n\t\t\t\t\t\t\t\t//Add remaining chunks for the next line\n\t\t\t\t\t\t\t\tleftoverChunks = chunks.slice(index + 1);\n\n\t\t\t\t\t\t\t\t//Add remaining text of current chunk if it was forced-cut\n\t\t\t\t\t\t\t\tif ($utils.trim(tmpText) != $utils.trim(chunk.text)) {\n\t\t\t\t\t\t\t\t\tleftoverChunks.unshift({\n\t\t\t\t\t\t\t\t\t\ttype: \"value\",\n\t\t\t\t\t\t\t\t\t\ttext: chunk.text.substr(tmpText.length)\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\tif (currentFormat) {\n\t\t\t\t\t\t\t\t\t\tleftoverChunks.unshift({\n\t\t\t\t\t\t\t\t\t\t\ttype: \"format\",\n\t\t\t\t\t\t\t\t\t\t\ttext: currentFormat\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Set current chunk (truncated)\n\t\t\t\t\t\t\t\tchunk.text = $utils.trim(tmpText);\n\n\t\t\t\t\t\t\t\tchunks = [];\n\t\t\t\t\t\t\t\tskipFurtherText = true;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Chunk width?\n\t\t\t\t\t\tlet leftBoundMod = 1;\n\t\t\t\t\t\tlet rightBoundMod = 1;\n\t\t\t\t\t\tif (currentStyle && currentChunkWidth && (currentChunkWidth > chunkWidth)) {\n\t\t\t\t\t\t\t// increase horizontal bounding boxes accordingly\n\t\t\t\t\t\t\tconst boundsMod = chunkWidth / currentChunkWidth\n\t\t\t\t\t\t\tswitch (this.style.textAlign) {\n\t\t\t\t\t\t\t\tcase \"right\":\n\t\t\t\t\t\t\t\tcase \"end\":\n\t\t\t\t\t\t\t\t\tleftBoundMod = boundsMod;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase \"center\":\n\t\t\t\t\t\t\t\t\tleftBoundMod = boundsMod;\n\t\t\t\t\t\t\t\t\trightBoundMod = boundsMod;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\trightBoundMod = boundsMod;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tchunkWidth = currentChunkWidth;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst chunkHeight = metrics.actualBoundingBoxAscent + metrics.actualBoundingBoxDescent;\n\n\n\t\t\t\t\t\tif (chunkHeight > lineInfo.height) {\n\t\t\t\t\t\t\tlineInfo.height = chunkHeight;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (metrics.actualBoundingBoxAscent > lineInfo.ascent) {\n\t\t\t\t\t\t\tlineInfo.ascent = metrics.actualBoundingBoxAscent;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlineInfo.width += chunkWidth;\n\t\t\t\t\t\tlineInfo.left += metrics.actualBoundingBoxLeft / leftBoundMod;\n\t\t\t\t\t\tlineInfo.right += metrics.actualBoundingBoxRight / rightBoundMod;\n\t\t\t\t\t\tlineInfo.textChunks.push({\n\t\t\t\t\t\t\tstyle: currentStyle,\n\t\t\t\t\t\t\tfill: currentFill,\n\t\t\t\t\t\t\ttext: chunk.text,\n\t\t\t\t\t\t\twidth: chunkWidth,\n\t\t\t\t\t\t\theight: chunkHeight,\n\t\t\t\t\t\t\tleft: metrics.actualBoundingBoxLeft,\n\t\t\t\t\t\t\tright: metrics.actualBoundingBoxRight,\n\t\t\t\t\t\t\tascent: metrics.actualBoundingBoxAscent,\n\t\t\t\t\t\t\toffsetX: 0,\n\t\t\t\t\t\t\toffsetY: 0,\n\t\t\t\t\t\t\ttextDecoration: currentDecoration,\n\t\t\t\t\t\t\tverticalAlign: currentVerticalAlign\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\t//offsetX += chunkWidth;\n\n\t\t\t\t\t\tfirstTextChunk = false;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif (leftoverChunks) {\n\t\t\t\t\t\t//return false;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn true;\n\n\t\t\t\t\t//}\n\t\t\t\t});\n\n\t\t\t\tif (this.style.lineHeight instanceof Percent) {\n\t\t\t\t\tlineInfo.height *= this.style.lineHeight.value;\n\t\t\t\t\tlineInfo.ascent *= this.style.lineHeight.value;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tlineInfo.height *= this.style.lineHeight || 1.2;\n\t\t\t\t\tlineInfo.ascent *= this.style.lineHeight || 1.2;\n\t\t\t\t}\n\n\t\t\t\tif (minX < lineInfo.left) {\n\t\t\t\t\tminX = lineInfo.left;\n\t\t\t\t}\n\n\t\t\t\tif (maxX < lineInfo.right) {\n\t\t\t\t\tmaxX = lineInfo.right;\n\t\t\t\t}\n\n\t\t\t\tthis._textInfo!.push(lineInfo);\n\n\t\t\t\t//lineInfo.offsetY += lineInfo.ascent;\n\t\t\t\toffsetY += lineInfo.height;\n\n\t\t\t\t// Reset chunks so that it can proceed to the next line\n\t\t\t\tchunks = leftoverChunks || [];\n\t\t\t}\n\n\t\t});\n\n\t\tif (!styleRestored) {\n\t\t\tcontext.restore();\n\t\t\tghostContext.restore();\n\t\t}\n\n\t\t// Adjust chunk internal offsets\n\t\t$array.each(this._textInfo, (lineInfo, _index: number) => {\n\t\t\tlet currentChunkOffset = 0\n\t\t\t$array.each(lineInfo.textChunks, (chunk) => {\n\t\t\t\tchunk.offsetX = currentChunkOffset + chunk.left - lineInfo.left;\n\t\t\t\tchunk.offsetY += lineInfo.height - lineInfo.height * (this.style.baselineRatio || 0.19);\n\t\t\t\tcurrentChunkOffset += chunk.width;\n\n\t\t\t\tif (chunk.verticalAlign) {\n\t\t\t\t\tswitch (chunk.verticalAlign) {\n\t\t\t\t\t\tcase \"super\":\n\t\t\t\t\t\t\tchunk.offsetY -= lineInfo.height / 2 - chunk.height / 2;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"sub\":\n\t\t\t\t\t\t\tchunk.offsetY += chunk.height / 2;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\n\t\tconst bounds = {\n\t\t\tleft: rtl ? -maxX : -minX,\n\t\t\ttop: 0,\n\t\t\tright: rtl ? minX : maxX,\n\t\t\tbottom: offsetY,\n\t\t};\n\n\n\t\t// We need to fit?\n\t\tif (oversizedBehavior !== \"none\") {\n\t\t\tconst ratio = this._fitRatio(bounds);\n\t\t\tif (ratio < 1) {\n\t\t\t\tif (oversizedBehavior == \"fit\") {\n\t\t\t\t\tif ($type.isNumber(this.style.minScale) && (ratio < this.style.minScale)) {\n\t\t\t\t\t\tthis.textVisible = false;\n\t\t\t\t\t\tbounds.left = 0;\n\t\t\t\t\t\tbounds.top = 0;\n\t\t\t\t\t\tbounds.right = 0;\n\t\t\t\t\t\tbounds.bottom = 0;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (!this._originalScale) {\n\t\t\t\t\t\t\tthis._originalScale = this.scale;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.scale = ratio;\n\t\t\t\t\t\tthis.textVisible = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (oversizedBehavior == \"hide\") {\n\t\t\t\t\tthis.textVisible = false;\n\t\t\t\t\tbounds.left = 0;\n\t\t\t\t\tbounds.top = 0;\n\t\t\t\t\tbounds.right = 0;\n\t\t\t\t\tbounds.bottom = 0;\n\t\t\t\t}\n\t\t\t\telse {\n\n\t\t\t\t\tswitch (this.style.textAlign) {\n\t\t\t\t\t\tcase \"right\":\n\t\t\t\t\t\tcase \"end\":\n\t\t\t\t\t\t\tbounds.left = rtl ? maxWidth : -maxWidth;\n\t\t\t\t\t\t\tbounds.right = 0;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"center\":\n\t\t\t\t\t\t\tbounds.left = -maxWidth / 2;\n\t\t\t\t\t\t\tbounds.right = maxWidth / 2;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tbounds.left = 0;\n\t\t\t\t\t\t\tbounds.right = rtl ? -maxWidth : maxWidth;\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.scale = this._originalScale || 1;\n\t\t\t\t\tthis._originalScale = undefined;\n\t\t\t\t\tthis.textVisible = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.scale = this._originalScale || 1;\n\t\t\t\tthis._originalScale = undefined;\n\t\t\t\tthis.textVisible = true;\n\t\t\t}\n\t\t}\n\n\t\tcontext.restore();\n\t\tghostContext.restore();\n\n\t\treturn bounds;\n\t}\n\n\tprotected _fitRatio(bounds: IBounds): number {\n\t\tconst maxW = this.style.maxWidth;\n\t\tconst maxH = this.style.maxHeight;\n\t\tif (!$type.isNumber(maxW) && !$type.isNumber(maxH)) {\n\t\t\treturn 1;\n\t\t}\n\t\tconst w = bounds.right - bounds.left;\n\t\tconst h = bounds.bottom - bounds.top;\n\t\treturn Math.min(maxW! / w || 1, maxH! / h || 1);\n\t}\n\n\tprotected _truncateText(context: CanvasRenderingContext2D, text: string, maxWidth: number, breakWords: boolean = false, fallbackBreakWords: boolean = true): string {\n\t\tlet width: number;\n\t\tdo {\n\t\t\tif (breakWords) {\n\t\t\t\ttext = text.slice(0, -1);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tlet tmp = text.replace(/[^,;:!?\\\\\\/\\s​]+[,;:!?\\\\\\/\\s​]*$/g, \"\");\n\t\t\t\tif ((tmp == \"\" || tmp === text) && fallbackBreakWords) {\n\t\t\t\t\tbreakWords = true;\n\t\t\t\t}\n\t\t\t\telse if (tmp == \"\") {\n\t\t\t\t\treturn text;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\ttext = tmp;\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst metrics = this._measureText(text, context);\n\t\t\twidth = metrics.actualBoundingBoxLeft + metrics.actualBoundingBoxRight;\n\t\t} while ((width > maxWidth) && text != \"\");\n\t\treturn text;\n\t}\n\n\tprotected _measureText(text: string, context: CanvasRenderingContext2D): TextMetrics {\n\t\tlet metrics = context.measureText(text);\n\t\tlet fakeMetrics: any = {};\n\t\tif (metrics.actualBoundingBoxAscent == null) {\n\t\t\tconst div = document.createElement(\"div\");\n\t\t\tdiv.innerText = text;\n\t\t\tdiv.style.visibility = \"hidden\";\n\t\t\tdiv.style.position = \"absolute\";\n\t\t\tdiv.style.top = \"-1000000px;\"\n\t\t\tdiv.style.fontFamily = this.style.fontFamily || \"\";\n\t\t\tdiv.style.fontSize = this.style.fontSize + \"\";\n\t\t\tdocument.body.appendChild(div);\n\t\t\tconst bbox = div.getBoundingClientRect();\n\t\t\tdocument.body.removeChild(div);\n\t\t\tconst h = bbox.height;\n\t\t\tconst w = metrics.width;\n\t\t\tlet left = 0;\n\t\t\tlet right = w;\n\n\t\t\tfakeMetrics = {\n\t\t\t\tactualBoundingBoxAscent: h,\n\t\t\t\tactualBoundingBoxDescent: 0,\n\t\t\t\tactualBoundingBoxLeft: left,\n\t\t\t\tactualBoundingBoxRight: right,\n\t\t\t\tfontBoundingBoxAscent: h,\n\t\t\t\tfontBoundingBoxDescent: 0,\n\t\t\t\twidth: w\n\t\t\t}\n\t\t\t//return fake;\n\t\t}\n\t\telse {\n\t\t\tfakeMetrics = {\n\t\t\t\tactualBoundingBoxAscent: metrics.actualBoundingBoxAscent,\n\t\t\t\tactualBoundingBoxDescent: metrics.actualBoundingBoxDescent,\n\t\t\t\tactualBoundingBoxLeft: metrics.actualBoundingBoxLeft,\n\t\t\t\tactualBoundingBoxRight: metrics.actualBoundingBoxRight,\n\t\t\t\tfontBoundingBoxAscent: metrics.actualBoundingBoxAscent,\n\t\t\t\tfontBoundingBoxDescent: metrics.actualBoundingBoxDescent,\n\t\t\t\twidth: metrics.width\n\t\t\t}\n\t\t}\n\n\t\tconst w = metrics.width;\n\t\tswitch (this.style.textAlign) {\n\t\t\tcase \"right\":\n\t\t\tcase \"end\":\n\t\t\t\tfakeMetrics.actualBoundingBoxLeft = w;\n\t\t\t\tfakeMetrics.actualBoundingBoxRight = 0;\n\t\t\t\tbreak;\n\t\t\tcase \"center\":\n\t\t\t\tfakeMetrics.actualBoundingBoxLeft = w / 2;\n\t\t\t\tfakeMetrics.actualBoundingBoxRight = w / 2;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tfakeMetrics.actualBoundingBoxLeft = 0;\n\t\t\t\tfakeMetrics.actualBoundingBoxRight = w;\n\t\t}\n\n\t\treturn fakeMetrics;\n\t}\n\n}\n\n/**\n * @ignore\n */\nexport class CanvasTextStyle implements ITextStyle {\n\t//public wordWrapWidth: number = 100;\n\tpublic fill?: Color | CanvasGradient | CanvasPattern;\n\tpublic fillOpacity?: number;\n\tpublic textAlign?: \"start\" | \"end\" | \"left\" | \"right\" | \"center\";\n\tpublic fontFamily?: string;\n\tpublic fontSize?: string | number;\n\tpublic fontWeight?: 'normal' | 'bold' | 'bolder' | 'lighter' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900'\n\tpublic fontStyle?: 'normal' | 'italic' | 'oblique';\n\tpublic fontVariant?: \"normal\" | \"small-caps\";\n\tpublic textDecoration?: \"underline\" | \"line-through\";\n\tpublic shadowColor?: Color | null;\n\tpublic shadowBlur?: number;\n\tpublic shadowOffsetX?: number;\n\tpublic shadowOffsetY?: number;\n\tpublic shadowOpacity?: number;\n\t// leading?: number;\n\t// letterSpacing?: number;\n\tpublic lineHeight?: number | Percent = percent(120);\n\tpublic baselineRatio?: number = 0.19;\n\t// padding?: number;\n\t// stroke?: number;\n\t// strokeThickness?: number;\n\t// trim?: number;\n\t// wordWrap?: boolean;\n\tpublic direction?: \"ltr\" | \"rtl\";\n\tpublic textBaseline?: \"top\" | \"hanging\" | \"middle\" | \"alphabetic\" | \"ideographic\" | \"bottom\";\n\tpublic oversizedBehavior?: \"none\" | \"hide\" | \"fit\" | \"wrap\" | \"wrap-no-break\" | \"truncate\" = \"none\";\n\tpublic breakWords?: boolean = false;\n\tpublic ellipsis?: string = \"…\";\n\tpublic maxWidth?: number;\n\tpublic maxHeight?: number;\n\tpublic minScale?: number;\n\tpublic ignoreFormatting?: boolean = false;\n}\n\n/**\n * @ignore\n */\nexport class CanvasRadialText extends CanvasText implements IRadialText {\n\tpublic textType?: \"regular\" | \"circular\" | \"radial\" | \"aligned\" | \"adjusted\" = \"circular\";\n\tpublic radius?: number;\n\tpublic startAngle?: number;\n\tpublic inside?: boolean = false;\n\tpublic orientation?: \"inward\" | \"outward\" | \"auto\" = \"auto\";\n\tpublic kerning?: number = 0;\n\n\tprivate _textReversed: boolean = false;\n\n\tpublic _render(status: IStatus): void {\n\t\tswitch (this.textType) {\n\t\t\tcase \"circular\":\n\t\t\t\tthis._renderCircular(status);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tsuper._render(status);\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tpublic _renderCircular(status: IStatus): void {\n\t\tif (this.textVisible) {\n\t\t\tthis._prerender(status);\n\n\t\t\tconst interactive = this._isInteractive(status);\n\t\t\tconst context = status.layer.context;\n\t\t\tconst layerDirty = status.layer.dirty;\n\t\t\tconst ghostContext = this._renderer._ghostLayer.context;\n\n\t\t\t// Savepoint\n\t\t\tcontext.save();\n\t\t\tif (interactive) {\n\t\t\t\tghostContext.save();\n\t\t\t}\n\n\t\t\t// We need measurements in order to properly position text for alignment\n\t\t\tif (!this._textInfo) {\n\t\t\t\tthis._measure(status);\n\t\t\t}\n\n\t\t\t// Init\n\t\t\tlet radius = (this.radius || 0);\n\t\t\tlet startAngle = (this.startAngle || 0);\n\t\t\tlet deltaAngle = 0;\n\t\t\tlet orientation = this.orientation;\n\t\t\tlet inward = orientation == \"auto\" ? \"auto\" : orientation == \"inward\";\n\t\t\tconst inside = this.inside;\n\t\t\tconst align = this.style.textAlign || \"left\";\n\t\t\tconst kerning = this.kerning || 0;\n\t\t\tlet clockwise = align == \"left\" ? 1 : -1;\n\t\t\tconst shouldReverse = !this._textReversed;\n\n\t\t\t// Check if we need to invert the whole stuff\n\t\t\tif (inward == \"auto\") {\n\t\t\t\t// Calc max angle so we know whether we need to flip it\n\t\t\t\tlet maxAngle = 0;\n\t\t\t\tlet midAngle = 0;\n\t\t\t\t$array.each(this._textInfo!, (line, _index) => {\n\t\t\t\t\tconst deltaAngle = startAngle + (line.width / (radius - line.height)) / 2 * -clockwise;\n\t\t\t\t\tif (deltaAngle > maxAngle) {\n\t\t\t\t\t\tmaxAngle = deltaAngle;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tif (align == \"left\") {\n\t\t\t\t\tmidAngle = (maxAngle + deltaAngle / 2) * $math.DEGREES;\n\t\t\t\t}\n\t\t\t\telse if (align == \"right\") {\n\t\t\t\t\tmidAngle = (maxAngle - deltaAngle / 2) * $math.DEGREES;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tmidAngle = startAngle * $math.DEGREES;\n\t\t\t\t}\n\t\t\t\tmidAngle = $math.normalizeAngle(midAngle);\n\t\t\t\tinward = (midAngle >= 270) || (midAngle <= 90);\n\t\t\t}\n\n\t\t\tif (inward == true && shouldReverse) {\n\t\t\t\tthis._textInfo!.reverse();\n\t\t\t\tthis._textReversed = true;\n\t\t\t}\n\n\t\t\t// if ((inward == false && align == \"left\") || (inward == true && align == \"right\")) {\n\t\t\t// \tclockwise *= -1;\n\t\t\t// }\n\n\t\t\t// Process text info produced by _measure()\n\t\t\t$array.each(this._textInfo!, (line, _index) => {\n\n\t\t\t\tconst textHeight = line.height;\n\n\t\t\t\t// Adjust radius (for `inside = false`)\n\t\t\t\t// Radius adjustment for `inside = false` is below the line calculation\n\t\t\t\tif (!inside) {\n\t\t\t\t\tradius += textHeight;\n\t\t\t\t}\n\n\t\t\t\t// Reverse letters if we're painting them counter-clockwise\n\t\t\t\tif (((clockwise == -1 && inward) || (clockwise == 1 && !inward)) && shouldReverse) {\n\t\t\t\t\tline.textChunks.reverse();\n\t\t\t\t}\n\n\t\t\t\t// Init angles\n\t\t\t\tlet lineStartAngle = startAngle;\n\t\t\t\tdeltaAngle = 0;\n\n\t\t\t\t// Adjust for center-align\n\t\t\t\tif (align == \"center\") {\n\t\t\t\t\tlineStartAngle += (line.width / (radius - textHeight)) / 2 * -clockwise;\n\t\t\t\t\tdeltaAngle = lineStartAngle - startAngle;\n\t\t\t\t}\n\n\t\t\t\t// if (inward == \"auto\") {\n\t\t\t\t// \tlet midAngle;\n\t\t\t\t// \tif (align == \"left\") {\n\t\t\t\t// \t\tmidAngle = (lineStartAngle + deltaAngle / 2) * $math.DEGREES;\n\t\t\t\t// \t}\n\t\t\t\t// \telse if () {\n\t\t\t\t// \t\tmidAngle = (lineStartAngle - deltaAngle / 2) * $math.DEGREES;\n\t\t\t\t// \t}\n\t\t\t\t// \tinward = (midAngle >= 270) || (midAngle <= 90);\n\t\t\t\t// }\n\n\t\t\t\t// Rotate letters if they are facing outward\n\t\t\t\tlineStartAngle += (Math.PI * (inward ? 0 : 1)); // Rotate 180 if outward\n\n\t\t\t\t// Savepoint\n\t\t\t\tcontext.save();\n\t\t\t\tif (interactive) {\n\t\t\t\t\tghostContext.save();\n\t\t\t\t}\n\n\t\t\t\t// Assume starting angle\n\t\t\t\tcontext.rotate(lineStartAngle);\n\t\t\t\tif (interactive) {\n\t\t\t\t\tghostContext.rotate(lineStartAngle);\n\t\t\t\t}\n\n\t\t\t\tlet angleShift = 0;\n\t\t\t\t$array.each(line.textChunks, (chunk, _index) => {\n\n\t\t\t\t\t// Draw the letter\n\t\t\t\t\tconst char = chunk.text;\n\t\t\t\t\tconst charWidth = chunk.width;\n\n\t\t\t\t\t// Rotate half a letter\n\t\t\t\t\tangleShift = (charWidth / 2) / (radius - textHeight) * clockwise;\n\t\t\t\t\tcontext.rotate(angleShift);\n\t\t\t\t\tif (interactive) {\n\t\t\t\t\t\tghostContext.rotate(angleShift);\n\t\t\t\t\t}\n\n\t\t\t\t\t// Set style\n\t\t\t\t\tif (chunk.style) {\n\t\t\t\t\t\tcontext.save();\n\t\t\t\t\t\tghostContext.save();\n\n\t\t\t\t\t\tcontext.font = chunk.style;\n\t\t\t\t\t\tif (interactive) {\n\t\t\t\t\t\t\tghostContext.font = chunk.style;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (chunk.fill) {\n\t\t\t\t\t\tcontext.save();\n\t\t\t\t\t\tcontext.fillStyle = chunk.fill.toCSS();\n\t\t\t\t\t\t// Color does not affect ghostContext so we not set it\n\t\t\t\t\t}\n\n\t\t\t\t\t// Center letters\n\t\t\t\t\tcontext.textBaseline = \"middle\";\n\t\t\t\t\tcontext.textAlign = \"center\";\n\t\t\t\t\tif (interactive) {\n\t\t\t\t\t\tghostContext.textBaseline = \"middle\";\n\t\t\t\t\t\tghostContext.textAlign = \"center\";\n\t\t\t\t\t}\n\n\t\t\t\t\t// Plop the letter\n\t\t\t\t\tif (layerDirty) {\n\t\t\t\t\t\tcontext.fillText(char, 0, (inward ? 1 : -1) * (0 - radius + textHeight / 2));\n\t\t\t\t\t}\n\t\t\t\t\tif (interactive) {\n\t\t\t\t\t\tghostContext.fillText(char, 0, (inward ? 1 : -1) * (0 - radius + textHeight / 2));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (chunk.fill) {\n\t\t\t\t\t\tcontext.restore();\n\t\t\t\t\t\t// Color does not affect ghostContext so we not set it\n\t\t\t\t\t}\n\n\t\t\t\t\t// Reset style\n\t\t\t\t\tif (chunk.style) {\n\t\t\t\t\t\tcontext.restore();\n\t\t\t\t\t\tghostContext.restore();\n\t\t\t\t\t}\n\n\t\t\t\t\t// Rotate half a letter and add spacing\n\t\t\t\t\tangleShift = (charWidth / 2 + kerning) / (radius - textHeight) * clockwise;\n\t\t\t\t\tcontext.rotate(angleShift);\n\t\t\t\t\tif (interactive) {\n\t\t\t\t\t\tghostContext.rotate(angleShift);\n\t\t\t\t\t}\n\n\t\t\t\t});\n\n\t\t\t\t// Restore angle\n\t\t\t\tcontext.restore();\n\t\t\t\tif (interactive) {\n\t\t\t\t\tghostContext.restore();\n\t\t\t\t}\n\n\t\t\t\t// Adjust radius (for `inside = true`)\n\t\t\t\tif (inside) {\n\t\t\t\t\tradius -= textHeight;\n\t\t\t\t}\n\n\t\t\t});\n\n\t\t\t// Restore\n\t\t\tcontext.restore();\n\t\t\tif (interactive) {\n\t\t\t\tghostContext.restore();\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic _measure(status: IStatus): IBounds {\n\t\tswitch (this.textType) {\n\t\t\tcase \"circular\":\n\t\t\t\treturn this._measureCircular(status);\n\t\t\tdefault:\n\t\t\t\treturn super._measure(status);\n\t\t}\n\t}\n\n\tpublic _measureCircular(status: IStatus): IBounds {\n\t\tconst context = status.layer.context;\n\t\tconst ghostContext = this._renderer._ghostLayer.context;\n\t\tconst rtl = this.style.direction == \"rtl\";\n\n\t\tconst oversizedBehavior = this.style.oversizedBehavior;\n\t\tconst maxWidth = this.style.maxWidth!;\n\n\t\tconst truncate = $type.isNumber(maxWidth) && oversizedBehavior == \"truncate\";\n\t\tconst ellipsis = this.style.ellipsis || \"\";\n\t\tlet ellipsisMetrics: TextMetrics;\n\t\t//const wrap = $type.isNumber(maxWidth) && (oversizedBehavior == \"wrap\" || oversizedBehavior == \"wrap-no-break\");\n\n\n\t\t// Reset text info\n\t\tthis.textVisible = true;\n\t\tthis._textInfo = [];\n\t\tthis._textReversed = false;\n\n\t\t// Pre-render\n\t\tcontext.save();\n\t\tghostContext.save();\n\t\tthis._prerender(status, true);\n\n\t\t// Split up text into lines\n\t\tconst lines = this.text.toString().replace(/\\r/g, \"\").split(/\\n/);\n\t\tlet styleRestored = true;\n\t\tlet totalWidth = 0;\n\n\t\t// Iterate through the lines\n\t\tlet offsetY = 0;\n\t\t$array.each(lines, (line, _index) => {\n\n\t\t\t// Split up line into format/value chunks\n\t\t\tlet chunks = TextFormatter.chunk(line, false, this.style.ignoreFormatting);\n\n\t\t\t// Init line object\n\t\t\tlet lineInfo: ILine = {\n\t\t\t\toffsetY: offsetY,\n\t\t\t\tascent: 0,\n\t\t\t\twidth: 0,\n\t\t\t\theight: 0,\n\t\t\t\tleft: 0,\n\t\t\t\tright: 0,\n\t\t\t\ttextChunks: []\n\t\t\t};\n\n\t\t\tlet currentStyle: string | undefined;\n\t\t\tlet currentFill: Color | undefined;\n\t\t\tlet currentChunkWidth: number | undefined;\n\n\t\t\t//while(chunk = chunks.shift()) {\n\t\t\t$array.each(chunks, (chunk, _index) => {\n\n\t\t\t\t// Format chunk\n\t\t\t\tif (chunk.type == \"format\") {\n\t\t\t\t\tif (chunk.text == \"[/]\") {\n\t\t\t\t\t\tif (!styleRestored) {\n\t\t\t\t\t\t\tcontext.restore();\n\t\t\t\t\t\t\tghostContext.restore();\n\t\t\t\t\t\t\tstyleRestored = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcurrentFill = undefined;\n\t\t\t\t\t\tcurrentStyle = undefined;\n\t\t\t\t\t\tcurrentChunkWidth = undefined;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tlet format = TextFormatter.getTextStyle(chunk.text);\n\t\t\t\t\t\tconst fontStyle = this._getFontStyle(format);\n\t\t\t\t\t\tcontext.save();\n\t\t\t\t\t\tghostContext.save();\n\t\t\t\t\t\tcontext.font = fontStyle;\n\t\t\t\t\t\tcurrentStyle = fontStyle;\n\t\t\t\t\t\tif (format.fill) {\n\t\t\t\t\t\t\tcurrentFill = <Color>format.fill;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ((<any>format).width) {\n\t\t\t\t\t\t\tcurrentChunkWidth = $type.toNumber((<any>format).width);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstyleRestored = false;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (truncate) {\n\t\t\t\t\t\tellipsisMetrics = this._measureText(ellipsis, context);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Text format\n\t\t\t\telse if (chunk.type == \"value\") {\n\n\t\t\t\t\t// Measure each letter\n\t\t\t\t\tlet chars = chunk.text.match(/./ug) || [];\n\t\t\t\t\tif (rtl) {\n\t\t\t\t\t\tchars = $utils.splitString(chunk.text);\n\t\t\t\t\t\tchars.reverse();\n\t\t\t\t\t}\n\n\t\t\t\t\tfor (let i = 0; i < chars.length; i++) {\n\n\t\t\t\t\t\tconst char = chars[i];\n\n\t\t\t\t\t\t// Measure\n\t\t\t\t\t\tconst metrics = this._measureText(char, context);\n\t\t\t\t\t\tlet chunkWidth = metrics.width;\n\n\t\t\t\t\t\t// Chunk width?\n\t\t\t\t\t\tif (currentStyle && currentChunkWidth && (currentChunkWidth > chunkWidth)) {\n\t\t\t\t\t\t\tchunkWidth = currentChunkWidth;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst chunkHeight = metrics.actualBoundingBoxAscent + metrics.actualBoundingBoxDescent;\n\t\t\t\t\t\tif (chunkHeight > lineInfo.height) {\n\t\t\t\t\t\t\tlineInfo.height = chunkHeight;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (metrics.actualBoundingBoxAscent > lineInfo.ascent) {\n\t\t\t\t\t\t\tlineInfo.ascent = metrics.actualBoundingBoxAscent;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ttotalWidth += chunkWidth;\n\n\t\t\t\t\t\t// Handle oversized behavior\n\t\t\t\t\t\tif (truncate) {\n\t\t\t\t\t\t\t// Measure ellipsis and check if it fits\n\t\t\t\t\t\t\tif (!ellipsisMetrics) {\n\t\t\t\t\t\t\t\tellipsisMetrics = this._measureText(ellipsis, context);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tconst ellipsisWidth = ellipsisMetrics.actualBoundingBoxLeft + ellipsisMetrics.actualBoundingBoxRight;\n\t\t\t\t\t\t\t//totalWidth += ellipsisWidth;\n\t\t\t\t\t\t\tif ((totalWidth + ellipsisWidth) > maxWidth) {\n\t\t\t\t\t\t\t\tif (lineInfo.textChunks.length == 1) {\n\t\t\t\t\t\t\t\t\tthis.textVisible = false;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tlineInfo.width += ellipsisWidth;\n\t\t\t\t\t\t\t\t\tlineInfo.left += ellipsisMetrics.actualBoundingBoxLeft;\n\t\t\t\t\t\t\t\t\tlineInfo.right += ellipsisMetrics.actualBoundingBoxRight;\n\t\t\t\t\t\t\t\t\tlineInfo.textChunks.push({\n\t\t\t\t\t\t\t\t\t\tstyle: currentStyle,\n\t\t\t\t\t\t\t\t\t\tfill: currentFill,\n\t\t\t\t\t\t\t\t\t\ttext: ellipsis,\n\t\t\t\t\t\t\t\t\t\twidth: ellipsisWidth,\n\t\t\t\t\t\t\t\t\t\theight: chunkHeight + ellipsisMetrics.actualBoundingBoxDescent,\n\t\t\t\t\t\t\t\t\t\tleft: ellipsisMetrics.actualBoundingBoxLeft,\n\t\t\t\t\t\t\t\t\t\tright: ellipsisMetrics.actualBoundingBoxRight,\n\t\t\t\t\t\t\t\t\t\tascent: ellipsisMetrics.actualBoundingBoxAscent,\n\t\t\t\t\t\t\t\t\t\toffsetX: 0,\n\t\t\t\t\t\t\t\t\t\toffsetY: chunkHeight,\n\t\t\t\t\t\t\t\t\t\ttextDecoration: undefined\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlineInfo.width += chunkWidth;\n\t\t\t\t\t\tlineInfo.left += metrics.actualBoundingBoxLeft;\n\t\t\t\t\t\tlineInfo.right += metrics.actualBoundingBoxRight;\n\t\t\t\t\t\tlineInfo.textChunks.push({\n\t\t\t\t\t\t\tstyle: currentStyle,\n\t\t\t\t\t\t\tfill: currentFill,\n\t\t\t\t\t\t\ttext: char,\n\t\t\t\t\t\t\twidth: chunkWidth,\n\t\t\t\t\t\t\theight: chunkHeight + metrics.actualBoundingBoxDescent,\n\t\t\t\t\t\t\tleft: metrics.actualBoundingBoxLeft,\n\t\t\t\t\t\t\tright: metrics.actualBoundingBoxRight,\n\t\t\t\t\t\t\tascent: metrics.actualBoundingBoxAscent,\n\t\t\t\t\t\t\toffsetX: 0,\n\t\t\t\t\t\t\toffsetY: chunkHeight,\n\t\t\t\t\t\t\ttextDecoration: undefined\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tif (rtl) {\n\t\t\t\t\t\t\t// @todo still needed?\n\t\t\t\t\t\t\t//break;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tif (this.style.lineHeight instanceof Percent) {\n\t\t\t\tlineInfo.height *= this.style.lineHeight.value;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tlineInfo.height *= this.style.lineHeight || 1.2;\n\t\t\t}\n\n\t\t\tthis._textInfo!.push(lineInfo);\n\n\t\t\t//lineInfo.offsetY += lineInfo.ascent;\n\t\t\toffsetY += lineInfo.height;\n\n\n\t\t});\n\n\t\tif (!styleRestored) {\n\t\t\tcontext.restore();\n\t\t\tghostContext.restore();\n\t\t}\n\n\n\t\tif (oversizedBehavior == \"hide\" && (totalWidth > maxWidth)) {\n\t\t\tthis.textVisible = false;\n\t\t}\n\n\t\t// Adjust chunk internal offsets\n\t\t$array.each(this._textInfo, (lineInfo) => {\n\t\t\t$array.each(lineInfo.textChunks, (chunk) => {\n\t\t\t\tchunk.offsetY += Math.round((lineInfo.height - chunk.height + (lineInfo.ascent - chunk.ascent)) / 2);\n\t\t\t});\n\t\t});\n\n\t\tcontext.restore();\n\t\tghostContext.restore();\n\n\t\treturn {\n\t\t\tleft: 0,\n\t\t\ttop: 0,\n\t\t\tright: 0,\n\t\t\tbottom: 0,\n\t\t};\n\t}\n\n}\n\n/**\n * @ignore\n */\nexport class CanvasImage extends CanvasDisplayObject implements IPicture {\n\tpublic width: number | undefined;\n\tpublic height: number | undefined;\n\tpublic image: HTMLImageElement | undefined;\n\tpublic tainted?: boolean;\n\n\tpublic shadowColor?: Color;\n\tpublic shadowBlur?: number;\n\tpublic shadowOffsetX?: number;\n\tpublic shadowOffsetY?: number;\n\tpublic shadowOpacity?: number;\n\n\tprotected _imageMask: HTMLCanvasElement | undefined;\n\n\tconstructor(renderer: CanvasRenderer, image: HTMLImageElement | undefined) {\n\t\tsuper(renderer);\n\t\tthis.image = image;\n\t}\n\n\tprotected _dispose(): void {\n\t\tsuper._dispose();\n\n\t\tif (this._imageMask) {\n\t\t\tclearCanvas(this._imageMask);\n\t\t}\n\t}\n\n\tgetLocalBounds(): IBounds {\n\t\tif (!this._localBounds) {\n\n\n\t\t\tlet w = 0;\n\t\t\tlet h = 0;\n\n\t\t\tif (this.width) {\n\t\t\t\tw = this.width;\n\t\t\t}\n\t\t\tif (this.height) {\n\t\t\t\th = this.height;\n\t\t\t}\n\n\t\t\tthis._localBounds = {\n\t\t\t\tleft: 0,\n\t\t\t\ttop: 0,\n\t\t\t\tright: w,\n\t\t\t\tbottom: h\n\t\t\t};\n\n\t\t\tthis._addBounds(this._localBounds);\n\t\t}\n\t\treturn this._localBounds;\n\t}\n\n\tprotected _render(status: IStatus): void {\n\t\tsuper._render(status);\n\n\t\tif (this.image) {\n\t\t\tif (this.tainted === undefined) {\n\t\t\t\tthis.tainted = isTainted(this.image);\n\t\t\t\tstatus.layer.tainted = true;\n\t\t\t}\n\n\t\t\tif (this.tainted && this._renderer._omitTainted) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (status.layer.dirty) {\n\n\t\t\t\tif (this.shadowColor) {\n\t\t\t\t\tstatus.layer.context.shadowColor = this.shadowColor.toCSS(this.shadowOpacity || 1);\n\t\t\t\t}\n\t\t\t\tif (this.shadowBlur) {\n\t\t\t\t\tstatus.layer.context.shadowBlur = this.shadowBlur;\n\t\t\t\t}\n\t\t\t\tif (this.shadowOffsetX) {\n\t\t\t\t\tstatus.layer.context.shadowOffsetX = this.shadowOffsetX;\n\t\t\t\t}\n\t\t\t\tif (this.shadowOffsetY) {\n\t\t\t\t\tstatus.layer.context.shadowOffsetY = this.shadowOffsetY;\n\t\t\t\t}\n\n\t\t\t\t// TODO should this round ?\n\t\t\t\tconst width = this.width || this.image.naturalWidth;\n\t\t\t\tconst height = this.height || this.image.naturalHeight;\n\n\t\t\t\tstatus.layer.context.drawImage(this.image, 0, 0, width, height);\n\t\t\t}\n\n\t\t\tif (this.interactive && this._isInteractive(status)) {\n\t\t\t\tconst mask = this._getMask(this.image);\n\n\t\t\t\tthis._renderer._ghostLayer.context.drawImage(mask, 0, 0);\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic clear(): void {\n\t\tsuper.clear();\n\t\tthis.image = undefined;\n\t\tthis._imageMask = undefined;\n\t}\n\n\tprotected _getMask(image: HTMLImageElement): HTMLCanvasElement {\n\t\tif (this._imageMask === undefined) {\n\t\t\t// TODO should this round ?\n\t\t\tconst width = this.width || image.naturalWidth;\n\t\t\tconst height = this.height || image.naturalHeight;\n\n\t\t\t// We need to create a second canvas because destination-in clears out the entire canvas\n\t\t\tconst canvas = document.createElement(\"canvas\");\n\t\t\tcanvas.width = width;\n\t\t\tcanvas.height = height;\n\n\t\t\tconst context = canvas.getContext(\"2d\")!;\n\n\t\t\tcontext.imageSmoothingEnabled = false;\n\n\t\t\tcontext.fillStyle = this._getColorId();\n\t\t\tcontext.fillRect(0, 0, width, height);\n\n\t\t\tif (!isTainted(image)) {\n\t\t\t\tcontext.globalCompositeOperation = \"destination-in\";\n\t\t\t\tcontext.drawImage(image, 0, 0, width, height);\n\t\t\t}\n\n\t\t\tthis._imageMask = canvas;\n\t\t}\n\n\t\treturn this._imageMask;\n\t}\n\n}\n\n/**\n * @ignore\n */\nexport class CanvasRendererEvent<A> implements IRendererEvent<A> {\n\tpublic id: Id;\n\tpublic simulated: boolean = false;\n\tpublic native: boolean = true;\n\n\tconstructor(public event: A, public originalPoint: IPoint, public point: IPoint, public bbox: DOMRect) {\n\t\tif ($utils.supports(\"touchevents\") && event instanceof Touch) {\n\t\t\tthis.id = event.identifier;\n\n\t\t} else {\n\t\t\tthis.id = null;\n\t\t}\n\t}\n}\n\n/**\n * @ignore\n */\ninterface IEvent<Key extends keyof IRendererEvents> {\n\tobject: CanvasDisplayObject;\n\tcontext: unknown;\n\tcallback: (event: IRendererEvents[Key]) => void;\n\tdisposed: boolean;\n}\n\n/**\n * @ignore\n */\ninterface IEvents<Key extends keyof IRendererEvents> {\n\tdisposer: IDisposer;\n\tcallbacks: Array<IEvent<Key>>;\n\tdispatching: boolean;\n\tcleanup: boolean;\n}\n\n/**\n * @ignore\n */\nexport class CanvasRenderer extends ArrayDisposer implements IRenderer, IDisposer {\n\tpublic view: HTMLElement = document.createElement(\"div\");\n\tprotected _layerDom: HTMLElement = document.createElement(\"div\");\n\n\tpublic layers: Array<CanvasLayer> = [];\n\tpublic _dirtyLayers: Array<CanvasLayer> = [];\n\tpublic defaultLayer: CanvasLayer = this.getLayer(0);\n\n\tpublic _ghostLayer: GhostLayer = new GhostLayer();\n\n\tprotected _patternCanvas: HTMLCanvasElement = document.createElement(\"canvas\");\n\tprotected _patternContext: CanvasRenderingContext2D = this._patternCanvas.getContext(\"2d\")!;\n\n\tprotected _realWidth: number = 0;\n\tprotected _realHeight: number = 0;\n\n\tprotected _calculatedWidth: number = 0;\n\tprotected _calculatedHeight: number = 0;\n\n\tpublic resolution: number;\n\tpublic interactionsEnabled: boolean = true;\n\n\tprotected _listeners: { [key: string]: CounterDisposer } = {};\n\tprotected _events: { [Key in keyof IRendererEvents]?: IEvents<Key> } = {};\n\n\tprotected _colorId: number = 0;\n\tprotected _colorMap: { [color: string]: CanvasDisplayObject } = {};\n\n\tpublic _forceInteractive: number = 0;\n\tpublic _omitTainted: boolean = false;\n\n\t// TODO this should store the Id as well\n\tpublic _hovering: Set<CanvasDisplayObject> = new Set();\n\tpublic _dragging: Array<{ id: Id, value: CanvasDisplayObject }> = [];\n\tpublic _mousedown: Array<{ id: Id, value: CanvasDisplayObject }> = [];\n\n\tprotected _lastPointerMoveEvent: { events: Array<IPointerEvent>, target: Node | null, native: boolean } | undefined;\n\n\tpublic tapToActivate: boolean = false;\n\tpublic tapToActivateTimeout: number = 3000;\n\tpublic _touchActive: boolean = false;\n\tprotected _touchActiveTimeout?: number;\n\n\t/*protected _mouseMoveThrottler: Throttler = new Throttler(() => {\n\t\tthis._dispatchGlobalMousemove(this._lastPointerMoveEvent.event, this._lastPointerMoveEvent.native);\n\t});\n\t*/\n\n\tpublic resetImageArray() {\n\t\tthis._ghostLayer.imageArray = undefined;\n\t}\n\n\tconstructor(resolution?: number) {\n\t\tsuper();\n\n\t\tif (resolution == null) {\n\t\t\tthis.resolution = window.devicePixelRatio;\n\t\t} else {\n\t\t\tthis.resolution = resolution;\n\t\t}\n\n\t\tthis.view.style.position = \"absolute\";\n\t\tthis.view.setAttribute(\"aria-hidden\", \"true\");\n\t\tthis.view.appendChild(this._layerDom);\n\n\t\tthis._disposers.push(new Disposer(() => {\n\t\t\t$object.each(this._events, (_key, events) => {\n\t\t\t\tevents.disposer.dispose();\n\t\t\t});\n\n\t\t\t$array.each(this.layers, (layer) => {\n\t\t\t\tclearCanvas(layer.view);\n\n\t\t\t\tif (layer.exportableView) {\n\t\t\t\t\tclearCanvas(layer.exportableView);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tclearCanvas(this._ghostLayer.view);\n\t\t\tclearCanvas(this._patternCanvas);\n\t\t}));\n\n\t\t/*\n\t\tthis._disposers.push($utils.addEventListener(this._ghostLayer.view, \"click\", (originalEvent: MouseEvent) => {\n\t\t\tconst event = this.getEvent(originalEvent);\n\t\t\tconst target = this._getHitTarget(event.originalPoint, event.bbox);\n\t\t\tconsole.debug(target);\n\t\t}));\n\t\t*/\n\n\t\t// Monitor for possible pixel ratio changes (when page is zoomed)\n\t\tthis._disposers.push($utils.onZoom(() => {\n\t\t\tif (resolution == null) {\n\t\t\t\tthis.resolution = window.devicePixelRatio;\n\t\t\t}\n\t\t}));\n\n\t\t// We need this in order top prevent default touch gestures when dragging\n\t\t// draggable elements\n\t\tif ($utils.supports(\"touchevents\")) {\n\t\t\tconst listener = (ev: any) => {\n\t\t\t\tif (this._dragging.length !== 0) {\n\t\t\t\t\t$array.eachContinue(this._dragging, (item) => {\n\t\t\t\t\t\tif (item.value.shouldCancelTouch()) {\n\t\t\t\t\t\t\tev.preventDefault();\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\t// If touch down happends, delay touch out\n\t\t\t\tif (this._touchActiveTimeout) {\n\t\t\t\t\tthis._delayTouchDeactivate();\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tthis._disposers.push($utils.addEventListener(window, \"touchstart\", listener, { passive: false }));\n\t\t\tthis._disposers.push($utils.addEventListener(this.view, \"touchstart\", listener, { passive: false }));\n\n\t\t\tthis._disposers.push($utils.addEventListener(this.view, \"touchmove\", () => {\n\t\t\t\t// If touch is moving, delay touch out\n\t\t\t\tif (this._touchActiveTimeout) {\n\t\t\t\t\tthis._delayTouchDeactivate();\n\t\t\t\t}\n\t\t\t}, { passive: true }));\n\n\t\t\tthis._disposers.push($utils.addEventListener(window, \"click\", (_ev: any) => {\n\t\t\t\tthis._touchActive = false;\n\t\t\t}, { passive: true }));\n\n\t\t\tthis._disposers.push($utils.addEventListener(this.view, \"click\", (_ev: any) => {\n\t\t\t\twindow.setTimeout(() => {\n\t\t\t\t\tthis._touchActive = true;\n\t\t\t\t\tthis._delayTouchDeactivate();\n\t\t\t\t}, 100);\n\t\t\t}, { passive: true }));\n\n\t\t}\n\n\t\t// Prevent scrolling of the window when hovering on \"wheelable\" object\n\t\tif ($utils.supports(\"wheelevents\")) {\n\t\t\tthis._disposers.push($utils.addEventListener(this.view, \"wheel\", (ev) => {\n\t\t\t\tlet prevent = false;\n\t\t\t\tthis._hovering.forEach((obj) => {\n\t\t\t\t\tif (obj.wheelable) {\n\t\t\t\t\t\tprevent = true;\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tif (prevent) {\n\t\t\t\t\tev.preventDefault();\n\t\t\t\t}\n\t\t\t}, { passive: false }));\n\t\t}\n\n\t}\n\n\tprotected _delayTouchDeactivate(): void {\n\t\tif (this._touchActiveTimeout) {\n\t\t\tclearTimeout(this._touchActiveTimeout);\n\t\t}\n\t\tif (this.tapToActivateTimeout > 0) {\n\t\t\tthis._touchActiveTimeout = window.setTimeout(() => {\n\t\t\t\tthis._touchActive = false;\n\t\t\t}, this.tapToActivateTimeout);\n\t\t}\n\t}\n\n\tpublic get debugGhostView(): boolean {\n\t\treturn !!this._ghostLayer.view.parentNode;\n\t}\n\n\tpublic set debugGhostView(value: boolean) {\n\t\tif (value) {\n\t\t\tif (!this._ghostLayer.view.parentNode) {\n\t\t\t\tthis.view.appendChild(this._ghostLayer.view);\n\t\t\t}\n\n\t\t} else {\n\t\t\tif (this._ghostLayer.view.parentNode) {\n\t\t\t\tthis._ghostLayer.view.parentNode.removeChild(this._ghostLayer.view);\n\t\t\t}\n\t\t}\n\t}\n\n\tcreateLinearGradient(x1: number, y1: number, x2: number, y2: number): CanvasGradient {\n\t\treturn this.defaultLayer.context.createLinearGradient(x1, y1, x2, y2);\n\t}\n\n\tcreateRadialGradient(x1: number, y1: number, radius1: number, x2: number, y2: number, radius2: number): CanvasGradient {\n\t\treturn this.defaultLayer.context.createRadialGradient(x1, y1, radius1, x2, y2, radius2);\n\t}\n\n\tcreatePattern(graphics: CanvasGraphics, background: CanvasGraphics, repetition: string, width: number, height: number): CanvasPattern {\n\t\t// const patternCanvas = document.createElement(\"canvas\");\n\t\t// const patternContext = patternCanvas.getContext(\"2d\")!;\n\t\t// patternCanvas.width = width;\n\t\t// patternCanvas.height = height;\n\t\t// if (fill) {\n\t\t// \tpatternContext.fillStyle = fill.toCSS();\n\t\t// \tpatternContext.fillRect(0, 0, patternCanvas.width, patternCanvas.height);\n\t\t// }\n\n\t\t// const layer = {\n\t\t// \tview: patternCanvas,\n\t\t// \tcontext: patternContext,\n\t\t// \tvisible: true,\n\t\t// \torder: 0,\n\t\t// \twidth: width,\n\t\t// \theight: height,\n\t\t// \tdirty: true\n\t\t// };\n\n\t\t// // patternContext.arc(0, 0, 50, 0, .5 * Math.PI);\n\t\t// // patternContext.stroke();\n\n\t\t// image.targetLayer = layer;\n\t\t// image.render(layer);\n\n\t\t//this._layerDom.appendChild(patternCanvas);\n\n\t\tthis._patternCanvas.width = width;\n\t\tthis._patternCanvas.height = height;\n\n\t\tthis._patternContext.clearRect(0, 0, width, height);\n\n\t\t// patternCanvas.style.width = width * this.resolution + \"px\";\n\t\t// patternCanvas.style.height = height * this.resolution + \"px\";\n\n\t\tbackground.renderDetached(this._patternContext);\n\t\tgraphics.renderDetached(this._patternContext);\n\n\t\treturn this._patternContext.createPattern(this._patternCanvas, repetition)!;\n\t}\n\n\n\n\tmakeContainer(): CanvasContainer {\n\t\treturn new CanvasContainer(this);\n\t}\n\n\tmakeGraphics(): CanvasGraphics {\n\t\treturn new CanvasGraphics(this);\n\t}\n\n\tmakeText(text: string, style: CanvasTextStyle): CanvasText {\n\t\treturn new CanvasText(this, text, style);\n\t}\n\n\tmakeTextStyle(): CanvasTextStyle {\n\t\treturn new CanvasTextStyle();\n\t}\n\n\tmakeRadialText(text: string, style: CanvasTextStyle): CanvasRadialText {\n\t\treturn new CanvasRadialText(this, text, style);\n\t}\n\n\tmakePicture(image: HTMLImageElement | undefined): CanvasImage {\n\t\treturn new CanvasImage(this, image);\n\t}\n\n\tresizeLayer(layer: CanvasLayer) {\n\t\tlayer.resize(this._calculatedWidth, this._calculatedHeight, this._calculatedWidth, this._calculatedHeight, this.resolution);\n\t}\n\n\tresizeGhost() {\n\t\tthis._ghostLayer.resize(this._calculatedWidth, this._calculatedHeight, this._calculatedWidth, this._calculatedHeight, this.resolution);\n\t}\n\n\tresize(realWidth: number, realHeight: number, calculatedWidth: number, calculatedHeight: number): void {\n\t\tthis._realWidth = realWidth;\n\t\tthis._realHeight = realHeight;\n\n\t\tthis._calculatedWidth = calculatedWidth;\n\t\tthis._calculatedHeight = calculatedHeight;\n\n\t\t$array.each(this.layers, (layer) => {\n\t\t\tif (layer) {\n\t\t\t\tlayer.dirty = true;\n\t\t\t\tthis.resizeLayer(layer);\n\t\t\t}\n\t\t});\n\n\t\tthis.resizeGhost();\n\n\t\tthis.view.style.width = calculatedWidth + \"px\";\n\t\tthis.view.style.height = calculatedHeight + \"px\";\n\t}\n\n\tprivate createDetachedLayer(willReadFrequently: boolean = false): CanvasLayer {\n\t\tconst view = document.createElement(\"canvas\");\n\t\tconst context = view.getContext(\"2d\", { willReadFrequently: willReadFrequently })! as CanvasRenderingContext2D;\n\n\t\tconst layer = new CanvasLayer(view, context);\n\n\t\tview.style.position = \"absolute\";\n\t\tview.style.top = \"0px\";\n\t\tview.style.left = \"0px\";\n\n\t\treturn layer;\n\t}\n\n\tgetLayerByOrder(order: number): CanvasLayer | undefined {\n\t\tconst layers = this.layers;\n\t\tconst length = layers.length;\n\t\tfor (let i = 0; i < length; i++) {\n\t\t\tconst layer = layers[i];\n\t\t\tif (layer.order == order) {\n\t\t\t\treturn layer;\n\t\t\t}\n\t\t}\n\t}\n\n\tgetLayer(order: number, visible: boolean = true): CanvasLayer {\n\t\tlet existingLayer = this.getLayerByOrder(order);\n\t\tif (existingLayer) {\n\t\t\treturn existingLayer;\n\t\t}\n\n\t\tconst layer = this.createDetachedLayer(order == 99);\n\t\tlayer.order = order;\n\t\tlayer.visible = visible;\n\n\t\tlayer.view.className = \"am5-layer-\" + order;\n\n\t\tif (layer.visible) {\n\t\t\tthis.resizeLayer(layer);\n\t\t}\n\n\t\tconst layers = this.layers;\n\n\t\tlayers.push(layer);\n\n\t\tlayers.sort((a, b) => {\n\t\t\tif (a.order > b.order) {\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\telse if (a.order < b.order) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t});\n\n\t\tconst length = layers.length;\n\t\tconst layerIndex = $array.indexOf(layers, layer);\n\t\tlet next;\n\n\t\tfor (let i = layerIndex + 1; i < length; i++) {\n\t\t\tif (layers[i].visible) {\n\t\t\t\tnext = layers[i];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (layer.visible) {\n\t\t\tif (next === undefined) {\n\t\t\t\tthis._layerDom.appendChild(layer.view);\n\n\t\t\t} else {\n\t\t\t\tthis._layerDom.insertBefore(layer.view, next.view);\n\t\t\t}\n\t\t}\n\n\t\treturn layer;\n\t}\n\n\trender(root: CanvasDisplayObject): void {\n\n\t\tthis._dirtyLayers.length = 0;\n\n\t\t$array.each(this.layers, (layer) => {\n\t\t\tif (layer) {\n\t\t\t\tif (layer.dirty && layer.visible) {\n\t\t\t\t\tthis._dirtyLayers.push(layer);\n\t\t\t\t\tlayer.clear();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tthis._ghostLayer.clear();\n\n\t\troot.render({\n\t\t\tinactive: null,\n\t\t\tlayer: this.defaultLayer,\n\t\t});\n\n\t\tthis._ghostLayer.context.restore();\n\n\t\t//setTimeout(() => {\n\n\t\t// Remove this after the Chrome bug is fixed:\n\t\t// https://bugs.chromium.org/p/chromium/issues/detail?id=1279394\n\t\t$array.each(this.layers, (layer) => {\n\t\t\tif (layer) {\n\t\t\t\tconst context = layer.context;\n\t\t\t\tcontext.beginPath();\n\t\t\t\tcontext.moveTo(0, 0);\n\t\t\t\tcontext.stroke();\n\t\t\t}\n\t\t});\n\n\t\t$array.each(this._dirtyLayers, (layer) => {\n\t\t\tlayer.context.restore();\n\t\t\tlayer.dirty = false;\n\t\t});\n\t\t//}, 100)\n\n\t\tif (this._hovering.size && this._lastPointerMoveEvent) {\n\t\t\tconst { events, target, native } = this._lastPointerMoveEvent;\n\n\t\t\t//this._mouseMoveThrottler.run();\n\n\t\t\t$array.each(events, (event) => {\n\t\t\t\tthis._dispatchGlobalMousemove(event, target, native);\n\t\t\t});\n\t\t}\n\t}\n\n\tpaintId(obj: CanvasDisplayObject): string {\n\t\tconst id = distributeId(++this._colorId);\n\t\tconst color = Color.fromHex(id).toCSS();\n\t\tthis._colorMap[color] = obj;\n\t\treturn color;\n\t}\n\n\t_removeObject(obj: CanvasDisplayObject): void {\n\t\tif (obj._colorId !== undefined) {\n\t\t\tdelete this._colorMap[obj._colorId];\n\t\t}\n\t}\n\n\t// protected _identifyObjectByColor(colorId: number): CanvasDisplayObject | undefined {\n\t// \treturn this._colorMap[colorId];\n\t// }\n\n\tprotected _adjustBoundingBox(bbox: DOMRect): DOMRect {\n\t\tconst margin = this._ghostLayer.margin;\n\n\t\treturn new DOMRect(\n\t\t\t-margin.left,\n\t\t\t-margin.top,\n\t\t\tbbox.width + margin.left + margin.right,\n\t\t\tbbox.height + margin.top + margin.bottom,\n\t\t);\n\t}\n\n\tpublic getEvent<A extends IPointerEvent>(originalEvent: A, adjustPoint: boolean = true): CanvasRendererEvent<A> {\n\t\tconst bbox = this.view.getBoundingClientRect();\n\n\t\tconst x = originalEvent.clientX || 0;\n\t\tconst y = originalEvent.clientY || 0;\n\n\t\tconst widthScale = this._calculatedWidth / this._realWidth;\n\t\tconst heightScale = this._calculatedHeight / this._realHeight;\n\n\t\tconst originalPoint: IPoint = {\n\t\t\tx: x - bbox.left,\n\t\t\ty: y - bbox.top,\n\t\t};\n\n\t\tconst point: IPoint = {\n\t\t\tx: (x - (adjustPoint ? bbox.left : 0)) * widthScale,\n\t\t\ty: (y - (adjustPoint ? bbox.top : 0)) * heightScale,\n\t\t};\n\n\t\treturn new CanvasRendererEvent(\n\t\t\toriginalEvent,\n\t\t\toriginalPoint,\n\t\t\tpoint,\n\t\t\tthis._adjustBoundingBox(bbox),\n\t\t);\n\t}\n\n\t_getHitTarget(point: IPoint, bbox: DOMRect, target: Node | null): CanvasDisplayObject | undefined | false {\n\t\tif (bbox.width === 0 || bbox.height === 0 || point.x < bbox.left || point.x > bbox.right || point.y < bbox.top || point.y > bbox.bottom) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!target || !this._layerDom.contains(target)) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst pixel = this._ghostLayer.getImageData(point, bbox);\n\n\t\tif (pixel.data[0] === 0 && pixel.data[1] === 0 && pixel.data[2] === 0) {\n\t\t\treturn false;\n\t\t}\n\t\tconst colorId = Color.fromRGB(pixel.data[0], pixel.data[1], pixel.data[2]).toCSS();\n\t\tconst hit = this._colorMap[colorId];\n\n\t\treturn hit;\n\t}\n\n\tgetObjectAtPoint(point: IPoint): CanvasDisplayObject | undefined {\n\t\tconst data = this._ghostLayer.getImageArray(point);\n\n\t\tif (data[0] === 0 && data[1] === 0 && data[2] === 0) {\n\t\t\treturn undefined;\n\t\t}\n\t\tconst colorId = Color.fromRGB(data[0], data[1], data[2]).toCSS();\n\t\tconst hit = this._colorMap[colorId];\n\n\t\treturn hit;\n\t}\n\n\t_withEvents<Key extends keyof IRendererEvents>(key: Key, f: (events: IEvents<Key>) => void): void {\n\t\tconst events = this._events[key] as IEvents<Key> | undefined;\n\n\t\tif (events !== undefined) {\n\t\t\tevents.dispatching = true;\n\n\t\t\ttry {\n\t\t\t\tf(events);\n\n\t\t\t} finally {\n\t\t\t\tevents.dispatching = false;\n\n\t\t\t\tif (events.cleanup) {\n\t\t\t\t\tevents.cleanup = false;\n\n\t\t\t\t\t$array.keepIf(events.callbacks, (callback) => {\n\t\t\t\t\t\treturn !callback.disposed;\n\t\t\t\t\t});\n\n\t\t\t\t\tif (events.callbacks.length === 0) {\n\t\t\t\t\t\tevents.disposer.dispose();\n\t\t\t\t\t\tdelete this._events[key];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t_dispatchEventAll<Key extends keyof IRendererEvents>(key: Key, event: IRendererEvents[Key]): void {\n\t\tif (!this.interactionsEnabled) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._withEvents(key, (events) => {\n\t\t\t$array.each(events.callbacks, (callback) => {\n\t\t\t\tif (!callback.disposed) {\n\t\t\t\t\tcallback.callback.call(callback.context, event);\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n\n\t_dispatchEvent<Key extends keyof IRendererEvents>(key: Key, target: CanvasDisplayObject, event: IRendererEvents[Key]): boolean {\n\t\tif (!this.interactionsEnabled) {\n\t\t\treturn false;\n\t\t}\n\n\t\tlet dispatched = false;\n\n\t\tthis._withEvents(key, (events) => {\n\t\t\t$array.each(events.callbacks, (callback) => {\n\t\t\t\tif (!callback.disposed && callback.object === target) {\n\t\t\t\t\tcallback.callback.call(callback.context, event);\n\t\t\t\t\tdispatched = true;\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\n\t\treturn dispatched;\n\t}\n\n\t_dispatchMousedown(originalEvent: IPointerEvent, originalTarget: Node | null): void {\n\t\tconst button = (<PointerEvent>originalEvent).button;\n\t\tif (button != 0 && button != 2 && button != 1 && button !== undefined) {\n\t\t\t// Ignore non-primary mouse buttons\n\t\t\treturn;\n\t\t}\n\n\t\tconst event = this.getEvent(originalEvent);\n\t\tconst target = this._getHitTarget(event.originalPoint, event.bbox, originalTarget);\n\n\n\t\tif (target) {\n\t\t\tconst id = event.id;\n\n\t\t\tlet dragged = false;\n\n\t\t\teachTargets(target, (obj) => {\n\t\t\t\tconst info = { id: id, value: obj };\n\n\t\t\t\tthis._mousedown.push(info);\n\n\t\t\t\tif (!dragged && this._dispatchEvent(\"pointerdown\", obj, event)) {\n\t\t\t\t\t// Only dispatch the first element which matches\n\t\t\t\t\tdragged = true;\n\n\t\t\t\t\tconst has = this._dragging.some((x) => {\n\t\t\t\t\t\treturn x.value === obj && x.id === id;\n\t\t\t\t\t});\n\n\t\t\t\t\tif (!has) {\n\t\t\t\t\t\tthis._dragging.push(info);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t});\n\t\t}\n\t}\n\n\t_dispatchGlobalMousemove(originalEvent: IPointerEvent, originalTarget: Node | null, native: boolean): void {\n\t\tconst event = this.getEvent(originalEvent);\n\n\t\tconst target = this._getHitTarget(event.originalPoint, event.bbox, originalTarget);\n\t\tevent.native = native;\n\n\t\tif (target) {\n\t\t\tthis._hovering.forEach((obj) => {\n\t\t\t\tif (!obj.contains(target)) {\n\t\t\t\t\tthis._hovering.delete(obj);\n\t\t\t\t\tif (obj.cursorOverStyle) {\n\t\t\t\t\t\t$utils.setStyle(document.body, \"cursor\", obj._replacedCursorStyle!);\n\t\t\t\t\t}\n\t\t\t\t\tthis._dispatchEvent(\"pointerout\", obj, event);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tif (event.native) {\n\t\t\t\teachTargets(target, (obj) => {\n\t\t\t\t\tif (!this._hovering.has(obj)) {\n\t\t\t\t\t\tthis._hovering.add(obj);\n\t\t\t\t\t\tif (obj.cursorOverStyle) {\n\t\t\t\t\t\t\tobj._replacedCursorStyle = $utils.getStyle(document.body, \"cursor\");\n\t\t\t\t\t\t\t$utils.setStyle(document.body, \"cursor\", obj.cursorOverStyle);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis._dispatchEvent(\"pointerover\", obj, event);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn true;\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t//} else if (target === false) {\n\t\t} else {\n\t\t\tthis._hovering.forEach((obj) => {\n\t\t\t\tif (obj.cursorOverStyle) {\n\t\t\t\t\t$utils.setStyle(document.body, \"cursor\", obj._replacedCursorStyle!);\n\t\t\t\t}\n\t\t\t\tthis._dispatchEvent(\"pointerout\", obj, event);\n\t\t\t});\n\n\t\t\tthis._hovering.clear();\n\t\t}\n\t\tthis._dispatchEventAll(\"globalpointermove\", event);\n\t}\n\n\tremoveHovering(graphics: CanvasGraphics) {\n\t\tthis._hovering.delete(graphics);\n\t\tif (graphics.cursorOverStyle) {\n\t\t\t$utils.setStyle(document.body, \"cursor\", graphics._replacedCursorStyle!);\n\t\t}\n\t}\n\n\t_dispatchGlobalMouseup(originalEvent: IPointerEvent, native: boolean): void {\n\t\tconst event = this.getEvent(originalEvent);\n\t\tevent.native = native;\n\t\t//const target = this._getHitTarget(event.originalPoint);\n\t\tthis._dispatchEventAll(\"globalpointerup\", event);\n\t}\n\n\t_dispatchDragMove(originalEvent: IPointerEvent): void {\n\t\tif (this._dragging.length !== 0) {\n\t\t\tconst event = this.getEvent(originalEvent);\n\t\t\tconst id = event.id;\n\n\t\t\tthis._dragging.forEach((obj) => {\n\t\t\t\tif (obj.id === id) {\n\t\t\t\t\tthis._dispatchEvent(\"pointermove\", obj.value, event);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\t_dispatchDragEnd(originalEvent: IPointerEvent, originalTarget: Node | null): void {\n\t\tconst button = (<PointerEvent>originalEvent).button;\n\t\tlet clickevent: \"click\" | \"rightclick\" | \"middleclick\";\n\t\tif (button == 0 || button === undefined) {\n\t\t\tclickevent = \"click\";\n\t\t}\n\t\telse if (button == 2) {\n\t\t\tclickevent = \"rightclick\";\n\t\t}\n\t\telse if (button == 1) {\n\t\t\tclickevent = \"middleclick\";\n\t\t}\n\t\telse {\n\t\t\t// Ignore non-primary mouse buttons\n\t\t\treturn;\n\t\t}\n\n\t\tconst event = this.getEvent(originalEvent);\n\t\tconst id = event.id;\n\n\t\tif (this._mousedown.length !== 0) {\n\t\t\tconst target = this._getHitTarget(event.originalPoint, event.bbox, originalTarget);\n\n\t\t\tif (target) {\n\t\t\t\tthis._mousedown.forEach((obj) => {\n\t\t\t\t\tif (obj.id === id && obj.value.contains(target)) {\n\t\t\t\t\t\tthis._dispatchEvent(clickevent, obj.value, event);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tthis._mousedown.length = 0;\n\t\t}\n\n\t\tif (this._dragging.length !== 0) {\n\t\t\tthis._dragging.forEach((obj) => {\n\t\t\t\tif (obj.id === id) {\n\t\t\t\t\tthis._dispatchEvent(\"pointerup\", obj.value, event);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tthis._dragging.length = 0;\n\t\t}\n\t}\n\n\t_dispatchDoubleClick(originalEvent: IPointerEvent, originalTarget: Node | null): void {\n\t\tconst event = this.getEvent(originalEvent);\n\t\tconst target = this._getHitTarget(event.originalPoint, event.bbox, originalTarget);\n\n\t\tif (target) {\n\t\t\teachTargets(target, (obj) => {\n\t\t\t\tif (this._dispatchEvent(\"dblclick\", obj, event)) {\n\t\t\t\t\treturn false;\n\t\t\t\t} else {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\t_dispatchWheel(originalEvent: WheelEvent, originalTarget: Node | null): void {\n\t\tconst event = this.getEvent(originalEvent);\n\t\tconst target = this._getHitTarget(event.originalPoint, event.bbox, originalTarget);\n\n\t\tif (target) {\n\t\t\teachTargets(target, (obj) => {\n\t\t\t\tif (this._dispatchEvent(\"wheel\", obj, event)) {\n\t\t\t\t\treturn false;\n\t\t\t\t} else {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\t_makeSharedEvent(key: string, f: () => IDisposer): IDisposer {\n\t\tif (this._listeners[key] === undefined) {\n\t\t\tconst listener = f();\n\n\t\t\tthis._listeners[key] = new CounterDisposer(() => {\n\t\t\t\tdelete this._listeners[key];\n\t\t\t\tlistener.dispose();\n\t\t\t});\n\t\t}\n\n\t\treturn this._listeners[key].increment();\n\t}\n\n\t_onPointerEvent(name: string, f: (event: Array<IPointerEvent>, target: Node | null, native: boolean) => void): IDisposer {\n\t\tlet native = false;\n\t\tlet timer: number | null = null;\n\n\t\tfunction clear() {\n\t\t\ttimer = null;\n\t\t\tnative = false;\n\t\t}\n\n\t\treturn new MultiDisposer([\n\t\t\tnew Disposer(() => {\n\t\t\t\tif (timer !== null) {\n\t\t\t\t\tclearTimeout(timer);\n\t\t\t\t}\n\n\t\t\t\tclear();\n\t\t\t}),\n\n\t\t\t$utils.addEventListener(this.view, $utils.getRendererEvent(name), (_) => {\n\t\t\t\tnative = true;\n\n\t\t\t\tif (timer !== null) {\n\t\t\t\t\tclearTimeout(timer);\n\t\t\t\t}\n\n\t\t\t\ttimer = window.setTimeout(clear, 0);\n\t\t\t}),\n\n\t\t\tonPointerEvent(window, name, (ev, target) => {\n\t\t\t\tif (timer !== null) {\n\t\t\t\t\tclearTimeout(timer);\n\t\t\t\t\ttimer = null;\n\t\t\t\t}\n\n\t\t\t\tf(ev, target, native);\n\n\t\t\t\tnative = false;\n\t\t\t}),\n\t\t]);\n\t}\n\n\t// This ensures that only a single DOM event is added (e.g. only a single mousemove event listener)\n\t_initEvent(key: keyof IRendererEvents): IDisposer | undefined {\n\t\tswitch (key) {\n\t\t\tcase \"globalpointermove\":\n\t\t\tcase \"pointerover\":\n\t\t\tcase \"pointerout\":\n\t\t\t\treturn this._makeSharedEvent(\"pointermove\", () => {\n\t\t\t\t\tconst listener = (events: Array<IPointerEvent>, target: Node | null, native: boolean) => {\n\t\t\t\t\t\tthis._lastPointerMoveEvent = { events, target, native };\n\n\t\t\t\t\t\t$array.each(events, (event) => {\n\t\t\t\t\t\t\tthis._dispatchGlobalMousemove(event, target, native);\n\t\t\t\t\t\t});\n\t\t\t\t\t};\n\n\t\t\t\t\treturn new MultiDisposer([\n\t\t\t\t\t\tthis._onPointerEvent(\"pointerdown\", listener),\n\t\t\t\t\t\tthis._onPointerEvent(\"pointermove\", listener),\n\t\t\t\t\t]);\n\t\t\t\t});\n\t\t\tcase \"globalpointerup\":\n\t\t\t\treturn this._makeSharedEvent(\"pointerup\", () => {\n\t\t\t\t\tconst mouseup = this._onPointerEvent(\"pointerup\", (events, target, native) => {\n\t\t\t\t\t\t$array.each(events, (event) => {\n\t\t\t\t\t\t\tthis._dispatchGlobalMouseup(event, native);\n\t\t\t\t\t\t});\n\t\t\t\t\t\tthis._lastPointerMoveEvent = { events, target, native };\n\t\t\t\t\t});\n\n\t\t\t\t\tconst pointercancel = this._onPointerEvent(\"pointercancel\", (events, target, native) => {\n\t\t\t\t\t\t$array.each(events, (event) => {\n\t\t\t\t\t\t\tthis._dispatchGlobalMouseup(event, native);\n\t\t\t\t\t\t});\n\t\t\t\t\t\tthis._lastPointerMoveEvent = { events, target, native };\n\t\t\t\t\t});\n\n\t\t\t\t\treturn new Disposer(() => {\n\t\t\t\t\t\tmouseup.dispose();\n\t\t\t\t\t\tpointercancel.dispose();\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\tcase \"click\":\n\t\t\tcase \"rightclick\":\n\t\t\tcase \"middleclick\":\n\t\t\tcase \"pointerdown\":\n\t\t\t/*\n\t\t\t\treturn this._makeSharedEvent(\"pointerdown\", () => {\n\t\t\t\t\treturn this._onPointerEvent(\"pointerdown\", (event, target, native) => {\n\t\t\t\t\t\tthis._lastPointerMoveEvent = { event, target, native };\n\t\t\t\t\t\tthis._dispatchMousedown(event)\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t*/\n\t\t\tcase \"pointermove\":\n\t\t\tcase \"pointerup\":\n\t\t\t\treturn this._makeSharedEvent(\"pointerdown\", () => {\n\t\t\t\t\t//const throttler = new Throttler();\n\n\t\t\t\t\tconst mousedown = this._onPointerEvent(\"pointerdown\", (events, target) => {\n\t\t\t\t\t\t$array.each(events, (ev) => {\n\t\t\t\t\t\t\tthis._dispatchMousedown(ev, target);\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\n\t\t\t\t\t// TODO handle throttling properly for multitouch\n\t\t\t\t\tconst mousemove = this._onPointerEvent(\"pointermove\", (ev: Array<IPointerEvent>) => {\n\t\t\t\t\t\t//throttler.throttle(() => {\n\t\t\t\t\t\t$array.each(ev, (ev) => {\n\t\t\t\t\t\t\tthis._dispatchDragMove(ev);\n\t\t\t\t\t\t});\n\t\t\t\t\t\t//});\n\t\t\t\t\t});\n\n\t\t\t\t\tconst mouseup = this._onPointerEvent(\"pointerup\", (ev: Array<IPointerEvent>, target) => {\n\t\t\t\t\t\t$array.each(ev, (ev) => {\n\t\t\t\t\t\t\tthis._dispatchDragEnd(ev, target);\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\n\t\t\t\t\tconst pointercancel = this._onPointerEvent(\"pointercancel\", (ev: Array<IPointerEvent>, target) => {\n\t\t\t\t\t\t$array.each(ev, (ev) => {\n\t\t\t\t\t\t\tthis._dispatchDragEnd(ev, target);\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\n\t\t\t\t\treturn new Disposer(() => {\n\t\t\t\t\t\tmousedown.dispose();\n\t\t\t\t\t\tmousemove.dispose();\n\t\t\t\t\t\tmouseup.dispose();\n\t\t\t\t\t\tpointercancel.dispose();\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\tcase \"dblclick\":\n\t\t\t\treturn this._makeSharedEvent(\"dblclick\", () => {\n\t\t\t\t\treturn this._onPointerEvent(\"dblclick\", (ev, target) => {\n\t\t\t\t\t\t$array.each(ev, (ev) => {\n\t\t\t\t\t\t\tthis._dispatchDoubleClick(ev, target);\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\tcase \"wheel\":\n\t\t\t\treturn this._makeSharedEvent(\"wheel\", () => {\n\t\t\t\t\treturn $utils.addEventListener(this.view, $utils.getRendererEvent(\"wheel\"), (event: WheelEvent) => {\n\t\t\t\t\t\tthis._dispatchWheel(event, $utils.getEventTarget(event));\n\t\t\t\t\t}, { passive: false });\n\t\t\t\t});\n\t\t}\n\t}\n\n\t_addEvent<C, Key extends keyof IRendererEvents>(object: CanvasDisplayObject, key: Key, callback: (this: C, event: IRendererEvents[Key]) => void, context?: C): IDisposer {\n\t\tlet events: IEvents<Key> | undefined = this._events[key] as any;\n\n\t\tif (events === undefined) {\n\t\t\tevents = this._events[key] = {\n\t\t\t\tdisposer: this._initEvent(key)!,\n\t\t\t\tcallbacks: [],\n\t\t\t\tdispatching: false,\n\t\t\t\tcleanup: false,\n\t\t\t};\n\t\t}\n\n\t\tconst listener = { object, context, callback, disposed: false };\n\n\t\tevents!.callbacks.push(listener);\n\n\t\treturn new Disposer(() => {\n\t\t\tlistener.disposed = true;\n\n\t\t\tif (events!.dispatching) {\n\t\t\t\tevents!.cleanup = true;\n\n\t\t\t} else {\n\t\t\t\t$array.removeFirst(events!.callbacks, listener);\n\n\t\t\t\tif (events!.callbacks.length === 0) {\n\t\t\t\t\tevents!.disposer.dispose();\n\t\t\t\t\tdelete this._events[key];\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\tpublic getCanvas(root: CanvasDisplayObject, options?: ICanvasOptions): HTMLCanvasElement {\n\n\t\t// Make sure everything is rendered\n\t\tthis.render(root);\n\n\t\tif (!options) {\n\t\t\toptions = {};\n\t\t}\n\n\t\tlet scale: number = this.resolution;\n\n\t\tlet canvasWidth = Math.floor(this._calculatedWidth * this.resolution);\n\t\tlet canvasHeight = Math.floor(this._calculatedHeight * this.resolution);\n\n\t\t// Check if we need to scale\n\t\tif (options.minWidth && (options.minWidth > canvasWidth)) {\n\t\t\tlet minScale = options.minWidth / canvasWidth;\n\t\t\tif (minScale > scale) {\n\t\t\t\tscale = minScale * this.resolution;\n\t\t\t}\n\t\t}\n\n\t\tif (options.minHeight && (options.minHeight > canvasHeight)) {\n\t\t\tlet minScale = options.minHeight / canvasHeight;\n\t\t\tif (minScale > scale) {\n\t\t\t\tscale = minScale * this.resolution;\n\t\t\t}\n\t\t}\n\n\t\tif (options.maxWidth && (options.maxWidth < canvasWidth)) {\n\t\t\tlet maxScale = options.maxWidth / canvasWidth;\n\t\t\tif (maxScale < scale) {\n\t\t\t\tscale = maxScale * this.resolution;\n\t\t\t}\n\t\t}\n\n\t\tif (options.maxHeight && (options.maxHeight > canvasHeight)) {\n\t\t\tlet maxScale = options.maxHeight / canvasHeight;\n\t\t\tif (maxScale < scale) {\n\t\t\t\tscale = maxScale * this.resolution;\n\t\t\t}\n\t\t}\n\n\t\t// Check if we need to compensate for pixel ratio\n\t\tif (options.maintainPixelRatio) {\n\t\t\tscale /= this.resolution;\n\t\t}\n\n\t\t// Init list canvases to remove from DOM after export\n\t\tconst canvases: HTMLCanvasElement[] = [];\n\n\t\t// Set up new canvas for export\n\t\tlet forceRender = false;\n\t\tconst canvas = document.createElement(\"canvas\");\n\t\tif (scale != this.resolution) {\n\t\t\tforceRender = true;\n\t\t\tcanvasWidth = canvasWidth * scale / this.resolution;\n\t\t\tcanvasHeight = canvasHeight * scale / this.resolution;\n\t\t}\n\n\t\tcanvas.width = canvasWidth;\n\t\tcanvas.height = canvasHeight;\n\n\t\t// Add to DOM so it inherits CSS\n\t\tcanvas.style.position = \"fixed\";\n\t\tcanvas.style.top = \"-10000px\";\n\t\tthis.view.appendChild(canvas);\n\t\tcanvases.push(canvas);\n\n\t\t// Context\n\t\tconst context = canvas.getContext(\"2d\")!;\n\n\t\tlet width = 0;\n\t\tlet height = 0;\n\t\tlet needRerender = false;\n\n\t\t$array.each(this.layers, (layer) => {\n\t\t\tif (layer && layer.visible) {\n\t\t\t\tif (layer.tainted || forceRender) {\n\t\t\t\t\tneedRerender = true;\n\n\t\t\t\t\tlayer.exportableView = layer.view;\n\t\t\t\t\tlayer.exportableContext = layer.context;\n\n\t\t\t\t\tlayer.view = document.createElement(\"canvas\");\n\n\t\t\t\t\t// Add to DOM so it inherits CSS\n\t\t\t\t\tlayer.view.style.position = \"fixed\";\n\t\t\t\t\tlayer.view.style.top = \"-10000px\";\n\t\t\t\t\tthis.view.appendChild(layer.view);\n\t\t\t\t\tcanvases.push(layer.view);\n\n\t\t\t\t\tlet extraX = 0;\n\t\t\t\t\tlet extraY = 0;\n\t\t\t\t\tif (layer.margin) {\n\t\t\t\t\t\textraX += layer.margin.left || 0 + layer.margin.right || 0;\n\t\t\t\t\t\textraY += layer.margin.top || 0 + layer.margin.bottom || 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tlayer.view.width = canvasWidth + extraX;\n\t\t\t\t\tlayer.view.height = canvasHeight + extraY;\n\n\t\t\t\t\tlayer.context = layer.view.getContext(\"2d\")!;\n\n\t\t\t\t\tlayer.dirty = true;\n\t\t\t\t\tlayer.scale = scale;\n\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tif (needRerender) {\n\t\t\tthis._omitTainted = true;\n\t\t\tthis.render(root);\n\t\t\tthis._omitTainted = false;\n\t\t}\n\n\t\t$array.each(this.layers, (layer) => {\n\t\t\tif (layer && layer.visible) {\n\n\t\t\t\t// Layer is fine. Just plop it into our target canvas\n\t\t\t\tlet x = 0;\n\t\t\t\tlet y = 0;\n\t\t\t\tif (layer.margin) {\n\t\t\t\t\tx = -(layer.margin.left || 0) * this.resolution;\n\t\t\t\t\ty = -(layer.margin.top || 0) * this.resolution;\n\t\t\t\t}\n\t\t\t\tcontext.drawImage(layer.view, x, y);\n\n\t\t\t\t// Restore layer original canvas\n\t\t\t\tif (layer.exportableView) {\n\t\t\t\t\tlayer.view = layer.exportableView;\n\t\t\t\t\tlayer.exportableView = undefined;\n\t\t\t\t}\n\n\t\t\t\tif (layer.exportableContext) {\n\t\t\t\t\tlayer.context = layer.exportableContext;\n\t\t\t\t\tlayer.exportableContext = undefined;\n\t\t\t\t}\n\n\t\t\t\tif (width < layer.view.clientWidth) {\n\t\t\t\t\twidth = layer.view.clientWidth;\n\t\t\t\t}\n\t\t\t\tif (height < layer.view.clientHeight) {\n\t\t\t\t\theight = layer.view.clientHeight;\n\t\t\t\t}\n\n\t\t\t\tlayer.scale = undefined;\n\t\t\t}\n\t\t});\n\n\t\tcanvas.style.width = width + \"px\";\n\t\tcanvas.style.height = height + \"px\";\n\n\t\t$array.each(canvases, (canvas) => {\n\t\t\tcanvas.style.position = \"\";\n\t\t\tcanvas.style.top = \"\";\n\t\t\tthis.view.removeChild(canvas);\n\t\t})\n\t\treturn canvas;\n\t}\n}\n\n\nclass GhostLayer {\n\tpublic view: HTMLCanvasElement;\n\tpublic context: CanvasRenderingContext2D;\n\tpublic margin: IMargin = {\n\t\tleft: 0,\n\t\tright: 0,\n\t\ttop: 0,\n\t\tbottom: 0,\n\t};\n\n\tprivate _resolution: number = 1;\n\tprivate _width: number = 0;\n\tprivate _height: number = 0;\n\n\tpublic imageArray?: Uint8ClampedArray;\n\n\tconstructor() {\n\t\tthis.view = document.createElement(\"canvas\");\n\t\tthis.context = this.view.getContext(\"2d\", { alpha: false, willReadFrequently: true })! as CanvasRenderingContext2D;\n\t\tthis.context.imageSmoothingEnabled = false;\n\n\t\tthis.view.style.position = \"absolute\";\n\t\tthis.view.style.top = \"0px\";\n\t\tthis.view.style.left = \"0px\";\n\t}\n\n\tresize(canvasWidth: number, canvasHeight: number, domWidth: number, domHeight: number, resolution: number) {\n\t\tthis._resolution = resolution;\n\n\t\tcanvasWidth += (this.margin.left + this.margin.right);\n\t\tcanvasHeight += (this.margin.top + this.margin.bottom);\n\n\t\t// TODO this should take into account calculateSize\n\t\tdomWidth += (this.margin.left + this.margin.right);\n\t\tdomHeight += (this.margin.top + this.margin.bottom);\n\n\t\tthis.view.style.left = -this.margin.left + \"px\";\n\t\tthis.view.style.top = -this.margin.top + \"px\";\n\n\t\tthis._width = Math.floor(canvasWidth * resolution);\n\t\tthis._height = Math.floor(canvasHeight * resolution);\n\n\t\tthis.view.width = this._width;\n\t\tthis.view.style.width = domWidth + \"px\";\n\n\t\tthis.view.height = this._height;\n\t\tthis.view.style.height = domHeight + \"px\";\n\t}\n\n\tgetImageData(point: IPoint, bbox: DOMRect): ImageData {\n\t\treturn this.context.getImageData(\n\t\t\t// TODO should this round ?\n\t\t\tMath.round(((point.x - bbox.left) / bbox.width) * this._width),\n\t\t\tMath.round(((point.y - bbox.top) / bbox.height) * this._height),\n\t\t\t1,\n\t\t\t1,\n\t\t);\n\t}\n\n\tgetImageArray(point: IPoint): Array<number> {\n\n\t\tif (!this.imageArray) {\n\t\t\tthis.imageArray = this.context.getImageData(0, 0, this._width, this._height).data;\n\t\t}\n\n\t\tconst data = this.imageArray;\n\n\t\tconst x = Math.round(point.x * this._resolution);\n\t\tconst y = Math.round(point.y * this._resolution);\n\n\t\tconst i = (y * this._width + x) * 4;\n\t\treturn [data[i], data[i + 1], data[i + 2], data[i + 3]];\n\t}\n\n\tsetMargin(layers: Array<CanvasLayer>): void {\n\t\tthis.margin.left = 0;\n\t\tthis.margin.right = 0;\n\t\tthis.margin.top = 0;\n\t\tthis.margin.bottom = 0;\n\n\t\t$array.each(layers, (layer) => {\n\t\t\tif (layer.margin) {\n\t\t\t\tthis.margin.left = Math.max(this.margin.left, layer.margin.left);\n\t\t\t\tthis.margin.right = Math.max(this.margin.right, layer.margin.right);\n\t\t\t\tthis.margin.top = Math.max(this.margin.top, layer.margin.top);\n\t\t\t\tthis.margin.bottom = Math.max(this.margin.bottom, layer.margin.bottom);\n\t\t\t}\n\t\t});\n\t}\n\n\tclear() {\n\t\tthis.context.save();\n\t\tthis.context.fillStyle = '#000';\n\t\tthis.context.fillRect(0, 0, this._width, this._height);\n\t}\n}\n\n\n/**\n * @ignore\n */\nexport class CanvasLayer implements ILayer {\n\tpublic view: HTMLCanvasElement;\n\tpublic context: CanvasRenderingContext2D;\n\tpublic tainted: boolean = true;\n\tpublic margin: IMargin | undefined;\n\tpublic order: number = 0;\n\tpublic visible: boolean = true;\n\tpublic width: number | undefined;\n\tpublic height: number | undefined;\n\tpublic scale: number | undefined;\n\tpublic dirty: boolean = true;\n\tpublic exportableView: HTMLCanvasElement | undefined;\n\tpublic exportableContext: CanvasRenderingContext2D | undefined;\n\n\tprivate _width: number = 0;\n\tprivate _height: number = 0;\n\n\tconstructor(view: HTMLCanvasElement, context: CanvasRenderingContext2D) {\n\t\tthis.view = view;\n\t\tthis.context = context;\n\t}\n\n\tresize(canvasWidth: number, canvasHeight: number, domWidth: number, domHeight: number, resolution: number) {\n\t\t// TODO should this take into account calculateSize ?\n\t\tif (this.width != null) {\n\t\t\tcanvasWidth = this.width;\n\t\t\tdomWidth = this.width;\n\t\t}\n\n\t\t// TODO should this take into account calculateSize ?\n\t\tif (this.height != null) {\n\t\t\tcanvasHeight = this.height;\n\t\t\tdomHeight = this.height;\n\t\t}\n\n\t\tif (this.margin) {\n\t\t\tcanvasWidth += (this.margin.left + this.margin.right);\n\t\t\tcanvasHeight += (this.margin.top + this.margin.bottom);\n\n\t\t\t// TODO this should take into account calculateSize\n\t\t\tdomWidth += (this.margin.left + this.margin.right);\n\t\t\tdomHeight += (this.margin.top + this.margin.bottom);\n\n\t\t\tthis.view.style.left = -this.margin.left + \"px\";\n\t\t\tthis.view.style.top = -this.margin.top + \"px\";\n\n\t\t} else {\n\t\t\tthis.view.style.left = \"0px\";\n\t\t\tthis.view.style.top = \"0px\";\n\t\t}\n\n\t\tthis._width = Math.floor(canvasWidth * resolution);\n\t\tthis._height = Math.floor(canvasHeight * resolution);\n\n\t\tthis.view.width = this._width;\n\t\tthis.view.style.width = domWidth + \"px\";\n\n\t\tthis.view.height = this._height;\n\t\tthis.view.style.height = domHeight + \"px\";\n\t}\n\n\tclear() {\n\t\tthis.context.save();\n\t\tthis.context.clearRect(0, 0, this._width, this._height);\n\t}\n}\n","import type { IDisposer } from \"../../util/Disposer\";\nimport type { IPoint } from \"../../util/IPoint\";\nimport type { Color } from \"../../util/Color\";\nimport type { Percent } from \"../../util/Percent\";\nimport type { Matrix } from \"../../util/Matrix\";\nimport type { IBounds } from \"../../util/IBounds\";\n\nexport interface IGradient {\n\taddColorStop(offset: number, color: string): void;\n}\n\n/**\n * Represents an object describing color switching point in a gradiend.\n *F\n * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/gradients/} for more info\n */\nexport interface IGradientStop {\n\n\t/**\n\t * Color.\n\t */\n\tcolor?: Color;\n\n\t/**\n\t * Offset defines where in the gradient the color should kick in. Values\n\t * from 0 to 1 are possible with 0 meaning start, 0.5 half-way through the\n\t * gradient, etc.\n\t */\n\toffset?: number;\n\n\t/**\n\t * Transparency of the color. 0 - completely transparent, 1 - fully opaque.\n\t */\n\topacity?: number;\n\n\t/**\n\t * Sets lightness of the color.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/gradients/#Brightness} for more info\n\t */\n\tlighten?: number;\n\n\t/**\n\t * Sets brightness of the color.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/gradients/#Brightness} for more info\n\t */\n\tbrighten?: number;\n\n\t/**\n\t * @ignore\n\t */\n\tcolorInherited?: boolean;\n\n\t/**\n\t * @ignore\n\t */\n\topacityInherited?: boolean;\n\n}\n\nexport interface IPattern {\n}\n\nexport type IPointerEvent = PointerEvent | MouseEvent | Touch;\n\nexport type Id = number | null;\n\nexport interface IRendererEvent<E> {\n\tevent: E;\n\tpoint: IPoint;\n\tid: Id;\n\tsimulated: boolean;\n\tnative: boolean;\n}\n\nexport interface IRendererEvents {\n\tclick: IRendererEvent<IPointerEvent>;\n\trightclick: IRendererEvent<IPointerEvent>;\n\tmiddleclick: IRendererEvent<IPointerEvent>;\n\tdblclick: IRendererEvent<IPointerEvent>;\n\tglobalpointermove: IRendererEvent<IPointerEvent>,\n\tglobalpointerup: IRendererEvent<IPointerEvent>,\n\tpointerover: IRendererEvent<IPointerEvent>;\n\tpointerout: IRendererEvent<IPointerEvent>;\n\tpointerdown: IRendererEvent<IPointerEvent>;\n\tpointermove: IRendererEvent<IPointerEvent>;\n\tpointerup: IRendererEvent<IPointerEvent>;\n\twheel: IRendererEvent<WheelEvent>;\n}\n\nexport interface IDisplayObject extends IDisposer {\n\tmask: IGraphics | null;\n\tvisible: boolean;\n\tinteractive: boolean;\n\tinactive: boolean | null;\n\twheelable: boolean;\n\tcancelTouch: boolean;\n\tisMeasured: boolean;\n\tbuttonMode: boolean;\n\talpha: number;\n\tangle: number;\n\tscale: number;\n\tcrisp: boolean;\n\tx: number;\n\ty: number;\n\tpivot: IPoint;\n\tfilter?: string;\n\tcursorOverStyle?: string;\n\texportable?: boolean;\n\n\t_setMatrix(): void;\n\tgetLayer(): ILayer;\n\tsetLayer(order: number | undefined, margin: IMargin | undefined): void;\n\tmarkDirtyLayer(deep?: boolean): void;\n\tclear(): void;\n\tinvalidateBounds(): void;\n\ttoLocal(point: IPoint): IPoint;\n\ttoGlobal(point: IPoint): IPoint;\n\tgetLocalBounds(): IBounds;\n\tgetAdjustedBounds(bounds?: IBounds): IBounds;\n\ton<C, Key extends keyof IRendererEvents>(key: Key, callback: (this: C, event: IRendererEvents[Key]) => void, context?: C): IDisposer;\n\thovering(): boolean;\n\tgetCanvas(): HTMLCanvasElement;\n\n\t/**\n\t * @ignore\n\t */\n\tgetLocalMatrix(): Matrix;\n}\n\nexport interface IContainer extends IDisplayObject {\n\tinteractiveChildren: boolean;\n\t_renderer:IRenderer;\n\taddChild(child: IDisplayObject): void;\n\taddChildAt(child: IDisplayObject, index: number): void;\n\tremoveChild(child: IDisplayObject): void;\n}\n\n\n/**\n * From https://github.com/pixijs/pixi.js/blob/3dd0ff9a935f0bc13a09aefff9eb2872f02c51b9/packages/canvas/canvas-renderer/src/utils/mapCanvasBlendModesToPixi.ts#L13\n */\nexport enum BlendMode {\n\tADD = \"lighter\",\n\tCOLOR = \"color\",\n\tCOLOR_BURN = \"color-burn\",\n\tCOLOR_DODGE = \"color-dodge\",\n\tDARKEN = \"darken\",\n\tDIFFERENCE = \"difference\",\n\tDST_OVER = \"destination-over\",\n\tEXCLUSION = \"exclusion\",\n\tHARD_LIGHT = \"hard-light\",\n\tHUE = \"hue\",\n\tLIGHTEN = \"lighten\",\n\tLUMINOSITY = \"luminosity\",\n\tMULTIPLY = \"multiply\",\n\tNORMAL = \"source-over\",\n\tOVERLAY = \"overlay\",\n\tSATURATION = \"saturation\",\n\tSCREEN = \"screen\",\n\tSOFT_LIGHT = \"soft-light\",\n\tSRC_ATOP = \"source-atop\",\n\tXOR = \"xor\",\n}\n\nexport interface IGraphics extends IDisplayObject {\n\tblendMode: BlendMode;\n\n\tclear(): void;\n\n\tbeginFill(color?: Color | IGradient | IPattern, alpha?: number): void;\n\tendFill(): void;\n\tbeginPath(): void;\n\n\tlineStyle(width?: number, color?: Color | IGradient | IPattern, alpha?: number, lineJoin?: \"miter\" | \"round\" | \"bevel\", lineCap?: \"butt\" | \"round\" | \"square\"): void;\n\tsetLineDash(dash?: number[]): void;\n\tsetLineDashOffset(dashOffset?: number): void;\n\tendStroke(): void;\n\n\tdrawRect(x: number, y: number, width: number, height: number): void;\n\tdrawCircle(x: number, y: number, radius: number): void;\n\tdrawEllipse(x: number, y: number, radiusX: number, radiusY: number): void;\n\tarc(cx: number, cy: number, radius: number, startAngle: number, endAngle: number, anticlockwise?: boolean): void;\n\tarcTo(x1: number, y1: number, x2: number, y2: number, radius: number): void;\n\tlineTo(x: number, y: number): void;\n\tmoveTo(x: number, y: number): void;\n\tclosePath(): void;\n\tbezierCurveTo(cpX: number, cpY: number, cpX2: number, cpY2: number, toX: number, toY: number): void;\n\tquadraticCurveTo(cpX: number, cpY: number, toX: number, toY: number): void;\n\tsvgPath(path: string): void;\n\timage(image: HTMLImageElement | HTMLCanvasElement, width: number, height: number, x: number, y: number): void;\n\tshadow(color: Color, blur?: number, offsetX?: number, offsetY?: number, opacity?: number): void;\n}\n\n/**\n * @ignore\n */\nexport interface IText extends IDisplayObject {\n\tresolution: number;\n\ttext: string;\n\tstyle: ITextStyle;\n\ttextVisible: boolean;\n\ttruncated?: boolean;\n}\n\n/**\n * @ignore\n */\nexport interface IRadialText extends IText {\n\ttextType?: \"regular\" | \"circular\" | \"radial\" | \"aligned\" | \"adjusted\";\n\tradius?: number;\n\tstartAngle?: number;\n\trelativeAngle?: number;\n\tinside?: boolean;\n\torientation?: \"inward\" | \"outward\" | \"auto\";\n\tkerning?: number;\n}\n\nexport interface ITextStyle {\n\t//wordWrapWidth: number = 100;\n\tfill?: Color | IGradient | IPattern;\n\ttextAlign?: \"start\" | \"end\" | \"left\" | \"right\" | \"center\";\n\tverticalAlign?: \"baseline\" | \"sub\" | \"super\";\n\tfontFamily?: string;\n\tfontSize?: string | number;\n\tfontWeight?: 'normal' | 'bold' | 'bolder' | 'lighter' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900'\n\tfontStyle?: 'normal' | 'italic' | 'oblique';\n\tfontVariant?: \"normal\" | \"small-caps\";\n\ttextDecoration?: \"underline\" | \"line-through\";\n\tshadowColor?: Color | null;\n\tshadowBlur?: number;\n\tshadowOffsetX?: number;\n\tshadowOffsetY?: number;\n\tshadowOpacity?: number;\n\n\n\t// leading?: number;\n\t// letterSpacing?: number;\n\tlineHeight?: number | Percent;\n\tbaselineRatio?: number;\n\t// padding?: number;\n\t// stroke?: number;\n\t// strokeThickness?: number;\n\t// trim?: number;\n\t// wordWrap?: boolean;\n\tdirection?: \"ltr\" | \"rtl\";\n\ttextBaseline?: \"top\" | \"hanging\" | \"middle\" | \"alphabetic\" | \"ideographic\" | \"bottom\";\n\toversizedBehavior?: \"none\" | \"hide\" | \"fit\" | \"wrap\" | \"wrap-no-break\" | \"truncate\";\n\tbreakWords?: boolean;\n\tellipsis?: string;\n\tmaxWidth?: number;\n\tmaxHeight?: number;\n\tminScale?: number;\n}\n\nexport interface IPicture extends IDisplayObject {\n\timage: HTMLImageElement | undefined;\n\twidth?: number | undefined;\n\theight?: number | undefined;\n\tshadowColor?: Color;\n\tshadowBlur?: number;\n\tshadowOffsetX?: number;\n\tshadowOffsetY?: number;\n\tshadowOpacity?: number;\n}\n\nexport interface IRenderer extends IDisposer {\n\tdebugGhostView: boolean;\n\ttapToActivate: boolean;\n\ttapToActivateTimeout: number;\n\tresolution: number;\n\tremoveHovering(graphics:IDisplayObject):void;\n\tinteractionsEnabled: boolean;\n\tcreateLinearGradient(x1: number, y1: number, x2: number, y2: number): IGradient;\n\tcreateRadialGradient(x1: number, y1: number, radius1: number, x2: number, y2: number, radius2: number): IGradient;\n\tcreatePattern(graphics: IGraphics, background: IGraphics, repetition: string, width: number, height: number): IPattern;\n\tmakeContainer(): IContainer;\n\tmakeGraphics(): IGraphics;\n\tmakeText(text: string, style: ITextStyle): IText;\n\tmakeRadialText(text: string, style: ITextStyle): IText;\n\tmakeTextStyle(): ITextStyle;\n\tmakePicture(image: HTMLImageElement | undefined): IPicture;\n\tresize(canvasWidth: number, canvasHeight: number, domWidth: number, domHeight: number): void;\n\trender(root: IDisplayObject): void;\n\tgetCanvas(root: IDisplayObject, options?: ICanvasOptions): HTMLCanvasElement;\n\tview: HTMLElement;\n\tgetEvent<A extends IPointerEvent>(originalEvent: A, adjustPoint?: boolean): IRendererEvent<A>;\n\tgetObjectAtPoint(point: IPoint): IDisplayObject | undefined;\t\n\tresetImageArray():void;\n}\n\nexport interface ICanvasOptions {\n\tmaintainPixelRatio?: boolean;\n\tminWidth?: number;\n\tmaxWidth?: number;\n\tminHeight?: number;\n\tmaxHeight?: number;\n}\n\nexport interface IMargin {\n\tleft: number;\n\tright: number;\n\ttop: number;\n\tbottom: number;\n}\n\n/**\n * @ignore\n */\nexport interface ILayer {\n\tvisible: boolean;\n\torder: number;\n\twidth: number | undefined;\n\theight: number | undefined;\n\tdirty: boolean;\n\tmargin: IMargin | undefined;\n}\n","import type { IBounds } from \"../../util/IBounds\"\nimport type { IGradient, IGradientStop } from \"../backend/Renderer\";\nimport type { Sprite } from \"../Sprite\";\n\nimport { Entity, IEntitySettings, IEntityPrivate } from \"../../util/Entity\"\n\n\nexport interface IGradientSettings extends IEntitySettings {\n\n\t/**\n\t * A list of color steps for the gradient.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/gradients/} for more info\n\t */\n\tstops?: Array<IGradientStop>;\n\n\t/**\n\t * Gradient target.\n\t */\n\ttarget?: Sprite;\n\n}\n\nexport interface IGradientPrivate extends IEntityPrivate {\n}\n\n/**\n * Base class for gradients.\n *\n * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/gradients/} for more info\n */\nexport abstract class Gradient extends Entity {\n\n\tdeclare public _settings: IGradientSettings;\n\tdeclare public _privateSettings: IGradientPrivate;\n\n\tpublic static className: string = \"Gradient\";\n\tpublic static classNames: Array<string> = Entity.classNames.concat([Gradient.className]);\n\n\tprotected _afterNew() {\n\t\t// Applying themes because gradient will not have parent\n\t\tsuper._afterNewApplyThemes();\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic getFill(_target: Sprite): IGradient {\n\t\treturn {\n\t\t\taddColorStop: (_offset: number, _color: string) => { }\n\t\t};\n\t}\n\n\tpublic _changed() {\n\t\tsuper._changed();\n\n\t\t//if (this.isDirty(\"target\") && this.get(\"target\")) {\n\t\t//\tthis.get(\"target\")!.events.on(\"boundschanged\", () => {\n\n\t\t//\t});\n\t\t//}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic getBounds(target: Sprite): IBounds {\n\t\tconst gradientTarget = this.get(\"target\");\n\t\tif (gradientTarget) {\n\t\t\tlet bounds = gradientTarget.globalBounds();\n\n\t\t\tconst p0 = target.toLocal({ x: bounds.left, y: bounds.top });\n\t\t\tconst p1 = target.toLocal({ x: bounds.right, y: bounds.top });\n\t\t\tconst p2 = target.toLocal({ x: bounds.right, y: bounds.bottom });\n\t\t\tconst p3 = target.toLocal({ x: bounds.left, y: bounds.bottom });\n\n\t\t\treturn {\n\t\t\t\tleft: Math.min(p0.x, p1.x, p2.x, p3.x),\n\t\t\t\ttop: Math.min(p0.y, p1.y, p2.y, p3.y),\n\t\t\t\tright: Math.max(p0.x, p1.x, p2.x, p3.x),\n\t\t\t\tbottom: Math.max(p0.y, p1.y, p2.y, p3.y)\n\t\t\t}\n\t\t}\n\t\treturn target._display.getLocalBounds();\n\t}\n\n}\n","import type { IGradient } from \"../backend/Renderer\";\nimport type { Sprite } from \"../Sprite\";\n\nimport { Gradient, IGradientSettings, IGradientPrivate } from \"./Gradient\";\nimport { Color } from \"../../util/Color\";\n\nimport * as $array from \"../../util/Array\";\nimport * as $type from \"../../util/Type\";\nimport * as $math from \"../../util/Math\";\n\n\nexport interface ILinearGradientSettings extends IGradientSettings {\n\n\t/**\n\t * Gradient rotation, in degrees.\n\t *\n\t * @default 90\n\t */\n\trotation?: number;\n\n}\n\nexport interface ILinearGradientPrivate extends IGradientPrivate {\n}\n\n/**\n * Linear gradient.\n *\n * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/gradients/} for more info\n */\nexport class LinearGradient extends Gradient {\n\n\tdeclare public _settings: ILinearGradientSettings;\n\tdeclare public _privateSettings: ILinearGradientPrivate;\n\n\tpublic static className: string = \"LinearGradient\";\n\tpublic static classNames: Array<string> = Gradient.classNames.concat([LinearGradient.className]);\n\n\t/**\n\t * @ignore\n\t */\n\tpublic getFill(target: Sprite): IGradient {\n\t\tconst rotation = this.get(\"rotation\", 0);\n\t\tlet bounds = this.getBounds(target);\n\n\t\tlet l = bounds.left || 0;\n\t\tlet r = bounds.right || 0;\n\t\tlet t = bounds.top || 0;\n\t\tlet b = bounds.bottom || 0;\n\n\t\tlet cos = $math.cos(rotation);\n\t\tlet sin = $math.sin(rotation);\n\n\t\tlet w = cos * (r - l);\n\t\tlet h = sin * (b - t);\n\n\t\tif (w == 0) {\n\t\t\tw = 1;\n\t\t}\n\n\t\tif (h == 0) {\n\t\t\th = 1;\n\t\t}\n\n\t\tlet longer = Math.max(w, h);\n\n\t\tconst gradient = this._root._renderer.createLinearGradient(\n\t\t\tl,\n\t\t\tt,\n\t\t\tl + longer * cos,\n\t\t\tt + longer * sin\n\t\t);\n\n\t\tconst stops = this.get(\"stops\")!;\n\t\tif (stops) {\n\t\t\tlet i = 0;\n\t\t\t$array.each(stops, (stop) => {\n\n\t\t\t\tlet offset = stop.offset;\n\n\t\t\t\tif (!$type.isNumber(offset)) {\n\t\t\t\t\toffset = i / (stops.length - 1);\n\t\t\t\t}\n\n\t\t\t\tlet opacity = stop.opacity;\n\n\t\t\t\tif (!$type.isNumber(opacity)) {\n\t\t\t\t\topacity = 1;\n\t\t\t\t}\n\n\t\t\t\tlet color = stop.color;\n\n\t\t\t\tif (color) {\n\n\t\t\t\t\tconst lighten = stop.lighten;\n\t\t\t\t\tif (lighten) {\n\t\t\t\t\t\tcolor = Color.lighten(color, lighten)\n\t\t\t\t\t}\n\n\t\t\t\t\tconst brighten = stop.brighten;\n\t\t\t\t\tif (brighten) {\n\t\t\t\t\t\tcolor = Color.brighten(color, brighten)\n\t\t\t\t\t}\n\n\t\t\t\t\tgradient.addColorStop(offset, 'rgba(' + color.r + ',' + color.g + ',' + color.b + ',' + opacity + ')');\n\t\t\t\t}\n\t\t\t\ti++;\n\t\t\t})\n\t\t}\n\t\treturn gradient;\n\t}\n}\n","import type { Entity, Animation } from \"./Entity\";\nimport { Percent } from \"./Percent\";\nimport { Color } from \"./Color\";\nimport type { Easing } from \"./Ease\";\nimport { EventDispatcher, Events } from \"./EventDispatcher\";\nimport * as $object from \"./Object\";\n\nexport type Animations<T> = { [K in keyof T]?: Animation<T[K]> };\n\n/**\n * @ignore\n */\nexport async function waitForAnimations<T>(animations: Animations<T> | undefined): Promise<void> {\n\tif (animations !== undefined) {\n\t\tconst promises: Array<Promise<void>> = [];\n\n\t\t$object.each(animations, (_, animation) => {\n\t\t\tpromises.push(animation.waitForStop());\n\t\t});\n\n\t\tawait Promise.all(promises);\n\t}\n}\n\n\ninterface ITime {\n\treadonly tag: unique symbol;\n}\n\n/**\n * New type which allows for conversion from a number into a Time, but not from a Time to a number\n */\nexport type Time = number | ITime;\n\n\n/**\n * @ignore\n */\nexport function normalize(value: number, min: number, max: number): Time {\n\tif (min === max) {\n\t\treturn 0;\n\n\t} else {\n\t\treturn Math.min(Math.max((value - min) * (1 / (max - min)), 0), 1);\n\t}\n}\n\n/**\n * @ignore\n */\nexport function range(diff: Time, from: number, to: number): number {\n\treturn from + (diff as number * (to - from));\n}\n\n/**\n * @ignore\n */\nexport function defaultInterpolate<A, B>(diff: Time, from: A, to: B): A | B {\n\tif (diff >= 1) {\n\t\treturn to;\n\n\t} else {\n\t\treturn from;\n\t}\n}\n\n/**\n * @ignore\n */\nexport function percentInterpolate(diff: Time, from: Percent, to: Percent): Percent {\n\treturn new Percent(range(diff, from.percent, to.percent));\n}\n\n/**\n * @ignore\n */\nexport function colorInterpolate(diff: Time, from: Color, to: Color): Color {\n\treturn Color.interpolate(diff, from, to);\n}\n\n/**\n * @ignore\n */\nexport function getInterpolate(from: number, to: number): typeof range;\n\n/**\n * @ignore\n */\nexport function getInterpolate(from: Percent, to: Percent): typeof percentInterpolate;\n\n/**\n * @ignore\n */\nexport function getInterpolate(from: any, to: any): typeof defaultInterpolate;\n\n/**\n * @ignore\n */\nexport function getInterpolate(from: any, to: any): (diff: Time, from: any, to: any) => any {\n\tif (typeof from === \"number\" && typeof to === \"number\") {\n\t\treturn range;\n\t}\n\n\tif (from instanceof Percent && to instanceof Percent) {\n\t\treturn percentInterpolate;\n\t}\n\n\tif (from instanceof Color && to instanceof Color) {\n\t\treturn colorInterpolate;\n\t}\n\n\treturn defaultInterpolate;\n}\n\n\nexport enum AnimationState {\n\tStopped,\n\tPlaying,\n\tPaused,\n}\n\nexport interface IAnimation {\n\t_runAnimation(_currentTime: number): AnimationState;\n}\n\n\n/**\n * @ignore\n */\nexport interface IEntityEvents {\n\tstarted: {};\n\tstopped: {};\n\t// TODO replace this with stopped\n\tended: {};\n\tprogress: { progress: number };\n}\n\n/**\n * @ignore\n */\nexport class AnimationTime implements IAnimation {\n\tprotected _entity: Entity;\n\tprotected _duration: number;\n\n\tprotected _playingDuration: number | null = null;\n\tprotected _startingTime: number | null = null;\n\tprotected _current: Time = 0;\n\tprotected _from: Time = 0;\n\tprotected _to: Time = 0;\n\n\tdeclare public _events: IEntityEvents;\n\tpublic events: EventDispatcher<Events<this, this[\"_events\"]>> = new EventDispatcher();\n\n\tpublic easing: Easing | undefined;\n\n\tconstructor(entity: Entity, duration: number) {\n\t\tthis._entity = entity;\n\t\tthis._duration = duration;\n\t}\n\n\tprivate _stopEvent() {\n\t\tconst type = \"stopped\";\n\t\tif (this.events.isEnabled(type)) {\n\t\t\tthis.events.dispatch(type, { type: type, target: this });\n\t\t}\n\t}\n\n\tpublic _runAnimation(currentTime: number): AnimationState {\n\t\tif (this._playingDuration !== null) {\n\t\t\tif (this._startingTime === null) {\n\t\t\t\tthis._startingTime = currentTime;\n\t\t\t\treturn AnimationState.Playing;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tconst diff = (currentTime - this._startingTime) / this._playingDuration;\n\n\t\t\t\tif (diff >= 1) {\n\t\t\t\t\tthis._playingDuration = null;\n\t\t\t\t\tthis._startingTime = null;\n\t\t\t\t\tthis._from = this._to;\n\t\t\t\t\tthis._current = this._to;\n\t\t\t\t\tthis._entity.markDirty();\n\t\t\t\t\tthis._stopEvent();\n\t\t\t\t\tconst type = \"ended\";\n\t\t\t\t\tif (this.events.isEnabled(type)) {\n\t\t\t\t\t\tthis.events.dispatch(type, { type: type, target: this });\n\t\t\t\t\t}\n\t\t\t\t\treturn AnimationState.Stopped;\n\n\t\t\t\t} else {\n\t\t\t\t\tthis._current = range(diff, this._from as number, this._to as number);\n\t\t\t\t\tthis._entity.markDirty();\n\n\t\t\t\t\tconst type = \"progress\";\n\t\t\t\t\tif (this.events.isEnabled(type)) {\n\t\t\t\t\t\tthis.events.dispatch(type, { type: type, target: this, progress: diff });\n\t\t\t\t\t}\n\n\t\t\t\t\treturn AnimationState.Playing;\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else {\n\t\t\treturn AnimationState.Stopped;\n\t\t}\n\t}\n\n\tprivate _play() {\n\t\tthis._from = this._current;\n\n\t\tif (this._playingDuration === null) {\n\t\t\tthis._entity._root._addAnimation(this);\n\n\t\t\tconst type = \"started\";\n\t\t\tif (this.events.isEnabled(type)) {\n\t\t\t\tthis.events.dispatch(type, { type: type, target: this });\n\t\t\t}\n\n\t\t} else {\n\t\t\tthis._startingTime = null;\n\t\t}\n\n\t\tthis._playingDuration = Math.abs((this._to as number) - (this._from as number)) * this._duration;\n\t}\n\n\tpublic get duration(): number {\n\t\treturn this._duration;\n\t}\n\n\tpublic set duration(value: number) {\n\t\tif (this._duration !== value) {\n\t\t\tthis._duration = value;\n\n\t\t\tif (value === 0) {\n\t\t\t\tthis.jumpTo(this._to);\n\n\t\t\t} else if (this._current !== this._to) {\n\t\t\t\tthis._play();\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic get current(): Time {\n\t\tif (this.easing) {\n\t\t\treturn this.easing(this._current);\n\n\t\t} else {\n\t\t\treturn this._current;\n\t\t}\n\t}\n\n\tpublic stop() {\n\t\tthis.jumpTo(this._current);\n\t}\n\n\tpublic jumpTo(value: Time) {\n\t\tif (this._current !== value) {\n\t\t\tthis._entity.markDirty();\n\t\t}\n\n\t\tif (this._playingDuration !== null) {\n\t\t\tthis._stopEvent();\n\t\t}\n\n\t\tthis._playingDuration = null;\n\t\tthis._startingTime = null;\n\t\tthis._current = value;\n\t\tthis._from = value;\n\t\tthis._to = value;\n\t}\n\n\tpublic tweenTo(value: Time) {\n\t\tif (this._current === value || this._duration === 0) {\n\t\t\tthis.jumpTo(value);\n\n\t\t} else {\n\t\t\tif (this._to !== value) {\n\t\t\t\tthis._to = value;\n\t\t\t\tthis._play();\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n/*export class AnimationValue extends AnimationTime {\n\tpublic _min: number;\n\tpublic _max: number;\n\n\tconstructor(entity: Entity, duration: number, min: number, max: number) {\n\t\tsuper(entity, duration);\n\t\tthis._min = min;\n\t\tthis._max = max;\n\t}\n\n\tpublic get min(): number {\n\t\treturn this._min;\n\t}\n\n\tpublic set min(value: number) {\n\t\tif (this._min !== value) {\n\t\t\tthis._min = value;\n\t\t\tthis._entity.markDirty();\n\t\t}\n\t}\n\n\tpublic get max(): number {\n\t\treturn this._max;\n\t}\n\n\tpublic set max(value: number) {\n\t\tif (this._max !== value) {\n\t\t\tthis._max = value;\n\t\t\tthis._entity.markDirty();\n\t\t}\n\t}\n\n\tpublic currentValue(): number {\n\t\treturn range(super.currentTime(), this._min, this._max);\n\t}\n\n\tpublic jumpToValue(value: number) {\n\t\tsuper.jumpToTime(normalize(value, this._min, this._max));\n\t}\n\n\tpublic tweenToValue(value: number) {\n\t\tsuper.tweenToTime(normalize(value, this._min, this._max));\n\t}\n}\n*/\n","/**\n * ============================================================================\n * IMPORTS\n * ============================================================================\n * @hidden\n */\nimport type { Optional } from \"./Type\";\nimport * as $type from \"./Type\";\n\n\n/**\n * ============================================================================\n * UTILITY FUNCTIONS\n * ============================================================================\n * @hidden\n */\n\n/**\n * Searches `array` for `value`.\n *\n * Returns -1 if not found.\n *\n * @param array Source array\n * @param value Value to search\n * @returns Index\n */\nexport function indexOf<A>(array: ArrayLike<A>, value: A): number {\n\tconst length = array.length;\n\n\tfor (let i = 0; i < length; ++i) {\n\t\t// TODO handle NaN\n\t\tif (array[i] === value) {\n\t\t\treturn i;\n\t\t}\n\t}\n\n\treturn -1;\n}\n\n/**\n * Calls `test` for each element in `array`.\n *\n * If `test` returns `true` then it immediately returns `true`.\n *\n * If `test` returns `false` for all of the elements in `array` then it returns `false`.\n *\n * @param array Source array\n * @param test Function which is called on each element\n * @returns Whether `test` returned true or not\n */\nexport function any<A>(array: ArrayLike<A>, test: (value: A) => boolean): boolean {\n\tconst length = array.length;\n\n\tfor (let i = 0; i < length; ++i) {\n\t\tif (test(array[i])) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}\n\n/**\n * Calls `fn` function for every member of array and returns a new array out\n * of all outputs.\n *\n * @param array Source array\n * @param fn Callback function\n * @returns New array\n */\nexport function map<A, B>(array: ArrayLike<A>, fn: (value: A, index: number) => B): Array<B> {\n\tconst length = array.length;\n\tconst output = new Array(length);\n\n\tfor (let i = 0; i < length; ++i) {\n\t\toutput[i] = fn(array[i], i);\n\t}\n\n\treturn output;\n}\n\n/**\n * Iterates through all items in array and calls `fn` function for each of\n * them.\n *\n * @param array Source array\n * @param fn Callback function\n */\nexport function each<A>(array: ArrayLike<A>, fn: (value: A, index: number) => void): void {\n\tconst length = array.length;\n\n\tfor (let i = 0; i < length; ++i) {\n\t\tfn(array[i], i);\n\t}\n}\n\n/**\n * Iterates through all items in array in reverse order and calls `fn` function for each of\n * them.\n *\n * @param array Source array\n * @param fn Callback function\n */\nexport function eachReverse<A>(array: ArrayLike<A>, fn: (value: A, index: number) => void): void {\n\tlet i = array.length;\n\n\twhile (i > 0) {\n\t\t--i;\n\t\tfn(array[i], i);\n\t}\n}\n\n/**\n * Iterates through all items in array and calls `fn` function for each of\n * them.\n *\n * If `fn` call evaluates to `false`, further iteration is cancelled.\n *\n * @param array Source array\n * @param fn Callback function\n */\nexport function eachContinue<A>(array: ArrayLike<A>, fn: (value: A, index: number) => boolean): void {\n\tconst length = array.length;\n\n\tfor (let i = 0; i < length; ++i) {\n\t\tif (!fn(array[i], i)) {\n\t\t\tbreak;\n\t\t}\n\t}\n}\n\n/**\n * Shifts an item at `index` towards beginning of the array.\n *\n * @param array Source array\n * @param index Target element index\n */\nexport function shiftLeft<A>(array: Array<A>, index: number): void {\n\tconst length = array.length;\n\n\tfor (let i = index; i < length; ++i) {\n\t\tarray[i - index] = array[i];\n\t}\n\n\tarray.length = length - index;\n}\n\n/**\n * Returns the last item of the array.\n *\n * @param array Source array\n * @returns Last item\n */\nexport function last<A>(array: Array<A>): Optional<A> {\n\tconst length = array.length;\n\treturn length ? array[length - 1] : undefined;\n}\n\n/**\n * Returns the first item of the array.\n *\n * @param array Source array\n * @returns Last item\n */\nexport function first<A>(array: Array<A>): Optional<A> {\n\treturn array[0];\n}\n\n/**\n * Inserts `element` into `array` at `index`.\n *\n * Caps `index` to be between `0` and `array.length`\n *\n * @param array Source array\n * @param element Item to insert\n * @param array Index to insert item at\n */\nexport function insert<A>(array: Array<A>, element: A, index: number): void {\n\t//if (array) {\n\tindex = Math.max(0, Math.min(index, array.length));\n\tarray.splice(index, 0, element);\n\t//}\n}\n\n/**\n * Removes all copies of `element` from `array` (if they exist) and then\n * inserts `element` at `index`.\n *\n * @param array Source array\n * @param element Item\n * @param array Index to move item to\n */\nexport function setIndex<A>(array: Array<A>, element: A, index: number): void {\n\tremove(array, element);\n\tinsert(array, element, index);\n}\n\n\n/**\n * Pushes all of the elements from `input` into `array`.\n *\n * @param array Output array\n * @param input Input array\n */\nexport function pushAll<A>(array: Array<A>, input: Array<A>) {\n\tconst length = input.length;\n\n\tfor (let i = 0; i < length; ++i) {\n\t\tarray.push(input[i]);\n\t}\n}\n\n\n/**\n * Removes `element` from `array`.\n *\n * If there are multiple copies of `element`, they are all removed.\n *\n * @param array Source array\n * @param element Item to remove\n */\nexport function remove<A>(array: Array<A>, element: A): boolean {\n\tlet found: boolean = false;\n\tlet index: number = 0;\n\n\tfor (;;) {\n\t\tindex = array.indexOf(element, index);\n\n\t\tif (index === -1) {\n\t\t\treturn found;\n\n\t\t} else {\n\t\t\tfound = true;\n\t\t\tarray.splice(index, 1);\n\t\t}\n\t}\n}\n\nexport function removeFirst<A>(array: Array<A>, element: A): boolean {\n\tlet index: number = array.indexOf(element);\n\n\tif (index !== -1) {\n\t\tarray.splice(index, 1);\n\t\treturn true;\n\n\t} else {\n\t\treturn false;\n\t}\n}\n\n/**\n * Adds an `element` to `array`.\n *\n * If array already contains and item like this, it is removed before adding\n * it again.\n *\n * Optionally `toIndex` can be specified to add element at specific index.\n *\n * @param array Source array\n * @param element Item to add\n * @param array Index to move item to\n */\nexport function move<A>(array: Array<A>, element: A, toIndex?: number): void {\n\t// @todo this implementation must be the same as the List.moveValue method\n\t// @todo don't do anything if the desired index is the same as the current index\n\tlet index = indexOf(array, element);\n\n\t// @todo remove all old values rather than only the first ?\n\tif (index !== -1) {\n\t\tremoveIndex(array, index);\n\t}\n\n\tif (toIndex == null) {\n\t\tarray.push(element);\n\t} else {\n\t\tinsertIndex(array, toIndex, element);\n\t}\n}\n\n\n/**\n * Inserts `element` into `array` at `index`.\n *\n * If `index` is not provided, it will insert `element` at the end of `array`.\n *\n * @param array Source array\n * @param element Item to add\n * @param array Index to add item at\n */\nexport function add<A>(array: Array<A>, element: A, index?: number): void {\n\t// Append to the end if index is not set\n\tif (!$type.isNumber(index)) {\n\t\tarray.push(element);\n\t}\n\n\t// Add to the beginning of array if index is 0\n\telse if (index === 0) {\n\t\tarray.unshift(element);\n\t}\n\t// Add to indicated place if index is set\n\telse {\n\t\tarray.splice(index, 0, element);\n\t}\n}\n\n\n/**\n * Pushes `element` into `array` if it doesn't already exist.\n *\n * @param array Source array\n * @param element Item to add\n */\nexport function pushOne<A>(array: Array<A>, element: A): void {\n\tif (array.indexOf(element) === -1) {\n\t\tarray.push(element);\n\t}\n}\n\n\n/**\n * Removes `element` from `array` (if it exists) and then inserts `element` at\n * `index`.\n *\n * If `index` is not provided, it will insert `element` at the end of `array`.\n *\n * @param array Source array\n * @param element Item to remove\n * @param array Index to move item to\n */\nexport function replace<A>(array: Array<A>, element: A, index?: number): void {\n\t// check if exists\n\tlet ind: number = array.indexOf(element);\n\n\t// remove if exists\n\tif (ind !== -1) {\n\t\tarray.splice(ind, 1);\n\t}\n\n\t// add to end if index is not set\n\tif (!$type.isNumber(index)) {\n\t\tarray.push(element);\n\t}\n\t// add to indicated place if index is set\n\telse {\n\t\tarray.splice(index, 0, element);\n\t}\n}\n\n/**\n * Wraps `input` in an array, if it isn't already an array.\n *\n * @param input Source value\n * @return An array\n */\nexport function toArray<A>(input: Array<A> | A): Array<A> {\n\tif (Array.isArray(input)) {\n\t\treturn input;\n\t}\n\telse {\n\t\treturn [input];\n\t}\n}\n\n/**\n * Returns `true` if `element` exists in `array`.\n *\n * @param array Source array\n * @param element Item to search for\n * @returns Item in array?\n */\nexport function has<A>(array: ArrayLike<A>, element: A): boolean {\n\treturn indexOf(array, element) !== -1;\n}\n\n/**\n * Returns a shallow copy of `array`.\n *\n * @param array Source array\n * @returns Copy of the array\n */\nexport function copy<A>(array: ArrayLike<A>): Array<A> {\n\tconst length = array.length;\n\n\t// It's faster to create the array with a pre-defined length\n\tconst output = new Array(length);\n\n\tfor (let i = 0; i < length; ++i) {\n\t\t// Because the array has a pre-defined length, we have to assign rather than push\n\t\t// This is also faster than pushing\n\t\toutput[i] = array[i];\n\t}\n\n\treturn output;\n}\n\n\n/**\n * Returns a copy of `array` which contains all the elements between `start`\n * and `end`. (including `start` and excluding `end`)\n *\n * If `end` is not provided, it defaults to `array.length`.\n *\n * @param array Source array\n * @param start Start index\n * @param end End index\n * @returns Part of the array\n */\nexport function slice<A>(array: ArrayLike<A>, start: number, end: number = array.length): Array<A> {\n\tconst output = new Array(end - start);\n\n\tfor (let i = start; i < end; ++i) {\n\t\toutput[i - start] = array[i];\n\t}\n\n\treturn output;\n}\n\n/**\n * Inserts a value into array at specific index.\n *\n * @param array Source array\n * @param index Index\n * @param value Value to insert\n */\nexport function insertIndex<A>(array: Array<A>, index: number, value: A): void {\n\tarray.splice(index, 0, value);\n}\n\n/**\n * Removes a value from array at specific index.\n *\n * @param array Source array\n * @param index Index\n */\nexport function removeIndex<A>(array: Array<A>, index: number): void {\n\tarray.splice(index, 1);\n}\n\n/**\n * @ignore Exclude from docs\n * @todo Description\n */\nexport interface SortResult {\n\tfound: boolean;\n\tindex: number\n}\n\n/**\n * Searches the array using custom function and returns index of the item if\n * found.\n *\n * Will call `matches` function on all items of the array. If return value\n * evaluates to `true`, index is returned.\n *\n * Otherwise returns -1.\n *\n * @param array Source array\n * @param matches Search function\n * @returns Index of the item if found\n */\nexport function findIndex<A>(array: ArrayLike<A>, matches: (value: A, index: number) => boolean): number {\n\tconst length = array.length;\n\n\tfor (let i = 0; i < length; ++i) {\n\t\tif (matches(array[i], i)) {\n\t\t\treturn i;\n\t\t}\n\t}\n\n\treturn -1;\n}\n\n/**\n * This is the same as `findIndex` except it searches from right to left.\n *\n * @param array Source array\n * @param matches Search function\n * @returns Index of the item if found\n */\nexport function findIndexReverse<A>(array: ArrayLike<A>, matches: (value: A, index: number) => boolean): number {\n\tlet i = array.length;\n\n\twhile (i > 0) {\n\t\t--i;\n\t\tif (matches(array[i], i)) {\n\t\t\treturn i;\n\t\t}\n\t}\n\n\treturn -1;\n}\n\n/**\n * Searches the array using custom function and returns item if found.\n *\n * Will call `matches` function on all items of the array. If return value\n * evaluates to `true`, index is returned.\n *\n * Otherwise returns `undefined`.\n *\n * @param array Source array\n * @param matches Search function\n * @returns Item if found\n */\nexport function find<A>(array: ArrayLike<A>, matches: (value: A, index: number) => boolean): A | undefined {\n\tconst index = findIndex(array, matches);\n\n\tif (index !== -1) {\n\t\treturn array[index];\n\t}\n}\n\n/**\n * This is the same as `find` except it searches from right to left.\n *\n * @param array Source array\n * @param matches Search function\n * @returns Item if found\n */\nexport function findReverse<A>(array: ArrayLike<A>, matches: (value: A, index: number) => boolean): A | undefined {\n\tconst index = findIndexReverse(array, matches);\n\n\tif (index !== -1) {\n\t\treturn array[index];\n\t}\n}\n\n/**\n * Searches the array using custom function and returns item if found.\n *\n * Will call `matches` function on all items of the array. If value\n * is not `undefined`, it returns it.\n *\n * Otherwise returns `undefined`.\n *\n * @param array Source array\n * @param matches Search function\n * @returns Item if found\n */\nexport function findMap<A, B>(array: ArrayLike<A>, matches: (value: A, index: number) => B | undefined): B | undefined {\n\tconst length = array.length;\n\n\tfor (let i = 0; i < length; ++i) {\n\t\tconst value = matches(array[i], i);\n\n\t\tif (value !== undefined) {\n\t\t\treturn value;\n\t\t}\n\t}\n}\n\n/**\n * Iterates through all items in array and calls `fn` function for each of\n * them.\n *\n * @param array Source array\n * @param fn Callback function\n */\nexport function shuffle<A>(array: Array<A>) {\n\t// https://stackoverflow.com/a/2450976/449477\n\tlet currentIndex = array.length,\n\t\ttemporaryValue,\n\t\trandomIndex;\n\n\t// While there remain elements to shuffle...\n\twhile (0 !== currentIndex) {\n\t\t// Pick a remaining element...\n\t\trandomIndex = Math.floor(Math.random() * currentIndex);\n\t\tcurrentIndex -= 1;\n\n\t\t// And swap it with the current element.\n\t\ttemporaryValue = array[currentIndex];\n\t\tarray[currentIndex] = array[randomIndex];\n\t\tarray[randomIndex] = temporaryValue;\n\t}\n}\n\n\nexport type Ordering = -1 | 0 | 1;\n\n/**\n * @ignore Exclude from docs\n * @todo Description\n */\nexport interface SortResult {\n\tfound: boolean;\n\tindex: number\n}\n\n/**\n * Orders an array using specific `ordering` function and returns right-most index of\n * the `value`.\n *\n * @ignore Exclude from docs\n * @param array Source array\n * @param ordering An ordering function\n * @returns Result of the search\n */\nexport function getSortedIndex<A>(array: ArrayLike<A>, ordering: (left: A) => Ordering): SortResult {\n\tlet start = 0;\n\tlet end = array.length;\n\tlet found = false;\n\n\twhile (start < end) {\n\t\t// TODO is this faster/slower than using Math.floor ?\n\t\tconst pivot = (start + end) >> 1;\n\n\t\tconst order = ordering(array[pivot]);\n\n\t\t// less\n\t\tif (order < 0) {\n\t\t\tstart = pivot + 1;\n\n\t\t// equal\n\t\t} else if (order === 0) {\n\t\t\tfound = true;\n\t\t\tstart = pivot + 1;\n\n\t\t// more\n\t\t} else {\n\t\t\tend = pivot;\n\t\t}\n\t}\n\n\treturn {\n\t\tfound: found,\n\t\tindex: (found ? start - 1 : start)\n\t};\n}\n\n\n/**\n * Orders an array using specific `ordering` function and returns left-most index of\n * the `value`.\n *\n * @ignore Exclude from docs\n * @param array Source array\n * @param ordering An ordering function\n * @returns Result of the search\n */\nexport function getFirstSortedIndex<A>(array: ArrayLike<A>, ordering: (left: A) => Ordering): SortResult {\n\tlet start = 0;\n\tlet end = array.length;\n\tlet found = false;\n\n\twhile (start < end) {\n\t\t// TODO is this faster/slower than using Math.floor ?\n\t\tconst pivot = (start + end) >> 1;\n\n\t\tconst order = ordering(array[pivot]);\n\n\t\t// less\n\t\tif (order < 0) {\n\t\t\tstart = pivot + 1;\n\n\t\t// equal\n\t\t} else if (order === 0) {\n\t\t\tfound = true;\n\t\t\tend = pivot;\n\n\t\t// more\n\t\t} else {\n\t\t\tend = pivot;\n\t\t}\n\t}\n\n\treturn {\n\t\tfound: found,\n\t\tindex: start\n\t};\n}\n\n\nexport function keepIf<A>(array: Array<A>, keep: (value: A) => boolean): void {\n\tlet i = array.length;\n\n\twhile (i > 0) {\n\t\t--i;\n\n\t\tif (!keep(array[i])) {\n\t\t\tarray.splice(i, 1);\n\t\t}\n\t}\n}\n","import { range, Time } from \"./Animation\";\nimport * as $utils from \"./Utils\";\nimport * as $type from \"./Type\";\n\n/**\n * @ignore\n */\nfunction string2hex(string: string): number {\n\t//string = cssColorNames[string.toLowerCase()] || string;\n\n\tif (string[0] === \"#\") {\n\t\tstring = string.substr(1);\n\t}\n\tif (string.length == 3) {\n\t\tstring = string[0].repeat(2) + string[1].repeat(2) + string[2].repeat(2);\n\t}\n\n\treturn parseInt(string, 16);\n}\n\n/**\n * @ignore\n */\nexport function rgba2hex(color: string): number {\n\tcolor = color.replace(/[ ]/g, \"\");\n\n\t// Init\n\tlet matches: string[] | null = color.match(/^rgb\\(([0-9]*),([0-9]*),([0-9]*)\\)/i);\n\n\t// Try rgb() format\n\tif (matches) {\n\t\tmatches.push(\"1\");\n\n\t} else {\n\t\tmatches = color.match(/^rgba\\(([0-9]*),([0-9]*),([0-9]*),([.0-9]*)\\)/i);\n\n\t\tif (!matches) {\n\t\t\treturn 0x000000;\n\t\t}\n\t}\n\n\tlet hex = \"\";\n\tfor (let i = 1; i <= 3; i++) {\n\t\tlet val = parseInt(matches[i]).toString(16);\n\t\tif (val.length == 1) {\n\t\t\tval = \"0\" + val;\n\t\t}\n\t\thex += val;\n\t}\n\n\treturn string2hex(hex);\n\n}\n\n/**\n * Returns a new [[Color]] object base on input.\n *\n * Accepts parameters in CSS hex or rgb/rtba strings, or hex numbers.\n *\n * * `\"#f00\"`\n * * `\"#ff0000\"`\n * * `\"rgb(255, 0, 0)\"`\n * * `\"rgba(255, 0, 0, 1)\"`\n * * `0xff0000`\n * \n * @param input Input color\n * @return Color\n */\nexport function color(input: number | string): Color {\n\treturn Color.fromAny(input);\n}\n\n/**\n * Wherever color needs to be specified in amCharts 5, `Color` object needs to\n * be used.\n *\n * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/} for more info\n * @important\n */\nexport class Color {\n\tprotected _hex: number;\n\n\tprivate constructor(hex: number) {\n\t\tthis._hex = hex | 0;\n\t}\n\n\t/**\n\t * Color numeric value.\n\t */\n\tpublic get hex(): number {\n\t\treturn this._hex;\n\t}\n\n\t/**\n\t * Value of color's R channel.\n\t * @return R value\n\t */\n\tpublic get r(): number {\n\t\treturn this._hex >>> 16;\n\t}\n\n\t/**\n\t * Value of color's G channel.\n\t * @return G value\n\t */\n\tpublic get g(): number {\n\t\treturn (this._hex >> 8) & 0xFF;\n\t}\n\n\t/**\n\t * Value of color's B channel.\n\t * @return B value\n\t */\n\tpublic get b(): number {\n\t\treturn this._hex & 0xFF;\n\t}\n\n\t/**\n\t * Returns color CSS representation in form of `rgba(r, g, b, a)` string.\n\t * \n\t * @param alpha Opacity\n\t * @return CSS string\n\t */\n\tpublic toCSS(alpha: number = 1): string {\n\t\treturn \"rgba(\" + this.r + \", \" + this.g + \", \" + this.b + \", \" + alpha + \")\";\n\t}\n\n\t/**\n\t * Returns color CSS representation in form of `#rgb` string.\n\t * \n\t * @return CSS string\n\t */\n\tpublic toCSSHex(): string {\n\t\treturn \"#\" + $utils.padString(this.r.toString(16), 2) + $utils.padString(this.g.toString(16), 2) + $utils.padString(this.b.toString(16), 2);\n\t}\n\n\t/**\n\t * Returns color's HSL info.\n\t * @param alpha Opacity\n\t * @return HSL info\n\t */\n\tpublic toHSL(alpha: number = 1): $utils.iHSL {\n\t\treturn $utils.rgbToHsl({\n\t\t\tr: this.r,\n\t\t\tg: this.g,\n\t\t\tb: this.b,\n\t\t\ta: alpha\n\t\t})\n\t}\n\n\t/**\n\t * Converts HSL values into a new [[Color]] object.\n\t *\n\t * @param h H value\n\t * @param s S value\n\t * @param l L value\n\t * @return Color object\n\t */\n\tpublic static fromHSL(h: number, s: number, l: number): Color {\n\t\tconst rgb = $utils.hslToRgb({\n\t\t\th: h,\n\t\t\ts: s,\n\t\t\tl: l\n\t\t});\n\t\treturn this.fromRGB(rgb.r, rgb.g, rgb.b);\n\t}\n\n\tpublic toString(): string {\n\t\treturn this.toCSSHex();\n\t}\n\n\t/**\n\t * Converts hex number into a new [[Color]] object.\n\t *\n\t * ```TypeScript\n\t * Color.fromHex(0xff0000) // red\n\t * ```\n\t * ```JavaScript\n\t * Color.fromHex(0xff0000) // red\n\t * ```\n\t *\n\t * @param hex Hex color\n\t * @return Color\n\t */\n\tpublic static fromHex(hex: number): Color {\n\t\treturn new Color(hex);\n\t}\n\n\t/**\n\t * Converts RGB values to a new [[Color]] object.\n\t *\n\t * @param r R value\n\t * @param g G value\n\t * @param b B value\n\t * @return Color\n\t */\n\tpublic static fromRGB(r: number, g: number, b: number): Color {\n\t\treturn new Color((b | 0) + (g << 8) + (r << 16));\n\t}\n\n\t/**\n\t * Converts RGB string to a new [[Color]] object.\n\t *\n\t * ```TypeScript\n\t * Color.fromString(\"#ff0000\") // red\n\t * ```\n\t * ```JavaScript\n\t * Color.fromString(\"#ff0000\") // red\n\t * ```\n\t *\n\t * @param s RGB string\n\t * @return Color\n\t */\n\tpublic static fromString(s: string): Color {\n\t\treturn new Color(string2hex(s));\n\t}\n\n\t/**\n\t * Converts CSS rgba() syntax to a new [[Color]] object.\n\t *\n\t * ```TypeScript\n\t * Color.fromCSS(\"rgba(255, 0, 0, 1)\") // red\n\t * ```\n\t * ```JavaScript\n\t * Color.fromCSS(\"rgba(255, 0, 0, 1)\") // red\n\t * ```\n\t *\n\t * @param {string} s [description]\n\t * @return {Color} [description]\n\t */\n\tpublic static fromCSS(s: string): Color {\n\t\treturn new Color(rgba2hex(s));\n\t}\n\n\t/**\n\t * Convert to color from virtually anything.\n\t *\n\t * Will throw an exception if unable to resolve the color.\n\t *\n\t * @param s Source\n\t * @return Color\n\t */\n\tpublic static fromAny(s: string | number | Color): Color {\n\t\tif ($type.isString(s)) {\n\t\t\tif (s[0] == \"#\") {\n\t\t\t\treturn Color.fromString(s);\n\t\t\t}\n\t\t\telse if (s.substr(0, 3) == \"rgb\") {\n\t\t\t\treturn Color.fromCSS(s);\n\t\t\t}\n\t\t}\n\t\telse if ($type.isNumber(s)) {\n\t\t\treturn Color.fromHex(s);\n\t\t}\n\t\telse if (s instanceof Color) {\n\t\t\treturn Color.fromHex(s.hex);\n\t\t}\n\n\t\tthrow new Error(\"Unknown color syntax: \" + s);\n\t}\n\n\t/**\n\t * Returns a new [[Color]] object based on either `lightAlternative` or\n\t * `darkAlternative` depending on which one is more contrasting with\n\t * the `color`.\n\t *\n\t * @param color Reference color\n\t * @param lightAlternative Light color\n\t * @param darkAlternative Dark color\n\t * @return Alternative color\n\t */\n\tpublic static alternative(color: Color, lightAlternative?: Color, darkAlternative?: Color): Color {\n\t\tconst rgb = $utils.alternativeColor(\n\t\t\t{ r: color.r, g: color.g, b: color.b },\n\t\t\tlightAlternative ? { r: lightAlternative.r, g: lightAlternative.g, b: lightAlternative.b } : undefined,\n\t\t\tdarkAlternative ? { r: darkAlternative.r, g: darkAlternative.g, b: darkAlternative.b } : undefined\n\t\t);\n\t\treturn this.fromRGB(rgb.r, rgb.g, rgb.b);\n\t}\n\n\t/**\n\t * Returns an intermediate Color between two reference colors depending on\n\t * the progress (`diff`) between the two.\n\t *\n\t * @param diff Progress\n\t * @param from Source color\n\t * @param to Target color\n\t * @param mode Interpolation mode\n\t * @return Color\n\t */\n\tpublic static interpolate(diff: Time, from: Color, to: Color, mode: \"rgb\" | \"hsl\" = \"rgb\"): Color {\n\t\tif (mode == \"hsl\") {\n\t\t\tconst fromHSL = from.toHSL();\n\t\t\tconst toHSL = to.toHSL();\n\t\t\treturn Color.fromHSL(\n\t\t\t\trange(diff, fromHSL.h, toHSL.h),\n\t\t\t\trange(diff, fromHSL.s, toHSL.s),\n\t\t\t\trange(diff, fromHSL.l, toHSL.l)\n\t\t\t);\n\t\t}\n\t\telse {\n\t\t\treturn Color.fromRGB(\n\t\t\t\trange(diff, from.r, to.r),\n\t\t\t\trange(diff, from.g, to.g),\n\t\t\t\trange(diff, from.b, to.b)\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * Returns a new [[Color]] lightened by `percent` value.\n\t *\n\t * Use negative value to darken the color.\n\t *\n\t * @param color Source color\n\t * @param percent Percent\n\t * @return New color\n\t */\n\tpublic static lighten(color: Color, percent: number): Color {\n\t\tconst rgb = $utils.lighten({ r: color.r, g: color.g, b: color.b }, percent);\n\t\treturn Color.fromRGB(rgb!.r, rgb!.g, rgb!.b);\n\t}\n\n\t/**\n\t * Returns a new [[Color]] brightened by `percent` value.\n\t *\n\t * Use negative value to dim the color.\n\t *\n\t * @param color Source color\n\t * @param percent Percent\n\t * @return New color\n\t */\n\tpublic static brighten(color: Color, percent: number): Color {\n\t\tconst rgb = $utils.brighten({ r: color.r, g: color.g, b: color.b }, percent);\n\t\treturn Color.fromRGB(rgb!.r, rgb!.g, rgb!.b);\n\t}\n\n\t/**\n\t * Returns a new [[Color]] saturated by `percent` value.\n\t *\n\t * Value range is between `0` (fully desaturated), to `1` (full color).\n\t *\n\t * @param color Source color\n\t * @param percent Percent\n\t * @return New color\n\t */\n\tpublic static saturate(color: Color, percent: number): Color {\n\t\tconst rgb = $utils.saturate({ r: color.r, g: color.g, b: color.b }, percent);\n\t\treturn Color.fromRGB(rgb!.r, rgb!.g, rgb!.b);\n\t}\n}\n","import { Entity, IEntitySettings, IEntityPrivate } from \"./Entity\";\nimport { Color } from \"./Color\";\n\n\nexport interface IColorSetSettings extends IEntitySettings {\n\n\t/**\n\t * List of colors in the set.\n\t */\n\tcolors?: Color[];\n\n\t/**\n\t * A step size when using `next()`.\n\t *\n\t * E.g. setting to `2` will make it return every second color in the list.\n\t *\n\t * @default 1\n\t */\n\tstep?: number;\n\n\t/**\n\t * Start iterating colors from specific index.\n\t */\n\tstartIndex?: number;\n\n\t/**\n\t * If set to `true`, color set will reuse existing colors from the list\n\t * inestead of generating new ones.\n\t *\n\t * @default false\n\t */\n\treuse?: boolean;\n\n\t/**\n\t * A base color to generate new colors from if `colors` is not specified.\n\t * @type {[type]}\n\t */\n\tbaseColor?: Color;\n\n\t/**\n\t * A set of tranformation to apply to base list of colors when the set runs\n\t * out of colors and generates additional ones.\n\t */\n\tpassOptions?: IColorSetStepOptions;\n\n\t/**\n\t * If set, each returned color will be applied saturation.\n\t */\n\tsaturation?: number;\n\n\t// count?: number;\n}\n\nexport interface IColorSetPrivate extends IEntityPrivate {\n\n\tcurrentStep?: number;\n\tcurrentPass?: number;\n\n\t/**\n\t * @ignore\n\t */\n\tnumColors?: number;\n\n}\n\nexport interface IColorSetStepOptions {\n\n\t/**\n\t * Value to add to \"hue\".\n\t */\n\thue?: number;\n\n\t/**\n\t * Value to add to \"saturation\".\n\t */\n\tsaturation?: number;\n\n\t/**\n\t * Value to add to \"lightness\".\n\t */\n\tlightness?: number;\n\n}\n\n\n/**\n * An object which holds list of colors and can generate new ones.\n *\n * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/#Color_sets} for more info\n */\nexport class ColorSet extends Entity {\n\tpublic static className: string = \"ColorSet\";\n\tpublic static classNames: Array<string> = Entity.classNames.concat([ColorSet.className]);\n\n\tdeclare public _settings: IColorSetSettings;\n\tdeclare public _privateSettings: IColorSetPrivate;\n\n\t//protected _currentPass: number = 0;\n\n\tprotected _afterNew() {\n\t\t// Applying themes because color set will not have parent\n\t\tsuper._afterNewApplyThemes();\n\t\tthis._dirty[\"colors\"] = false;\n\t}\n\n\tpublic _beforeChanged(): void {\n\t\tif (this.isDirty(\"colors\")) {\n\t\t\tthis.reset();\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic generateColors(): void {\n\t\tthis.setPrivate(\"currentPass\", this.getPrivate(\"currentPass\", 0) + 1)\n\t\tconst pass = this.getPrivate(\"currentPass\");\n\t\tconst colors = this.get(\"colors\", [this.get(\"baseColor\", Color.fromHex(0xff0000))]);\n\t\tif (!this.getPrivate(\"numColors\")) {\n\t\t\tthis.setPrivate(\"numColors\", colors.length);\n\t\t}\n\t\t//const len = colors.length;\n\t\tconst len = this.getPrivate(\"numColors\")!;\n\t\t//const start = len - this.getPrivate(\"numColors\")!;\n\t\tconst start = 0;\n\t\tconst passOptions = this.get(\"passOptions\")!;\n\t\tconst reuse = this.get(\"reuse\");\n\t\tfor (let i = start; i < len; i++) {\n\t\t\tif (reuse) {\n\t\t\t\tcolors.push(colors[i])\n\t\t\t}\n\t\t\telse {\n\t\t\t\tconst hsl = colors[i]!.toHSL();\n\t\t\t\tlet h = hsl.h + (passOptions.hue || 0) * pass!;\n\t\t\t\twhile (h > 1) h -= 1;\n\n\t\t\t\tlet s = hsl.s + (passOptions.saturation || 0) * pass!;\n\t\t\t\t//if (s > 1) s -= Math.floor(s);\n\t\t\t\tif (s > 1) s = 1;\n\t\t\t\tif (s < 0) s = 0;\n\n\t\t\t\tlet l = hsl.l + (passOptions.lightness || 0) * pass!;\n\t\t\t\t//if (l > 1) l -= Math.floor(l);\n\t\t\t\twhile (l > 1) l -= 1;\n\t\t\t\tcolors.push(Color.fromHSL(h, s, l));\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Returns a [[Color]] at specific index.\n\t *\n\t * If there's no color at this index, a new color is generated.\n\t *\n\t * @param index Index\n\t * @return Color\n\t */\n\tpublic getIndex(index: number): Color {\n\t\tconst colors = this.get(\"colors\", []);\n\t\tconst saturation = this.get(\"saturation\");\n\t\tif (index >= colors.length) {\n\t\t\tthis.generateColors();\n\t\t\treturn this.getIndex(index);\n\t\t}\n\n\t\treturn saturation != null ? Color.saturate(colors[index], saturation!) : colors[index];\n\t}\n\n\t/**\n\t * Returns next [[Color]] in the list.\n\t *\n\t * If the list is out of colors, new ones are generated dynamically.\n\t */\n\tpublic next() {\n\t\tlet currentStep = this.getPrivate(\"currentStep\", this.get(\"startIndex\", 0));\n\t\tthis.setPrivate(\"currentStep\", currentStep + this.get(\"step\", 1));\n\t\treturn this.getIndex(currentStep);\n\t}\n\n\t/**\n\t * Resets counter to the start of the list, so the next call for `next()` will\n\t * return the first color.\n\t */\n\tpublic reset() {\n\t\tthis.setPrivate(\"currentStep\", this.get(\"startIndex\", 0));\n\t\tthis.setPrivate(\"currentPass\", 0);\n\t}\n}\n","import * as $type from \"./Type\"\nimport * as $object from \"./Object\"\n\nexport interface IJSONParserOptions {\n\n\t/**\n\t * Reverse the order of parsed data.\n\t */\n\treverse?: boolean;\n\n}\n\n/**\n * Tool to parse JSON string into structured data.\n *\n * @see {@link https://www.amcharts.com/docs/v5/concepts/data/#Parsing} for more info\n * @important\n */\nexport class JSONParser {\n\n\t/**\n\t * Parses JSON string.\n\t * \n\t * @param input JSON\n\t * @param options Options\n\t * @return Data\n\t */\n\tpublic static parse(input: string, options?: IJSONParserOptions): any {\n\t\toptions = this._applyDefaults(options);\n\t\ttry {\n\t\t\tif ($type.isString(input)) {\n\t\t\t\tlet data = JSON.parse(input);\n\t\t\t\tif (options.reverse && $type.isArray(data)) {\n\t\t\t\t\tdata.reverse();\n\t\t\t\t}\n\t\t\t\treturn data;\n\t\t\t}\n\t\t\telse if ($type.isArray(input) || $type.isObject(input)) {\n\t\t\t\treturn input;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthrow(\"Unable to parse JSON data\");\n\t\t\t}\n\t\t} catch (e) {\n\t\t\treturn undefined;\n\t\t}\n\t}\n\n\tprotected static _applyDefaults(options?: IJSONParserOptions): IJSONParserOptions {\n\t\tconst normalized: IJSONParserOptions = {};\n\t\tconst defaults = {\n\t\t\treverse: false\n\t\t};\n\t\tif (!options) {\n\t\t\toptions = {};\n\t\t}\n\t\t$object.each(defaults, (key, val) => {\n\t\t\tnormalized[key] = options![key] || val;\n\t\t});\n\t\treturn normalized;\n\t}\n}\n\n\nexport interface ICSVParserOptions {\n\n\t/**\n\t * Delimiter used for columns.\n\t * \n\t * @default \",\"\n\t */\n\tdelimiter?: string;\n\n\t/**\n\t * Reverse the order of parsed data.\n\t */\n\treverse?: boolean;\n\n\t/**\n\t * Skip first X rows.\n\t *\n\t * @default 0\n\t */\n\tskipRows?: number;\n\n\t/**\n\t * Skip empty rows.\n\t *\n\t * @default true\n\t */\n\tskipEmpty?: boolean;\n\n\t/**\n\t * Use the first row to name the columns.\n\t * \n\t * @default false\n\t */\n\tuseColumnNames?: boolean;\n\n}\n\n/**\n * Tool to parse JSON string into structured data.\n *\n * @see {@link https://www.amcharts.com/docs/v5/concepts/data/#Parsing} for more info\n * @important\n */\nexport class CSVParser {\n\n\t/**\n\t * Parses CSV string.\n\t * \n\t * @param input CSV\n\t * @param options Options\n\t * @return Data\n\t */\n\tpublic static parse(input: string, options?: ICSVParserOptions): any {\n\t\toptions = this._applyDefaults(options);\n\n\t\t// Get CSV data as array\n\t\tlet data = this.CSVToArray(input, options.delimiter!);\n\n\t\t// Init resuling array\n\t\tlet res: any[] = [],\n\t\t\tcols: string[] = [],\n\t\t\tcol: string,\n\t\t\ti: number;\n\n\t\t// Skip rows\n\t\tfor (i = 0; i < options.skipRows!; i++) {\n\t\t\tdata.shift();\n\t\t}\n\n\t\t// First row holds column names?\n\t\tif (options.useColumnNames) {\n\t\t\tcols = data.shift();\n\n\t\t\t// Normalize column names\n\t\t\tfor (let x = 0; x < cols.length; x++) {\n\t\t\t\t// trim\n\t\t\t\tcol = cols[x] != null ? cols[x].replace(/^\\s+|\\s+$/gm, \"\") : \"\";\n\n\t\t\t\t// Check for empty\n\t\t\t\tif (\"\" === col) {\n\t\t\t\t\tcol = \"col\" + x;\n\t\t\t\t}\n\n\t\t\t\tcols[x] = col;\n\t\t\t}\n\t\t}\n\n\t\t// Iterate through the result set\n\t\tlet row;\n\t\twhile (true) {\n\t\t\trow = options.reverse ? data.pop() : data.shift();\n\n\t\t\tif (!row) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif (options.skipEmpty && row.length === 1 && row[0] === \"\") {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tlet dataPoint: any = {};\n\t\t\tfor (i = 0; i < row.length; i++) {\n\t\t\t\tcol = undefined === cols[i] ? \"col\" + i : cols[i];\n\t\t\t\tdataPoint[col] = row[i];\n\t\t\t}\n\t\t\tres.push(dataPoint);\n\t\t}\n\n\t\treturn res;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic static CSVToArray(data: string, delimiter: string): any[] {\n\n\t\t// Check to see if the delimiter is defined. If not,\n\t\t// then default to comma.\n\t\tdelimiter = (delimiter || ',');\n\n\t\t// Create a regular expression to parse the CSV values.\n\t\tlet objPattern = new RegExp(\n\t\t\t(\n\t\t\t\t// Delimiters.\n\t\t\t\t\"(\\\\\" + delimiter + \"|\\\\r?\\\\n|\\\\r|^)\" +\n\n\t\t\t\t// Quoted fields.\n\t\t\t\t\"(?:\\\"([^\\\"]*(?:\\\"\\\"[^\\\"]*)*)\\\"|\" +\n\n\t\t\t\t// Standard fields.\n\t\t\t\t\"([^\\\"\\\\\" + delimiter + \"\\\\r\\\\n]*))\"\n\t\t\t),\n\t\t\t\"gi\"\n\t\t);\n\n\n\t\t// Create an array to hold our data. Give the array\n\t\t// a default empty first row.\n\t\tlet arrData: any[] = [\n\t\t\t[]\n\t\t];\n\n\t\t// Create an array to hold our individual pattern\n\t\t// matching groups.\n\t\tlet arrMatches = null;\n\n\t\t// Keep looping over the regular expression matches\n\t\t// until we can no longer find a match.\n\t\twhile (true) {\n\t\t\tarrMatches = objPattern.exec(data);\n\n\t\t\tif (!arrMatches) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// Get the delimiter that was found.\n\t\t\tlet strMatchedDelimiter = arrMatches[1];\n\n\t\t\t// Check to see if the given delimiter has a length\n\t\t\t// (is not the start of string) and if it matches\n\t\t\t// field delimiter. If id does not, then we know\n\t\t\t// that this delimiter is a row delimiter.\n\t\t\tif (\n\t\t\t\tstrMatchedDelimiter.length &&\n\t\t\t\t(strMatchedDelimiter !== delimiter)\n\t\t\t) {\n\n\t\t\t\t// Since we have reached a new row of data,\n\t\t\t\t// add an empty row to our data array.\n\t\t\t\tarrData.push([]);\n\n\t\t\t}\n\n\t\t\t// Now that we have our delimiter out of the way,\n\t\t\t// let's check to see which kind of value we\n\t\t\t// captured (quoted or unquoted).\n\t\t\tlet strMatchedValue;\n\t\t\tif (arrMatches[2]) {\n\n\t\t\t\t// We found a quoted value. When we capture\n\t\t\t\t// this value, unescape any double quotes.\n\t\t\t\tstrMatchedValue = arrMatches[2].replace(\n\t\t\t\t\tnew RegExp(\"\\\"\\\"\", \"g\"),\n\t\t\t\t\t\"\\\"\"\n\t\t\t\t);\n\n\t\t\t} else {\n\n\t\t\t\t// We found a non-quoted value.\n\t\t\t\tstrMatchedValue = arrMatches[3];\n\n\t\t\t}\n\n\t\t\t// Now that we have our value string, let's add\n\t\t\t// it to the data array.\n\t\t\tarrData[arrData.length - 1].push(strMatchedValue);\n\t\t}\n\n\t\t// Return the parsed data.\n\t\treturn (arrData);\n\t}\n\n\tprotected static _applyDefaults(options?: ICSVParserOptions): ICSVParserOptions {\n\t\tconst normalized: ICSVParserOptions = {};\n\t\tconst defaults = {\n\t\t\tdelimiter: \",\",\n\t\t\treverse: false,\n\t\t\tskipRows: 0,\n\t\t\tskipEmpty: true,\n\t\t\tuseColumnNames: false\n\t\t};\n\t\tif (!options) {\n\t\t\toptions = {};\n\t\t}\n\t\t$object.each(defaults, (key, val) => {\n\t\t\tnormalized[key] = options![key] || val;\n\t\t});\n\t\treturn normalized;\n\n\t}\n\n}","import type { ILocaleSettings } from \"./Language\"\n\nimport { Entity, IEntitySettings, IEntityPrivate } from \"./Entity\"\nimport { TextFormatter } from \"./TextFormatter\"\nimport { Timezone } from \"./Timezone\"\n\nimport * as $type from \"./Type\"\nimport * as $utils from \"./Utils\";\n\n/**\n * Interface describing parsed date format definition.\n *\n * @ignore\n */\nexport interface DateFormatInfo {\n\t\"template\": string;\n\t\"parts\": any[];\n}\n\nexport interface IDateFormatterSettings extends IEntitySettings {\n\n\t/**\n\t * Should the first letter of the formatted date be capitalized?\n\t *\n\t * @default true\n\t */\n\tcapitalize?: boolean;\n\n\t/**\n\t * A date format to be used when formatting dates.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/formatters/formatting-dates/} for more info\n\t */\n\tdateFormat?: string | Intl.DateTimeFormatOptions;\n\n\t/**\n\t * An array of data fields that hold date values and should be formatted\n\t * with a [[DateFormatter]].\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/formatters/data-placeholders/#Formatting_placeholders} for more info\n\t */\n\tdateFields?: string[];\n\n\t/**\n\t * Locales to use when formatting using `Intl.DateFormatter`.\n\t */\n\tintlLocales?: string;\n\n}\n\nexport interface IDateFormatterPrivate extends IEntityPrivate {\n}\n\ntype Months = \"January\" | \"February\" | \"March\" | \"April\" | \"May\" | \"June\" | \"July\" | \"August\" | \"September\" | \"October\" | \"November\" | \"December\";\ntype ShortMonths = \"Jan\" | \"Feb\" | \"Mar\" | \"Apr\" | \"May(short)\" | \"Jun\" | \"Jul\" | \"Aug\" | \"Sep\" | \"Oct\" | \"Nov\" | \"Dec\";\ntype Weekdays = \"Sunday\" | \"Monday\" | \"Tuesday\" | \"Wednesday\" | \"Thursday\" | \"Friday\" | \"Saturday\";\ntype ShortWeekdays = \"Sun\" | \"Mon\" | \"Tue\" | \"Wed\" | \"Thu\" | \"Fri\" | \"Sat\";\n\n\n/**\n * Date formatter class.\n *\n * @see {@link https://www.amcharts.com/docs/v5/concepts/formatters/formatting-dates/} for more info\n * @important\n */\nexport class DateFormatter extends Entity {\n\tdeclare public _settings: IDateFormatterSettings;\n\tdeclare public _privateSettings: IDateFormatterPrivate;\n\n\tprotected _setDefaults() {\n\t\t// Defaults\n\t\tthis._setDefault(\"capitalize\", true);\n\t\tthis._setDefault(\"dateFormat\", \"yyyy-MM-dd\");\n\n\t\tsuper._setDefaults();\n\t}\n\n\tpublic _beforeChanged() {\n\t\tsuper._beforeChanged();\n\t}\n\n\t/**\n\t * Formats a source `Date` object into string format\n\t * @param source inpout date\n\t * @param format Output format\n\t * @param ignoreTimezone Ignore timezone?\n\t * @return Formatted date\n\t */\n\tpublic format(source: any, format?: string | Intl.DateTimeFormatOptions, ignoreTimezone: boolean = false): string {\n\n\t\t// Locale?\n\t\t// TODO\n\n\t\t// No format passed in or it's empty\n\t\tif (typeof format === \"undefined\" || format === \"\") {\n\t\t\tformat = this.get(\"dateFormat\", \"yyyy-MM-dd\");\n\t\t}\n\n\t\t// Init return value\n\t\tlet formatted;\n\n\t\t// Cast?\n\t\t// TODO: decide if we need to cast\n\t\tlet date: Date = source;\n\n\t\t// Is it a built-in format or Intl.DateTimeFormat\n\t\tif ($type.isObject(format)) {\n\n\t\t\ttry {\n\t\t\t\tconst locales = this.get(\"intlLocales\");\n\t\t\t\tif (locales) {\n\t\t\t\t\treturn new Intl.DateTimeFormat(locales, <Intl.DateTimeFormatOptions>format).format(date);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\treturn new Intl.DateTimeFormat(undefined, <Intl.DateTimeFormatOptions>format).format(date);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (e) {\n\t\t\t\treturn \"Invalid\";\n\t\t\t}\n\n\t\t}\n\n\t\t// get format info (it will also deal with parser caching)\n\t\tlet info = this.parseFormat(format);\n\n\t\t// Should we apply custom time zone?\n\t\tconst timezone = this._root.timezone;\n\t\tif (timezone && !this._root.utc && !ignoreTimezone) {\n\t\t\tdate = timezone.convertLocal(date);\n\t\t}\n\n\t\t// Check if it's a valid date\n\t\tif (!$type.isNumber(date.getTime())) {\n\t\t\t// TODO translation\n\t\t\t//return this._t(\"Invalid date\");\n\t\t\treturn \"Invalid date\";\n\t\t}\n\n\t\t// Apply format\n\t\tformatted = this.applyFormat(date, info, ignoreTimezone);\n\n\t\t// Capitalize\n\t\tif (this.get(\"capitalize\")) {\n\t\t\tformatted = formatted.replace(\n\t\t\t\t/^.{1}/, formatted.substr(0, 1).toUpperCase()\n\t\t\t);\n\t\t}\n\n\t\t// We're done\n\t\treturn formatted;\n\t}\n\n\t/**\n\t * Applies format to Date.\n\t *\n\t * @param date Date object\n\t * @param info Parsed format information\n\t * @return Formatted date string\n\t */\n\tprotected applyFormat(date: Date, info: DateFormatInfo, ignoreTimezone: boolean = false): string {\n\n\t\t// Init return value\n\t\tlet res = info.template;\n\n\t\t// Get values\n\t\tlet fullYear: number,\n\t\t\tmonth: number,\n\t\t\tweekday: number,\n\t\t\tday: number,\n\t\t\thours: number,\n\t\t\tminutes: number,\n\t\t\tseconds: number,\n\t\t\tmilliseconds: number,\n\t\t\ttimestamp: number = date.getTime();\n\t\tif (this._root.utc && !ignoreTimezone) {\n\t\t\tfullYear = date.getUTCFullYear();\n\t\t\tmonth = date.getUTCMonth();\n\t\t\tweekday = date.getUTCDay();\n\t\t\tday = date.getUTCDate();\n\t\t\thours = date.getUTCHours();\n\t\t\tminutes = date.getUTCMinutes();\n\t\t\tseconds = date.getUTCSeconds();\n\t\t\tmilliseconds = date.getUTCMilliseconds();\n\t\t}\n\t\telse {\n\t\t\tfullYear = date.getFullYear();\n\t\t\tmonth = date.getMonth();\n\t\t\tweekday = date.getDay();\n\t\t\tday = date.getDate();\n\t\t\thours = date.getHours();\n\t\t\tminutes = date.getMinutes();\n\t\t\tseconds = date.getSeconds();\n\t\t\tmilliseconds = date.getMilliseconds();\n\t\t}\n\n\t\t// Go through each part and format/replace it in template\n\t\tfor (let i = 0, len = info.parts.length; i < len; i++) {\n\t\t\tlet value: string = \"\";\n\t\t\tswitch (info.parts[i]) {\n\n\t\t\t\tcase \"G\":\n\t\t\t\t\tvalue = this._t(\n\t\t\t\t\t\tfullYear < 0\n\t\t\t\t\t\t\t? \"_era_bc\"\n\t\t\t\t\t\t\t: \"_era_ad\"\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"yyyy\":\n\t\t\t\t\tvalue = Math.abs(fullYear).toString();\n\t\t\t\t\tif (fullYear < 0) {\n\t\t\t\t\t\tvalue += this._t(\"_era_bc\");\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"yyy\":\n\t\t\t\tcase \"yy\":\n\t\t\t\tcase \"y\":\n\t\t\t\t\tvalue = Math.abs(fullYear).toString().substr(-info.parts[i].length);\n\t\t\t\t\tif (fullYear < 0) {\n\t\t\t\t\t\tvalue += this._t(\"_era_bc\");\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"YYYY\":\n\t\t\t\tcase \"YYY\":\n\t\t\t\tcase \"YY\":\n\t\t\t\tcase \"Y\":\n\t\t\t\t\tlet year = $utils.getWeekYear(date, this._root.utc);\n\t\t\t\t\tif (info.parts[i] == \"YYYY\") {\n\t\t\t\t\t\tvalue = Math.abs(year).toString();\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tvalue = Math.abs(year).toString().substr(-info.parts[i].length);\n\t\t\t\t\t}\n\t\t\t\t\tif (year < 0) {\n\t\t\t\t\t\tvalue += this._t(\"_era_bc\");\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"u\":\n\t\t\t\t\t// @todo\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"q\":\n\t\t\t\t\tvalue = \"\" + Math.ceil((date.getMonth() + 1) / 3);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"MMMMM\":\n\t\t\t\t\tvalue = this._t(this._getMonth(month)).substr(0, 1);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"MMMM\":\n\t\t\t\t\tvalue = this._t(this._getMonth(month));\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"MMM\":\n\t\t\t\t\tvalue = this._t(this._getShortMonth(month));\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"MM\":\n\t\t\t\t\tvalue = $utils.padString(month + 1, 2, \"0\");\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"M\":\n\t\t\t\t\tvalue = (month + 1).toString();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"ww\":\n\t\t\t\t\tvalue = $utils.padString($utils.getWeek(date, this._root.utc), 2, \"0\");\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"w\":\n\t\t\t\t\tvalue = $utils.getWeek(date, this._root.utc).toString();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"W\":\n\t\t\t\t\tvalue = $utils.getMonthWeek(date, this._root.utc).toString();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"dd\":\n\t\t\t\t\tvalue = $utils.padString(day, 2, \"0\");\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"d\":\n\t\t\t\t\tvalue = day.toString();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"DD\":\n\t\t\t\tcase \"DDD\":\n\t\t\t\t\tvalue = $utils.padString($utils.getYearDay(date, this._root.utc).toString(), info.parts[i].length, \"0\");\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"D\":\n\t\t\t\t\tvalue = $utils.getYearDay(date, this._root.utc).toString();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"F\":\n\t\t\t\t\t// @todo\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"g\":\n\t\t\t\t\t// @todo\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"t\":\n\t\t\t\t\tvalue = this._root.language.translateFunc(\"_dateOrd\").call(this, day);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"E\":\n\t\t\t\t\tvalue = (weekday || 7).toString();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"EE\":\n\t\t\t\t\tvalue = $utils.padString((weekday || 7).toString(), 2, \"0\");\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"EEE\":\n\t\t\t\tcase \"eee\":\n\t\t\t\t\tvalue = this._t(this._getShortWeekday(weekday));\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"EEEE\":\n\t\t\t\tcase \"eeee\":\n\t\t\t\t\tvalue = this._t(this._getWeekday(weekday));\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"EEEEE\":\n\t\t\t\tcase \"eeeee\":\n\t\t\t\t\tvalue = this._t(this._getShortWeekday(weekday)).substr(0, 1);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"e\":\n\t\t\t\tcase \"ee\":\n\t\t\t\t\tvalue = (weekday - (this._root.locale.firstDayOfWeek || 1) + 1).toString();\n\t\t\t\t\tif (info.parts[i] == \"ee\") {\n\t\t\t\t\t\tvalue = $utils.padString(value, 2, \"0\");\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"a\":\n\t\t\t\t\tif (hours >= 12) {\n\t\t\t\t\t\tvalue = this._t(\"PM\");\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tvalue = this._t(\"AM\");\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"aa\":\n\t\t\t\t\tif (hours >= 12) {\n\t\t\t\t\t\tvalue = this._t(\"P.M.\");\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tvalue = this._t(\"A.M.\");\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"aaa\":\n\t\t\t\t\tif (hours >= 12) {\n\t\t\t\t\t\tvalue = this._t(\"P\");\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tvalue = this._t(\"A\");\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"h\":\n\t\t\t\t\tvalue = $utils.get12Hours(hours).toString();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"hh\":\n\t\t\t\t\tvalue = $utils.padString($utils.get12Hours(hours), 2, \"0\");\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"H\":\n\t\t\t\t\tvalue = hours.toString();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"HH\":\n\t\t\t\t\tvalue = $utils.padString(hours, 2, \"0\");\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"K\":\n\t\t\t\t\tvalue = $utils.get12Hours(hours, 0).toString();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"KK\":\n\t\t\t\t\tvalue = $utils.padString($utils.get12Hours(hours, 0), 2, \"0\");\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"k\":\n\t\t\t\t\tvalue = (hours + 1).toString();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"kk\":\n\t\t\t\t\tvalue = $utils.padString(hours + 1, 2, \"0\");\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"m\":\n\t\t\t\t\tvalue = minutes.toString();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"mm\":\n\t\t\t\t\tvalue = $utils.padString(minutes, 2, \"0\");\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"s\":\n\t\t\t\t\tvalue = seconds.toString();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"ss\":\n\t\t\t\t\tvalue = $utils.padString(seconds, 2, \"0\");\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"S\":\n\t\t\t\tcase \"SS\":\n\t\t\t\tcase \"SSS\":\n\t\t\t\t\tvalue = Math.round((milliseconds / 1000) * Math.pow(10, info.parts[i].length)).toString();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"x\":\n\t\t\t\t\tvalue = timestamp.toString();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"n\":\n\t\t\t\tcase \"nn\":\n\t\t\t\tcase \"nnn\":\n\t\t\t\t\tvalue = $utils.padString(milliseconds, info.parts[i].length, \"0\");\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"z\":\n\t\t\t\t\tvalue = $utils.getTimeZone(date, false, false, this._root.utc, this._root.timezone ? this._root.timezone.name : undefined).replace(/[+-]+[0-9]+$/, \"\");\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"zz\":\n\t\t\t\t\tvalue = $utils.getTimeZone(date, true, false, this._root.utc, this._root.timezone ? this._root.timezone.name : undefined);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"zzz\":\n\t\t\t\t\tvalue = $utils.getTimeZone(date, false, true, this._root.utc, this._root.timezone ? this._root.timezone.name : undefined).replace(/[+-]+[0-9]+$/, \"\");\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"zzzz\":\n\t\t\t\t\tvalue = $utils.getTimeZone(date, true, true, this._root.utc, this._root.timezone ? this._root.timezone.name : undefined);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"Z\":\n\t\t\t\tcase \"ZZ\":\n\t\t\t\t\tlet timezone = this._root.utc ? \"UTC\" : this._root.timezone;\n\t\t\t\t\tif (timezone instanceof Timezone) {\n\t\t\t\t\t\ttimezone = timezone.name;\n\t\t\t\t\t}\n\t\t\t\t\tconst offset = timezone ? $utils.getTimezoneOffset(timezone) : date.getTimezoneOffset();\n\n\t\t\t\t\tlet tz = Math.abs(offset) / 60;\n\t\t\t\t\tlet tzh = Math.floor(tz);\n\t\t\t\t\tlet tzm = tz * 60 - tzh * 60;\n\n\t\t\t\t\tif (this._root.utc) {\n\t\t\t\t\t\ttzh = 0;\n\t\t\t\t\t\ttzm = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (info.parts[i] == \"Z\") {\n\t\t\t\t\t\tvalue = \"GMT\";\n\t\t\t\t\t\tvalue += offset > 0 ? \"-\" : \"+\";\n\t\t\t\t\t\tvalue += $utils.padString(tzh, 2) + \":\" + $utils.padString(tzm, 2);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tvalue = offset > 0 ? \"-\" : \"+\";\n\t\t\t\t\t\tvalue += $utils.padString(tzh, 2) + $utils.padString(tzm, 2);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"i\":\n\t\t\t\t\tvalue = date.toISOString();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"I\":\n\t\t\t\t\tvalue = date.toUTCString();\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\t\t\tres = res.replace($type.PLACEHOLDER, value);\n\t\t}\n\n\t\treturn res;\n\t}\n\n\t/**\n\t * Parses format into structured infromation.\n\t *\n\t * @param format Format template\n\t */\n\tprotected parseFormat(format: string): DateFormatInfo {\n\n\t\t// Check cache\n\t\t// TODO: implement caching of the parsed format\n\n\t\t// Init format parse info holder\n\t\tlet info: DateFormatInfo = {\n\t\t\t\"template\": \"\",\n\t\t\t\"parts\": <any>[]\n\t\t};\n\n\t\t// Let TextFormatter split into chunks\n\t\tlet chunks = TextFormatter.chunk(format, true);\n\t\tfor (let i: number = 0; i < chunks.length; i++) {\n\t\t\tlet chunk = chunks[i];\n\n\t\t\tif (chunk.type === \"value\") {\n\n\t\t\t\t// Just \"Date\"?\n\t\t\t\tif (chunk.text.match(/^date$/i)) {\n\t\t\t\t\tlet dateFormat = this.get(\"dateFormat\", \"yyyy-MM-dd\");\n\t\t\t\t\tif (!$type.isString(dateFormat)) {\n\t\t\t\t\t\tdateFormat = \"yyyy-MM-dd\";\n\t\t\t\t\t}\n\t\t\t\t\tchunk.text = dateFormat;\n\t\t\t\t}\n\n\t\t\t\t// Find all possible parts\n\t\t\t\tlet 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);\n\n\t\t\t\t// Found?\n\t\t\t\tif (matches) {\n\n\t\t\t\t\t// Populate template\n\t\t\t\t\tfor (let x = 0; x < matches.length; x++) {\n\t\t\t\t\t\tinfo.parts.push(matches[x]);\n\t\t\t\t\t\tchunk.text = chunk.text.replace(matches[x], $type.PLACEHOLDER);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// Apply to template\n\t\t\tinfo.template += chunk.text;\n\t\t}\n\n\t\t// Save cache\n\t\t// TODO\n\n\t\treturn info;\n\t}\n\n\tprotected _months(): Months[] {\n\t\treturn [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"];\n\t}\n\n\tprotected _getMonth(index: number): Months {\n\t\treturn this._months()[index];\n\t}\n\n\tprotected _shortMonths(): ShortMonths[] {\n\t\treturn [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May(short)\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"];\n\t}\n\n\tprotected _getShortMonth(index: number): ShortMonths {\n\t\treturn this._shortMonths()[index];\n\t}\n\n\tprotected _weekdays(): Weekdays[] {\n\t\treturn [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"];\n\t}\n\n\tprotected _getWeekday(index: number): Weekdays {\n\t\treturn this._weekdays()[index];\n\t}\n\n\tprotected _shortWeekdays(): ShortWeekdays[] {\n\t\treturn [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"];\n\t}\n\n\tprotected _getShortWeekday(index: number): ShortWeekdays {\n\t\treturn this._shortWeekdays()[index];\n\t}\n\n\tpublic parse(source: any, format: string): Date {\n\n\t\t// Is it already a Date\n\t\tif (source instanceof Date) {\n\t\t\treturn source;\n\t\t}\n\n\t\t// Is it a numeric timestamp\n\t\tif ($type.isNumber(source)) {\n\t\t\treturn new Date(source);\n\t\t}\n\n\t\t// Are we parsing a timestamp?\n\t\tif (format == \"x\") {\n\t\t\treturn new Date(parseInt(source));\n\t\t}\n\n\t\t// No? Let's check if it's string, and try converting to it if nec\n\t\tif (!$type.isString(source)) {\n\t\t\tsource = source.toString();\n\t\t}\n\n\t\t// Init return value\n\t\tlet res: Date;\n\n\t\t// Init RegEx for parsing\n\t\tlet reg: string = \"\";\n\n\t\t// Clean format\n\t\tformat = $utils.cleanFormat(format);\n\n\t\t// Clip format to length of the source string\n\t\tformat = format.substr(0, source.length);\n\n\t\t// Parse format\n\t\tlet info = this.parseFormat(format);\n\n\t\t// Init parsed items holder\n\t\tlet parsedIndexes = {\n\t\t\t\"year\": -1,\n\t\t\t\"year3\": -1,\n\t\t\t\"year2\": -1,\n\t\t\t\"year1\": -1,\n\t\t\t\"month\": -1,\n\t\t\t\"monthShort\": -1,\n\t\t\t\"monthLong\": -1,\n\t\t\t\"weekdayShort\": -1,\n\t\t\t\"weekdayLong\": -1,\n\t\t\t\"day\": -1,\n\t\t\t\"yearDay\": -1,\n\t\t\t\"week\": -1,\n\t\t\t\"hourBase0\": -1,\n\t\t\t\"hour12Base0\": -1,\n\t\t\t\"hourBase1\": -1,\n\t\t\t\"hour12Base1\": -1,\n\t\t\t\"minute\": -1,\n\t\t\t\"second\": -1,\n\t\t\t\"millisecond\": -1,\n\t\t\t\"millisecondDigits\": -1,\n\t\t\t\"am\": -1,\n\t\t\t\"zone\": -1,\n\t\t\t\"timestamp\": -1,\n\t\t\t\"iso\": -1\n\t\t};\n\n\t\t// Init values\n\t\tlet resValues = {\n\t\t\t\"year\": 1970,\n\t\t\t\"month\": 0,\n\t\t\t\"day\": 1,\n\t\t\t\"hour\": 0,\n\t\t\t\"minute\": 0,\n\t\t\t\"second\": 0,\n\t\t\t\"millisecond\": 0,\n\t\t\t\"timestamp\": <any>null,\n\t\t\t\"offset\": 0,\n\t\t\t\"utc\": this._root.utc\n\t\t}\n\n\t\t// Index adjuster\n\t\tlet indexAdjust: number = 0;\n\t\tlet index: number = 0;\n\n\t\t// Iterate through all of the parts\n\t\tfor (let i: number = 0; i < info.parts.length; i++) {\n\n\t\t\t// Set current match index\n\t\t\tindex = i + indexAdjust + 1;\n\n\t\t\tswitch (info.parts[i]) {\n\n\t\t\t\tcase \"yyyy\":\n\t\t\t\tcase \"YYYY\":\n\t\t\t\t\treg += \"([0-9]{4})\";\n\t\t\t\t\tparsedIndexes.year = index;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"yyy\":\n\t\t\t\tcase \"YYY\":\n\t\t\t\t\treg += \"([0-9]{3})\";\n\t\t\t\t\tparsedIndexes.year3 = index;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"yy\":\n\t\t\t\tcase \"YY\":\n\t\t\t\t\treg += \"([0-9]{2})\";\n\t\t\t\t\tparsedIndexes.year2 = index;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"y\":\n\t\t\t\tcase \"Y\":\n\t\t\t\t\treg += \"([0-9]{1})\";\n\t\t\t\t\tparsedIndexes.year1 = index;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"MMMM\":\n\t\t\t\t\treg += \"(\" + this.getStringList(this._months()).join(\"|\") + \")\";\n\t\t\t\t\tparsedIndexes.monthLong = index;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"MMM\":\n\t\t\t\t\treg += \"(\" + this.getStringList(this._shortMonths()).join(\"|\") + \")\";\n\t\t\t\t\tparsedIndexes.monthShort = index;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"MM\":\n\t\t\t\tcase \"M\":\n\t\t\t\t\treg += \"([0-9]{2}|[0-9]{1})\";\n\t\t\t\t\tparsedIndexes.month = index;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"ww\":\n\t\t\t\tcase \"w\":\n\t\t\t\t\treg += \"([0-9]{2}|[0-9]{1})\";\n\t\t\t\t\tparsedIndexes.week = index;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"dd\":\n\t\t\t\tcase \"d\":\n\t\t\t\t\treg += \"([0-9]{2}|[0-9]{1})\";\n\t\t\t\t\tparsedIndexes.day = index;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"DDD\":\n\t\t\t\tcase \"DD\":\n\t\t\t\tcase \"D\":\n\t\t\t\t\treg += \"([0-9]{3}|[0-9]{2}|[0-9]{1})\";\n\t\t\t\t\tparsedIndexes.yearDay = index;\n\t\t\t\t\tbreak;\n\n\n\t\t\t\tcase \"dddd\":\n\t\t\t\t\treg += \"(\" + this.getStringList(this._weekdays()).join(\"|\") + \")\";\n\t\t\t\t\tparsedIndexes.weekdayLong = index;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"ddd\":\n\t\t\t\t\treg += \"(\" + this.getStringList(this._shortWeekdays()).join(\"|\") + \")\";\n\t\t\t\t\tparsedIndexes.weekdayShort = index;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"aaa\":\n\t\t\t\tcase \"aa\":\n\t\t\t\tcase \"a\":\n\t\t\t\t\t// TODO: fix (escape regex)\n\t\t\t\t\treg += \"(\" + this.getStringList([\"AM\", \"PM\", \"A\\.M\\.\", \"P\\.M\\.\", \"A\", \"P\"]).join(\"|\") + \")\";\n\t\t\t\t\tparsedIndexes.am = index;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"hh\":\n\t\t\t\tcase \"h\":\n\t\t\t\t\treg += \"([0-9]{2}|[0-9]{1})\";\n\t\t\t\t\tparsedIndexes.hour12Base1 = index;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"HH\":\n\t\t\t\tcase \"H\":\n\t\t\t\t\treg += \"([0-9]{2}|[0-9]{1})\";\n\t\t\t\t\tparsedIndexes.hourBase0 = index;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"KK\":\n\t\t\t\tcase \"K\":\n\t\t\t\t\treg += \"([0-9]{2}|[0-9]{1})\";\n\t\t\t\t\tparsedIndexes.hour12Base0 = index;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"kk\":\n\t\t\t\tcase \"k\":\n\t\t\t\t\treg += \"([0-9]{2}|[0-9]{1})\";\n\t\t\t\t\tparsedIndexes.hourBase1 = index;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"mm\":\n\t\t\t\tcase \"m\":\n\t\t\t\t\treg += \"([0-9]{2}|[0-9]{1})\";\n\t\t\t\t\tparsedIndexes.minute = index;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"ss\":\n\t\t\t\tcase \"s\":\n\t\t\t\t\treg += \"([0-9]{2}|[0-9]{1})\";\n\t\t\t\t\tparsedIndexes.second = index;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"SSS\":\n\t\t\t\tcase \"SS\":\n\t\t\t\tcase \"S\":\n\t\t\t\t\treg += \"([0-9]{3}|[0-9]{2}|[0-9]{1})\";\n\t\t\t\t\tparsedIndexes.millisecond = index;\n\t\t\t\t\tparsedIndexes.millisecondDigits = info.parts[i].length;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"nnn\":\n\t\t\t\tcase \"nn\":\n\t\t\t\tcase \"n\":\n\t\t\t\t\treg += \"([0-9]{3}|[0-9]{2}|[0-9]{1})\";\n\t\t\t\t\tparsedIndexes.millisecond = index;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"x\":\n\t\t\t\t\treg += \"([0-9]{1,})\";\n\t\t\t\t\tparsedIndexes.timestamp = index;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"Z\":\n\t\t\t\t\treg += \"GMT([-+]+[0-9]{2}:[0-9]{2})\";\n\t\t\t\t\tparsedIndexes.zone = index;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"ZZ\":\n\t\t\t\t\treg += \"([\\\\-+]+[0-9]{2}[0-9]{2})\";\n\t\t\t\t\tparsedIndexes.zone = index;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"i\":\n\t\t\t\t\treg += \"([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}|$)\";\n\t\t\t\t\tparsedIndexes.iso = index;\n\t\t\t\t\tindexAdjust += 7;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"G\":\n\t\t\t\tcase \"YYYY\":\n\t\t\t\tcase \"YYY\":\n\t\t\t\tcase \"YY\":\n\t\t\t\tcase \"Y\":\n\t\t\t\tcase \"MMMMM\":\n\t\t\t\tcase \"W\":\n\t\t\t\tcase \"EEEEE\":\n\t\t\t\tcase \"EEEE\":\n\t\t\t\tcase \"EEE\":\n\t\t\t\tcase \"EE\":\n\t\t\t\tcase \"E\":\n\t\t\t\tcase \"eeeee\":\n\t\t\t\tcase \"eeee\":\n\t\t\t\tcase \"eee\":\n\t\t\t\tcase \"ee\":\n\t\t\t\tcase \"e\":\n\t\t\t\tcase \"zzzz\":\n\t\t\t\tcase \"zzz\":\n\t\t\t\tcase \"zz\":\n\t\t\t\tcase \"z\":\n\t\t\t\tcase \"t\":\n\t\t\t\t\t// Ignore\n\t\t\t\t\tindexAdjust--;\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\treg += \"[^0-9]*\";\n\t\t}\n\n\t\t// Try matching\n\t\tlet regex = new RegExp(reg);\n\t\tlet matches: RegExpMatchArray = source.match(regex);\n\n\t\tif (matches) {\n\t\t\t// Populate the date object\n\n\t\t\t// Full year\n\t\t\tif (parsedIndexes.year > -1) {\n\t\t\t\tresValues.year = parseInt(matches[parsedIndexes.year]);\n\t\t\t}\n\n\t\t\t// 3-digit year\n\t\t\tif (parsedIndexes.year3 > -1) {\n\t\t\t\tlet val = parseInt(matches[parsedIndexes.year3]);\n\t\t\t\tval += 1000;\n\t\t\t\tresValues.year = val;\n\t\t\t}\n\n\t\t\t// 2-digit year\n\t\t\tif (parsedIndexes.year2 > -1) {\n\t\t\t\tlet val = parseInt(matches[parsedIndexes.year2]);\n\t\t\t\tif (val > 50) {\n\t\t\t\t\tval += 1000;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tval += 2000;\n\t\t\t\t}\n\t\t\t\tresValues.year = val;\n\t\t\t}\n\n\t\t\t// 1-digit year\n\t\t\tif (parsedIndexes.year1 > -1) {\n\t\t\t\tlet val = parseInt(matches[parsedIndexes.year1]);\n\t\t\t\tval = Math.floor((new Date().getFullYear()) / 10) * 10 + val;\n\t\t\t\tresValues.year = val;\n\t\t\t}\n\n\t\t\t// Full month\n\t\t\tif (parsedIndexes.monthLong > -1) {\n\t\t\t\tresValues.month = this.resolveMonth(<any>matches[parsedIndexes.monthLong]);\n\t\t\t}\n\n\t\t\t// Short month\n\t\t\tif (parsedIndexes.monthShort > -1) {\n\t\t\t\tresValues.month = this.resolveShortMonth(<any>matches[parsedIndexes.monthShort]);\n\t\t\t}\n\n\t\t\t// Numeric month\n\t\t\tif (parsedIndexes.month > -1) {\n\t\t\t\tresValues.month = parseInt(matches[parsedIndexes.month]) - 1;\n\t\t\t}\n\n\t\t\t// Weekday\n\t\t\t// @todo\n\n\t\t\t// Week\n\t\t\tif ((parsedIndexes.week > -1) && (parsedIndexes.day === -1)) {\n\t\t\t\t// We parse weeks ONLY if day is not explicitly set\n\t\t\t\t// TODO: this needs work\n\t\t\t\t// (but maybe later - I can hardly imagine anyone passing their dates in weeks)\n\t\t\t\tresValues.month = 0;\n\t\t\t\tresValues.day = $utils.getDayFromWeek(\n\t\t\t\t\tparseInt(matches[parsedIndexes.week]),\n\t\t\t\t\tresValues.year,\n\t\t\t\t\t1,\n\t\t\t\t\tthis._root.utc\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// Day\n\t\t\tif (parsedIndexes.day > -1) {\n\t\t\t\tresValues.day = parseInt(matches[parsedIndexes.day]);\n\t\t\t}\n\n\t\t\t// Year day\n\t\t\tif (parsedIndexes.yearDay > -1) {\n\t\t\t\tresValues.month = 0;\n\t\t\t\tresValues.day = parseInt(matches[parsedIndexes.yearDay]);\n\t\t\t}\n\n\t\t\t// 24 Hour (0-23)\n\t\t\tif (parsedIndexes.hourBase0 > -1) {\n\t\t\t\tresValues.hour = parseInt(matches[parsedIndexes.hourBase0]);\n\t\t\t}\n\n\t\t\t// 24 Hour (1-24)\n\t\t\tif (parsedIndexes.hourBase1 > -1) {\n\t\t\t\tresValues.hour = parseInt(matches[parsedIndexes.hourBase1]) - 1;\n\t\t\t}\n\n\t\t\t// 12 Hour (0-11)\n\t\t\tif (parsedIndexes.hour12Base0 > -1) {\n\t\t\t\tlet val = parseInt(matches[parsedIndexes.hour12Base0]);\n\t\t\t\tif (val == 11) {\n\t\t\t\t\tval = 0;\n\t\t\t\t}\n\t\t\t\tif ((parsedIndexes.am > -1) && !this.isAm(matches[parsedIndexes.am])) {\n\t\t\t\t\tval += 12;\n\t\t\t\t}\n\t\t\t\tresValues.hour = val;\n\t\t\t}\n\n\t\t\t// 12 Hour (1-12)\n\t\t\tif (parsedIndexes.hour12Base1 > -1) {\n\t\t\t\tlet val = parseInt(matches[parsedIndexes.hour12Base1]);\n\t\t\t\tif (val == 12) {\n\t\t\t\t\tval = 0;\n\t\t\t\t}\n\t\t\t\tif ((parsedIndexes.am > -1) && !this.isAm(matches[parsedIndexes.am])) {\n\t\t\t\t\tval += 12;\n\t\t\t\t}\n\t\t\t\tresValues.hour = val;\n\t\t\t}\n\n\t\t\t// Minute\n\t\t\tif (parsedIndexes.minute > -1) {\n\t\t\t\tresValues.minute = parseInt(matches[parsedIndexes.minute]);\n\t\t\t}\n\n\t\t\t// Second\n\t\t\tif (parsedIndexes.second > -1) {\n\t\t\t\tresValues.second = parseInt(matches[parsedIndexes.second]);\n\t\t\t}\n\n\t\t\t// Millisecond\n\t\t\tif (parsedIndexes.millisecond > -1) {\n\t\t\t\tlet val = parseInt(matches[parsedIndexes.millisecond]);\n\t\t\t\tif (parsedIndexes.millisecondDigits == 2) {\n\t\t\t\t\tval *= 10;\n\t\t\t\t}\n\t\t\t\telse if (parsedIndexes.millisecondDigits == 1) {\n\t\t\t\t\tval *= 100;\n\t\t\t\t}\n\t\t\t\tresValues.millisecond = val;\n\t\t\t}\n\n\t\t\t// Timestamp\n\t\t\tif (parsedIndexes.timestamp > -1) {\n\t\t\t\tresValues.timestamp = parseInt(matches[parsedIndexes.timestamp]);\n\n\t\t\t\tconst ts = new Date(resValues.timestamp);\n\t\t\t\tresValues.year = ts.getUTCFullYear();\n\t\t\t\tresValues.month = ts.getUTCMonth();\n\t\t\t\tresValues.day = ts.getUTCDate();\n\t\t\t\tresValues.hour = ts.getUTCHours();\n\t\t\t\tresValues.minute = ts.getUTCMinutes();\n\t\t\t\tresValues.second = ts.getUTCSeconds();\n\t\t\t\tresValues.millisecond = ts.getUTCMilliseconds();\n\t\t\t}\n\n\t\t\t// Adjust time zone\n\t\t\tif (parsedIndexes.zone > -1) {\n\t\t\t\tresValues.offset = this.resolveTimezoneOffset(new Date(resValues.year, resValues.month, resValues.day), matches[parsedIndexes.zone]);\n\t\t\t}\n\n\t\t\t// ISO\n\t\t\tif (parsedIndexes.iso > -1) {\n\n\t\t\t\tresValues.year = $type.toNumber(matches[parsedIndexes.iso + 0]);\n\t\t\t\tresValues.month = $type.toNumber(matches[parsedIndexes.iso + 1]) - 1;\n\t\t\t\tresValues.day = $type.toNumber(matches[parsedIndexes.iso + 2]);\n\t\t\t\tresValues.hour = $type.toNumber(matches[parsedIndexes.iso + 3]);\n\t\t\t\tresValues.minute = $type.toNumber(matches[parsedIndexes.iso + 4]);\n\t\t\t\tresValues.second = $type.toNumber(matches[parsedIndexes.iso + 5]);\n\t\t\t\tresValues.millisecond = $type.toNumber(matches[parsedIndexes.iso + 6]);\n\n\t\t\t\tif (matches[parsedIndexes.iso + 7] == \"Z\" || matches[parsedIndexes.iso + 7] == \"z\") {\n\t\t\t\t\tresValues.utc = true;\n\t\t\t\t}\n\t\t\t\telse if (matches[parsedIndexes.iso + 7] != \"\") {\n\t\t\t\t\tresValues.offset = this.resolveTimezoneOffset(new Date(resValues.year, resValues.month, resValues.day), matches[parsedIndexes.iso + 7]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Create Date object\n\t\t\tif (resValues.utc) {\n\t\t\t\tres = new Date(Date.UTC(\n\t\t\t\t\tresValues.year,\n\t\t\t\t\tresValues.month,\n\t\t\t\t\tresValues.day,\n\t\t\t\t\tresValues.hour,\n\t\t\t\t\tresValues.minute,\n\t\t\t\t\tresValues.second,\n\t\t\t\t\tresValues.millisecond\n\t\t\t\t));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tres = new Date(\n\t\t\t\t\tresValues.year,\n\t\t\t\t\tresValues.month,\n\t\t\t\t\tresValues.day,\n\t\t\t\t\tresValues.hour,\n\t\t\t\t\tresValues.minute + resValues.offset,\n\t\t\t\t\tresValues.second,\n\t\t\t\t\tresValues.millisecond\n\t\t\t\t);\n\t\t\t}\n\n\t\t}\n\t\telse {\n\t\t\t// Didn't match anything\n\t\t\t// Let's try dropping it into Date constructor and hope for the best\n\t\t\tres = new Date(source);\n\t\t}\n\n\t\treturn res;\n\t}\n\n\tprotected resolveTimezoneOffset(date: Date, zone: string): number {\n\t\tlet value = zone.match(/([+\\-]?)([0-9]{2}):?([0-9]{2})/);\n\t\tif (value) {\n\t\t\tlet match = zone.match(/([+\\-]?)([0-9]{2}):?([0-9]{2})/)!;\n\t\t\tlet dir = match[1];\n\t\t\tlet hour = match[2];\n\t\t\tlet minute = match[3];\n\t\t\tlet offset = parseInt(hour) * 60 + parseInt(minute);\n\n\t\t\t// Adjust offset\n\t\t\t// Making it negative does not seem to make sense, but it's right\n\t\t\t// because of how JavaScript calculates GMT offsets\n\t\t\tif (dir == \"+\") {\n\t\t\t\toffset *= -1;\n\t\t\t}\n\n\t\t\t// Check the difference in offset\n\t\t\tlet originalOffset = (date || new Date()).getTimezoneOffset();\n\t\t\tlet diff = offset - originalOffset;\n\t\t\treturn diff;\n\t\t}\n\t\treturn 0;\n\t}\n\n\t/**\n\t * Resolves month name (i.e. \"December\") into a month number (11).\n\t *\n\t * @param value Month name\n\t * @return Month number\n\t */\n\tprotected resolveMonth(value: Months): number {\n\n\t\t// Let's try English first\n\t\tlet month: number = this._months().indexOf(value);\n\t\tif (month > -1) {\n\t\t\treturn month;\n\t\t}\n\n\t\t// Try the translation\n\t\tif (!this._root.language.isDefault()) {\n\t\t\tmonth = this._root.language.translateAll(this._months()).indexOf(value);\n\t\t\tif (month > -1) {\n\t\t\t\treturn month\n\t\t\t}\n\t\t}\n\n\t\treturn 0;\n\t}\n\n\t/**\n\t * Resolves short month name (i.e. \"Dec\") into a month number.\n\t *\n\t * @param value Short month name\n\t * @return Month number\n\t */\n\tprotected resolveShortMonth(value: ShortMonths): number {\n\n\t\t// Let's try English first\n\t\tlet month: number = this._shortMonths().indexOf(value);\n\t\tif (month > -1) {\n\t\t\treturn month;\n\t\t}\n\n\t\t// Maybe long month (workaround for May)\n\t\tmonth = this._months().indexOf(<any>value);\n\t\tif (month > -1) {\n\t\t\treturn month;\n\t\t}\n\n\t\t// Try the translation\n\t\tif (this._root.language && !this._root.language.isDefault()) {\n\t\t\tmonth = this._root.language.translateAll(this._shortMonths()).indexOf(value);\n\t\t\tif (month > -1) {\n\t\t\t\treturn month\n\t\t\t}\n\t\t}\n\n\t\treturn 0;\n\t}\n\n\t/**\n\t * Checks if passed in string represents AM/PM notation in many of its\n\t * versions.\n\t *\n\t * @param value Source string\n\t * @return Is it AM/PM?\n\t */\n\tprotected isAm(value: string): boolean {\n\t\tlet list = this.getStringList([\"AM\", \"A.M.\", \"A\"]);\n\t\treturn list.indexOf(value.toUpperCase()) > -1;\n\t}\n\n\t/**\n\t * Translates list of strings.\n\t *\n\t * @param list Source strings\n\t * @return Translated strings\n\t */\n\tprotected getStringList(list: Array<keyof ILocaleSettings>): Array<string> {\n\t\tlet res: string[] = [];\n\t\tfor (let i: number = 0; i < list.length; i++) {\n\t\t\t// translate?\n\t\t\tif (this._root.language) {\n\t\t\t\tres.push($utils.escapeForRgex(this._t(list[i])));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tres.push($utils.escapeForRgex(list[i]));\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}\n\n}\n","/**\n * ============================================================================\n * IMPORTS\n * ============================================================================\n * @hidden\n */\nimport * as $array from \"./Array\";\nimport type { Optional } from \"./Type\";\n\n/**\n * Defines interface for disposable objects.\n *\n * @ignore Exclude from docs\n */\nexport interface IDisposer {\n\tisDisposed(): boolean;\n\tdispose(): void;\n}\n\n/**\n * A base class for disposable objects.\n *\n * @ignore Exclude from docs\n */\nexport abstract class DisposerClass implements IDisposer {\n\n\t/**\n\t * Is object disposed?\n\t */\n\tprivate _disposed: boolean;\n\n\t/**\n\t * Constructor.\n\t */\n\tconstructor() {\n\t\tthis._disposed = false;\n\t}\n\n\t/**\n\t * Checks if object is disposed.\n\t *\n\t * @return Disposed?\n\t */\n\tpublic isDisposed(): boolean {\n\t\treturn this._disposed;\n\t}\n\n\tprotected abstract _dispose(): void;\n\n\t/**\n\t * Disposes the object.\n\t */\n\tpublic dispose(): void {\n\t\tif (!this._disposed) {\n\t\t\tthis._disposed = true;\n\t\t\tthis._dispose();\n\t\t}\n\t}\n}\n\n/**\n * A class for creating an IDisposer.\n *\n * @ignore Exclude from docs\n */\nexport class Disposer implements IDisposer {\n\n\t/**\n\t * Is object disposed?\n\t */\n\tprivate _disposed: boolean;\n\n\t/**\n\t * Method that disposes the object.\n\t */\n\tprivate _dispose: () => void;\n\n\t/**\n\t * Constructor.\n\t *\n\t * @param dispose Function that disposes object\n\t */\n\tconstructor(dispose: () => void) {\n\t\tthis._disposed = false;\n\t\tthis._dispose = dispose;\n\t}\n\n\t/**\n\t * Checks if object is disposed.\n\t *\n\t * @return Disposed?\n\t */\n\tpublic isDisposed(): boolean {\n\t\treturn this._disposed;\n\t}\n\n\t/**\n\t * Disposes the object.\n\t */\n\tpublic dispose(): void {\n\t\tif (!this._disposed) {\n\t\t\tthis._disposed = true;\n\t\t\tthis._dispose();\n\t\t}\n\t}\n}\n\n/**\n * This can be extended by other classes to add a `_disposers` property.\n *\n * @ignore Exclude from docs\n */\nexport class ArrayDisposer extends DisposerClass {\n\tprotected _disposers: Array<IDisposer> = [];\n\n\tprotected _dispose(): void {\n\t\t$array.each(this._disposers, (x) => {\n\t\t\tx.dispose();\n\t\t});\n\t}\n}\n\n/**\n * A collection of related disposers that can be disposed in one go.\n *\n * @ignore Exclude from docs\n */\nexport class MultiDisposer extends DisposerClass {\n\tprotected _disposers: Array<IDisposer>;\n\n\tconstructor(disposers: Array<IDisposer>) {\n\t\tsuper();\n\t\tthis._disposers = disposers;\n\t}\n\n\tprotected _dispose(): void {\n\t\t$array.each(this._disposers, (x) => {\n\t\t\tx.dispose();\n\t\t});\n\t}\n\n\tpublic get disposers(): Array<IDisposer> {\n\t\treturn this._disposers;\n\t}\n}\n\n/**\n * A special kind of Disposer that has attached value set.\n *\n * If a new value is set using `set()` method, the old disposer value is\n * disposed.\n *\n * @ignore Exclude from docs\n * @todo Description\n */\nexport class MutableValueDisposer<T extends IDisposer> extends DisposerClass {\n\n\t/**\n\t * Current disposer.\n\t */\n\tprivate _disposer: Optional<IDisposer>;\n\n\t/**\n\t * Current value.\n\t */\n\tprivate _value: Optional<T>;\n\n\tprotected _dispose(): void {\n\t\tif (this._disposer != null) {\n\t\t\tthis._disposer.dispose();\n\t\t\tthis._disposer = undefined;\n\t\t}\n\t}\n\n\t/**\n\t * Returns current value.\n\t *\n\t * @return Value\n\t */\n\tpublic get(): Optional<T> {\n\t\treturn this._value;\n\t}\n\n\t/**\n\t * Sets value and disposes previous disposer if it was set.\n\t *\n\t * @param value New value\n\t * @param disposer Disposer\n\t */\n\tpublic set(value: Optional<T>, disposer: Optional<IDisposer>): void {\n\t\tif (this._disposer != null) {\n\t\t\tthis._disposer.dispose();\n\t\t}\n\n\t\tthis._disposer = disposer;\n\t\tthis._value = value;\n\t}\n\n\t/**\n\t * Resets the disposer value.\n\t */\n\tpublic reset(): void {\n\t\tthis.set(undefined, undefined);\n\t}\n\n}\n\n/**\n * @ignore Exclude from docs\n * @todo Description\n */\nexport class CounterDisposer extends Disposer {\n\n\t/**\n\t * [_counter description]\n\t *\n\t * @todo Description\n\t */\n\tprivate _counter: number = 0;\n\n\t/**\n\t * [increment description]\n\t *\n\t * @todo Description\n\t */\n\tpublic increment() {\n\t\t// TODO throw an error if it is disposed\n\t\t++this._counter;\n\n\t\t// TODO make this more efficient\n\t\treturn new Disposer(() => {\n\t\t\t--this._counter;\n\n\t\t\tif (this._counter === 0) {\n\t\t\t\tthis.dispose();\n\t\t\t}\n\t\t});\n\t}\n\n}\n","import type { TimeUnit } from \"./Time\";\r\n\r\nimport { Entity, IEntitySettings, IEntityPrivate } from \"./Entity\"\r\nimport { TextFormatter } from \"./TextFormatter\";\r\n\r\nimport * as $object from \"./Object\";\r\nimport * as $utils from \"./Utils\";\r\nimport * as $type from \"./Type\";\r\n\r\n\r\nexport interface IDurationFormatterSettings extends IEntitySettings {\r\n\r\n\t/**\r\n\t * A universal duration format to use wherever number needs to be formatted\r\n\t * as a duration.\r\n\t */\r\n\tdurationFormat?: string;\r\n\r\n\t/**\r\n\t * A base value. Any number below it will be considered \"negative\".\r\n\t *\r\n\t * @default 0\r\n\t */\r\n\tnegativeBase?: number;\r\n\r\n\t/**\r\n\t * Identifies what values are used in duration.\r\n\t *\r\n\t * Available options: `\"millisecond\"`, `\"second\"` (default), `\"minute\"`, `\"hour\"`, `\"day\"`, `\"week\"`, `\"month\"`, and `\"year\"`.\r\n\t *\r\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/formatters/formatting-durations/#Base_unit} for more info\r\n\t * @default \"second\"\r\n\t */\r\n\tbaseUnit?: TimeUnit;\r\n\r\n\t/**\r\n\t * Time unit dependent duration formats.\r\n\t *\r\n\t * Used be [[DurationAxis]].\r\n\t */\r\n\tdurationFormats?: Partial<Record<TimeUnit, Partial<Record<TimeUnit, string>>>>;\r\n\r\n\t/**\r\n\t * An array of data fields that hold duration values and should be formatted\r\n\t * with a [[DurationFormatter]].\r\n\t *\r\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/formatters/data-placeholders/#Formatting_placeholders} for more info\r\n\t */\r\n\tdurationFields?: string[];\r\n\r\n}\r\n\r\nexport interface IDurationFormatterPrivate extends IEntityPrivate {\r\n}\r\n\r\n/**\r\n * A class used to format numberic values as time duration.\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v5/concepts/formatters/formatting-durations/} for more info\r\n */\r\nexport class DurationFormatter extends Entity {\r\n\tdeclare public _settings: IDurationFormatterSettings;\r\n\tdeclare public _privateSettings: IDurationFormatterPrivate;\r\n\r\n\tprotected _setDefaults() {\r\n\t\tconst dmillisecond = \"_duration_millisecond\";\r\n\t\tconst dsecond = \"_duration_second\";\r\n\t\tconst dminute = \"_duration_minute\";\r\n\t\tconst dhour = \"_duration_hour\";\r\n\t\tconst dday = \"_duration_day\";\r\n\t\tconst dweek = \"_duration_week\";\r\n\t\tconst dmonth = \"_duration_month\";\r\n\t\tconst dyear = \"_duration_year\";\r\n\r\n\t\tconst asecond = \"_second\";\r\n\t\tconst aminute = \"_minute\";\r\n\t\tconst ahour = \"_hour\";\r\n\t\tconst aday = \"_day\";\r\n\t\tconst aweek = \"_week\";\r\n\t\tconst amonth = \"_week\";\r\n\t\tconst ayear = \"_year\";\r\n\r\n\t\t// Defaults\r\n\t\tthis._setDefault(\"negativeBase\", 0);\r\n\t\tthis._setDefault(\"baseUnit\", \"second\");\r\n\t\tthis._setDefault(\"durationFormats\", {\r\n\t\t\t\"millisecond\": {\r\n\t\t\t\t\"millisecond\": this._t(dmillisecond),\r\n\t\t\t\t\"second\": this._t((dmillisecond + asecond) as any),\r\n\t\t\t\t\"minute\": this._t((dmillisecond + aminute) as any),\r\n\t\t\t\t\"hour\": this._t((dmillisecond + ahour) as any),\r\n\t\t\t\t\"day\": this._t((dmillisecond + aday) as any),\r\n\t\t\t\t\"week\": this._t((dmillisecond + aweek) as any),\r\n\t\t\t\t\"month\": this._t((dmillisecond + amonth) as any),\r\n\t\t\t\t\"year\": this._t((dmillisecond + ayear) as any)\r\n\t\t\t},\r\n\t\t\t\"second\": {\r\n\t\t\t\t\"second\": this._t((dsecond) as any),\r\n\t\t\t\t\"minute\": this._t((dsecond + aminute) as any),\r\n\t\t\t\t\"hour\": this._t((dsecond + ahour) as any),\r\n\t\t\t\t\"day\": this._t((dsecond + aday) as any),\r\n\t\t\t\t\"week\": this._t((dsecond + aweek) as any),\r\n\t\t\t\t\"month\": this._t((dsecond + amonth) as any),\r\n\t\t\t\t\"year\": this._t((dsecond + ayear) as any)\r\n\t\t\t},\r\n\t\t\t\"minute\": {\r\n\t\t\t\t\"minute\": this._t((dminute) as any),\r\n\t\t\t\t\"hour\": this._t((dminute + ahour) as any),\r\n\t\t\t\t\"day\": this._t((dminute + aday) as any),\r\n\t\t\t\t\"week\": this._t((dminute + aweek) as any),\r\n\t\t\t\t\"month\": this._t((dminute + amonth) as any),\r\n\t\t\t\t\"year\": this._t((dminute + ayear) as any)\r\n\t\t\t},\r\n\t\t\t\"hour\": {\r\n\t\t\t\t\"hour\": this._t((dhour) as any),\r\n\t\t\t\t\"day\": this._t((dhour + aday) as any),\r\n\t\t\t\t\"week\": this._t((dhour + aweek) as any),\r\n\t\t\t\t\"month\": this._t((dhour + amonth) as any),\r\n\t\t\t\t\"year\": this._t((dhour + ayear) as any)\r\n\t\t\t},\r\n\t\t\t\"day\": {\r\n\t\t\t\t\"day\": this._t((dday) as any),\r\n\t\t\t\t\"week\": this._t((dday + aweek) as any),\r\n\t\t\t\t\"month\": this._t((dday + amonth) as any),\r\n\t\t\t\t\"year\": this._t((dday + ayear) as any)\r\n\t\t\t},\r\n\t\t\t\"week\": {\r\n\t\t\t\t\"week\": this._t((dweek) as any),\r\n\t\t\t\t\"month\": this._t((dweek + amonth) as any),\r\n\t\t\t\t\"year\": this._t((dweek + ayear) as any)\r\n\t\t\t},\r\n\t\t\t\"month\": {\r\n\t\t\t\t\"month\": this._t((dmonth) as any),\r\n\t\t\t\t\"year\": this._t((dmonth + ayear) as any)\r\n\t\t\t},\r\n\t\t\t\"year\": {\r\n\t\t\t\t\"year\": this._t(dyear)\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tsuper._setDefaults();\r\n\t}\r\n\r\n\r\n\t/**\r\n\t * Collection of aliases for units.\r\n\t */\r\n\tprotected _unitAliases: { [index: string]: string } = {\r\n\t\t\"Y\": \"y\",\r\n\t\t\"D\": \"d\",\r\n\t\t\"H\": \"h\",\r\n\t\t\"K\": \"h\",\r\n\t\t\"k\": \"h\",\r\n\t\t\"n\": \"S\"\r\n\t};\r\n\r\n\tpublic _beforeChanged() {\r\n\t\tsuper._beforeChanged();\r\n\t}\r\n\r\n\t/**\r\n\t * Formats the number as duration.\r\n\t *\r\n\t * For example `1000` (base unit seconds) would be converted to `16:40` as in\r\n\t * 16 minutes and 40 seconds.\r\n\t *\r\n\t * @param value Value to format\r\n\t * @param format Format to apply\r\n\t * @param base Override base unit\r\n\t * @return Formatted number\r\n\t */\r\n\tpublic format(value: number | string, format?: string, base?: TimeUnit): string {\r\n\r\n\t\t// no base unit?\r\n\t\tlet baseUnit = base || this.get(\"baseUnit\");\r\n\r\n\t\t// no format passed in or empty\r\n\t\tif (typeof format === \"undefined\" || format === \"\") {\r\n\t\t\tif (this.get(\"durationFormat\") != null) {\r\n\t\t\t\tformat = this.get(\"durationFormat\");\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tformat = this.getFormat($type.toNumber(value), undefined, baseUnit);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Clean format\r\n\t\tformat = $utils.cleanFormat(format!);\r\n\r\n\t\t// get format info (it will also deal with parser caching)\r\n\t\tlet info = this.parseFormat(format, baseUnit);\r\n\r\n\t\t// cast to number just in case\r\n\t\t// TODO: maybe use better casting\r\n\t\tlet source: number = Number(value);\r\n\r\n\t\t// format and replace the number\r\n\t\tlet details;\r\n\t\tif (source > this.get(\"negativeBase\")) {\r\n\t\t\tdetails = info.positive;\r\n\t\t}\r\n\t\telse if (source < this.get(\"negativeBase\")) {\r\n\t\t\tdetails = info.negative;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tdetails = info.zero;\r\n\t\t}\r\n\r\n\t\t// Format\r\n\t\tlet formatted = this.applyFormat(source, details);\r\n\r\n\t\t// Apply color?\r\n\t\tif (details.color !== \"\") {\r\n\t\t\tformatted = \"[\" + details.color + \"]\" + formatted + \"[/]\";\r\n\t\t}\r\n\r\n\t\treturn formatted;\r\n\t}\r\n\r\n\t/**\r\n\t * Parses supplied format into structured object which can be used to format\r\n\t * the number.\r\n\t *\r\n\t * @param format Format string, i.e. \"#,###.00\"\r\n\t * @param base Override base unit\r\n\t * @return Parsed information\r\n\t */\r\n\tprotected parseFormat(format: string, base?: TimeUnit): any {\r\n\r\n\t\t// Check cache\r\n\t\t// TODO\r\n\t\t// let cached = this.getCache(format);\r\n\t\t// if (cached != null) {\r\n\t\t// \treturn cached;\r\n\t\t// }\r\n\r\n\t\t// no base unit?\r\n\t\tlet baseUnit = base || this.get(\"baseUnit\");\r\n\r\n\t\t// Initialize duration parsing info\r\n\t\tlet info = {\r\n\t\t\t\"positive\": {\r\n\t\t\t\t\"color\": \"\",\r\n\t\t\t\t\"template\": \"\",\r\n\t\t\t\t\"parts\": <any>[],\r\n\t\t\t\t\"source\": \"\",\r\n\t\t\t\t\"baseUnit\": baseUnit,\r\n\t\t\t\t\"parsed\": false,\r\n\t\t\t\t\"absolute\": false\r\n\t\t\t},\r\n\t\t\t\"negative\": {\r\n\t\t\t\t\"color\": \"\",\r\n\t\t\t\t\"template\": \"\",\r\n\t\t\t\t\"parts\": <any>[],\r\n\t\t\t\t\"source\": \"\",\r\n\t\t\t\t\"baseUnit\": baseUnit,\r\n\t\t\t\t\"parsed\": false,\r\n\t\t\t\t\"absolute\": false\r\n\t\t\t},\r\n\t\t\t\"zero\": {\r\n\t\t\t\t\"color\": \"\",\r\n\t\t\t\t\"template\": \"\",\r\n\t\t\t\t\"parts\": <any>[],\r\n\t\t\t\t\"source\": \"\",\r\n\t\t\t\t\"baseUnit\": baseUnit,\r\n\t\t\t\t\"parsed\": false,\r\n\t\t\t\t\"absolute\": false\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\t// Escape double vertical bars (that mean display one vertical bar)\r\n\t\tformat = format.replace(\"||\", $type.PLACEHOLDER2);\r\n\r\n\t\t// Split it up and deal with different formats\r\n\t\tlet parts = format.split(\"|\");\r\n\t\tinfo.positive.source = parts[0];\r\n\r\n\t\tif (typeof parts[2] === \"undefined\") {\r\n\t\t\tinfo.zero = info.positive;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tinfo.zero.source = parts[2];\r\n\t\t}\r\n\r\n\t\tif (typeof parts[1] === \"undefined\") {\r\n\t\t\tinfo.negative = info.positive;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tinfo.negative.source = parts[1];\r\n\t\t}\r\n\r\n\t\t// Parse each\r\n\t\t$object.each(info, (_part, item) => {\r\n\t\t\t// Already parsed\r\n\t\t\tif (item.parsed) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Check cached\r\n\t\t\t// TODO\r\n\t\t\t// if (typeof this.getCache(item.source) !== \"undefined\") {\r\n\t\t\t// \tinfo[part] = this.getCache(item.source);\r\n\t\t\t// \treturn;\r\n\t\t\t// }\r\n\r\n\t\t\t// Begin parsing\r\n\t\t\tlet partFormat: string = item.source;\r\n\r\n\t\t\t// Check for [] directives\r\n\t\t\tlet dirs: string[] | null = [];\r\n\t\t\tdirs = item.source.match(/^\\[([^\\]]*)\\]/);\r\n\t\t\tif (dirs && dirs.length && dirs[0] !== \"\") {\r\n\t\t\t\tpartFormat = item.source.substr(dirs[0].length);\r\n\t\t\t\titem.color = dirs[1];\r\n\t\t\t}\r\n\r\n\r\n\t\t\t// Let TextFormatter split into chunks\r\n\t\t\tlet chunks = TextFormatter.chunk(partFormat, true);\r\n\t\t\tfor (let i: number = 0; i < chunks.length; i++) {\r\n\t\t\t\tlet chunk = chunks[i];\r\n\r\n\t\t\t\t// replace back double vertical bar\r\n\t\t\t\tchunk.text = chunk.text.replace($type.PLACEHOLDER2, \"|\");\r\n\r\n\t\t\t\tif (chunk.type === \"value\") {\r\n\r\n\t\t\t\t\t// Just \"Duration\"?\r\n\t\t\t\t\t// if (chunk.text.toLowerCase() === \"duration\") {\r\n\t\t\t\t\t// \tchunk.text = durationFormat;\r\n\t\t\t\t\t// }\r\n\r\n\t\t\t\t\t// Check for \"a\" (absolute) modifier\r\n\t\t\t\t\tif (chunk.text.match(/[yYMdDwhHKkmsSn]+a/)) {\r\n\t\t\t\t\t\titem.absolute = true;\r\n\t\t\t\t\t\tchunk.text = chunk.text.replace(/([yYMdDwhHKkmsSn]+)a/, \"$1\");\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Find all possible parts\r\n\t\t\t\t\tlet matches = chunk.text.match(/y+|Y+|M+|d+|D+|w+|h+|H+|K+|k+|m+|s+|S+|n+/g);\r\n\r\n\t\t\t\t\tif (matches) {\r\n\t\t\t\t\t\t// Populate template\r\n\t\t\t\t\t\tfor (let x = 0; x < matches.length; x++) {\r\n\t\t\t\t\t\t\t// Is it an alias?\r\n\t\t\t\t\t\t\tif (matches[x] == null) {\r\n\t\t\t\t\t\t\t\tmatches[x] = this._unitAliases[matches[x]];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\titem.parts.push(matches[x]);\r\n\t\t\t\t\t\t\tchunk.text = chunk.text.replace(matches[x], $type.PLACEHOLDER);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Apply to template\r\n\t\t\t\titem.template += chunk.text;\r\n\t\t\t}\r\n\r\n\t\t\t// Apply style formatting\r\n\t\t\t//item.template = TextFormatter.format(item.template, this.outputFormat);\r\n\r\n\t\t\t// Save cache\r\n\t\t\t// TODO\r\n\t\t\t//this.setCache(item.source, item);\r\n\r\n\t\t\t// Mark this as parsed\r\n\t\t\titem.parsed = true;\r\n\t\t});\r\n\r\n\t\t// Save cache (the whole thing)\r\n\t\t// TODO\r\n\t\t//this.setCache(format, info);\r\n\r\n\t\treturn info;\r\n\t}\r\n\r\n\t/**\r\n\t * Applies parsed format to a numeric value.\r\n\t *\r\n\t * @param value Value\r\n\t * @param details Parsed format as returned by {parseFormat}\r\n\t * @return Formatted duration\r\n\t */\r\n\tprotected applyFormat(value: number, details: any): string {\r\n\r\n\t\t// Use absolute values\r\n\t\tlet negative = !details.absolute && (value < this.get(\"negativeBase\"));\r\n\t\tvalue = Math.abs(value);\r\n\r\n\t\t// Recalculate to milliseconds\r\n\t\tlet tstamp = this.toTimeStamp(value, details.baseUnit);\r\n\r\n\t\t// Init return value\r\n\t\tlet res = details.template;\r\n\r\n\t\t// Iterate through duration parts\r\n\t\tfor (let i = 0, len = details.parts.length; i < len; i++) {\r\n\r\n\t\t\t// Gather the part\r\n\t\t\tlet part = details.parts[i];\r\n\t\t\tlet unit = this._toTimeUnit(part.substr(0, 1));\r\n\t\t\tlet digits = part.length;\r\n\r\n\t\t\t// Calculate current unit value\r\n\t\t\tlet ints: number;\r\n\t\t\tconst unitValue = this._getUnitValue(unit!);\r\n\t\t\tif (i < (len -1)) {\r\n\t\t\t\tints = Math.floor(tstamp / unitValue);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tints = Math.round(tstamp / unitValue);\r\n\t\t\t}\r\n\t\t\tres = res.replace($type.PLACEHOLDER, $utils.padString(ints, digits, \"0\"));\r\n\r\n\t\t\t// Reduce timestamp\r\n\t\t\ttstamp -= ints * unitValue;\r\n\t\t}\r\n\r\n\t\t// Reapply negative sign\r\n\t\tif (negative) {\r\n\t\t\tres = \"-\" + res;\r\n\t\t}\r\n\r\n\t\treturn res;\r\n\t}\r\n\r\n\t/**\r\n\t * Converts numeric value to timestamp in milliseconds.\r\n\t *\r\n\t * @param value A source value\r\n\t * @param baseUnit Base unit the source value is in: \"q\", \"s\", \"i\", \"h\", \"d\", \"w\", \"m\", \"y\"\r\n\t * @return Value representation as a timestamp in milliseconds\r\n\t */\r\n\tpublic toTimeStamp(value: number, baseUnit: TimeUnit): number {\r\n\t\treturn value * this._getUnitValue(baseUnit);\r\n\t}\r\n\r\n\tprotected _toTimeUnit(code: string): TimeUnit | undefined {\r\n\t\tswitch (code) {\r\n\t\t\tcase \"S\":\r\n\t\t\t\treturn \"millisecond\";\r\n\t\t\tcase \"s\":\r\n\t\t\t\treturn \"second\";\r\n\t\t\tcase \"m\":\r\n\t\t\t\treturn \"minute\";\r\n\t\t\tcase \"h\":\r\n\t\t\t\treturn \"hour\";\r\n\t\t\tcase \"d\":\r\n\t\t\t\treturn \"day\";\r\n\t\t\tcase \"w\":\r\n\t\t\t\treturn \"week\";\r\n\t\t\tcase \"M\":\r\n\t\t\t\treturn \"month\";\r\n\t\t\tcase \"y\":\r\n\t\t\t\treturn \"year\";\r\n\t\t};\r\n\t}\r\n\r\n\t/**\r\n\t * Returns appropriate default format for the value.\r\n\t *\r\n\t * If `maxValue` is sepcified, it will use that value to determine the time\r\n\t * unit for the format.\r\n\t *\r\n\t * For example if your `baseUnit` is `\"second\"` and you pass in `10`, you\r\n\t * will get `\"10\"`.\r\n\t *\r\n\t * However, you might want it to be formatted in the context of bigger scale,\r\n\t * say 10 minutes (600 seconds). If you pass in `600` as `maxValue`, all\r\n\t * values, including small ones will use format with minutes, e.g.:\r\n\t * `00:10`, `00:50`, `12: 30`, etc.\r\n\t *\r\n\t * @param value Value to format\r\n\t * @param maxValue Maximum value to be used to determine format\r\n\t * @param baseUnit Base unit of the value\r\n\t * @return Format\r\n\t */\r\n\tpublic getFormat(value: number, maxValue?: number, baseUnit?: TimeUnit): string {\r\n\r\n\t\t// Is format override set?\r\n\t\tif (this.get(\"durationFormat\") != null) {\r\n\t\t\treturn this.get(\"durationFormat\")!;\r\n\t\t}\r\n\r\n\t\t// Get base unit\r\n\t\tif (!baseUnit) {\r\n\t\t\tbaseUnit = this.get(\"baseUnit\");\r\n\t\t}\r\n\r\n\t\tif (maxValue != null && value != maxValue) {\r\n\t\t\tvalue = Math.abs(value);\r\n\t\t\tmaxValue = Math.abs(maxValue);\r\n\t\t\tlet maxUnit = this.getValueUnit(Math.max(value, maxValue), baseUnit);\r\n\t\t\treturn (<any>this.get(\"durationFormats\"))[baseUnit!][maxUnit!];\r\n\t\t}\r\n\t\telse {\r\n\t\t\tlet unit = this.getValueUnit(value, baseUnit);\r\n\t\t\treturn (<any>this.get(\"durationFormats\"))[baseUnit!][unit!];\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Returns value's closest denominator time unit, e.g 100 seconds is\r\n\t * `\"minute\"`, while 59 seconds would still be `second`.\r\n\t *\r\n\t * @param value Source duration value\r\n\t * @param baseUnit Base unit\r\n\t * @return Denominator\r\n\t */\r\n\tpublic getValueUnit(value: number, baseUnit?: TimeUnit): TimeUnit | undefined {\r\n\r\n\t\t// Get base unit\r\n\t\tif (!baseUnit) {\r\n\t\t\tbaseUnit = this.get(\"baseUnit\");\r\n\t\t}\r\n\r\n\t\t// Convert to milliseconds\r\n\t\tlet currentUnit: any;\r\n\t\tlet ms = this.getMilliseconds(value, baseUnit);\r\n\t\t$object.eachContinue(this._getUnitValues(), (key, val) => {\r\n\t\t\tif (key == baseUnit || currentUnit) {\r\n\t\t\t\tlet num = ms / val;\r\n\t\t\t\tif (num <= 1) {\r\n\t\t\t\t\tif (!currentUnit) {\r\n\t\t\t\t\t\tcurrentUnit = key;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\tcurrentUnit = key;\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t});\r\n\r\n\t\treturn currentUnit;\r\n\t}\r\n\r\n\t/**\r\n\t * Converts value to milliseconds according to `baseUnit`.\r\n\t *\r\n\t * @param value Source duration value\r\n\t * @param baseUnit Base unit\r\n\t * @return Value in milliseconds\r\n\t */\r\n\tpublic getMilliseconds(value: number, baseUnit?: TimeUnit): number {\r\n\r\n\t\t// Get base unit\r\n\t\tif (!baseUnit) {\r\n\t\t\tbaseUnit = this.get(\"baseUnit\");\r\n\t\t}\r\n\r\n\t\treturn value * this._getUnitValue(baseUnit!);\r\n\t}\r\n\r\n\tprotected _getUnitValue(timeUnit: TimeUnit): number {\r\n\t\treturn this._getUnitValues()[timeUnit];\r\n\t}\r\n\r\n\tprotected _getUnitValues(): any {\r\n\t\treturn {\r\n\t\t\t\"millisecond\": 1,\r\n\t\t\t\"second\": 1000,\r\n\t\t\t\"minute\": 60000,\r\n\t\t\t\"hour\": 3600000,\r\n\t\t\t\"day\": 86400000,\r\n\t\t\t\"week\": 604800000,\r\n\t\t\t\"month\": 2592000000,\r\n\t\t\t\"year\": 31536000000,\r\n\t\t};\r\n\t}\r\n\r\n}\r\n","/**\n * A collection of easing functions\n *\n * Parts of this collection are taken from D3.js library (https://d3js.org/)\n */\n\n/**\n * ============================================================================\n * IMPORTS\n * ============================================================================\n * @hidden\n */\nimport * as $math from \"./Math\";\nimport type { Time } from \"./Animation\";\n\nexport type Easing = (time: Time) => Time;\n\n/**\n * The functions below are from D3.js library (https://d3js.org/)\n *\n * ----------------------------------------------------------------------------\n * Copyright 2017 Mike Bostock\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice,\n *\tthis list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice,\n *\tthis list of conditions and the following disclaimer in the documentation\n *\tand/or other materials provided with the distribution.\n *\n * 3. Neither the name of the copyright holder nor the names of its\n *\tcontributors may be used to endorse or promote products derived from this\n *\tsoftware without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n * ----------------------------------------------------------------------------\n * @hidden\n */\n\n/**\n */\nexport function linear(t: Time): Time {\n\treturn t;\n}\n\nexport function quad(t: Time): Time {\n\treturn (t as number) * (t as number);\n}\n\nexport function cubic(t: Time): Time {\n\treturn (t as number) * (t as number) * (t as number);\n}\n\nexport function pow(t: Time, e: number): Time {\n\treturn Math.pow(t as number, e);\n}\n\nexport function exp(t: Time): Time {\n\treturn Math.pow(2, 10 * (t as number) - 10);\n}\n\nexport function sine(t: Time): Time {\n\treturn 1 - Math.cos((t as number) * $math.HALFPI);\n}\n\nexport function circle(t: Time): Time {\n\treturn 1 - Math.sqrt(1 - (t as number) * (t as number));\n}\n\n/**\n * ============================================================================\n * TRANSFORMERS\n * ============================================================================\n * @hidden\n */\n\n/**\n */\nexport function yoyo(ease: Easing): Easing {\n\treturn function (t: Time) {\n\t\tif ((t as number) < 0.5) {\n\t\t\treturn ease((t as number) * 2.0);\n\n\t\t} else {\n\t\t\treturn ease((1.0 - (t as number)) * 2.0);\n\t\t}\n\t};\n}\n\nexport function out(ease: Easing): Easing {\n\treturn function (t: Time) {\n\t\treturn 1.0 - (ease(1.0 - (t as number)) as number);\n\t};\n}\n\nexport function inOut(ease: Easing): Easing {\n\treturn function (t: Time) {\n\t\tif (t as number <= 0.5) {\n\t\t\treturn ease(t as number * 2.0) as number / 2.0;\n\n\t\t} else {\n\t\t\treturn 1.0 - (ease((1.0 - (t as number)) * 2.0) as number / 2.0);\n\t\t}\n\t};\n}\n\n/**\n * ============================================================================\n * BOUNCE\n * ============================================================================\n * @hidden\n */\nlet b1 = 4 / 11,\n\tb2 = 6 / 11,\n\tb3 = 8 / 11,\n\tb4 = 3 / 4,\n\tb5 = 9 / 11,\n\tb6 = 10 / 11,\n\tb7 = 15 / 16,\n\tb8 = 21 / 22,\n\tb9 = 63 / 64,\n\tb0 = 1 / b1 / b1;\n\nexport function bounce(t: Time): Time {\n\treturn 1 - (bounceOut(1 - (t as number)) as number);\n}\n\n/**\n * @ignore\n */\nfunction bounceOut(t: Time): Time {\n\tt = t as number;\n\tif (t < b1) {\n\t\treturn b0 * t * t;\n\t} else if (t < b3) {\n\t\treturn b0 * (t -= b2) * t + b4;\n\t} else if (t < b6) {\n\t\treturn b0 * (t -= b5) * t + b7;\n\t} else {\n\t\treturn b0 * (t -= b8) * t + b9;\n\t}\n}\n\n/**\n * ============================================================================\n * ELASTIC\n * ============================================================================\n * @hidden\n */\n\n/**\n * @ignore\n */\nlet tau = 2 * Math.PI;\n\n/**\n * @ignore\n */\nlet amplitude = 1;\n\n/**\n * @ignore\n */\nlet period = 0.3 / tau;\n\n/**\n * @ignore\n */\nlet s = Math.asin(1 / amplitude) * period;\n\nexport function elastic(t: Time): Time {\n\tlet v = t as number;\n\treturn amplitude * Math.pow(2, 10 * --v) * Math.sin((s - v) / period);\n}\n","import type { Entity, Dirty } from \"./Entity\";\nimport type { Animations } from \"./Animation\";\nimport * as $object from \"./Object\";\nimport * as $ease from \"./Ease\";\n\n/**\n * An object representing a collection of setting values to apply as required.\n *\n * @see {@link https://www.amcharts.com/docs/v5/concepts/settings/states/} for more info\n */\nexport class State<E extends Entity> {\n\tprivate _entity: E;\n\tpublic _settings: Partial<E[\"_settings\"]>;\n\tpublic _userSettings: Dirty<E[\"_settings\"]> = {};\n\n\tconstructor(entity: E, settings: Partial<E[\"_settings\"]>) {\n\t\tthis._entity = entity;\n\t\tthis._settings = settings;\n\n\t\t$object.each(settings, (key) => {\n\t\t\tthis._userSettings[key] = true;\n\t\t});\n\t}\n\n\t/**\n\t * Returns settings value for the specified `key`.\n\t *\n\t * If there is no value, `fallback` is returned instead (if set).\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/settings/} for more info\n\t * @param key Settings value\n\t * @param callback Fallback value\n\t * @return Value\n\t */\n\tpublic get<Key extends keyof this[\"_settings\"]>(key: Key): this[\"_settings\"][Key];\n\tpublic get<Key extends keyof this[\"_settings\"], F>(key: Key, fallback: F): NonNullable<this[\"_settings\"][Key]> | F;\n\tpublic get<Key extends keyof this[\"_settings\"]>(key: Key, fallback?: any): any {\n\t\tconst value = this._settings[key];\n\n\t\tif (value !== undefined) {\n\t\t\treturn value;\n\n\t\t} else {\n\t\t\treturn fallback;\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic setRaw<Key extends keyof E[\"_settings\"]>(key: Key, value: E[\"_settings\"][Key]) {\n\t\tthis._settings[key] = value;\n\t}\n\n\t/**\n\t * Sets a setting `value` for the specified `key` to be set when the state\n\t * is applied.\n\t *\n\t * @param key Setting key\n\t * @param value Setting value\n\t * @return Setting value\n\t */\n\tpublic set<Key extends keyof E[\"_settings\"]>(key: Key, value: E[\"_settings\"][Key]) {\n\t\tthis._userSettings[key] = true;\n\t\tthis.setRaw(key, value);\n\t}\n\n\t/**\n\t * Removes a setting value for the specified `key`.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/settings/} for more info\n\t * @param key Setting key\n\t */\n\tpublic remove<Key extends keyof this[\"_settings\"]>(key: Key) {\n\t\tdelete this._userSettings[key];\n\t\tdelete this._settings[key];\n\t}\n\n\t/**\n\t * Sets multiple settings at once.\n\t *\n\t * `settings` must be an object with key: value pairs.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/settings/} for more info\n\t * @param settings Settings\n\t */\n\tpublic setAll(settings: this[\"_settings\"]) {\n\t\t$object.keys(settings).forEach((key) => {\n\t\t\tthis.set(key, settings[key]);\n\t\t});\n\t}\n\n\tprivate _eachSetting<Key extends keyof E[\"_settings\"], Value extends E[\"_settings\"][Key]>(f: (key: Key, value: Value) => void): void {\n\t\t$object.each(this._settings, f as any);\n\t}\n\n\t/**\n\t * Applies the state to the target element.\n\t *\n\t * All setting values are set immediately.\n\t */\n\tpublic apply() {\n\t\tconst seen: Dirty<E[\"_settings\"]> = {};\n\n\t\tseen[\"stateAnimationEasing\"] = true;\n\t\tseen[\"stateAnimationDuration\"] = true;\n\n\t\tconst defaultState = this._entity.states.lookup(\"default\")!;\n\n\t\tthis._eachSetting((key, value) => {\n\t\t\tif (!seen[key]) {\n\t\t\t\tseen[key] = true;\n\n\t\t\t\t// save values to default state\n\t\t\t\tif (this !== defaultState) {\n\t\t\t\t\tif (!(key in defaultState._settings)) {\n\t\t\t\t\t\tdefaultState._settings[key] = this._entity.get(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis._entity.set(key, value);\n\t\t\t}\n\t\t});\n\t}\n\n\n\n\t/**\n\t * Applies the state to the target element.\n\t *\n\t * Returns an object representing all [[Animation]] objects created for\n\t * each setting key transition.\n\t *\n\t * @return Animations\n\t */\n\tpublic applyAnimate(duration?: number): Animations<E[\"_settings\"]> {\n\n\t\tif (duration == null) {\n\t\t\tduration = this._settings.stateAnimationDuration;\n\t\t}\n\t\tif (duration == null) {\n\t\t\tduration = this.get(\"stateAnimationDuration\", this._entity.get(\"stateAnimationDuration\", 0));\n\t\t}\n\n\t\tlet easing = this._settings.stateAnimationEasing;\n\t\tif (easing == null) {\n\t\t\teasing = this.get(\"stateAnimationEasing\", this._entity.get(\"stateAnimationEasing\", $ease.cubic));\n\t\t}\n\n\t\tconst defaultState = this._entity.states.lookup(\"default\")!;\n\n\t\tconst seen: Dirty<E[\"_settings\"]> = {};\n\n\t\tseen[\"stateAnimationEasing\"] = true;\n\t\tseen[\"stateAnimationDuration\"] = true;\n\n\t\tconst animations: Animations<E[\"_settings\"]> = {};\n\n\t\tthis._eachSetting((key, value) => {\n\t\t\tif (!seen[key]) {\n\t\t\t\tseen[key] = true;\n\n\t\t\t\t// save values to default state\n\t\t\t\tif (this != defaultState) {\n\t\t\t\t\tif (!(key in defaultState._settings)) {\n\t\t\t\t\t\tdefaultState._settings[key] = this._entity.get(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tconst animation = this._entity.animate({\n\t\t\t\t\tkey: key,\n\t\t\t\t\tto: value,\n\t\t\t\t\tduration: duration!,\n\t\t\t\t\teasing: easing\n\t\t\t\t});\n\n\t\t\t\tif (animation) {\n\t\t\t\t\tanimations[key] = animation;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\treturn animations;\n\t}\n}\n\n/**\n * Collection of [[State]] objects for an element.\n *\n * @see {@link https://www.amcharts.com/docs/v5/concepts/settings/states/} for more info\n */\nexport class States<E extends Entity> {\n\tprivate _states: { [key: string]: State<E> } = {};\n\tprivate _entity: E;\n\n\tconstructor(entity: E) {\n\t\tthis._entity = entity;\n\t}\n\n\t/**\n\t * Checks if a state by `name` exists. Returns it there is one.\n\t *\n\t * @param name State name\n\t * @return State\n\t */\n\tpublic lookup(name: string): State<E> | undefined {\n\t\treturn this._states[name];\n\t}\n\n\t/**\n\t * Sets supplied `settings` on a state by the `name`.\n\t *\n\t * If such state does not yet exists, it is created.\n\t *\n\t * @param name State name\n\t * @param settings Settings\n\t * @return New State\n\t */\n\tpublic create(name: string, settings: Partial<E[\"_settings\"]>): State<E> {\n\t\tconst state = this._states[name];\n\n\t\tif (state) {\n\t\t\tstate.setAll(settings);\n\t\t\treturn state;\n\n\t\t} else {\n\t\t\tconst state = new State(this._entity, settings);\n\t\t\tthis._states[name] = state;\n\t\t\treturn state;\n\t\t}\n\t}\n\n\t/**\n\t * Removes the state called `name`.\n\t *\n\t * @param name State name\n\t */\n\tpublic remove(name: string): void {\n\t\tdelete this._states[name];\n\t}\n\n\t/**\n\t * Applies a named state to the target element.\n\t *\n\t * @param newState State name\n\t */\n\tpublic apply(newState: string) {\n\t\tconst state = this._states[newState];\n\n\t\tif (state) {\n\t\t\tstate.apply();\n\t\t}\n\n\t\tthis._entity._applyState(newState);\n\t}\n\n\t/**\n\t * Applies a named state to the element.\n\t *\n\t * Returns an object representing all [[Animation]] objects created for\n\t * each setting key transition.\n\t *\n\t * @param newState State name\n\t * @return Animations\n\t */\n\tpublic applyAnimate(newState: string, duration?: number): Animations<E[\"_settings\"]> | undefined {\n\t\tlet animations;\n\t\tconst state = this._states[newState];\n\n\t\tif (state) {\n\t\t\tanimations = state.applyAnimate(duration);\n\t\t}\n\n\t\tthis._entity._applyStateAnimated(newState, duration);\n\t\treturn animations;\n\t}\n}\n","import type { Root } from \"../Root\";\nimport type { Template, ApplyState } from \"./Template\";\nimport type { Theme, IRule } from \"../Theme\";\nimport type { ILocale } from \"./Language\";\n\nimport { IDisposer, Disposer } from \"./Disposer\";\nimport { EventDispatcher, Events } from \"./EventDispatcher\";\nimport { Time, IAnimation, AnimationState, getInterpolate } from \"./Animation\";\nimport { States } from \"./States\";\nimport { registry } from \"../Registry\";\n\nimport * as $object from \"./Object\";\nimport * as $ease from \"./Ease\";\nimport * as $array from \"./Array\";\nimport * as $order from \"./Order\";\n\n/**\n * @ignore\n */\nexport type Dirty<A> = { [K in keyof A]?: boolean };\n\n\n/**\n * Allows to dynamically modify setting value of its target element.\n *\n * @see {@link https://www.amcharts.com/docs/v5/concepts/settings/adapters/} for more info\n */\nexport class Adapters<E extends Settings> {\n\tprivate _entity: E;\n\tprivate _callbacks: { [K in keyof E[\"_settings\"]]?: Array<<O extends E>(value: O[\"_settings\"][K], target: O, key: K) => O[\"_settings\"][K]> } = {};\n\tprivate _disabled: { [K in keyof E[\"_settings\"]]?: boolean } = {};\n\n\tconstructor(entity: E) {\n\t\tthis._entity = entity;\n\t}\n\n\t/**\n\t * Add a function (`callback`) that will modify value for setting `key`.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/settings/adapters/} for more info\n\t */\n\tpublic add<Key extends keyof E[\"_settings\"]>(key: Key, callback: (value: E[\"_settings\"][Key], target: E, key: Key) => E[\"_settings\"][Key]): IDisposer {\n\t\tlet callbacks = this._callbacks[key];\n\n\t\tif (callbacks === undefined) {\n\t\t\tcallbacks = this._callbacks[key] = [];\n\t\t}\n\n\t\tcallbacks.push(callback);\n\n\t\tthis._entity._markDirtyKey(key);\n\n\t\treturn new Disposer(() => {\n\t\t\tif ($array.removeFirst(callbacks!, callback)) {\n\t\t\t\tthis._entity._markDirtyKey(key);\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Removes all adapters for the specific key.\n\t *\n\t * @since 5.1.0\n\t */\n\tpublic remove<Key extends keyof E[\"_settings\"]>(key: Key) {\n\t\tconst callbacks = this._callbacks[key];\n\n\t\tif (callbacks !== undefined) {\n\t\t\tdelete this._callbacks[key];\n\n\t\t\tif (callbacks.length !== 0) {\n\t\t\t\tthis._entity._markDirtyKey(key);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Enables (previously disabled) adapters for specific key.\n\t *\n\t * @since 5.1.0\n\t */\n\tpublic enable<Key extends keyof E[\"_settings\"]>(key: Key) {\n\t\tif (this._disabled[key]) {\n\t\t\tdelete this._disabled[key];\n\t\t\tthis._entity._markDirtyKey(key);\n\t\t}\n\t}\n\n\t/**\n\t * Disables all adapters for specific key.\n\t *\n\t * @since 5.1.0\n\t */\n\tpublic disable<Key extends keyof E[\"_settings\"]>(key: Key) {\n\t\tif (!this._disabled[key]) {\n\t\t\tthis._disabled[key] = true;\n\t\t\tthis._entity._markDirtyKey(key);\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic fold<Key extends keyof E[\"_settings\"]>(key: Key, value: E[\"_settings\"][Key]): E[\"_settings\"][Key] {\n\t\tif (!this._disabled[key]) {\n\t\t\tconst callbacks = this._callbacks[key];\n\n\t\t\tif (callbacks !== undefined) {\n\t\t\t\tfor (let i = 0, len = callbacks.length; i < len; ++i) {\n\t\t\t\t\tvalue = callbacks[i](value, this._entity, key);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn value;\n\t}\n}\n\n\nexport interface IEntitySettings {\n\n\t/**\n\t * Tags which can be used by the theme rules.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/themes/} for more info\n\t */\n\tthemeTags?: Array<string>;\n\n\t/**\n\t * Tags which can be used by the theme rules.\n\t *\n\t * These tags only apply to this object, not any children.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/themes/} for more info\n\t */\n\tthemeTagsSelf?: Array<string>;\n\n\t/**\n\t * A list of themes applied to the element.\n\t */\n\tthemes?: Array<Theme>;\n\n\n\t/**\n\t * Duration of transition from one state to another.\n\t */\n\tstateAnimationDuration?:number;\n\n\t/**\n\t * Easing of transition from one state to another.\n\t */\n\tstateAnimationEasing?:$ease.Easing;\n\n\t/**\n\t * A custom string ID for the element.\n\t *\n\t * If set, element can be looked up via `am5.registry.entitiesById`.\n\t *\n\t * Will raise error if an element with the same ID already exists.\n\t */\n\tid?: string;\n\n\t/**\n\t * A storage for any custom user data that needs to be associated with the\n\t * element.\n\t */\n\tuserData?: any;\n\n}\n\nexport interface IEntityPrivate {\n}\n\nexport interface IEntityEvents {\n}\n\n/**\n * Animation options.\n *\n * @see {@link https://www.amcharts.com/docs/v5/concepts/animations/} for more info\n */\nexport interface AnimationOptions<Key, Value> {\n\n\t/**\n\t * A setting key to animate value for.\n\t */\n\tkey: Key,\n\n\t/**\n\t * Initial value to animate from. If not set, will use current value.\n\t */\n\tfrom?: Value;\n\n\t/**\n\t * Target value to animate to.\n\t */\n\tto: Value;\n\n\t/**\n\t * Animation duration in milliseconds.\n\t */\n\tduration: number;\n\n\t/**\n\t * Easing function. Defaults to linear.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/animations/#Easing_functions} for more info\n\t */\n\teasing?: $ease.Easing;\n\n\t/**\n\t * How many times to play the animation. Defaults to 1.\n\t */\n\tloops?: number;\n}\n\nexport interface IAnimationEvents {\n\t/**\n\t * Invoked when animation was stopped, which happens in these situations:\n\t * 1. When the animation reached the end.\n\t * 2. When the `stop()` method is called.\n\t * 3. When a new animation starts for the same key.\n\t * 4. When calling `set` for the same key.\n\t */\n\tstopped: {};\n}\n\n/**\n * Animation object.\n *\n * @see {@link https://www.amcharts.com/docs/v5/concepts/animations/} for more info\n */\nexport class Animation<Value> {\n\tprivate _animation: IStartAnimation;\n\tprivate _from: Value;\n\tprivate _to: Value;\n\tprivate _duration: number;\n\tprivate _easing: $ease.Easing;\n\tprivate _loops: number;\n\tprivate _interpolate: <A extends Value>(diff: Time, from: A, to: A) => A;\n\tprivate _oldTime: number | null;\n\tprivate _time: number = 0;\n\n\tpublic _stopped: boolean = false;\n\tpublic _playing: boolean = true;\n\n\tpublic events: EventDispatcher<Events<this, IAnimationEvents>> = new EventDispatcher();\n\n\tconstructor(animation: IStartAnimation, from: Value, to: Value, duration: number, easing: $ease.Easing, loops: number, startingTime: number | null) {\n\t\tthis._animation = animation;\n\t\tthis._from = from;\n\t\tthis._to = to;\n\t\tthis._duration = duration;\n\t\tthis._easing = easing;\n\t\tthis._loops = loops;\n\t\tthis._interpolate = getInterpolate(from, to);\n\t\tthis._oldTime = startingTime;\n\t}\n\n\tpublic get to() {\n\t\treturn this._to;\n\t}\n\n\tpublic get from() {\n\t\treturn this._from;\n\t}\n\n\tpublic get playing() {\n\t\treturn this._playing;\n\t}\n\n\tpublic get stopped() {\n\t\treturn this._stopped;\n\t}\n\n\tpublic stop(): void {\n\t\tif (!this._stopped) {\n\t\t\tthis._stopped = true;\n\t\t\tthis._playing = false;\n\n\t\t\tif (this.events.isEnabled(\"stopped\")) {\n\t\t\t\tthis.events.dispatch(\"stopped\", {\n\t\t\t\t\ttype: \"stopped\",\n\t\t\t\t\ttarget: this,\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic pause(): void {\n\t\tthis._playing = false;\n\t\tthis._oldTime = null;\n\t}\n\n\tpublic play(): void {\n\t\tif (!this._stopped && !this._playing) {\n\t\t\tthis._playing = true;\n\t\t\tthis._animation._startAnimation();\n\t\t}\n\t}\n\n\tpublic get percentage(): Time {\n\t\treturn this._time / this._duration;\n\t}\n\n\tpublic waitForStop(): Promise<void> {\n\t\treturn new Promise((resolve, _reject) => {\n\t\t\tif (this._stopped) {\n\t\t\t\tresolve();\n\n\t\t\t} else {\n\t\t\t\tconst listener = () => {\n\t\t\t\t\tstopped.dispose();\n\t\t\t\t\tresolve();\n\t\t\t\t};\n\n\t\t\t\tconst stopped = this.events.on(\"stopped\", listener);\n\t\t\t}\n\t\t});\n\t}\n\n\tpublic _checkEnded(): boolean {\n\t\tif (this._loops > 1) {\n\t\t\t--this._loops;\n\t\t\treturn false;\n\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\tpublic _run(currentTime: number): void {\n\t\tif (this._oldTime !== null) {\n\t\t\tthis._time += currentTime - this._oldTime;\n\n\t\t\tif (this._time > this._duration) {\n\t\t\t\tthis._time = this._duration;\n\t\t\t}\n\t\t}\n\n\t\tthis._oldTime = currentTime;\n\t}\n\n\tpublic _reset(currentTime: number): void {\n\t\tthis._oldTime = currentTime;\n\t\tthis._time = 0;\n\t}\n\n\tpublic _value(diff: Time): Value {\n\t\treturn this._interpolate(this._easing(diff), this._from, this._to);\n\t}\n}\n\ntype Animated<P> = { [K in keyof P]?: Animation<P[K]> };\n\n\ninterface IStartAnimation {\n\t_startAnimation(): void;\n}\n\n\n/**\n * @ignore\n */\nlet counter = 0;\n\n/**\n * Base class for [[Entity]] objects that support Settings.\n *\n * @see {@link https://www.amcharts.com/docs/v5/concepts/settings/} for more info\n */\nexport abstract class Settings implements IDisposer, IAnimation, IStartAnimation {\n\n\t/**\n\t * Unique ID.\n\t */\n\tpublic uid: number = ++counter;\n\n\tpublic _settings: {};\n\tpublic _privateSettings: {} = {};\n\n\tpublic _settingEvents: { [K in keyof this[\"_settings\"]]?: Array<<V extends this[\"_settings\"][K], O extends this>(value: V, target?: O, key?: K) => void> } = {};\n\tpublic _privateSettingEvents: { [K in keyof this[\"_settings\"]]?: Array<<V extends this[\"_settings\"][K], O extends this>(value: V, target?: O, key?: K) => void> } = {};\n\n\tpublic _prevSettings: this[\"_settings\"] = {};\n\tpublic _prevPrivateSettings: this[\"_privateSettings\"] = {};\n\n\tprotected _animatingSettings: Animated<this[\"_settings\"]> = {};\n\tprotected _animatingPrivateSettings: Animated<this[\"_privateSettings\"]> = {};\n\n\tprivate _disposed: boolean = false;\n\n\t// TODO move this into Entity\n\tprotected _userProperties: Dirty<this[\"_settings\"]> = {};\n\n\t/**\n\t * If this is set to `false` then disposing does nothing, it's a no-op.\n\t */\n\tpublic enableDispose: boolean = true;\n\n\tconstructor(settings: Settings[\"_settings\"]) {\n\t\tthis._settings = settings;\n\t}\n\n\tprotected _checkDirty(): void {\n\t\t$object.keys(this._settings).forEach((key) => {\n\t\t\t(this._userProperties as any)[key] = true;\n\t\t\tthis._markDirtyKey(key);\n\t\t});\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic resetUserSettings(){\n\t\tthis._userProperties = {};\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic abstract markDirty(): void;\n\n\tpublic _runAnimation(currentTime: number): AnimationState {\n\t\tlet state = AnimationState.Stopped;\n\n\t\tif (!this.isDisposed()) {\n\t\t\tlet playing = false;\n\t\t\tlet paused = false;\n\n\t\t\t$object.each(this._animatingSettings, (key, animation) => {\n\t\t\t\tif (animation.stopped) {\n\t\t\t\t\tthis._stopAnimation(key);\n\n\t\t\t\t} else if (animation.playing) {\n\t\t\t\t\tanimation._run(currentTime);\n\n\t\t\t\t\tconst diff = animation.percentage;\n\n\t\t\t\t\tif (diff >= 1) {\n\t\t\t\t\t\tif (animation._checkEnded()) {\n\t\t\t\t\t\t\tthis.set(key, animation._value(1));\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tplaying = true;\n\t\t\t\t\t\t\tanimation._reset(currentTime);\n\t\t\t\t\t\t\tthis._set(key, animation._value(1));\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tplaying = true;\n\t\t\t\t\t\tthis._set(key, animation._value(diff));\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\t\t\t\t\tpaused = true;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t$object.each(this._animatingPrivateSettings, (key, animation) => {\n\t\t\t\tif (animation.stopped) {\n\t\t\t\t\tthis._stopAnimationPrivate(key);\n\n\t\t\t\t} else if (animation.playing) {\n\t\t\t\t\tanimation._run(currentTime);\n\n\t\t\t\t\tconst diff = animation.percentage;\n\n\t\t\t\t\tif (diff >= 1) {\n\t\t\t\t\t\tif (animation._checkEnded()) {\n\t\t\t\t\t\t\tthis.setPrivate(key, animation._value(1));\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tplaying = true;\n\t\t\t\t\t\t\tanimation._reset(currentTime);\n\t\t\t\t\t\t\tthis._setPrivate(key, animation._value(1));\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tplaying = true;\n\t\t\t\t\t\tthis._setPrivate(key, animation._value(diff));\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\t\t\t\t\tpaused = true;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tif (playing) {\n\t\t\t\tstate = AnimationState.Playing;\n\n\t\t\t} else if (paused) {\n\t\t\t\tstate = AnimationState.Paused;\n\t\t\t}\n\t\t}\n\n\t\treturn state;\n\t}\n\n\tpublic abstract _startAnimation(): void;\n\tprotected abstract _animationTime(): number | null;\n\n\tpublic _markDirtyKey<Key extends keyof this[\"_settings\"]>(_key: Key) {\n\t\tthis.markDirty();\n\t}\n\n\tpublic _markDirtyPrivateKey<Key extends keyof this[\"_privateSettings\"]>(_key: Key) {\n\t\tthis.markDirty();\n\t}\n\n\t/**\n\t * Sets a callback function to invoke when specific key of settings changes\n\t * or is set.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/events/#Settings_value_change} for more info\n\t * @param key Settings key\n\t * @param callback Callback\n\t * @return Disposer for event\n\t */\n\tpublic on<Key extends keyof this[\"_settings\"]>(key: Key, callback: (value: this[\"_settings\"][Key], target?: this, key?: Key) => void): IDisposer {\n\t\tlet events = this._settingEvents[key];\n\n\t\tif (events === undefined) {\n\t\t\tevents = this._settingEvents[key] = [];\n\t\t}\n\n\t\tevents.push(callback);\n\n\t\treturn new Disposer(() => {\n\t\t\t$array.removeFirst(events!, callback);\n\n\t\t\tif (events!.length === 0) {\n\t\t\t\tdelete this._settingEvents[key];\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Removes a callback for when value of a setting changes.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/events/#Settings_value_change} for more info\n\t * @param key Private settings key\n\t * @param callback Callback\n\t * @since 5.9.2\n\t */\n\tpublic off<Key extends keyof this[\"_settings\"]>(key: Key, callback?: (value: this[\"_settings\"][Key], target?: this, key?: Key) => void): void {\n\t\tlet events = this._settingEvents[key];\n\t\tif (events !== undefined && callback !== undefined) {\n\t\t\t$array.removeFirst(events, callback);\n\t\t}\n\t\telse {\n\t\t\tdelete this._settingEvents[key];\n\t\t}\n\t}\n\n\t/**\n\t * Sets a callback function to invoke when specific key of private settings\n\t * changes or is set.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/events/#Settings_value_change} for more info\n\t * @param key Private settings key\n\t * @param callback Callback\n\t * @return Disposer for event\n\t */\n\tpublic onPrivate<Key extends keyof this[\"_privateSettings\"]>(key: Key, callback: (value: this[\"_privateSettings\"][Key], target?: this, key?: Key) => void): IDisposer {\n\t\tlet events = this._privateSettingEvents[key];\n\n\t\tif (events === undefined) {\n\t\t\tevents = this._privateSettingEvents[key] = [];\n\t\t}\n\n\t\tevents.push(callback);\n\n\t\treturn new Disposer(() => {\n\t\t\t$array.removeFirst(events!, callback);\n\n\t\t\tif (events!.length === 0) {\n\t\t\t\tdelete this._privateSettingEvents[key];\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Removes a callback for when value of a private setting changes.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/events/#Settings_value_change} for more info\n\t * @param key Private settings key\n\t * @param callback Callback\n\t * @since 5.9.2\n\t */\n\tpublic offPrivate<Key extends keyof this[\"_privateSettings\"]>(key: Key, callback?: (value: this[\"_privateSettings\"][Key], target?: this, key?: Key) => void): void {\n\t\tlet events = this._privateSettingEvents[key];\n\t\tif (events !== undefined && callback !== undefined) {\n\t\t\t$array.removeFirst(events, callback);\n\t\t}\n\t\telse {\n\t\t\tdelete this._privateSettingEvents[key];\n\t\t}\n\t}\n\n/**\n\t * @ignore\n\t */\n\tpublic getRaw<Key extends keyof this[\"_settings\"], F>(key: Key, fallback: F): NonNullable<this[\"_settings\"][Key]> | F;\n\n\t/**\n\t * @ignore\n\t */\n\tpublic getRaw<Key extends keyof this[\"_settings\"]>(key: Key): this[\"_settings\"][Key];\n\n\t/**\n\t * @ignore\n\t */\n\tpublic getRaw<Key extends keyof this[\"_settings\"]>(key: Key, fallback?: any): any {\n\t\tconst value = (<any>this._settings)[key];\n\n\t\tif (value !== undefined) {\n\t\t\treturn value;\n\n\t\t} else {\n\t\t\treturn fallback;\n\t\t}\n\t}\n\n\t/**\n\t * Returns `true` if the setting exists.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/settings/} for more info\n\t * @param key Settings key\n\t * @return {boolean} Key exists\n\t */\n\tpublic has<Key extends keyof this[\"_settings\"]>(key: Key): boolean {\n\t\treturn key in this._settings;\n\t}\n\n\t/**\n\t * Returns settings value for the specified `key`.\n\t *\n\t * If there is no value, `fallback` is returned instead (if set).\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/settings/} for more info\n\t * @param key Settings value\n\t * @param callback Fallback value\n\t * @return {any} Value\n\t */\n\tpublic get<Key extends keyof this[\"_settings\"], F>(key: Key, fallback: F): NonNullable<this[\"_settings\"][Key]> | F;\n\tpublic get<Key extends keyof this[\"_settings\"]>(key: Key): this[\"_settings\"][Key];\n\tpublic get<Key extends keyof this[\"_settings\"]>(key: Key, fallback?: any): any {\n\t\treturn this.getRaw(key, fallback);\n\t}\n\n\tprotected _sendKeyEvent<Key extends keyof this[\"_settings\"], Value extends this[\"_settings\"][Key]>(key: Key, value: Value): void {\n\t\tconst events = this._settingEvents[key];\n\n\t\tif (events !== undefined) {\n\t\t\t$array.each(events!, (callback) => {\n\t\t\t\tcallback(value, this, key);\n\t\t\t});\n\t\t}\n\t}\n\n\tprotected _sendPrivateKeyEvent<Key extends keyof this[\"_settings\"], Value extends this[\"_settings\"][Key]>(key: Key, value: Value): void {\n\t\tconst events = this._privateSettingEvents[key];\n\n\t\tif (events !== undefined) {\n\t\t\t$array.each(events!, (callback) => {\n\t\t\t\tcallback(value, this, key);\n\t\t\t});\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tprivate _setRaw<Key extends keyof this[\"_settings\"], Value extends this[\"_settings\"][Key]>(key: Key, old: Value, value: Value) {\n\t\tthis._prevSettings[key] = old;\n\t\tthis._sendKeyEvent(key, value);\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic setRaw<Key extends keyof this[\"_settings\"], Value extends this[\"_settings\"][Key]>(key: Key, value: Value) {\n\t\tconst old = (<any>this._settings)[key];\n\n\t\t(<any>this._settings)[key] = value;\n\n\t\tif (old !== value) {\n\t\t\tthis._setRaw(key, old, value);\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tprivate _set<Key extends keyof this[\"_settings\"]>(key: Key, value: this[\"_settings\"][Key]) {\n\t\tconst old = (<any>this._settings)[key];\n\n\t\t(<any>this._settings)[key] = value;\n\n\t\tif (old !== value) {\n\t\t\tthis._setRaw(key, old, value);\n\t\t\tthis._markDirtyKey(key);\n\t\t}\n\t}\n\n\n\tprotected _stopAnimation<Key extends keyof this[\"_settings\"]>(key: Key): void {\n\t\tconst animation = this._animatingSettings[key];\n\n\t\tif (animation) {\n\t\t\tdelete this._animatingSettings[key];\n\t\t\tanimation.stop();\n\t\t}\n\t}\n\n\t/**\n\t * Sets a setting `value` for the specified `key`, and returns the same `value`.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/settings/} for more info\n\t * @param key Setting key\n\t * @param value Setting value\n\t * @return Setting value\n\t */\n\tpublic set<Key extends keyof this[\"_settings\"], Value extends this[\"_settings\"][Key]>(key: Key, value: Value): Value {\n\t\tthis._set(key, value);\n\t\tthis._stopAnimation(key);\n\t\treturn value;\n\t}\n\n\t/**\n\t * Removes a setting value for the specified `key`;\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/settings/} for more info\n\t * @param key Setting key\n\t */\n\tpublic remove<Key extends keyof this[\"_settings\"]>(key: Key): void {\n\t\tif (key in this._settings) {\n\t\t\tthis._prevSettings[key] = (<any>this._settings)[key];\n\n\t\t\tdelete (<any>this._settings)[key];\n\n\t\t\tthis._sendKeyEvent(key, undefined as any);\n\t\t\tthis._markDirtyKey(key);\n\t\t}\n\n\t\tthis._stopAnimation(key);\n\t}\n\n\t/**\n\t * Removes all keys;\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/settings/} for more info\n\t */\n\tpublic removeAll(): void {\n\t\t$array.each($object.keys(this._settings), (key) => {\n\t\t\tthis.remove(key);\n\t\t});\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic getPrivate<Key extends keyof this[\"_privateSettings\"], F>(key: Key, fallback: F): NonNullable<this[\"_privateSettings\"][Key]> | F;\n\n\t/**\n\t * @ignore\n\t */\n\tpublic getPrivate<Key extends keyof this[\"_privateSettings\"]>(key: Key): this[\"_privateSettings\"][Key];\n\n\t/**\n\t * Returns a value of a private setting.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/settings/#Private_settings} for more info\n\t */\n\tpublic getPrivate<Key extends keyof this[\"_privateSettings\"]>(key: Key, fallback?: any): any {\n\t\tconst value = (<any>this._privateSettings)[key];\n\n\t\tif (value !== undefined) {\n\t\t\treturn value;\n\n\t\t} else {\n\t\t\treturn fallback;\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tprivate _setPrivateRaw<Key extends keyof this[\"_privateSettings\"], Value extends this[\"_privateSettings\"][Key]>(key: Key, old: Value, value: Value) {\n\t\tthis._prevPrivateSettings[key] = old;\n\t\tthis._sendPrivateKeyEvent(key, value);\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic setPrivateRaw<Key extends keyof this[\"_privateSettings\"], Value extends this[\"_privateSettings\"][Key]>(key: Key, value: Value) {\n\t\tconst old = (<any>this._privateSettings)[key];\n\n\t\t(<any>this._privateSettings)[key] = value;\n\n\t\tif (old !== value) {\n\t\t\tthis._setPrivateRaw(key, old, value);\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tprivate _setPrivate<Key extends keyof this[\"_privateSettings\"]>(key: Key, value: this[\"_privateSettings\"][Key]) {\n\t\tconst old = (<any>this._privateSettings)[key];\n\n\t\t(<any>this._privateSettings)[key] = value;\n\n\t\tif (old !== value) {\n\t\t\tthis._setPrivateRaw(key, old, value);\n\t\t\tthis._markDirtyPrivateKey(key);\n\t\t}\n\t}\n\n\tprotected _stopAnimationPrivate<Key extends keyof this[\"_privateSettings\"]>(key: Key): void {\n\t\tconst animation = this._animatingPrivateSettings[key];\n\n\t\tif (animation) {\n\t\t\tanimation.stop();\n\t\t\tdelete this._animatingPrivateSettings[key];\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic setPrivate<Key extends keyof this[\"_privateSettings\"], Value extends this[\"_privateSettings\"][Key]>(key: Key, value: Value): Value {\n\t\tthis._setPrivate(key, value);\n\t\tthis._stopAnimationPrivate(key);\n\t\treturn value;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic removePrivate<Key extends keyof this[\"_privateSettings\"]>(key: Key): void {\n\t\tif (key in this._privateSettings) {\n\t\t\tthis._prevPrivateSettings[key] = (<any>this._privateSettings)[key];\n\n\t\t\tdelete (<any>this._privateSettings)[key];\n\n\t\t\tthis._markDirtyPrivateKey(key);\n\t\t}\n\n\t\tthis._stopAnimationPrivate(key);\n\t}\n\n\t/**\n\t * Sets multiple settings at once.\n\t *\n\t * `settings` must be an object with key: value pairs.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/settings/} for more info\n\t * @param settings Settings\n\t */\n\tpublic setAll(settings: Partial<this[\"_settings\"]>) {\n\t\t$object.each(settings, (key, value) => {\n\t\t\tthis.set(key, value);\n\t\t});\n\t}\n\n\t/**\n\t * Animates setting values from current/start values to new ones.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/animations/#Animating_settings} for more info\n\t * @param options Animation options\n\t * @return Animation object\n\t */\n\tpublic animate<Key extends keyof this[\"_settings\"]>(options: AnimationOptions<Key, this[\"_settings\"][Key]>): Animation<this[\"_settings\"][Key]> {\n\t\tconst key = options.key;\n\t\tconst to = options.to;\n\t\tconst duration = options.duration || 0;\n\t\tconst loops = options.loops || 1;\n\n\t\tconst from = (options.from === undefined ? this.get(key) : options.from);\n\t\tconst easing = (options.easing === undefined ? $ease.linear : options.easing);\n\n\t\tif (duration === 0) {\n\t\t\tthis.set(key, to);\n\n\t\t} else {\n\t\t\tif (from === undefined || from === to) {\n\t\t\t\tthis.set(key, to);\n\n\t\t\t} else {\n\t\t\t\tthis.set(key, from);\n\n\t\t\t\tconst animation = this._animatingSettings[key] = new Animation(this, from, to, duration, easing, loops, this._animationTime());\n\n\t\t\t\tthis._startAnimation();\n\n\t\t\t\treturn animation;\n\t\t\t}\n\t\t}\n\n\t\tconst animation = new Animation(this, from, to, duration, easing, loops, null);\n\t\tanimation.stop();\n\t\treturn animation;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic animatePrivate<Key extends keyof this[\"_privateSettings\"]>(options: AnimationOptions<Key, this[\"_privateSettings\"][Key]>): Animation<this[\"_privateSettings\"][Key]> {\n\t\tconst key = options.key;\n\t\tconst to = options.to;\n\t\tconst duration = options.duration || 0;\n\t\tconst loops = options.loops || 1;\n\n\t\tconst from = (options.from === undefined ? this.getPrivate(key) : options.from);\n\t\tconst easing = (options.easing === undefined ? $ease.linear : options.easing);\n\n\t\tif (duration === 0) {\n\t\t\tthis.setPrivate(key, to);\n\n\t\t} else {\n\t\t\tif (from === undefined || from === to) {\n\t\t\t\tthis.setPrivate(key, to);\n\n\t\t\t} else {\n\t\t\t\tthis.setPrivate(key, from);\n\n\t\t\t\tconst animation = this._animatingPrivateSettings[key] = new Animation(this, from, to, duration, easing, loops, this._animationTime());\n\n\t\t\t\tthis._startAnimation();\n\n\t\t\t\treturn animation;\n\t\t\t}\n\t\t}\n\n\t\tconst animation = new Animation(this, from, to, duration, easing, loops, null);\n\t\tanimation.stop();\n\t\treturn animation;\n\t}\n\n\tprotected _dispose() {}\n\n\t/**\n\t * Returns `true` if this element is disposed.\n\t *\n\t * @return Disposed\n\t */\n\tpublic isDisposed(): boolean {\n\t\treturn this._disposed;\n\t}\n\n\t/**\n\t * Disposes this object.\n\t */\n\tpublic dispose() {\n\t\tif (this.enableDispose && !this._disposed) {\n\t\t\tthis._disposed = true;\n\t\t\tthis._dispose();\n\t\t}\n\t}\n}\n\n/**\n * Base class.\n *\n * @important\n */\nexport class Entity extends Settings implements IDisposer {\n\tpublic _root: Root;\n\n\tpublic _user_id:any; // for testing purposes\n\n\tdeclare public _settings: IEntitySettings;\n\tdeclare public _privateSettings: IEntityPrivate;\n\tdeclare public _events: IEntityEvents;\n\n\tpublic states: States<this> = new States(this);\n\tpublic adapters: Adapters<this> = new Adapters(this);\n\tpublic events: EventDispatcher<Events<this, this[\"_events\"]>> = this._createEvents();\n\n\tprotected _userPrivateProperties: Dirty<this[\"_privateSettings\"]> = {};\n\n\tpublic _dirty: Dirty<this[\"_settings\"]> = {};\n\tpublic _dirtyPrivate: Dirty<this[\"_privateSettings\"]> = {};\n\n\tprotected _template: Template<this> | undefined;\n\n\t// Templates for the themes\n\tprotected _templates: Array<Template<this>> = [];\n\n\t// Internal templates which can be overridden by the user's templates\n\tprotected _internalTemplates: Array<Template<this>>;\n\n\t// Default themes which can be overridden by the user's themes\n\tpublic _defaultThemes: Array<Theme> = [];\n\n\t// Disposers for all of the templates\n\tprotected _templateDisposers: Array<IDisposer> = [];\n\n\tprotected _disposers: Array<IDisposer> = [];\n\n\t// Whether the template setup function should be run\n\tprotected _runSetup: boolean = true;\n\n\tpublic static className: string = \"Entity\";\n\tpublic static classNames: Array<string> = [\"Entity\"];\n\n\tprotected _disposerProperties: { [Key in keyof this[\"_settings\"]]?: Array<IDisposer> } = {};\n\n\t/**\n\t * IMPORTANT! Do not instantiate this class via `new Class()` syntax.\n\t *\n\t * Use static method `Class.new()` instead.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/getting-started/#New_element_syntax} for more info\n\t * @ignore\n\t */\n\tconstructor(root: Root, settings: Entity[\"_settings\"], isReal: boolean, templates: Array<Template<Entity>> = []) {\n\t\tsuper(settings);\n\t\tif (!isReal) {\n\t\t\tthrow new Error(\"You cannot use `new Class()`, instead use `Class.new()`\");\n\t\t}\n\t\tthis._root = root;\n\t\tthis._internalTemplates = templates as Array<Template<this>>;\n\n\t\tif (settings.id) {\n\t\t\tthis._registerId(settings.id);\n\t\t}\n\t}\n\n\t/**\n\t * Use this method to create an instance of this class.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/getting-started/#New_element_syntax} for more info\n\t * @param root Root element\n\t * @param settings Settings\n\t * @param template Template\n\t * @return Instantiated object\n\t */\n\tstatic new<C extends typeof Entity, T extends InstanceType<C>>(this: C, root: Root, settings: T[\"_settings\"], template?: Template<T>): T {\n\t\tconst x = (new this(root, settings, true)) as T;\n\t\tx._template = template;\n\t\tx._afterNew();\n\t\treturn x;\n\t}\n\n\tstatic _new<C extends typeof Entity, T extends InstanceType<C>>(this: C, root: Root, settings: T[\"_settings\"], templates: Array<Template<T>> = []): T {\n\t\tconst x = (new this(root, settings, true, templates)) as T;\n\t\tx._afterNew();\n\t\treturn x;\n\t}\n\n\tprotected _afterNew() {\n\t\tthis._checkDirty();\n\n\t\tlet shouldApply = false;\n\n\t\tconst template = this._template;\n\n\t\tif (template) {\n\t\t\tshouldApply = true;\n\t\t\ttemplate._setObjectTemplate(this);\n\t\t}\n\n\t\t$array.each(this._internalTemplates, (template) => {\n\t\t\tshouldApply = true;\n\t\t\ttemplate._setObjectTemplate(this);\n\t\t});\n\n\t\tif (shouldApply) {\n\t\t\tthis._applyTemplates(false);\n\t\t}\n\n\t\tthis.states.create(\"default\", {});\n\n\t\tthis._setDefaults();\n\t}\n\n\t// This is the same as _afterNew, except it also applies the themes.\n\t// This should only be used for classes which don't have a parent (because they extend from Entity and not Sprite).\n\tprotected _afterNewApplyThemes() {\n\t\tthis._checkDirty();\n\n\t\tconst template = this._template;\n\n\t\tif (template) {\n\t\t\ttemplate._setObjectTemplate(this);\n\t\t}\n\n\t\t$array.each(this._internalTemplates, (template) => {\n\t\t\ttemplate._setObjectTemplate(this);\n\t\t});\n\n\t\tthis.states.create(\"default\", {});\n\n\t\tthis._setDefaults();\n\n\t\tthis._applyThemes();\n\t}\n\n\tprotected _createEvents(): EventDispatcher<Events<this, this[\"_events\"]>> {\n\t\treturn new EventDispatcher();\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic get classNames(): Array<string> {\n\t\treturn (this.constructor as any).classNames;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic get className(): string {\n\t\treturn (this.constructor as any).className;\n\t}\n\n\tprotected _setDefaults(){\n\n\t}\n\n\tpublic _setDefaultFn<Key extends keyof this[\"_settings\"], Value extends this[\"_settings\"][Key]>(key: Key, f: () => Value): NonNullable<this[\"_settings\"][Key]> | Value {\n\t\tconst value = this.get(key);\n\n\t\tif (value) {\n\t\t\treturn value as any;\n\n\t\t} else {\n\t\t\tconst value = f();\n\t\t\tthis.set(key, value);\n\t\t\treturn value;\n\t\t}\n\t}\n\n\tpublic _setDefault<Key extends keyof this[\"_settings\"]>(key: Key, value: this[\"_settings\"][Key]) {\n\t\tif (!this.has(key)) {\n\t\t\tsuper.set(key, value);\n\t\t}\n\t}\n\n\tpublic _setRawDefault<Key extends keyof this[\"_settings\"]>(key: Key, value: this[\"_settings\"][Key]) {\n\t\tif (!this.has(key)) {\n\t\t\tsuper.setRaw(key, value);\n\t\t}\n\t}\n\n\tpublic _clearDirty() {\n\t\t$object.keys(this._dirty).forEach((key) => {\n\t\t\tthis._dirty[key] = false;\n\t\t});\n\n\t\t$object.keys(this._dirtyPrivate).forEach((key) => {\n\t\t\tthis._dirtyPrivate[key] = false;\n\t\t});\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic isDirty<Key extends keyof this[\"_settings\"]>(key: Key): boolean {\n\t\treturn !!this._dirty[key];\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic isPrivateDirty<Key extends keyof this[\"_privateSettings\"]>(key: Key): boolean {\n\t\treturn !!this._dirtyPrivate[key];\n\t}\n\n\tpublic _markDirtyKey<Key extends keyof this[\"_settings\"]>(key: Key) {\n\t\tthis._dirty[key] = true;\n\t\tsuper._markDirtyKey(key);\n\t}\n\n\tpublic _markDirtyPrivateKey<Key extends keyof this[\"_privateSettings\"]>(key: Key) {\n\t\tthis._dirtyPrivate[key] = true;\n\t\tsuper._markDirtyKey(key);\n\t}\n\n\t/**\n\t * Checks if element is of certain class (or inherits one).\n\t *\n\t * @param type Class name to check\n\t * @return {boolean} Is of class?\n\t */\n\tpublic isType<A>(type: string): this is A {\n\t\treturn this.classNames.indexOf(type) !== -1;\n\t}\n\n\tprotected _pushPropertyDisposer<Key extends keyof this[\"_settings\"], D extends IDisposer>(key: Key, disposer: D): D {\n\t\tlet disposers = this._disposerProperties[key];\n\n\t\tif (disposers === undefined) {\n\t\t\tdisposers = this._disposerProperties[key] = [];\n\t\t}\n\n\t\tdisposers.push(disposer);\n\n\t\treturn disposer;\n\t}\n\n\tprotected _disposeProperty<Key extends keyof this[\"_settings\"]>(key: Key): void {\n\t\tconst disposers = this._disposerProperties[key];\n\n\t\tif (disposers !== undefined) {\n\t\t\t$array.each(disposers!, (disposer) => {\n\t\t\t\tdisposer.dispose();\n\t\t\t});\n\n\t\t\tdelete this._disposerProperties[key];\n\t\t}\n\t}\n\n\t/**\n\t * @todo needs description\n\t * @param value Template\n\t */\n\tpublic set template(value: Template<this> | undefined) {\n\t\tconst template = this._template;\n\n\t\tif (template !== value) {\n\t\t\tthis._template = value;\n\n\t\t\tif (template) {\n\t\t\t\ttemplate._removeObjectTemplate(this);\n\t\t\t}\n\n\t\t\tif (value) {\n\t\t\t\tvalue._setObjectTemplate(this);\n\t\t\t}\n\n\t\t\tthis._applyTemplates();\n\t\t}\n\t}\n\n\tpublic get template(): Template<this> | undefined {\n\t\treturn this._template;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic markDirty() {\n\t\tthis._root._addDirtyEntity(this);\n\t}\n\n\tpublic _startAnimation(): void {\n\t\tthis._root._addAnimation(this);\n\t}\n\n\tprotected _animationTime(): number | null {\n\t\treturn this._root.animationTime;\n\t}\n\n\tpublic _applyState(_name: string): void { }\n\tpublic _applyStateAnimated(_name: string, _duration?: number): void { }\n\n\t/**\n\t * Returns settings value for the specified `key`.\n\t *\n\t * If there is no value, `fallback` is returned instead (if set).\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/settings/} for more info\n\t * @param key Settings value\n\t * @param callback Fallback value\n\t * @return Value\n\t */\n\tpublic get<Key extends keyof this[\"_settings\"], F>(key: Key, fallback: F): NonNullable<this[\"_settings\"][Key]> | F;\n\tpublic get<Key extends keyof this[\"_settings\"]>(key: Key): this[\"_settings\"][Key];\n\tpublic get<Key extends keyof this[\"_settings\"]>(key: Key, fallback?: any): any {\n\t\tconst value = this.adapters.fold(key, (<any>this._settings)[key]);\n\n\t\tif (value !== undefined) {\n\t\t\treturn value;\n\n\t\t} else {\n\t\t\treturn fallback;\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic isUserSetting<Key extends keyof this[\"_settings\"]>(key: Key): boolean {\n\t\treturn this._userProperties[key] || false;\n\t}\n\n\t/**\n\t * Sets a setting `value` for the specified `key`, and returns the same `value`.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/settings/} for more info\n\t * @param key Setting key\n\t * @param value Setting value\n\t * @return Setting value\n\t */\n\tpublic set<Key extends keyof this[\"_settings\"], Value extends this[\"_settings\"][Key]>(key: Key, value: Value): Value {\n\t\tthis._userProperties[key] = true;\n\t\treturn super.set(key, value);\n\t}\n\n\n\t/**\n\t * @ignore\n\t */\n\tpublic setRaw<Key extends keyof this[\"_settings\"], Value extends this[\"_settings\"][Key]>(key: Key, value: Value) {\n\t\tthis._userProperties[key] = true;\n\t\tsuper.setRaw(key, value);\n\t}\n\n\t/**\n\t * Sets a setting `value` for the specified `key` only if the value for this key was not set previously using set method, and returns the same `value`.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/settings/} for more info\n\t * @param key Setting key\n\t * @param value Setting value\n\t * @return Setting value\n\t */\n\tpublic _setSoft<Key extends keyof this[\"_settings\"], Value extends this[\"_settings\"][Key]>(key: Key, value: Value): Value {\n\t\tif(!this._userProperties[key]){\n\t\t\treturn super.set(key, value);\n\t\t}\n\t\treturn value;\n\t}\n\n\t/**\n\t * Removes a setting value for the specified `key`.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/settings/} for more info\n\t * @param key Setting key\n\t */\n\tpublic remove<Key extends keyof this[\"_settings\"]>(key: Key) {\n\t\tdelete this._userProperties[key];\n\t\tthis._removeTemplateProperty(key);\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic setPrivate<Key extends keyof this[\"_privateSettings\"], Value extends this[\"_privateSettings\"][Key]>(key: Key, value: Value): Value {\n\t\tthis._userPrivateProperties[key] = true;\n\t\treturn super.setPrivate(key, value);\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic setPrivateRaw<Key extends keyof this[\"_privateSettings\"], Value extends this[\"_privateSettings\"][Key]>(key: Key, value: Value) {\n\t\tthis._userPrivateProperties[key] = true;\n\t\tsuper.setPrivateRaw(key, value);\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic removePrivate<Key extends keyof this[\"_privateSettings\"]>(key: Key) {\n\t\tdelete this._userPrivateProperties[key];\n\t\tthis._removeTemplatePrivateProperty(key);\n\t}\n\n\tpublic _setTemplateProperty<Key extends keyof this[\"_settings\"]>(template: Template<this>, key: Key, value: this[\"_settings\"][Key]) {\n\t\tif (!this._userProperties[key]) {\n\t\t\tconst match = this._findTemplateByKey(key);\n\n\t\t\tif (template === match) {\n\t\t\t\tsuper.set(key, value);\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic _setTemplatePrivateProperty<Key extends keyof this[\"_privateSettings\"]>(template: Template<this>, key: Key, value: this[\"_privateSettings\"][Key]) {\n\t\tif (!this._userPrivateProperties[key]) {\n\t\t\tconst match = this._findTemplateByPrivateKey(key);\n\n\t\t\tif (template === match) {\n\t\t\t\tsuper.setPrivate(key, value);\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic _removeTemplateProperty<Key extends keyof this[\"_settings\"]>(key: Key) {\n\t\tif (!this._userProperties[key]) {\n\t\t\tconst match = this._findTemplateByKey(key);\n\n\t\t\tif (match) {\n\t\t\t\t// TODO don't stop the animation if the property didn't change\n\t\t\t\tsuper.set(key, match._settings[key]!);\n\n\t\t\t} else {\n\t\t\t\tsuper.remove(key);\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic _removeTemplatePrivateProperty<Key extends keyof this[\"_privateSettings\"]>(key: Key) {\n\t\tif (!this._userPrivateProperties[key]) {\n\t\t\tconst match = this._findTemplateByPrivateKey(key);\n\n\t\t\tif (match) {\n\t\t\t\t// TODO don't stop the animation if the property didn't change\n\t\t\t\tsuper.setPrivate(key, match._privateSettings[key]);\n\n\t\t\t} else {\n\t\t\t\tsuper.removePrivate(key);\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic _walkParents(f: (parent: Entity) => void): void {\n\t\tf(this._root._rootContainer);\n\t\tf(this);\n\t}\n\n\t// TODO faster version of this method which is specialized to just 1 key\n\tpublic _applyStateByKey(name: string): void {\n\t\tconst other = this.states.create(name, {});\n\t\tconst seen: Dirty<this[\"_settings\"]> = {};\n\n\t\tthis._eachTemplate((template) => {\n\t\t\tconst state = template.states.lookup(name);\n\n\t\t\tif (state) {\n\t\t\t\tstate._apply(other, seen);\n\t\t\t}\n\t\t});\n\n\t\t$object.each(other._settings, (key) => {\n\t\t\tif (!seen[key] && !other._userSettings[key]) {\n\t\t\t\tother.remove(key);\n\t\t\t}\n\t\t});\n\t}\n\n\tprotected _applyTemplate(template: Template<this>, state: ApplyState<this>): void {\n\t\tthis._templateDisposers.push(template._apply(this, state));\n\n\t\t$object.each(template._settings, (key, value) => {\n\t\t\tif (!state.settings[key] && !this._userProperties[key]) {\n\t\t\t\tstate.settings[key] = true;\n\t\t\t\tsuper.set(key, value);\n\t\t\t}\n\t\t});\n\n\t\t$object.each(template._privateSettings, (key, value) => {\n\t\t\tif (!state.privateSettings[key] && !this._userPrivateProperties[key]) {\n\t\t\t\tstate.privateSettings[key] = true;\n\t\t\t\tsuper.setPrivate(key, value);\n\t\t\t}\n\t\t});\n\n\t\tif (this._runSetup && template.setup) {\n\t\t\tthis._runSetup = false;\n\t\t\ttemplate.setup(this);\n\t\t}\n\t}\n\n\t/**\n\t * Calls the closure with each template and returns the first template which is true\n\t */\n\tprotected _findStaticTemplate(f: (template: Template<this>) => boolean): Template<this> | undefined {\n\t\tif (this._template) {\n\t\t\tif (f(this._template)) {\n\t\t\t\treturn this._template;\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic _eachTemplate(f: (template: Template<this>) => void): void {\n\t\tthis._findStaticTemplate((template) => {\n\t\t\tf(template);\n\t\t\treturn false;\n\t\t});\n\n\t\t// _internalTemplates is sorted with most specific to the right\n\t\t$array.eachReverse(this._internalTemplates, f);\n\n\t\t// _templates is sorted with most specific to the left\n\t\t$array.each(this._templates, f);\n\t}\n\n\tpublic _applyTemplates(remove: boolean = true): void {\n\t\tif (remove) {\n\t\t\tthis._disposeTemplates();\n\t\t}\n\n\t\tconst state: ApplyState<this> = {\n\t\t\tsettings: {},\n\t\t\tprivateSettings: {},\n\t\t\tstates: {},\n\t\t};\n\n\t\tthis._eachTemplate((template) => {\n\t\t\tthis._applyTemplate(template, state);\n\t\t});\n\n\t\tif (remove) {\n\t\t\t$object.each(this._settings, (key) => {\n\t\t\t\tif (!this._userProperties[key] && !state.settings[key]) {\n\t\t\t\t\tsuper.remove(key);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t$object.each(this._privateSettings, (key) => {\n\t\t\t\tif (!this._userPrivateProperties[key] && !state.privateSettings[key]) {\n\t\t\t\t\tsuper.removePrivate(key);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tprotected _findTemplate(f: (template: Template<this>) => boolean): Template<this> | undefined {\n\t\tconst value = this._findStaticTemplate(f);\n\n\t\tif (value === undefined) {\n\t\t\t// _internalTemplates is sorted with most specific to the right\n\t\t\tconst value = $array.findReverse(this._internalTemplates, f);\n\n\t\t\tif (value === undefined) {\n\t\t\t\t// _templates is sorted with most specific to the left\n\t\t\t\treturn $array.find(this._templates, f);\n\n\t\t\t} else {\n\t\t\t\treturn value;\n\t\t\t}\n\n\t\t} else {\n\t\t\treturn value;\n\t\t}\n\t}\n\n\tprotected _findTemplateByKey<Key extends keyof this[\"_settings\"]>(key: Key): Template<this> | undefined {\n\t\treturn this._findTemplate((template) => {\n\t\t\treturn key in template._settings;\n\t\t});\n\t}\n\n\tprotected _findTemplateByPrivateKey<Key extends keyof this[\"_privateSettings\"]>(key: Key): Template<this> | undefined {\n\t\treturn this._findTemplate((template) => {\n\t\t\treturn key in template._privateSettings;\n\t\t});\n\t}\n\n\tprotected _disposeTemplates() {\n\t\t$array.each(this._templateDisposers, (disposer) => {\n\t\t\tdisposer.dispose();\n\t\t});\n\n\t\tthis._templateDisposers.length = 0;\n\t}\n\n\tprotected _removeTemplates() {\n\t\t$array.each(this._templates, (template) => {\n\t\t\ttemplate._removeObjectTemplate(this);\n\t\t});\n\n\t\tthis._templates.length = 0;\n\t}\n\n\tpublic _applyThemes(force: boolean = false): boolean {\n\t\tlet isConnected = false;\n\n\t\tconst defaults: Array<Array<Theme>> = [];\n\n\t\tlet themes: Array<Array<Theme>> = [];\n\n\t\tconst themeTags: Set<string> = new Set();\n\n\t\tconst tags = this.get(\"themeTagsSelf\");\n\n\t\tif (tags) {\n\t\t\t$array.each(tags, (tag) => {\n\t\t\t\tthemeTags.add(tag);\n\t\t\t});\n\t\t}\n\n\t\tthis._walkParents((entity) => {\n\t\t\tif (entity === this._root._rootContainer) {\n\t\t\t\tisConnected = true;\n\t\t\t}\n\n\t\t\tif (entity._defaultThemes.length > 0) {\n\t\t\t\tdefaults.push(entity._defaultThemes);\n\t\t\t}\n\n\t\t\tconst theme = entity.get(\"themes\");\n\n\t\t\tif (theme) {\n\t\t\t\tthemes.push(theme);\n\t\t\t}\n\n\t\t\tconst tags = entity.get(\"themeTags\");\n\n\t\t\tif (tags) {\n\t\t\t\t$array.each(tags, (tag) => {\n\t\t\t\t\tthemeTags.add(tag);\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\n\t\tthemes = defaults.concat(themes);\n\n\t\tthis._removeTemplates();\n\n\t\tif (isConnected || force) {\n\t\t\t$array.eachReverse(this.classNames, (name) => {\n\t\t\t\tconst allRules: Array<IRule<this>> = [];\n\n\t\t\t\t$array.each(themes, (themes) => {\n\t\t\t\t\t$array.each(themes, (theme) => {\n\t\t\t\t\t\tconst rules = theme._lookupRules<this>(name);\n\n\t\t\t\t\t\tif (rules) {\n\t\t\t\t\t\t\t$array.eachReverse(rules, (rule) => {\n\t\t\t\t\t\t\t\tconst matches = rule.tags.every((tag) => {\n\t\t\t\t\t\t\t\t\treturn themeTags.has(tag);\n\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\tif (matches) {\n\t\t\t\t\t\t\t\t\tconst result = $array.getFirstSortedIndex(allRules, (x) => {\n\t\t\t\t\t\t\t\t\t\tconst order = $order.compare(rule.tags.length, x.tags.length);\n\n\t\t\t\t\t\t\t\t\t\tif (order === 0) {\n\t\t\t\t\t\t\t\t\t\t\treturn $order.compareArray(rule.tags, x.tags, $order.compare);\n\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\treturn order;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t\tallRules.splice(result.index, 0, rule);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t});\n\n\t\t\t\t$array.each(allRules, (rule) => {\n\t\t\t\t\tthis._templates.push(rule.template);\n\t\t\t\t\trule.template._setObjectTemplate(this);\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\n\t\tthis._applyTemplates();\n\n\t\tif (isConnected || force) {\n\t\t\t// This causes it to only run the setup function the first time that the themes are applied\n\t\t\tthis._runSetup = false;\n\t\t}\n\n\t\treturn isConnected || force;\n\t}\n\n\tpublic _changed(): void { }\n\n\tpublic _beforeChanged(): void {\n\n\t\tif (this.isDirty(\"id\")) {\n\t\t\tconst id = this.get(\"id\")!;\n\t\t\tif (id) {\n\t\t\t\tthis._registerId(id);\n\t\t\t}\n\n\t\t\tconst prevId = this._prevSettings.id;\n\t\t\tif(prevId) {\n\t\t\t\tdelete registry.entitiesById[prevId];\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate _registerId(id: string): void {\n\t\tif (registry.entitiesById[id] && registry.entitiesById[id] !== this) {\n\t\t\tthrow new Error(\"An entity with id \\\"\" + id + \"\\\" already exists.\");\n\t\t}\n\t\tregistry.entitiesById[id] = this;\n\t}\n\n\tpublic _afterChanged(): void { }\n\n\t/**\n\t * @ignore\n\t */\n\tpublic addDisposer<T extends IDisposer>(disposer: T): T {\n\t\tthis._disposers.push(disposer);\n\t\treturn disposer;\n\t}\n\n\tprotected _dispose() {\n\t\tsuper._dispose();\n\n\t\tconst template = this._template;\n\n\t\tif (template) {\n\t\t\ttemplate._removeObjectTemplate(this);\n\t\t}\n\n\t\t$array.each(this._internalTemplates, (template) => {\n\t\t\ttemplate._removeObjectTemplate(this);\n\t\t});\n\n\t\tthis._removeTemplates();\n\t\tthis._disposeTemplates();\n\n\t\tthis.events.dispose();\n\n\t\tthis._disposers.forEach((x) => {\n\t\t\tx.dispose();\n\t\t});\n\n\t\t$object.each(this._disposerProperties, (_, disposers) => {\n\t\t\t$array.each(disposers, (disposer) => {\n\t\t\t\tdisposer.dispose();\n\t\t\t});\n\t\t});\n\n\t\tconst id = this.get(\"id\")!;\n\t\tif (id) {\n\t\t\tdelete registry.entitiesById[id];\n\t\t}\n\t}\n\n\t/**\n\t * Creates and returns a \"disposable\" timeout.\n\t *\n\t * @param fn Callback\n\t * @param delay Delay in milliseconds\n\t * @return Timeout disposer\n\t */\n\tpublic setTimeout(fn: () => void, delay: number): IDisposer {\n\t\tconst id = setTimeout(() => {\n\t\t\tthis.removeDispose(disposer);\n\t\t\tfn();\n\t\t}, delay);\n\n\t\tconst disposer = new Disposer(() => {\n\t\t\tclearTimeout(id);\n\t\t});\n\n\t\tthis._disposers.push(disposer);\n\t\treturn disposer;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic removeDispose(target: IDisposer): void {\n\t\tif (!this.isDisposed()) {\n\t\t\tlet index = $array.indexOf(this._disposers, target);\n\t\t\tif (index > -1) {\n\t\t\t\tthis._disposers.splice(index, 1);\n\t\t\t}\n\t\t}\n\n\t\ttarget.dispose();\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic hasTag(tag: string): boolean {\n\t\treturn $array.indexOf(this.get(\"themeTags\", []), tag) !== -1;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic addTag(tag: string): void {\n\t\tif (!this.hasTag(tag)) {\n\t\t\tconst tags = (<any>this).get(\"themeTags\", []);\n\t\t\ttags.push(tag);\n\t\t\tthis.set(\"themeTags\", tags);\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic removeTag(tag: string): void {\n\t\tif (this.hasTag(tag)) {\n\t\t\tconst tags = (<any>this).get(\"themeTags\", []);\n\t\t\t$array.remove(tags, tag);\n\t\t\tthis.set(\"themeTags\", tags);\n\t\t}\n\t}\n\n\tprotected _t(text: any, locale?: ILocale, ...rest: Array<string>){\n\t\treturn this._root.language.translate(text, locale, ...rest);\n\t}\n\n\t/**\n\t * An instance of [[Root]] object.\n\t *\n\t * @readonly\n\t * @since 5.0.6\n\t * @return Root object\n\t */\n\tpublic get root(): Root {\n\t\treturn this._root;\n\t}\n\n}\n","/**\n * Event Dispatcher module is used for registering listeners and dispatching\n * events across amCharts system.\n */\n\n/**\n * ============================================================================\n * IMPORTS\n * ============================================================================\n * @hidden\n */\nimport { Disposer, IDisposer, MultiDisposer } from \"./Disposer\";\nimport * as $array from \"./Array\";\nimport * as $type from \"./Type\";\n\n/**\n * @ignore\n */\nexport type Events<Target, T> = {\n\t[K in keyof T]: T[K] & { type: K, target: Target }\n};\n\n/**\n * A universal interface for event listeners.\n *\n * @ignore\n */\nexport interface EventListener {\n\tkilled: boolean;\n\tonce: boolean;\n\ttype: any | null;\n\tcallback: (event: any) => void;\n\tcontext: unknown;\n\tshouldClone: boolean;\n\tdispatch: (type: any, event: any) => void;\n\tdisposer: IDisposer;\n}\n\n/**\n * Universal Event Dispatcher.\n *\n * @see {@link https://www.amcharts.com/docs/v5/concepts/events/} for more info\n */\nexport class EventDispatcher<T> implements IDisposer {\n\tprotected _listeners: Array<EventListener>;\n\tprotected _killed: Array<EventListener>;\n\tprotected _disabled: { [key in keyof T]?: number };\n\tprotected _iterating: number;\n\tprotected _enabled: boolean;\n\tprotected _disposed: boolean;\n\n\n\t/**\n\t * Constructor\n\t */\n\tconstructor() {\n\t\tthis._listeners = [];\n\t\tthis._killed = [];\n\t\tthis._disabled = {};\n\t\tthis._iterating = 0;\n\t\tthis._enabled = true;\n\t\tthis._disposed = false;\n\t}\n\n\t/**\n\t * Returns if this object has been already disposed.\n\t *\n\t * @return Disposed?\n\t */\n\tpublic isDisposed(): boolean {\n\t\treturn this._disposed;\n\t}\n\n\t/**\n\t * Dispose (destroy) this object.\n\t */\n\tpublic dispose(): void {\n\t\tif (!this._disposed) {\n\t\t\tthis._disposed = true;\n\n\t\t\tconst a = this._listeners;\n\n\t\t\tthis._iterating = 1;\n\t\t\tthis._listeners = <any>null;\n\t\t\tthis._disabled = <any>null;\n\n\t\t\ttry {\n\t\t\t\t$array.each(a, (x) => {\n\t\t\t\t\tx.disposer.dispose();\n\t\t\t\t});\n\n\t\t\t} finally {\n\t\t\t\tthis._killed = <any>null;\n\t\t\t\tthis._iterating = <any>null;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Checks if this particular event dispatcher has any listeners set.\n\t *\n\t * @return Has listeners?\n\t */\n\tpublic hasListeners(): boolean {\n\t\treturn this._listeners.length !== 0;\n\t}\n\n\t/**\n\t * Checks if this particular event dispatcher has any particular listeners set.\n\t *\n\t * @return Has particular event listeners?\n\t */\n\tpublic hasListenersByType<Key extends keyof T>(type: Key): boolean {\n\t\treturn $array.any(this._listeners, (x) => (x.type === null || x.type === type) && !x.killed);\n\t}\n\n\t/**\n\t * Enable dispatching of events if they were previously disabled by\n\t * `disable()`.\n\t */\n\tpublic enable(): void {\n\t\tthis._enabled = true;\n\t}\n\n\t/**\n\t * Disable dispatching of events until re-enabled by `enable()`.\n\t */\n\tpublic disable(): void {\n\t\tthis._enabled = false;\n\t}\n\n\t/**\n\t * Enable dispatching particular event, if it was disabled before by\n\t * `disableType()`.\n\t *\n\t * @param type Event type\n\t */\n\tpublic enableType<Key extends keyof T>(type: Key): void {\n\t\tdelete this._disabled[type];\n\t}\n\n\t/**\n\t * Disable dispatching of events for a certain event type.\n\t *\n\t * Optionally, can set how many dispatches to skip before automatically\n\t * re-enabling the dispatching.\n\t *\n\t * @param type Event type\n\t * @param amount Number of event dispatches to skip\n\t */\n\tpublic disableType<Key extends keyof T>(type: Key, amount: number = Infinity): void {\n\t\tthis._disabled[type] = amount;\n\t}\n\n\t/**\n\t * Removes listener from dispatcher.\n\t *\n\t * Will throw an exception if such listener does not exists.\n\t *\n\t * @param listener Listener to remove\n\t */\n\tprotected _removeListener(listener: EventListener): void {\n\t\tif (this._iterating === 0) {\n\t\t\tconst index = this._listeners.indexOf(listener);\n\n\t\t\tif (index === -1) {\n\t\t\t\tthrow new Error(\"Invalid state: could not remove listener\");\n\t\t\t}\n\n\t\t\tthis._listeners.splice(index, 1);\n\n\t\t} else {\n\t\t\tthis._killed.push(listener);\n\t\t}\n\t}\n\n\t/**\n\t * Removes existing listener by certain parameters.\n\t *\n\t * @param once Listener's once setting\n\t * @param type Listener's type\n\t * @param callback Callback function\n\t * @param context Callback context\n\t */\n\tprotected _removeExistingListener<C, Key extends keyof T>(once: boolean, type: Key | null, callback?: (this: C, event: T[Key]) => void, context?: C): void {\n\t\tif (this._disposed) {\n\t\t\tthrow new Error(\"EventDispatcher is disposed\");\n\t\t}\n\n\t\tthis._eachListener((info) => {\n\t\t\tif (info.once === once && // TODO is this correct ?\n\t\t\t\tinfo.type === type &&\n\t\t\t\t(callback === undefined || info.callback === callback) &&\n\t\t\t\tinfo.context === context) {\n\t\t\t\tinfo.disposer.dispose();\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Checks if dispatching for particular event type is enabled.\n\t *\n\t * @param type Event type\n\t * @return Enabled?\n\t */\n\tpublic isEnabled<Key extends keyof T>(type: Key): boolean {\n\t\tif (this._disposed) {\n\t\t\tthrow new Error(\"EventDispatcher is disposed\");\n\t\t}\n\n\t\t// TODO is this check correct ?\n\t\treturn this._enabled && this._listeners.length > 0 && this.hasListenersByType(type) && this._disabled[type] === undefined;\n\t}\n\n\t/**\n\t * Removes all listeners of a particular event type\n\t *\n\t * @param type Listener's type\n\t */\n\tpublic removeType<Key extends keyof T>(type: Key): void {\n\t\tif (this._disposed) {\n\t\t\tthrow new Error(\"EventDispatcher is disposed\");\n\t\t}\n\n\t\tthis._eachListener((info) => {\n\t\t\tif (info.type === type) {\n\t\t\t\tinfo.disposer.dispose();\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Checks if there's already a listener with specific parameters.\n\t *\n\t * @param type Listener's type\n\t * @param callback Callback function\n\t * @param context Callback context\n\t * @return Has listener?\n\t */\n\tpublic has<C, Key extends keyof T>(type: Key, callback?: (this: C, event: T[Key]) => void, context?: C): boolean {\n\t\tconst index = $array.findIndex(this._listeners, (info) => {\n\t\t\treturn info.once !== true && // Ignoring \"once\" listeners\n\t\t\t\tinfo.type === type &&\n\t\t\t\t(callback === undefined || info.callback === callback) &&\n\t\t\t\tinfo.context === context;\n\t\t});\n\n\t\treturn index !== -1;\n\t}\n\n\t/**\n\t * Checks whether event of the particular type should be dispatched.\n\t *\n\t * @param type Event type\n\t * @return Dispatch?\n\t */\n\tprotected _shouldDispatch<Key extends keyof T>(type: Key): boolean {\n\t\tif (this._disposed) {\n\t\t\tthrow new Error(\"EventDispatcher is disposed\");\n\t\t}\n\n\t\tconst count = this._disabled[type];\n\n\t\tif (!$type.isNumber(count)) {\n\t\t\treturn this._enabled;\n\n\t\t} else {\n\t\t\tif (count <= 1) {\n\t\t\t\tdelete this._disabled[type];\n\n\t\t\t} else {\n\t\t\t\t--this._disabled[type]!;\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t/**\n\t * [_eachListener description]\n\t *\n\t * All of this extra code is needed when a listener is removed while iterating\n\t *\n\t * @todo Description\n\t * @param fn [description]\n\t */\n\tprotected _eachListener(fn: (listener: EventListener) => void): void {\n\t\t++this._iterating;\n\n\t\ttry {\n\t\t\t$array.each(this._listeners, fn);\n\n\t\t} finally {\n\t\t\t--this._iterating;\n\n\t\t\t// TODO should this be inside or outside the finally ?\n\t\t\tif (this._iterating === 0 && this._killed.length !== 0) {\n\t\t\t\t// Remove killed listeners\n\t\t\t\t$array.each(this._killed, (killed) => {\n\t\t\t\t\tthis._removeListener(killed);\n\t\t\t\t});\n\n\t\t\t\tthis._killed.length = 0;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Dispatches an event immediately without waiting for next cycle.\n\t *\n\t * @param type Event type\n\t * @param event Event object\n\t * @todo automatically add in type and target properties if they are missing\n\t */\n\tpublic dispatch<Key extends keyof T>(type: Key, event: T[Key]): void {\n\t\tif (this._shouldDispatch(type)) {\n\t\t\t// TODO check if it's faster to use an object of listeners rather than a single big array\n\t\t\t// TODO if the function throws, maybe it should keep going ?\n\t\t\tthis._eachListener((listener) => {\n\t\t\t\tif (!listener.killed && (listener.type === null || listener.type === type)) {\n\t\t\t\t\tlistener.dispatch(type, event);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\t/**\n\t * Shelves the event to be dispatched within next update cycle.\n\t *\n\t * @param type Event type\n\t * @param event Event object\n\t * @todo automatically add in type and target properties if they are missing\n\t */\n\t/*public dispatchLater<Key extends keyof T>(type: Key, event: T[Key]): void {\n\t\tif (this._shouldDispatch(type)) {\n\t\t\tthis._eachListener((listener) => {\n\t\t\t\t// TODO check if it's faster to use an object of listeners rather than a single big array\n\t\t\t\tif (!listener.killed && (listener.type === null || listener.type === type)) {\n\t\t\t\t\t// TODO if the function throws, maybe it should keep going ?\n\t\t\t\t\t// TODO dispatch during the update cycle, rather than using whenIdle\n\t\t\t\t\t$async.whenIdle(() => {\n\t\t\t\t\t\tif (!listener.killed) {\n\t\t\t\t\t\t\tlistener.dispatch(type, event);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}*/\n\n\t/**\n\t * Creates, catalogs and returns an [[EventListener]].\n\t *\n\t * Event listener can be disposed.\n\t *\n\t * @param once Listener's once setting\n\t * @param type Listener's type\n\t * @param callback Callback function\n\t * @param context Callback context\n\t * @param shouldClone Whether the listener should be copied when the EventDispatcher is copied\n\t * @param dispatch\n\t * @returns An event listener\n\t */\n\tprotected _on<C, Key extends keyof T>(once: boolean, type: Key | null, callback: any, context: C, shouldClone: boolean, dispatch: (type: Key, event: T[Key]) => void): EventListener {\n\t\tif (this._disposed) {\n\t\t\tthrow new Error(\"EventDispatcher is disposed\");\n\t\t}\n\n\t\tthis._removeExistingListener(once, type, callback, context);\n\n\t\tconst info: EventListener = {\n\t\t\ttype: type,\n\t\t\tcallback: callback,\n\t\t\tcontext: context,\n\t\t\tshouldClone: shouldClone,\n\t\t\tdispatch: <any>dispatch,\n\t\t\tkilled: false,\n\t\t\tonce: once,\n\t\t\tdisposer: new Disposer(() => {\n\t\t\t\tinfo.killed = true;\n\t\t\t\tthis._removeListener(info);\n\t\t\t})\n\t\t};\n\n\t\tthis._listeners.push(info);\n\n\t\treturn info;\n\t}\n\n\t/**\n\t * Creates an event listener to be invoked on **any** event.\n\t *\n\t * @param callback Callback function\n\t * @param context Callback context\n\t * @param shouldClone Whether the listener should be copied when the EventDispatcher is copied\n\t * @returns A disposable event listener\n\t */\n\tpublic onAll<C, K extends keyof T>(callback: (this: C, event: T[K]) => void, context?: C, shouldClone: boolean = true): IDisposer {\n\t\treturn this._on(false, null, callback, context, shouldClone, (_type, event) => (<any>callback).call(context, event as any)).disposer;\n\t}\n\n\t/**\n\t * Creates an event listener to be invoked on a specific event type.\n\t *\n\t * ```TypeScript\n\t * button.events.once(\"click\", (ev) => {\n\t * console.log(\"Button clicked\");\n\t * }, this);\n\t * ```\n\t * ```JavaScript\n\t * button.events.once(\"click\", (ev) => {\n\t * console.log(\"Button clicked\");\n\t * }, this);\n\t * ```\n\t *\n\t * The above will invoke our custom event handler whenever series we put\n\t * event on is hidden.\n\t *\n\t * @param type Listener's type\n\t * @param callback Callback function\n\t * @param context Callback context\n\t * @param shouldClone Whether the listener should be copied when the EventDispatcher is copied\n\t * @returns A disposable event listener\n\t */\n\tpublic on<C, Key extends keyof T>(type: Key, callback: (this: C | undefined, event: T[Key]) => void, context?: C, shouldClone: boolean = true): IDisposer {\n\t\treturn this._on(false, type, callback, context, shouldClone, (_type, event) => callback.call(context, event)).disposer;\n\t}\n\n\t/**\n\t * Creates an event listener to be invoked on a specific event type once.\n\t *\n\t * Once the event listener is invoked, it is automatically disposed.\n\t *\n\t * ```TypeScript\n\t * button.events.once(\"click\", (ev) => {\n\t * console.log(\"Button clicked\");\n\t * }, this);\n\t * ```\n\t * ```JavaScript\n\t * button.events.once(\"click\", (ev) => {\n\t * console.log(\"Button clicked\");\n\t * }, this);\n\t * ```\n\t *\n\t * The above will invoke our custom event handler the first time series we\n\t * put event on is hidden.\n\t *\n\t * @param type Listener's type\n\t * @param callback Callback function\n\t * @param context Callback context\n\t * @param shouldClone Whether the listener should be copied when the EventDispatcher is copied\n\t * @returns A disposable event listener\n\t */\n\tpublic once<C, Key extends keyof T>(type: Key, callback: (this: C | undefined, event: T[Key]) => void, context?: C, shouldClone: boolean = true): IDisposer {\n\t\tconst x = this._on(true, type, callback, context, shouldClone, (_type, event) => {\n\t\t\tx.disposer.dispose();\n\t\t\tcallback.call(context, event)\n\t\t});\n\n\t\t// TODO maybe this should return a different Disposer ?\n\t\treturn x.disposer;\n\t}\n\n\t/**\n\t * Removes the event listener with specific parameters.\n\t *\n\t * @param type Listener's type\n\t * @param callback Callback function\n\t * @param context Callback context\n\t */\n\tpublic off<C, Key extends keyof T>(type: Key, callback?: (this: C, event: T[Key]) => void, context?: C): void {\n\t\tthis._removeExistingListener(false, type, callback, context);\n\t}\n\n\n\t/**\n\t * Copies all dispatcher parameters, including listeners, from another event\n\t * dispatcher.\n\t *\n\t * @param source Source event dispatcher\n\t * @ignore\n\t */\n\tpublic copyFrom(source: this): IDisposer {\n\t\tif (this._disposed) {\n\t\t\tthrow new Error(\"EventDispatcher is disposed\");\n\t\t}\n\n\t\tif (source === this) {\n\t\t\tthrow new Error(\"Cannot copyFrom the same TargetedEventDispatcher\");\n\t\t}\n\n\t\tconst disposers: Array<IDisposer> = [];\n\n\t\t$array.each(source._listeners, (x) => {\n\t\t\t// TODO is this correct ?\n\t\t\tif (!x.killed && x.shouldClone) {\n\t\t\t\tif (x.type === null) {\n\t\t\t\t\tdisposers.push(this.onAll(x.callback as any, x.context));\n\n\t\t\t\t} else if (x.once) {\n\t\t\t\t\tdisposers.push(this.once(x.type, x.callback, x.context));\n\n\t\t\t\t} else {\n\t\t\t\t\tdisposers.push(this.on(x.type, x.callback, x.context));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\treturn new MultiDisposer(disposers);\n\t}\n\n}\n\n/**\n * A version of the [[EventDispatcher]] that dispatches events for a specific\n * target object.\n *\n * @ignore\n */\nexport class TargetedEventDispatcher<Target, T> extends EventDispatcher<T> {\n\n\t/**\n\t * A target object which is originating events using this dispatcher.\n\t */\n\tpublic target: Target;\n\n\t/**\n\t * Constructor\n\t *\n\t * @param target Event dispatcher target\n\t */\n\tconstructor(target: Target) {\n\t\tsuper();\n\t\tthis.target = target;\n\t}\n\n\t/**\n\t * Copies all dispatcher parameters, including listeners, from another event\n\t * dispatcher.\n\t *\n\t * @param source Source event dispatcher\n\t * @ignore\n\t */\n\tpublic copyFrom(source: this): IDisposer {\n\t\tif (this._disposed) {\n\t\t\tthrow new Error(\"EventDispatcher is disposed\");\n\t\t}\n\n\t\tif (source === this) {\n\t\t\tthrow new Error(\"Cannot copyFrom the same TargetedEventDispatcher\");\n\t\t}\n\n\t\tconst disposers: Array<IDisposer> = [];\n\n\t\t$array.each(source._listeners, (x) => {\n\t\t\t// TODO very hacky\n\t\t\tif (x.context === source.target) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// TODO is this correct ?\n\t\t\tif (!x.killed && x.shouldClone) {\n\t\t\t\tif (x.type === null) {\n\t\t\t\t\tdisposers.push(this.onAll(x.callback as any, x.context));\n\n\t\t\t\t} else if (x.once) {\n\t\t\t\t\tdisposers.push(this.once(x.type, x.callback, x.context));\n\n\t\t\t\t} else {\n\t\t\t\t\tdisposers.push(this.on(x.type, x.callback, x.context));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\treturn new MultiDisposer(disposers);\n\t}\n\n}\n","import type { Color } from \"./Color\"\n\nimport { Entity, IEntitySettings } from \"./Entity\"\n\n\nexport interface IInterfaceColorsSettings extends IEntitySettings {\n\n\t/**\n\t * Used for generic outlines.\n\t */\n\tstroke?: Color,\n\n\t/**\n\t * Used for generic fills.\n\t */\n\tfill?: Color,\n\n\t/**\n\t * Primary button fill color.\n\t */\n\tprimaryButton?: Color,\n\n\t/**\n\t * Primary button fill color on hover.\n\t */\n\tprimaryButtonHover?: Color,\n\n\t/**\n\t * Primary button fill color when pressing down on it.\n\t */\n\tprimaryButtonDown?: Color,\n\n\t/**\n\t * Primary button fill color when it is set as active.\n\t */\n\tprimaryButtonActive?: Color,\n\n\t/**\n\t * Primary button fill color when it is set as disabled.\n\t */\n\tprimaryButtonDisabled?: Color,\t\n\n\t/**\n\t * Primary button text color when it is set as disabled.\n\t */\n\tprimaryButtonTextDisabled?: Color,\n\n\t/**\n\t * Primary button text color.\n\t */\n\tprimaryButtonText?: Color,\t\n\n\t/**\n\t * Primary button stroke (outline) color.\n\t */\n\tprimaryButtonStroke?: Color,\n\n\t/**\n\t * Secondary button fill color.\n\t */\n\tsecondaryButton?: Color,\n\n\t/**\n\t * Secondary button fill color on hover.\n\t */\n\tsecondaryButtonHover?: Color,\n\n\t/**\n\t * Secondary button fill color when pressing down on it.\n\t */\n\tsecondaryButtonDown?: Color,\n\n\t/**\n\t * Secondary button fill color when it is set as active.\n\t */\n\tsecondaryButtonActive?: Color,\n\n\t/**\n\t * Secondary button text color.\n\t */\n\tsecondaryButtonText?: Color,\n\n\t/**\n\t * Secondary button stroke (outline) color.\n\t */\n\tsecondaryButtonStroke?: Color,\n\n\t/**\n\t * Grid color.\n\t */\n\tgrid?: Color,\n\n\t/**\n\t * Chart background color.\n\t */\n\tbackground?: Color,\n\n\t/**\n\t * Alternative background, for elements that need to contrast with primary\n\t * background.\n\t */\n\talternativeBackground?: Color,\n\n\t/**\n\t * Label text color.\n\t */\n\ttext?: Color,\n\n\t/**\n\t * Alternative text color, used for inverted (dark) backgrounds.\n\t * @type {[type]}\n\t */\n\talternativeText?: Color,\n\n\t/**\n\t * Color for disabled elements.\n\t */\n\tdisabled?: Color,\n\n\t/**\n\t * Color to indicate positive value.\n\t */\n\tpositive?: Color,\n\n\t/**\n\t * Color to indicate negative value.\n\t */\n\tnegative?: Color\n\n}\n\n\n/**\n * Presets for common UI elements.\n */\nexport class InterfaceColors extends Entity {\n\tpublic static className: string = \"InterfaceColors\";\n\tpublic static classNames: Array<string> = Entity.classNames.concat([InterfaceColors.className]);\n\n\tdeclare public _settings: IInterfaceColorsSettings;\n}\n","import { Entity, IEntitySettings, IEntityPrivate } from \"./Entity\"\nimport * as $array from \"./Array\"\nimport * as $object from \"./Object\"\nimport en from \"../../../locales/en\";\n\n/**\n * Defines properties that exist for the locale.\n *\n * @ignore\n */\nexport interface ILocaleSettings {\n\t\"firstDayOfWeek\"?: number,\n\n\t// number formatter related\n\t\"_decimalSeparator\"?: string;\n\t\"_thousandSeparator\"?: string;\n\n\t\"_percentPrefix\"?: string | null;\n\t\"_percentSuffix\"?: string | null;\n\n\t\"_big_number_suffix_3\"?: string;\n\t\"_big_number_suffix_6\"?: string;\n\t\"_big_number_suffix_9\"?: string;\n\t\"_big_number_suffix_12\"?: string;\n\t\"_big_number_suffix_15\"?: string;\n\t\"_big_number_suffix_18\"?: string;\n\t\"_big_number_suffix_21\"?: string;\n\t\"_big_number_suffix_24\"?: string;\n\n\t\"_small_number_suffix_24\"?: string;\n\t\"_small_number_suffix_21\"?: string;\n\t\"_small_number_suffix_18\"?: string;\n\t\"_small_number_suffix_15\"?: string;\n\t\"_small_number_suffix_12\"?: string;\n\t\"_small_number_suffix_9\"?: string;\n\t\"_small_number_suffix_6\"?: string;\n\t\"_small_number_suffix_3\"?: string;\n\n\t\"_byte_suffix_B\"?: string;\n\t\"_byte_suffix_KB\"?: string;\n\t\"_byte_suffix_MB\"?: string;\n\t\"_byte_suffix_GB\"?: string;\n\t\"_byte_suffix_TB\"?: string;\n\t\"_byte_suffix_PB\"?: string;\n\n\t// Default date formats for various periods\n\t\"_date\"?: string;\n\t\"_date_millisecond\"?: string;\n\t\"_date_millisecond_full\"?: string;\n\t\"_date_second\"?: string;\n\t\"_date_second_full\"?: string;\n\t\"_date_minute\"?: string;\n\t\"_date_minute_full\"?: string;\n\t\"_date_hour\"?: string;\n\t\"_date_hour_full\"?: string;\n\t\"_date_day\"?: string;\n\t\"_date_day_full\"?: string;\n\t\"_date_week\"?: string;\n\t\"_date_week_full\"?: string;\n\t\"_date_month\"?: string;\n\t\"_date_month_full\"?: string;\n\t\"_date_year\"?: string;\n\n\t// Default duration formats for various base units\n\t\"_duration_millisecond\"?: string;\n\t\"_duration_millisecond_second\"?: string;\n\t\"_duration_millisecond_minute\"?: string;\n\t\"_duration_millisecond_hour\"?: string;\n\t\"_duration_millisecond_day\"?: string;\n\t\"_duration_millisecond_week\"?: string;\n\t\"_duration_millisecond_month\"?: string;\n\t\"_duration_millisecond_year\"?: string;\n\n\t\"_duration_second\"?: string;\n\t\"_duration_second_minute\"?: string;\n\t\"_duration_second_hour\"?: string;\n\t\"_duration_second_day\"?: string;\n\t\"_duration_second_week\"?: string;\n\t\"_duration_second_month\"?: string;\n\t\"_duration_second_year\"?: string;\n\n\t\"_duration_minute\"?: string;\n\t\"_duration_minute_hour\"?: string;\n\t\"_duration_minute_day\"?: string;\n\t\"_duration_minute_week\"?: string;\n\t\"_duration_minute_month\"?: string;\n\t\"_duration_minute_year\"?: string;\n\n\t\"_duration_hour\"?: string;\n\t\"_duration_hour_day\"?: string;\n\t\"_duration_hour_week\"?: string;\n\t\"_duration_hour_month\"?: string;\n\t\"_duration_hour_year\"?: string;\n\n\t\"_duration_day\"?: string;\n\t\"_duration_day_week\"?: string;\n\t\"_duration_day_month\"?: string;\n\t\"_duration_day_year\"?: string;\n\n\t\"_duration_week\"?: string;\n\t\"_duration_week_month\"?: string;\n\t\"_duration_week_year\"?: string;\n\n\t\"_duration_month\"?: string;\n\t\"_duration_month_year\"?: string;\n\n\t\"_duration_year\"?: string;\n\n\t// Era\n\t\"_era_ad\"?: string;\n\t\"_era_bc\"?: string;\n\n\t// Period\n\t\"A\"?: string;\n\t\"P\"?: string;\n\t\"AM\"?: string;\n\t\"PM\"?: string;\n\t\"A.M.\"?: string;\n\t\"P.M.\"?: string;\n\n\t// Dates\n\t\"January\"?: string;\n\t\"February\"?: string;\n\t\"March\"?: string;\n\t\"April\"?: string;\n\t\"May\"?: string;\n\t\"June\"?: string;\n\t\"July\"?: string;\n\t\"August\"?: string;\n\t\"September\"?: string;\n\t\"October\"?: string;\n\t\"November\"?: string;\n\t\"December\"?: string;\n\t\"Jan\"?: string;\n\t\"Feb\"?: string;\n\t\"Mar\"?: string;\n\t\"Apr\"?: string;\n\t\"May(short)\"?: string;\n\t\"Jun\"?: string;\n\t\"Jul\"?: string;\n\t\"Aug\"?: string;\n\t\"Sep\"?: string;\n\t\"Oct\"?: string;\n\t\"Nov\"?: string;\n\t\"Dec\"?: string;\n\t\"Sunday\"?: string;\n\t\"Monday\"?: string;\n\t\"Tuesday\"?: string;\n\t\"Wednesday\"?: string;\n\t\"Thursday\"?: string;\n\t\"Friday\"?: string;\n\t\"Saturday\"?: string;\n\t\"Sun\"?: string;\n\t\"Mon\"?: string;\n\t\"Tue\"?: string;\n\t\"Wed\"?: string;\n\t\"Thu\"?: string;\n\t\"Fri\"?: string;\n\t\"Sat\"?: string;\n\n\t// Chart elements\n\t\"Zoom Out\"?: string;\n\t\"Play\"?: string;\n\t\"Stop\"?: string;\n\t\"Legend\"?: string;\n\t\"Press ENTER to toggle\"?: string;\n\t\"Loading\"?: string;\n\t\"%1 shown\"?: string;\n\t\"%1 hidden\"?: string;\n\n\t// Chart types\n\t\"Chart\"?: string;\n\t\"Serial chart\"?: string;\n\t\"X/Y chart\"?: string;\n\t\"Pie chart\"?: string;\n\t\"Sunburst chart\"?: string;\n\t\"Gauge chart\"?: string;\n\t\"Radar chart\"?: string;\n\t\"Sankey diagram\"?: string;\n\t\"Flow diagram\"?: string;\n\t\"Chord diagram\"?: string;\n\t\"TreeMap chart\"?: string;\n\t\"Force directed tree\"?: string;\n\t\"Sliced chart\"?: string;\n\n\t// Series types\n\t\"Series\"?: string;\n\t\"Candlestick Series\"?: string;\n\t\"OHLC Series\"?: string;\n\t\"Column Series\"?: string;\n\t\"Line Series\"?: string;\n\t\"Pie Slice Series\"?: string;\n\t\"Funnel Series\"?: string;\n\t\"Pyramid Series\"?: string;\n\t\"X/Y Series\"?: string;\n\n\t// Map-related\n\t\"Map\"?: string;\n\t\"Press ENTER to zoom in\"?: string;\n\t\"Press ENTER to zoom out\"?: string;\n\t\"Use arrow keys to zoom in and out\"?: string;\n\t\"Use plus and minus keys on your keyboard to zoom in and out\"?: string;\n\t\"Home\"?: string;\n\t\"Zoom level changed to %1\"?: string;\n\n\t// Export-related\n\t\"Export\"?: string;\n\t\"Image\"?: string;\n\t\"Data\"?: string;\n\t\"Print\"?: string;\n\t\"Press ENTER or use arrow keys to navigate\"?: string;\n\t\"Press ENTER to open\"?: string;\n\t\"Press ENTER to print.\"?: string;\n\t\"Press ENTER to export as %1.\"?: string;\n\t\"(Press ESC to close this message)\"?: string;\n\t\"Image Export Complete\"?: string;\n\t\"Export operation took longer than expected. Something might have gone wrong.\"?: string;\n\t\"Saved from\"?: string;\n\t\"PNG\"?: string;\n\t\"JPG\"?: string;\n\t\"GIF\"?: string;\n\t\"SVG\"?: string;\n\t\"PDF\"?: string;\n\t\"JSON\"?: string;\n\t\"CSV\"?: string;\n\t\"XLSX\"?: string;\n\t\"HTML\"?: string;\n\n\t// Scrollbar-related\n\t\"Use TAB to select grip buttons or left and right arrows to change selection\"?: string;\n\t\"Use left and right arrows to move selection\"?: string;\n\t\"Use left and right arrows to move left selection\"?: string;\n\t\"Use left and right arrows to move right selection\"?: string;\n\t\"Use TAB select grip buttons or up and down arrows to change selection\"?: string;\n\t\"Use up and down arrows to move selection\"?: string;\n\t\"Use up and down arrows to move lower selection\"?: string;\n\t\"Use up and down arrows to move upper selection\"?: string;\n\t\"From %1 to %2\"?: string;\n\t\"From %1\"?: string;\n\t\"To %1\"?: string;\n\n\t// Data loader-related\n\t\"No parser available for file: %1\"?: string;\n\t\"Error parsing file: %1\"?: string;\n\t\"Unable to load file: %1\"?: string;\n\t\"Invalid date\"?: string;\n\n\t// Common actions\n\t\"Close\"?: string;\n\t\"Minimize\"?: string;\n\n\t\"Venn Series\"?: string;\n\t\"Venn Diagram\"?: string;\n}\n\n/**\n * Defines functions that exist for the locale.\n *\n * @ignore\n */\nexport interface ILocaleFunctions {\n\t// ordinal function\n\t\"_dateOrd\": (day: number) => string;\n}\n\n/**\n * Defines all of the defaults for locale properties.\n * @ignore\n */\nexport interface ILocaleDefault extends ILocaleSettings, ILocaleFunctions { }\n\n/**\n * Defines locale interface.\n *\n * @ignore\n */\nexport interface ILocale extends Partial<ILocaleDefault> { };\n\nexport interface ILanguageSettings extends IEntitySettings {\n}\n\nexport interface ILanguagePrivate extends IEntityPrivate {\n\n\t/**\n\t * A locale for International English (default).\n\t */\n\tdefaultLocale: ILocale;\n\n}\n\n/**\n * Add localization functionality.\n */\nexport class Language extends Entity {\n\tdeclare public _settings: ILanguageSettings;\n\tdeclare public _privateSettings: ILanguagePrivate;\n\n\tprotected _setDefaults() {\n\t\tthis.setPrivate(\"defaultLocale\", en);\n\t\tsuper._setDefaults();\n\t}\n\n\t/**\n\t * Returns a prompt translation.\n\t * \n\t * @param prompt Prompt to translate\n\t * @param locale Target locale\n\t * @param ...rest Parameters\n\t * @return Translation\n\t */\n\tpublic translate<Key extends keyof ILocaleSettings>(prompt: Key, locale?: ILocale, ...rest: Array<string>): string {\n\n\t\t// Get langauge\n\t\tif (!locale) {\n\t\t\tlocale = this._root.locale || this.getPrivate(\"defaultLocale\");\n\t\t}\n\n\t\t// Init translation\n\t\tlet translation: string = prompt;\n\t\tlet value = locale[prompt];\n\n\t\t// Try to look for the translation\n\t\tif (value === null) {\n\t\t\ttranslation = \"\";\n\t\t}\n\t\telse if (value != null) {\n\t\t\t// It might be an empty string\n\t\t\tif (value) {\n\t\t\t\ttranslation = <string>value!;\n\t\t\t}\n\t\t}\n\t\telse if (locale !== this.getPrivate(\"defaultLocale\")) {\n\t\t\t// Try to look in default language\n\t\t\treturn this.translate(prompt, this.getPrivate(\"defaultLocale\"), ...rest);\n\t\t}\n\n\t\t// Replace %1, %2, etc params\n\t\tif (rest.length) {\n\t\t\tfor (let len = rest.length, i = 0; i < len; ++i) {\n\t\t\t\ttranslation = translation.split(\"%\" + (i + 1)).join(rest[i]);\n\t\t\t}\n\t\t}\n\n\t\t// Return the translation\n\t\treturn translation;\n\t}\n\n\t/**\n\t * Returns a prompt translation, including custom prompts.\n\t * \n\t * @param prompt Prompt to translate\n\t * @param locale Target locale\n\t * @param ...rest Parameters\n\t * @return Translation\n\t */\n\tpublic translateAny(prompt: string, locale?: ILocale, ...rest: Array<string>): string {\n\t\treturn this.translate(<any>prompt, locale, ...rest);\n\t}\n\n\t/**\n\t * Add a custom prompt to locale.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/locales/creating-translations/#Extending_locale_with_custom_prompts}\n\t * @param prompt Source prompt\n\t * @param translation Tanslation\n\t * @param locale Target locale\n\t */\n\tpublic setTranslationAny(prompt: string, translation: string, locale?: ILocale): void {\n\t\tconst localeTarget = locale || this._root.locale;\n\t\t(<any>localeTarget)[prompt] = translation;\n\t}\n\n\t/**\n\t * Add a batch of custom prompts.\n\t *\n\t * @since 5.3.3\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/locales/creating-translations/#Extending_locale_with_custom_prompts}\n\t * @param translations Translations\n\t * @param locale Target locale\n\t */\n\tpublic setTranslationsAny(translations: { [index: string]: any }, locale?: ILocale): void {\n\t\t$object.each(translations, (key, val) => {\n\t\t\tthis.setTranslationAny(key as string, val, locale);\n\t\t});\n\t}\n\n\tpublic translateEmpty<Key extends keyof ILocaleSettings>(prompt: Key, locale?: ILocale, ...rest: Array<string>): string {\n\t\tlet translation = this.translate(prompt, locale, ...rest);\n\t\treturn translation == prompt ? \"\" : translation;\n\t}\n\n\tpublic translateFunc<Key extends keyof ILocaleFunctions>(prompt: Key, locale?: ILocale): ILocaleFunctions[Key] {\n\n\t\tif ((<any>this._root.locale)[prompt]) {\n\t\t\treturn (<any>this._root.locale)[prompt];\n\t\t}\n\n\t\t// Try to look in default language\n\t\tif (locale !== this.getPrivate(\"defaultLocale\")) {\n\t\t\treturn this.translateFunc(prompt, this.getPrivate(\"defaultLocale\"));\n\t\t}\n\n\t\t// Fail - return empty function\n\t\treturn (): string => {\n\t\t\treturn \"\";\n\t\t};\n\t}\n\n\t/**\n\t * Translates a btach of prompts.\n\t * \n\t * @param list Array of prompts to translate\n\t * @param locale Target locale\n\t * @return Array of translations\n\t */\n\tpublic translateAll<Key extends keyof ILocaleSettings>(list: Array<Key>, locale?: ILocale): Array<string> {\n\t\t// Translate all items in the list\n\t\tif (!this.isDefault()) {\n\t\t\treturn $array.map(list, (x) => this.translate(x, locale));\n\n\t\t} else {\n\t\t\treturn list;\n\t\t}\n\t}\n\n\t/**\n\t * Returns `true` if the currently selected locale is a default locale.\n\t *\n\t * @return `true` if locale is default; `false` if it is not.\n\t */\n\tpublic isDefault(): boolean {\n\t\treturn this.getPrivate(\"defaultLocale\") === this._root.locale;\n\t}\n\n}\n","/**\n * ============================================================================\n * IMPORTS\n * ============================================================================\n * @hidden\n */\nimport type { Entity } from \"./Entity\";\nimport type { Template } from \"./Template\";\nimport type { IDisposer } from \"./Disposer\";\nimport { EventDispatcher, Events } from \"./EventDispatcher\";\nimport * as $array from \"./Array\";\nimport type { Optional } from \"./Type\";\n\n\n/**\n * Checks if specific index fits into length.\n *\n * @param index Index\n * @param len Length\n * @ignore\n */\nfunction checkBounds(index: number, len: number): void {\n\tif (!(index >= 0 && index < len)) {\n\t\tthrow new Error(\"Index out of bounds: \" + index);\n\t}\n}\n\n\nexport interface IListEvents<A> {\n\tclear: {\n\t\toldValues: Array<A>,\n\t};\n\tpush: {\n\t\tnewValue: A,\n\t};\n\tinsertIndex: {\n\t\tindex: number,\n\t\tnewValue: A,\n\t};\n\tsetIndex: {\n\t\tindex: number,\n\t\toldValue: A,\n\t\tnewValue: A,\n\t};\n\tremoveIndex: {\n\t\tindex: number,\n\t\toldValue: A,\n\t};\n\tmoveIndex: {\n\t\toldIndex: number,\n\t\tnewIndex: number,\n\t\tvalue: A,\n\t};\n}\n\n\n/**\n * A List class is used to hold a number of indexed items of the same type.\n */\nexport class List<T> {\n\n\t/**\n\t * List values.\n\t */\n\tprotected _values: Array<T>;\n\n\tpublic events: EventDispatcher<Events<this, IListEvents<T>>> = new EventDispatcher();\n\n\t/**\n\t * Constructor\n\t *\n\t * @param initial Inital list of values to add to list\n\t */\n\tconstructor(initial: Array<T> = []) {\n\t\tthis._values = initial;\n\t}\n\n\t/**\n\t * An array of values in the list.\n\t *\n\t * Do not use this property to add values. Rather use dedicated methods, like\n\t * `push()`, `removeIndex()`, etc.\n\t *\n\t * @readonly\n\t * @return List values\n\t */\n\tpublic get values(): Array<T> {\n\t\treturn this._values;\n\t}\n\n\t/**\n\t * Checks if list contains specific item reference.\n\t *\n\t * @param item Item to search for\n\t * @return `true` if found, `false` if not found\n\t */\n\tpublic contains(value: T): boolean {\n\t\treturn this._values.indexOf(value) !== -1;\n\t}\n\n\t/**\n\t * Removes specific item from the list.\n\t *\n\t * @param item An item to remove\n\t */\n\tpublic removeValue(value: T): void {\n\t\tlet i = 0;\n\t\tlet length = this._values.length;\n\n\t\twhile (i < length) {\n\t\t\t// TODO handle NaN\n\t\t\tif (this._values[i] === value) {\n\t\t\t\tthis.removeIndex(i);\n\t\t\t\t--length;\n\n\t\t\t} else {\n\t\t\t\t++i;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Searches the list for specific item and returns its index.\n\t *\n\t * @param item An item to search for\n\t * @return Index or -1 if not found\n\t */\n\tpublic indexOf(value: T): number {\n\t\treturn $array.indexOf(this._values, value);\n\t}\n\n\t/**\n\t * Number of items in list.\n\t *\n\t * @readonly\n\t * @return Number of items\n\t */\n\tpublic get length(): number {\n\t\treturn this._values.length;\n\t}\n\n\t/**\n\t * Checks if there's a value at specific index.\n\t *\n\t * @param index Index\n\t * @return Value exists?\n\t */\n\tpublic hasIndex(index: number): boolean {\n\t\treturn index >= 0 && index < this._values.length;\n\t}\n\n\t/**\n\t * Returns an item at specified index.\n\t *\n\t * @param index Index\n\t * @return List item\n\t */\n\tpublic getIndex(index: number): T | undefined {\n\t\treturn this._values[index];\n\t}\n\n\tprotected _onPush(newValue: T) {\n\t\tif (this.events.isEnabled(\"push\")) {\n\t\t\tthis.events.dispatch(\"push\", {\n\t\t\t\ttype: \"push\",\n\t\t\t\ttarget: this,\n\t\t\t\tnewValue\n\t\t\t});\n\t\t}\n\t}\n\n\tprotected _onInsertIndex(index: number, newValue: T) {\n\t\tif (this.events.isEnabled(\"insertIndex\")) {\n\t\t\tthis.events.dispatch(\"insertIndex\", {\n\t\t\t\ttype: \"insertIndex\",\n\t\t\t\ttarget: this,\n\t\t\t\tindex,\n\t\t\t\tnewValue\n\t\t\t});\n\t\t}\n\t}\n\n\tprotected _onSetIndex(index: number, oldValue: T, newValue: T) {\n\t\tif (this.events.isEnabled(\"setIndex\")) {\n\t\t\tthis.events.dispatch(\"setIndex\", {\n\t\t\t\ttype: \"setIndex\",\n\t\t\t\ttarget: this,\n\t\t\t\tindex,\n\t\t\t\toldValue,\n\t\t\t\tnewValue\n\t\t\t});\n\t\t}\n\t}\n\n\tprotected _onRemoveIndex(index: number, oldValue: T) {\n\t\tif (this.events.isEnabled(\"removeIndex\")) {\n\t\t\tthis.events.dispatch(\"removeIndex\", {\n\t\t\t\ttype: \"removeIndex\",\n\t\t\t\ttarget: this,\n\t\t\t\tindex,\n\t\t\t\toldValue\n\t\t\t});\n\t\t}\n\t}\n\n\tprotected _onMoveIndex(oldIndex: number, newIndex: number, value: T) {\n\t\tif (this.events.isEnabled(\"moveIndex\")) {\n\t\t\tthis.events.dispatch(\"moveIndex\", {\n\t\t\t\ttype: \"moveIndex\",\n\t\t\t\ttarget: this,\n\t\t\t\toldIndex,\n\t\t\t\tnewIndex,\n\t\t\t\tvalue,\n\t\t\t});\n\t\t}\n\t}\n\n\tprotected _onClear(oldValues: Array<T>) {\n\t\tif (this.events.isEnabled(\"clear\")) {\n\t\t\tthis.events.dispatch(\"clear\", {\n\t\t\t\ttype: \"clear\",\n\t\t\t\ttarget: this,\n\t\t\t\toldValues\n\t\t\t});\n\t\t}\n\t}\n\n\t/**\n\t * Sets value at specific index.\n\t *\n\t * If there's already a value at the index, it is overwritten.\n\t *\n\t * @param index Index\n\t * @param value New value\n\t * @return New value\n\t */\n\tpublic setIndex(index: number, value: T): T {\n\t\tcheckBounds(index, this._values.length);\n\n\t\tconst oldValue = this._values[index];\n\n\t\t// Do nothing if the old value and the new value are the same\n\t\tif (oldValue !== value) {\n\t\t\tthis._values[index] = value;\n\t\t\tthis._onSetIndex(index, oldValue, value);\n\t\t}\n\n\t\treturn oldValue;\n\t}\n\n\t/**\n\t * Adds an item to the list at a specific index, which pushes all the other\n\t * items further down the list.\n\t *\n\t * @param index Index\n\t * @param item An item to add\n\t */\n\tpublic insertIndex<K extends T>(index: number, value: K): K {\n\t\tcheckBounds(index, this._values.length + 1);\n\n\t\t$array.insertIndex(this._values, index, value);\n\t\tthis._onInsertIndex(index, value);\n\t\treturn value;\n\t}\n\n\t/**\n\t * Swaps indexes of two items in the list.\n\t *\n\t * @param a Item 1\n\t * @param b Item 2\n\t */\n\tpublic swap(a: number, b: number): void {\n\t\tconst len = this._values.length;\n\n\t\tcheckBounds(a, len);\n\t\tcheckBounds(b, len);\n\n\t\tif (a !== b) {\n\t\t\tconst value_a = this._values[a];\n\t\t\tconst value_b = this._values[b];\n\n\t\t\tthis._values[a] = value_b;\n\t\t\tthis._onSetIndex(a, value_a, value_b);\n\n\t\t\tthis._values[b] = value_a;\n\t\t\tthis._onSetIndex(b, value_b, value_a);\n\t\t}\n\t}\n\n\t/**\n\t * Removes a value at specific index.\n\t *\n\t * @param index Index of value to remove\n\t * @return Removed value\n\t */\n\tpublic removeIndex(index: number): T {\n\t\tcheckBounds(index, this._values.length);\n\n\t\tconst oldValue = this._values[index];\n\n\t\t$array.removeIndex(this._values, index);\n\t\tthis._onRemoveIndex(index, oldValue);\n\n\t\treturn oldValue;\n\t}\n\n\t/**\n\t * Moves an item to a specific index within the list.\n\t *\n\t * If the index is not specified it will move the item to the end of the\n\t * list.\n\t *\n\t * @param value Item to move\n\t * @param index Index to place item at\n\t */\n\tpublic moveValue<K extends T>(value: K, toIndex?: number): K {\n\t\t// TODO don't do anything if the desired index is the same as the current index\n\t\tlet index = this.indexOf(value);\n\n\t\t// TODO remove all old values rather than only the first ?\n\t\tif (index !== -1) {\n\t\t\t$array.removeIndex(this._values, index);\n\n\t\t\tif (toIndex == null) {\n\t\t\t\tconst toIndex = this._values.length;\n\t\t\t\tthis._values.push(value);\n\t\t\t\tthis._onMoveIndex(index, toIndex, value);\n\n\t\t\t} else {\n\t\t\t\t$array.insertIndex(this._values, toIndex, value);\n\t\t\t\tthis._onMoveIndex(index, toIndex, value);\n\t\t\t}\n\n\t\t} else if (toIndex == null) {\n\t\t\tthis._values.push(value);\n\t\t\tthis._onPush(value);\n\n\t\t} else {\n\t\t\t$array.insertIndex(this._values, toIndex, value);\n\t\t\tthis._onInsertIndex(toIndex, value);\n\t\t}\n\n\t\treturn value;\n\t}\n\n\t/**\n\t * Adds an item to the end of the list.\n\t *\n\t * @param item An item to add\n\t */\n\tpublic push<K extends T>(value: K): K {\n\t\tthis._values.push(value);\n\t\tthis._onPush(value);\n\t\treturn value;\n\t}\n\n\t/**\n\t * Adds an item as a first item in the list.\n\t *\n\t * @param item An item to add\n\t */\n\tpublic unshift<K extends T>(value: K): K {\n\t\tthis.insertIndex(0, value);\n\t\treturn value;\n\t}\n\n\t/**\n\t * Adds multiple items to the list.\n\t *\n\t * @param items An Array of items to add\n\t */\n\tpublic pushAll(values: Array<T>): void {\n\t\t$array.each(values, (value) => {\n\t\t\tthis.push(value);\n\t\t});\n\t}\n\n\t/**\n\t * Copies and adds items from abother list.\n\t *\n\t * @param source A list top copy items from\n\t */\n\tpublic copyFrom(source: this): void {\n\t\tthis.pushAll(source._values);\n\t}\n\n\t/**\n\t * Returns the last item from the list, and removes it.\n\t *\n\t * @return Item\n\t */\n\tpublic pop(): Optional<T> {\n\t\tlet index = this._values.length - 1;\n\t\treturn index < 0 ? undefined : this.removeIndex(this._values.length - 1);\n\t}\n\n\t/**\n\t * Returns the first item from the list, and removes it.\n\t *\n\t * @return Item\n\t */\n\tpublic shift(): Optional<T> {\n\t\treturn this._values.length ? this.removeIndex(0) : undefined;\n\t}\n\n\t/**\n\t * Sets multiple items to the list.\n\t *\n\t * All current items are removed.\n\t *\n\t * @param newArray New items\n\t */\n\tpublic setAll(newArray: Array<T>): void {\n\t\tconst old = this._values;\n\t\tthis._values = [];\n\t\tthis._onClear(old);\n\n\t\t$array.each(newArray, (value) => {\n\t\t\tthis._values.push(value);\n\t\t\tthis._onPush(value);\n\t\t});\n\t}\n\n\t/**\n\t * Removes all items from the list.\n\t */\n\tpublic clear(): void {\n\t\tthis.setAll([]);\n\t}\n\n\t/**\n\t * Returns an ES6 iterator for the list.\n\t */\n\tpublic *[Symbol.iterator](): Iterator<T> {\n\t\tconst length = this._values.length;\n\n\t\tfor (let i = 0; i < length; ++i) {\n\t\t\tyield this._values[i];\n\t\t}\n\t}\n\n\t/**\n\t * Calls `f` for each element in the list.\n\t *\n\t * `f` should have at least one parameter defined which will get a current\n\t * item, with optional second argument - index.\n\t */\n\tpublic each(f: (value: T, index: number) => void): void {\n\t\t$array.each(this._values, f);\n\t}\n\n\t/**\n\t * Calls `f` for each element in the list, from right to left.\n\t *\n\t * `f` should have at least one parameter defined which will get a current\n\t * item, with optional second argument - index.\n\t */\n\tpublic eachReverse(f: (value: T, index: number) => void): void {\n\t\t$array.eachReverse(this._values, f);\n\t}\n}\n\n\n/**\n * A version of a [[List]] where the elements are disposed automatically when\n * removed from the list, unless `autoDispose` is set to `false`.\n */\nexport class ListAutoDispose<A extends IDisposer> extends List<A> implements IDisposer {\n\t/**\n\t * Automatically disposes elements that are removed from the list.\n\t *\n\t * @default true\n\t */\n\tpublic autoDispose: boolean = true;\n\n\tprivate _disposed: boolean = false;\n\n\tprotected _onSetIndex(index: number, oldValue: A, newValue: A) {\n\t\tif (this.autoDispose) {\n\t\t\toldValue.dispose();\n\t\t}\n\n\t\tsuper._onSetIndex(index, oldValue, newValue);\n\t}\n\n\tprotected _onRemoveIndex(index: number, oldValue: A) {\n\t\tif (this.autoDispose) {\n\t\t\toldValue.dispose();\n\t\t}\n\n\t\tsuper._onRemoveIndex(index, oldValue);\n\t}\n\n\tprotected _onClear(oldValues: Array<A>) {\n\t\tif (this.autoDispose) {\n\t\t\t$array.each(oldValues, (x) => {\n\t\t\t\tx.dispose();\n\t\t\t});\n\t\t}\n\n\t\tsuper._onClear(oldValues);\n\t}\n\n\tprotected _dispose() {\n\t\tif (this.autoDispose) {\n\t\t\t$array.each(this._values, (x) => {\n\t\t\t\tx.dispose();\n\t\t\t});\n\t\t}\n\t}\n\n\tpublic isDisposed(): boolean {\n\t\treturn this._disposed;\n\t}\n\n\tpublic dispose(): void {\n\t\tif (!this._disposed) {\n\t\t\tthis._disposed = true;\n\t\t\tthis._dispose();\n\t\t}\n\t}\n}\n\n\n/**\n * A version of a [[List]] that is able to create new elements as well as\n * apply additional settings to newly created items.\n *\n * @see {@link https://www.amcharts.com/docs/v5/concepts/settings/list-templates/} for more info\n */\nexport class ListTemplate<A extends Entity> extends ListAutoDispose<A> {\n\tpublic template: Template<A>;\n\tpublic make: () => A;\n\n\tconstructor(template: Template<A>, make: () => A) {\n\t\tsuper();\n\t\tthis.template = template;\n\t\tthis.make = make;\n\t}\n\n\tprotected _dispose() {\n\t\tsuper._dispose();\n\n\t\tif (this.autoDispose) {\n\t\t\tthis.template.dispose();\n\t\t}\n\t}\n}\n","import type { IPoint } from \"./IPoint\";\nimport { isNumber } from \"./Type\";\nimport type { IBounds } from \"./IBounds\";\n\n/**\n * ============================================================================\n * CONSTANTS\n * ============================================================================\n * @hidden\n */\nexport const PI = Math.PI;\nexport const HALFPI = PI / 2;\nexport const RADIANS = PI / 180;\nexport const DEGREES = 180 / PI;\n\n/**\n * Rounds the numeric value to whole number or specific precision of set.\n *\n * @param value Value\n * @param precision Precision (number of decimal points)\n * @param floor In case value ends with 0.5 and precision is 0, we might need to floor the value instead of ceiling it.\n * @return Rounded value\n */\nexport function round(value: number, precision?: number, floor?: boolean): number {\n\tif (!isNumber(precision) || precision <= 0) {\n\n\t\tlet rounded = Math.round(value);\n\t\tif (floor) {\n\t\t\tif (rounded - value == 0.5) {\n\t\t\t\trounded--;\n\t\t\t}\n\t\t}\n\t\treturn rounded;\n\t}\n\telse {\n\t\tlet d: number = Math.pow(10, precision);\n\t\treturn Math.round(value * d) / d;\n\t}\n}\n\n\n/**\n * Ceils the numeric value to whole number or specific precision of set.\n *\n * @param value Value\n * @param precision Precision (number of decimal points)\n * @return Rounded value\n */\nexport function ceil(value: number, precision: number): number {\n\tif (!isNumber(precision) || precision <= 0) {\n\t\treturn Math.ceil(value);\n\t}\n\telse {\n\t\tlet d: number = Math.pow(10, precision);\n\t\treturn Math.ceil(value * d) / d;\n\t}\n}\n\n\n/**\n * [getCubicControlPointA description]\n *\n * @ignore Exclude from docs\n * @todo Description\n * @param p0 [description]\n * @param p1 [description]\n * @param p2 [description]\n * @param p3 [description]\n * @param tensionX [description]\n * @param tensionY [description]\n * @return [description]\n */\nexport function getCubicControlPointA(p0: IPoint, p1: IPoint, p2: IPoint, tensionX: number, tensionY: number): IPoint {\n\treturn { x: ((-p0.x + p1.x / tensionX + p2.x) * tensionX), y: ((-p0.y + p1.y / tensionY + p2.y) * tensionY) };\n}\n\n/**\n * [getCubicControlPointB description]\n *\n * @ignore Exclude from docs\n * @todo Description\n * @param p0 [description]\n * @param p1 [description]\n * @param p2 [description]\n * @param p3 [description]\n * @param tensionX [description]\n * @param tensionY [description]\n * @return [description]\n */\nexport function getCubicControlPointB(p1: IPoint, p2: IPoint, p3: IPoint, tensionX: number, tensionY: number): IPoint {\n\treturn { x: ((p1.x + p2.x / tensionX - p3.x) * tensionX), y: ((p1.y + p2.y / tensionY - p3.y) * tensionY) };\n}\n\n\nexport function fitToRange(value: number, min: number, max: number): number {\n\treturn Math.min(Math.max(value, min), max);\n}\n\n/**\n * Returns sine of an angle specified in degrees.\n *\n * @param value Value\n * @return Sine\n */\nexport function sin(angle: number): number {\n\treturn Math.sin(RADIANS * angle);\n}\n\n/**\n * Returns tan of an angle specified in degrees.\n *\n * @param value Value\n * @return Sine\n */\nexport function tan(angle: number): number {\n\treturn Math.tan(RADIANS * angle);\n}\n\n/**\n * Returns cosine of an angle specified in degrees.\n *\n * @param value Value\n * @return Cosine\n */\nexport function cos(angle: number): number {\n\treturn Math.cos(RADIANS * angle);\n}\n\n// 0 to 360\nexport function normalizeAngle(value: number): number {\n\tvalue = value % 360;\n\tif (value < 0) {\n\t\tvalue += 360;\n\t}\n\treturn value;\n}\n\n// TODO this doesn't work properly for skewing, and it's probably broken for rotation too\nexport function getArcBounds(cx: number, cy: number, startAngle: number, endAngle: number, radius: number): IBounds {\n\n\tlet minX = Number.MAX_VALUE;\n\tlet minY = Number.MAX_VALUE;\n\tlet maxX = -Number.MAX_VALUE;\n\tlet maxY = -Number.MAX_VALUE;\n\n\tlet bpoints = [];\n\n\tbpoints.push(getArcPoint(radius, startAngle));\n\tbpoints.push(getArcPoint(radius, endAngle));\n\n\tlet fromAngle = Math.min(Math.floor(startAngle / 90) * 90, Math.floor(endAngle / 90) * 90);\n\tlet toAngle = Math.max(Math.ceil(startAngle / 90) * 90, Math.ceil(endAngle / 90) * 90);\n\n\tfor (let angle = fromAngle; angle <= toAngle; angle += 90) {\n\t\tif (angle >= startAngle && angle <= endAngle) {\n\t\t\tbpoints.push(getArcPoint(radius, angle));\n\t\t}\n\t}\n\n\tfor (let i = 0; i < bpoints.length; i++) {\n\t\tlet pt = bpoints[i];\n\t\tif (pt.x < minX) { minX = pt.x; }\n\t\tif (pt.y < minY) { minY = pt.y; }\n\t\tif (pt.x > maxX) { maxX = pt.x; }\n\t\tif (pt.y > maxY) { maxY = pt.y; }\n\t}\n\n\treturn ({ left: cx + minX, top: cy + minY, right: cx + maxX, bottom: cy + maxY });\n}\n\n/**\n * Returns point on arc\n *\n * @param center point\n * @param radius\n * @param arc\n * @return {boolean}\n */\nexport function getArcPoint(radius: number, arc: number) {\n\treturn ({ x: radius * cos(arc), y: radius * sin(arc) });\n}\n\n\nexport function mergeBounds(bounds: IBounds[]): IBounds {\n\tconst len = bounds.length;\n\n\tif (len > 0) {\n\t\tlet bound = bounds[0];\n\t\tlet left = bound.left;\n\t\tlet top = bound.top;\n\t\tlet right = bound.right;\n\t\tlet bottom = bound.bottom;\n\n\t\tif (len > 1) {\n\t\t\tfor (let i = 1; i < len; i++) {\n\t\t\t\tbound = bounds[i];\n\t\t\t\tleft = Math.min(bound.left, left);\n\t\t\t\tright = Math.max(bound.right, right);\n\t\t\t\ttop = Math.min(bound.top, top);\n\t\t\t\tbottom = Math.max(bound.bottom, bottom);\n\t\t\t}\n\t\t}\n\n\t\treturn { left, right, top, bottom };\n\t}\n\treturn { left: 0, right: 0, top: 0, bottom: 0 };\n}\n\n\nexport function fitAngleToRange(value: number, startAngle: number, endAngle: number): number {\n\n\tif (startAngle > endAngle) {\n\t\tlet temp: number = startAngle;\n\t\tstartAngle = endAngle;\n\t\tendAngle = temp;\n\t}\n\n\tvalue = normalizeAngle(value);\n\n\tlet count = (startAngle - normalizeAngle(startAngle)) / 360;\n\n\tif (value < startAngle) {\n\t\tvalue += 360 * (count + 1);\n\t}\n\n\tlet maxEnd: number = startAngle + (endAngle - startAngle) / 2 + 180;\n\tlet maxStart: number = startAngle + (endAngle - startAngle) / 2 - 180;\n\n\tif (value > endAngle) {\n\n\t\tif (value - 360 > startAngle) {\n\t\t\tvalue -= 360;\n\t\t}\n\t\telse {\n\t\t\tif (value < maxEnd) {\n\t\t\t\tvalue = endAngle;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tvalue = startAngle;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (value < startAngle) {\n\t\tif (value > maxStart) {\n\t\t\tvalue = startAngle;\n\t\t}\n\t\telse {\n\t\t\tvalue = endAngle;\n\t\t}\n\t}\n\n\treturn value;\n}\n\nexport function inBounds(point: IPoint, bounds: IBounds) {\n\tif (point.x >= bounds.left && point.y >= bounds.top && point.x <= bounds.right && point.y <= bounds.bottom) {\n\t\treturn true;\n\t}\n\treturn false;\n}\n\nexport function getAngle(point1: IPoint, point2?: IPoint): number {\n\tif (!point2) {\n\t\tpoint2 = { x: point1.x * 2, y: point1.y * 2 };\n\t}\n\tlet diffX: number = point2.x - point1.x;\n\tlet diffY: number = point2.y - point1.y;\n\tlet angle: number = Math.atan2(diffY, diffX) * DEGREES;\n\tif (angle < 0) {\n\t\tangle += 360;\n\t}\n\treturn normalizeAngle(angle);\n}\n\n/**\n * [getPointOnQuadraticCurve description]\n *\n * @ignore Exclude from docs\n * @todo Description\n * @param pointA [description]\n * @param pointB [description]\n * @param controlPoint [description]\n * @param position [description]\n * @return [description]\n */\nexport function getPointOnQuadraticCurve(pointA: IPoint, pointB: IPoint, controlPoint: IPoint, position: number): IPoint {\n\tlet x: number = (1 - position) * (1 - position) * pointA.x + 2 * (1 - position) * position * controlPoint.x + position * position * pointB.x;\n\tlet y: number = (1 - position) * (1 - position) * pointA.y + 2 * (1 - position) * position * controlPoint.y + position * position * pointB.y;\n\treturn { x: x, y: y };\n}\n\nexport function getPointOnLine(pointA: IPoint, pointB: IPoint, position: number): IPoint {\n\treturn { x: pointA.x + (pointB.x - pointA.x) * position, y: pointA.y + (pointB.y - pointA.y) * position };\n}\n\n\n/**\n * Returns the closest value from the array of values to the reference value.\n *\n * @param values Array of values\n * @param value Reference value\n * @return Closes value from the array\n */\nexport function closest(values: number[], referenceValue: number): number {\n\treturn values.reduce(function(prev, curr) {\n\t\treturn (Math.abs(curr - referenceValue) < Math.abs(prev - referenceValue) ? curr : prev);\n\t});\n}\n\n/**\n * Returns true if bounds overlap\n * @param bounds1 IBounds\n * @param bounds2 IBounds\n * @returns boolean\n */\nexport function boundsOverlap(bounds1: IBounds, bounds2: IBounds): boolean {\n\tconst horizontalOverlap = bounds1.left < bounds2.right && bounds1.right > bounds2.left;\n\tconst verticalOverlap = bounds1.top < bounds2.bottom && bounds1.bottom > bounds2.top;\n\treturn horizontalOverlap && verticalOverlap;\n}\n\n/**\n * Generates points of a spiral\n * @param cx \n * @param cy \n * @param radius \n * @param radiusY \n * @param innerRadius \n * @param step \n * @param radiusStep \n * @param startAngle \n * @param endAngle \n * @returns IPoint[]\n */\nexport function spiralPoints(cx: number, cy: number, radius: number, radiusY: number, innerRadius: number, step: number, radiusStep: number, startAngle: number, endAngle: number): IPoint[] {\n\n\tlet r = innerRadius + 0.01;\n\tlet angle = startAngle * RADIANS;\n\tlet points = [];\n\n\twhile (r < radius + radiusStep) {\n\n\t\tlet stepSize = step;\n\t\tif (stepSize / 2 > r) {\n\t\t\tstepSize = 2 * r;\n\t\t}\n\n\t\tangle += 2 * Math.asin(stepSize / 2 / r);\n\n\t\tif (angle * DEGREES > endAngle + ((radius - innerRadius) / radiusStep) * 360) {\n\t\t\tbreak;\n\t\t}\n\n\t\tlet degrees = angle * DEGREES;\n\n\t\tlet point = { x: cx + r * Math.cos(angle), y: cy + r * radiusY / radius * Math.sin(angle) };\n\t\tpoints.push(point);\n\n\t\tr = innerRadius + degrees / 360 * radiusStep;\n\t}\n\n\tpoints.shift();\n\n\treturn points;\n}\n\n/**\n * Returns true if circles overlap\n * @param circle1\n * @param circle2 \n * @returns boolean\n */\nexport function circlesOverlap(circle1: { x: number, y: number, radius: number }, circle2: { x: number, y: number, radius: number }): boolean {\n\treturn Math.hypot(circle1.x - circle2.x, circle1.y - circle2.y) <= circle1.radius + circle2.radius;\n}","/**\n * Modified from Pixi:\n *\n * The MIT License\n *\n * Copyright (c) 2013-2017 Mathew Groves, Chad Engler\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport type { IPoint } from \"./IPoint\";\n\n/**\n * @ignore\n */\nexport class Matrix {\n\tpublic a: number;\n\tpublic b: number;\n\tpublic c: number;\n\tpublic d: number;\n\tpublic tx: number;\n\tpublic ty: number;\n\n\tconstructor(a = 1, b = 0, c = 0, d = 1, tx = 0, ty = 0) {\n\t\tthis.a = a;\n\t\tthis.b = b;\n\t\tthis.c = c;\n\t\tthis.d = d;\n\t\tthis.tx = tx;\n\t\tthis.ty = ty;\n\t}\n\n\t/**\n\t * Sets the matrix based on all the available properties\n\t */\n\tsetTransform(x: number, y: number, pivotX: number, pivotY: number, rotation: number, scale: number = 1): void {\n\t\tthis.a = Math.cos(rotation) * scale;\n\t\tthis.b = Math.sin(rotation) * scale;\n\t\tthis.c = -Math.sin(rotation) * scale;\n\t\tthis.d = Math.cos(rotation) * scale;\n\t\tthis.tx = x - ((pivotX * this.a) + (pivotY * this.c));\n\t\tthis.ty = y - ((pivotX * this.b) + (pivotY * this.d));\n\t}\n\n\t/**\n\t * Get a new position with the current transformation applied.\n\t * Can be used to go from a child's coordinate space to the world coordinate space. (e.g. rendering)\n\t */\n\tapply(origin: IPoint): IPoint {\n\t\treturn {\n\t\t\tx: (this.a * origin.x) + (this.c * origin.y) + this.tx,\n\t\t\ty: (this.b * origin.x) + (this.d * origin.y) + this.ty\n\t\t};\n\t}\n\n\t/**\n\t * Get a new position with the inverse of the current transformation applied.\n\t * Can be used to go from the world coordinate space to a child's coordinate space. (e.g. input)\n\t */\n\tapplyInverse(origin: IPoint): IPoint {\n\t\tconst id = 1 / ((this.a * this.d) + (this.c * -this.b));\n\n\t\treturn {\n\t\t\tx: (this.d * id * origin.x) + (-this.c * id * origin.y) + (((this.ty * this.c) - (this.tx * this.d)) * id),\n\t\t\ty: (this.a * id * origin.y) + (-this.b * id * origin.x) + (((-this.ty * this.a) + (this.tx * this.b)) * id)\n\t\t};\n\t}\n\n\t/**\n\t * Appends the given Matrix to this Matrix.\n\t */\n\tappend(matrix: Matrix): void {\n\t\tconst a1 = this.a;\n\t\tconst b1 = this.b;\n\t\tconst c1 = this.c;\n\t\tconst d1 = this.d;\n\t\tthis.a = (matrix.a * a1) + (matrix.b * c1);\n\t\tthis.b = (matrix.a * b1) + (matrix.b * d1);\n\t\tthis.c = (matrix.c * a1) + (matrix.d * c1);\n\t\tthis.d = (matrix.c * b1) + (matrix.d * d1);\n\t\tthis.tx = (matrix.tx * a1) + (matrix.ty * c1) + this.tx;\n\t\tthis.ty = (matrix.tx * b1) + (matrix.ty * d1) + this.ty;\n\t}\n\n\t/**\n\t * Prepends the given Matrix to this Matrix.\n\t */\n\tprepend(matrix: Matrix): void {\n\t\tconst tx1 = this.tx;\n\t\tif (matrix.a !== 1 || matrix.b !== 0 || matrix.c !== 0 || matrix.d !== 1) {\n\t\t\tconst a1 = this.a;\n\t\t\tconst c1 = this.c;\n\t\t\tthis.a = (a1 * matrix.a) + (this.b * matrix.c);\n\t\t\tthis.b = (a1 * matrix.b) + (this.b * matrix.d);\n\t\t\tthis.c = (c1 * matrix.a) + (this.d * matrix.c);\n\t\t\tthis.d = (c1 * matrix.b) + (this.d * matrix.d);\n\t\t}\n\t\tthis.tx = (tx1 * matrix.a) + (this.ty * matrix.c) + matrix.tx;\n\t\tthis.ty = (tx1 * matrix.b) + (this.ty * matrix.d) + matrix.ty;\n\t}\n\n\t/**\n\t * Copies the other matrix's properties into this matrix\n\t */\n\tcopyFrom(matrix: Matrix): void {\n\t\tthis.a = matrix.a;\n\t\tthis.b = matrix.b;\n\t\tthis.c = matrix.c;\n\t\tthis.d = matrix.d;\n\t\tthis.tx = matrix.tx;\n\t\tthis.ty = matrix.ty;\n\t}\n}\n\n","/**\n * A collection of network-related functions\n */\n\n/**\n * ============================================================================\n * IMPORTS\n * ============================================================================\n * @hidden\n */\nimport type { Optional } from \"./Type\";\n\n/**\n * Defines an interface for objects that hold a net request result.\n */\nexport interface INetLoadResult<A> {\n\n\t/**\n\t * A reference to original [[XMLHttpRequest]].\n\t */\n\txhr: XMLHttpRequest;\n\n\t/**\n\t * Request response body.\n\t */\n\tresponse?: string;\n\n\t/**\n\t * Request response as Blob. (if set `responseType = \"blob\"`)\n\t */\n\tblob?: Blob;\n\n\t/**\n\t * Response `Content-Type`.\n\t */\n\ttype: string | null;\n\n\t/**\n\t * Was there an error?\n\t */\n\terror: boolean;\n\n\t/**\n\t * A target object that made the net load request.\n\t */\n\ttarget?: A;\n\n}\n\nexport interface INetRequestOptions {\n\n\t/**\n\t * Custom request headers to be added to HTTP(S) request.\n\t */\n\trequestHeaders?: { key: string, value: string }[];\n\n\t/**\n\t * Specify expected response type.\n\t *\n\t * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/responseType} for more info\n\t */\n\tresponseType?: XMLHttpRequestResponseType;\n\n\t/**\n\t * Specify whether to send CORS credentials (defaults to `false`).\n\t *\n\t * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/withCredentials} for more info\n\t */\n\twithCredentials?: boolean;\n}\n\n/**\n * Loads an external file via its URL.\n *\n * Please note that this is an asynchronous function.\n *\n * It will not return the result, but rather a `Promise`.\n *\n * You can use the `await` notion, or `then()`.\n *\n * ```TypeScript\n * // Using await\n * let response = await Net.load( \"http://www.my.com/data.json\" );\n * console.log( response.response );\n *\n * // Using then()\n * Net.load( \"http://www.my.com/data.json\" ).then( ( response ) => {\n * console.log( response.response );\n * } );\n * ```\n * ```JavaScript\n * // Using then()\n * Net.load( \"http://www.my.com/data.json\" ).then( function( response ) {\n * console.log( response.response );\n * } );\n * ```\n *\n * @async\n * @see {@link https://www.amcharts.com/docs/v5/concepts/data/net-load-utility/} for more info\n * @param url URL for the file to load\n * @param target A target element that is requesting the net load\n * @param options Request options\n * @return Result (Promise)\n */\nexport function load<A>(url: string, target?: A, options?: INetRequestOptions): Promise<INetLoadResult<A>> {\n\treturn new Promise<INetLoadResult<A>>((success, error) => {\n\n\t\t// Is return type Blob?\n\t\tlet isBlob = options != null && options.responseType == \"blob\";\n\n\t\t// Create request and set up handlers\n\t\tlet xhr = new XMLHttpRequest();\n\t\txhr.onload = () => {\n\t\t\tif (xhr.status === 200) {\n\n\t\t\t\tlet response: Optional<string>;\n\t\t\t\tlet blob: Optional<Blob>;\n\n\t\t\t\tif (isBlob) {\n\t\t\t\t\tblob = xhr.response;\n\t\t\t\t\treadBlob(blob!).then((response: any) => {\n\t\t\t\t\t\tlet output: INetLoadResult<A> = {\n\t\t\t\t\t\t\txhr: xhr,\n\t\t\t\t\t\t\terror: false,\n\t\t\t\t\t\t\tresponse: response,\n\t\t\t\t\t\t\tblob: blob,\n\t\t\t\t\t\t\ttype: xhr.getResponseHeader(\"Content-Type\"),\n\t\t\t\t\t\t\ttarget: target\n\t\t\t\t\t\t};\n\t\t\t\t\t\tsuccess(output);\n\t\t\t\t\t});\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tresponse = xhr.responseText || xhr.response\n\t\t\t\t}\n\n\t\t\t\tlet output: INetLoadResult<A> = {\n\t\t\t\t\txhr: xhr,\n\t\t\t\t\terror: false,\n\t\t\t\t\tresponse: response,\n\t\t\t\t\tblob: blob,\n\t\t\t\t\ttype: xhr.getResponseHeader(\"Content-Type\"),\n\t\t\t\t\ttarget: target\n\t\t\t\t};\n\t\t\t\tsuccess(output);\n\t\t\t}\n\t\t\telse {\n\t\t\t\terror({\n\t\t\t\t\txhr: xhr,\n\t\t\t\t\terror: true,\n\t\t\t\t\ttype: xhr.getResponseHeader(\"Content-Type\"),\n\t\t\t\t\ttarget: target\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\t\txhr.onerror = () => {\n\t\t\terror({\n\t\t\t\txhr: xhr,\n\t\t\t\terror: true,\n\t\t\t\ttype: xhr.getResponseHeader(\"Content-Type\"),\n\t\t\t\ttarget: target\n\t\t\t});\n\t\t};\n\n\t\t// Open request\n\t\txhr.open(\"GET\", url, true);\n\n\t\tif (options && options.withCredentials) {\n\t\t\txhr.withCredentials = true;\n\t\t}\n\n\t\t// Process options\n\t\tif (options != null) {\n\n\t\t\tif (options.requestHeaders != null) {\n\t\t\t\tfor (let i = 0; i < options.requestHeaders.length; i++) {\n\t\t\t\t\tlet header = options.requestHeaders[i];\n\t\t\t\t\txhr.setRequestHeader(header.key, header.value);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (options.responseType != null) {\n\t\t\t\txhr.responseType = options.responseType;\n\t\t\t}\n\t\t}\n\n\t\t// Send request\n\t\txhr.send();\n\n\t});\n\n}\n\n/**\n * Returns textual representation of a Blob object.\n *\n * @param blob Target blob\n * @return Text promise\n */\nexport function readBlob(blob: Blob): Promise<string> {\n\treturn new Promise<string>((success, error) => {\n\t\tconst reader = new FileReader()\n\n\t\treader.onload = _event => {\n\t\t\tsuccess(<string>reader.result);\n\t\t}\n\n\t\treader.onerror = (e) => {\n\t\t\terror(e);\n\t\t}\n\n\t\treader.readAsText(blob);\n\t});\n}\n","import type { Language } from \"./Language\";\n\nimport { Entity, IEntitySettings, IEntityPrivate } from \"./Entity\"\nimport { TextFormatter } from \"./TextFormatter\";\n\nimport * as $object from \"./Object\";\nimport * as $utils from \"./Utils\";\nimport * as $type from \"./Type\";\n\n/**\n * @ignore\n */\nexport interface INumberSuffix {\n\tnumber: number;\n\tsuffix: string;\n}\n\nexport interface INumberFormatterSettings extends IEntitySettings {\n\n\t/**\n\t * Number format to be used when formatting numbers.\n\t *\n\t * @default \"#,###.#####\"\n\t */\n\tnumberFormat?: string | Intl.NumberFormatOptions;\n\n\t/**\n\t * A threshold value for negative numbers.\n\t *\n\t * @default 0\n\t */\n\tnegativeBase?: number;\n\n\t/**\n\t * Prefixes and thresholds to group big numbers into, e.g. 1M.\n\t *\n\t * Used in conjunction with `a` modifier of the number format.\n\t */\n\tbigNumberPrefixes?: INumberSuffix[];\n\n\t/**\n\t * Prefixes and thresholds to group small numbers into, e.g. 1m.\n\t *\n\t * Used in conjunction with `a` modifier of the number format.\n\t */\n\tsmallNumberPrefixes?: INumberSuffix[];\n\n\t/**\n\t * All numbers below this value are considered small.\n\t *\n\t * @default 1\n\t */\n\tsmallNumberThreshold?: number;\n\n\t/**\n\t * Prefixes to and thresholds to use when grouping data size numbers, e.g. 1MB.\n\t *\n\t * Used in conjunction with `b` modifier of the number format.\n\t */\n\tbytePrefixes?: INumberSuffix[];\n\n\t/**\n\t * Indicates which fields in data should be considered numeric.\n\t *\n\t * It is used when formatting data placeholder values.\n\t */\n\tnumericFields?: string[];\n\n\t/**\n\t * Locales if you are using date formats in `Intl.NumberFormatOptions` syntax.\n\t *\n\t * @see (@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NumberFormat) about using Intl for number formatting\n\t * @param value Locales\n\t */\n\tintlLocales?: string;\n\n\t/**\n\t * If set to `true` will force the number string to be LTR, even if RTL is\n\t * enabled.\n\t * \n\t * @default false\n\t * @since 5.3.13\n\t */\n\tforceLTR?: boolean;\n\n}\n\nexport interface INumberFormatterPrivate extends IEntityPrivate {\n}\n\n/**\n * Number formatter\n *\n * @see {@link https://www.amcharts.com/docs/v5/concepts/formatters/formatting-numbers/} for more info\n * @important\n */\nexport class NumberFormatter extends Entity {\n\tdeclare public _settings: INumberFormatterSettings;\n\tdeclare public _privateSettings: INumberFormatterPrivate;\n\n\tprotected _setDefaults() {\n\t\t// Defaults\n\t\tthis._setDefault(\"negativeBase\", 0);\n\t\tthis._setDefault(\"numberFormat\", \"#,###.#####\");\n\t\tthis._setDefault(\"smallNumberThreshold\", 1.00);\n\n\t\tconst bns = \"_big_number_suffix_\";\n\t\tconst sns = \"_small_number_suffix_\";\n\t\tconst bs = \"_byte_suffix_\";\n\n\t\tthis._setDefault(\"bigNumberPrefixes\", [\n\t\t\t{ \"number\": 1e+3, \"suffix\": this._t(bns + \"3\") },\n\t\t\t{ \"number\": 1e+6, \"suffix\": this._t(bns + \"6\") },\n\t\t\t{ \"number\": 1e+9, \"suffix\": this._t(bns + \"9\") },\n\t\t\t{ \"number\": 1e+12, \"suffix\": this._t(bns + \"12\") },\n\t\t\t{ \"number\": 1e+15, \"suffix\": this._t(bns + \"15\") },\n\t\t\t{ \"number\": 1e+18, \"suffix\": this._t(bns + \"18\") },\n\t\t\t{ \"number\": 1e+21, \"suffix\": this._t(bns + \"21\") },\n\t\t\t{ \"number\": 1e+24, \"suffix\": this._t(bns + \"24\") }\n\t\t]);\n\n\t\tthis._setDefault(\"smallNumberPrefixes\", [\n\t\t\t{ \"number\": 1e-24, \"suffix\": this._t(sns + \"24\") },\n\t\t\t{ \"number\": 1e-21, \"suffix\": this._t(sns + \"21\") },\n\t\t\t{ \"number\": 1e-18, \"suffix\": this._t(sns + \"18\") },\n\t\t\t{ \"number\": 1e-15, \"suffix\": this._t(sns + \"15\") },\n\t\t\t{ \"number\": 1e-12, \"suffix\": this._t(sns + \"12\") },\n\t\t\t{ \"number\": 1e-9, \"suffix\": this._t(sns + \"9\") },\n\t\t\t{ \"number\": 1e-6, \"suffix\": this._t(sns + \"6\") },\n\t\t\t{ \"number\": 1e-3, \"suffix\": this._t(sns + \"3\") }\n\t\t]);\n\n\t\tthis._setDefault(\"bytePrefixes\", [\n\t\t\t{ \"number\": 1, suffix: this._t(bs + \"B\") },\n\t\t\t{ \"number\": 1024, suffix: this._t(bs + \"KB\") },\n\t\t\t{ \"number\": 1048576, suffix: this._t(bs + \"MB\") },\n\t\t\t{ \"number\": 1073741824, suffix: this._t(bs + \"GB\") },\n\t\t\t{ \"number\": 1099511627776, suffix: this._t(bs + \"TB\") },\n\t\t\t{ \"number\": 1125899906842624, suffix: this._t(bs + \"PB\") }\n\t\t]);\n\n\t\tsuper._setDefaults();\n\t}\n\n\tpublic _beforeChanged() {\n\t\tsuper._beforeChanged();\n\t}\n\n\t/**\n\t * Formats the number according to specific format.\n\t *\n\t * @param value Value to format\n\t * @param format Format to apply\n\t * @return Formatted number\n\t */\n\tpublic format(value: number | string, format?: string | Intl.NumberFormatOptions, precision?: number): string {\n\n\t\t// no format passed in or \"Number\"\n\t\tif (format == null || ($type.isString(format) && format.toLowerCase() === \"number\")) {\n\t\t\tformat = this.get(\"numberFormat\", \"\");\n\t\t}\n\n\t\t// Init return value\n\t\tlet formatted;\n\n\t\t// Cast to number just in case\n\t\t// TODO: maybe use better casting\n\t\tlet source: number = Number(value);\n\n\t\t// Is it a built-in format or Intl.NumberFormatOptions\n\t\tif ($type.isObject(format)) {\n\t\t\ttry {\n\t\t\t\tif (this.get(\"intlLocales\")) {\n\t\t\t\t\treturn new Intl.NumberFormat(this.get(\"intlLocales\"), <Intl.NumberFormatOptions>format).format(source);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\treturn new Intl.NumberFormat(undefined, <Intl.NumberFormatOptions>format).format(source);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (e) {\n\t\t\t\treturn \"Invalid\";\n\t\t\t}\n\n\t\t}\n\t\telse {\n\n\t\t\t// Clean format\n\t\t\tformat = $utils.cleanFormat(format!);\n\n\t\t\t// Get format info (it will also deal with parser caching)\n\t\t\tlet info = this.parseFormat(format, this._root.language);\n\n\n\t\t\t// format and replace the number\n\t\t\tlet details;\n\t\t\tif (source > this.get(\"negativeBase\")) {\n\t\t\t\tdetails = info.positive;\n\t\t\t}\n\t\t\telse if (source < this.get(\"negativeBase\")) {\n\t\t\t\tdetails = info.negative;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tdetails = info.zero;\n\t\t\t}\n\n\t\t\t// Adjust precision\n\t\t\tif (precision != null && !details.mod) {\n\t\t\t\tdetails = $object.copy(details);\n\t\t\t\tdetails.decimals.active = source == 0 ? 0 : precision;\n\t\t\t}\n\n\t\t\t// Format\n\t\t\tformatted = details.template.split($type.PLACEHOLDER).join(this.applyFormat(source, details));\n\n\t\t}\n\n\t\tif (this.get(\"forceLTR\") === true) {\n\t\t\tformatted = \"‎\" + formatted;\n\t\t}\n\n\t\treturn formatted;\n\t}\n\n\t/**\n\t * Parses supplied format into structured object which can be used to format\n\t * the number.\n\t *\n\t * @param format Format string, i.e. \"#,###.00\"\n\t * @param language Language\n\t * @ignore\n\t */\n\tprotected parseFormat(format: string, language: Language): any {\n\n\t\t// Check cache\n\t\t// TODO\n\t\t// let cached = this.getCache(format);\n\t\t// if (cached != null) {\n\t\t// \treturn cached;\n\t\t// }\n\n\t\tconst thousandSeparator = language.translateEmpty(\"_thousandSeparator\");\n\t\tconst decimalSeparator = language.translateEmpty(\"_decimalSeparator\")\n\n\t\t// init format parse info holder\n\t\tlet info: any = {\n\t\t\t\"positive\": {\n\t\t\t\t\"thousands\": {\n\t\t\t\t\t\"active\": -1,\n\t\t\t\t\t\"passive\": -1,\n\t\t\t\t\t\"interval\": -1,\n\t\t\t\t\t\"separator\": thousandSeparator\n\t\t\t\t},\n\t\t\t\t\"decimals\": {\n\t\t\t\t\t\"active\": -1,\n\t\t\t\t\t\"passive\": -1,\n\t\t\t\t\t\"separator\": decimalSeparator\n\t\t\t\t},\n\t\t\t\t\"template\": \"\",\n\t\t\t\t\"source\": \"\",\n\t\t\t\t\"parsed\": false\n\t\t\t},\n\t\t\t\"negative\": {\n\t\t\t\t\"thousands\": {\n\t\t\t\t\t\"active\": -1,\n\t\t\t\t\t\"passive\": -1,\n\t\t\t\t\t\"interval\": -1,\n\t\t\t\t\t\"separator\": thousandSeparator\n\t\t\t\t},\n\t\t\t\t\"decimals\": {\n\t\t\t\t\t\"active\": -1,\n\t\t\t\t\t\"passive\": -1,\n\t\t\t\t\t\"separator\": decimalSeparator\n\t\t\t\t},\n\t\t\t\t\"template\": \"\",\n\t\t\t\t\"source\": \"\",\n\t\t\t\t\"parsed\": false\n\t\t\t},\n\t\t\t\"zero\": {\n\t\t\t\t\"thousands\": {\n\t\t\t\t\t\"active\": -1,\n\t\t\t\t\t\"passive\": -1,\n\t\t\t\t\t\"interval\": -1,\n\t\t\t\t\t\"separator\": thousandSeparator\n\t\t\t\t},\n\t\t\t\t\"decimals\": {\n\t\t\t\t\t\"active\": -1,\n\t\t\t\t\t\"passive\": -1,\n\t\t\t\t\t\"separator\": decimalSeparator\n\t\t\t\t},\n\t\t\t\t\"template\": \"\",\n\t\t\t\t\"source\": \"\",\n\t\t\t\t\"parsed\": false\n\t\t\t}\n\t\t};\n\n\t\t// Escape double vertical bars (that mean display one vertical bar)\n\t\tformat = format.replace(\"||\", $type.PLACEHOLDER2);\n\n\t\t// Split it up and deal with different formats\n\t\tlet parts = format.split(\"|\");\n\t\tinfo.positive.source = parts[0];\n\n\t\tif (typeof parts[2] === \"undefined\") {\n\t\t\tinfo.zero = info.positive;\n\t\t}\n\t\telse {\n\t\t\tinfo.zero.source = parts[2];\n\t\t}\n\n\t\tif (typeof parts[1] === \"undefined\") {\n\t\t\tinfo.negative = info.positive;\n\t\t}\n\t\telse {\n\t\t\tinfo.negative.source = parts[1];\n\t\t}\n\n\t\t// Parse each\n\t\t$object.each(info, (_part, item) => {\n\t\t\t// Already parsed\n\t\t\tif (item.parsed) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Check cached\n\t\t\t// TODO\n\t\t\t// if (typeof this.getCache(item.source) !== \"undefined\") {\n\t\t\t// \tinfo[part] = this.getCache(item.source);\n\t\t\t// \treturn;\n\t\t\t// }\n\n\t\t\t// Begin parsing\n\t\t\tlet partFormat = item.source;\n\n\t\t\t// Just \"Number\"?\n\t\t\tif (partFormat.toLowerCase() === \"number\") {\n\t\t\t\tpartFormat = this.get(\"numberFormat\", \"#,###.#####\");\n\t\t\t}\n\n\t\t\t// Let TextFormatter split into chunks\n\t\t\tlet chunks = TextFormatter.chunk(partFormat, true);\n\t\t\tfor (let i: number = 0; i < chunks.length; i++) {\n\t\t\t\tlet chunk = chunks[i];\n\n\t\t\t\t// replace back double vertical bar\n\t\t\t\tchunk.text = chunk.text.replace($type.PLACEHOLDER2, \"|\");\n\n\t\t\t\tif (chunk.type === \"value\") {\n\t\t\t\t\t// Parse format\n\n\t\t\t\t\t// Look for codes\n\t\t\t\t\tlet matches: string[] | null = chunk.text.match(/[#0.,]+[ ]?[abespABESP%!]?[abespABESP‰!]?/);\n\n\t\t\t\t\tif (matches) {\n\t\t\t\t\t\tif (matches === null || matches[0] === \"\") {\n\t\t\t\t\t\t\t// no codes here - assume string\n\t\t\t\t\t\t\t// nothing to do here\n\t\t\t\t\t\t\titem.template += chunk.text;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\t// look for the format modifiers at the end\n\t\t\t\t\t\t\tlet mods: string[] | null = matches[0].match(/[abespABESP%‰!]{2}|[abespABESP%‰]{1}$/);\n\n\t\t\t\t\t\t\tif (mods) {\n\t\t\t\t\t\t\t\titem.mod = mods[0].toLowerCase();\n\t\t\t\t\t\t\t\titem.modSpacing = matches[0].match(/[ ]{1}[abespABESP%‰!]{1}$/) ? true : false;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// break the format up\n\t\t\t\t\t\t\tlet a = matches[0].split(\".\");\n\n\t\t\t\t\t\t\t// Deal with thousands\n\t\t\t\t\t\t\tif (a[0] === \"\") {\n\t\t\t\t\t\t\t\t// No directives for thousands\n\t\t\t\t\t\t\t\t// Leave default settings (no formatting)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t// Counts\n\t\t\t\t\t\t\t\titem.thousands.active = (a[0].match(/0/g) || []).length;\n\t\t\t\t\t\t\t\titem.thousands.passive = (a[0].match(/\\#/g) || []).length + item.thousands.active;\n\n\t\t\t\t\t\t\t\t// Separator interval\n\t\t\t\t\t\t\t\tlet b = a[0].split(\",\");\n\t\t\t\t\t\t\t\tif (b.length === 1) {\n\t\t\t\t\t\t\t\t\t// No thousands separators\n\t\t\t\t\t\t\t\t\t// Do nothing\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t// Use length fo the last chunk as thousands length\n\t\t\t\t\t\t\t\t\titem.thousands.interval = (b.pop() || \"\").length;\n\n\t\t\t\t\t\t\t\t\tif (item.thousands.interval === 0) {\n\t\t\t\t\t\t\t\t\t\titem.thousands.interval = -1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Deal with decimals\n\t\t\t\t\t\t\tif (typeof (a[1]) === \"undefined\") {\n\t\t\t\t\t\t\t\t// No directives for decimals\n\t\t\t\t\t\t\t\t// Leave at defaults (no formatting)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t// Counts\n\t\t\t\t\t\t\t\titem.decimals.active = (a[1].match(/0/g) || []).length;\n\t\t\t\t\t\t\t\titem.decimals.passive = (a[1].match(/\\#/g) || []).length + item.decimals.active;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Add special code to template\n\t\t\t\t\t\t\titem.template += chunk.text.split(matches[0]).join($type.PLACEHOLDER);\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// Quoted string - take it as it is\n\t\t\t\t\titem.template += chunk.text;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Apply style formatting\n\t\t\t//item.template = getTextFormatter().format(item.template, this.outputFormat);\n\n\t\t\t// Save cache\n\t\t\t// TODO\n\t\t\t//this.setCache(item.source, item);\n\n\t\t\t// Mark this as parsed\n\t\t\titem.parsed = true;\n\n\t\t});\n\n\t\t// Save cache (the whole thing)\n\t\t// TODO\n\t\t//this.setCache(format, info);\n\n\t\treturn info;\n\t}\n\n\t/**\n\t * Applies parsed format to a numeric value.\n\t *\n\t * @param value Value\n\t * @param details Parsed format as returned by parseFormat()\n\t * @return Formatted number\n\t * @ignore\n\t */\n\tprotected applyFormat(value: number, details: any): string {\n\n\t\t// Use absolute values\n\t\tlet negative: boolean = value < 0;\n\t\tvalue = Math.abs(value);\n\n\t\t// Recalculate according to modifier\n\t\tlet prefix: string = \"\", suffix: string = \"\";\n\t\tlet mods: string[] = details.mod ? details.mod.split(\"\") : [];\n\t\tif (mods.indexOf(\"b\") !== -1) {\n\t\t\tlet a = this.applyPrefix(value, this.get(\"bytePrefixes\")!, mods.indexOf(\"!\") !== -1);\n\t\t\tvalue = a[0];\n\t\t\tprefix = a[1];\n\t\t\tsuffix = a[2];\n\t\t\tif (details.modSpacing) {\n\t\t\t\tsuffix = \" \" + suffix;\n\t\t\t}\n\t\t}\n\t\telse if (mods.indexOf(\"a\") !== -1) {\n\t\t\tlet a = this.applyPrefix(value, value < this.get(\"smallNumberThreshold\")! ? this.get(\"smallNumberPrefixes\")! : this.get(\"bigNumberPrefixes\")!, mods.indexOf(\"!\") !== -1);\n\t\t\tvalue = a[0];\n\t\t\tprefix = a[1];\n\t\t\tsuffix = a[2];\n\t\t\tif (details.modSpacing) {\n\t\t\t\tsuffix = \" \" + suffix;\n\t\t\t}\n\t\t}\n\t\telse if (mods.indexOf(\"p\") !== -1) {\n\t\t\tlet ol = Math.min(value.toString().length + 2, 21);\n\t\t\t//value *= 100;\n\t\t\tvalue = parseFloat(value.toPrecision(ol));\n\t\t\tprefix = this._root.language.translate(\"_percentPrefix\");\n\t\t\tsuffix = this._root.language.translate(\"_percentSuffix\");\n\t\t\tif (prefix == \"\" && suffix == \"\") {\n\t\t\t\tsuffix = \"%\";\n\t\t\t}\n\t\t}\n\t\telse if (mods.indexOf(\"%\") !== -1) {\n\t\t\tlet ol = Math.min(value.toString().length + 2, 21);\n\t\t\tvalue *= 100;\n\t\t\tvalue = parseFloat(value.toPrecision(ol));\n\t\t\tsuffix = \"%\";\n\t\t}\n\t\telse if (mods.indexOf(\"‰\") !== -1) {\n\t\t\tlet ol = Math.min(value.toString().length + 3, 21);\n\t\t\tvalue *= 1000;\n\t\t\tvalue = parseFloat(value.toPrecision(ol));\n\t\t\tsuffix = \"‰\";\n\t\t}\n\n\t\t// Round to passive\n\t\tif (mods.indexOf(\"e\") !== -1) {\n\t\t\t// convert the value to exponential\n\t\t\tlet exp: string[];\n\t\t\tif (details.decimals.passive >= 0) {\n\t\t\t\texp = value.toExponential(details.decimals.passive).split(\"e\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\texp = value.toExponential().split(\"e\");\n\t\t\t}\n\t\t\tvalue = Number(exp[0]);\n\t\t\tsuffix = \"e\" + exp[1];\n\t\t\tif (details.modSpacing) {\n\t\t\t\tsuffix = \" \" + suffix;\n\t\t\t}\n\t\t}\n\t\telse if (details.decimals.passive === 0) {\n\t\t\tvalue = Math.round(value);\n\t\t}\n\t\telse if (details.decimals.passive > 0) {\n\t\t\tconst decimals = $utils.decimalPlaces(value);\n\t\t\tif (decimals > 0) {\n\t\t\t\tconst d = Math.pow(10, details.decimals.passive);\n\t\t\t\tvalue = Math.round(parseFloat((value * d).toFixed(decimals))) / d;\n\t\t\t}\n\t\t}\n\n\t\t// Init return value\n\t\tlet res: string = \"\";\n\n\t\t// Calc integer and decimal parts\n\t\tlet a = $type.numberToString(value).split(\".\");\n\n\t\t// Format integers\n\t\tlet ints = a[0];\n\n\t\t// Pad integers to active length\n\t\tif (ints.length < details.thousands.active) {\n\t\t\tints = Array(details.thousands.active - ints.length + 1).join(\"0\") + ints;\n\t\t}\n\n\t\t// Insert thousands separators\n\t\tif (details.thousands.interval > 0) {\n\t\t\tlet ip: string[] = [];\n\t\t\tlet intsr: string = ints.split(\"\").reverse().join(\"\");\n\t\t\tfor (let i = 0, len = ints.length; i <= len; i += details.thousands.interval) {\n\t\t\t\tlet c: string = intsr.substr(i, details.thousands.interval).split(\"\").reverse().join(\"\");\n\t\t\t\tif (c !== \"\") {\n\t\t\t\t\tip.unshift(c);\n\t\t\t\t}\n\t\t\t}\n\t\t\tints = ip.join(details.thousands.separator);\n\t\t}\n\n\t\t// Add integers\n\t\tres += ints;\n\n\t\t// Add decimals\n\t\tif (a.length === 1) {\n\t\t\ta.push(\"\");\n\t\t}\n\t\tlet decs: string = a[1];\n\n\t\t// Fill zeros?\n\t\tif (decs.length < details.decimals.active) {\n\t\t\tdecs += Array(details.decimals.active - decs.length + 1).join(\"0\");\n\t\t}\n\n\t\tif (decs !== \"\") {\n\t\t\tres += details.decimals.separator + decs;\n\t\t}\n\n\t\t// Can't have empty return value\n\t\tif (res === \"\") {\n\t\t\tres = \"0\";\n\t\t}\n\n\t\t// Add minus sign back\n\t\tif (value !== 0 && negative && (mods.indexOf(\"s\") === -1)) {\n\t\t\tres = \"-\" + res;\n\t\t}\n\n\t\t// Add suffixes/prefixes\n\t\tif (prefix) {\n\t\t\tres = prefix + res;\n\t\t}\n\t\tif (suffix) {\n\t\t\tres += suffix;\n\t\t}\n\n\t\treturn res;\n\t}\n\n\n\tprotected applyPrefix(value: number, prefixes: any[], force: boolean = false): any[] {\n\t\tlet newvalue = value;\n\t\tlet prefix = \"\";\n\t\tlet suffix = \"\";\n\t\tlet applied = false;\n\t\tlet k = 1;\n\n\t\tfor (let i = 0, len = prefixes.length; i < len; i++) {\n\t\t\tif (prefixes[i].number <= value) {\n\t\t\t\tif (prefixes[i].number === 0) {\n\t\t\t\t\tnewvalue = 0;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tnewvalue = value / prefixes[i].number;\n\t\t\t\t\tk = prefixes[i].number;\n\t\t\t\t}\n\t\t\t\tprefix = prefixes[i].prefix;\n\t\t\t\tsuffix = prefixes[i].suffix;\n\t\t\t\tapplied = true;\n\t\t\t}\n\t\t}\n\n\n\t\tif (!applied && force && prefixes.length && value != 0) {\n\t\t\t// Prefix was not applied. Use the first prefix.\n\t\t\tnewvalue = value / prefixes[0].number;\n\t\t\tprefix = prefixes[0].prefix;\n\t\t\tsuffix = prefixes[0].suffix;\n\t\t\tapplied = true;\n\t\t}\n\n\t\tif (applied) {\n\t\t\tnewvalue = parseFloat(\n\t\t\t\tnewvalue.toPrecision(\n\t\t\t\t\tMath.min(k.toString().length + Math.floor(newvalue).toString().replace(/[^0-9]*/g, \"\").length, 21)\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\treturn [newvalue, prefix, suffix];\n\t}\n\n\t/**\n\t * Replaces brackets with temporary placeholders.\n\t *\n\t * @ignore Exclude from docs\n\t * @param text Input text\n\t * @return Escaped text\n\t */\n\tpublic escape(text: string): string {\n\t\treturn text.replace(\"||\", $type.PLACEHOLDER2);\n\t}\n\n\t/**\n\t * Replaces placeholders back to brackets.\n\t *\n\t * @ignore Exclude from docs\n\t * @param text Escaped text\n\t * @return Unescaped text\n\t */\n\tpublic unescape(text: string): string {\n\t\treturn text.replace($type.PLACEHOLDER2, \"|\");\n\t}\n\n}\n","import * as $array from \"./Array\";\nimport type { Keyof } from \"./Type\";\n\nexport function keys<O>(object: O): Array<Keyof<O>> {\n\treturn Object.keys(object) as Array<Keyof<O>>;\n}\n\n/**\n * Returns an array of object's property names ordered using specific ordering\n * function.\n *\n * @param object Source object\n * @param order Ordering function\n * @returns Object property names\n */\nexport function keysOrdered<Object>(object: Object, order: (a: Keyof<Object>, b: Keyof<Object>) => number): Array<Keyof<Object>> {\n\treturn keys(object).sort(order);\n}\n\nexport function copy<O>(object: O): O {\n\treturn Object.assign({}, object);\n}\n\nexport function each<O>(object: O, f: <K extends keyof O>(key: K, value: Exclude<O[K], undefined>) => void): void {\n\tkeys(object).forEach((key) => {\n\t\tf(key, object[key] as any);\n\t});\n}\n\n/**\n * Iterates through all properties of the object calling `fn` for each of them.\n *\n * If return value of the function evaluates to `false` further iteration is\n * cancelled.\n *\n * @param object Source object\n * @param fn Callback function\n */\nexport function eachContinue<Object>(object: Object, fn: <Key extends Keyof<Object>>(key: Key, value: Object[Key]) => boolean): void {\n\tfor (let key in object) {\n\t\tif (hasKey(object, key)) {\n\t\t\tif (!fn(key as Keyof<Object>, object[key] as Object[Keyof<Object>])) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * Orders object properties using custom `ord` function and iterates through\n * them calling `fn` for each of them.\n *\n * @param object Source object\n * @param fn Callback function\n * @param order Ordering function\n */\nexport function eachOrdered<Object>(object: Object, fn: <Key extends Keyof<Object>>(key: Key, value: Object[Key]) => void, ord: (a: Keyof<Object>, b: Keyof<Object>) => number): void {\n\t$array.each(keysOrdered(object, ord), (key) => {\n\t\tfn(key, object[key]);\n\t});\n}\n\n/**\n * Checks if `object` has a specific `key`.\n *\n * @param object Source object\n * @param key Property name\n * @returns Has key?\n */\nexport function hasKey<Object, Key extends keyof Object>(object: Object, key: Key): boolean {\n\treturn {}.hasOwnProperty.call(object, key);\n}\n\n/**\n * Copies all properties of one object to the other, omitting undefined, but only if property in target object doesn't have a value set.\n *\n * @param fromObject Source object\n * @param toObject Target object\n * @return Updated target object\n * @todo Maybe consolidate with utils.copy?\n */\nexport function softCopyProperties(source: Object, target: Object): Object {\n\teach(source, (key, value) => {\n\t\t// only if value is set\n\t\t//if ($type.hasValue(value) && !($type.hasValue((<any>target)[key]))) {\n\t\tif (value != null && (<any>target)[key] == null) {\n\t\t\t(<any>target)[key] = value;\n\t\t}\n\t});\n\treturn target;\n}\n","export type Order = -1 | 0 | 1;\n\n/**\n * @ignore\n */\nexport function compare<A extends string | number | boolean>(left: A, right: A): Order {\n\tif (left === right) {\n\t\treturn 0;\n\n\t} else if (left < right) {\n\t\treturn -1;\n\n\t} else {\n\t\treturn 1;\n\t}\n}\n\n/**\n * @ignore\n */\nexport function compareArray<A>(left: ArrayLike<A>, right: ArrayLike<A>, f: (x: A, y: A) => Order): Order {\n\tconst leftLength = left.length;\n\tconst rightLength = right.length;\n\n\tconst length = Math.min(leftLength, rightLength);\n\n\tfor (let i = 0; i < length; ++i) {\n\t\tconst order = f(left[i], right[i]);\n\n\t\tif (order !== 0) {\n\t\t\treturn order;\n\t\t}\n\t}\n\n\treturn compare(leftLength, rightLength);\n}\n\n/**\n * @ignore\n */\nexport function reverse(order: Order): Order {\n\tif (order < 0) {\n\t\treturn 1;\n\n\t} else if (order > 0) {\n\t\treturn -1;\n\n\t} else {\n\t\treturn 0;\n\t}\n}\n\n/**\n * @ignore\n */\nexport function compareNumber(a: number, b: number): Order {\n\tif (a === b) {\n\t\treturn 0;\n\n\t} else if (a < b) {\n\t\treturn -1;\n\n\t} else {\n\t\treturn 1;\n\t}\n}\n","/**\n * ============================================================================\n * MAIN CLASS\n * ============================================================================\n * @hidden\n */\n\n/**\n * Represents a relative value (percent).\n *\n * The Percent object, can be instantiated using two ways:\n *\n * * Via `new Percent(X)`.\n * * Via `am5.percent(X)`.\n *\n * You can also use shortcut functions for `0%`, `50%`, and `100%`:\n * * `am5.p0`\n * * `am5.p50`\n * * `am5.p100`\n */\nexport class Percent {\n\n\t/**\n\t * Value in percent.\n\t */\n\tprotected _value: number;\n\n\t/**\n\t * Constructor.\n\t *\n\t * @param percent Percent value\n\t */\n\tconstructor(percent: number) {\n\t\tthis._value = percent;\n\t}\n\n\t/**\n\t * Relative value.\n\t *\n\t * E.g. 100% is 1, 50% is 0.5, etc.\n\t *\n\t * This is useful to apply transformations to other values. E.g.:\n\t *\n\t * ```TypeScript\n\t * let value = 256;\n\t * let percent = new am5.p50;\n\t * console.log(value * percent.value); // outputs 128\n\t * ```\n\t * ```JavaScript\n\t * var value = 256;\n\t * var percent = new am5.p50;\n\t * console.log(value * percent.value); // outputs 128\n\t * ```\n\t *\n\t * Alternatively, you can use `am5.percent()` helper function:\n\t *\n\t * ```TypeScript\n\t * let value = 256;\n\t * let percent = am5.p50;\n\t * console.log(value * percent.value); // outputs 128\n\t * ```\n\t * ```JavaScript\n\t * var value = 256;\n\t * var percent = am5.p50;\n\t * console.log(value * percent.value); // outputs 128\n\t * ```\n\t *\n\t * @readonly\n\t * @return Relative value\n\t */\n\tpublic get value(): number {\n\t\treturn this._value / 100;\n\t}\n\n\t/**\n\t * Value in percent.\n\t *\n\t * @readonly\n\t * @return Percent\n\t */\n\tpublic get percent(): number {\n\t\treturn this._value;\n\t}\n\n\tpublic toString(): string {\n\t\treturn \"\" + this._value + \"%\";\n\t}\n\n\tpublic interpolate(min: number, max: number): number {\n\t\treturn min + (this.value * (max - min));\n\t}\n\n\tstatic normalize(percent: Percent | number, min: number, max: number): Percent {\n\t\tif (percent instanceof Percent) {\n\t\t\treturn percent;\n\n\t\t} else {\n\t\t\tif (min === max) {\n\t\t\t\treturn new Percent(0);\n\n\t\t\t} else {\n\t\t\t\treturn new Percent(Math.min(Math.max((percent - min) * (1 / (max - min)), 0), 1) * 100);\n\t\t\t}\n\t\t}\n\t}\n\n\t/*public toNumber(): number {\n\t\treturn this.percent;\n\t}*/\n\n}\n\n\n/**\n * Converts numeric percent value to a proper [[Percent]] object.\n *\n * ```TypeScript\n * pieSeries.set(\"radius\", am5.percent(80));\n * ```\n * ```JavaScript\n * pieSeries.set(\"radius\", am5.percent(80));\n * ```\n *\n * @param value Percent\n * @return Percent object\n */\nexport function percent(value: number): Percent {\n\treturn new Percent(value);\n}\n\n/**\n * A shortcut function to `am5.percent(0)`.\n */\nexport const p0 = percent(0);\n\n/**\n * A shortcut function to `am5.percent(100)`.\n */\nexport const p100 = percent(100);\n\n/**\n * A shortcut function to `am5.percent(50)`.\n */\nexport const p50 = percent(50);\n\n\n/**\n * Checks if value is a [[Percent]] object.\n *\n * @ignore Exclude from docs\n * @param value Input value\n * @return Is percent?\n */\nexport function isPercent(value: any): boolean {\n\treturn value instanceof Percent;\n}\n","/** @ignore *//** */\n\nimport * as $type from \"./Type\";\nimport * as $utils from \"./Utils\";\nimport { Sprite } from \"../render/Sprite\";\nimport { TextFormatter } from \"./TextFormatter\";\n\n/**\n * @ignore\n */\nexport function populateString(target: Sprite, string: string): string {\n\tif (string != null) {\n\t\tstring = \"\" + string;\n\t\tstring = TextFormatter.escape(string);\n\t\tlet tags = string.match(/\\{([^}]+)\\}/g);\n\t\tlet i;\n\t\tif (tags) {\n\t\t\tfor (i = 0; i < tags.length; i++) {\n\t\t\t\tlet tag = tags[i].replace(/\\{([^}]+)\\}/, \"$1\");\n\t\t\t\tlet value = getTagValue(target, tag, \"\");\n\n\t\t\t\tif (value == null) {\n\t\t\t\t\tvalue = \"\";\n\t\t\t\t}\n\n\t\t\t\tstring = string.split(tags[i]).join(value);\n\t\t\t}\n\t\t}\n\t\tstring = TextFormatter.unescape(string);\n\t}\n\telse {\n\t\tstring = \"\";\n\t}\n\n\t// TODO: apply adapter?\n\treturn string;\n}\n\n/**\n * @ignore\n */\nfunction getTagValue(target: Sprite, tagName: string, format?: string): string {\n\tlet value: any;\n\tconst dataItem = target.dataItem;\n\n\t// Parse parts\n\tlet parts: any[] = [];\n\tlet reg = /(format[a-zA-Z]*)\\((.*)\\)|([^.]+)/g;\n\tlet matches;\n\n\twhile (true) {\n\t\tmatches = reg.exec(tagName);\n\n\t\tif (matches === null) {\n\t\t\tbreak;\n\t\t}\n\n\t\tif (matches[3]) {\n\t\t\t// Simple property\n\t\t\tparts.push({\n\t\t\t\tprop: matches[3]\n\t\t\t});\n\n\t\t\t// Check if maybe we should force a formatter on this value\n\t\t\tconst dateFields = target.getDateFormatter().get(\"dateFields\", []);\n\t\t\tconst numericFields = target.getNumberFormatter().get(\"numericFields\", []);\n\t\t\tconst durationFields = target.getDurationFormatter().get(\"durationFields\", []);\n\t\t\tif ((<any>dateFields).indexOf(matches[3]) !== -1) {\n\t\t\t\tparts.push({\n\t\t\t\t\tmethod: \"formatDate\",\n\t\t\t\t\tparams: []\n\t\t\t\t});\n\t\t\t}\n\t\t\telse if ((<any>numericFields).indexOf(matches[3]) !== -1) {\n\t\t\t\tparts.push({\n\t\t\t\t\tmethod: \"formatNumber\",\n\t\t\t\t\tparams: []\n\t\t\t\t});\n\t\t\t}\n\t\t\telse if ((<any>durationFields).indexOf(matches[3]) !== -1) {\n\t\t\t\tparts.push({\n\t\t\t\t\tmethod: \"formatDuration\",\n\t\t\t\t\tparams: []\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t// Method\n\t\t\t// Parse parameters\n\t\t\tlet params: any[] = [];\n\t\t\tif ($utils.trim(matches[2]) != \"\") {\n\t\t\t\tlet reg2 = /'([^']*)'|\"([^\"]*)\"|([0-9\\-]+)/g;\n\t\t\t\tlet matches2;\n\n\t\t\t\twhile (true) {\n\t\t\t\t\tmatches2 = reg2.exec(matches[2]);\n\n\t\t\t\t\tif (matches2 === null) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tparams.push(matches2[1] || matches2[2] || matches2[3])\n\t\t\t\t}\n\t\t\t}\n\t\t\tparts.push({\n\t\t\t\tmethod: matches[1],\n\t\t\t\tparams: params\n\t\t\t})\n\t\t}\n\t}\n\n\t// Check if we can retrieve the value from data item\n\tif (dataItem) {\n\n\n\t\t// Check values\n\t\tvalue = getTagValueFromObject(target, parts, dataItem._settings);\n\n\t\t// Check properties\n\t\tif (value == null || $type.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.\n\t\t\tvalue = getTagValueFromObject(target, parts, dataItem);\n\t\t}\n\n\t\t// Check data context\n\t\tlet dataContext: any = dataItem.dataContext;\n\n\t\tif (value == null && dataContext) {\n\t\t\tvalue = getTagValueFromObject(target, parts, dataContext);\n\n\t\t\t// Maybe it's a literal dot-separated name of the key in dataContext?\n\t\t\tif (value == null) {\n\t\t\t\tvalue = getTagValueFromObject(target, [{\n\t\t\t\t\tprop: tagName\n\t\t\t\t}], dataContext);\n\t\t\t}\n\n\t\t\t// scond data context level sometimes exist (tree map)\n\t\t\tif (value == null && dataContext.dataContext) {\n\t\t\t\tvalue = getTagValueFromObject(target, parts, dataContext.dataContext);\n\t\t\t}\n\t\t}\n\n\t\t// Check component's data item\n\t\tif (value == null && dataItem.component && dataItem.component.dataItem !== dataItem) {\n\t\t\tvalue = getTagValue(dataItem.component, tagName, format);\n\t\t}\n\t}\n\n\t// Check sprite's properties\n\tif (value == null) {\n\t\tvalue = getTagValueFromObject(target, parts, target);\n\t}\n\n\t// Finally, check the parent\n\tif (value == null && target.parent) {\n\t\tvalue = getTagValue(target.parent, tagName, format);\n\t}\n\n\treturn value;\n}\n\n/**\n * @ignore\n */\nfunction getCustomDataValue(target: Sprite, prop: string): any {\n\tconst customData = target.getPrivate(\"customData\");\n\tif ($type.isObject(customData)) {\n\t\treturn (<any>customData)[prop];\n\t}\n}\n\n/**\n * @ignore\n */\nexport function getTagValueFromObject(target: Sprite, parts: any[], object: any, format?: string): any {\n\tlet current: any = object;\n\tlet formatApplied = false;\n\tfor (let i = 0, len = parts.length; i < len; i++) {\n\t\tlet part = parts[i];\n\t\tif (part.prop) {\n\t\t\t// Regular property\n\t\t\tif (current instanceof Sprite) {\n\t\t\t\tlet tmp = current.get(part.prop);\n\t\t\t\tif (tmp == null) tmp = current.getPrivate(part.prop);\n\t\t\t\tif (tmp == null) tmp = getCustomDataValue(current, part.prop);\n\t\t\t\tif (tmp == null) tmp = (<any>current)[part.prop];\n\t\t\t\tcurrent = tmp;\n\t\t\t}\n\t\t\telse if (current.get) {\n\t\t\t\tlet tmp = current.get(part.prop);\n\t\t\t\tif (tmp == null) tmp = (<any>current)[part.prop];\n\t\t\t\tcurrent = tmp;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcurrent = current[part.prop];\n\t\t\t}\n\n\t\t\tif (current == null) {\n\t\t\t\t// Not set, return undefined\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t// Method\n\n\t\t\tswitch (part.method) {\n\t\t\t\tcase \"formatNumber\":\n\t\t\t\t\tlet numberValue = $type.toNumber(current);\n\t\t\t\t\tif (numberValue != null) {\n\t\t\t\t\t\tcurrent = target.getNumberFormatter().format(\n\t\t\t\t\t\t\tnumberValue,\n\t\t\t\t\t\t\tformat || part.params[0] || undefined\n\t\t\t\t\t\t);\n\t\t\t\t\t\tformatApplied = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"formatDate\":\n\t\t\t\t\tlet dateValue = $type.toDate(current);\n\t\t\t\t\tif (!$type.isDate(dateValue) || $type.isNaN(dateValue.getTime())) {\n\t\t\t\t\t\t// Was not able to get date out of value, quitting and letting\n\t\t\t\t\t\t// calling method try another value\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tif (dateValue != null) {\n\t\t\t\t\t\tcurrent = target.getDateFormatter().format(\n\t\t\t\t\t\t\tdateValue,\n\t\t\t\t\t\t\tformat || part.params[0] || undefined\n\t\t\t\t\t\t);\n\t\t\t\t\t\tformatApplied = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"formatDuration\":\n\t\t\t\t\tlet durationValue = $type.toNumber(current);\n\t\t\t\t\tif (durationValue != null) {\n\t\t\t\t\t\tcurrent = target.getDurationFormatter().format(\n\t\t\t\t\t\t\tdurationValue,\n\t\t\t\t\t\t\tformat || part.params[0] || undefined,\n\t\t\t\t\t\t\tpart.params[1] || undefined\n\t\t\t\t\t\t);\n\t\t\t\t\t\tformatApplied = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"urlEncode\":\n\t\t\t\tcase \"encodeURIComponent\":\n\t\t\t\t\tcurrent = encodeURIComponent(current);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tif (current[part.method]) {\n\t\t\t\t\t\tcurrent[part.method].apply(object, part.params);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Apply default format if it wasn't applied explicitly\n\tif (!formatApplied) {\n\n\t\tlet formatParts = [{\n\t\t\tmethod: \"\",\n\t\t\tparams: format\n\t\t}];\n\n\t\tif (format == null) {\n\n\t\t\t// Format is not set\n\t\t\t// Determine from the type of the value\n\t\t\tif ($type.isNumber(current)) {\n\t\t\t\tformatParts[0].method = \"formatNumber\";\n\t\t\t\tformatParts[0].params = \"\";\n\t\t\t}\n\t\t\telse if ($type.isDate(current)) {\n\t\t\t\tformatParts[0].method = \"formatDate\";\n\t\t\t\tformatParts[0].params = \"\";\n\t\t\t}\n\n\t\t}\n\t\telse {\n\n\t\t\t// Format set\n\t\t\t// Try to determine formatter based on the format\n\t\t\tlet formatterType: string = $utils.getFormat(format);\n\n\t\t\t// format\n\t\t\tif (formatterType === \"number\") {\n\t\t\t\tformatParts[0].method = \"formatNumber\";\n\t\t\t}\n\t\t\telse if (formatterType === \"date\") {\n\t\t\t\tformatParts[0].method = \"formatDate\";\n\t\t\t}\n\t\t\telse if (formatterType === \"duration\") {\n\t\t\t\tformatParts[0].method = \"formatDuration\";\n\t\t\t}\n\n\t\t}\n\n\t\t// Apply format\n\t\tif (formatParts[0].method) {\n\t\t\tcurrent = getTagValueFromObject(target, formatParts, current);\n\t\t}\n\n\t}\n\n\treturn current;\n}","/** @ignore *//** */\n\nimport type { IDisposer } from \"./Disposer\";\nimport * as $array from \"./Array\";\nimport * as $utils from \"./Utils\";\n\n/**\n * @ignore\n */\ninterface Sensor {\n\taddTarget(target: Element, callback: () => void): void;\n\tremoveTarget(target: Element): void;\n}\n\n/**\n * @ignore\n */\ndeclare const ResizeObserver: any;\n\n/**\n * @ignore\n */\nclass Native implements Sensor {\n\tprivate _observer: any;\n\tprivate _targets: Array<{ target: Element, callback: () => void }> = [];\n\n\tconstructor() {\n\t\tthis._observer = new ResizeObserver((entries: Array<any>) => {\n\t\t\t$array.each(entries, (entry) => {\n\t\t\t\t$array.each(this._targets, (x) => {\n\t\t\t\t\tif (x.target === entry.target) {\n\t\t\t\t\t\tx.callback();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t}\n\n\taddTarget(target: Element, callback: () => void) {\n\t\tthis._observer.observe(target, { box: \"border-box\" });\n\t\tthis._targets.push({ target, callback });\n\t}\n\n\tremoveTarget(target: Element) {\n\t\tthis._observer.unobserve(target);\n\n\t\t$array.keepIf(this._targets, (x) => {\n\t\t\treturn x.target !== target;\n\t\t});\n\t}\n}\n\n/**\n * @ignore\n */\ninterface ClientBounds {\n\twidth: number,\n\theight: number,\n\tleft: number,\n\tright: number,\n\ttop: number,\n\tbottom: number,\n\tx: number,\n\ty: number\n}\n\n\n/**\n * @ignore\n */\nclass Raf implements Sensor {\n\tpublic static delay: number = 200;\n\n\tprivate _timer: number | null = null;\n\tprivate _targets: Array<{ target: Element, callback: () => void, size: ClientRect | DOMRect | ClientBounds }> = [];\n\n\taddTarget(target: Element, callback: () => void) {\n\t\tif (this._timer === null) {\n\t\t\tlet lastTime: number | null = null;\n\n\t\t\tconst loop = () => {\n\t\t\t\tconst currentTime = Date.now();\n\n\t\t\t\tif (lastTime === null || currentTime > (lastTime + Raf.delay)) {\n\t\t\t\t\tlastTime = currentTime;\n\n\t\t\t\t\t$array.each(this._targets, (x) => {\n\t\t\t\t\t\tlet newSize = x.target.getBoundingClientRect();\n\n\t\t\t\t\t\tif (newSize.width !== x.size.width || newSize.height !== x.size.height) {\n\t\t\t\t\t\t\tx.size = newSize;\n\t\t\t\t\t\t\tx.callback();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tif (this._targets.length === 0) {\n\t\t\t\t\tthis._timer = null;\n\n\t\t\t\t} else {\n\t\t\t\t\tthis._timer = requestAnimationFrame(loop);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tthis._timer = requestAnimationFrame(loop);\n\t\t}\n\n\t\t// We start off with fake bounds so that sensor always kicks in\n\t\tlet size = { width: 0, height: 0, left: 0, right: 0, top: 0, bottom: 0, x: 0, y: 0 };\n\t\tthis._targets.push({ target, callback, size });\n\t}\n\n\tremoveTarget(target: Element) {\n\t\t$array.keepIf(this._targets, (x) => {\n\t\t\treturn x.target !== target;\n\t\t});\n\n\t\tif (this._targets.length === 0) {\n\t\t\tif (this._timer !== null) {\n\t\t\t\tcancelAnimationFrame(this._timer);\n\t\t\t\tthis._timer = null;\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n/**\n * @ignore\n */\nlet observer: Sensor | null = null;\n\n/**\n * @ignore\n */\nfunction makeSensor(): Sensor {\n\tif (observer === null) {\n\t\tif (typeof ResizeObserver !== \"undefined\") {\n\t\t\tobserver = new Native();\n\n\t\t} else {\n\t\t\tobserver = new Raf();\n\t\t}\n\t}\n\n\treturn observer;\n}\n\n/**\n * @ignore\n */\nexport class ResizeSensor implements IDisposer {\n\tprivate _sensor: Sensor;\n\tprivate _element: Element;\n\tprivate _listener: IDisposer;\n\tprivate _disposed: boolean = false;\n\n\tconstructor(element: Element, callback: () => void) {\n\t\tthis._sensor = makeSensor();\n\t\tthis._element = element;\n\n\t\t// This is needed because we need to know when the window is zoomed\n\t\tthis._listener = $utils.onZoom(callback);\n\n\t\tthis._sensor.addTarget(element, callback);\n\t}\n\n\tpublic isDisposed() {\n\t\treturn this._disposed;\n\t}\n\n\tpublic dispose() {\n\t\tif (!this._disposed) {\n\t\t\tthis._disposed = true;\n\t\t\tthis._sensor.removeTarget(this._element);\n\t\t\tthis._listener.dispose();\n\t\t}\n\t}\n\n\tpublic get sensor(): Sensor {\n\t\treturn this._sensor;\n\t}\n}\n","import type { Entity, Dirty } from \"./Entity\";\nimport type { State } from \"./States\";\nimport { EventDispatcher, Events } from \"./EventDispatcher\";\nimport { IDisposer, Disposer, MultiDisposer } from \"./Disposer\";\nimport * as $array from \"./Array\";\nimport * as $object from \"./Object\";\nimport * as $type from \"./Type\";\n\n\nfunction disposeSettings(settings: object) {\n\t$object.each(settings, (_key, value) => {\n\t\tif ($type.isObject(value) && typeof (value as any).dispose === \"function\") {\n\t\t\t(value as any).enableDispose = true;\n\t\t\t(value as any).dispose();\n\t\t}\n\t});\n}\n\n\nexport class TemplateState<E extends Entity> {\n\tpublic _settings: Partial<E[\"_settings\"]>;\n\n\tprivate _name: string;\n\tprivate _template: Template<E>;\n\n\tconstructor(name: string, template: Template<E>, settings: Partial<E[\"_settings\"]>) {\n\t\tthis._name = name;\n\t\tthis._template = template;\n\t\tthis._settings = settings;\n\t}\n\n\tpublic _dispose() {\n\t\tdisposeSettings(this._settings);\n\t}\n\n\tpublic get<Key extends keyof this[\"_settings\"]>(key: Key): this[\"_settings\"][Key];\n\tpublic get<Key extends keyof this[\"_settings\"], F>(key: Key, fallback: F): NonNullable<this[\"_settings\"][Key]> | F;\n\tpublic get<Key extends keyof this[\"_settings\"]>(key: Key, fallback?: any): any {\n\t\tconst value = this._settings[key];\n\n\t\tif (value !== undefined) {\n\t\t\treturn value;\n\n\t\t} else {\n\t\t\treturn fallback;\n\t\t}\n\t}\n\n\tpublic set<Key extends keyof E[\"_settings\"]>(key: Key, value: E[\"_settings\"][Key]) {\n\t\tthis._settings[key] = value;\n\t\t// TODO maybe only do this if the value changed ?\n\t\tthis._template._stateChanged(this._name);\n\t}\n\n\tpublic remove<Key extends keyof this[\"_settings\"]>(key: Key) {\n\t\tdelete this._settings[key];\n\t\t// TODO maybe only do this if the value changed ?\n\t\tthis._template._stateChanged(this._name);\n\t}\n\n\tpublic setAll(settings: this[\"_settings\"]) {\n\t\t$object.keys(settings).forEach((key) => {\n\t\t\tthis._settings[key] = settings[key];\n\t\t});\n\n\t\tthis._template._stateChanged(this._name);\n\t}\n\n\tpublic _apply(other: State<E>, seen: Dirty<E[\"_settings\"]>): void {\n\t\t$object.each(this._settings, (key, value) => {\n\t\t\tif (!seen[key] && !other._userSettings[key]) {\n\t\t\t\tseen[key] = true;\n\t\t\t\tother.setRaw(key, value);\n\t\t\t}\n\t\t});\n\t}\n}\n\n\nexport class TemplateStates<E extends Entity> {\n\tprivate _template: Template<E>;\n\tprivate _states: { [key: string]: TemplateState<E> } = {};\n\n\tconstructor(template: Template<E>) {\n\t\tthis._template = template;\n\t}\n\n\tpublic _dispose() {\n\t\t$object.each(this._states, (_key, state) => {\n\t\t\tstate._dispose();\n\t\t});\n\t}\n\n\tpublic lookup(name: string): TemplateState<E> | undefined {\n\t\treturn this._states[name];\n\t}\n\n\tpublic create(name: string, settings: Partial<E[\"_settings\"]>): TemplateState<E> {\n\t\tconst state = this._states[name];\n\n\t\tif (state) {\n\t\t\tstate.setAll(settings);\n\t\t\treturn state;\n\n\t\t} else {\n\t\t\tconst state = new TemplateState(name, this._template, settings);\n\t\t\tthis._states[name] = state;\n\t\t\tthis._template._stateChanged(name);\n\t\t\treturn state;\n\t\t}\n\t}\n\n\tpublic remove(name: string) {\n\t\tdelete this._states[name];\n\t\tthis._template._stateChanged(name);\n\t}\n\n\tpublic _apply(entity: E, state: ApplyState<E>): void {\n\t\t$object.each(this._states, (key, value) => {\n\t\t\tlet seen = state.states[key];\n\n\t\t\tif (seen == null) {\n\t\t\t\tseen = state.states[key] = {};\n\t\t\t}\n\n\t\t\tconst other = entity.states.create(key as string, {});\n\t\t\tvalue._apply(other, seen);\n\t\t});\n\t}\n}\n\n\nexport class TemplateAdapters<E extends Entity> {\n\tprivate _callbacks: { [K in keyof E[\"_settings\"]]?: Array<<O extends E>(value: O[\"_settings\"][K], target: O, key: K) => O[\"_settings\"][K]> } = {};\n\n\tpublic add<Key extends keyof E[\"_settings\"]>(key: Key, callback: (value: E[\"_settings\"][Key], target: E, key: Key) => E[\"_settings\"][Key]): IDisposer {\n\t\tlet callbacks = this._callbacks[key];\n\n\t\tif (callbacks === undefined) {\n\t\t\tcallbacks = this._callbacks[key] = [];\n\t\t}\n\n\t\tcallbacks.push(callback);\n\n\t\treturn new Disposer(() => {\n\t\t\t$array.removeFirst(callbacks!, callback);\n\n\t\t\tif (callbacks!.length === 0) {\n\t\t\t\tdelete this._callbacks[key];\n\t\t\t}\n\t\t});\n\t}\n\n\tpublic remove<Key extends keyof E[\"_settings\"]>(key: Key) {\n\t\tconst callbacks = this._callbacks[key];\n\n\t\tif (callbacks !== undefined) {\n\t\t\tdelete this._callbacks[key];\n\t\t}\n\t}\n\n\tpublic _apply(entity: E): IDisposer {\n\t\tconst disposers: Array<IDisposer> = [];\n\n\t\t$object.each(this._callbacks, (key, callbacks) => {\n\t\t\t$array.each(callbacks, (callback) => {\n\t\t\t\tdisposers.push(entity.adapters.add(key, callback));\n\t\t\t});\n\t\t});\n\n\t\treturn new MultiDisposer(disposers);\n\t}\n}\n\n\nexport interface ApplyState<E extends Entity> {\n\tsettings: Dirty<E[\"_settings\"]>;\n\tprivateSettings: Dirty<E[\"_privateSettings\"]>;\n\tstates: { [name: string]: Dirty<E[\"_settings\"]> };\n}\n\n\n// TODO maybe extend from Properties ?\nexport class Template<E extends Entity> implements IDisposer {\n\tprivate _disposed: boolean = false;\n\n\tpublic _settings: Partial<E[\"_settings\"]>;\n\tpublic _privateSettings: E[\"_privateSettings\"] = {};\n\n\t// TODO code duplication with Properties\n\tpublic _settingEvents: { [K in keyof this[\"_settings\"]]?: Array<<V extends this[\"_settings\"][K]>(value: V) => void> } = {};\n\tpublic _privateSettingEvents: { [K in keyof this[\"_settings\"]]?: Array<<V extends this[\"_settings\"][K]>(value: V) => void> } = {};\n\n\tpublic _entities: Array<E> = [];\n\n\tpublic readonly states: TemplateStates<E> = new TemplateStates(this);\n\n\tpublic readonly adapters: TemplateAdapters<E> = new TemplateAdapters();\n\tpublic readonly events: EventDispatcher<Events<E, E[\"_events\"]>> = new EventDispatcher();\n\n\tpublic setup: (<O extends E>(entity: O) => void) | undefined;\n\n\t/**\n\t * Use this method to create an instance of this class.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/getting-started/#New_element_syntax} for more info\n\t * @param root Root element\n\t * @param settings Settings\n\t * @param template Template\n\t * @return Instantiated object\n\t */\n\tpublic static new<E extends Entity>(settings: E[\"_settings\"]): Template<E> {\n\t\treturn new Template<E>(settings, true);\n\t}\n\n\tprotected _dispose() {\n\t\tdisposeSettings(this._settings);\n\t\tdisposeSettings(this._privateSettings);\n\t}\n\n\t/**\n\t * Returns `true` if this element is disposed.\n\t *\n\t * @return Disposed\n\t */\n\tpublic isDisposed(): boolean {\n\t\treturn this._disposed;\n\t}\n\n\t/**\n\t * Disposes this object.\n\t */\n\tpublic dispose() {\n\t\tif (!this._disposed) {\n\t\t\tthis._disposed = true;\n\t\t\tthis._dispose();\n\t\t}\n\t}\n\n\tprivate _checkDisposed() {\n\t\tif (this._disposed) {\n\t\t\tthrow new Error(\"Template is disposed\");\n\t\t}\n\t}\n\n\t/**\n\t * Array of all entities using this template.\n\t */\n\tpublic get entities():Array<E>{\n\t\treturn this._entities;\n\t}\n\n\tconstructor(settings: E[\"_settings\"], isReal: boolean) {\n\t\tif (!isReal) {\n\t\t\tthrow new Error(\"You cannot use `new Class()`, instead use `Class.new()`\");\n\t\t}\n\n\t\tthis._settings = settings;\n\t}\n\n\tpublic get<Key extends keyof this[\"_settings\"]>(key: Key): this[\"_settings\"][Key];\n\tpublic get<Key extends keyof this[\"_settings\"], F>(key: Key, fallback: F): NonNullable<this[\"_settings\"][Key]> | F;\n\tpublic get<Key extends keyof this[\"_settings\"]>(key: Key, fallback?: any): any {\n\t\tthis._checkDisposed();\n\n\t\tconst value = this._settings[key];\n\n\t\tif (value !== undefined) {\n\t\t\treturn value;\n\n\t\t} else {\n\t\t\treturn fallback;\n\t\t}\n\t}\n\n\tpublic setRaw<Key extends keyof this[\"_settings\"]>(key: Key, value: this[\"_settings\"][Key]) {\n\t\tthis._checkDisposed();\n\t\tthis._settings[key] = value;\n\t}\n\n\tpublic set<Key extends keyof this[\"_settings\"]>(key: Key, value: this[\"_settings\"][Key]) {\n\t\tthis._checkDisposed();\n\n\t\tif (this._settings[key] !== value) {\n\t\t\tthis.setRaw(key, value);\n\n\t\t\tthis._entities.forEach((entity) => {\n\t\t\t\tentity._setTemplateProperty(this, key, value);\n\t\t\t});\n\t\t}\n\t}\n\n\tpublic remove<Key extends keyof this[\"_settings\"]>(key: Key): void {\n\t\tthis._checkDisposed();\n\n\t\tif (key in this._settings) {\n\t\t\tdelete this._settings[key];\n\n\t\t\tthis._entities.forEach((entity) => {\n\t\t\t\tentity._removeTemplateProperty(key);\n\t\t\t});\n\t\t}\n\t}\n\n\tpublic removeAll(): void {\n\t\tthis._checkDisposed();\n\n\t\t$object.each(this._settings, (key, _value) => {\n\t\t\tthis.remove(key);\n\t\t});\n\t}\n\n\tpublic getPrivate<Key extends keyof this[\"_privateSettings\"], F>(key: Key, fallback: F): NonNullable<this[\"_privateSettings\"][Key]> | F;\n\tpublic getPrivate<Key extends keyof this[\"_privateSettings\"]>(key: Key): this[\"_privateSettings\"][Key];\n\tpublic getPrivate<Key extends keyof this[\"_privateSettings\"]>(key: Key, fallback?: any): any {\n\t\tthis._checkDisposed();\n\n\t\tconst value = this._privateSettings[key];\n\n\t\tif (value !== undefined) {\n\t\t\treturn value;\n\n\t\t} else {\n\t\t\treturn fallback;\n\t\t}\n\t}\n\n\tpublic setPrivateRaw<Key extends keyof this[\"_privateSettings\"], Value extends this[\"_privateSettings\"][Key]>(key: Key, value: Value): Value {\n\t\tthis._checkDisposed();\n\t\tthis._privateSettings[key] = value;\n\t\treturn value;\n\t}\n\n\tpublic setPrivate<Key extends keyof this[\"_privateSettings\"], Value extends this[\"_privateSettings\"][Key]>(key: Key, value: Value): Value {\n\t\tthis._checkDisposed();\n\n\t\tif (this._privateSettings[key] !== value) {\n\t\t\tthis.setPrivateRaw(key, value);\n\n\t\t\tthis._entities.forEach((entity) => {\n\t\t\t\tentity._setTemplatePrivateProperty(this, key, value);\n\t\t\t});\n\t\t}\n\n\t\treturn value;\n\t}\n\n\tpublic removePrivate<Key extends keyof this[\"_privateSettings\"]>(key: Key): void {\n\t\tthis._checkDisposed();\n\n\t\tif (key in this._privateSettings) {\n\t\t\tdelete this._privateSettings[key];\n\n\t\t\tthis._entities.forEach((entity) => {\n\t\t\t\tentity._removeTemplatePrivateProperty(key);\n\t\t\t});\n\t\t}\n\t}\n\n\tpublic setAll(value: this[\"_settings\"]) {\n\t\tthis._checkDisposed();\n\n\t\t$object.each(value, (key, value) => {\n\t\t\tthis.set(key, value);\n\t\t});\n\t}\n\n\t// TODO code duplication with Properties\n\tpublic on<Key extends keyof this[\"_settings\"]>(key: Key, callback: (value: this[\"_settings\"][Key], target?: E, key?: Key) => void): IDisposer {\n\t\tthis._checkDisposed();\n\n\t\tlet events = this._settingEvents[key];\n\n\t\tif (events === undefined) {\n\t\t\tevents = this._settingEvents[key] = [];\n\t\t}\n\n\t\tevents.push(callback);\n\n\t\treturn new Disposer(() => {\n\t\t\t$array.removeFirst(events!, callback);\n\n\t\t\tif (events!.length === 0) {\n\t\t\t\tdelete this._settingEvents[key];\n\t\t\t}\n\t\t});\n\t}\n\n\t// TODO code duplication with Properties\n\tpublic onPrivate<Key extends keyof this[\"_privateSettings\"]>(key: Key, callback: (value: this[\"_privateSettings\"][Key], target?: E, key?: Key) => void): IDisposer {\n\t\tthis._checkDisposed();\n\n\t\tlet events = this._privateSettingEvents[key];\n\n\t\tif (events === undefined) {\n\t\t\tevents = this._privateSettingEvents[key] = [];\n\t\t}\n\n\t\tevents.push(callback);\n\n\t\treturn new Disposer(() => {\n\t\t\t$array.removeFirst(events!, callback);\n\n\t\t\tif (events!.length === 0) {\n\t\t\t\tdelete this._privateSettingEvents[key];\n\t\t\t}\n\t\t});\n\t}\n\n\tpublic _apply(entity: E, state: ApplyState<E>): IDisposer {\n\t\tthis._checkDisposed();\n\n\t\tconst disposers: Array<IDisposer> = [];\n\n\t\t$object.each(this._settingEvents, (key, events) => {\n\t\t\t$array.each(events, (event) => {\n\t\t\t\tdisposers.push(entity.on(key, event));\n\t\t\t});\n\t\t});\n\n\t\t$object.each(this._privateSettingEvents, (key, events) => {\n\t\t\t$array.each(events, (event) => {\n\t\t\t\tdisposers.push(entity.onPrivate(key, event));\n\t\t\t});\n\t\t});\n\n\t\tthis.states._apply(entity, state);\n\n\t\tdisposers.push(this.adapters._apply(entity));\n\t\tdisposers.push(entity.events.copyFrom(this.events));\n\n\t\treturn new MultiDisposer(disposers);\n\t}\n\n\tpublic _setObjectTemplate(entity: E) {\n\t\tthis._checkDisposed();\n\t\tthis._entities.push(entity);\n\t}\n\n\tpublic _removeObjectTemplate(entity: E) {\n\t\t//this._checkDisposed();\n\t\t$array.remove(this._entities, entity);\n\t}\n\n\tpublic _stateChanged(name: string): void {\n\t\tthis._checkDisposed();\n\n\t\tthis._entities.forEach((entity) => {\n\t\t\tentity._applyStateByKey(name);\n\t\t});\n\t}\n}\n","import { Color } from \"./Color\"\nimport type { ITextStyle } from \"../render/backend/Renderer\"\nimport * as $type from \"./Type\";\n\n/**\n * Defines an interface for an object that holds a chunk of text.\n */\nexport interface ITextChunk {\n\n\t/**\n\t * Type of the chunk.\n\t */\n\t\"type\": \"value\" | \"text\" | \"format\" | \"image\",\n\n\t/**\n\t * Text.\n\t */\n\t\"text\": string\n\n}\n\nexport class TextFormatter {\n\n\tpublic static prefix = \"__amcharts__\";\n\n\t/**\n\t * Replaces brackets with temporary placeholders.\n\t *\n\t * @ignore Exclude from docs\n\t * @param text Input text\n\t * @return Escaped text\n\t */\n\tpublic static escape(text: string): string {\n\t\treturn text.\n\t\t\treplace(/\\[\\[/g, this.prefix + \"1\").\n\t\t\treplace(/([^\\/\\]]{1})\\]\\]/g, \"$1\" + this.prefix + \"2\").\n\t\t\treplace(/\\]\\]/g, this.prefix + \"2\").\n\t\t\treplace(/\\{\\{/g, this.prefix + \"3\").\n\t\t\treplace(/\\}\\}/g, this.prefix + \"4\").\n\t\t\treplace(/\\'\\'/g, this.prefix + \"5\");\n\t}\n\n\t/**\n\t * Replaces placeholders back to brackets.\n\t *\n\t * @ignore Exclude from docs\n\t * @param text Escaped text\n\t * @return Unescaped text\n\t */\n\tpublic static unescape(text: string): string {\n\t\treturn text.\n\t\t\treplace(new RegExp(this.prefix + \"1\", \"g\"), \"[[\").\n\t\t\treplace(new RegExp(this.prefix + \"2\", \"g\"), \"]]\").\n\t\t\treplace(new RegExp(this.prefix + \"3\", \"g\"), \"{{\").\n\t\t\treplace(new RegExp(this.prefix + \"4\", \"g\"), \"}}\").\n\t\t\treplace(new RegExp(this.prefix + \"5\", \"g\"), \"''\");\n\t}\n\n\t/**\n\t * Cleans up the text text for leftover double square brackets.\n\t *\n\t * @ignore Exclude from docs\n\t * @param text Input text\n\t * @return Cleaned up text\n\t */\n\tpublic static cleanUp(text: string): string {\n\t\treturn text.\n\t\t\treplace(/\\[\\[/g, \"[\").\n\t\t\treplace(/\\]\\]/g, \"]\").\n\t\t\treplace(/\\{\\{/g, \"{\").\n\t\t\treplace(/\\}\\}/g, \"}\").\n\t\t\treplace(/\\'\\'/g, \"'\");\n\t}\n\n\t/**\n\t * Splits string into chunks. (style blocks, quoted blocks, regular blocks)\n\t *\n\t * If the second parameter `quotedBlocks` is set to `true` this method will\n\t * also single out text blocks enclosed within single quotes that no\n\t * formatting should be applied to, and they should be displayed as is.\n\t *\n\t * Default for the above is `false`, so that you can use single quote in text\n\t * without escaping it.\n\t *\n\t * If enabled, single quotes can be escaped by doubling it - adding two\n\t * single quotes, which will be replaced by a one single quote in the final\n\t * output.\n\t *\n\t * @ignore Exclude from docs\n\t * @param text Text to chunk\n\t * @param quotedBlocks Use quoted blocks\n\t * @param noFormatting Formatting blocks will be treated as regular text\n\t * @return Array of string chunks\n\t */\n\tpublic static chunk(text: string, quotedBlocks: boolean = false, noFormatting: boolean = false): ITextChunk[] {\n\n\t\t// Init result\n\t\tlet res: ITextChunk[] = [];\n\n\t\t// Replace double (escaped) square spaces and quotes with temporary codes\n\t\ttext = this.escape(text);\n\n\t\t// Deal with style blocks\n\t\tlet chunks = quotedBlocks ? text.split(\"'\") : [text];\n\t\tfor (let i: number = 0; i < chunks.length; i++) {\n\t\t\tlet chunk = chunks[i];\n\n\t\t\t// Empty?\n\t\t\tif (chunk === \"\") {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ((i % 2) === 0) {\n\n\t\t\t\t// Text outside quotes\n\t\t\t\t// Parse for style blocks which are \"text\" chunks, the rest chunks are\n\t\t\t\t// \"value\"\n\n\t\t\t\tchunk = chunk.replace(/\\]\\[/g, \"]\" + $type.PLACEHOLDER + \"[\");\n\t\t\t\tchunk = chunk.replace(/\\[\\]/g, \"[ ]\");\n\t\t\t\tlet chunks2 = chunk.split(/[\\[\\]]+/);\n\t\t\t\tfor (let i2: number = 0; i2 < chunks2.length; i2++) {\n\t\t\t\t\tlet chunk2 = this.cleanUp(this.unescape(chunks2[i2]));\n\n\t\t\t\t\t// Placeholder?\n\t\t\t\t\tif (chunk2 === $type.PLACEHOLDER) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Empty?\n\t\t\t\t\tif (chunk2 === \"\") {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Block or value\n\t\t\t\t\tif ((i2 % 2) === 0) {\n\t\t\t\t\t\tres.push({\n\t\t\t\t\t\t\t\"type\": \"value\",\n\t\t\t\t\t\t\t\"text\": chunk2\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tres.push({\n\t\t\t\t\t\t\t\"type\": noFormatting ? \"value\" : \"format\",\n\t\t\t\t\t\t\t\"text\": \"[\" + chunk2 + \"]\"\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse {\n\n\t\t\t\t// A text within doublequotes\n\t\t\t\t// All chunks are \"text\"\n\n\t\t\t\tlet chunks2 = chunk.split(/[\\[\\]]+/);\n\t\t\t\tfor (let i2: number = 0; i2 < chunks2.length; i2++) {\n\t\t\t\t\tlet chunk2 = this.cleanUp(this.unescape(chunks2[i2]));\n\n\t\t\t\t\t// Empty?\n\t\t\t\t\tif (chunk2 === \"\") {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Block or text\n\t\t\t\t\tif ((i2 % 2) === 0) {\n\t\t\t\t\t\tres.push({\n\t\t\t\t\t\t\t\"type\": \"text\",\n\t\t\t\t\t\t\t\"text\": chunk2\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\telse if (this.isImage(chunk2)) {\n\t\t\t\t\t\tres.push({\n\t\t\t\t\t\t\t\"type\": \"image\",\n\t\t\t\t\t\t\t\"text\": \"[\" + chunk2 + \"]\"\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tres.push({\n\t\t\t\t\t\t\t\"type\": \"format\",\n\t\t\t\t\t\t\t\"text\": \"[\" + chunk2 + \"]\"\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\t\treturn res;\n\t}\n\n\t/**\n\t * Checks if supplied format contains image information and should be\n\t * formatted as such.\n\t * I.e.: `[img: myImage.png]`\n\t *\n\t * @ignore\n\t * @param text Format\n\t * @return true if it is an image\n\t */\n\tpublic static isImage(text: string): boolean {\n\t\treturn text.match(/img[ ]?:/) ? true : false;\n\t}\n\n\tpublic static getTextStyle(style: string): ITextStyle {\n\n\t\t// let textStyle: string[] = [];\n\t\t// let textFill: string | undefined;\n\t\tlet format: ITextStyle = {};\n\n\t\tif (style == \"\" || style == \"[ ]\") {\n\t\t\treturn {};\n\t\t}\n\n\t\t// Pre-process quoted text\n\t\tconst q = style.match(/('[^']*')|(\"[^\"]*\")/gi);\n\t\tif (q) {\n\t\t\tfor (let i: number = 0; i < q.length; i++) {\n\t\t\t\tstyle = style.replace(q[i], q[i].replace(/['\"]*/g, \"\").replace(/[ ]+/g, \"+\"));\n\t\t\t}\n\t\t}\n\n\t\t// Get style parts\n\t\tlet b: string[] | null = style.match(/([\\w\\-]*:[\\s]?[^;\\s\\]]*)|(\\#[\\w]{1,6})|([\\w\\-]+)|(\\/)/gi);\n\n\t\t// Empty?\n\t\tif (!b) {\n\t\t\treturn {};\n\t\t}\n\n\t\t// Check each part\n\t\tfor (let i: number = 0; i < b.length; i++) {\n\n\t\t\tif (b[i].match(/^(normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900)$/i)) {\n\t\t\t\t(<any>format).fontWeight = b[i];\n\t\t\t}\n\t\t\telse if (b[i].match(/^(underline|line-through)$/i)) {\n\t\t\t\t(<any>format).textDecoration = b[i];\n\t\t\t}\n\t\t\telse if (b[i] == \"/\") {\n\t\t\t\t// Just closing tag\n\t\t\t\t// Do nothing\n\t\t\t}\n\t\t\telse if (!b[i].match(/:/)) {\n\t\t\t\t// Color\n\t\t\t\tformat.fill = Color.fromString(b[i]);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tconst p = b[i].replace(\"+\", \" \").split(/:[ ]*/);\n\t\t\t\t(<any>format)[p[0]] = p[1];\n\t\t\t\t//textStyle.push(b[i].replace(/^[a-zA-Z]:[ ]*/, \"\"));\n\t\t\t\t//b[i] = b[i].replace(/\\+/g, \" \");\n\t\t\t}\n\n\t\t}\n\n\t\treturn format;\n\t}\n\n}\n","/**\n * ============================================================================\n * IMPORTS\n * ============================================================================\n * @hidden\n */\nimport * as $type from \"./Type\";\nimport * as $utils from \"./Utils\";\nimport type { Timezone } from \"./Timezone\";\nimport type { Root } from \"../Root\";\n\nexport type TimeUnit = \"millisecond\" | \"second\" | \"minute\" | \"hour\" | \"day\" | \"week\" | \"month\" | \"year\";\n\nexport interface ITimeInterval {\n\ttimeUnit: TimeUnit;\n\tcount: number;\n}\n\n\n/**\n * Returns a `Promise` which can be used to execute code after number of\n * milliseconds.\n *\n * @param ms Sleep duration in ms\n * @return Promise\n */\nexport function sleep(ms: number): Promise<void> {\n\treturn new Promise((resolve, _reject) => {\n\t\tsetTimeout(resolve, ms);\n\t});\n}\n\n\n/**\n * Maps time period names to their numeric representations in milliseconds.\n *\n * @ignore Exclude from docs\n */\nexport let timeUnitDurations: { [Key in TimeUnit]: number } = {\n\tmillisecond: 1,\n\tsecond: 1000,\n\tminute: 60000,\n\thour: 3600000,\n\tday: 86400000,\n\tweek: 604800000,\n\tmonth: 365.242 / 12 * 86400000,\n\tyear: 31536000000\n};\n\n/**\n * Returns the next time unit that goes after source `unit`.\n *\n * E.g. \"hour\" is the next unit after \"minute\", etc.\n *\n * @ignore Exclude from docs\n * @param unit Source time unit\n * @return Next time unit\n */\nexport function getNextUnit(unit: TimeUnit): TimeUnit | undefined {\n\tswitch (unit) {\n\t\tcase \"year\":\n\t\t\treturn;\n\t\tcase \"month\":\n\t\t\treturn \"year\";\n\n\t\tcase \"week\":\n\t\t\treturn \"month\";\n\n\t\tcase \"day\":\n\t\t\treturn \"month\"; // not a mistake\n\n\t\tcase \"hour\":\n\t\t\treturn \"day\";\n\n\t\tcase \"minute\":\n\t\t\treturn \"hour\";\n\n\t\tcase \"second\":\n\t\t\treturn \"minute\"\n\n\t\tcase \"millisecond\":\n\t\t\treturn \"second\";\n\t}\n}\n\n/**\n * Returns number of milliseconds in the `count` of time `unit`.\n *\n * Available units: \"millisecond\", \"second\", \"minute\", \"hour\", \"day\", \"week\",\n * \"month\", and \"year\".\n *\n * @param unit Time unit\n * @param count Number of units\n * @return Milliseconds\n */\nexport function getDuration(unit: TimeUnit, count?: number): number {\n\tif (count == null) {\n\t\tcount = 1;\n\t}\n\treturn timeUnitDurations[unit] * count;\n}\n\n/**\n * @ignore\n */\nexport function getIntervalDuration(interval: ITimeInterval | undefined) {\n\tif (interval) {\n\t\treturn timeUnitDurations[interval.timeUnit] * interval.count;\n\t}\n\treturn 0;\n}\n\n\nexport function getDateIntervalDuration(interval: ITimeInterval, date: Date, firstDateOfWeek?: number, utc?: boolean, timezone?: Timezone) {\n\tconst unit = interval.timeUnit;\n\tconst count = interval.count;\n\tif (unit == \"hour\" || unit == \"minute\" || unit == \"second\" || unit == \"millisecond\") {\n\t\treturn timeUnitDurations[interval.timeUnit] * interval.count;\n\t}\n\telse {\n\t\tconst firstTime = round(new Date(date.getTime()), unit, count, firstDateOfWeek, utc, undefined, timezone).getTime();\n\t\tlet lastTime = firstTime + count * getDuration(unit) * 1.05;\n\t\tlastTime = round(new Date(lastTime), unit, 1, firstDateOfWeek, utc, undefined, timezone).getTime();\n\t\treturn lastTime - firstTime;\n\t}\n}\n\n/**\n * Returns current `Date` object.\n *\n * @return Current date\n */\nexport function now(): Date {\n\treturn new Date();\n}\n\n/**\n * Returns current timestamp.\n *\n * @return Current timestamp\n */\nexport function getTime(): number {\n\treturn now().getTime();\n}\n\n/**\n * Returns a copy of the `Date` object.\n *\n * @param date Source date\n * @return Copy\n */\nexport function copy(date: Date): Date {\n\treturn new Date(date.getTime()); // todo: check if this is ok. new Date(date) used to strip milliseconds on FF in v3\n}\n\n/**\n * Checks if the `unit` part of two `Date` objects do not match. Two dates\n * represent a \"range\" of time, rather the same time date.\n *\n * @param timeOne timestamp\n * @param timeTwo timestamp\n * @param unit Time unit to check\n * @return Range?\n */\nexport function checkChange(timeOne: number, timeTwo: number, unit: TimeUnit, utc?: boolean, timezone?: Timezone): boolean {\n\t// quick\n\tif ((timeTwo - timeOne) > getDuration(unit, 1.2)) {\n\t\treturn true;\n\t}\n\n\tlet dateOne = new Date(timeOne);\n\tlet dateTwo = new Date(timeTwo);\n\n\tif (timezone) {\n\t\tdateOne = timezone.convertLocal(dateOne);\n\t\tdateTwo = timezone.convertLocal(dateTwo);\n\t}\n\n\tlet timeZoneOffset1 = 0;\n\tlet timeZoneOffset2 = 0;\n\n\tif (!utc && unit != \"millisecond\") {\n\t\ttimeZoneOffset1 = dateOne.getTimezoneOffset();\n\t\tdateOne.setUTCMinutes(dateOne.getUTCMinutes() - timeZoneOffset1);\n\n\t\ttimeZoneOffset2 = dateTwo.getTimezoneOffset();\n\t\tdateTwo.setUTCMinutes(dateTwo.getUTCMinutes() - timeZoneOffset2);\n\t}\n\n\tlet changed = false;\n\tswitch (unit) {\n\t\tcase \"year\":\n\t\t\tif (dateOne.getUTCFullYear() != dateTwo.getUTCFullYear()) {\n\t\t\t\tchanged = true;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase \"month\":\n\t\t\tif (dateOne.getUTCFullYear() != dateTwo.getUTCFullYear()) {\n\t\t\t\tchanged = true;\n\t\t\t}\n\t\t\telse if (dateOne.getUTCMonth() != dateTwo.getUTCMonth()) {\n\t\t\t\tchanged = true;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase \"day\":\n\t\t\tif (dateOne.getUTCMonth() != dateTwo.getUTCMonth()) {\n\t\t\t\tchanged = true;\n\t\t\t}\n\t\t\telse if (dateOne.getUTCDate() != dateTwo.getUTCDate()) {\n\t\t\t\tchanged = true;\n\t\t\t}\n\n\t\t\tbreak;\n\n\t\tcase \"hour\":\n\t\t\tif (dateOne.getUTCHours() != dateTwo.getUTCHours()) {\n\t\t\t\tchanged = true;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase \"minute\":\n\t\t\tif (dateOne.getUTCMinutes() != dateTwo.getUTCMinutes()) {\n\t\t\t\tchanged = true;\n\t\t\t}\n\n\t\t\tbreak;\n\n\t\tcase \"second\":\n\t\t\tif (dateOne.getUTCSeconds() != dateTwo.getUTCSeconds()) {\n\t\t\t\tchanged = true;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase \"millisecond\":\n\t\t\tif (dateOne.getTime() != dateTwo.getTime()) {\n\t\t\t\tchanged = true;\n\t\t\t}\n\t\t\tbreak;\n\t}\n\n\tif (changed) {\n\t\treturn changed;\n\t}\n\n\tlet nextUnit = getNextUnit(unit);\n\tif (nextUnit) {\n\t\treturn checkChange(timeOne, timeTwo, nextUnit, utc, timezone);\n\t}\n\telse {\n\t\treturn false;\n\t}\n}\n\n/**\n * Adds `count` of time `unit` to the source date. Returns a modified `Date` object.\n *\n * @param date Source date\n * @param unit Time unit\n * @param count Number of units to add\n * @return Modified date\n */\nexport function add(date: Date, unit: TimeUnit, count: number, utc?: boolean, timezone?: Timezone): Date {\n\tlet timeZoneOffset = 0;\n\n\tif (!utc && unit != \"millisecond\") {\n\t\ttimeZoneOffset = date.getTimezoneOffset();\n\n\t\tif (timezone) {\n\t\t\ttimeZoneOffset -= timezone.offsetUTC(date);\n\t\t}\n\n\t\tdate.setUTCMinutes(date.getUTCMinutes() - timeZoneOffset);\n\t}\n\n\n\tswitch (unit) {\n\t\tcase \"day\":\n\t\t\tlet day: number = date.getUTCDate();\n\t\t\tdate.setUTCDate(day + count);\n\t\t\tbreak;\n\n\t\tcase \"second\":\n\t\t\tlet seconds: number = date.getUTCSeconds();\n\t\t\tdate.setUTCSeconds(seconds + count);\n\t\t\tbreak;\n\n\t\tcase \"millisecond\":\n\t\t\tlet milliseconds: number = date.getUTCMilliseconds();\n\t\t\tdate.setUTCMilliseconds(milliseconds + count);\n\t\t\tbreak;\n\n\t\tcase \"hour\":\n\t\t\tlet hours: number = date.getUTCHours();\n\t\t\tdate.setUTCHours(hours + count);\n\t\t\tbreak;\n\n\t\tcase \"minute\":\n\t\t\tlet minutes: number = date.getUTCMinutes();\n\t\t\tdate.setUTCMinutes(minutes + count);\n\t\t\tbreak;\n\n\t\tcase \"year\":\n\t\t\tlet year: number = date.getUTCFullYear();\n\t\t\tdate.setUTCFullYear(year + count);\n\t\t\tbreak;\n\n\t\tcase \"month\":\n\t\t\tconst endDays = date.getUTCDate();\n\t\t\tconst startDays = new Date(date.getUTCFullYear(), date.getUTCMonth(), 0).getUTCDate();\n\t\t\tlet month: number = date.getUTCMonth();\n\t\t\tif (endDays > startDays) {\n\t\t\t\tdate.setUTCMonth(month + count, startDays);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tdate.setUTCMonth(month + count);\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase \"week\":\n\t\t\tlet wday: number = date.getUTCDate();\n\t\t\tdate.setUTCDate(wday + count * 7);\n\t\t\tbreak;\n\t}\n\n\n\tif (!utc && unit != \"millisecond\") {\n\t\tdate.setUTCMinutes(date.getUTCMinutes() + timeZoneOffset);\n\t\tif (unit == \"day\" || unit == \"week\" || unit == \"month\" || unit == \"year\") {\n\n\t\t\tlet newTimeZoneOffset = date.getTimezoneOffset();\n\n\t\t\tif (timezone) {\n\t\t\t\tnewTimeZoneOffset += timezone.offsetUTC(date);\n\t\t\t}\n\n\t\t\tif (newTimeZoneOffset != timeZoneOffset) {\n\t\t\t\tlet diff = newTimeZoneOffset - timeZoneOffset;\n\t\t\t\tdate.setUTCMinutes(date.getUTCMinutes() + diff);\n\n\t\t\t\t// solves issues if new time falls back to old time zone\n\t\t\t\tif (date.getTimezoneOffset() != newTimeZoneOffset) {\n\t\t\t\t\tdate.setUTCMinutes(date.getUTCMinutes() - diff);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn date;\n}\n\n/**\n * @ignore\n */\nexport function roun(time: number, unit: TimeUnit, count: number, root: Root, firstTime?: number): number {\n\tlet firstDate;\n\tif (firstTime != null) {\n\t\tfirstDate = new Date(firstTime);\n\t}\n\treturn round(new Date(time), unit, count, root.locale.firstDayOfWeek, root.utc, firstDate, root.timezone).getTime();\n}\n\n\n/**\n * \"Rounds\" the date to specific time unit.\n *\n * @param date Source date\n * @param unit Time unit\n * @param count Number of units to round to\n * @param firstDateOfWeek First day of week\n * @param utc Use UTC timezone\n * @param firstDate First date to round to\n * @param roundMinutes Minutes to round to (some timezones use non-whole hour)\n * @param timezone Use specific named timezone when rounding\n * @return New date\n */\nexport function round(date: Date, unit: TimeUnit, count: number, firstDateOfWeek?: number, utc?: boolean, firstDate?: Date, timezone?: Timezone): Date {\n\tif (!timezone || utc) {\n\n\t\tlet timeZoneOffset = 0;\n\n\t\tif (!utc && unit != \"millisecond\") {\n\t\t\ttimeZoneOffset = date.getTimezoneOffset();\n\t\t\tdate.setUTCMinutes(date.getUTCMinutes() - timeZoneOffset);\n\t\t}\n\n\t\tswitch (unit) {\n\n\t\t\tcase \"day\":\n\t\t\t\tlet day = date.getUTCDate();\n\n\t\t\t\tif (count > 1) {\n\t\t\t\t\t//\tday = Math.floor(day / count) * count;\n\t\t\t\t\tif (firstDate) {\n\t\t\t\t\t\tfirstDate = round(firstDate, \"day\", 1);\n\n\t\t\t\t\t\tlet difference = date.getTime() - firstDate.getTime();\n\t\t\t\t\t\tlet unitCount = Math.floor(difference / getDuration(\"day\") / count);\n\t\t\t\t\t\tlet duration = getDuration(\"day\", unitCount * count);\n\t\t\t\t\t\tdate.setTime(firstDate.getTime() + duration - timeZoneOffset * getDuration(\"minute\"));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tdate.setUTCDate(day);\n\t\t\t\t}\n\t\t\t\tdate.setUTCHours(0, 0, 0, 0);\n\n\t\t\t\tbreak;\n\n\t\t\tcase \"second\":\n\t\t\t\tlet seconds = date.getUTCSeconds();\n\t\t\t\tif (count > 1) {\n\t\t\t\t\tseconds = Math.floor(seconds / count) * count;\n\t\t\t\t}\n\t\t\t\tdate.setUTCSeconds(seconds, 0);\n\t\t\t\tbreak;\n\n\t\t\tcase \"millisecond\":\n\t\t\t\tif (count == 1) {\n\t\t\t\t\treturn date; // much better for perf!\n\t\t\t\t}\n\n\t\t\t\tlet milliseconds = date.getUTCMilliseconds();\n\t\t\t\tmilliseconds = Math.floor(milliseconds / count) * count;\n\t\t\t\tdate.setUTCMilliseconds(milliseconds);\n\t\t\t\tbreak;\n\n\t\t\tcase \"hour\":\n\n\t\t\t\tlet hours = date.getUTCHours();\n\t\t\t\tif (count > 1) {\n\t\t\t\t\thours = Math.floor(hours / count) * count;\n\t\t\t\t}\n\t\t\t\tdate.setUTCHours(hours, 0, 0, 0);\n\n\t\t\t\tbreak;\n\n\t\t\tcase \"minute\":\n\n\t\t\t\tlet minutes = date.getUTCMinutes();\n\t\t\t\tif (count > 1) {\n\t\t\t\t\tminutes = Math.floor(minutes / count) * count;\n\t\t\t\t}\n\n\t\t\t\tdate.setUTCMinutes(minutes, 0, 0);\n\n\t\t\t\tbreak;\n\n\t\t\tcase \"month\":\n\n\t\t\t\tlet month = date.getUTCMonth();\n\t\t\t\tif (count > 1) {\n\t\t\t\t\tmonth = Math.floor(month / count) * count;\n\t\t\t\t}\n\n\t\t\t\tdate.setUTCMonth(month, 1);\n\t\t\t\tdate.setUTCHours(0, 0, 0, 0);\n\n\t\t\t\tbreak;\n\n\t\t\tcase \"year\":\n\n\t\t\t\tlet year = date.getUTCFullYear();\n\t\t\t\tif (count > 1) {\n\t\t\t\t\tyear = Math.floor(year / count) * count;\n\t\t\t\t}\n\t\t\t\tdate.setUTCFullYear(year, 0, 1);\n\t\t\t\tdate.setUTCHours(0, 0, 0, 0);\n\t\t\t\tbreak;\n\n\t\t\tcase \"week\":\n\n\t\t\t\tif (count > 1) {\n\t\t\t\t\tif (firstDate) {\n\t\t\t\t\t\tfirstDate = round(firstDate, \"week\", 1);\n\n\t\t\t\t\t\tlet difference = date.getTime() - firstDate.getTime();\n\t\t\t\t\t\tlet unitCount = Math.floor(difference / getDuration(\"week\") / count);\n\t\t\t\t\t\tlet duration = getDuration(\"week\", unitCount * count);\n\n\t\t\t\t\t\tdate.setTime(firstDate.getTime() + duration - timeZoneOffset * getDuration(\"minute\"));\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tlet wday = date.getUTCDate();\n\t\t\t\tlet weekDay = date.getUTCDay();\n\n\t\t\t\tif (!$type.isNumber(firstDateOfWeek)) {\n\t\t\t\t\tfirstDateOfWeek = 1;\n\t\t\t\t}\n\n\t\t\t\tif (weekDay >= firstDateOfWeek) {\n\t\t\t\t\twday = wday - weekDay + firstDateOfWeek;\n\t\t\t\t} else {\n\t\t\t\t\twday = wday - (7 + weekDay) + firstDateOfWeek;\n\t\t\t\t}\n\n\t\t\t\tdate.setUTCDate(wday);\n\t\t\t\tdate.setUTCHours(0, 0, 0, 0);\n\n\t\t\t\tbreak;\n\t\t}\n\t\tif (!utc && unit != \"millisecond\") {\n\t\t\tdate.setUTCMinutes(date.getUTCMinutes() + timeZoneOffset);\n\n\t\t\tif (unit == \"day\" || unit == \"week\" || unit == \"month\" || unit == \"year\") {\n\t\t\t\tlet newTimeZoneOffset = date.getTimezoneOffset();\n\t\t\t\tif (newTimeZoneOffset != timeZoneOffset) {\n\t\t\t\t\tlet diff = newTimeZoneOffset - timeZoneOffset;\n\n\t\t\t\t\tdate.setUTCMinutes(date.getUTCMinutes() + diff);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn date;\n\t}\n\telse {\n\t\tif (isNaN(date.getTime())) {\n\t\t\treturn date;\n\t\t}\n\t\tlet tzoffset = timezone.offsetUTC(date);\n\t\tlet timeZoneOffset = date.getTimezoneOffset();\n\t\tlet parsedDate = timezone.parseDate(date);\n\t\tlet year = parsedDate.year;\n\t\tlet month = parsedDate.month;\n\t\tlet day = parsedDate.day;\n\t\tlet hour = parsedDate.hour;\n\t\tlet minute = parsedDate.minute;\n\t\tlet second = parsedDate.second;\n\t\tlet millisecond = parsedDate.millisecond;\n\t\tlet weekday = parsedDate.weekday;\n\n\t\tlet offsetDif = tzoffset - timeZoneOffset;\n\n\t\tswitch (unit) {\n\n\t\t\tcase \"day\":\n\t\t\t\tif (count > 1 && firstDate) {\n\t\t\t\t\tfirstDate = round(firstDate, \"day\", 1, firstDateOfWeek, utc, undefined, timezone);\n\t\t\t\t\tlet difference = date.getTime() - firstDate.getTime();\n\t\t\t\t\tlet unitCount = Math.floor(difference / getDuration(\"day\") / count);\n\t\t\t\t\tlet duration = getDuration(\"day\", unitCount * count);\n\t\t\t\t\tdate.setTime(firstDate.getTime() + duration);\n\n\t\t\t\t\tparsedDate = timezone.parseDate(date);\n\n\t\t\t\t\tyear = parsedDate.year;\n\t\t\t\t\tmonth = parsedDate.month;\n\t\t\t\t\tday = parsedDate.day;\n\t\t\t\t}\n\n\t\t\t\thour = 0;\n\t\t\t\tminute = offsetDif;\n\n\t\t\t\tsecond = 0;\n\t\t\t\tmillisecond = 0;\n\n\t\t\t\tbreak;\n\n\t\t\tcase \"second\":\n\t\t\t\tminute += offsetDif;\n\t\t\t\tif (count > 1) {\n\t\t\t\t\tsecond = Math.floor(second / count) * count;\n\t\t\t\t}\n\t\t\t\tmillisecond = 0;\n\t\t\t\tbreak;\n\n\t\t\tcase \"millisecond\":\n\t\t\t\tminute += offsetDif;\n\t\t\t\tif (count > 1) {\n\t\t\t\t\tmillisecond = Math.floor(millisecond / count) * count;\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase \"hour\":\n\t\t\t\tif (count > 1) {\n\t\t\t\t\thour = Math.floor(hour / count) * count;\n\t\t\t\t}\n\t\t\t\tminute = offsetDif;\n\t\t\t\tsecond = 0;\n\t\t\t\tmillisecond = 0;\n\t\t\t\tbreak;\n\n\t\t\tcase \"minute\":\n\t\t\t\tif (count > 1) {\n\t\t\t\t\tminute = Math.floor(minute / count) * count;\n\t\t\t\t}\n\t\t\t\tminute += offsetDif;\n\t\t\t\tsecond = 0;\n\t\t\t\tmillisecond = 0;\n\t\t\t\tbreak;\n\n\t\t\tcase \"month\":\n\t\t\t\tif (count > 1) {\n\t\t\t\t\tmonth = Math.floor(month / count) * count;\n\t\t\t\t}\n\t\t\t\tday = 1;\n\t\t\t\thour = 0;\n\t\t\t\tminute = offsetDif;\n\t\t\t\tsecond = 0;\n\t\t\t\tmillisecond = 0;\n\t\t\t\tbreak;\n\n\t\t\tcase \"year\":\n\t\t\t\tif (count > 1) {\n\t\t\t\t\tyear = Math.floor(year / count) * count;\n\t\t\t\t}\n\t\t\t\tmonth = 0;\n\t\t\t\tday = 1;\n\t\t\t\thour = 0;\n\t\t\t\tminute = offsetDif;\n\t\t\t\tsecond = 0;\n\t\t\t\tmillisecond = 0;\n\t\t\t\tbreak;\n\n\t\t\tcase \"week\":\n\t\t\t\tif (!$type.isNumber(firstDateOfWeek)) {\n\t\t\t\t\tfirstDateOfWeek = 1;\n\t\t\t\t}\n\n\t\t\t\tif (weekday >= firstDateOfWeek) {\n\t\t\t\t\tday = day - weekday + firstDateOfWeek;\n\t\t\t\t} else {\n\t\t\t\t\tday = day - (7 + weekday) + firstDateOfWeek;\n\t\t\t\t}\n\n\t\t\t\thour = 0;\n\t\t\t\tminute = offsetDif;\n\t\t\t\tsecond = 0;\n\t\t\t\tmillisecond = 0;\n\t\t\t\tbreak;\n\t\t}\n\n\t\tdate = new Date(year, month, day, hour, minute, second, millisecond);\n\n\t\tlet newTimeZoneOffset = date.getTimezoneOffset();\n\t\tlet newTzoffset = timezone.offsetUTC(date);\n\t\tlet newDiff = newTzoffset - newTimeZoneOffset;\n\n\t\tif (newDiff != offsetDif) {\n\t\t\tdate.setTime(date.getTime() + (newDiff - offsetDif) * 60000);\n\t\t}\n\n\t\treturn date;\n\t}\n}\n\n\n\n/**\n * @ignore\n */\nexport function chooseInterval(index: number, duration: number, gridCount: number, intervals: Array<ITimeInterval>): ITimeInterval {\n\tlet gridInterval: ITimeInterval = intervals[index];\n\tlet intervalDuration = getIntervalDuration(gridInterval);\n\n\tlet lastIndex = intervals.length - 1;\n\tif (index >= lastIndex) {\n\t\treturn { ...intervals[lastIndex] };\n\t}\n\n\tlet count = Math.ceil(duration / intervalDuration);\n\n\tif (duration < intervalDuration && index > 0) {\n\t\treturn { ...intervals[index - 1] };\n\t}\n\tif (count <= gridCount) {\n\t\treturn { ...intervals[index] };\n\t} else {\n\t\tif (index + 1 < intervals.length) {\n\t\t\treturn chooseInterval(index + 1, duration, gridCount, intervals);\n\t\t} else {\n\t\t\treturn { ...intervals[index] };\n\t\t}\n\t}\n}\n\n/**\n * @ignore\n */\nexport function getUnitValue(date: Date, unit: TimeUnit) {\n\tswitch (unit) {\n\t\tcase \"day\":\n\t\t\treturn date.getDate();\n\t\tcase \"second\":\n\t\t\treturn date.getSeconds();\n\t\tcase \"millisecond\":\n\t\t\treturn date.getMilliseconds();\n\t\tcase \"hour\":\n\t\t\treturn date.getHours();\n\t\tcase \"minute\":\n\t\t\treturn date.getMinutes();\n\t\tcase \"month\":\n\t\t\treturn date.getMonth();\n\t\tcase \"year\":\n\t\t\treturn date.getFullYear();\n\t\tcase \"week\":\n\t\t\treturn $utils.getWeek(date);\n\t}\n}\n","interface ParsedDate {\n\tyear: number,\n\tmonth: number,\n\tday: number,\n\thour: number,\n\tminute: number,\n\tsecond: number,\n\tmillisecond: number,\n\tweekday: number\n}\n\nfunction parseDate(timezone: Intl.DateTimeFormat, date: Date): ParsedDate {\n\tlet year = 0;\n\tlet month = 0;\n\tlet day = 1;\n\tlet hour = 0;\n\tlet minute = 0;\n\tlet second = 0;\n\tlet millisecond = 0;\n\tlet weekday = 0;\n\n\n\n\ttimezone.formatToParts(date).forEach((x) => {\n\n\t\tswitch (x.type) {\n\t\t\tcase \"year\":\n\t\t\t\tyear = +x.value;\n\t\t\t\tbreak;\n\t\t\tcase \"month\":\n\t\t\t\tmonth = (+x.value) - 1;\n\t\t\t\tbreak;\n\t\t\tcase \"day\":\n\t\t\t\tday = +x.value;\n\t\t\t\tbreak;\n\t\t\tcase \"hour\":\n\t\t\t\thour = +x.value;\n\t\t\t\tbreak;\n\t\t\tcase \"minute\":\n\t\t\t\tminute = +x.value;\n\t\t\t\tbreak;\n\t\t\tcase \"second\":\n\t\t\t\tsecond = +x.value;\n\t\t\t\tbreak;\n\t\t\tcase \"fractionalSecond\" as any:\n\t\t\t\tmillisecond = +x.value;\n\t\t\t\tbreak;\n\t\t\tcase \"weekday\":\n\t\t\t\tswitch (x.value) {\n\t\t\t\t\tcase \"Sun\":\n\t\t\t\t\t\tweekday = 0;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"Mon\":\n\t\t\t\t\t\tweekday = 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"Tue\":\n\t\t\t\t\t\tweekday = 2;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"Wed\":\n\t\t\t\t\t\tweekday = 3;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"Thu\":\n\t\t\t\t\t\tweekday = 4;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"Fri\":\n\t\t\t\t\t\tweekday = 5;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"Sat\":\n\t\t\t\t\t\tweekday = 6;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t}\n\t});\n\n\tif (hour === 24) {\n\t\thour = 0;\n\t}\n\n\treturn { year, month, day, hour, minute, second, millisecond, weekday };\n}\n\n\nfunction toUTCDate(timezone: Intl.DateTimeFormat, date: Date): number {\n\tconst { year, month, day, hour, minute, second, millisecond } = parseDate(timezone, date);\n\treturn Date.UTC(year, month, day, hour, minute, second, millisecond);\n}\n\n\nexport class Timezone {\n\tprivate _utc: Intl.DateTimeFormat;\n\tprivate _dtf: Intl.DateTimeFormat;\n\n\tpublic readonly name: string | undefined;\n\n\t/**\n\t * Use this method to create an instance of this class.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/getting-started/#New_element_syntax} for more info\n\t * @param timezone IANA timezone\n\t * @return Instantiated object\n\t */\n\tstatic new<C extends typeof Timezone, T extends InstanceType<C>>(this: C, timezone: string | undefined): T {\n\t\treturn (new this(timezone, true)) as T;\n\t}\n\n\tconstructor(timezone: string | undefined, isReal: boolean) {\n\t\tif (!isReal) {\n\t\t\tthrow new Error(\"You cannot use `new Class()`, instead use `Class.new()`\");\n\t\t}\n\n\t\tthis.name = timezone;\n\n\t\tthis._utc = new Intl.DateTimeFormat(\"en-US\", {\n\t\t\thour12: false,\n\t\t\ttimeZone: \"UTC\",\n\t\t\tyear: \"numeric\",\n\t\t\tmonth: \"2-digit\",\n\t\t\tday: \"2-digit\",\n\t\t\thour: \"2-digit\",\n\t\t\tminute: \"2-digit\",\n\t\t\tsecond: \"2-digit\",\n\t\t\tweekday: \"short\",\n\t\t\tfractionalSecondDigits: 3,\n\t\t} as any);\n\n\t\tthis._dtf = new Intl.DateTimeFormat(\"en-US\", {\n\t\t\thour12: false,\n\t\t\ttimeZone: timezone,\n\t\t\tyear: \"numeric\",\n\t\t\tmonth: \"2-digit\",\n\t\t\tday: \"2-digit\",\n\t\t\thour: \"2-digit\",\n\t\t\tminute: \"2-digit\",\n\t\t\tsecond: \"2-digit\",\n\t\t\tweekday: \"short\",\n\t\t\tfractionalSecondDigits: 3,\n\t\t} as any);\n\t}\n\n\tconvertLocal(date: Date): Date {\n\t\tconst offset = this.offsetUTC(date);\n\t\tconst userOffset = date.getTimezoneOffset();\n\t\tconst output = new Date(date);\n\t\toutput.setUTCMinutes(output.getUTCMinutes() - (offset - userOffset));\n\n\t\tconst newUserOffset = output.getTimezoneOffset();\n\n\t\tif (userOffset != newUserOffset) {\n\t\t\toutput.setUTCMinutes(output.getUTCMinutes() + newUserOffset - userOffset)\n\t\t}\n\n\t\treturn output;\n\t}\n\n\toffsetUTC(date: Date): number {\n\t\tconst utc = toUTCDate(this._utc, date);\n\t\tconst dtf = toUTCDate(this._dtf, date);\n\t\treturn (utc - dtf) / 60000;\n\t}\n\n\tparseDate(date: Date): ParsedDate {\n\t\treturn parseDate(this._dtf, date)\n\t}\n}\n","/**\n * A collection of utility functions for various type checks and conversion\n * @hidden\n */\n\n/**\n * ============================================================================\n * IMPORTS\n * ============================================================================\n * @hidden\n */\n\n/**\n * ============================================================================\n * MISC\n * ============================================================================\n * @hidden\n */\n\ntype Cond<T, Keys extends keyof T> = Keys extends never\n\t? never\n\t: { [K in Keys]: T[K] };\n\ntype Never<T> = T extends undefined ? never : T;\n\n/**\n * Selects all the keys of T which have a value of U.\n */\nexport type SelectKeys<T, U> = Never<{ [K in keyof T]: T[K] extends U ? K : never }[keyof T]>;\n\n/**\n * Creates a new type which is the same as T except it only has the properties of type U.\n */\nexport type Select<T, U> = Cond<T, SelectKeys<T, U>>;\n\n\n/**\n * @todo Description\n * @ignore Exclude from docs\n */\nexport type Public<T> = { [P in keyof T]: T[P] };\n\n\n/**\n * `Keyof<T>` is the same as `keyof T` except it only accepts string keys, not numbers or symbols.\n */\nexport type Keyof<T> = Extract<keyof T, string>;\n\n\n\n/**\n * ============================================================================\n * TYPE CHECK\n * ============================================================================\n * @hidden\n */\n\n/**\n * Returns `true` if value is not a number (NaN).\n *\n * @param value Input value\n * @return Is NaN?\n */\nexport function isNaN(value: number): boolean {\n\treturn Number(value) !== value;\n}\n\n/**\n * Represents a type for all available JavaScript variable types.\n */\nexport type Type\n\t= \"[object Object]\"\n\t| \"[object Array]\"\n\t| \"[object String]\"\n\t| \"[object Number]\"\n\t| \"[object Boolean]\"\n\t| \"[object Date]\";\n\n/**\n * Returns a type of the value.\n *\n * @param value Input value\n * @return Type of the value\n * @ignore\n */\nexport function getType<A>(value: A): Type {\n\treturn ({}).toString.call(value) as Type;\n}\n\n\n/**\n * Asserts that the condition is true.\n *\n * @param condition Condition to check\n * @param message Message to display in the error\n * @ignore\n */\nexport function assert(condition: boolean, message: string = \"Assertion failed\"): asserts condition {\n\tif (!condition) {\n\t\tthrow new Error(message);\n\t}\n}\n\n\n/**\n * ============================================================================\n * QUICK CONVERSION\n * ============================================================================\n * @hidden\n */\n\n\n/**\n * Converts any value into a `number`.\n *\n * @param value Source value\n * @return Number representation of value\n */\nexport function toNumber(value: any): number {\n\tif (value != null && !isNumber(value)) {\n\t\tlet converted = Number(value);\n\t\tif (isNaN(converted) && isString(value) && value != \"\") {\n\t\t\treturn toNumber(value.replace(/[^0-9.\\-]+/g, ''));\n\t\t}\n\t\treturn converted;\n\t}\n\treturn value;\n}\n\n\n\n/**\n * Converts anything to Date object.\n *\n * @param value A value of any type\n * @return Date object representing a value\n */\nexport function toDate(value: Date | number | string): Date {\n\tif (isDate(value)) {\n\t\t// TODO maybe don't create a new Date ?\n\t\treturn new Date(value);\n\t}\n\n\telse if (isNumber(value)) {\n\t\treturn new Date(value);\n\t}\n\n\telse {\n\t\t// Try converting to number (assuming timestamp)\n\t\tlet num = Number(value);\n\n\t\tif (!isNumber(num)) {\n\t\t\treturn new Date(value);\n\t\t}\n\t\telse {\n\t\t\treturn new Date(num);\n\t\t}\n\t}\n}\n\n/**\n * Converts numeric value into string. Deals with large or small numbers that\n * would otherwise use exponents.\n *\n * @param value Numeric value\n * @return Numeric value as string\n */\nexport function numberToString(value: number): string {\n\t// TODO handle Infinity and -Infinity\n\tif (isNaN(value)) {\n\t\treturn \"NaN\";\n\t}\n\n\tif (value === Infinity) {\n\t\treturn \"Infinity\";\n\t}\n\n\tif (value === -Infinity) {\n\t\treturn \"-Infinity\";\n\t}\n\n\t// Negative 0\n\tif ((value === 0) && (1 / value === -Infinity)) {\n\t\treturn \"-0\";\n\t}\n\n\t// Preserve negative and deal with absoute values\n\tlet negative = value < 0;\n\n\tvalue = Math.abs(value);\n\n\t// TODO test this\n\tlet parsed = /^([0-9]+)(?:\\.([0-9]+))?(?:e[\\+\\-]([0-9]+))?$/.exec(\"\" + value)!;\n\tlet digits = parsed[1];\n\tlet decimals = parsed[2] || \"\";\n\n\tlet res: string;\n\n\t// Leave the nummber as it is if it does not use exponents\n\tif (parsed[3] === undefined) {\n\t\tres = (decimals === \"\" ? digits : digits + \".\" + decimals);\n\n\t} else {\n\t\tlet exponent = +parsed[3];\n\n\t\t// Deal with decimals\n\t\tif (value < 1) {\n\t\t\tlet zeros = exponent - 1;\n\n\t\t\tres = \"0.\" + repeat(\"0\", zeros) + digits + decimals;\n\n\t\t\t// Deal with integers\n\t\t} else {\n\t\t\tlet zeros = exponent - decimals.length;\n\n\t\t\tif (zeros === 0) {\n\t\t\t\tres = digits + decimals;\n\n\t\t\t} else if (zeros < 0) {\n\t\t\t\tres = digits + decimals.slice(0, zeros) + \".\" + decimals.slice(zeros);\n\n\t\t\t} else {\n\t\t\t\tres = digits + decimals + repeat(\"0\", zeros);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn negative ? \"-\" + res : res;\n}\n\n/**\n * Repeats a `string` number of times as set in `amount`.\n *\n * @ignore Exclude from docs\n * @todo Make this faster\n * @param string Source string\n * @param amount Number of times to repeat string\n * @return New string\n */\nexport function repeat(string: string, amount: number): string {\n return new Array(amount + 1).join(string);\n}\n\n\n/**\n * ============================================================================\n * VALUE PRESENCE CHECK\n * ============================================================================\n * @hidden\n */\n\n/**\n * Defines an optional value that can be of any type or `undefined`.\n */\nexport type Optional<A> = A | undefined;\n\n\n/**\n * ============================================================================\n * TYPE CHECK\n * ============================================================================\n * @hidden\n */\n\n/**\n * Checks if parameter is `Date`.\n *\n * @param value Input value\n * @return Is Date?\n */\nexport function isDate(value: any): value is Date {\n\treturn getType(value) === \"[object Date]\";\n}\n\n/**\n * Checks if parameter is `string`.\n *\n * @param value Input value\n * @return Is string?\n */\nexport function isString(value: any): value is string {\n\treturn typeof value === \"string\";\n}\n\n/**\n * Checks if parameter is `number`.\n *\n * @param value Input value\n * @return Is number?\n */\nexport function isNumber(value: any): value is number {\n\treturn typeof value === \"number\" && Number(value) == value;\n}\n\n/**\n * Checks if parameter is `object`.\n *\n * @param value Input value\n * @return Is object?\n */\nexport function isObject(value: any): value is object {\n\treturn typeof value === \"object\" && value !== null;\n}\n\n/**\n * Checks if parameter is `Array`.\n *\n * @param value Input value\n * @return Is Array?\n */\nexport function isArray(value: any): value is Array<unknown> {\n\treturn Array.isArray(value);\n}\n\n\n/**\n * ============================================================================\n * STATIC CONSTANTS\n * ============================================================================\n * @hidden\n */\n\n\n/**\n * @ignore Exclude from docs\n */\nexport const PLACEHOLDER: string = \"__§§§__\";\n\n/**\n * @ignore Exclude from docs\n */\nexport const PLACEHOLDER2: string = \"__§§§§__\";\n","import type { Percent } from \"./Percent\";\nimport type { IPointerEvent } from \"../render/backend/Renderer\";\nimport type { Sprite } from \"../render/Sprite\";\n\nimport * as $type from \"./Type\";\nimport * as $array from \"./Array\";\nimport * as $object from \"./Object\";\nimport type { IBounds } from \"./IBounds\";\n\nimport { Disposer, DisposerClass, IDisposer } from \"./Disposer\";\n\n/**\n * ============================================================================\n * DOM FUNCTIONS\n * ============================================================================\n * @hidden\n */\n\n/**\n * Execute a function when DOM is ready.\n *\n * @since 5.0.2\n * @param f Callback\n */\nexport function ready(f: () => void): void {\n\tif (document.readyState !== \"loading\") {\n\t\tf();\n\n\t} else {\n\t\tconst listener = () => {\n\t\t\tif (document.readyState !== \"loading\") {\n\t\t\t\tdocument.removeEventListener(\"readystatechange\", listener);\n\t\t\t\tf();\n\t\t\t}\n\t\t};\n\n\t\tdocument.addEventListener(\"readystatechange\", listener);\n\t}\n}\n\n/**\n * Removes a DOM element.\n * @param el Target element\n */\nexport function removeElement(el: HTMLElement): void {\n\tif (el.parentNode) {\n\t\tel.parentNode.removeChild(el);\n\t}\n}\n\n/**\n * Function that adds a disposable event listener directly to a DOM element.\n *\n * @ignore Exclude from docs\n * @param dom A DOM element to add event to\n * @param type Event type\n * @param listener Event listener\n * @returns Disposable event\n */\nexport function addEventListener<E extends Event>(dom: EventTarget, type: string, listener: (event: E) => void, options?: any): IDisposer {\n\t//@todo proper type check for options: EventListenerOptions | boolean (TS for some reason gives error on passive parameter)\n\tdom.addEventListener(type, <EventListener>listener, options || false);\n\n\treturn new Disposer(() => {\n\t\tdom.removeEventListener(type, <EventListener>listener, options || false);\n\t});\n}\n\n/**\n * Function that adds an event listener which is triggered when the browser's zoom changes.\n *\n * @param listener Event listener\n * @returns Disposable event\n */\nexport function onZoom(listener: () => void): IDisposer {\n\t// TODO use matchMedia instead ?\n\treturn addEventListener(window, \"resize\", (_ev) => {\n\t\tlistener();\n\t});\n}\n\n/**\n * @ignore\n */\nexport function supports(cap: \"touchevents\" | \"pointerevents\" | \"mouseevents\" | \"wheelevents\" | \"keyboardevents\"): boolean {\n\tswitch (cap) {\n\t\tcase \"touchevents\":\n\t\t\t//return \"ontouchstart\" in document.documentElement;\n\t\t\treturn window.hasOwnProperty(\"TouchEvent\");\n\n\t\tcase \"pointerevents\":\n\t\t\treturn window.hasOwnProperty(\"PointerEvent\");\n\n\t\tcase \"mouseevents\":\n\t\t\treturn window.hasOwnProperty(\"MouseEvent\");\n\n\t\tcase \"wheelevents\":\n\t\t\treturn window.hasOwnProperty(\"WheelEvent\");\n\n\t\tcase \"keyboardevents\":\n\t\t\treturn window.hasOwnProperty(\"KeyboardEvent\");\n\t}\n\treturn false;\n}\n\n/**\n * @ignore\n */\nexport function getPointerId(event: IPointerEvent) {\n\tlet id = (<any>event).pointerId || 0;\n\treturn id;\n}\n\n/**\n * Removes focus from any element by shifting focus to body.\n *\n * @ignore\n */\nexport function blur(): void {\n\tif (document.activeElement && document.activeElement != document.body) {\n\t\tif ((<any>document.activeElement).blur) {\n\t\t\t(<any>document.activeElement).blur();\n\t\t}\n\t\telse {\n\t\t\tlet input = document.createElement(\"button\");\n\t\t\tinput.style.position = \"fixed\";\n\t\t\tinput.style.top = \"0px\";\n\t\t\tinput.style.left = \"-10000px\";\n\t\t\tdocument.body.appendChild(input);\n\t\t\tinput.focus();\n\t\t\tinput.blur();\n\t\t\tdocument.body.removeChild(input);\n\t\t}\n\t}\n}\n\n/**\n * Focuses element.\n *\n * @ignore\n */\nexport function focus(el: HTMLElement): void {\n\tif (el) {\n\t\tel.focus();\n\t}\n}\n\n/**\n * @ignore\n */\nexport function getRendererEvent(key: string): string {\n\tif (supports(\"pointerevents\")) {\n\t\treturn key;\n\t}\n\telse if (supports(\"touchevents\")) {\n\t\tswitch (key) {\n\t\t\tcase \"pointerover\": return \"touchstart\";\n\t\t\tcase \"pointerout\": return \"touchend\";\n\t\t\tcase \"pointerleave\": return \"touchend\";\n\t\t\tcase \"pointerdown\": return \"touchstart\";\n\t\t\tcase \"pointermove\": return \"touchmove\";\n\t\t\tcase \"pointerup\": return \"touchend\";\n\t\t\tcase \"click\": return \"click\";\n\t\t\tcase \"dblclick\": return \"dblclick\";\n\n\t\t}\n\t}\n\telse if (supports(\"mouseevents\")) {\n\t\tswitch (key) {\n\t\t\tcase \"pointerover\": return \"mouseover\";\n\t\t\tcase \"pointerout\": return \"mouseout\";\n\t\t\tcase \"pointerleave\": return \"mouseleave\";\n\t\t\tcase \"pointerdown\": return \"mousedown\";\n\t\t\tcase \"pointermove\": return \"mousemove\";\n\t\t\tcase \"pointerup\": return \"mouseup\";\n\t\t\tcase \"click\": return \"click\";\n\t\t\tcase \"dblclick\": return \"dblclick\";\n\n\t\t}\n\t}\n\treturn key;\n}\n\n/**\n * Determines if pointer event originated from a touch pointer or mouse.\n *\n * @param ev Original event\n * @return Touch pointer?\n */\nexport function isTouchEvent(ev: MouseEvent | Touch): boolean {\n\tif (typeof Touch !== \"undefined\" && ev instanceof Touch) {\n\t\treturn true;\n\t}\n\telse if (typeof PointerEvent !== \"undefined\" && ev instanceof PointerEvent && (<any>ev).pointerType != null) {\n\t\tswitch ((<any>ev).pointerType) {\n\t\t\tcase \"touch\":\n\t\t\tcase \"pen\":\n\t\t\tcase 2:\n\t\t\t\treturn true;\n\t\t\tcase \"mouse\":\n\t\t\tcase 4:\n\t\t\t\treturn false;\n\t\t\tdefault:\n\t\t\t\treturn !(ev instanceof MouseEvent);\n\t\t}\n\t}\n\telse if ((<any>ev).type != null) {\n\t\tif ((<any>ev).type.match(/^mouse/)) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n\n/**\n * Sets style property on DOM element.\n *\n * @ignore Exclude from docs\n */\nexport function setStyle(dom: HTMLElement, property: string, value: string | undefined): void {\n\t(<any>dom.style)[property] = value;\n}\n\nexport function getStyle(dom: HTMLElement, property: string): string | undefined {\n\treturn (<any>dom.style)[property];\n}\n\n/**\n * Gets the target of the event, works for shadow DOM too.\n */\nexport function getEventTarget(event: Event | Touch): Node | null {\n\tif ((event as any).composedPath) {\n\t\tconst path = (event as Event).composedPath();\n\n\t\tif (path.length === 0) {\n\t\t\treturn null;\n\n\t\t} else {\n\t\t\treturn path[0] as Node;\n\t\t}\n\n\t} else {\n\t\treturn event.target as Node | null;\n\t}\n}\n\n/**\n * Checks of element `a` contains element `b`.\n *\n * @param a Aleged ascendant\n * @param b Aleged descendant\n * @return Contains?\n */\nexport function contains(a: Element, b: Element): boolean {\n\tlet cursor: Node = b;\n\n\twhile (true) {\n\t\tif (a === cursor) {\n\t\t\treturn true;\n\n\t\t} else if (cursor.parentNode === null) {\n\t\t\t// TODO better ShadowRoot detection\n\t\t\tif ((<ShadowRoot>cursor).host == null) {\n\t\t\t\treturn false;\n\n\t\t\t} else {\n\t\t\t\tcursor = (<ShadowRoot>cursor).host;\n\t\t\t}\n\n\t\t} else {\n\t\t\tcursor = cursor.parentNode;\n\t\t}\n\t}\n}\n\n/**\n * Returns `true` if pointer event originated on an element within Root.\n *\n * @since 5.2.8\n * @param event Event\n * @param target Target element\n */\nexport function isLocalEvent(event: IPointerEvent, target: Sprite) {\n\treturn event.target && contains(target.root.dom, <Element>event.target);\n}\n\n/**\n * Disables or enables interactivity of a DOM element.\n *\n * @param target Target element\n * @param interactive Interactive?\n */\nexport function setInteractive(target: HTMLElement, interactive: boolean): void {\n\tif (interactive) {\n\t\ttarget.style.pointerEvents = \"auto\";\n\t}\n\telse {\n\t\ttarget.style.pointerEvents = \"none\";\n\t}\n}\n\nexport function getEventKey(event: KeyboardEvent): string {\n\tif (event.key !== undefined) {\n\t\treturn event.key;\n\t}\n\tswitch (event.keyCode) {\n\t\tcase 9: return \"Tab\";\n\t\tcase 13: return \"Enter\";\n\t\tcase 16: return \"Shift\";\n\t\tcase 17: return \"Control\";\n\t\tcase 27: return \"Escape\";\n\t\tcase 32: return \" \";\n\t\tcase 37: return \"ArrowLeft\";\n\t\tcase 38: return \"ArrowUp\";\n\t\tcase 39: return \"ArrowRight\";\n\t\tcase 40: return \"ArrowDown\";\n\t\tcase 46: return \"Delete\";\n\t}\n\treturn \"\" + event.keyCode;\n}\n\n/**\n * Returns the shadow root of the element or null\n *\n * @param a Node\n * @return Root\n */\nexport function getShadowRoot(a: Node): ShadowRoot | null {\n\tlet cursor: Node = a;\n\n\twhile (true) {\n\t\tif (cursor.parentNode === null) {\n\t\t\t// TODO better ShadowRoot detection\n\t\t\tif ((<ShadowRoot>cursor).host != null) {\n\t\t\t\treturn <ShadowRoot>cursor;\n\n\t\t\t} else {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t} else {\n\t\t\tcursor = cursor.parentNode;\n\t\t}\n\t}\n}\n\n/**\n * [rootStylesheet description]\n *\n * @ignore Exclude from docs\n * @todo Description\n */\nlet rootStylesheet: $type.Optional<CSSStyleSheet>;\n\n/**\n * @ignore Exclude from docs\n */\nfunction createStylesheet(element: ShadowRoot | null, text: string, nonce: string = \"\"): HTMLStyleElement {\n\t// TODO use createElementNS ?\n\tconst e = document.createElement(\"style\");\n\te.type = \"text/css\";\n\tif (nonce != \"\") {\n\t\te.setAttribute(\"nonce\", nonce)\n\t}\n\te.textContent = text;\n\n\tif (element === null) {\n\t\tdocument.head.appendChild(e);\n\t} else {\n\t\telement.appendChild(e);\n\t}\n\n\treturn e;\n}\n\n/**\n * [getStylesheet description]\n *\n * @ignore Exclude from docs\n * @todo Description\n * @return [description]\n */\nfunction getStylesheet(element: ShadowRoot | null, nonce: string = \"\"): CSSStyleSheet {\n\tif (element === null) {\n\t\tif (rootStylesheet == null) {\n\t\t\t// TODO use createElementNS ?\n\t\t\tconst e = document.createElement(\"style\");\n\t\t\te.type = \"text/css\";\n\t\t\tif (nonce != \"\") {\n\t\t\t\te.setAttribute(\"nonce\", nonce)\n\t\t\t}\n\t\t\tdocument.head.appendChild(e);\n\t\t\trootStylesheet = e.sheet as CSSStyleSheet;\n\t\t}\n\n\t\treturn rootStylesheet;\n\n\t} else {\n\t\t// TODO use createElementNS ?\n\t\tconst e = document.createElement(\"style\");\n\t\te.type = \"text/css\";\n\t\tif (nonce != \"\") {\n\t\t\te.setAttribute(\"nonce\", nonce)\n\t\t}\n\t\telement.appendChild(e);\n\t\treturn e.sheet as CSSStyleSheet;\n\t}\n}\n\n/**\n * [makeStylesheet description]\n *\n * @ignore Exclude from docs\n * @todo Description\n * @param selector [description]\n * @return [description]\n */\nfunction appendStylesheet(root: CSSStyleSheet, selector: string): CSSStyleRule {\n\tconst index = root.cssRules.length;\n\troot.insertRule(selector + \"{}\", index);\n\n\treturn root.cssRules[index] as CSSStyleRule;\n}\n\n/**\n * Defines a class for a CSS rule.\n *\n * Can be used to dynamically add CSS to the document.\n */\nexport class StyleRule extends DisposerClass {\n\tprivate _root: CSSStyleSheet;\n\n\t/**\n\t * CSS rule.\n\t */\n\tprivate _rule: CSSStyleRule;\n\n\t/**\n\t * A CSS selector text.\n\t *\n\t * E.g.: `.myClass p`\n\t *\n\t * @param selector CSS selector\n\t */\n\tpublic set selector(selector: string) {\n\t\tthis._rule.selectorText = selector;\n\t}\n\n\t/**\n\t * @return CSS selector\n\t */\n\tpublic get selector(): string {\n\t\treturn this._rule.selectorText;\n\t}\n\n\t/**\n\t * Constructor.\n\t *\n\t * @param selector CSS selector\n\t * @param styles An object of style attribute - value pairs\n\t */\n\tconstructor(element: ShadowRoot | null, selector: string, styles: { [name: string]: string }, nonce: string = \"\") {\n\t\tsuper();\n\n\t\tthis._root = getStylesheet(element, nonce);\n\n\t\ttry {\n\t\t\tthis._rule = appendStylesheet(this._root, selector);\n\t\t}\n\t\tcatch (err) {\n\t\t\t// Create an empty rule on failed selectors\n\t\t\tthis._rule = appendStylesheet(this._root, \":not(*)\");\n\t\t}\n\n\t\t$object.each(styles, (key, value) => {\n\t\t\tthis.setStyle(<string>key, value);\n\t\t});\n\t}\n\n\t// TODO test this\n\tprotected _dispose(): void {\n\t\t// TODO a bit hacky\n\t\tconst index = $array.indexOf(this._root.cssRules, this._rule);\n\n\t\tif (index === -1) {\n\t\t\tthrow new Error(\"Could not dispose StyleRule\");\n\n\t\t} else {\n\t\t\t// TODO if it's empty remove it from the DOM ?\n\t\t\tthis._root.deleteRule(index);\n\t\t}\n\t}\n\n\t/**\n\t * Sets the same style properties with browser-specific prefixes.\n\t *\n\t * @param name Attribute name\n\t * @param value Attribute value\n\t */\n\tprivate _setVendorPrefixName(name: string, value: string): void {\n\t\tconst style = this._rule.style;\n\t\tstyle.setProperty(\"-webkit-\" + name, value, \"\");\n\t\tstyle.setProperty(\"-moz-\" + name, value, \"\");\n\t\tstyle.setProperty(\"-ms-\" + name, value, \"\");\n\t\tstyle.setProperty(\"-o-\" + name, value, \"\");\n\t\tstyle.setProperty(name, value, \"\");\n\t}\n\n\t/**\n\t * Sets a value for specific style attribute.\n\t *\n\t * @param name Attribute\n\t * @param value Value\n\t */\n\tpublic setStyle(name: string, value: string): void {\n\t\tif (name === \"transition\") {\n\t\t\tthis._setVendorPrefixName(name, value);\n\n\t\t} else {\n\t\t\tthis._rule.style.setProperty(name, value, \"\");\n\t\t}\n\t}\n}\n\n/**\n * Defines a class for an entire CSS style sheet.\n *\n * Can be used to dynamically add CSS to the document.\n */\nexport class StyleSheet extends DisposerClass {\n\tprivate _element: HTMLStyleElement;\n\n\t/**\n\t * Constructor.\n\t *\n\t * @param text CSS stylesheet\n\t */\n\tconstructor(element: ShadowRoot | null, text: string, nonce: string = \"\") {\n\t\tsuper();\n\t\tthis._element = createStylesheet(element, text, nonce);\n\t}\n\n\tprotected _dispose(): void {\n\t\tif (this._element.parentNode) {\n\t\t\tthis._element.parentNode.removeChild(this._element);\n\t\t}\n\t}\n}\n\n\n/**\n * Adds a class name to an HTML or SVG element.\n *\n * @ignore Exclude from docs\n * @param element Element\n * @param className Class name to add\n */\nexport function addClass(element: HTMLElement | SVGElement, className: string): void {\n\tif (!element) {\n\t\treturn;\n\t}\n\tif (element.classList) {\n\t\tconst classes = className.split(\" \");\n\t\t$array.each(classes, (name) => {\n\t\t\telement.classList.add(name);\n\t\t});\n\t}\n\telse {\n\t\tlet currentClassName = element.getAttribute(\"class\");\n\t\tif (currentClassName) {\n\t\t\telement.setAttribute(\"class\", currentClassName.split(\" \").filter((item) => {\n\t\t\t\treturn item !== className;\n\t\t\t}).join(\" \") + \" \" + className);\n\t\t}\n\t\telse {\n\t\t\telement.setAttribute(\"class\", className);\n\t\t}\n\t}\n}\n\n/**\n * Removes a class name from an HTML or SVG element.\n *\n * @ignore Exclude from docs\n * @param element Element\n * @param className Class name to add\n */\nexport function removeClass(element: HTMLElement, className: string): void {\n\tif (!element) {\n\t\treturn;\n\t}\n\tif (element.classList) {\n\t\telement.classList.remove(className);\n\t}\n\telse {\n\t\tlet currentClassName = element.getAttribute(\"class\");\n\t\tif (currentClassName) {\n\t\t\telement.setAttribute(\"class\", currentClassName.split(\" \").filter((item) => {\n\t\t\t\treturn item !== className;\n\t\t\t}).join(\" \"));\n\t\t}\n\t}\n}\n\n// /**\n// * Applies a set of styles to an element. Stores the original styles so they\n// * can be restored later.\n// *\n// * @ignore\n// * @param io Element\n// */\n// export function prepElementForDrag(dom: HTMLElement): void {\n\n// \t// @todo: save current values\n\n// \t// Define possible props\n// \tlet props = [\n// \t\t\"touchAction\", \"webkitTouchAction\", \"MozTouchAction\", \"MSTouchAction\", \"msTouchAction\", \"oTouchAction\",\n// \t\t\"userSelect\", \"webkitUserSelect\", \"MozUserSelect\", \"MSUserSelect\", \"msUserSelect\", \"oUserSelect\",\n// \t\t\"touchSelect\", \"webkitTouchSelect\", \"MozTouchSelect\", \"MSTouchSelect\", \"msTouchSelect\", \"oTouchSelect\",\n// \t\t\"touchCallout\", \"webkitTouchCallout\", \"MozTouchCallout\", \"MSTouchCallout\", \"msTouchCallout\", \"oTouchCallout\",\n// \t\t\"contentZooming\", \"webkitContentZooming\", \"MozContentZooming\", \"MSContentZooming\", \"msContentZooming\", \"oContentZooming\",\n// \t\t\"userDrag\", \"webkitUserDrag\", \"MozUserDrag\", \"MSUserDrag\", \"msUserDrag\", \"oUserDrag\"\n// \t];\n// \tfor (let i = 0; i < props.length; i++) {\n// \t\tif (props[i] in dom.style) {\n// \t\t\tsetStyle(dom, props[i], \"none\");\n// \t\t}\n// \t}\n\n// \t// Remove iOS-specific selection;\n// \tsetStyle(dom, \"tapHighlightColor\", \"rgba(0, 0, 0, 0)\");\n\n// }\n\n// /**\n// * Restores replaced styles\n// *\n// * @ignore\n// * @param io Element\n// */\n// export function unprepElementForDrag(dom: HTMLElement): void {\n\n// \t// Define possible props\n// \tlet props = [\n// \t\t\"touchAction\", \"webkitTouchAction\", \"MozTouchAction\", \"MSTouchAction\", \"msTouchAction\", \"oTouchAction\",\n// \t\t\"userSelect\", \"webkitUserSelect\", \"MozUserSelect\", \"MSUserSelect\", \"msUserSelect\", \"oUserSelect\",\n// \t\t\"touchSelect\", \"webkitTouchSelect\", \"MozTouchSelect\", \"MSTouchSelect\", \"msTouchSelect\", \"oTouchSelect\",\n// \t\t\"touchCallout\", \"webkitTouchCallout\", \"MozTouchCallout\", \"MSTouchCallout\", \"msTouchCallout\", \"oTouchCallout\",\n// \t\t\"contentZooming\", \"webkitContentZooming\", \"MozContentZooming\", \"MSContentZooming\", \"msContentZooming\", \"oContentZooming\",\n// \t\t\"userDrag\", \"webkitUserDrag\", \"MozUserDrag\", \"MSUserDrag\", \"msUserDrag\", \"oUserDrag\"\n// \t];\n// \tfor (let i = 0; i < props.length; i++) {\n// \t\tif (props[i] in dom.style) {\n// \t\t\tsetStyle(dom, props[i], \"\");\n// \t\t}\n// \t}\n\n// \t// Remove iOS-specific selection;\n// \tsetStyle(dom, \"tapHighlightColor\", \"\");\n\n// }\n\nexport function iOS(): boolean {\n\treturn /apple/i.test(navigator.vendor) && \"ontouchend\" in document;\n}\n\nexport function getSafeResolution(): number | undefined {\n\treturn iOS() ? 1 : undefined;\n}\n\nexport function relativeToValue(percent: number | Percent | undefined | null, full: number): number {\n\tif ($type.isNumber(percent)) {\n\t\treturn percent;\n\t} else if (percent != null && $type.isNumber(percent.value) && $type.isNumber(full)) {\n\t\treturn full * percent.value;\n\n\t} else {\n\t\treturn 0;\n\t}\n}\n\n\n\n/**\n * Returns number of decimals\n *\n * @ignore Exclude from docs\n * @param number Input number\n * @return Number of decimals\n */\nexport function decimalPlaces(number: number): number {\n\tlet match = ('' + number).match(/(?:\\.(\\d+))?(?:[eE]([+-]?\\d+))?$/);\n\tif (!match) { return 0; }\n\treturn Math.max(0, (match[1] ? match[1].length : 0) - (match[2] ? +match[2] : 0));\n}\n\n\n/**\n * ============================================================================\n * STRING FORMATTING FUNCTIONS\n * ============================================================================\n * @hidden\n */\n\n/**\n * Pads a string with additional characters to certain length.\n *\n * @param value A numeric value\n * @param len Result string length in characters\n * @param char A character to use for padding\n * @return Padded value as string\n */\nexport function padString(value: any, len: number = 0, char: string = \"0\"): string {\n\tif (typeof value !== \"string\") {\n\t\tvalue = value.toString();\n\t}\n\n\treturn len > value.length ? Array(len - value.length + 1).join(char) + value : value;\n}\n\nexport function trimLeft(text: string): string {\n\treturn text.replace(/^[\\s]*/, \"\");\n}\n\nexport function trimRight(text: string): string {\n\treturn text.replace(/[\\s]*$/, \"\");\n}\n\nexport function trim(text: string): string {\n\treturn trimLeft(trimRight(text));\n}\n\nexport function truncateTextWithEllipsis(text: string, maxLength: number, breakWords: boolean = false, ellipsis: string = \"...\") {\n\tif (text.length > maxLength) {\n\t\t// Find the last non-alphanumeric character before maxLength\n\t\tlet lastNonAlphanumericIndex = maxLength - 1;\n\t\twhile (lastNonAlphanumericIndex >= 0 && text.charAt(lastNonAlphanumericIndex).match(/\\w/)) {\n\t\t\tlastNonAlphanumericIndex--;\n\t\t}\n\n\t\tif (lastNonAlphanumericIndex >= 0 && breakWords == false) {\n\t\t\treturn text.substring(0, lastNonAlphanumericIndex + 1) + '...';\n\t\t} else {\n\t\t\t// If no non-alphanumeric character found, truncate without breaking words\n\t\t\treturn text.substring(0, maxLength) + ellipsis;\n\t\t}\n\t} else {\n\t\treturn text;\n\t}\n}\n\n/**\n * Tries to determine format type.\n *\n * @ignore Exclude from docs\n * @param format Format string\n * @return Format type (\"string\" | \"number\" | \"date\" | \"duration\")\n */\nexport function getFormat(format: string): string {\n\n\t// Undefined?\n\tif (typeof format === \"undefined\") {\n\t\treturn \"string\";\n\t}\n\n\t// Cleanup and lowercase format\n\tformat = format.toLowerCase().replace(/^\\[[^\\]]*\\]/, \"\");\n\n\t// Remove style tags\n\tformat = format.replace(/\\[[^\\]]+\\]/, \"\");\n\n\t// Trim\n\tformat = format.trim();\n\n\t// Check for any explicit format hints (i.e. /Date)\n\tlet hints: RegExpMatchArray | null = format.match(/\\/(date|number|duration)$/);\n\n\tif (hints) {\n\t\treturn hints[1];\n\t}\n\n\t// Check for explicit hints\n\tif (format === \"number\") {\n\t\treturn \"number\";\n\t}\n\n\tif (format === \"date\") {\n\t\treturn \"date\";\n\t}\n\n\tif (format === \"duration\") {\n\t\treturn \"duration\";\n\t}\n\n\t// Detect number formatting symbols\n\tif (format.match(/[#0]/)) {\n\t\treturn \"number\";\n\t}\n\n\t// Detect date formatting symbols\n\tif (format.match(/[ymwdhnsqaxkzgtei]/)) {\n\t\treturn \"date\";\n\t}\n\n\t// Nothing? Let's display as string\n\treturn \"string\";\n}\n\n/**\n * Cleans up format:\n * * Strips out formatter hints\n *\n * @ignore Exclude from docs\n * @param format Format\n * @return Cleaned format\n */\nexport function cleanFormat(format: string): string {\n\treturn format.replace(/\\/(date|number|duration)$/i, \"\");\n}\n\n/**\n * Strips all tags from the string.\n *\n * @param text Source string\n * @return String without tags\n */\nexport function stripTags(text: string): string {\n\treturn text ? text.replace(/<[^>]*>/g, \"\") : text;\n}\n\n/**\n * Removes new lines and tags from a string.\n *\n * @param text String to conver\n * @return Converted string\n */\nexport function plainText(text: string): string {\n\treturn text ? stripTags((\"\" + text).replace(/[\\n\\r]+/g, \". \")) : text;\n}\n\n/**\n * Escapes string so it can safely be used in a Regex.\n *\n * @param value Unsescaped string\n * @return Escaped string\n */\nexport function escapeForRgex(value: string): string {\n\treturn value.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&');\n}\n\n/**\n * Adds space before each uppercase letter.\n *\n * @param str Input string\n * @return Output string\n */\nexport function addSpacing(str: string): string {\n\tlet result = \"\";\n\tfor (let i = 0; i < str.length; i++) {\n\t\tconst char = str.charAt(i);\n\t\tif (char.toUpperCase() == char && i != 0) {\n\t\t\tresult += \" \";\n\t\t}\n\t\tresult += char;\n\t}\n\treturn result;\n}\n\n/**\n * Splits the string into separate characters. Keeps RTL words non-split.\n *\n * @param source Input\n * @return Split text\n */\nexport function splitString(source: string): string[] {\n\t// Regular expression to identify RTL characters\n\tconst rtlChar = /[\\u0590-\\u05FF\\u0600-\\u06FF\\u0750-\\u077F\\u08A0-\\u08FF\\uFB50-\\uFDFF\\uFE70-\\uFEFF]/;\n\n\t// Regular expression to capture segments ending with specific Arabic characters\n\tconst splitPattern = /([^اأدذرزو]*[اأدذرزو])/gi;\n\n\t// Split input string into array of words or characters, including whitespace\n\tlet segments = source.split(/(\\s+)/); // Split by whitespace, capturing it\n\n\tlet result: string[] = [];\n\tsegments.forEach(segment => {\n\t\tif (segment.match(/^\\s+$/)) {\n\t\t\t// If the segment is purely whitespace\n\t\t\tif (segment = \" \") {\n\t\t\t\tsegment = \" \";\n\t\t\t}\n\t\t\tresult.push(segment);\n\t\t} else if (rtlChar.test(segment)) {\n\t\t\t// If the segment contains RTL characters, handle special splits\n\t\t\tlet parts = segment.split(splitPattern).filter(part => part !== '');\n\t\t\t// Concatenate parts processed by the split pattern directly to result\n\t\t\tresult = result.concat(parts);\n\t\t} else {\n\t\t\t// Treat this segment as LTR: split into characters\n\t\t\tresult = result.concat([...segment]);\n\t\t}\n\t});\n\n\treturn result;\n}\n\n/**\n * ============================================================================\n * DATE-RELATED FUNCTIONS\n * ============================================================================\n * @hidden\n */\n\n/**\n * Returns a year day.\n *\n * @param date Date\n * @param utc Assume UTC dates?\n * @return Year day\n * @todo Account for UTC\n */\nexport function getYearDay(date: Date, utc: boolean = false): number {\n\t// TODO: utc needed?\n\tutc;\n\tconst start = new Date(date.getFullYear(), 0, 0);\n\tconst diff = (date.getTime() - start.getTime()) + ((start.getTimezoneOffset() - date.getTimezoneOffset()) * 60 * 1000);\n\tconst oneDay = 1000 * 60 * 60 * 24;\n\treturn Math.floor(diff / oneDay);\n}\n\n/**\n * Returns week number for a given date.\n *\n * @param date Date\n * @param utc Assume UTC dates?\n * @return Week number\n * @todo Account for UTC\n */\nexport function getWeek(date: Date, _utc: boolean = false): number {\n\tconst d = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()));\n\tconst day = d.getUTCDay() || 7;\n\td.setUTCDate(d.getUTCDate() + 4 - day);\n\tconst firstDay = new Date(Date.UTC(d.getUTCFullYear(), 0, 1));\n\treturn Math.ceil((((d.getTime() - firstDay.getTime()) / 86400000) + 1) / 7);\n}\n\n/**\n * Returns a \"week year\" of the given date.\n *\n * @param date Date\n * @param utc Assume UTC dates?\n * @return Year of week\n * @since 5.3.0\n * @todo Account for UTC\n */\nexport function getWeekYear(date: Date, _utc: boolean = false): number {\n\tconst d = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()));\n\tconst day = d.getUTCDay() || 7;\n\td.setUTCDate(d.getUTCDate() + 4 - day);\n\tconst firstDay = new Date(Date.UTC(d.getUTCFullYear(), 0, 1));\n\treturn firstDay.getFullYear();\n}\n\n/**\n * Returns a week number in the month.\n *\n * @param date Source Date\n * @param utc Assume UTC dates?\n * @return Week number in month\n */\nexport function getMonthWeek(date: Date, utc: boolean = false): number {\n\tconst firstWeek = getWeek(new Date(date.getFullYear(), date.getMonth(), 1), utc);\n\tlet currentWeek = getWeek(date, utc);\n\tif (currentWeek == 1) {\n\t\tcurrentWeek = 53;\n\t}\n\treturn currentWeek - firstWeek + 1;\n}\n\n/**\n * Returns a year day out of the given week number.\n *\n * @param week Week\n * @param year Year\n * @param weekday Weekday\n * @param utc Assume UTC dates\n * @return Day in a year\n */\nexport function getDayFromWeek(week: number, year: number, weekday: number = 1, utc: boolean = false): number {\n\tlet date = new Date(year, 0, 4, 0, 0, 0, 0);\n\tif (utc) {\n\t\tdate.setUTCFullYear(year);\n\t}\n\tlet day = week * 7 + weekday - ((date.getDay() || 7) + 3);\n\treturn day;\n}\n\n/**\n * Returns 12-hour representation out of the 24-hour hours.\n *\n * @param hours 24-hour number\n * @return 12-hour number\n */\nexport function get12Hours(hours: number, base?: number): number {\n\tif (hours > 12) {\n\t\thours -= 12;\n\t}\n\telse if (hours === 0) {\n\t\thours = 12;\n\t}\n\treturn base != null ? hours + (base - 1) : hours;\n}\n\n/**\n * Returns a string name of the time zone.\n *\n * @param date Date object\n * @param long Should return long (\"Pacific Standard Time\") or short abbreviation (\"PST\")\n * @param savings Include information if it's in daylight savings mode\n * @param utc Assume UTC dates\n * @return Time zone name\n */\nexport function getTimeZone(date: Date, long: boolean = false, savings: boolean = false, utc: boolean = false, timezone?: string): string {\n\tif (utc) {\n\t\treturn long ? \"Coordinated Universal Time\" : \"UTC\";\n\t}\n\telse if (timezone) {\n\t\tconst d1 = date.toLocaleString(\"en-US\", { timeZone: timezone });\n\t\tconst d2 = date.toLocaleString(\"en-US\", { timeZone: timezone, timeZoneName: long ? \"long\" : \"short\" });\n\t\treturn trim(d2.substr(d1.length));\n\t}\n\tlet wotz = date.toLocaleString(\"UTC\");\n\tlet wtz = date.toLocaleString(\"UTC\", { timeZoneName: long ? \"long\" : \"short\" }).substr(wotz.length);\n\t//wtz = wtz.replace(/[+-]+[0-9]+$/, \"\");\n\tif (savings === false) {\n\t\twtz = wtz.replace(/ (standard|daylight|summer|winter) /i, \" \");\n\t}\n\treturn trim(wtz);\n}\n\nexport function getTimezoneOffset(timezone: string): number {\n\tconst date = new Date(Date.UTC(2012, 0, 1, 0, 0, 0, 0));\n\tconst utcDate = new Date(date.toLocaleString(\"en-US\", { timeZone: \"UTC\" }));\n\tconst tzDate = new Date(date.toLocaleString(\"en-US\", { timeZone: timezone }));\n\treturn (tzDate.getTime() - utcDate.getTime()) / 6e4 * -1;\n}\n\n\nexport function capitalizeFirst(text: string): string {\n\treturn text.charAt(0).toUpperCase() + text.slice(1);\n}\n\n\n/**\n * ============================================================================\n * COLOR UTILS\n * ============================================================================\n */\n\n\n/**\n * Represents an interface for an object that represents an RGB color.\n */\nexport interface iRGB {\n\tr: number;\n\tg: number;\n\tb: number;\n\ta?: number;\n}\n\n/**\n * Represents an interface for an object that represents an HSL color.\n */\nexport interface iHSL {\n\th: number;\n\ts: number;\n\tl: number;\n\ta?: number;\n}\n\n/**\n * Represents an interface for an object that represents an HSV color.\n */\nexport interface iHSV {\n\th: number;\n\ts: number;\n\tv: number;\n\ta?: number;\n}\n\n/**\n * The functions below are taken and adapted from Garry Tan's blog post:\n * http://axonflux.com/handy-rgb-to-hsl-and-rgb-to-hsv-color-model-c\n *\n * The further attributions go mjijackson.com, which now seems to be defunct.\n */\n\n\n/**\n * Converts an HSL color value to RGB. Conversion formula\n * adapted from http://en.wikipedia.org/wiki/HSL_color_space.\n * Assumes h, s, and l are contained in the set [0, 1] and\n * returns r, g, and b in the set [0, 255].\n *\n * Function adapted from:\n * http://axonflux.com/handy-rgb-to-hsl-and-rgb-to-hsv-color-model-c\n *\n * @param h The hue\n * @param s The saturation\n * @param l The lightness\n * @return The RGB representation\n */\nexport function hslToRgb(color: iHSL): iRGB {\n\tlet r, g, b;\n\tlet h = color.h;\n\tlet s = color.s;\n\tlet l = color.l;\n\n\tif (s == 0) {\n\t\tr = g = b = l; // achromatic\n\t} else {\n\t\tlet hue2rgb = function hue2rgb(p: number, q: number, t: number) {\n\t\t\tif (t < 0) { t += 1; }\n\t\t\tif (t > 1) { t -= 1; }\n\t\t\tif (t < 1 / 6) { return p + (q - p) * 6 * t; }\n\t\t\tif (t < 1 / 2) { return q; }\n\t\t\tif (t < 2 / 3) { return p + (q - p) * (2 / 3 - t) * 6; }\n\t\t\treturn p;\n\t\t}\n\n\t\tlet q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n\t\tlet p = 2 * l - q;\n\t\tr = hue2rgb(p, q, h + 1 / 3);\n\t\tg = hue2rgb(p, q, h);\n\t\tb = hue2rgb(p, q, h - 1 / 3);\n\t}\n\n\treturn {\n\t\tr: Math.round(r * 255),\n\t\tg: Math.round(g * 255),\n\t\tb: Math.round(b * 255)\n\t};\n}\n\n/**\n * Converts an RGB color value to HSL. Conversion formula\n * adapted from http://en.wikipedia.org/wiki/HSL_color_space.\n * Assumes r, g, and b are contained in the set [0, 255] and\n * returns h, s, and l in the set [0, 1].\n *\n * Function adapted from:\n * http://axonflux.com/handy-rgb-to-hsl-and-rgb-to-hsv-color-model-c\n *\n * @param r The red color value\n * @param g The green color value\n * @param b The blue color value\n * @return The HSL representation\n */\nexport function rgbToHsl(color: iRGB): iHSL {\n\tlet r = color.r / 255;\n\tlet g = color.g / 255;\n\tlet b = color.b / 255;\n\tlet max = Math.max(r, g, b);\n\tlet min = Math.min(r, g, b);\n\tlet h = 0;\n\tlet s = 0;\n\tlet l = (max + min) / 2;\n\n\tif (max === min) {\n\t\th = s = 0; // achromatic\n\n\t} else {\n\t\tlet d = max - min;\n\n\t\ts = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n\n\t\tswitch (max) {\n\t\t\tcase r: h = (g - b) / d + (g < b ? 6 : 0); break;\n\t\t\tcase g: h = (b - r) / d + 2; break;\n\t\t\tcase b: h = (r - g) / d + 4; break;\n\t\t}\n\n\t\th /= 6;\n\t}\n\n\treturn {\n\t\th: h,\n\t\ts: s,\n\t\tl: l,\n\t};\n}\n\n\n/**\n * Converts HSV to HSL.\n *\n * https://en.wikipedia.org/wiki/HSL_and_HSV#HSV_to_HSL\n */\nexport function hsvToHsl(hsv: iHSV): iHSL {\n\tconst l = hsv.v * (1 - (hsv.s / 2));\n\n\tconst s =\n\t\t(l === 0 || l === 1\n\t\t\t? 0\n\t\t\t: (hsv.v - l) / Math.min(l, 1 - l));\n\n\treturn {\n\t\th: hsv.h,\n\t\ts,\n\t\tl,\n\t\ta: hsv.a,\n\t};\n}\n\n\n/**\n * Converts HSL to HSV.\n *\n * https://en.wikipedia.org/wiki/HSL_and_HSV#HSL_to_HSV\n */\nexport function hslToHsv(hsl: iHSL): iHSV {\n\tconst v = hsl.l + (hsl.s * Math.min(hsl.l, 1 - hsl.l));\n\n\tconst s =\n\t\t(v === 0\n\t\t\t? 0\n\t\t\t: 2 * (1 - (hsl.l / v)));\n\n\treturn {\n\t\th: hsl.h,\n\t\ts,\n\t\tv,\n\t\ta: hsl.a,\n\t};\n}\n\n\n/**\n * Returns a color that is `percent` brighter than the reference color.\n *\n * @param color Reference color\n * @param percent Brightness percent\n * @return Hex code of the new color\n */\nexport function lighten(rgb: $type.Optional<iRGB>, percent: number): $type.Optional<iRGB> {\n\tif (rgb) {\n\t\treturn {\n\t\t\tr: Math.max(0, Math.min(255, rgb.r + getLightnessStep(rgb.r, percent))),\n\t\t\tg: Math.max(0, Math.min(255, rgb.g + getLightnessStep(rgb.g, percent))),\n\t\t\tb: Math.max(0, Math.min(255, rgb.b + getLightnessStep(rgb.b, percent))),\n\t\t\ta: rgb.a\n\t\t};\n\n\t} else {\n\t\t// TODO is this correct ?\n\t\treturn rgb;\n\t}\n};\n\n/**\n * Gets lightness step.\n *\n * @param value Value\n * @param percent Percent\n * @return Step\n */\nexport function getLightnessStep(value: number, percent: number): number {\n\tlet base = percent > 0 ? 255 - value : value;\n\treturn Math.round(base * percent);\n}\n\n/**\n * Returns a color that is `percent` brighter than the source `color`.\n *\n * @param color Source color\n * @param percent Brightness percent\n * @return New color\n */\nexport function brighten(rgb: $type.Optional<iRGB>, percent: number): $type.Optional<iRGB> {\n\tif (rgb) {\n\t\tlet base = Math.min(Math.max(rgb.r, rgb.g, rgb.b), 230);\n\t\t//let base = Math.max(rgb.r, rgb.g, rgb.b);\n\t\tlet step = getLightnessStep(base, percent);\n\t\treturn {\n\t\t\tr: Math.max(0, Math.min(255, Math.round(rgb.r + step))),\n\t\t\tg: Math.max(0, Math.min(255, Math.round(rgb.g + step))),\n\t\t\tb: Math.max(0, Math.min(255, Math.round(rgb.b + step))),\n\t\t\ta: rgb.a\n\t\t};\n\n\t} else {\n\t\t// TODO is this correct ?\n\t\treturn rgb;\n\t}\n};\n\n/**\n * Returns brightness step.\n *\n * @ignore Exclude from docs\n * @param value Value\n * @param percent Percent\n * @return Step\n */\nexport function getBrightnessStep(_value: number, percent: number): number {\n\tlet base = 255; //percent > 0 ? 255 - value : value;\n\treturn Math.round(base * percent);\n}\n\n/**\n * Returns `true` if color is \"light\". Useful indetermining which contrasting\n * color to use for elements over this color. E.g.: you would want to use\n * black text over light background, and vice versa.\n *\n * @param color Source color\n * @return Light?\n */\nexport function isLight(color: iRGB): boolean {\n\treturn ((color.r * 299) + (color.g * 587) + (color.b * 114)) / 1000 >= 128;\n}\n\n/**\n * Returns a new [[iRGB]] object based on `rgb` parameter with specific\n * saturation applied.\n *\n * `saturation` can be in the range of 0 (fully desaturated) to 1 (fully\n * saturated).\n *\n * @param color Base color\n * @param saturation Saturation (0-1)\n * @return New color\n */\nexport function saturate(rgb: $type.Optional<iRGB>, saturation: number): $type.Optional<iRGB> {\n\tif (rgb === undefined || saturation == 1) {\n\t\treturn rgb;\n\t}\n\n\tlet hsl = rgbToHsl(rgb);\n\thsl.s = saturation;\n\treturn hslToRgb(hsl);\n}\n\n/**\n * Returns a color which contrasts more with the source `color`.\n *\n * @param color Base color\n * @param lightAlternative Light option\n * @param darkAlternative Dark option\n * @return New color\n */\nexport function alternativeColor(color: iRGB, lightAlternative: iRGB = { r: 255, g: 255, b: 255 }, darkAlternative: iRGB = { r: 255, g: 255, b: 255 }): iRGB {\n\tlet light = lightAlternative;\n\tlet dark = darkAlternative;\n\tif (isLight(darkAlternative)) {\n\t\tlight = darkAlternative;\n\t\tdark = lightAlternative;\n\t}\n\treturn isLight(color) ? dark : light;\n}\n\n/**\n * @ignore\n */\nexport function mergeTags(tags1: string[] | undefined, tags2: string[]): string[] {\n\tif (!tags1) {\n\t\ttags1 = [];\n\t}\n\treturn [...tags1, ...tags2].filter((value, index, self) => {\n\t\treturn self.indexOf(value) === index;\n\t});\n}\n\n/**\n * @ignore\n */\nexport function sameBounds(a: IBounds, b?: IBounds): boolean {\n\tif (!b) {\n\t\treturn false;\n\t}\n\tif (a.left != b.left) {\n\t\treturn false\n\t}\n\tif (a.right != b.right) {\n\t\treturn false\n\t}\n\tif (a.top != b.top) {\n\t\treturn false\n\t}\n\tif (a.bottom != b.bottom) {\n\t\treturn false\n\t}\n\treturn true;\n}\n","import type { ExportingMenu } from \"./ExportingMenu\"\nimport type { TimeUnit } from \"../../core/util/Time\";\n\nimport { Entity, IEntitySettings, IEntityPrivate, IEntityEvents } from \"../../core/util/Entity\"\nimport { Color } from \"../../core/util/Color\";\nimport { Root } from \"../../core/Root\"\nimport { StyleRule } from \"../../core/util/Utils\"\n\nimport * as $array from \"../../core/util/Array\";\nimport * as $object from \"../../core/util/Object\";\nimport * as $type from \"../../core/util/Type\";\nimport * as $utils from \"../../core/util/Utils\";\n\nexport interface IFile {\n\tpath: string;\n\tbytes: string;\n}\n\nexport interface IFont {\n\tname: string;\n\tnormal: IFile;\n\tbold?: IFile;\n\titalics?: IFile;\n\tbolditalics?: IFile;\n}\n\n/**\n * This is used to cache the pdfmake loading.\n *\n * @ignore\n */\nlet pdfmakePromise: Promise<any>;\n\n/**\n * Loads pdfmake dynamic module\n *\n * This is an asynchronous function. Check the description of `getImage()`\n * for description and example usage.\n *\n * @ignore\n */\nasync function _pdfmake(): Promise<any> {\n\tlet a = await Promise.all([\n\t\timport(/* webpackChunkName: \"pdfmake\" */ \"pdfmake/build/pdfmake.js\"),\n\t\timport(/* webpackChunkName: \"pdfmake\" */ \"./pdfmake/vfs_fonts\")\n\t]);\n\n\tlet pdfmake = a[0].default;\n\tlet vfs_fonts = a[1].default;\n\tconst global = <any>window;\n\tglobal.pdfMake = global.pdfMake || {};\n\tglobal.pdfMake.vfs = vfs_fonts;\n\tpdfmake.vfs = vfs_fonts;\n\treturn pdfmake;\n}\n\nexport type ExportingTypes = \"image\" | \"data\" | \"print\";\nexport type ExportingFormats = \"png\" | \"jpg\" | \"canvas\" | \"pdf\" | \"xlsx\" | \"csv\" | \"json\" | \"html\" | \"pdfdata\" | \"print\";\nexport type ExportingImageFormats = \"png\" | \"jpg\";\n\nexport interface IExportingImageSource {\n\n\t/**\n\t * A root object of an extra chart to add in export.\n\t */\n\tsource: Root;\n\n\t/**\n\t * Top margin in pixels.\n\t */\n\tmarginTop?: number;\n\n\t/**\n\t * Right margin in pixels.\n\t */\n\tmarginRight?: number;\n\n\t/**\n\t * Bottom margin in pixels.\n\t */\n\tmarginBottom?: number;\n\n\t/**\n\t * Left margin in pixels.\n\t */\n\tmarginLeft?: number;\n\n\t/**\n\t * Position to place extra image in releation to the main chart.\n\t *\n\t * @default \"bottom\"\n\t */\n\tposition?: \"left\" | \"right\" | \"top\" | \"bottom\";\n\n\t/**\n\t * Crop extra image if it's larger than the main chart.\n\t */\n\tcrop?: boolean;\n\n}\n\nexport interface IExportingSettings extends IEntitySettings {\n\n\t/**\n\t * A reference to [[ExportingMenu]] object.\n\t */\n\tmenu?: ExportingMenu;\n\n\t/**\n\t * Export will try to determine background color based on the DOM styles.\n\t *\n\t * You can use this setting to explicitly specify background color for\n\t * exported images.\n\t */\n\tbackgroundColor?: Color;\n\n\t/**\n\t * Opacity of the exported image background.\n\t *\n\t * * 0 - fully transparent.\n\t * * 1 - fully opaque (default).\n\t *\n\t * NOTE: some image formats like JPEG do not support transparency.\n\t *\n\t * @since 5.2.34\n\t */\n\tbackgroundOpacity?: number;\n\n\t/**\n\t * A string to prefix exported files with.\n\t *\n\t * @default \"chart\"\n\t */\n\tfilePrefix?: string;\n\n\t/**\n\t * Chart title. Used for print, PDF and Excel exports.\n\t */\n\ttitle?: string;\n\n\t/**\n\t * Charset to use for export.\n\t *\n\t * @default \"utf-8\"\n\t */\n\tcharset?: string;\n\n\t/**\n\t * Fields to include in data export.\n\t *\n\t * Key - field in data.\n\t * Value - column name.\n\t */\n\tdataFields?: { [index: string]: string },\n\n\t/**\n\t * Specifies the order of fields to export in data.\n\t */\n\tdataFieldsOrder?: string[],\n\n\t/**\n\t * Fields in data that are numeric.\n\t */\n\tnumericFields?: string[],\n\n\t/**\n\t * Use this number format on numeric values.\n\t */\n\tnumberFormat?: string | Intl.NumberFormatOptions,\n\n\t/**\n\t * Fields in data that have date/time value.\n\t */\n\tdateFields?: string[],\n\n\t/**\n\t * Use this date format on date values.\n\t */\n\tdateFormat?: string | Intl.DateTimeFormatOptions,\n\n\t/**\n\t * Fields in data that need to be formatted as \"duration\" as per `durationFormat`.\n\t *\n\t * @since 5.0.16\n\t */\n\tdurationFields?: string[],\n\n\t/**\n\t * Format to use when formatting values in `durationFields`.\n\t *\n\t * If not set, will use `durationFormat` as set in [[DurationFormatter]] of\n\t * the root element.\n\t *\n\t * @since 5.0.16\n\t */\n\tdurationFormat?: string,\n\n\t/**\n\t * Time unit to assume duration values are in.\n\t *\n\t * If not set, will use `baseUnit` as set in [[DurationFormatter]] of\n\t * the root element.\n\t *\n\t * @since 5.0.16\n\t */\n\tdurationUnit?: TimeUnit;\n\n\t/**\n\t * Include these images or other charts in image exports.\n\t */\n\textraImages?: Array<Root | IExportingImageSource>;\n\n\t/**\n\t * Data to export.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/exporting/#Exporting_data} for more info\n\t */\n\tdataSource?: any;\n\n\t/**\n\t * PNG format options.\n\t */\n\tpngOptions?: IExportingImageOptions;\n\n\t/**\n\t * JPEG format options.\n\t */\n\tjpgOptions?: IExportingImageOptions;\n\n\t/**\n\t * Canvas format options.\n\t */\n\tcanvasOptions?: IExportingImageOptions;\n\n\t/**\n\t * PDF format options.\n\t */\n\tpdfOptions?: IExportingPDFOptions;\n\n\t/**\n\t * PDF with data table format options.\n\t */\n\tpdfdataOptions?: IExportingDataOptions;\n\n\t/**\n\t * XSLX format options.\n\t */\n\txlsxOptions?: IExportingXLSXOptions;\n\n\t/**\n\t * CSV format options.\n\t */\n\tcsvOptions?: IExportingCSVOptions;\n\n\t/**\n\t * JSON format options.\n\t */\n\tjsonOptions?: IExportingJSONOptions;\n\n\t/**\n\t * HTML format options.\n\t */\n\thtmlOptions?: IExportingHTMLOptions;\n\n\t/**\n\t * Print options.\n\t */\n\tprintOptions?: IExportingPrintOptions;\n\n}\n\nexport interface IExportingPrivate extends IEntityPrivate {\n}\n\nexport interface IExportEvent {\n\n\t/**\n\t * Format.\n\t */\n\tformat: ExportingFormats,\n\n\t/**\n\t * Format options.\n\t */\n\toptions: IExportingFormatOptions\n\n}\n\nexport interface IExportingEvents extends IEntityEvents {\n\n\t/**\n\t * Invoked when export starts.\n\t */\n\texportstarted: IExportEvent;\n\n\t/**\n\t * Invoked when export finishes.\n\t */\n\texportfinished: IExportEvent;\n\n\t/**\n\t * Invoked when download of the export starts.\n\t */\n\tdownloadstarted: IExportEvent & {\n\t\tfileName: string,\n\t};\n\n\t/**\n\t * Invoked when print starts.\n\t */\n\tprintstarted: IExportEvent;\n\n\t/**\n\t * Invoked when data finishes pre-processing for export.\n\t */\n\tdataprocessed: IExportEvent & {\n\t\tdata: any\n\t}\n\n\t/**\n\t * Invoked when XLSX export finishes preparing a workbook.\n\t *\n\t * At this point it can still be modified for export.\n\t */\n\tworkbookready: IExportEvent & {\n\t\tworkbook: any,\n\t\tworkbookOptions: any,\n\t\txlsx: any\n\t}\n\n\t/**\n\t * Invoked when PDF export finishes preparing a document.\n\t *\n\t * At this point it can still be modified for export.\n\t */\n\tpdfdocready: IExportEvent & {\n\t\tdoc: any\n\t}\n\n}\n\nexport interface IExportingFormatOptions {\n\n\t/**\n\t * If set to `true`, this format will not appear in [[ExportMenu]].\n\t */\n\tdisabled?: boolean;\n\n}\n\nexport interface IExportingImageOptions extends IExportingFormatOptions {\n\n\t/**\n\t * Quality of the exported image: 0 to 1.\n\t */\n\tquality?: number;\n\n\t/**\n\t * Export images with hardware resolution (`false`), or the way they appear\n\t * on screen (`true`).\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/exporting/exporting-images/#Pixel_ratio} for more info\n\t * @default false\n\t */\n\tmaintainPixelRatio?: boolean;\n\n\t/**\n\t * Minimal width of exported image, in pixels.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/exporting/exporting-images/#Sizing_exported_image} for more info\n\t */\n\tminWidth?: number;\n\n\t/**\n\t * Maximal width of exported image, in pixels.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/exporting/exporting-images/#Sizing_exported_image} for more info\n\t */\n\tmaxWidth?: number;\n\n\t/**\n\t * Minimal height of exported image, in pixels.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/exporting/exporting-images/#Sizing_exported_image} for more info\n\t */\n\tminHeight?: number;\n\n\t/**\n\t * Maximal height of exported image, in pixels.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/exporting/exporting-images/#Sizing_exported_image} for more info\n\t */\n\tmaxHeight?: number;\n\n}\n\nexport interface IExportingPrintOptions extends IExportingImageOptions {\n\n\t/**\n\t * A delay in milliseconds to wait before initiating print.\n\t *\n\t * This delay is necessary to ensure DOM is prepared and repainted before\n\t * print dialog kicks in.\n\t *\n\t * @default 500\n\t */\n\tdelay?: number;\n\n\t/**\n\t * Method to use for printing.\n\t *\n\t * If one fails for your particular setup, try the other.\n\t *\n\t * \"css\" - inserts dynamic CSS that hides everything, except the image being printed.\n\t * \"iframe\" - creates a dynamic `<iframe>` with the image, then prints it.\n\t *\n\t * @default \"iframe\"\n\t */\n\tprintMethod?: \"css\" | \"iframe\";\n\n\t/**\n\t * Image format to use for printing.\n\t *\n\t * @default \"png\"\n\t */\n\timageFormat?: \"png\" | \"jpg\";\n\n}\n\n/**\n * Available PDF page sizes.\n */\nexport type pageSizes = \"4A0\" | \"2A0\" | \"A0\" | \"A1\" | \"A2\" | \"A3\" | \"A4\" | \"A5\" | \"A6\" | \"A7\" | \"A8\" | \"A9\" | \"A10\" |\n\t\"B0\" | \"B1\" | \"B2\" | \"B3\" | \"B4\" | \"B5\" | \"B6\" | \"B7\" | \"B8\" | \"B9\" | \"B10\" |\n\t\"C0\" | \"C1\" | \"C2\" | \"C3\" | \"C4\" | \"C5\" | \"C6\" | \"C7\" | \"C8\" | \"C9\" | \"C10\" |\n\t\"RA0\" | \"RA1\" | \"RA2\" | \"RA3\" | \"RA4\" |\n\t\"SRA0\" | \"SRA1\" | \"SRA2\" | \"SRA3\" | \"SRA4\" |\n\t\"EXECUTIVE\" | \"FOLIO\" | \"LEGAL\" | \"LETTER\" | \"TABLOID\";\n\nexport interface IExportingPDFOptions extends IExportingImageOptions {\n\n\t/**\n\t * Include data into PDF\n\t */\n\tincludeData?: boolean;\n\n\t/**\n\t * An image format to use for embedded images in PDF.\n\t *\n\t * See `imageFormats` in [[Export_module]].\n\t */\n\timageFormat?: \"png\" | \"jpg\";\n\n\t/**\n\t * Font size to use for all texts.\n\t */\n\tfontSize?: number;\n\n\t/**\n\t * Alignment of the chart image in PDF.\n\t *\n\t * Supported options: `\"left\"` (default), `\"center\"`, `\"right\"`.\n\t *\n\t * @default left\n\t */\n\talign?: \"left\" | \"center\" | \"middle\";\n\n\t/**\n\t * Whether to add a URL of the web page the chart has been exported from.\n\t *\n\t * @default true\n\t */\n\taddURL?: boolean;\n\n\t/**\n\t * Page size of the exported PDF.\n\t */\n\tpageSize?: pageSizes;\n\n\t/**\n\t * Page orientation.\n\t */\n\tpageOrientation?: \"landscape\" | \"portrait\";\n\n\t/**\n\t * Page margins.\n\t *\n\t * Can be one of the following:\n\t *\n\t * A single number, in which case it will act as margin setting\n\t * for all four edges of the page.\n\t *\n\t * An array of two numbers `[ horizontal, vertical ]`.\n\t *\n\t * An array of four numbers `[ left, top, right, bottom ]`.\n\t */\n\tpageMargins?: number | number[];\n\n\t/**\n\t * Font which should be used for the export.\n\t *\n\t * Default font used for PDF includes only Latin-based and Cyrilic\n\t * characters. If you are exporting text in other languages, you might need\n\t * to use some other export font.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/exporting/exporting-pdf/#Fonts} for more info\n\t */\n\tfont?: IFont;\n\n\t/**\n\t * Additional optional fonts which can be used on individual elements.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/exporting/exporting-pdf/#Fonts} for more info\n\t */\n\textraFonts?: Array<IFont>;\n\n}\n\nexport interface IExportingDataOptions extends IExportingFormatOptions {\n\n\t/**\n\t * Replace empty values with this string.\n\t */\n\temptyAs?: string;\n\n\t/**\n\t * Use timestamps instead of formatted dates.\n\t *\n\t * @default false\n\t */\n\tuseTimestamps?: boolean;\n\n\t/**\n\t * Use client's locale when formatting dates.\n\t *\n\t * @default false\n\t */\n\tuseLocale?: boolean;\n\n\t/**\n\t * If set to `true` will pivot the able so that columns are horizontal.\n\t */\n\tpivot?: boolean;\n\n\t/**\n\t * Will add a line with column names in CSV/HTML/PDF tables.\n\t */\n\taddColumnNames?: boolean;\n\n}\n\nexport interface IExportingJSONOptions extends IExportingDataOptions {\n\n\t/**\n\t * If set to a number, each line will be indented by X spaces, maintaining\n\t * hierarchy.\n\t *\n\t * If set to a string, will use that string to indent.\n\t *\n\t * @default 2\n\t */\n\tindent?: string | number;\n\n\t/**\n\t * If set to `true` and `dataFields` are set to `true`, will rename keys in\n\t * data.\n\t *\n\t * @default true\n\t */\n\trenameFields?: boolean;\n\n}\n\nexport interface IExportingCSVOptions extends IExportingDataOptions {\n\n\t/**\n\t * Column separator.\n\t *\n\t * @default \",\"\n\t */\n\tseparator?: string;\n\n\t/**\n\t * Force all values to be included in quotes, including numeric.\n\t *\n\t * @default false\n\t */\n\tforceQuotes?: boolean;\n\n\t/**\n\t * Reverse order of the records in data.\n\t *\n\t * @default false\n\t */\n\treverse?: boolean;\n\n\t/**\n\t * Add BOM character to output file, so that it can be used with UTF-8\n\t * characters properly in Excel.\n\t *\n\t * @default false\n\t * @since 5.1.0\n\t */\n\taddBOM?: boolean;\n\n}\n\nexport interface IExportingHTMLOptions extends IExportingDataOptions {\n\n\t/**\n\t * A `class` attribute for `<table>` tag.\n\t */\n\ttableClass?: string;\n\n\t/**\n\t * A `class` attribute for `<tr>` tags.\n\t */\n\trowClass?: string;\n\n\t/**\n\t * A `class` attribute for `<th>` tags.\n\t */\n\theaderClass?: string;\n\n\t/**\n\t * A `class` attribute for `<td>` tags.\n\t */\n\tcellClass?: string;\n\n}\n\nexport interface IExportingXLSXOptions extends IExportingDataOptions {\n\t// @todo\n\t//sheets?: string[];\n}\n\n/**\n * A plugin that can be used to export chart snapshots and data.\n *\n * @see {@link https://www.amcharts.com/docs/v5/concepts/exporting/} for more info\n */\nexport class Exporting extends Entity {\n\tpublic static className: string = \"Exporting\";\n\tpublic static classNames: Array<string> = Entity.classNames.concat([Exporting.className]);\n\n\tdeclare public _settings: IExportingSettings;\n\tdeclare public _privateSettings: IExportingPrivate;\n\tdeclare public _events: IExportingEvents;\n\n\t//public extraImages: Array<Root | IExportingImageSource> = [];\n\t//public dataSources: any[] = [];\n\n\tprotected _afterNew() {\n\t\tsuper._afterNew();\n\t\tthis._setRawDefault(\"filePrefix\", \"chart\");\n\t\tthis._setRawDefault(\"charset\", \"utf-8\");\n\t\tthis._setRawDefault(\"numericFields\", []);\n\t\tthis._setRawDefault(\"dateFields\", []);\n\t\tthis._setRawDefault(\"durationFields\", []);\n\t\tthis._setRawDefault(\"extraImages\", []);\n\t\tthis._setRawDefault(\"pngOptions\", { quality: 1, maintainPixelRatio: false });\n\t\tthis._setRawDefault(\"jpgOptions\", { quality: 0.8, maintainPixelRatio: false });\n\t\tthis._setRawDefault(\"printOptions\", { quality: 1, maintainPixelRatio: false, delay: 500, printMethod: \"iframe\", imageFormat: \"png\" });\n\t\tthis._setRawDefault(\"jsonOptions\", { indent: 2, renameFields: true });\n\t\tthis._setRawDefault(\"csvOptions\", { separator: \",\", addColumnNames: true, emptyAs: \"\", addBOM: true });\n\t\tthis._setRawDefault(\"htmlOptions\", { emptyAs: \"-\", addColumnNames: true });\n\t\tthis._setRawDefault(\"xlsxOptions\", { emptyAs: \"\", addColumnNames: true });\n\t\tthis._setRawDefault(\"pdfOptions\", { fontSize: 14, imageFormat: \"png\", align: \"left\", addURL: true });\n\t\tthis._setRawDefault(\"pdfdataOptions\", { emptyAs: \"\", addColumnNames: true });\n\n\t\tthis._root.addDisposer(this);\n\t}\n\n\tpublic _beforeChanged() {\n\t\tsuper._beforeChanged();\n\n\t\tif (this.isDirty(\"menu\")) {\n\t\t\tconst menu = this.get(\"menu\");\n\t\t\tif (menu) {\n\t\t\t\tmenu.set(\"exporting\", this);\n\t\t\t\tthis._disposers.push(menu);\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected _getFormatOptions(format: ExportingFormats, options?: IExportingFormatOptions): IExportingFormatOptions {\n\t\tconst newOptions: any = $object.copy((<any>this).get(format + \"Options\", {}));\n\t\tif (options) {\n\t\t\t$object.each(options, (key, value) => {\n\t\t\t\tnewOptions[key] = value;\n\t\t\t});\n\t\t}\n\t\treturn newOptions;\n\t}\n\n\t/**\n\t * Triggers a download of the chart/data in specific format.\n\t *\n\t * @param format Format\n\t * @param customOptions Format options\n\t */\n\tpublic async download(format: ExportingFormats, customOptions?: IExportingFormatOptions) {\n\t\tconst ext = format == \"pdfdata\" ? \"pdf\" : format;\n\t\tconst fileName = this.get(\"filePrefix\", \"chart\") + \".\" + ext;\n\t\tconst options = this._getFormatOptions(format, customOptions);\n\t\tthis.events.dispatch(\"downloadstarted\", {\n\t\t\ttype: \"downloadstarted\",\n\t\t\tformat: format,\n\t\t\toptions: options,\n\t\t\tfileName: fileName,\n\t\t\ttarget: this\n\t\t});\n\t\tconst uri = await this.export(format, options);\n\t\tthis.streamFile(uri, fileName, (options && (<IExportingCSVOptions>options).addBOM));\n\t}\n\n\t/**\n\t * Triggers print of the chart.\n\t *\n\t * @param customOptions Print options\n\t */\n\tpublic async print(customOptions?: IExportingPrintOptions) {\n\t\tconst options = <IExportingPrintOptions>this._getFormatOptions(\"print\", customOptions);\n\t\tthis.events.dispatch(\"printstarted\", {\n\t\t\ttype: \"printstarted\",\n\t\t\tformat: \"print\",\n\t\t\toptions: options,\n\t\t\ttarget: this\n\t\t});\n\t\tconst uri = await this.export(options.imageFormat || \"png\", options);\n\t\tthis.initiatePrint(uri, options, this.get(\"title\"));\n\t}\n\n\t/**\n\t * Returns data uri of the chart/data in specific format.\n\t *\n\t * @param format Format\n\t * @param customOptions Format options\n\t * @return Promise\n\t */\n\tpublic async export(format: ExportingFormats, customOptions?: IExportingFormatOptions): Promise<string> {\n\t\tconst options = this._getFormatOptions(format, customOptions);\n\t\tthis.events.dispatch(\"exportstarted\", {\n\t\t\ttype: \"exportstarted\",\n\t\t\tformat: format,\n\t\t\toptions: options,\n\t\t\ttarget: this\n\t\t});\n\n\t\tlet promise: Promise<string> | string = \"\";\n\t\tswitch (format) {\n\t\t\tcase \"png\":\n\t\t\tcase \"jpg\":\n\t\t\t\tthis._root._runTickerNow();\n\t\t\t\tpromise = this.exportImage(format, options);\n\t\t\t\tbreak;\n\t\t\tcase \"json\":\n\t\t\t\tpromise = this.exportJSON(options);\n\t\t\t\tbreak;\n\t\t\tcase \"csv\":\n\t\t\t\tpromise = this.exportCSV(options);\n\t\t\t\tbreak;\n\t\t\tcase \"html\":\n\t\t\t\tpromise = this.exportHTML(options);\n\t\t\t\tbreak;\n\t\t\tcase \"xlsx\":\n\t\t\t\tpromise = this.exportXLSX(options);\n\t\t\t\tbreak;\n\t\t\tcase \"pdf\":\n\t\t\t\tthis._root._runTickerNow();\n\t\t\t\tpromise = this.exportPDF(options);\n\t\t\t\tbreak;\n\t\t\tcase \"pdfdata\":\n\t\t\t\tpromise = this.exportPDFData(options);\n\t\t\t\tbreak;\n\t\t}\n\t\tthis.events.dispatch(\"exportfinished\", {\n\t\t\ttype: \"exportfinished\",\n\t\t\tformat: format,\n\t\t\toptions: options,\n\t\t\ttarget: this\n\t\t});\n\t\treturn promise;\n\t}\n\n\t/**\n\t * ==========================================================================\n\t * Images\n\t * ==========================================================================\n\t */\n\n\t/**\n\t * Returns chart image as a data:uri.\n\t *\n\t * @param format Image format\n\t * @param customOptions Format options\n\t * @return Promise\n\t */\n\tpublic async exportImage(format: ExportingImageFormats, customOptions?: IExportingImageOptions): Promise<string> {\n\t\tconst options: any = this._getFormatOptions(format, customOptions);\n\t\tconst canvas = await this.getCanvas(options);\n\t\tconst data = canvas.toDataURL(this.getContentType(format), options.quality || 1);\n\t\tthis.disposeCanvas(canvas);\n\t\treturn data;\n\t}\n\n\t/**\n\t * Returns canvas data.\n\t *\n\t * @param customOptions Image options\n\t * @return Promise\n\t */\n\tpublic async exportCanvas(customOptions?: IExportingImageOptions): Promise<string> {\n\t\tconst options: any = this._getFormatOptions(\"canvas\", customOptions);\n\t\tconst canvas = await this.getCanvas(options);\n\t\tconst data = canvas.toDataURL(this.getContentType(\"canvas\"), options.quality || 1);\n\t\tthis.disposeCanvas(canvas);\n\t\treturn data;\n\t}\n\n\t/**\n\t * Returns a `<canvas>` element with snapshot of the chart.\n\t *\n\t * @param options Image options\n\t * @return Promise\n\t */\n\tpublic async getCanvas(options: IExportingImageOptions): Promise<HTMLCanvasElement> {\n\t\tconst mainCanvas = this._root._renderer.getCanvas(this._root._rootContainer._display, options);\n\t\tconst extraImages = this.get(\"extraImages\", []);\n\n\t\t// Add other canvases\n\t\tlet middleLeft = 0;\n\t\tlet middleTop = 0;\n\t\tlet middleWidth = mainCanvas.width;\n\t\tlet middleHeight = mainCanvas.height;\n\t\tlet extraRight = 0;\n\t\tlet extraBottom = 0;\n\n\t\tconst extras: any[] = [];\n\n\t\t$array.each(extraImages, (extraRoot) => {\n\n\t\t\t// Get that extra\n\t\t\tlet extra: IExportingImageSource;\n\n\t\t\tif (extraRoot instanceof Root) {\n\t\t\t\textra = {\n\t\t\t\t\tsource: extraRoot,\n\t\t\t\t\tposition: \"bottom\"\n\t\t\t\t};\n\n\t\t\t} else {\n\t\t\t\textra = <IExportingImageSource>extraRoot;\n\t\t\t}\n\n\t\t\t// Set defaults\n\t\t\textra.position = extra.position || \"bottom\";\n\t\t\textra.marginTop = extra.marginTop || 0;\n\t\t\textra.marginRight = extra.marginRight || 0;\n\t\t\textra.marginBottom = extra.marginBottom || 0;\n\t\t\textra.marginLeft = extra.marginLeft || 0;\n\n\t\t\tconst extraCanvas = extra.source._renderer.getCanvas(extra.source._rootContainer._display, options);\n\n\t\t\tconst extraWidth = extraCanvas.width + extra.marginLeft + extra.marginRight;\n\t\t\tconst extraHeight = extraCanvas.height + extra.marginTop + extra.marginBottom;\n\n\t\t\tif (extra.position == \"top\") {\n\t\t\t\tmiddleWidth = extra.crop ? middleHeight : Math.max(middleWidth, extraWidth);\n\t\t\t\tmiddleTop += extraHeight;\n\n\t\t\t} else if (extra.position == \"right\") {\n\t\t\t\tmiddleHeight = extra.crop ? middleHeight : Math.max(middleHeight, extraHeight);\n\t\t\t\textraRight += extraWidth;\n\n\t\t\t} else if (extra.position == \"left\") {\n\t\t\t\tmiddleHeight = extra.crop ? middleHeight : Math.max(middleHeight, extraHeight);\n\t\t\t\tmiddleLeft += extraWidth;\n\n\t\t\t} else if (extra.position === \"bottom\") {\n\t\t\t\tmiddleWidth = extra.crop ? middleHeight : Math.max(middleWidth, extraWidth);\n\t\t\t\textraBottom += extraHeight;\n\t\t\t}\n\n\t\t\textras.push({\n\t\t\t\tcanvas: extraCanvas,\n\t\t\t\tposition: extra.position,\n\t\t\t\tleft: extra.marginLeft,\n\t\t\t\ttop: extra.marginTop,\n\t\t\t\twidth: extraWidth,\n\t\t\t\theight: extraHeight\n\t\t\t});\n\n\t\t});\n\n\t\tconst newCanvas = this.getDisposableCanvas();\n\n\t\tnewCanvas.width = middleLeft + middleWidth + extraRight;\n\t\tnewCanvas.height = middleTop + middleHeight + extraBottom;\n\n\t\tconst ctx = newCanvas.getContext(\"2d\")!;\n\n\t\t// Get background\n\t\tconst background = this.get(\"backgroundColor\", this.findBackgroundColor(this._root.dom));\n\t\tconst backgroundOpacity = this.get(\"backgroundOpacity\", 1);\n\n\t\tif (background) {\n\t\t\tctx.fillStyle = background.toCSS(backgroundOpacity);\n\t\t\tctx.fillRect(0, 0, newCanvas.width, newCanvas.height);\n\t\t}\n\n\t\tlet left = middleLeft;\n\t\tlet top = middleTop;\n\t\tlet right = left + middleWidth;\n\t\tlet bottom = top + middleHeight;\n\n\t\t// Radiates outwards from center\n\t\t$array.each(extras, (extra) => {\n\t\t\tif (extra.position == \"top\") {\n\t\t\t\ttop -= extra.height;\n\t\t\t\tctx.drawImage(extra.canvas, middleLeft + extra.left, top + extra.top);\n\n\t\t\t} else if (extra.position == \"right\") {\n\t\t\t\tctx.drawImage(extra.canvas, right + extra.left, middleTop + extra.top);\n\t\t\t\tright += extra.width;\n\n\t\t\t} else if (extra.position == \"left\") {\n\t\t\t\tleft -= extra.width;\n\t\t\t\tctx.drawImage(extra.canvas, left + extra.left, middleTop + extra.top);\n\n\t\t\t} else if (extra.position === \"bottom\") {\n\t\t\t\tctx.drawImage(extra.canvas, middleLeft + extra.left, bottom + extra.top);\n\t\t\t\tbottom += extra.height;\n\t\t\t}\n\n\t\t\t//this.disposeCanvas(extra.canvas);\n\t\t});\n\n\t\tctx.drawImage(mainCanvas, middleLeft, middleTop);\n\n\t\treturn newCanvas;\n\t}\n\n\t/**\n\t * ==========================================================================\n\t * JSON\n\t * ==========================================================================\n\t */\n\n\t/**\n\t * Returns a data:uri representation of a JSON file with chart data.\n\t *\n\t * @param customOptions Format options\n\t * @return Promise\n\t */\n\tpublic async exportJSON(customOptions?: IExportingJSONOptions): Promise<string> {\n\t\treturn \"data:\" + this.getContentType(\"json\") + \";\" + this.get(\"charset\", \"utf-8\") + \",\" + encodeURIComponent(await this.getJSON(customOptions));\n\t}\n\n\t/**\n\t * Returns data in JSON format.\n\t *\n\t * @param customOptions Format options\n\t * @return Promise\n\t */\n\tpublic async getJSON(customOptions?: IExportingJSONOptions): Promise<string> {\n\t\tconst options: any = this._getFormatOptions(\"json\", customOptions);\n\t\treturn JSON.stringify(this.getData(\"json\", customOptions, options.renameFields), (_key, value) => {\n\t\t\tif ($type.isObject(value)) {\n\t\t\t\t$object.each(value, (field, item) => {\n\t\t\t\t\tvalue[field] = this.convertToSpecialFormat(field, item, options);\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn value;\n\t\t}, options.indent);\n\t}\n\n\t/**\n\t * ==========================================================================\n\t * CSV\n\t * ==========================================================================\n\t */\n\n\t/**\n\t * Returns a data:uri representation of a CSV file with chart data.\n\t *\n\t * @param customOptions Format options\n\t * @return Promise\n\t */\n\tpublic async exportCSV(customOptions?: IExportingCSVOptions): Promise<string> {\n\t\treturn \"data:\" + this.getContentType(\"csv\") + \";\" + this.get(\"charset\", \"utf-8\") + \",\" + encodeURIComponent(await this.getCSV(customOptions));\n\t}\n\n\t/**\n\t * Returns a CSV with export data.\n\t *\n\t * @param customOptions CSV options\n\t * @return Promise\n\t */\n\tpublic async getCSV(customOptions?: IExportingCSVOptions): Promise<string> {\n\t\tconst options: any = this._getFormatOptions(\"csv\", customOptions);\n\n\t\t// Init output\n\t\tlet csv = \"\";\n\n\t\t// Add rows\n\t\tlet br = \"\";\n\t\tconst data = this.getData(\"csv\", options);\n\n\t\t// Data fields\n\t\tconst dataFields = this.getDataFields(data);\n\n\t\t// Vertical or horizontal (default) layout\n\t\tif (options.pivot) {\n\n\t\t\t// Data fields order\n\t\t\tconst dataFieldsOrder: string[] = this.get(\"dataFieldsOrder\", []);\n\n\t\t\t$object.eachOrdered(dataFields, (key, val) => {\n\t\t\t\tlet dataRow = [];\n\t\t\t\tif (options.addColumnNames) {\n\t\t\t\t\tdataRow.push(val);\n\t\t\t\t}\n\t\t\t\tfor (let len = data.length, i = 0; i < len; i++) {\n\t\t\t\t\tlet dataValue = data[i][key];\n\t\t\t\t\tdataRow.push(this.convertToSpecialFormat(key, dataValue, options, true));\n\t\t\t\t}\n\t\t\t\tcsv += br + this.getCSVRow(dataRow, options, undefined, true);\n\t\t\t\tbr = \"\\n\";\n\t\t\t}, (a, b) => {\n\t\t\t\tlet ai = dataFieldsOrder.indexOf(a);\n\t\t\t\tlet bi = dataFieldsOrder.indexOf(b);\n\t\t\t\tif (ai > bi) {\n\t\t\t\t\treturn -1;\n\t\t\t\t}\n\t\t\t\telse if (ai < bi) {\n\t\t\t\t\treturn 1\n\t\t\t\t}\n\t\t\t\treturn 0;\n\t\t\t});\n\n\t\t}\n\n\t\telse {\n\t\t\tfor (let len = data.length, i = 0; i < len; i++) {\n\t\t\t\tlet row = this.getCSVRow(data[i], options, dataFields);\n\t\t\t\tif (options.reverse) {\n\t\t\t\t\tcsv = row + br + csv;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tcsv += br + row;\n\t\t\t\t}\n\t\t\t\tbr = \"\\n\";\n\t\t\t}\n\n\t\t\t// Add column names?\n\t\t\tif (options.addColumnNames) {\n\t\t\t\tcsv = this.getCSVRow(dataFields, options, undefined, true) + br + csv;\n\t\t\t}\n\t\t}\n\n\t\treturn csv;\n\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic getCSVRow(row: any, options: IExportingCSVOptions, dataFields: any, asIs: boolean = false): string {\n\n\t\t// Init\n\t\tlet separator = options.separator || \",\";\n\t\tlet items: any[] = [];\n\n\t\t// Data fields\n\t\tif (!dataFields) {\n\t\t\tdataFields = {};\n\t\t\t$object.each(row, (key, value) => {\n\t\t\t\tdataFields[key] = value;\n\t\t\t});\n\t\t}\n\n\t\t// Data fields order\n\t\tconst dataFieldsOrder: string[] = this.get(\"dataFieldsOrder\", []);\n\n\t\t// Process each row item\n\t\t$object.eachOrdered(dataFields, (key, _name) => {\n\n\t\t\t// Get value\n\t\t\tlet value = this.convertEmptyValue(key, row[key], options);\n\n\t\t\t// Check if we need to skip\n\t\t\t// This is no longer required because we are iterating via dataFields anyway\n\t\t\t/*if (this.dataFields != null && this.dataFields[key] == null) {\n\t\t\t\treturn;\n\t\t\t}*/\n\n\t\t\t// Convert dates\n\t\t\tlet item = asIs ? value : this.convertToSpecialFormat(key, value, options);\n\n\t\t\t// Cast and escape doublequotes\n\t\t\titem = \"\" + item;\n\t\t\titem = item.replace(/\"/g, '\"\"');\n\n\t\t\t// Enclose into double quotes\n\t\t\tif (options.forceQuotes || (item.search(new RegExp(\"\\\"|\\n|\" + separator, \"g\")) >= 0)) {\n\t\t\t\titem = \"\\\"\" + item + \"\\\"\";\n\t\t\t}\n\n\t\t\t// Add to item\n\t\t\titems.push(item);\n\t\t}, (a, b) => {\n\t\t\tlet ai = dataFieldsOrder.indexOf(a);\n\t\t\tlet bi = dataFieldsOrder.indexOf(b);\n\t\t\tif (ai > bi) {\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\telse if (ai < bi) {\n\t\t\t\treturn -1\n\t\t\t}\n\t\t\treturn 0;\n\t\t});\n\n\t\treturn items.join(separator);\n\t}\n\n\t/**\n\t * ==========================================================================\n\t * HTML\n\t * ==========================================================================\n\t */\n\n\t/**\n\t * Returns a data:uri representation of an HTML file with chart data.\n\t *\n\t * @param customOptions Format options\n\t * @return Promise\n\t */\n\tpublic async exportHTML(customOptions?: IExportingHTMLOptions): Promise<string> {\n\t\treturn \"data:\" + this.getContentType(\"html\") + \";\" + this.get(\"charset\", \"utf-8\") + \",\" + encodeURIComponent(await this.getHTML(customOptions));\n\t}\n\n\t/**\n\t * Returns an HTML with a table with export data.\n\t *\n\t * @param customOptions HTML options\n\t * @return Promise\n\t */\n\tpublic async getHTML(customOptions?: IExportingHTMLOptions): Promise<string> {\n\t\tconst options: any = this._getFormatOptions(\"html\", customOptions);\n\n\t\t// Init output\n\t\tlet html = \"<table>\";\n\t\tif (options.tableClass) {\n\t\t\thtml = \"<table class=\\\"\" + options.tableClass + \"\\\">\";\n\t\t}\n\n\t\t// Get data\n\t\tconst data = this.getData(\"html\", options);\n\t\tconst dataFields = this.getDataFields(data);\n\n\t\t// Vertical or horizontal (default) layout\n\t\tif (options.pivot) {\n\n\t\t\t// Data fields order\n\t\t\tconst dataFieldsOrder: string[] = this.get(\"dataFieldsOrder\", []);\n\n\t\t\thtml += \"\\n<tbody>\";\n\n\t\t\t$object.eachOrdered(dataFields, (key, val) => {\n\t\t\t\tlet dataRow = [];\n\t\t\t\tif (options.addColumnNames) {\n\t\t\t\t\tdataRow.push(val);\n\t\t\t\t}\n\t\t\t\tfor (let len = data.length, i = 0; i < len; i++) {\n\t\t\t\t\tlet dataValue = data[i][key];\n\t\t\t\t\tdataRow.push(this.convertToSpecialFormat(key, dataValue, options, true));\n\t\t\t\t}\n\t\t\t\thtml += \"\\n\" + this.getHTMLRow(dataRow, options, undefined, true);\n\t\t\t}, (a, b) => {\n\t\t\t\tlet ai = dataFieldsOrder.indexOf(a);\n\t\t\t\tlet bi = dataFieldsOrder.indexOf(b);\n\t\t\t\tif (ai > bi) {\n\t\t\t\t\treturn -1;\n\t\t\t\t}\n\t\t\t\telse if (ai < bi) {\n\t\t\t\t\treturn 1\n\t\t\t\t}\n\t\t\t\treturn 0;\n\t\t\t});\n\n\t\t\thtml += \"\\n</tbody>\";\n\n\t\t}\n\n\t\telse {\n\t\t\t// Add column names?\n\t\t\tif (options.addColumnNames) {\n\t\t\t\thtml += \"\\n<thead>\\n\" + this.getHTMLRow(dataFields, options, undefined, true, true) + \"\\n</thead>\";\n\t\t\t}\n\n\t\t\thtml += \"\\n<tbody>\";\n\n\t\t\tfor (let len = data.length, i = 0; i < len; i++) {\n\t\t\t\thtml += \"\\n\" + this.getHTMLRow(data[i], options, dataFields);\n\t\t\t}\n\n\t\t\thtml += \"\\n</tbody>\";\n\t\t}\n\n\t\thtml += \"\\n</table>\";\n\n\t\treturn html;\n\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic getHTMLRow(row: any, options: IExportingHTMLOptions, dataFields: any, asIs: boolean = false, headerRow: boolean = false): string {\n\n\t\t// Init output\n\t\tlet html = \"\\t<tr>\";\n\t\tif (options.rowClass) {\n\t\t\thtml = \"\\t<tr class=\\\"\" + options.rowClass + \"\\\">\";\n\t\t}\n\n\t\t// Data fields\n\t\tif (!dataFields) {\n\t\t\tdataFields = row;\n\t\t}\n\n\t\t// Data fields order\n\t\tconst dataFieldsOrder: string[] = this.get(\"dataFieldsOrder\", []);\n\n\t\t// th or dh?\n\t\tconst tag = headerRow ? \"th\" : \"td\";\n\n\t\t// Process each row item\n\t\tlet first = true;\n\t\t$object.eachOrdered(dataFields, (key, _name) => {\n\n\t\t\t// Get value\n\t\t\tlet value = this.convertEmptyValue(key, row[key], options);\n\n\t\t\t// Convert dates\n\t\t\tlet item = asIs ? value : this.convertToSpecialFormat(key, value, options);\n\n\t\t\t// Escape HTML entities\n\t\t\titem = \"\" + item;\n\t\t\titem = item.replace(/[\\u00A0-\\u9999<>\\&]/gim, function(i: string) {\n\t\t\t\treturn \"&#\" + i.charCodeAt(0) + \";\";\n\t\t\t});\n\n\t\t\t// Which tag to use\n\t\t\tlet useTag = tag;\n\t\t\tif (options.pivot && first) {\n\t\t\t\tuseTag = \"th\";\n\t\t\t}\n\n\t\t\t// Add cell\n\t\t\tif (options.cellClass) {\n\t\t\t\thtml += \"\\n\\t\\t<\" + useTag + \" class=\\\"\" + options.cellClass + \"\\\">\" + item + \"</\" + useTag + \">\";\n\t\t\t}\n\t\t\telse {\n\t\t\t\thtml += \"\\n\\t\\t<\" + useTag + \">\" + item + \"</\" + useTag + \">\";\n\t\t\t}\n\n\t\t\tfirst = false;\n\t\t}, (a, b) => {\n\t\t\tlet ai = dataFieldsOrder.indexOf(a);\n\t\t\tlet bi = dataFieldsOrder.indexOf(b);\n\t\t\tif (ai > bi) {\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\telse if (ai < bi) {\n\t\t\t\treturn -1\n\t\t\t}\n\t\t\treturn 0;\n\t\t});\n\n\t\thtml += \"\\n\\t</tr>\";\n\n\t\treturn html;\n\t}\n\n\t/**\n\t * ==========================================================================\n\t * XLSX\n\t * ==========================================================================\n\t */\n\n\t/**\n\t * Returns a data:uri representation of an XLSX file with chart data.\n\t *\n\t * @param customOptions Format options\n\t * @return Promise\n\t */\n\tpublic async exportXLSX(customOptions?: IExportingXLSXOptions): Promise<string> {\n\t\treturn \"data:\" + this.getContentType(\"xlsx\") + \";\" + this.get(\"charset\", \"utf-8\") + \",\" + encodeURIComponent(await this.getXLSX(customOptions));\n\t}\n\n\t/**\n\t * Returns a data:uri of XLSX data.\n\t *\n\t * @param customOptions Format options\n\t * @return Promise\n\t */\n\tpublic async getXLSX(customOptions?: IExportingXLSXOptions): Promise<string> {\n\n\t\tconst options: any = this._getFormatOptions(\"xlsx\", customOptions);\n\n\t\t// Load xlsx\n\t\tlet XLSX = await this.getXLSXLib();\n\n\t\t// Create workbook options\n\t\tlet wbOptions = {\n\t\t\tbookType: \"xlsx\",\n\t\t\tbookSST: false,\n\t\t\ttype: \"base64\",\n\t\t\t//dateNF: 'yyyy-mm-dd'\n\t\t};\n\n\t\t// Get sheet name\n\t\tlet sheetName = this._normalizeExcelSheetName(this.get(\"title\", this._t(\"Data\")));\n\n\t\t// Create a workbook\n\t\tlet wb = {\n\t\t\tSheetNames: <any>[sheetName],\n\t\t\tSheets: <any>{}\n\t\t};\n\n\t\t// Init worksheet data\n\t\tlet wsData: Array<any> = [];\n\n\t\t// Get data\n\t\tconst data = this.getData(\"html\", options);\n\t\tconst dataFields = this.getDataFields(data);\n\n\t\t// Vertical or horizontal (default) layout\n\t\tif (options.pivot) {\n\n\t\t\t// Data fields order\n\t\t\tconst dataFieldsOrder: string[] = this.get(\"dataFieldsOrder\", []);\n\n\t\t\t$object.eachOrdered(dataFields, (key, val) => {\n\t\t\t\tlet dataRow = [];\n\t\t\t\tif (options.addColumnNames) {\n\t\t\t\t\tdataRow.push(val);\n\t\t\t\t}\n\t\t\t\tfor (let len = data.length, i = 0; i < len; i++) {\n\t\t\t\t\tlet dataValue = data[i][key];\n\t\t\t\t\tdataRow.push(this.convertToSpecialFormat(key, dataValue, options, true));\n\t\t\t\t}\n\t\t\t\twsData.push(this.getXLSXRow(dataRow, options, undefined, true));\n\t\t\t}, (a, b) => {\n\t\t\t\tlet ai = dataFieldsOrder.indexOf(a);\n\t\t\t\tlet bi = dataFieldsOrder.indexOf(b);\n\t\t\t\tif (ai > bi) {\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\t\t\t\telse if (ai < bi) {\n\t\t\t\t\treturn -1\n\t\t\t\t}\n\t\t\t\treturn 0;\n\t\t\t});\n\n\t\t}\n\n\t\telse {\n\t\t\t// Add column names?\n\t\t\tif (options.addColumnNames) {\n\t\t\t\twsData.push(this.getXLSXRow(dataFields, options, undefined, true));\n\t\t\t}\n\n\t\t\t// Add lines\n\t\t\tfor (let len = data.length, i = 0; i < len; i++) {\n\t\t\t\twsData.push(this.getXLSXRow(data[i], options, dataFields));\n\t\t\t}\n\t\t}\n\n\t\t// Create sheet and add data\n\t\twb.Sheets[sheetName] = XLSX.utils.aoa_to_sheet(wsData);\n\n\t\tthis.events.dispatch(\"workbookready\", {\n\t\t\ttype: \"workbookready\",\n\t\t\tformat: \"xlsx\",\n\t\t\toptions: options,\n\t\t\tworkbook: wb,\n\t\t\tworkbookOptions: wbOptions,\n\t\t\txlsx: XLSX,\n\t\t\ttarget: this\n\t\t});\n\n\t\treturn XLSX.write(wb, wbOptions);\n\t}\n\n\tprivate _normalizeExcelSheetName(name: string): string {\n\t\tname = name.replace(/([:\\\\\\/?*\\[\\]]+)/g, \" \");\n\t\treturn name.length > 30 ? name.substr(0, 30) + \"...\" : name;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic getXLSXRow(row: any, options: IExportingXLSXOptions, dataFields: any, asIs: boolean = false): any[] {\n\n\t\t// Init\n\t\tlet items: any[] = [];\n\n\t\t// Data fields\n\t\tif (!dataFields) {\n\t\t\tdataFields = row;\n\t\t}\n\n\t\t// Data fields order\n\t\tconst dataFieldsOrder: string[] = this.get(\"dataFieldsOrder\", []);\n\n\t\t// Process each row item\n\t\t$object.eachOrdered(dataFields, (key, _name) => {\n\n\t\t\t// Get value\n\t\t\tlet value = this.convertEmptyValue(key, row[key], options);\n\n\t\t\t// Convert dates\n\t\t\tlet item = asIs ? value : this.convertToSpecialFormat(key, value, options, true);\n\n\t\t\titems.push(item);\n\t\t}, (a, b) => {\n\t\t\tlet ai = dataFieldsOrder.indexOf(a);\n\t\t\tlet bi = dataFieldsOrder.indexOf(b);\n\t\t\tif (ai > bi) {\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\telse if (ai < bi) {\n\t\t\t\treturn -1\n\t\t\t}\n\t\t\treturn 0;\n\t\t});\n\n\t\treturn items;\n\t}\n\n\n\t/**\n\t * @ignore\n\t */\n\tprivate async _xlsx(): Promise<any> {\n\t\treturn await import(/* webpackChunkName: \"xlsx\" */ \"../../bundled/xlsx\");\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic getXLSXLib(): Promise<any> {\n\t\treturn this._xlsx();\n\t}\n\n\t/**\n\t * ==========================================================================\n\t * PDF\n\t * ==========================================================================\n\t */\n\n\t/**\n\t * Returns a data:uri representation of a PDF file with chart image.\n\t *\n\t * @param customOptions Format options\n\t * @return Promise\n\t */\n\tpublic async exportPDF(customOptions?: IExportingPDFOptions): Promise<string> {\n\t\treturn \"data:\" + this.getContentType(\"pdf\") + \";\" + this.get(\"charset\", \"utf-8\") + \",\" + encodeURIComponent(await this.getPDF(customOptions, true));\n\t}\n\n\t/**\n\t * Returns a data:uri representation of a PDF file with chart data.\n\t *\n\t * @param customOptions Format options\n\t * @return Promise\n\t */\n\tpublic async exportPDFData(customOptions?: IExportingDataOptions): Promise<string> {\n\t\treturn \"data:\" + this.getContentType(\"pdf\") + \";\" + this.get(\"charset\", \"utf-8\") + \",\" + encodeURIComponent(await this.getPDF(customOptions, false, true));\n\t}\n\n\t/**\n\t * Returns Base64-encoded binary data for a PDF file.\n\t * @param customOptions PDF options\n\t * @param includeImage Include chart snapshot\n\t * @param includeData Include data\n\t * @return Promise\n\t */\n\tpublic async getPDF(customOptions?: IExportingPDFOptions, includeImage: boolean = true, includeData: boolean = false): Promise<string> {\n\n\t\tconst options: any = this._getFormatOptions(\"pdf\", customOptions);\n\t\tconst dataOptions: any = this._getFormatOptions(\"pdfdata\", customOptions);\n\t\tconst orientation: \"landscape\" | \"portrait\" = options.pageOrientation || \"portrait\";\n\n\t\t// Get image\n\t\tlet image: string;\n\n\t\tconst imageSize = {\n\t\t\twidth: 0,\n\t\t\theight: 0\n\t\t};\n\n\t\tif (includeImage) {\n\t\t\tconst imageFormat = options.imageFormat || \"png\";\n\t\t\tconst imageOptions: any = this._getFormatOptions(imageFormat, options);\n\t\t\tconst canvas = await this.getCanvas(imageOptions);\n\t\t\timageSize.width = canvas.clientWidth;\n\t\t\timageSize.height = canvas.clientHeight;\n\t\t\timage = canvas.toDataURL(this.getContentType(imageFormat), options.quality || 1);\n\t\t\tthis.disposeCanvas(canvas);\n\t\t}\n\t\t// Load pdfmake\n\n\t\tconst pdfmake = await this.getPdfmake();\n\n\t\t// Defaults\n\t\tconst defaultMargins = [30, 30, 30, 30];\n\n\t\t// Init content for PDF\n\t\tlet doc = {\n\t\t\tpageSize: options.pageSize || \"A4\",\n\t\t\tpageOrientation: orientation,\n\t\t\tpageMargins: options.pageMargins || defaultMargins,\n\t\t\tdefaultStyle: {\n\t\t\t\tfont: options.font ? options.font.name : undefined\n\t\t\t},\n\t\t\t//header: <any>[],\n\t\t\tcontent: <any>[]\n\t\t};\n\n\t\t// Should we add title?\n\t\tconst title = this.get(\"title\");\n\n\t\tlet extraMargin = 0;\n\n\t\tif (title) {\n\t\t\tdoc.content.push({\n\t\t\t\ttext: title,\n\t\t\t\tfontSize: options.fontSize || 14,\n\t\t\t\tbold: true,\n\t\t\t\tmargin: [0, 0, 0, 15]\n\t\t\t});\n\n\t\t\t// Add some leftover margin for title\n\t\t\textraMargin += 50;\n\t\t}\n\n\t\t// Add page URL?\n\t\tif (options.addURL) {\n\t\t\tdoc.content.push({\n\t\t\t\ttext: this._t(\"Saved from\") + \": \" + document.location.href,\n\t\t\t\tfontSize: options.fontSize,\n\t\t\t\tmargin: [0, 0, 0, 15]\n\t\t\t});\n\n\t\t\t// Add some leftover margin for URL\n\t\t\textraMargin += 50;\n\t\t}\n\n\t\t// Add image\n\t\tif (includeImage && image!) {\n\t\t\tconst fitSize = this.getPageSizeFit(doc.pageSize, doc.pageMargins, extraMargin, orientation);\n\t\t\tif ((imageSize.width > fitSize[0]) || (imageSize.height > fitSize[1])) {\n\t\t\t\tdoc.content.push({\n\t\t\t\t\timage: image!,\n\t\t\t\t\talignment: options.align || \"left\",\n\t\t\t\t\tfit: fitSize\n\t\t\t\t});\n\t\t\t}\n\t\t\telse {\n\t\t\t\tdoc.content.push({\n\t\t\t\t\timage: image!,\n\t\t\t\t\talignment: options.align || \"left\"\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\t// Add data\n\t\tif ((includeData || options.includeData) && this.hasData()) {\n\t\t\tdoc.content.push({\n\t\t\t\ttable: await this.getPDFData(dataOptions),\n\t\t\t\tfontSize: options.fontSize || 14\n\t\t\t});\n\t\t}\n\n\t\tlet fonts: { [name: string]: { [types: string]: string } } | null = null;\n\t\tlet vfs: { [path: string]: string } | null = null;\n\n\t\tfunction addFont(font: IFont) {\n\t\t\tconst paths: { [path: string]: string } = {};\n\n\t\t\tpaths.normal = font.normal.path;\n\t\t\tvfs![font.normal.path] = font.normal.bytes;\n\n\t\t\tif (font.bold) {\n\t\t\t\tpaths.bold = font.bold.path;\n\t\t\t\tvfs![font.bold.path] = font.bold.bytes;\n\n\t\t\t} else {\n\t\t\t\tpaths.bold = font.normal.path;\n\t\t\t}\n\n\t\t\tif (font.italics) {\n\t\t\t\tpaths.italics = font.italics.path;\n\t\t\t\tvfs![font.italics.path] = font.italics.bytes;\n\n\t\t\t} else {\n\t\t\t\tpaths.italics = font.normal.path;\n\t\t\t}\n\n\t\t\tif (font.bolditalics) {\n\t\t\t\tpaths.bolditalics = font.bolditalics.path;\n\t\t\t\tvfs![font.bolditalics.path] = font.bolditalics.bytes;\n\n\t\t\t} else {\n\t\t\t\tpaths.bolditalics = font.normal.path;\n\t\t\t}\n\n\t\t\tfonts![font.name] = paths;\n\t\t}\n\n\t\tif (options.font) {\n\t\t\tfonts = {};\n\t\t\tvfs = {};\n\t\t\taddFont(options.font);\n\n\t\t\tif (options.extraFonts) {\n\t\t\t\t$array.each(options.extraFonts, addFont);\n\t\t\t}\n\t\t}\n\n\t\tthis.events.dispatch(\"pdfdocready\", {\n\t\t\ttype: \"pdfdocready\",\n\t\t\tformat: \"pdf\",\n\t\t\toptions: options,\n\t\t\tdoc: doc,\n\t\t\ttarget: this\n\t\t});\n\n\t\t// Create PDF\n\t\treturn new Promise<string>((success, _error) => {\n\t\t\tpdfmake.createPdf(doc, null, fonts, vfs).getBase64((uri: string) => {\n\t\t\t\tsuccess(uri);\n\t\t\t});\n\t\t});\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic async getPDFData(customOptions?: IExportingDataOptions): Promise<any> {\n\n\t\tconst options: any = this._getFormatOptions(\"pdfdata\", customOptions);\n\n\t\t// Init output\n\t\tlet content = <any>{\n\t\t\t\"body\": <any>[]\n\t\t};\n\n\t\t// Get data\n\t\tconst data = this.getData(\"html\", options);\n\t\tconst dataFields = this.getDataFields(data);\n\n\t\t// Vertical or horizontal (default) layout\n\t\tif (options.pivot) {\n\n\t\t\t// Data fields order\n\t\t\tconst dataFieldsOrder: string[] = this.get(\"dataFieldsOrder\", []);\n\n\t\t\t$object.eachOrdered(dataFields, (key, val) => {\n\t\t\t\tlet dataRow = [];\n\t\t\t\tif (options.addColumnNames) {\n\t\t\t\t\tdataRow.push(val);\n\t\t\t\t}\n\t\t\t\tfor (let len = data.length, i = 0; i < len; i++) {\n\t\t\t\t\tlet dataValue = data[i][key];\n\t\t\t\t\tdataRow.push(this.convertToSpecialFormat(key, dataValue, options, true));\n\t\t\t\t}\n\t\t\t\tcontent.body.push(this.getPDFDataRow(dataRow, options, undefined, true));\n\t\t\t}, (a, b) => {\n\t\t\t\tlet ai = dataFieldsOrder.indexOf(a);\n\t\t\t\tlet bi = dataFieldsOrder.indexOf(b);\n\t\t\t\tif (ai > bi) {\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\t\t\t\telse if (ai < bi) {\n\t\t\t\t\treturn -1\n\t\t\t\t}\n\t\t\t\treturn 0;\n\t\t\t});\n\n\t\t}\n\n\t\telse {\n\n\t\t\t// Add column names?\n\t\t\tif (options.addColumnNames) {\n\t\t\t\tcontent.body.push(this.getPDFDataRow(dataFields, options, undefined, true));\n\t\t\t\tcontent.headerRows = 1;\n\t\t\t}\n\n\t\t\tfor (let len = data.length, i = 0; i < len; i++) {\n\t\t\t\tcontent.body.push(this.getPDFDataRow(data[i], options, dataFields));\n\t\t\t}\n\n\t\t}\n\n\t\treturn content;\n\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic getPDFDataRow(row: any, options: IExportingDataOptions, dataFields?: any, asIs: boolean = false): Array<string> {\n\n\t\t// Init\n\t\tlet items: any[] = [];\n\n\t\t// Data fields\n\t\tif (!dataFields) {\n\t\t\tdataFields = row;\n\t\t}\n\n\t\t// Data fields order\n\t\tconst dataFieldsOrder: string[] = this.get(\"dataFieldsOrder\", []);\n\n\t\t// Process each row item\n\t\t$object.eachOrdered(dataFields, (key, _name) => {\n\n\t\t\t// Get value\n\t\t\tlet value = this.convertEmptyValue(key, row[key], options);\n\n\t\t\t// Convert dates\n\t\t\tlet item = asIs ? value : this.convertToSpecialFormat(key, value, options);\n\t\t\titem = \"\" + item;\n\n\t\t\t// Add to item\n\t\t\titems.push(item);\n\t\t}, (a, b) => {\n\t\t\tlet ai = dataFieldsOrder.indexOf(a);\n\t\t\tlet bi = dataFieldsOrder.indexOf(b);\n\t\t\tif (ai > bi) {\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\telse if (ai < bi) {\n\t\t\t\treturn -1\n\t\t\t}\n\t\t\treturn 0;\n\t\t});\n\n\t\treturn items;\n\t}\n\n\t/**\n\t * Returns pdfmake instance.\n\t *\n\t * @ignore\n\t * @return Instance of pdfmake\n\t */\n\tpublic getPdfmake(): Promise<any> {\n\t\tif (pdfmakePromise === undefined) {\n\t\t\tpdfmakePromise = _pdfmake();\n\t\t}\n\n\t\treturn pdfmakePromise;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic getPageSizeFit(pageSize: pageSizes, margins: number | number[], extraMargin: number = 0, orientation: \"landscape\" | \"portrait\" = \"portrait\"): number[] {\n\n\t\t// Check margins\n\t\tlet newMargins = [0, 0, 0, 0];\n\t\tif ($type.isNumber(margins)) {\n\t\t\tnewMargins = [margins, margins, margins, margins];\n\t\t}\n\t\telse if (margins.length == 2) {\n\t\t\tnewMargins = [margins[0], margins[1], margins[0], margins[1]];\n\t\t}\n\t\telse if (margins.length == 4) {\n\t\t\tnewMargins = margins;\n\t\t}\n\n\t\t// Define available page sizes\n\t\tlet sizes = {\n\t\t\t\"4A0\": [4767.87, 6740.79],\n\t\t\t\"2A0\": [3370.39, 4767.87],\n\t\t\tA0: [2383.94, 3370.39],\n\t\t\tA1: [1683.78, 2383.94],\n\t\t\tA2: [1190.55, 1683.78],\n\t\t\tA3: [841.89, 1190.55],\n\t\t\tA4: [595.28, 841.89],\n\t\t\tA5: [419.53, 595.28],\n\t\t\tA6: [297.64, 419.53],\n\t\t\tA7: [209.76, 297.64],\n\t\t\tA8: [147.40, 209.76],\n\t\t\tA9: [104.88, 147.40],\n\t\t\tA10: [73.70, 104.88],\n\t\t\tB0: [2834.65, 4008.19],\n\t\t\tB1: [2004.09, 2834.65],\n\t\t\tB2: [1417.32, 2004.09],\n\t\t\tB3: [1000.63, 1417.32],\n\t\t\tB4: [708.66, 1000.63],\n\t\t\tB5: [498.90, 708.66],\n\t\t\tB6: [354.33, 498.90],\n\t\t\tB7: [249.45, 354.33],\n\t\t\tB8: [175.75, 249.45],\n\t\t\tB9: [124.72, 175.75],\n\t\t\tB10: [87.87, 124.72],\n\t\t\tC0: [2599.37, 3676.54],\n\t\t\tC1: [1836.85, 2599.37],\n\t\t\tC2: [1298.27, 1836.85],\n\t\t\tC3: [918.43, 1298.27],\n\t\t\tC4: [649.13, 918.43],\n\t\t\tC5: [459.21, 649.13],\n\t\t\tC6: [323.15, 459.21],\n\t\t\tC7: [229.61, 323.15],\n\t\t\tC8: [161.57, 229.61],\n\t\t\tC9: [113.39, 161.57],\n\t\t\tC10: [79.37, 113.39],\n\t\t\tRA0: [2437.80, 3458.27],\n\t\t\tRA1: [1729.13, 2437.80],\n\t\t\tRA2: [1218.90, 1729.13],\n\t\t\tRA3: [864.57, 1218.90],\n\t\t\tRA4: [609.45, 864.57],\n\t\t\tSRA0: [2551.18, 3628.35],\n\t\t\tSRA1: [1814.17, 2551.18],\n\t\t\tSRA2: [1275.59, 1814.17],\n\t\t\tSRA3: [907.09, 1275.59],\n\t\t\tSRA4: [637.80, 907.09],\n\t\t\tEXECUTIVE: [521.86, 756.00],\n\t\t\tFOLIO: [612.00, 936.00],\n\t\t\tLEGAL: [612.00, 1008.00],\n\t\t\tLETTER: [612.00, 792.00],\n\t\t\tTABLOID: [792.00, 1224.00]\n\t\t};\n\n\t\t// Calculate size\n\t\tlet fitSize = sizes[pageSize];\n\t\tif (orientation == \"landscape\") {\n\t\t\tfitSize.reverse();\n\t\t}\n\t\tfitSize[0] -= newMargins[0] + newMargins[2];\n\t\tfitSize[1] -= newMargins[1] + newMargins[3] + extraMargin;\n\t\treturn fitSize;\n\t}\n\n\t/**\n\t * ==========================================================================\n\t * Data\n\t * ==========================================================================\n\t */\n\n\t/**\n\t\t* Returns `true` if `dataSource` is set, and the contents are proper\n\t\t* data (array).\n\t\t*\n\t\t* @return Has data?\n\t\t*/\n\tpublic hasData(): boolean {\n\t\tconst dataSource = this.get(\"dataSource\");\n\t\treturn $type.isArray(dataSource) && dataSource.length ? true : false;\n\t}\n\n\t/**\n\t * Returns processed data according to format options.\n\t *\n\t * @param format Format\n\t * @param customOptions Format options\n\t * @param renameFields Should fields be renamed?\n\t * @return Processed data\n\t */\n\tpublic getData(format: ExportingFormats, customOptions?: IExportingDataOptions, renameFields: boolean = false): any {\n\t\tconst options: any = this._getFormatOptions(format, customOptions);\n\t\tconst dataSource = this.get(\"dataSource\", []);\n\t\tlet data: any = dataSource;\n\n\t\t// Re-generate the data based on data fields if set\n\t\tconst dataFields = this.get(\"dataFields\");\n\t\tif (dataFields && $type.isArray(dataSource)) {\n\t\t\tdata = [];\n\t\t\t$array.each(dataSource, (row) => {\n\t\t\t\tif ($type.isObject(row)) {\n\t\t\t\t\tconst newRow: any = {}\n\t\t\t\t\t$object.each(dataFields, (field, value) => {\n\t\t\t\t\t\tif (dataFields![field] != null) {\n\t\t\t\t\t\t\tnewRow[renameFields ? value : field] = this.convertToSpecialFormat(field, row[field], options);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tdata.push(newRow);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tconst event: any = {\n\t\t\ttype: \"dataprocessed\",\n\t\t\tformat: format,\n\t\t\toptions: options,\n\t\t\tdata: data,\n\t\t\ttarget: this\n\t\t};\n\n\t\tthis.events.dispatch(\"dataprocessed\", event);\n\n\t\treturn event.data;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic getDataFields(data: any): { [index: string]: string } {\n\t\tlet dataFields = this.get(\"dataFields\");\n\t\tif (!dataFields) {\n\t\t\tdataFields = {};\n\t\t\tif ($type.isArray(data) && data.length) {\n\t\t\t\t$array.each(data, (row) => {\n\t\t\t\t\t$object.each(row, (key, _value) => {\n\t\t\t\t\t\tif (dataFields![key] == null) {\n\t\t\t\t\t\t\tdataFields![key] = key;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\treturn dataFields!;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic convertEmptyValue(_field: string, value: any, options: IExportingDataOptions): any {\n\t\treturn value != null ? value : options.emptyAs;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic convertToSpecialFormat(field: any, value: any, options: IExportingDataOptions, keepOriginal?: boolean): any {\n\n\t\t// Is this a timestamp or duration?\n\t\tif (typeof value == \"number\") {\n\t\t\tif (this.isDateField(field)) {\n\t\t\t\tvalue = new Date(value);\n\t\t\t}\n\t\t\telse if (this.isNumericField(field) && this.get(\"numberFormat\")) {\n\t\t\t\treturn this._root.numberFormatter.format(value, this.get(\"numberFormat\"));\n\t\t\t}\n\t\t\telse if (this.isDurationField(field)) {\n\t\t\t\treturn this._root.durationFormatter.format(value, this.get(\"durationFormat\"), this.get(\"durationUnit\"));\n\t\t\t}\n\t\t}\n\n\t\tif (value instanceof Date) {\n\t\t\tif (options.useTimestamps) {\n\t\t\t\tvalue = value.getTime();\n\t\t\t}\n\t\t\telse if (options.useLocale) {\n\t\t\t\tif (!keepOriginal) {\n\t\t\t\t\tvalue = value.toLocaleString();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tvalue = this._root.dateFormatter.format(value, this.get(\"dateFormat\"));\n\t\t\t}\n\t\t}\n\n\t\treturn value;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic isDateField(field: string): boolean {\n\t\treturn this.get(\"dateFields\")!.indexOf(field) !== -1;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic isNumericField(field: string): boolean {\n\t\treturn this.get(\"numericFields\")!.indexOf(field) !== -1;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic isDurationField(field: string): boolean {\n\t\treturn this.get(\"durationFields\")!.indexOf(field) !== -1;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic getContentType(type: ExportingFormats): string {\n\t\tlet contentType = \"\";\n\t\tswitch (type) {\n\t\t\tcase \"png\":\n\t\t\t\tcontentType = \"image/\" + type;\n\t\t\t\tbreak;\n\t\t\tcase \"jpg\":\n\t\t\t\tcontentType = \"image/jpeg\";\n\t\t\t\tbreak;\n\t\t\tcase \"csv\":\n\t\t\t\tcontentType = \"text/csv\";\n\t\t\t\tbreak;\n\t\t\tcase \"json\":\n\t\t\t\tcontentType = \"application/json\";\n\t\t\t\tbreak;\n\t\t\tcase \"html\":\n\t\t\t\tcontentType = \"text/html\";\n\t\t\t\tbreak;\n\t\t\tcase \"pdf\":\n\t\t\tcase \"pdfdata\":\n\t\t\t\tcontentType = \"application/pdf\";\n\t\t\t\tbreak;\n\t\t\tcase \"xlsx\":\n\t\t\t\tcontentType = \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\";\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tcontentType = \"application/octet-stream\";\n\t\t}\n\n\t\treturn contentType;\n\t}\n\n\tprotected getDisposableCanvas(): HTMLCanvasElement {\n\t\tlet canvas = document.createElement(\"canvas\");\n\t\tcanvas.style.position = \"fixed\";\n\t\tcanvas.style.top = \"-10000px\";\n\t\tthis._root.dom.appendChild(canvas);\n\t\treturn canvas;\n\t}\n\n\tprotected disposeCanvas(canvas: HTMLCanvasElement): void {\n\t\tthis._root.dom.removeChild(canvas);\n\t}\n\n\n\t/**\n\t * @ignore\n\t */\n\tpublic findBackgroundColor(element: Element): Color {\n\n\t\t// Check if element has styles set\n\t\tlet opacity = 1;\n\t\tlet currentColor = getComputedStyle(element, \"background-color\").getPropertyValue(\"background-color\");\n\n\t\t// Check opacity\n\t\tif (currentColor.match(/[^,]*,[^,]*,[^,]*,[ ]?0/) || currentColor == \"transparent\") {\n\t\t\topacity = 0;\n\t\t}\n\n\t\tif (opacity == 0) {\n\t\t\tlet parent = element.parentElement;// || <Element>element.parentNode;\n\n\t\t\t// Completely transparent. Look for a parent\n\t\t\tif (parent) {\n\t\t\t\treturn this.findBackgroundColor(parent);\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn Color.fromHex(0xffffff);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\treturn Color.fromCSS(currentColor);\n\t\t}\n\n\t}\n\n\t/**\n\t * Triggers download of the file.\n\t *\n\t * @param uri data:uri with file content\n\t * @param fileName File name\n\t * @param addBOM Should download include byte order mark?\n\t * @return Promise\n\t */\n\tpublic streamFile(uri: string, fileName: string, addBOM: boolean = false): boolean {\n\n\t\tif (this.blobDownloadSupport()) {\n\n\t\t\t/**\n\t\t\t * Supports Blob object.\n\t\t\t * Use it.\n\t\t\t */\n\t\t\tlet link = document.createElement(\"a\");\n\t\t\tlink.download = fileName;\n\t\t\tdocument.body.appendChild(link);\n\n\t\t\t// Extract content type and get pure data without headers\n\t\t\tlet parts = uri.split(\";\");\n\t\t\tlet contentType = parts!.shift()!.replace(/data:/, \"\");\n\n\t\t\turi = decodeURIComponent(parts.join(\";\").replace(/^[^,]*,/, \"\"));\n\n\t\t\tif ([\"image/svg+xml\", \"application/json\", \"text/csv\", \"text/html\"].indexOf(contentType) == -1) {\n\t\t\t\ttry {\n\t\t\t\t\tlet decoded = atob(uri);\n\t\t\t\t\turi = decoded;\n\t\t\t\t} catch (e) {\n\t\t\t\t\t// Error occurred, meaning string was not Base64-encoded. Do nothing.\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (addBOM) {\n\t\t\t\t\turi = \"\\ufeff\" + uri;\n\t\t\t\t}\n\t\t\t\tlet blob = new Blob([uri], { type: contentType });\n\t\t\t\tlet url = window.URL.createObjectURL(blob);\n\t\t\t\tlink.href = url;\n\t\t\t\tlink.download = fileName;\n\t\t\t\tlink.click();\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tdocument.body.removeChild(link);\n\t\t\t\t\twindow.URL.revokeObjectURL(url);\n\t\t\t\t}, 100);\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t// Dissect uri into array\n\t\t\tlet chars = new Array(uri.length);\n\t\t\tfor (let i = 0; i < uri.length; ++i) {\n\t\t\t\tlet charCode = uri.charCodeAt(i);\n\t\t\t\tchars[i] = charCode;\n\t\t\t}\n\n\t\t\tif (addBOM) {\n\t\t\t\tchars = [0xEF, 0xBB, 0xBF].concat(chars);\n\t\t\t}\n\t\t\tlet blob = new Blob([new Uint8Array(chars)], { type: contentType });\n\t\t\tlet url = window.URL.createObjectURL(blob);\n\t\t\tlink.href = url;\n\t\t\tlink.download = fileName;\n\t\t\tdocument.body.appendChild(link);\n\t\t\tlink.click();\n\t\t\tdocument.body.removeChild(link);\n\t\t\tsetTimeout(() => {\n\t\t\t\twindow.URL.revokeObjectURL(url);\n\t\t\t}, 100);\n\n\t\t}\n\n\t\telse if (this.linkDownloadSupport()) {\n\n\t\t\t/**\n\t\t\t * For regular browsers, we create a link then simulate a click on it\n\t\t\t */\n\n\t\t\tlet link = document.createElement(\"a\");\n\t\t\tlink.download = fileName;\n\t\t\tlink.href = uri;\n\t\t\tdocument.body.appendChild(link);\n\t\t\tlink.click();\n\t\t\tdocument.body.removeChild(link);\n\n\t\t}\n\t\telse {\n\n\t\t\t/**\n\t\t\t * Something else - perhaps a mobile.\n\t\t\t * Let's just display it in the same page.\n\t\t\t * (hey we don't like it either)\n\t\t\t */\n\t\t\twindow.location.href = uri;\n\t\t}\n\n\t\treturn true;\n\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic downloadSupport(): boolean {\n\t\treturn this.linkDownloadSupport();\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic linkDownloadSupport(): boolean {\n\t\tlet a = document.createElement(\"a\");\n\t\tlet res = typeof a.download !== \"undefined\";\n\t\treturn res;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic blobDownloadSupport(): boolean {\n\t\treturn window.Blob != null;\n\t}\n\n\n\t/**\n\t * ==========================================================================\n\t * Print\n\t * ==========================================================================\n\t */\n\n\t/**\n\t * Initiates print of the chart.\n\t *\n\t * @param data data:uri for the image\n\t * @param options Options\n\t * @param title Optional title to use (uses window's title by default)\n\t * @return Promise\n\t */\n\tpublic initiatePrint(data: string, customOptions?: IExportingPrintOptions, title?: string): void {\n\t\tconst options = <IExportingPrintOptions>this._getFormatOptions(\"print\", customOptions);\n\t\tif (options.printMethod == \"css\") {\n\t\t\tthis._printViaCSS(data, options, title);\n\t\t}\n\t\telse {\n\t\t\tthis._printViaIframe(data, options, title);\n\t\t}\n\n\t}\n\n\tprotected _printViaCSS(data: string, customOptions?: IExportingPrintOptions, title?: string): void {\n\t\tconst options = <IExportingPrintOptions>this._getFormatOptions(\"print\", customOptions);\n\t\tlet delay = options.delay || 500;\n\n\t\t//Save current scroll position\n\t\tlet scroll = document.documentElement.scrollTop || document.body.scrollTop;\n\n\t\t// Hide all document nodes by applying custom CSS\n\t\tlet rule = new StyleRule($utils.getShadowRoot(this._root.dom), \"body > *\", {\n\t\t\t\"display\": \"none\",\n\t\t\t\"position\": \"fixed\",\n\t\t\t\"visibility\": \"hidden\",\n\t\t\t\"opacity\": \"0\",\n\t\t\t\"clipPath\": \"polygon(0px 0px,0px 0px,0px 0px,0px 0px);\"\n\t\t}, this._root.nonce);\n\n\t\tlet rule2 = new StyleRule($utils.getShadowRoot(this._root.dom), \"body\", {\n\t\t\t\"padding\": \"0\",\n\t\t\t\"margin\": \"0\"\n\t\t}, this._root.nonce);\n\n\t\t// Replace title?\n\t\tlet originalTitle: string;\n\t\tif (title && document && document.title) {\n\t\t\toriginalTitle = document.title;\n\t\t\tdocument.title = title;\n\t\t}\n\n\t\t// Create and add exported image\n\t\tlet img = new Image();\n\t\timg.src = data;\n\t\timg.style.maxWidth = \"100%\";\n\t\timg.style.display = \"block\";\n\t\timg.style.position = \"relative\";\n\t\timg.style.visibility = \"visible\";\n\t\timg.style.opacity = \"1\";\n\t\timg.style.clipPath = \"none\";\n\t\tdocument.body.appendChild(img);\n\n\t\t// Print\n\t\tthis.setTimeout(() => {\n\t\t\t(<any>window).print();\n\t\t}, 50);\n\n\t\t// Delay needs to be at least a second for iOS devices\n\t\tlet isIOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !(<any>window).MSStream;\n\t\tif (isIOS && (delay < 1000)) {\n\t\t\tdelay = 1000;\n\t\t}\n\t\telse if (delay < 100) {\n\t\t\tdelay = 100;\n\t\t}\n\n\t\t// Delay function that resets back the document the way ot was before\n\t\tthis.setTimeout(() => {\n\n\t\t\t// Remove image\n\t\t\tdocument.body.removeChild(img);\n\n\t\t\t// Reset back all elements\n\t\t\trule.dispose();\n\t\t\trule2.dispose();\n\n\t\t\t// Restore title\n\t\t\tif (originalTitle) {\n\t\t\t\tdocument.title = document.title;\n\t\t\t}\n\n\t\t\t// Scroll back the document the way it was before\n\t\t\tdocument.documentElement.scrollTop = document.body.scrollTop = scroll;\n\n\t\t}, delay || 500);\n\n\t}\n\n\tprotected _printViaIframe(data: string, customOptions?: IExportingPrintOptions, title?: string): void {\n\t\tconst options = <IExportingPrintOptions>this._getFormatOptions(\"print\", customOptions);\n\t\tlet delay = options.delay || 500;\n\n\t\t// Create an iframe\n\t\tconst iframe = document.createElement(\"iframe\");\n\t\tiframe.style.visibility = \"hidden\";\n\t\tdocument.body.appendChild(iframe);\n\n\t\t// This is needed for FireFox\n\t\tiframe.contentWindow!.document.open();\n\t\tiframe.contentWindow!.document.close();\n\n\t\t// Create and add exported image\n\t\tlet img = new Image();\n\t\timg.src = data;\n\t\timg.style.maxWidth = \"100%\";\n\t\timg.style.height = \"auto\";\n\t\tif (title) {\n\t\t\tiframe.contentWindow!.document.title = title;\n\t\t}\n\t\tiframe.contentWindow!.document.body.appendChild(img);\n\n\t\t(<any>iframe).load = function() {\n\t\t\tiframe.contentWindow!.document.body.appendChild(img);\n\t\t};\n\n\t\t// Print\n\t\tthis.setTimeout(() => {\n\t\t\ttry {\n\t\t\t\tif (!(<any>iframe).contentWindow.document.execCommand(\"print\", false, null)) {\n\t\t\t\t\t(<any>iframe).contentWindow.print();\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\t(<any>iframe).contentWindow.print();\n\t\t\t}\n\t\t}, delay || 50);\n\n\t\t// Delay needs to be at least a second for iOS devices\n\t\tlet isIOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !(<any>window).MSStream;\n\t\tif (isIOS && (delay < 1000)) {\n\t\t\tdelay = 1000;\n\t\t}\n\t\telse if (delay < 100) {\n\t\t\tdelay = 100;\n\t\t}\n\n\t\t// Delay function that resets back the document the way ot was before\n\t\tthis.setTimeout(() => {\n\n\t\t\t// Remove image\n\t\t\tdocument.body.removeChild(iframe);\n\n\t\t}, delay + 50 || 100);\n\n\t}\n\n\t/**\n\t * Returns a list of formats that can be exported in current browser.\n\t *\n\t * @return Formats\n\t */\n\tpublic supportedFormats(): ExportingFormats[] {\n\t\tconst res: ExportingFormats[] = [];\n\t\tconst hasData = this.hasData();\n\t\tconst downloadSupport = this.downloadSupport();\n\t\t$array.each(<ExportingFormats[]>[\"png\", \"jpg\", \"canvas\", \"pdf\", \"xlsx\", \"csv\", \"json\", \"html\", \"pdfdata\", \"print\"], (format) => {\n\t\t\tconst options = this._getFormatOptions(format);\n\t\t\tif (options.disabled !== true) {\n\t\t\t\tif ([\"xlsx\", \"csv\", \"json\", \"html\", \"pdfdata\"].indexOf(format) == -1 || (hasData && downloadSupport)) {\n\t\t\t\t\tres.push(<ExportingFormats>format);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn res;\n\t}\n\n\t/**\n\t * Returns a list of supported export types: image or print.\n\t *\n\t * @return Supported types\n\t */\n\tpublic supportedExportTypes(): ExportingTypes[] {\n\t\tconst res: ExportingTypes[] = [\"image\", \"print\"];\n\t\tif (this.downloadSupport() && this.hasData()) {\n\t\t\tres.push(\"data\");\n\t\t}\n\t\treturn res;\n\t}\n\n}\n","import { Theme } from \"../core/Theme\";\n\n/**\n * @ignore\n */\nexport class AnimatedTheme extends Theme {\n\tprotected setupDefaultRules() {\n\t\tsuper.setupDefaultRules();\n\n\t\tthis.rule(\"Component\").setAll({\n\t\t\tinterpolationDuration: 600\n\t\t});\n\n\t\tthis.rule(\"Hierarchy\").set(\"animationDuration\", 600);\n\t\tthis.rule(\"Scrollbar\").set(\"animationDuration\", 600);\n\n\t\tthis.rule(\"Tooltip\").set(\"animationDuration\", 300);\n\n\t\tthis.rule(\"MapChart\").set(\"animationDuration\", 1000);\n\t\tthis.rule(\"MapChart\").set(\"wheelDuration\", 300);\n\n\t\tthis.rule(\"Entity\").setAll({\n\t\t\tstateAnimationDuration: 600\n\t\t});\n\n\t\tthis.rule(\"Sprite\").states.create(\"default\", { stateAnimationDuration: 600 });\n\n\t\tthis.rule(\"Tooltip\", [\"axis\"]).setAll({\n\t\t\tanimationDuration: 200\n\t\t});\n\n\t\tthis.rule(\"WordCloud\").set(\"animationDuration\", 500);\n\t\tthis.rule(\"Polygon\").set(\"animationDuration\", 600);\n\t\tthis.rule(\"ArcDiagram\").set(\"animationDuration\", 600);\n\t}\n}\n","import { Color } from \"../core/util/Color\";\nimport { Theme } from \"../core/Theme\";\n\n/**\n * @ignore\n */\nexport class DarkTheme extends Theme {\n\tprotected setupDefaultRules() {\n\t\tsuper.setupDefaultRules();\n\n\t\tthis.rule(\"InterfaceColors\").setAll({\n\t\t\tstroke: Color.fromHex(0x000000),\n\t\t\tfill: Color.fromHex(0x2b2b2b),\n\t\t\tprimaryButton: Color.lighten(Color.fromHex(0x6794dc), -0.2),\n\t\t\tprimaryButtonHover: Color.lighten(Color.fromHex(0x6771dc), -0.2),\n\t\t\tprimaryButtonDown: Color.lighten(Color.fromHex(0x68dc75), -0.2),\n\t\t\tprimaryButtonActive: Color.lighten(Color.fromHex(0x68dc76), -0.2),\n\t\t\tprimaryButtonText: Color.fromHex(0xffffff),\n\t\t\tprimaryButtonStroke: Color.lighten(Color.fromHex(0x6794dc), -0.2),\n\n\t\t\tsecondaryButton: Color.fromHex(0x3b3b3b),\n\t\t\tsecondaryButtonHover: Color.lighten(Color.fromHex(0x3b3b3b), 0.1),\n\t\t\tsecondaryButtonDown: Color.lighten(Color.fromHex(0x3b3b3b), 0.15),\n\t\t\tsecondaryButtonActive: Color.lighten(Color.fromHex(0x3b3b3b), 0.2),\n\t\t\tsecondaryButtonText: Color.fromHex(0xbbbbbb),\n\t\t\tsecondaryButtonStroke: Color.lighten(Color.fromHex(0x3b3b3b), -0.2),\n\n\t\t\tgrid: Color.fromHex(0xbbbbbb),\n\t\t\tbackground: Color.fromHex(0x000000),\n\t\t\talternativeBackground: Color.fromHex(0xffffff),\n\t\t\ttext: Color.fromHex(0xffffff),\n\t\t\talternativeText: Color.fromHex(0x000000),\n\t\t\tdisabled: Color.fromHex(0xadadad),\n\t\t\tpositive: Color.fromHex(0x50b300),\n\t\t\tnegative: Color.fromHex(0xb30000)\n\t\t});\n\n\t}\n}\n","import type { InterfaceColors, IInterfaceColorsSettings } from \"../core/util/InterfaceColors\";\n\nimport { Theme } from \"../core/Theme\";\nimport { p100, p50 } from \"../core/util/Percent\";\nimport { Color } from \"../core/util/Color\";\nimport { GridLayout } from \"../core/render/GridLayout\";\n\nimport * as $ease from \"../core/util/Ease\";\n\n\ninterface Settable<A> {\n\t_settings: A;\n\tset<K extends keyof A>(key: K, value: A[K]): void;\n}\n\n/**\n * @ignore\n */\nexport function setColor<A, K extends keyof A>(rule: Settable<A>, key: K, ic: InterfaceColors, name: keyof IInterfaceColorsSettings) {\n\t// TODO this shouldn't use get, figure out a better way\n\trule.set(key, ic.get(name) as any);\n\n\tic.on(name, (value) => {\n\t\trule.set(key, value as any);\n\t});\n}\n\n/**\n * @ignore\n */\nexport class DefaultTheme extends Theme {\n\tprotected setupDefaultRules() {\n\t\tsuper.setupDefaultRules();\n\n\t\tconst language = this._root.language;\n\n\t\tconst ic = this._root.interfaceColors;\n\n\t\tconst horizontalLayout = this._root.horizontalLayout;\n\t\tconst verticalLayout = this._root.verticalLayout;\n\n\t\tconst r = this.rule.bind(this);\n\n\n\t\t/**\n\t\t * ========================================================================\n\t\t * core\n\t\t * ========================================================================\n\t\t */\n\n\t\tr(\"InterfaceColors\").setAll({\n\t\t\tstroke: Color.fromHex(0xe5e5e5),\n\t\t\tfill: Color.fromHex(0xf3f3f3),\n\t\t\tprimaryButton: Color.fromHex(0x6794dc),\n\t\t\tprimaryButtonHover: Color.fromHex(0x6771dc),\n\t\t\tprimaryButtonDown: Color.fromHex(0x68dc76),\n\t\t\tprimaryButtonActive: Color.fromHex(0x68dc76),\n\t\t\tprimaryButtonDisabled: Color.fromHex(0xdadada),\n\t\t\tprimaryButtonTextDisabled: Color.fromHex(0xffffff),\n\t\t\tprimaryButtonText: Color.fromHex(0xffffff),\n\t\t\tprimaryButtonStroke: Color.fromHex(0xffffff),\n\t\t\tsecondaryButton: Color.fromHex(0xd9d9d9),\n\t\t\tsecondaryButtonHover: Color.fromHex(0xa3a3a3),\n\t\t\tsecondaryButtonDown: Color.fromHex(0x8d8d8d),\n\t\t\tsecondaryButtonActive: Color.fromHex(0xe6e6e6),\n\t\t\tsecondaryButtonText: Color.fromHex(0x000000),\n\t\t\tsecondaryButtonStroke: Color.fromHex(0xffffff),\n\t\t\tgrid: Color.fromHex(0x000000),\n\t\t\tbackground: Color.fromHex(0xffffff),\n\t\t\talternativeBackground: Color.fromHex(0x000000),\n\t\t\ttext: Color.fromHex(0x000000),\n\t\t\talternativeText: Color.fromHex(0xffffff),\n\t\t\tdisabled: Color.fromHex(0xadadad),\n\t\t\tpositive: Color.fromHex(0x50b300),\n\t\t\tnegative: Color.fromHex(0xb30000)\n\t\t});\n\n\t\t{\n\t\t\tconst rule = r(\"ColorSet\");\n\n\t\t\trule.setAll({\n\t\t\t\tpassOptions: {\n\t\t\t\t\thue: 0.05,\n\t\t\t\t\tsaturation: 0,\n\t\t\t\t\tlightness: 0\n\t\t\t\t},\n\t\t\t\tcolors: [\n\t\t\t\t\tColor.fromHex(0x67b7dc)\n\t\t\t\t],\n\t\t\t\tstep: 1,\n\t\t\t\t//baseColor: Color.fromRGB(103, 183, 220),\n\t\t\t\t//count: 20,\n\t\t\t\treuse: false,\n\t\t\t\tstartIndex: 0\n\t\t\t});\n\n\t\t\trule.setPrivate(\"currentStep\", 0);\n\t\t\trule.setPrivate(\"currentPass\", 0);\n\t\t}\n\n\t\tr(\"Entity\").setAll({\n\t\t\tstateAnimationDuration: 0,\n\t\t\tstateAnimationEasing: $ease.out($ease.cubic)\n\t\t});\n\n\t\tr(\"Component\").setAll({\n\t\t\tinterpolationDuration: 0,\n\t\t\tinterpolationEasing: $ease.out($ease.cubic)\n\t\t});\n\n\t\tr(\"Sprite\").setAll({\n\t\t\tvisible: true,\n\t\t\tscale: 1,\n\t\t\topacity: 1,\n\t\t\trotation: 0,\n\t\t\tposition: \"relative\",\n\t\t\ttooltipX: p50,\n\t\t\ttooltipY: p50,\n\t\t\ttooltipPosition: \"fixed\",\n\t\t\tisMeasured: true\n\t\t});\n\n\t\tr(\"Sprite\").states.create(\"default\", { \"visible\": true, opacity: 1 });\n\n\t\tr(\"Container\").setAll({\n\t\t\tinteractiveChildren: true,\n\t\t\tsetStateOnChildren: false\n\t\t});\n\n\t\tr(\"Graphics\").setAll({\n\t\t\tstrokeWidth: 1\n\t\t});\n\n\n\t\tr(\"Chart\").setAll({\n\t\t\twidth: p100,\n\t\t\theight: p100,\n\t\t\tinteractiveChildren: false\n\t\t});\n\n\t\tr(\"ZoomableContainer\").setAll({\n\t\t\twidth: p100,\n\t\t\theight: p100,\n\t\t\twheelable: true,\n\t\t\tpinchZoom: true,\n\t\t\tmaxZoomLevel: 32,\n\t\t\tminZoomLevel: 1,\n\t\t\tzoomStep: 2,\n\t\t\tanimationEasing: $ease.out($ease.cubic),\n\t\t\tanimationDuration: 600,\n\t\t\tmaxPanOut: 0.4\n\t\t});\n\n\n\t\t/**\n\t\t * ------------------------------------------------------------------------\n\t\t * core: alignment\n\t\t * ------------------------------------------------------------------------\n\t\t */\n\n\t\tr(\"Sprite\", [\"horizontal\", \"center\"]).setAll({\n\t\t\tcenterX: p50,\n\t\t\tx: p50\n\t\t});\n\n\t\tr(\"Sprite\", [\"vertical\", \"center\"]).setAll({\n\t\t\tcenterY: p50,\n\t\t\ty: p50\n\t\t});\n\n\t\tr(\"Container\", [\"horizontal\", \"layout\"]).setAll({\n\t\t\tlayout: horizontalLayout\n\t\t});\n\n\t\tr(\"Container\", [\"vertical\", \"layout\"]).setAll({\n\t\t\tlayout: verticalLayout\n\t\t});\n\n\t\t/**\n\t\t * ------------------------------------------------------------------------\n\t\t * core: patterns\n\t\t * ------------------------------------------------------------------------\n\t\t */\n\n\t\tr(\"Pattern\").setAll({\n\t\t\trepetition: \"repeat\",\n\t\t\twidth: 50,\n\t\t\theight: 50,\n\t\t\trotation: 0,\n\t\t\tfillOpacity: 1\n\t\t});\n\n\t\tr(\"LinePattern\").setAll({\n\t\t\tgap: 6,\n\t\t\tcolorOpacity: 1,\n\t\t\twidth: 49,\n\t\t\theight: 49\n\t\t});\n\n\t\tr(\"RectanglePattern\").setAll({\n\t\t\tgap: 6,\n\t\t\tcheckered: false,\n\t\t\tcentered: true,\n\t\t\tmaxWidth: 5,\n\t\t\tmaxHeight: 5,\n\t\t\twidth: 48,\n\t\t\theight: 48,\n\t\t\tstrokeWidth: 0\n\t\t});\n\n\t\tr(\"CirclePattern\").setAll({\n\t\t\tgap: 5,\n\t\t\tcheckered: false,\n\t\t\tcentered: false,\n\t\t\tradius: 3,\n\t\t\tstrokeWidth: 0,\n\t\t\twidth: 45,\n\t\t\theight: 45\n\t\t});\n\n\t\tr(\"GrainPattern\").setAll({\n\t\t\twidth: 200,\n\t\t\theight: 200,\n\t\t\tcolors: [Color.fromHex(0x000000)],\n\t\t\tsize: 1,\n\t\t\thorizontalGap: 0,\n\t\t\tverticalGap: 0,\n\t\t\tdensity: 1,\n\t\t\tminOpacity: 0,\n\t\t\tmaxOpacity: 0.2\n\t\t});\n\n\t\t{\n\t\t\tconst rule = r(\"PatternSet\");\n\n\t\t\trule.setAll({\n\t\t\t\tstep: 1\n\t\t\t});\n\n\t\t\tsetColor(rule, \"color\", ic, \"stroke\");\n\t\t}\n\n\n\t\t/**\n\t\t * ------------------------------------------------------------------------\n\t\t * core: gradients\n\t\t * ------------------------------------------------------------------------\n\t\t */\n\n\t\tr(\"LinearGradient\").setAll({\n\t\t\trotation: 90\n\t\t});\n\n\n\t\t/**\n\t\t * ------------------------------------------------------------------------\n\t\t * core: Legend\n\t\t * ------------------------------------------------------------------------\n\t\t */\n\n\t\tr(\"Legend\").setAll({\n\t\t\tfillField: \"fill\",\n\t\t\tstrokeField: \"stroke\",\n\t\t\tnameField: \"name\",\n\t\t\tlayout: GridLayout.new(this._root, {}),\n\t\t\tlayer: 30,\n\t\t\tclickTarget: \"itemContainer\"\n\t\t});\n\n\t\t// Class: Container\n\t\tr(\"Container\", [\"legend\", \"item\", \"itemcontainer\"]).setAll({\n\t\t\tpaddingLeft: 5,\n\t\t\tpaddingRight: 5,\n\t\t\tpaddingBottom: 5,\n\t\t\tpaddingTop: 5,\n\t\t\tlayout: horizontalLayout,\n\t\t\tsetStateOnChildren: true,\n\t\t\tinteractiveChildren: false,\n\t\t\tariaChecked: true,\n\t\t\tfocusable: true,\n\t\t\tariaLabel: language.translate(\"Press ENTER to toggle\"),\n\t\t\trole: \"checkbox\"\n\t\t});\n\n\t\t{\n\t\t\tconst rule = r(\"Rectangle\", [\"legend\", \"item\", \"background\"]);\n\n\t\t\trule.setAll({\n\t\t\t\tfillOpacity: 0,\n\t\t\t});\n\n\t\t\tsetColor(rule, \"fill\", ic, \"background\");\n\t\t}\n\n\t\tr(\"Container\", [\"legend\", \"marker\"]).setAll({\n\t\t\tsetStateOnChildren: true,\n\t\t\tcenterY: p50,\n\t\t\tpaddingLeft: 0,\n\t\t\tpaddingRight: 0,\n\t\t\tpaddingBottom: 0,\n\t\t\tpaddingTop: 0,\n\t\t\twidth: 18,\n\t\t\theight: 18\n\t\t});\n\n\t\tr(\"RoundedRectangle\", [\"legend\", \"marker\", \"rectangle\"]).setAll({\n\t\t\twidth: p100,\n\t\t\theight: p100,\n\t\t\tcornerRadiusBL: 3,\n\t\t\tcornerRadiusTL: 3,\n\t\t\tcornerRadiusBR: 3,\n\t\t\tcornerRadiusTR: 3\n\t\t});\n\n\t\t{\n\t\t\tconst rule = r(\"RoundedRectangle\", [\"legend\", \"marker\", \"rectangle\"]).states.create(\"disabled\", {});\n\t\t\tsetColor(rule, \"fill\", ic, \"disabled\");\n\t\t\tsetColor(rule, \"stroke\", ic, \"disabled\");\n\t\t}\n\n\t\tr(\"Label\", [\"legend\", \"label\"]).setAll({\n\t\t\tcenterY: p50,\n\t\t\tmarginLeft: 5,\n\t\t\tpaddingRight: 0,\n\t\t\tpaddingLeft: 0,\n\t\t\tpaddingTop: 0,\n\t\t\tpaddingBottom: 0,\n\t\t\tpopulateText: true\n\t\t});\n\n\t\t{\n\t\t\tconst rule = r(\"Label\", [\"legend\", \"label\"]).states.create(\"disabled\", {});\n\t\t\tsetColor(rule, \"fill\", ic, \"disabled\");\n\t\t}\n\n\t\tr(\"Label\", [\"legend\", \"value\", \"label\"]).setAll({\n\t\t\tcenterY: p50,\n\t\t\tmarginLeft: 5,\n\t\t\tpaddingRight: 0,\n\t\t\tpaddingLeft: 0,\n\t\t\tpaddingTop: 0,\n\t\t\tpaddingBottom: 0,\n\t\t\twidth: 50,\n\t\t\tcenterX: p100,\n\t\t\tpopulateText: true\n\t\t});\n\n\t\t{\n\t\t\tconst rule = r(\"Label\", [\"legend\", \"value\", \"label\"]).states.create(\"disabled\", {});\n\t\t\tsetColor(rule, \"fill\", ic, \"disabled\");\n\t\t}\n\n\n\n\t\t/**\n\t\t * ------------------------------------------------------------------------\n\t\t * core: HeatLegend\n\t\t * ------------------------------------------------------------------------\n\t\t */\n\n\t\tr(\"HeatLegend\").setAll({\n\t\t\tstepCount: 1\n\t\t});\n\n\t\tr(\"RoundedRectangle\", [\"heatlegend\", \"marker\"]).setAll({\n\t\t\tcornerRadiusTR: 0,\n\t\t\tcornerRadiusBR: 0,\n\t\t\tcornerRadiusTL: 0,\n\t\t\tcornerRadiusBL: 0\n\t\t});\n\n\t\tr(\"RoundedRectangle\", [\"vertical\", \"heatlegend\", \"marker\"]).setAll({\n\t\t\theight: p100,\n\t\t\twidth: 15\n\t\t});\n\n\t\tr(\"RoundedRectangle\", [\"horizontal\", \"heatlegend\", \"marker\"]).setAll({\n\t\t\twidth: p100,\n\t\t\theight: 15\n\t\t});\n\n\t\tr(\"HeatLegend\", [\"vertical\"]).setAll({\n\t\t\theight: p100\n\t\t});\n\n\t\tr(\"HeatLegend\", [\"horizontal\"]).setAll({\n\t\t\twidth: p100\n\t\t});\n\n\t\tr(\"Label\", [\"heatlegend\", \"start\"]).setAll({\n\t\t\tpaddingLeft: 5,\n\t\t\tpaddingRight: 5,\n\t\t\tpaddingTop: 5,\n\t\t\tpaddingBottom: 5\n\t\t});\n\n\t\tr(\"Label\", [\"heatlegend\", \"end\"]).setAll({\n\t\t\tpaddingLeft: 5,\n\t\t\tpaddingRight: 5,\n\t\t\tpaddingTop: 5,\n\t\t\tpaddingBottom: 5\n\t\t});\n\n\n\t\t/**\n\t\t * ------------------------------------------------------------------------\n\t\t * core: Labels\n\t\t * ------------------------------------------------------------------------\n\t\t */\n\n\t\t{\n\t\t\tconst rule = r(\"Label\");\n\n\t\t\trule.setAll({\n\t\t\t\tpaddingTop: 8,\n\t\t\t\tpaddingBottom: 8,\n\t\t\t\tpaddingLeft: 10,\n\t\t\t\tpaddingRight: 10,\n\t\t\t\tfontFamily: \"-apple-system, BlinkMacSystemFont, \\\"Segoe UI\\\", Roboto, Helvetica, Arial, sans-serif, \\\"Apple Color Emoji\\\", \\\"Segoe UI Emoji\\\", \\\"Segoe UI Symbol\\\"\",\n\t\t\t\tfontSize: \"1em\",\n\t\t\t\tpopulateText: false\n\t\t\t});\n\n\t\t\tsetColor(rule, \"fill\", ic, \"text\");\n\t\t}\n\n\t\tr(\"RadialLabel\").setAll({\n\t\t\ttextType: \"regular\",\n\t\t\tcenterY: p50,\n\t\t\tcenterX: p50,\n\t\t\tinside: false,\n\t\t\tradius: 0,\n\t\t\tbaseRadius: p100,\n\t\t\torientation: \"auto\",\n\t\t\ttextAlign: \"center\"\n\t\t});\n\n\t\tr(\"EditableLabel\").setAll({\n\t\t\teditOn: \"click\",\n\t\t\t//setStateOnChildren: true,\n\t\t\tthemeTags: [\"editablelabel\"],\n\t\t\tmultiLine: true\n\t\t});\n\n\t\tr(\"RoundedRectangle\", [\"editablelabel\", \"background\"]).setAll({\n\t\t\tfillOpacity: 0,\n\t\t\tfill: Color.fromHex(0x000000),\n\t\t\tcornerRadiusBL: 3,\n\t\t\tcornerRadiusBR: 3,\n\t\t\tcornerRadiusTL: 3,\n\t\t\tcornerRadiusTR: 3,\n\t\t\tstrokeOpacity: 0,\n\t\t\tstroke: Color.fromHex(0x000000)\n\t\t});\n\n\t\t{\n\t\t\tr(\"RoundedRectangle\", [\"editablelabel\", \"background\"]).states.create(\"active\", {\n\t\t\t\tstrokeOpacity: 0.2,\n\t\t\t});\n\t\t}\n\n\n\n\n\t\t/**\n\t\t * ------------------------------------------------------------------------\n\t\t * core: Elements and shapes\n\t\t * ------------------------------------------------------------------------\n\t\t */\n\n\t\tr(\"RoundedRectangle\").setAll({\n\t\t\tcornerRadiusTL: 8,\n\t\t\tcornerRadiusBL: 8,\n\t\t\tcornerRadiusTR: 8,\n\t\t\tcornerRadiusBR: 8\n\t\t});\n\n\t\tr(\"PointedRectangle\").setAll({\n\t\t\tpointerBaseWidth: 15,\n\t\t\tpointerLength: 10,\n\t\t\tcornerRadius: 8\n\t\t});\n\n\t\tr(\"Slice\").setAll({\n\t\t\tshiftRadius: 0,\n\t\t\tdRadius: 0,\n\t\t\tdInnerRadius: 0\n\t\t});\n\n\t\t{\n\t\t\tconst rule = r(\"Tick\");\n\n\t\t\trule.setAll({\n\t\t\t\tstrokeOpacity: .15,\n\t\t\t\tisMeasured: false,\n\t\t\t\tlength: 4.5,\n\t\t\t\tposition: \"absolute\",\n\t\t\t\tcrisp: true\n\t\t\t});\n\n\t\t\tsetColor(rule, \"stroke\", ic, \"grid\");\n\t\t}\n\n\t\tr(\"Bullet\").setAll({\n\t\t\tlocationX: 0.5,\n\t\t\tlocationY: 0.5\n\t\t});\n\n\n\t\t/**\n\t\t * ------------------------------------------------------------------------\n\t\t * core: Tooltip\n\t\t * ------------------------------------------------------------------------\n\t\t */\n\n\t\tr(\"Tooltip\").setAll({\n\t\t\tposition: \"absolute\",\n\t\t\tgetFillFromSprite: true,\n\t\t\tgetStrokeFromSprite: false,\n\t\t\tautoTextColor: true,\n\t\t\tpaddingTop: 9,\n\t\t\tpaddingBottom: 8,\n\t\t\tpaddingLeft: 10,\n\t\t\tpaddingRight: 10,\n\t\t\tmarginBottom: 5,\n\t\t\tpointerOrientation: \"vertical\",\n\t\t\tcenterX: p50,\n\t\t\tcenterY: p50,\n\t\t\tanimationEasing: $ease.out($ease.cubic),\n\t\t\texportable: false\n\t\t\t//layer: 100\n\t\t});\n\n\t\tr(\"Polygon\").setAll({\n\t\t\tanimationEasing: $ease.out($ease.cubic),\n\t\t});\n\n\t\t{\n\t\t\tconst rule = r(\"PointedRectangle\", [\"tooltip\", \"background\"]);\n\n\t\t\trule.setAll({\n\t\t\t\tstrokeOpacity: 0.9,\n\t\t\t\tcornerRadius: 4,\n\t\t\t\tpointerLength: 4,\n\t\t\t\tpointerBaseWidth: 8,\n\t\t\t\tfillOpacity: 0.9,\n\t\t\t\tstroke: Color.fromHex(0xffffff)\n\t\t\t});\n\t\t}\n\n\t\t{\n\t\t\tconst rule = r(\"Label\", [\"tooltip\"]);\n\n\t\t\trule.setAll({\n\t\t\t\trole: \"tooltip\",\n\t\t\t\tpopulateText: true,\n\t\t\t\tpaddingRight: 0,\n\t\t\t\tpaddingTop: 0,\n\t\t\t\tpaddingLeft: 0,\n\t\t\t\tpaddingBottom: 0\n\t\t\t});\n\n\t\t\tsetColor(rule, \"fill\", ic, \"alternativeText\");\n\t\t}\n\n\n\t\t/**\n\t\t * ------------------------------------------------------------------------\n\t\t * core: Button\n\t\t * ------------------------------------------------------------------------\n\t\t */\n\n\t\tr(\"Button\").setAll({\n\t\t\tpaddingTop: 8,\n\t\t\tpaddingBottom: 8,\n\t\t\tpaddingLeft: 10,\n\t\t\tpaddingRight: 10,\n\t\t\tinteractive: true,\n\t\t\tlayout: horizontalLayout,\n\t\t\tinteractiveChildren: false,\n\t\t\tsetStateOnChildren: true,\n\t\t\tfocusable: true\n\t\t});\n\n\t\tr(\"Button\").states.create(\"hover\", {});\n\t\tr(\"Button\").states.create(\"down\", { stateAnimationDuration: 0 });\n\t\tr(\"Button\").states.create(\"active\", {});\n\t\tr(\"Button\").states.create(\"disabled\", {\n\t\t\tforceInactive: true\n\t\t});\n\n\t\t{\n\t\t\tconst rule = r(\"RoundedRectangle\", [\"button\", \"background\"]);\n\t\t\tsetColor(rule, \"fill\", ic, \"primaryButton\");\n\t\t\tsetColor(rule, \"stroke\", ic, \"primaryButtonStroke\");\n\t\t}\n\n\t\t{\n\t\t\tconst rule = r(\"RoundedRectangle\", [\"button\", \"background\"]).states.create(\"hover\", {});\n\t\t\tsetColor(rule, \"fill\", ic, \"primaryButtonHover\");\n\t\t}\n\n\t\t{\n\t\t\tconst rule = r(\"RoundedRectangle\", [\"button\", \"background\"]).states.create(\"down\", { stateAnimationDuration: 0 });\n\t\t\tsetColor(rule, \"fill\", ic, \"primaryButtonDown\");\n\t\t}\n\n\t\t{\n\t\t\tconst rule = r(\"RoundedRectangle\", [\"button\", \"background\"]).states.create(\"active\", {});\n\t\t\tsetColor(rule, \"fill\", ic, \"primaryButtonActive\");\n\t\t}\n\n\t\t{\n\t\t\tconst rule = r(\"RoundedRectangle\", [\"button\", \"background\"]).states.create(\"disabled\", {});\n\t\t\tsetColor(rule, \"fill\", ic, \"primaryButtonDisabled\");\n\t\t}\n\n\t\t{\n\t\t\tconst rule = r(\"Graphics\", [\"button\", \"icon\"]).states.create(\"disabled\", {});\n\t\t\tsetColor(rule, \"fill\", ic, \"primaryButtonTextDisabled\");\n\t\t}\n\n\t\t{\n\t\t\tconst rule = r(\"Label\", [\"button\"]).states.create(\"disabled\", {});\n\t\t\tsetColor(rule, \"fill\", ic, \"primaryButtonTextDisabled\");\n\t\t}\n\n\t\t{\n\t\t\tconst rule = r(\"Graphics\", [\"button\", \"icon\"]);\n\t\t\trule.setAll({\n\t\t\t\tforceInactive: true\n\t\t\t})\n\t\t\tsetColor(rule, \"stroke\", ic, \"primaryButtonText\");\n\t\t}\n\n\t\t{\n\t\t\tconst rule = r(\"Label\", [\"button\"]);\n\t\t\tsetColor(rule, \"fill\", ic, \"primaryButtonText\");\n\t\t}\n\n\t\t/**\n\t\t * ------------------------------------------------------------------------\n\t\t * charts/xy: ZoomOutButton\n\t\t * ------------------------------------------------------------------------\n\t\t */\n\n\t\tr(\"Button\", [\"zoom\"]).setAll({\n\t\t\tpaddingTop: 18,\n\t\t\tpaddingBottom: 18,\n\t\t\tpaddingLeft: 12,\n\t\t\tpaddingRight: 12,\n\t\t\tcenterX: 46,\n\t\t\tcenterY: -10,\n\t\t\ty: 0,\n\t\t\tx: p100,\n\t\t\trole: \"button\",\n\t\t\tariaLabel: language.translate(\"Zoom Out\"),\n\t\t\tlayer: 30\n\t\t});\n\n\t\t{\n\t\t\tconst rule = r(\"RoundedRectangle\", [\"background\", \"button\", \"zoom\"]);\n\n\t\t\trule.setAll({\n\t\t\t\tcornerRadiusBL: 40,\n\t\t\t\tcornerRadiusBR: 40,\n\t\t\t\tcornerRadiusTL: 40,\n\t\t\t\tcornerRadiusTR: 40\n\t\t\t});\n\n\t\t\tsetColor(rule, \"fill\", ic, \"primaryButton\");\n\t\t}\n\n\t\t{\n\t\t\tconst rule = r(\"RoundedRectangle\", [\"background\", \"button\", \"zoom\"]).states.create(\"hover\", {});\n\t\t\tsetColor(rule, \"fill\", ic, \"primaryButtonHover\");\n\t\t}\n\n\t\t{\n\t\t\tconst rule = r(\"RoundedRectangle\", [\"background\", \"button\", \"zoom\"]).states.create(\"down\", { stateAnimationDuration: 0 });\n\t\t\tsetColor(rule, \"fill\", ic, \"primaryButtonDown\");\n\t\t}\n\n\t\t{\n\t\t\tconst rule = r(\"Graphics\", [\"icon\", \"button\", \"zoom\"]);\n\n\t\t\trule.setAll({\n\t\t\t\tcrisp: true,\n\t\t\t\tstrokeOpacity: 0.7,\n\t\t\t\tdraw: (display: any) => {\n\t\t\t\t\tdisplay.moveTo(0, 0);\n\t\t\t\t\tdisplay.lineTo(12, 0);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tsetColor(rule, \"stroke\", ic, \"primaryButtonText\");\n\t\t}\n\n\n\t\t/**\n\t\t * ------------------------------------------------------------------------\n\t\t * core: ResizeButton\n\t\t * ------------------------------------------------------------------------\n\t\t */\n\n\t\tr(\"Button\", [\"resize\"]).setAll({\n\t\t\tpaddingTop: 9,\n\t\t\tpaddingBottom: 9,\n\t\t\tpaddingLeft: 13,\n\t\t\tpaddingRight: 13,\n\t\t\tdraggable: true,\n\t\t\tcenterX: p50,\n\t\t\tcenterY: p50,\n\t\t\tposition: \"absolute\",\n\t\t\trole: \"slider\",\n\t\t\tariaValueMin: \"0\",\n\t\t\tariaValueMax: \"100\",\n\t\t\tariaLabel: language.translate(\"Use up and down arrows to move selection\")\n\t\t});\n\n\t\t{\n\t\t\tconst rule = r(\"RoundedRectangle\", [\"background\", \"resize\", \"button\"]);\n\n\t\t\trule.setAll({\n\t\t\t\tcornerRadiusBL: 40,\n\t\t\t\tcornerRadiusBR: 40,\n\t\t\t\tcornerRadiusTL: 40,\n\t\t\t\tcornerRadiusTR: 40\n\t\t\t});\n\n\t\t\tsetColor(rule, \"fill\", ic, \"secondaryButton\");\n\t\t\tsetColor(rule, \"stroke\", ic, \"secondaryButtonStroke\");\n\t\t}\n\n\t\t{\n\t\t\tconst rule = r(\"RoundedRectangle\", [\"background\", \"resize\", \"button\"]).states.create(\"hover\", {});\n\t\t\tsetColor(rule, \"fill\", ic, \"secondaryButtonHover\");\n\t\t}\n\n\t\t{\n\t\t\tconst rule = r(\"RoundedRectangle\", [\"background\", \"resize\", \"button\"]).states.create(\"down\", { stateAnimationDuration: 0 });\n\t\t\tsetColor(rule, \"fill\", ic, \"secondaryButtonDown\");\n\t\t}\n\n\t\t{\n\t\t\tconst rule = r(\"Graphics\", [\"resize\", \"button\", \"icon\"]);\n\n\t\t\trule.setAll({\n\t\t\t\tinteractive: false,\n\t\t\t\tcrisp: true,\n\t\t\t\tstrokeOpacity: 0.5,\n\t\t\t\tdraw: (display: any) => {\n\t\t\t\t\tdisplay.moveTo(0, 0.5);\n\t\t\t\t\tdisplay.lineTo(0, 12.5);\n\t\t\t\t\tdisplay.moveTo(4, 0.5);\n\t\t\t\t\tdisplay.lineTo(4, 12.5);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tsetColor(rule, \"stroke\", ic, \"secondaryButtonText\");\n\t\t}\n\n\t\tr(\"Button\", [\"resize\", \"vertical\"]).setAll({\n\t\t\trotation: 90,\n\t\t\tcursorOverStyle: \"ns-resize\"\n\t\t});\n\n\t\tr(\"Button\", [\"resize\", \"horizontal\"]).setAll({\n\t\t\tcursorOverStyle: \"ew-resize\"\n\t\t});\n\n\n\n\t\t/**\n\t\t * ------------------------------------------------------------------------\n\t\t * core: PlayButton\n\t\t * ------------------------------------------------------------------------\n\t\t */\n\n\t\tr(\"Button\", [\"play\"]).setAll({\n\t\t\tpaddingTop: 13,\n\t\t\tpaddingBottom: 13,\n\t\t\tpaddingLeft: 14,\n\t\t\tpaddingRight: 14,\n\t\t\tariaLabel: language.translate(\"Play\"),\n\t\t\ttoggleKey: \"active\"\n\t\t});\n\n\t\t{\n\t\t\tconst rule = r(\"RoundedRectangle\", [\"play\", \"background\"]);\n\n\t\t\trule.setAll({\n\t\t\t\tstrokeOpacity: 0.5,\n\t\t\t\tcornerRadiusBL: 100,\n\t\t\t\tcornerRadiusBR: 100,\n\t\t\t\tcornerRadiusTL: 100,\n\t\t\t\tcornerRadiusTR: 100\n\t\t\t});\n\n\t\t\tsetColor(rule, \"fill\", ic, \"primaryButton\");\n\t\t}\n\n\t\t{\n\t\t\tconst rule = r(\"Graphics\", [\"play\", \"icon\"]);\n\n\t\t\trule.setAll({\n\t\t\t\tstateAnimationDuration: 0,\n\t\t\t\tdx: 1,\n\t\t\t\tdraw: (display: any) => {\n\t\t\t\t\tdisplay.moveTo(0, -5);\n\t\t\t\t\tdisplay.lineTo(8, 0);\n\t\t\t\t\tdisplay.lineTo(0, 5);\n\t\t\t\t\tdisplay.lineTo(0, -5);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tsetColor(rule, \"fill\", ic, \"primaryButtonText\");\n\t\t}\n\n\t\tr(\"Graphics\", [\"play\", \"icon\"]).states.create(\"default\", {\n\t\t\tstateAnimationDuration: 0\n\t\t})\n\n\t\tr(\"Graphics\", [\"play\", \"icon\"]).states.create(\"active\", {\n\t\t\tstateAnimationDuration: 0,\n\t\t\tdraw: (display: any) => {\n\t\t\t\tdisplay.moveTo(-4, -5);\n\t\t\t\tdisplay.lineTo(-1, -5);\n\t\t\t\tdisplay.lineTo(-1, 5);\n\t\t\t\tdisplay.lineTo(-4, 5);\n\t\t\t\tdisplay.lineTo(-4, -5);\n\n\t\t\t\tdisplay.moveTo(4, -5);\n\t\t\t\tdisplay.lineTo(1, -5);\n\t\t\t\tdisplay.lineTo(1, 5);\n\t\t\t\tdisplay.lineTo(4, 5);\n\t\t\t\tdisplay.lineTo(4, -5);\n\t\t\t}\n\t\t})\n\n\n\t\t/**\n\t\t * ------------------------------------------------------------------------\n\t\t * core: SwitchButton\n\t\t * ------------------------------------------------------------------------\n\t\t */\n\n\t\tr(\"Button\", [\"switch\"]).setAll({\n\t\t\tpaddingTop: 4,\n\t\t\tpaddingBottom: 4,\n\t\t\tpaddingLeft: 4,\n\t\t\tpaddingRight: 4,\n\t\t\tariaLabel: language.translate(\"Press ENTER to toggle\"),\n\t\t\ttoggleKey: \"active\",\n\t\t\twidth: 40,\n\t\t\theight: 24,\n\t\t\tlayout: null\n\t\t});\n\n\t\t{\n\t\t\tconst rule = r(\"RoundedRectangle\", [\"switch\", \"background\"]);\n\n\t\t\trule.setAll({\n\t\t\t\tstrokeOpacity: 0.5,\n\t\t\t\tcornerRadiusBL: 100,\n\t\t\t\tcornerRadiusBR: 100,\n\t\t\t\tcornerRadiusTL: 100,\n\t\t\t\tcornerRadiusTR: 100\n\t\t\t});\n\n\t\t\tsetColor(rule, \"fill\", ic, \"primaryButton\");\n\t\t}\n\n\t\t{\n\t\t\tconst rule = r(\"Circle\", [\"switch\", \"icon\"]);\n\n\t\t\trule.setAll({\n\t\t\t\tradius: 8,\n\t\t\t\tcenterY: 0,\n\t\t\t\tcenterX: 0,\n\t\t\t\tdx: 0\n\t\t\t});\n\n\t\t\tsetColor(rule, \"fill\", ic, \"primaryButtonText\");\n\t\t}\n\n\t\tr(\"Graphics\", [\"switch\", \"icon\"]).states.create(\"active\", {\n\t\t\tdx: 16\n\t\t});\n\n\n\t\t/**\n\t\t * ------------------------------------------------------------------------\n\t\t * core: Scrollbar\n\t\t * ------------------------------------------------------------------------\n\t\t */\n\n\t\tr(\"Scrollbar\").setAll({\n\t\t\tstart: 0,\n\t\t\tend: 1,\n\t\t\tlayer: 30,\n\t\t\tanimationEasing: $ease.out($ease.cubic)\n\t\t});\n\n\t\tr(\"Scrollbar\", [\"vertical\"]).setAll({\n\t\t\tmarginRight: 13,\n\t\t\tmarginLeft: 13,\n\t\t\tminWidth: 12,\n\t\t\theight: p100\n\t\t});\n\n\t\tr(\"Scrollbar\", [\"horizontal\"]).setAll({\n\t\t\tmarginTop: 13,\n\t\t\tmarginBottom: 13,\n\t\t\tminHeight: 12,\n\t\t\twidth: p100\n\t\t});\n\n\t\tthis.rule(\"Button\", [\"scrollbar\"]).setAll({\n\t\t\texportable: false\n\t\t});\n\n\t\t{\n\t\t\tconst rule = r(\"RoundedRectangle\", [\"scrollbar\", \"main\", \"background\"]);\n\n\t\t\trule.setAll({\n\t\t\t\tcornerRadiusTL: 8,\n\t\t\t\tcornerRadiusBL: 8,\n\t\t\t\tcornerRadiusTR: 8,\n\t\t\t\tcornerRadiusBR: 8,\n\t\t\t\tfillOpacity: 0.8,\n\t\t\t});\n\n\t\t\tsetColor(rule, \"fill\", ic, \"fill\");\n\t\t}\n\n\t\t{\n\t\t\tconst rule = r(\"RoundedRectangle\", [\"scrollbar\", \"thumb\"]);\n\n\t\t\trule.setAll({\n\t\t\t\trole: \"slider\",\n\t\t\t\tariaLive: \"polite\",\n\t\t\t\tposition: \"absolute\",\n\t\t\t\tdraggable: true\n\t\t\t});\n\n\t\t\tsetColor(rule, \"fill\", ic, \"secondaryButton\");\n\t\t}\n\n\t\t{\n\t\t\tconst rule = r(\"RoundedRectangle\", [\"scrollbar\", \"thumb\"]).states.create(\"hover\", {});\n\t\t\tsetColor(rule, \"fill\", ic, \"secondaryButtonHover\");\n\t\t}\n\n\t\t{\n\t\t\tconst rule = r(\"RoundedRectangle\", [\"scrollbar\", \"thumb\"]).states.create(\"down\", { stateAnimationDuration: 0 });\n\t\t\tsetColor(rule, \"fill\", ic, \"secondaryButtonDown\");\n\t\t}\n\n\t\tr(\"RoundedRectangle\", [\"scrollbar\", \"thumb\", \"vertical\"]).setAll({\n\t\t\tx: p50,\n\t\t\twidth: p100,\n\t\t\tcenterX: p50,\n\t\t\tariaLabel: language.translate(\"Use up and down arrows to move selection\")\n\t\t});\n\n\t\tr(\"RoundedRectangle\", [\"scrollbar\", \"thumb\", \"horizontal\"]).setAll({\n\t\t\ty: p50,\n\t\t\tcenterY: p50,\n\t\t\theight: p100,\n\t\t\tariaLabel: language.translate(\"Use left and right arrows to move selection\")\n\t\t});\n\n\t\t// @todo: is this needed? used to be \"ContentScrollbar\"\n\t\t// r(\"Scrollbar\", [\"content?\"]).setAll({\n\t\t// \tmarginRight: 0,\n\t\t// \tmarginLeft: 5,\n\t\t// \tlayer: 5\n\t\t// });\n\n\t\t/**\n\t\t * ========================================================================\n\t\t * charts/xy\n\t\t * ========================================================================\n\t\t *\n\t\t * This needs to be in DefaultTheme because it's the only theme that is\n\t\t * automatically applied to Root, and tooltips different ancestors\n\t\t * than actual charts using them.\n\t\t */\n\n\t\t{\n\t\t\tconst rule = r(\"PointedRectangle\", [\"axis\", \"tooltip\", \"background\"]);\n\n\t\t\trule.setAll({\n\t\t\t\tcornerRadius: 0\n\t\t\t});\n\n\t\t\tsetColor(rule, \"fill\", ic, \"alternativeBackground\");\n\t\t}\n\n\t\tr(\"Label\", [\"axis\", \"tooltip\"]).setAll({\n\t\t\trole: undefined\n\t\t});\n\n\t\tr(\"Label\", [\"axis\", \"tooltip\", \"y\"]).setAll({\n\t\t\ttextAlign: \"right\"\n\t\t});\n\n\t\tr(\"Label\", [\"axis\", \"tooltip\", \"y\", \"opposite\"]).setAll({\n\t\t\ttextAlign: \"left\"\n\t\t});\n\n\t\tr(\"Label\", [\"axis\", \"tooltip\", \"x\"]).setAll({\n\t\t\ttextAlign: \"center\"\n\t\t});\n\n\t\tr(\"Tooltip\", [\"categoryaxis\"]).setAll({\n\t\t\tlabelText: \"{category}\"\n\t\t})\n\n\t\t/**\n\t\t * ------------------------------------------------------------------------\n\t\t * Shapes\n\t\t * ------------------------------------------------------------------------\n\t\t */\n\n\t\t// Class: Graphics\n\t\tr(\"Star\").setAll({\n\t\t\tspikes: 5,\n\t\t\tinnerRadius: 5,\n\t\t\tradius: 10\n\t\t})\n\n\t\t// STOCK\n\t\tr(\"Tooltip\", [\"stock\"]).setAll({\n\t\t\tpaddingTop: 6,\n\t\t\tpaddingBottom: 5,\n\t\t\tpaddingLeft: 7,\n\t\t\tpaddingRight: 7\n\t\t});\n\n\t\tr(\"PointedRectangle\", [\"tooltip\", \"stock\", \"axis\"]).setAll({\n\t\t\tpointerLength: 0,\n\t\t\tpointerBaseWidth: 0,\n\t\t\tcornerRadius: 3\n\t\t});\n\n\t\tr(\"Label\", [\"tooltip\", \"stock\"]).setAll({\n\t\t\tfontSize: \"0.8em\"\n\t\t});\n\n\t\t// resizer\n\n\t\tr(\"SpriteResizer\").setAll({\n\t\t\trotationStep: 10,\n\t\t\tisMeasured: false\n\t\t})\n\n\t\t{\n\t\t\tconst rule = r(\"Container\", [\"resizer\", \"grip\"]);\n\t\t\trule.states.create(\"hover\", {});\n\t\t}\n\n\t\t{\n\t\t\tconst rule = r(\"RoundedRectangle\", [\"resizer\", \"grip\"]);\n\n\t\t\trule.setAll({\n\t\t\t\tstrokeOpacity: 0.7,\n\t\t\t\tstrokeWidth: 1,\n\t\t\t\tfillOpacity: 1,\n\t\t\t\twidth: 12,\n\t\t\t\theight: 12\n\t\t\t});\n\n\t\t\tsetColor(rule, \"fill\", ic, \"background\");\n\t\t\tsetColor(rule, \"stroke\", ic, \"alternativeBackground\");\n\t\t}\n\n\t\t{\n\t\t\tconst rule = r(\"RoundedRectangle\", [\"resizer\", \"grip\", \"outline\"]);\n\n\t\t\trule.setAll({\n\t\t\t\tstrokeOpacity: 0,\n\t\t\t\tfillOpacity: 0,\n\t\t\t\twidth: 20,\n\t\t\t\theight: 20\n\t\t\t});\n\n\t\t\trule.states.create(\"hover\", {\n\t\t\t\tfillOpacity: 0.3\n\t\t\t});\n\n\t\t\tsetColor(rule, \"fill\", ic, \"alternativeBackground\");\n\t\t}\n\n\t\tr(\"RoundedRectangle\", [\"resizer\", \"grip\", \"left\"]).setAll({\n\t\t\tcornerRadiusBL: 0,\n\t\t\tcornerRadiusBR: 0,\n\t\t\tcornerRadiusTL: 0,\n\t\t\tcornerRadiusTR: 0\n\t\t});\n\n\t\tr(\"RoundedRectangle\", [\"resizer\", \"grip\", \"right\"]).setAll({\n\t\t\tcornerRadiusBL: 0,\n\t\t\tcornerRadiusBR: 0,\n\t\t\tcornerRadiusTL: 0,\n\t\t\tcornerRadiusTR: 0\n\t\t});\n\n\t\t{\n\t\t\tconst rule = r(\"Rectangle\", [\"resizer\", \"rectangle\"]);\n\t\t\trule.setAll({\n\t\t\t\tstrokeDasharray: [2, 2],\n\t\t\t\tstrokeOpacity: 0.5,\n\t\t\t\tstrokeWidth: 1\n\t\t\t});\n\n\t\t\tsetColor(rule, \"stroke\", ic, \"alternativeBackground\");\n\t\t}\n\n\t\tr(\"Graphics\", [\"button\", \"plus\", \"icon\"]).setAll({\n\t\t\tx: p50,\n\t\t\ty: p50,\n\t\t\tdraw: (display) => {\n\t\t\t\tdisplay.moveTo(-4, 0);\n\t\t\t\tdisplay.lineTo(4, 0);\n\t\t\t\tdisplay.moveTo(0, -4);\n\t\t\t\tdisplay.lineTo(0, 4);\n\t\t\t}\n\t\t});\n\n\t\tr(\"Graphics\", [\"button\", \"minus\", \"icon\"]).setAll({\n\t\t\tx: p50,\n\t\t\ty: p50,\n\t\t\tdraw: (display) => {\n\t\t\t\tdisplay.moveTo(-4, 0);\n\t\t\t\tdisplay.lineTo(4, 0);\n\t\t\t}\n\t\t});\n\n\t\tr(\"Graphics\", [\"button\", \"home\", \"icon\"]).setAll({\n\t\t\tx: p50,\n\t\t\ty: p50,\n\t\t\tsvgPath: \"M 8 -1 L 6 -1 L 6 7 L 2 7 L 2 1 L -2 1 L -2 7 L -6 7 L -6 -1 L -8 -1 L 0 -9 L 8 -1 Z M 8 -1\"\n\t\t});\n\n\t\tr(\"Button\", [\"zoomtools\"]).setAll({\n\t\t\tmarginTop: 1,\n\t\t\tmarginBottom: 2\n\t\t})\n\n\t\tr(\"ZoomTools\").setAll({\n\t\t\tx: p100,\n\t\t\tcenterX: p100,\n\t\t\ty: p100,\n\t\t\tcenterY: p100,\n\t\t\tpaddingRight: 10,\n\t\t\tpaddingBottom: 10\n\t\t})\n\t}\n}\n","/**\n * amCharts 5 locale\n * \n * Locale: en\n * Language: International English\n * Author: Martynas Majeris\n *\n * Follow instructions in [on this page](https://www.amcharts.com/docs/v5/tutorials/creating-translations/) to make corrections or add new translations.\n *\n * ---\n * Edit but leave the header section above this line. You can remove any\n * subsequent comment sections.\n * ---\n *\n * Use this file as a template to create translations. Leave the key part in\n * English intact. Fill the value with a translation.\n *\n * Empty string means no translation, so default \"International English\"\n * will be used.\n *\n * If you need the translation to literally be an empty string, use `null`\n * instead.\n *\n * IMPORTANT:\n * When translating make good effort to keep the translation length\n * at least the same chartcount as the English, especially for short prompts.\n *\n * Having significantly longer prompts may distort the actual charts.\n *\n * NOTE:\n * Some prompts - like months or weekdays - come in two versions: full and\n * shortened.\n *\n * If there's no official shortened version of these in your language, and it\n * would not be possible to invent such short versions that don't seem weird\n * to native speakers of that language, fill those with the same as full\n * version.\n *\n * PLACEHOLDERS:\n * Some prompts have placeholders like \"%1\". Those will be replaced by actual\n * values during translation and should be retained in the translated prompts.\n *\n * Placeholder positions may be changed to better suit structure of the\n * sentence.\n *\n * For example \"From %1 to %2\", when actually used will replace \"%1\" with an\n * actual value representing range start, and \"%2\" will be replaced by end\n * value.\n *\n * E.g. in a Scrollbar for Value axis \"From %1 to %2\" will become\n * \"From 100 to 200\". You may translate \"From\" and \"to\", as well as re-arrange\n * the order of the prompt itself, but make sure the \"%1\" and \"%2\" remain, in\n * places where they will make sense.\n *\n * Save the file as language_LOCALE, i.e. `en_GB.ts`, `fr_FR.ts`, etc.\n */\nexport default {\n\t\"firstDayOfWeek\": 1,\n\t\n\t// Number formatting options.\n\t// \n\t// Please check with the local standards which separator is accepted to be\n\t// used for separating decimals, and which for thousands.\n\t\"_decimalSeparator\": \".\",\n\t\"_thousandSeparator\": \",\",\n\n\t// Position of the percent sign in numbers\n\t\"_percentPrefix\": null,\n\t\"_percentSuffix\": \"%\",\n\n\t// Suffixes for numbers\n\t// When formatting numbers, big or small numers might be reformatted to\n\t// shorter version, by applying a suffix.\n\t// \n\t// For example, 1000000 might become \"1m\".\n\t// Or 1024 might become \"1KB\" if we're formatting byte numbers.\n\t// \n\t// This section defines such suffixes for all such cases.\n\t\"_big_number_suffix_3\": \"k\",\n\t\"_big_number_suffix_6\": \"M\",\n\t\"_big_number_suffix_9\": \"G\",\n\t\"_big_number_suffix_12\": \"T\",\n\t\"_big_number_suffix_15\": \"P\",\n\t\"_big_number_suffix_18\": \"E\",\n\t\"_big_number_suffix_21\": \"Z\",\n\t\"_big_number_suffix_24\": \"Y\",\n\n\t\"_small_number_suffix_3\": \"m\",\n\t\"_small_number_suffix_6\": \"μ\",\n\t\"_small_number_suffix_9\": \"n\",\n\t\"_small_number_suffix_12\": \"p\",\n\t\"_small_number_suffix_15\": \"f\",\n\t\"_small_number_suffix_18\": \"a\",\n\t\"_small_number_suffix_21\": \"z\",\n\t\"_small_number_suffix_24\": \"y\",\n\n\t\"_byte_suffix_B\": \"B\",\n\t\"_byte_suffix_KB\": \"KB\",\n\t\"_byte_suffix_MB\": \"MB\",\n\t\"_byte_suffix_GB\": \"GB\",\n\t\"_byte_suffix_TB\": \"TB\",\n\t\"_byte_suffix_PB\": \"PB\",\n\n\t// Default date formats for various periods.\n\t// \n\t// This should reflect official or de facto formatting universally accepted\n\t// in the country translation is being made for\n\t// Available format codes here:\n\t// https://www.amcharts.com/docs/v5/concepts/formatters/formatting-dates/#Format_codes\n\t// \n\t// This will be used when formatting date/time for particular granularity,\n\t// e.g. \"_date_hour\" will be shown whenever we need to show time as hours.\n\t// \n\t// \"date\" is used as in default date format when showing standalone dates.\n\t\"_date\": \"yyyy-MM-dd\",\n\t\"_date_millisecond\": \"mm:ss SSS\",\n\t\"_date_millisecond_full\": \"HH:mm:ss SSS\",\n\t\"_date_second\": \"HH:mm:ss\",\n\t\"_date_second_full\": \"HH:mm:ss\",\n\t\"_date_minute\": \"HH:mm\",\n\t\"_date_minute_full\": \"HH:mm - MMM dd, yyyy\",\n\t\"_date_hour\": \"HH:mm\",\n\t\"_date_hour_full\": \"HH:mm - MMM dd, yyyy\",\n\t\"_date_day\": \"MMM dd\",\n\t\"_date_day_full\": \"MMM dd, yyyy\",\n\t\"_date_week\": \"ww\",\n\t\"_date_week_full\": \"MMM dd, yyyy\",\n\t\"_date_month\": \"MMM\",\n\t\"_date_month_full\": \"MMM, yyyy\",\n\t\"_date_year\": \"yyyy\",\n\n\t// Default duration formats for various base units.\n\t// \n\t// This will be used by DurationFormatter to format numeric values into\n\t// duration.\n\t// \n\t// Notice how each duration unit comes in several versions. This is to ensure\n\t// that each base unit is shown correctly.\n\t// \n\t// For example, if we have baseUnit set to \"second\", meaning our duration is\n\t// in seconds.\n\t// \n\t// If we pass in `50` to formatter, it will know that we have just 50 seconds\n\t// (less than a minute) so it will use format in `\"_duration_second\"` (\"ss\"),\n\t// and the formatted result will be in like `\"50\"`.\n\t// \n\t// If we pass in `70`, which is more than a minute, the formatter will switch\n\t// to `\"_duration_second_minute\"` (\"mm:ss\"), resulting in \"01:10\" formatted\n\t// text.\n\t// \n\t// Available codes here:\n\t// https://www.amcharts.com/docs/v4/concepts/formatters/formatting-duration/#Available_Codes\n\t\"_duration_millisecond\": \"SSS\",\n\t\"_duration_millisecond_second\": \"ss.SSS\",\n\t\"_duration_millisecond_minute\": \"mm:ss SSS\",\n\t\"_duration_millisecond_hour\": \"hh:mm:ss SSS\",\n\t\"_duration_millisecond_day\": \"d'd' mm:ss SSS\",\n\t\"_duration_millisecond_week\": \"d'd' mm:ss SSS\",\n\t\"_duration_millisecond_month\": \"M'm' dd'd' mm:ss SSS\",\n\t\"_duration_millisecond_year\": \"y'y' MM'm' dd'd' mm:ss SSS\",\n\n\t\"_duration_second\": \"ss\",\n\t\"_duration_second_minute\": \"mm:ss\",\n\t\"_duration_second_hour\": \"hh:mm:ss\",\n\t\"_duration_second_day\": \"d'd' hh:mm:ss\",\n\t\"_duration_second_week\": \"d'd' hh:mm:ss\",\n\t\"_duration_second_month\": \"M'm' dd'd' hh:mm:ss\",\n\t\"_duration_second_year\": \"y'y' MM'm' dd'd' hh:mm:ss\",\n\n\t\"_duration_minute\": \"mm\",\n\t\"_duration_minute_hour\": \"hh:mm\",\n\t\"_duration_minute_day\": \"d'd' hh:mm\",\n\t\"_duration_minute_week\": \"d'd' hh:mm\",\n\t\"_duration_minute_month\": \"M'm' dd'd' hh:mm\",\n\t\"_duration_minute_year\": \"y'y' MM'm' dd'd' hh:mm\",\n\n\t\"_duration_hour\": \"hh'h'\",\n\t\"_duration_hour_day\": \"d'd' hh'h'\",\n\t\"_duration_hour_week\": \"d'd' hh'h'\",\n\t\"_duration_hour_month\": \"M'm' dd'd' hh'h'\",\n\t\"_duration_hour_year\": \"y'y' MM'm' dd'd' hh'h'\",\n\n\t\"_duration_day\": \"d'd'\",\n\t\"_duration_day_week\": \"d'd'\",\n\t\"_duration_day_month\": \"M'm' dd'd'\",\n\t\"_duration_day_year\": \"y'y' MM'm' dd'd'\",\n\n\t\"_duration_week\": \"w'w'\",\n\t\"_duration_week_month\": \"w'w'\",\n\t\"_duration_week_year\": \"w'w'\",\n\n\t\"_duration_month\": \"M'm'\",\n\t\"_duration_month_year\": \"y'y' MM'm'\",\n\n\t\"_duration_year\": \"y'y'\",\n\n\t// Era translations\n\t\"_era_ad\": \"AD\",\n\t\"_era_bc\": \"BC\",\n\n\t// Day part, used in 12-hour formats, e.g. 5 P.M.\n\t// Please note that these come in 3 variants:\n\t// * one letter (e.g. \"A\")\n\t// * two letters (e.g. \"AM\")\n\t// * two letters with dots (e.g. \"A.M.\")\n\t// \n\t// All three need to to be translated even if they are all the same. Some\n\t// users might use one, some the other.\n\t\"A\": \"\",\n\t\"P\": \"\",\n\t\"AM\": \"\",\n\t\"PM\": \"\",\n\t\"A.M.\": \"\",\n\t\"P.M.\": \"\",\n\n\t// Date-related stuff.\n\t// \n\t// When translating months, if there's a difference, use the form which is\n\t// best for a full date, e.g. as you would use it in \"2018 January 1\".\n\t// \n\t// Note that May is listed twice. This is because in English May is the same\n\t// in both long and short forms, while in other languages it may not be the\n\t// case. Translate \"May\" to full word, while \"May(short)\" to shortened\n\t// version.\n\t// \n\t// Should month names and weekdays be capitalized or not?\n\t// \n\t// Rule of thumb is this: if the names should always be capitalized,\n\t// regardless of name position within date (\"January\", \"21st January 2018\",\n\t// etc.) use capitalized names. Otherwise enter all lowercase.\n\t// \n\t// The date formatter will automatically capitalize names if they are the\n\t// first (or only) word in resulting date.\n\t\"January\": \"\",\n\t\"February\": \"\",\n\t\"March\": \"\",\n\t\"April\": \"\",\n\t\"May\": \"\",\n\t\"June\": \"\",\n\t\"July\": \"\",\n\t\"August\": \"\",\n\t\"September\": \"\",\n\t\"October\": \"\",\n\t\"November\": \"\",\n\t\"December\": \"\",\n\t\"Jan\": \"\",\n\t\"Feb\": \"\",\n\t\"Mar\": \"\",\n\t\"Apr\": \"\",\n\t\"May(short)\": \"May\",\n\t\"Jun\": \"\",\n\t\"Jul\": \"\",\n\t\"Aug\": \"\",\n\t\"Sep\": \"\",\n\t\"Oct\": \"\",\n\t\"Nov\": \"\",\n\t\"Dec\": \"\",\n\n\t// Weekdays.\n\t\"Sunday\": \"\",\n\t\"Monday\": \"\",\n\t\"Tuesday\": \"\",\n\t\"Wednesday\": \"\",\n\t\"Thursday\": \"\",\n\t\"Friday\": \"\",\n\t\"Saturday\": \"\",\n\t\"Sun\": \"\",\n\t\"Mon\": \"\",\n\t\"Tue\": \"\",\n\t\"Wed\": \"\",\n\t\"Thu\": \"\",\n\t\"Fri\": \"\",\n\t\"Sat\": \"\",\n\n\t// Date ordinal function.\n\t// \n\t// This is used when adding number ordinal when formatting days in dates.\n\t// \n\t// E.g. \"January 1st\", \"February 2nd\".\n\t// \n\t// The function accepts day number, and returns a string to be added to the\n\t// day, like in default English translation, if we pass in 2, we will receive\n\t// \"nd\" back.\n\t\"_dateOrd\": function(day: number): string {\n\t\tlet res = \"th\";\n\t\tif ((day < 11) || (day > 13)) {\n\t\t\tswitch (day % 10) {\n\t\t\t\tcase 1:\n\t\t\t\t\tres = \"st\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tres = \"nd\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tres = \"rd\"\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t},\n\n\t// Various chart controls.\n\t// Shown as a tooltip on zoom out button.\n\t\"Zoom Out\": \"\",\n\n\t// Timeline buttons\n\t\"Play\": \"\",\n\t\"Stop\": \"\",\n\n\t// Chart's Legend screen reader title.\n\t\"Legend\": \"\",\n\n\t// Legend's item screen reader indicator.\n\t\"Press ENTER to toggle\": \"\",\n\n\t// Shown when the chart is busy loading something.\n\t\"Loading\": \"\",\n\n\t// Shown as the first button in the breadcrumb navigation, e.g.:\n\t// Home > First level > ...\n\t\"Home\": \"\",\n\n\t// Chart types.\n\t// Those are used as default screen reader titles for the main chart element\n\t// unless developer has set some more descriptive title.\n\t\"Chart\": \"\",\n\t\"Serial chart\": \"\",\n\t\"X/Y chart\": \"\",\n\t\"Pie chart\": \"\",\n\t\"Gauge chart\": \"\",\n\t\"Radar chart\": \"\",\n\t\"Sankey diagram\": \"\",\n\t\"Flow diagram\": \"\",\n\t\"Chord diagram\": \"\",\n\t\"TreeMap chart\": \"\",\n\t\"Force directed tree\": \"\",\n\t\"Sliced chart\": \"\",\n\n\t// Series types.\n\t// Used to name series by type for screen readers if they do not have their\n\t// name set.\n\t\"Series\": \"\",\n\t\"Candlestick Series\": \"\",\n\t\"OHLC Series\": \"\",\n\t\"Column Series\": \"\",\n\t\"Line Series\": \"\",\n\t\"Pie Slice Series\": \"\",\n\t\"Funnel Series\": \"\",\n\t\"Pyramid Series\": \"\",\n\t\"X/Y Series\": \"\",\n\n\t// Map-related stuff.\n\t\"Map\": \"\",\n\t\"Press ENTER to zoom in\": \"\",\n\t\"Press ENTER to zoom out\": \"\",\n\t\"Use arrow keys to zoom in and out\": \"\",\n\t\"Use plus and minus keys on your keyboard to zoom in and out\": \"\",\n\n\t// Export-related stuff.\n\t// These prompts are used in Export menu labels.\n\t// \n\t// \"Export\" is the top-level menu item.\n\t// \n\t// \"Image\", \"Data\", \"Print\" as second-level indicating type of export\n\t// operation.\n\t// \n\t// Leave actual format untranslated, unless you absolutely know that they\n\t// would convey more meaning in some other way.\n\t\"Export\": \"\",\n\t\"Image\": \"\",\n\t\"Data\": \"\",\n\t\"Print\": \"\",\n\t\"Press ENTER or use arrow keys to navigate\": \"\",\n\t\"Press ENTER to open\": \"\",\n\t\"Press ENTER to print.\": \"\",\n\t\"Press ENTER to export as %1.\": \"\",\n\t\"(Press ESC to close this message)\": \"\",\n\t\"Image Export Complete\": \"\",\n\t\"Export operation took longer than expected. Something might have gone wrong.\": \"\",\n\t\"Saved from\": \"\",\n\t\"PNG\": \"\",\n\t\"JPG\": \"\",\n\t\"GIF\": \"\",\n\t\"SVG\": \"\",\n\t\"PDF\": \"\",\n\t\"JSON\": \"\",\n\t\"CSV\": \"\",\n\t\"XLSX\": \"\",\n\t\"HTML\": \"\",\n\n\t// Scrollbar-related stuff.\n\t// \n\t// Scrollbar is a control which can zoom and pan the axes on the chart.\n\t// \n\t// Each scrollbar has two grips: left or right (for horizontal scrollbar) or\n\t// upper and lower (for vertical one).\n\t// \n\t// Prompts change in relation to whether Scrollbar is vertical or horizontal.\n\t// \n\t// The final section is used to indicate the current range of selection.\n\t\"Use TAB to select grip buttons or left and right arrows to change selection\": \"\",\n\t\"Use left and right arrows to move selection\": \"\",\n\t\"Use left and right arrows to move left selection\": \"\",\n\t\"Use left and right arrows to move right selection\": \"\",\n\t\"Use TAB select grip buttons or up and down arrows to change selection\": \"\",\n\t\"Use up and down arrows to move selection\": \"\",\n\t\"Use up and down arrows to move lower selection\": \"\",\n\t\"Use up and down arrows to move upper selection\": \"\",\n\t\"From %1 to %2\": \"\",\n\t\"From %1\": \"\",\n\t\"To %1\": \"\",\n\n\t// Data loader-related.\n\t\"No parser available for file: %1\": \"\",\n\t\"Error parsing file: %1\": \"\",\n\t\"Unable to load file: %1\": \"\",\n\t\"Invalid date\": \"\",\n\n\t// Common actions\n\t\"Close\": \"\",\n\t\"Minimize\": \"\"\n\n};","import { AnimatedTheme } from \"../.internal/themes/AnimatedTheme\";\nexport default AnimatedTheme;","import { DarkTheme } from \"../.internal/themes/DarkTheme\";\nexport default DarkTheme;","'use strict';\n\nvar Queue = require('tinyqueue');\n\nif (Queue.default) Queue = Queue.default; // temporary webpack fix\n\nmodule.exports = polylabel;\nmodule.exports.default = polylabel;\n\nfunction polylabel(polygon, precision, debug) {\n precision = precision || 1.0;\n\n // find the bounding box of the outer ring\n var minX, minY, maxX, maxY;\n for (var i = 0; i < polygon[0].length; i++) {\n var p = polygon[0][i];\n if (!i || p[0] < minX) minX = p[0];\n if (!i || p[1] < minY) minY = p[1];\n if (!i || p[0] > maxX) maxX = p[0];\n if (!i || p[1] > maxY) maxY = p[1];\n }\n\n var width = maxX - minX;\n var height = maxY - minY;\n var cellSize = Math.min(width, height);\n var h = cellSize / 2;\n\n if (cellSize === 0) {\n var degeneratePoleOfInaccessibility = [minX, minY];\n degeneratePoleOfInaccessibility.distance = 0;\n return degeneratePoleOfInaccessibility;\n }\n\n // a priority queue of cells in order of their \"potential\" (max distance to polygon)\n var cellQueue = new Queue(undefined, compareMax);\n\n // cover polygon with initial cells\n for (var x = minX; x < maxX; x += cellSize) {\n for (var y = minY; y < maxY; y += cellSize) {\n cellQueue.push(new Cell(x + h, y + h, h, polygon));\n }\n }\n\n // take centroid as the first best guess\n var bestCell = getCentroidCell(polygon);\n\n // special case for rectangular polygons\n var bboxCell = new Cell(minX + width / 2, minY + height / 2, 0, polygon);\n if (bboxCell.d > bestCell.d) bestCell = bboxCell;\n\n var numProbes = cellQueue.length;\n\n while (cellQueue.length) {\n // pick the most promising cell from the queue\n var cell = cellQueue.pop();\n\n // update the best cell if we found a better one\n if (cell.d > bestCell.d) {\n bestCell = cell;\n if (debug) console.log('found best %d after %d probes', Math.round(1e4 * cell.d) / 1e4, numProbes);\n }\n\n // do not drill down further if there's no chance of a better solution\n if (cell.max - bestCell.d <= precision) continue;\n\n // split the cell into four cells\n h = cell.h / 2;\n cellQueue.push(new Cell(cell.x - h, cell.y - h, h, polygon));\n cellQueue.push(new Cell(cell.x + h, cell.y - h, h, polygon));\n cellQueue.push(new Cell(cell.x - h, cell.y + h, h, polygon));\n cellQueue.push(new Cell(cell.x + h, cell.y + h, h, polygon));\n numProbes += 4;\n }\n\n if (debug) {\n console.log('num probes: ' + numProbes);\n console.log('best distance: ' + bestCell.d);\n }\n\n var poleOfInaccessibility = [bestCell.x, bestCell.y];\n poleOfInaccessibility.distance = bestCell.d;\n return poleOfInaccessibility;\n}\n\nfunction compareMax(a, b) {\n return b.max - a.max;\n}\n\nfunction Cell(x, y, h, polygon) {\n this.x = x; // cell center x\n this.y = y; // cell center y\n this.h = h; // half the cell size\n this.d = pointToPolygonDist(x, y, polygon); // distance from cell center to polygon\n this.max = this.d + this.h * Math.SQRT2; // max distance to polygon within a cell\n}\n\n// signed distance from point to polygon outline (negative if point is outside)\nfunction pointToPolygonDist(x, y, polygon) {\n var inside = false;\n var minDistSq = Infinity;\n\n for (var k = 0; k < polygon.length; k++) {\n var ring = polygon[k];\n\n for (var i = 0, len = ring.length, j = len - 1; i < len; j = i++) {\n var a = ring[i];\n var b = ring[j];\n\n if ((a[1] > y !== b[1] > y) &&\n (x < (b[0] - a[0]) * (y - a[1]) / (b[1] - a[1]) + a[0])) inside = !inside;\n\n minDistSq = Math.min(minDistSq, getSegDistSq(x, y, a, b));\n }\n }\n\n return minDistSq === 0 ? 0 : (inside ? 1 : -1) * Math.sqrt(minDistSq);\n}\n\n// get polygon centroid\nfunction getCentroidCell(polygon) {\n var area = 0;\n var x = 0;\n var y = 0;\n var points = polygon[0];\n\n for (var i = 0, len = points.length, j = len - 1; i < len; j = i++) {\n var a = points[i];\n var b = points[j];\n var f = a[0] * b[1] - b[0] * a[1];\n x += (a[0] + b[0]) * f;\n y += (a[1] + b[1]) * f;\n area += f * 3;\n }\n if (area === 0) return new Cell(points[0][0], points[0][1], 0, polygon);\n return new Cell(x / area, y / area, 0, polygon);\n}\n\n// get squared distance from a point to a segment\nfunction getSegDistSq(px, py, a, b) {\n\n var x = a[0];\n var y = a[1];\n var dx = b[0] - x;\n var dy = b[1] - y;\n\n if (dx !== 0 || dy !== 0) {\n\n var t = ((px - x) * dx + (py - y) * dy) / (dx * dx + dy * dy);\n\n if (t > 1) {\n x = b[0];\n y = b[1];\n\n } else if (t > 0) {\n x += dx * t;\n y += dy * t;\n }\n }\n\n dx = px - x;\n dy = py - y;\n\n return dx * dx + dy * dy;\n}\n","\nexport default class TinyQueue {\n constructor(data = [], compare = defaultCompare) {\n this.data = data;\n this.length = this.data.length;\n this.compare = compare;\n\n if (this.length > 0) {\n for (let i = (this.length >> 1) - 1; i >= 0; i--) this._down(i);\n }\n }\n\n push(item) {\n this.data.push(item);\n this.length++;\n this._up(this.length - 1);\n }\n\n pop() {\n if (this.length === 0) return undefined;\n\n const top = this.data[0];\n const bottom = this.data.pop();\n this.length--;\n\n if (this.length > 0) {\n this.data[0] = bottom;\n this._down(0);\n }\n\n return top;\n }\n\n peek() {\n return this.data[0];\n }\n\n _up(pos) {\n const {data, compare} = this;\n const item = data[pos];\n\n while (pos > 0) {\n const parent = (pos - 1) >> 1;\n const current = data[parent];\n if (compare(item, current) >= 0) break;\n data[pos] = current;\n pos = parent;\n }\n\n data[pos] = item;\n }\n\n _down(pos) {\n const {data, compare} = this;\n const halfLength = this.length >> 1;\n const item = data[pos];\n\n while (pos < halfLength) {\n let left = (pos << 1) + 1;\n let best = data[left];\n const right = left + 1;\n\n if (right < this.length && compare(data[right], best) < 0) {\n left = right;\n best = data[right];\n }\n if (compare(best, item) >= 0) break;\n\n data[pos] = best;\n pos = left;\n }\n\n data[pos] = item;\n }\n}\n\nfunction defaultCompare(a, b) {\n return a < b ? -1 : a > b ? 1 : 0;\n}\n","/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n 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;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.push(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.push(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n 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;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n 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); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n 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);\r\n 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); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n 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\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n 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\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n","const map = { \"type\": \"FeatureCollection\", \"features\": [\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"MultiPolygon\", \"coordinates\": [[[[-77.3742, 8.6583], [-77.4072, 8.427], [-77.2124, 8.0338], [-77.3509, 7.7057], [-77.7439, 7.537], [-77.9011, 7.2294], [-78.1701, 7.5437], [-78.4215, 8.0608], [-78.1139, 8.3795], [-79.0865, 8.997], [-79.4418, 9.0059], [-79.7508, 8.5953], [-80.3687, 8.289], [-80.4581, 8.0768], [-80.0752, 7.6671], [-80.4388, 7.2747], [-80.8456, 7.2201], [-81.0352, 7.711], [-81.5041, 7.7213], [-81.7279, 8.1376], [-82.6796, 8.3218], [-83.1232, 8.3529], [-83.1625, 8.5882], [-83.734, 8.6144], [-83.6373, 9.0352], [-83.8956, 9.2762], [-84.6589, 9.6473], [-85.1145, 9.5816], [-85.6248, 9.9025], [-85.8305, 10.3979], [-85.6672, 10.745], [-85.7453, 11.0886], [-86.4688, 11.7385], [-86.7556, 12.1566], [-87.6676, 12.9037], [-87.4128, 13.1274], [-87.7084, 13.36], [-87.9308, 13.1807], [-88.5121, 13.1838], [-89.2776, 13.4781], [-89.8042, 13.5602], [-90.607, 13.9291], [-91.1461, 13.9255], [-91.8191, 14.2283], [-92.2645, 14.5678], [-92.809, 15.1387], [-93.916, 16.0536], [-94.3741, 16.2848], [-94.6615, 16.2018], [-94.9003, 16.4175], [-95.4643, 15.9745], [-96.2136, 15.6931], [-96.5108, 15.6518], [-97.1846, 15.9093], [-97.7548, 15.967], [-98.5203, 16.3048], [-98.7622, 16.5347], [-99.6906, 16.7198], [-100.0244, 16.9205], [-100.8478, 17.2006], [-101.6002, 17.6516], [-101.847, 17.9223], [-102.6995, 18.0626], [-103.4415, 18.3254], [-103.9125, 18.8283], [-104.9385, 19.3095], [-105.4821, 19.9762], [-105.6694, 20.3855], [-105.2603, 20.579], [-105.4923, 20.7766], [-105.237, 21.1192], [-105.2086, 21.4908], [-105.6492, 21.9879], [-105.7917, 22.6276], [-106.4025, 23.1958], [-106.9354, 23.8811], [-107.9512, 24.6149], [-108.3736, 25.1942], [-109.0288, 25.4805], [-109.385, 25.7273], [-109.4256, 26.0327], [-109.1997, 26.3052], [-109.4829, 26.7105], [-109.7548, 26.703], [-109.9441, 27.0794], [-110.4779, 27.3226], [-110.5298, 27.8642], [-111.1215, 27.9672], [-111.6801, 28.4706], [-112.1618, 29.0188], [-112.2235, 29.2696], [-112.7384, 29.9856], [-113.1104, 30.7934], [-113.0467, 31.1792], [-113.6235, 31.3461], [-113.9478, 31.6293], [-114.1493, 31.5072], [-114.8398, 31.7984], [-114.8819, 31.1565], [-114.6333, 30.5067], [-114.6498, 30.2381], [-114.3726, 29.8302], [-113.7556, 29.3677], [-113.4999, 28.9269], [-113.2056, 28.7986], [-112.8709, 28.4244], [-112.7339, 27.826], [-112.3291, 27.5233], [-112.0091, 26.9671], [-111.5696, 26.7074], [-111.2917, 25.7899], [-111.0345, 25.5271], [-110.6774, 24.7885], [-110.5471, 24.2141], [-110.0229, 24.1746], [-109.4209, 23.4803], [-109.458, 23.2149], [-109.9234, 22.8859], [-110.0861, 23.0053], [-110.3627, 23.605], [-111.4193, 24.329], [-112.0728, 24.84], [-112.0557, 25.488], [-112.3773, 26.2138], [-113.0207, 26.5831], [-113.2058, 26.857], [-113.5986, 26.7212], [-113.841, 26.9666], [-114.4456, 27.2183], [-114.5399, 27.431], [-114.9938, 27.7359], [-114.3006, 27.8731], [-114.0487, 28.4262], [-114.1455, 28.6055], [-114.9938, 29.3845], [-115.6738, 29.7565], [-115.8157, 30.3038], [-116.0622, 30.8041], [-116.6622, 31.5649], [-117.2434, 32.664], [-117.4674, 33.2957], [-118.0806, 33.7222], [-118.4104, 33.744], [-118.5063, 34.0174], [-119.1437, 34.112], [-119.606, 34.4178], [-120.4812, 34.4715], [-120.6448, 34.5798], [-120.6337, 35.0766], [-120.8605, 35.3655], [-121.8774, 36.331], [-121.79, 36.7323], [-122.3948, 37.2077], [-122.4669, 37.838], [-122.9681, 38.0968], [-122.9865, 38.277], [-123.7012, 38.9073], [-123.8845, 39.8608], [-124.324, 40.2519], [-124.3717, 40.4911], [-124.1331, 40.9697], [-124.0687, 41.3843], [-124.5397, 42.8127], [-124.1486, 43.6916], [-123.9293, 45.5768], [-124.0716, 46.7447], [-124.3763, 47.6587], [-124.6211, 47.9041], [-124.6327, 48.3751], [-123.9757, 48.1683], [-122.2421, 48.0107], [-122.7888, 48.993], [-123.0491, 48.993], [-123.3356, 49.4591], [-123.859, 49.4828], [-124.1415, 49.7927], [-124.4833, 49.8082], [-125.21, 50.4763], [-126.4045, 50.5298], [-126.6317, 50.9151], [-127.0579, 50.8676], [-127.7082, 51.1512], [-127.6449, 51.4784], [-128.1024, 51.7884], [-128.3576, 52.1589], [-128.1088, 52.858], [-128.4519, 52.8766], [-128.6523, 53.2437], [-129.2842, 53.3931], [-129.5637, 53.2515], [-130.3351, 53.724], [-130.0433, 54.1335], [-130.8496, 54.8076], [-131.0478, 55.1576], [-130.9186, 55.736], [-131.2875, 56.0121], [-131.8439, 56.1601], [-132.8145, 57.0408], [-133.4659, 57.1722], [-133.5542, 57.6951], [-134.0634, 58.2111], [-134.7761, 58.4539], [-135.3025, 58.2559], [-135.8618, 58.5771], [-136.5827, 58.2453], [-137.5439, 58.5811], [-138.3525, 59.0873], [-140.2168, 59.7265], [-140.8432, 59.749], [-141.6701, 59.9698], [-142.9457, 60.097], [-143.805, 60.0129], [-144.9012, 60.3351], [-145.8989, 60.4783], [-146.8741, 61.005], [-148.3445, 60.8536], [-148.1976, 60.1678], [-148.4306, 59.9891], [-149.4323, 60.0011], [-150.9608, 59.244], [-151.7383, 59.1885], [-151.7345, 59.9882], [-151.4515, 60.2026], [-151.3217, 60.7428], [-150.4412, 61.0236], [-150.6123, 61.3013], [-151.7341, 60.9106], [-151.7505, 60.7548], [-153.1061, 59.875], [-154.0882, 59.3632], [-154.1298, 59.12], [-153.327, 58.8843], [-154.0199, 58.493], [-154.2469, 58.1594], [-155.0069, 58.016], [-156.4784, 57.328], [-156.4751, 57.1051], [-157.5783, 56.6344], [-158.4144, 56.4358], [-158.2757, 56.196], [-159.5233, 55.8101], [-159.9623, 55.7948], [-161.0995, 55.4059], [-161.7416, 55.3911], [-162.0741, 55.1394], [-162.8651, 54.9545], [-162.9621, 55.1838], [-162.1571, 55.7195], [-161.2156, 56.0214], [-160.8514, 55.7719], [-160.3021, 56.3141], [-159.2831, 56.6885], [-158.321, 57.2978], [-157.6076, 57.6016], [-157.5235, 58.4213], [-158.5032, 58.8503], [-159.0827, 58.4697], [-159.6702, 58.9111], [-160.3631, 59.0512], [-161.7554, 58.6119], [-161.8286, 59.5887], [-162.2425, 60.1782], [-163.2193, 59.8455], [-163.9069, 59.8067], [-164.6622, 60.3038], [-165.3538, 60.5413], [-164.8051, 60.892], [-165.566, 61.1024], [-166.0789, 61.8031], [-165.1944, 62.4736], [-164.409, 63.2151], [-163.3589, 63.0457], [-161.974, 63.453], [-161.0997, 63.558], [-160.7786, 63.819], [-160.932, 64.5792], [-161.187, 64.9241], [-161.7594, 64.8162], [-162.807, 64.3743], [-163.7132, 64.5883], [-164.8995, 64.4607], [-166.1428, 64.5827], [-167.4039, 65.4221], [-168.0884, 65.6578], [-164.6742, 66.5549], [-163.7755, 66.5312], [-163.6954, 66.0837], [-161.8164, 66.0536], [-161.557, 66.2504], [-160.2317, 66.4202], [-160.864, 66.6708], [-161.8566, 66.7003], [-161.9653, 67.0499], [-163.0016, 67.0272], [-163.7205, 67.1955], [-164.1251, 67.6067], [-166.3805, 68.4251], [-166.2092, 68.8854], [-164.3024, 68.9364], [-163.1614, 69.3879], [-162.9521, 69.7581], [-161.881, 70.3318], [-160.9963, 70.3045], [-159.3144, 70.8784], [-157.9985, 70.8454], [-156.7833, 71.319], [-155.1669, 71.0993], [-154.1952, 70.801], [-153.2329, 70.9326], [-152.233, 70.8103], [-151.9447, 70.4521], [-149.2694, 70.5009], [-147.7053, 70.2173], [-145.8232, 70.16], [-145.1973, 70.0086], [-143.2184, 70.1163], [-141.4078, 69.6533], [-139.1815, 69.5155], [-138.1283, 69.1519], [-136.7174, 68.8891], [-135.8762, 68.9169], [-135.6914, 69.3111], [-135.1409, 69.4675], [-133.1632, 69.4338], [-130.4985, 70.1431], [-128.9715, 69.7123], [-127.765, 70.2219], [-127.1385, 70.2392], [-126.6122, 69.7305], [-125.9073, 69.4185], [-124.7678, 69.99], [-123.6091, 69.3774], [-123.0258, 69.81], [-120.9624, 69.6604], [-120.2925, 69.4205], [-118.8687, 69.2571], [-118.0953, 69.0429], [-116.0651, 68.8554], [-115.6314, 68.9726], [-114.4138, 68.6596], [-113.9644, 68.3991], [-114.7652, 68.2701], [-115.1332, 67.8194], [-113.6819, 67.7], [-112.4352, 67.6849], [-110.9901, 67.7907], [-110.0426, 67.9772], [-109.6305, 67.7328], [-108.5929, 67.591], [-108.0884, 67.0698], [-107.1564, 66.8819], [-108.2611, 68.1501], [-108.3134, 68.6108], [-106.1646, 68.9198], [-105.4286, 68.4583], [-104.1934, 68.0311], [-103.4741, 68.115], [-102.692, 67.8116], [-101.555, 67.6931], [-100.4561, 67.8396], [-99.1468, 67.7237], [-98.4171, 67.8265], [-97.4549, 67.6169], [-97.2066, 67.8551], [-98.4384, 68.0646], [-98.2184, 68.3174], [-97.2658, 68.453], [-96.9769, 68.2555], [-96.036, 68.1578], [-96.3714, 67.5539], [-95.7826, 67.1937], [-95.2588, 67.2625], [-95.6505, 67.7375], [-95.461, 68.0213], [-94.7443, 68.0708], [-93.6517, 68.5431], [-93.6628, 68.8381], [-94.2707, 69.4551], [-96.0503, 69.8311], [-96.4926, 70.1249], [-96.2265, 70.5418], [-96.549, 70.809], [-96.4058, 71.2737], [-95.2013, 71.9036], [-94.3084, 71.7649], [-92.9488, 71.2622], [-92.9814, 70.8525], [-91.5641, 70.1782], [-92.751, 69.7139], [-90.8221, 69.2904], [-90.4683, 68.8638], [-89.0567, 69.266], [-88.0413, 68.8117], [-87.8103, 68.4042], [-88.3469, 68.2883], [-88.1958, 67.7659], [-87.2663, 67.1839], [-86.5363, 67.5162], [-85.9526, 68.0724], [-85.7338, 68.6301], [-84.8622, 69.074], [-85.3869, 69.2318], [-85.5076, 69.8453], [-84.2416, 69.8351], [-82.6183, 69.691], [-82.642, 69.4584], [-81.3286, 69.12], [-81.2815, 68.6572], [-82.5526, 68.4464], [-81.9764, 67.862], [-81.2702, 67.4598], [-81.4675, 67.0698], [-82.6416, 66.5876], [-84.4784, 66.1794], [-85.6039, 66.5683], [-86.6331, 66.5314], [-86.0429, 66.0225], [-87.2914, 65.3549], [-87.9701, 65.3489], [-89.7494, 65.9359], [-89.9243, 65.7803], [-88.9739, 65.3482], [-87.0275, 65.1982], [-87.2805, 64.8262], [-88.1057, 64.1832], [-88.653, 64.0094], [-90.1418, 63.9819], [-90.0135, 63.8044], [-91.3303, 63.5067], [-90.7466, 63.3516], [-90.8711, 62.9459], [-91.4491, 62.804], [-92.3613, 62.8194], [-93.4206, 61.7059], [-93.9127, 61.4815], [-94.6469, 60.4164], [-94.7858, 59.9536], [-94.7137, 58.9033], [-94.2871, 58.716], [-93.2781, 58.7564], [-92.249, 57.0093], [-91.1115, 57.2412], [-90.5922, 57.2245], [-89.7909, 56.9813], [-88.9484, 56.8512], [-88.0751, 56.4673], [-87.5608, 56.0564], [-85.8305, 55.6569], [-85.061, 55.2856], [-83.9107, 55.3147], [-82.5775, 55.1487], [-82.2195, 54.8135], [-82.4181, 54.3559], [-82.1413, 53.8177], [-82.2605, 52.9612], [-81.5993, 52.4325], [-81.6615, 52.2938], [-80.6579, 51.7585], [-80.368, 51.3299], [-79.8362, 51.1734], [-79.4975, 51.5698], [-78.9777, 51.7338], [-78.4917, 52.2521], [-78.7238, 52.6278], [-79.2418, 54.0989], [-79.6655, 54.6975], [-78.9091, 54.8815], [-77.8911, 55.2364], [-77.3249, 55.5555], [-76.6504, 56.1075], [-76.5257, 56.8918], [-76.6555, 57.3806], [-77.1571, 58.0191], [-78.5152, 58.6823], [-78.4586, 58.8734], [-77.7606, 59.3801], [-77.7262, 59.6759], [-77.312, 60.0424], [-77.8715, 60.7859], [-77.7362, 61.4373], [-78.1372, 62.1074], [-78.0682, 62.3555], [-77.3724, 62.5726], [-74.6899, 62.1835], [-73.6299, 62.4543], [-72.0816, 61.7283], [-71.4229, 61.159], [-70.2792, 61.0687], [-69.6404, 60.6898], [-69.7559, 60.3886], [-69.682, 59.3417], [-69.5317, 58.8692], [-68.6983, 58.9045], [-67.5697, 58.2135], [-66.608, 58.5489], [-65.6061, 59.1106], [-64.9312, 60.2519], [-64.4995, 60.2683], [-63.5398, 59.3328], [-63.1854, 58.8578], [-62.5939, 58.4741], [-62.3056, 57.9723], [-61.899, 57.8613], [-61.851, 57.3812], [-61.3337, 57.0106], [-61.5146, 56.3903], [-61.0893, 55.8662], [-60.8318, 55.9579], [-59.9303, 55.2594], [-58.997, 55.1494], [-58.7802, 54.8384], [-58.1951, 54.8659], [-57.4046, 54.5705], [-58.1516, 54.3503], [-57.4161, 54.1628], [-57.1489, 53.8476], [-56.4651, 53.7651], [-55.7979, 53.212], [-55.8336, 52.3104], [-55.6951, 52.1378], [-56.976, 51.4577], [-58.5103, 51.295], [-59.1655, 50.7799], [-60.0801, 50.2546], [-61.2897, 50.202], [-62.7155, 50.3016], [-64.8679, 50.2754], [-65.2686, 50.32], [-66.4955, 50.2119], [-66.9411, 49.9938], [-67.3719, 49.3486], [-68.2821, 49.1972], [-68.9291, 48.829], [-69.7752, 48.0981], [-69.9057, 47.8322], [-70.7058, 47.1398], [-70.5196, 47.0323], [-68.987, 48.2748], [-67.5608, 48.8558], [-66.1781, 49.2132], [-65.5234, 49.2662], [-64.8364, 49.1917], [-64.2618, 48.9218], [-64.2538, 48.5505], [-65.2595, 48.0213], [-65.9266, 48.1887], [-65.6667, 47.696], [-65.2282, 47.8114], [-64.7033, 47.7248], [-64.9121, 47.3688], [-65.3189, 47.1011], [-64.9057, 46.8881], [-64.5415, 46.2404], [-63.2928, 45.7522], [-62.4831, 45.6217], [-61.9556, 45.868], [-61.4924, 45.6869], [-61.2837, 45.2355], [-62.514, 44.8435], [-63.7611, 44.4862], [-64.286, 44.5501], [-64.3781, 44.3037], [-64.8624, 43.8678], [-65.7382, 43.5607], [-66.1257, 43.8137], [-66.0995, 44.3677], [-65.6567, 44.7605], [-64.4489, 45.2559], [-64.8979, 45.6261], [-65.8847, 45.223], [-66.8726, 45.0672], [-67.3642, 44.697], [-67.9073, 44.4538], [-68.2775, 44.5075], [-69.0683, 44.0978], [-69.7916, 43.8052], [-70.1789, 43.7662], [-70.8292, 42.8251], [-71.0463, 42.3311], [-70.7382, 42.229], [-70.4046, 41.6271], [-70.6572, 41.5343], [-71.4264, 41.6333], [-71.5228, 41.3789], [-72.8471, 41.2657], [-73.5831, 41.022], [-74.2267, 40.6079], [-73.9575, 40.3282], [-74.1761, 39.7268], [-74.4289, 39.3872], [-74.897, 39.1453], [-75.3922, 39.0929], [-75.036, 38.5034], [-75.6592, 37.9539], [-76.2948, 38.4945], [-76.1683, 38.8527], [-76.5194, 38.8985], [-76.5012, 38.5323], [-76.2642, 37.8935], [-76.2635, 37.3568], [-75.8904, 36.6568], [-76.4788, 36.0283], [-75.7724, 35.9], [-75.7742, 35.647], [-76.1739, 35.354], [-76.513, 35.2705], [-76.7449, 34.9412], [-77.751, 34.2851], [-78.0136, 33.9118], [-78.5778, 33.8732], [-78.9202, 33.6588], [-79.276, 33.1354], [-80.0218, 32.6201], [-80.2297, 32.5766], [-80.8494, 32.114], [-81.1978, 31.7043], [-81.1754, 31.5312], [-81.5203, 30.8747], [-81.2496, 29.7938], [-80.9, 29.0498], [-80.524, 28.4861], [-80.6503, 28.1811], [-80.2262, 27.2072], [-80.0413, 26.5685], [-80.1263, 25.8334], [-80.3669, 25.3313], [-80.7366, 25.1564], [-81.0977, 25.3194], [-81.365, 25.8312], [-81.7154, 25.983], [-81.8666, 26.4349], [-82.4414, 27.0599], [-82.6609, 27.7186], [-82.8436, 27.846], [-82.6607, 28.4856], [-82.6518, 28.8874], [-83.2906, 29.452], [-83.6943, 29.9261], [-84.0443, 30.1036], [-84.3828, 29.9074], [-85.3189, 29.6802], [-85.3538, 29.8759], [-86.2573, 30.4929], [-87.7903, 30.2918], [-88.9051, 30.4152], [-89.5885, 30.1658], [-90.2253, 30.3793], [-90.413, 30.1405], [-89.5894, 29.915], [-90.1014, 29.1817], [-90.3793, 29.2953], [-90.7511, 29.1311], [-91.2902, 29.2891], [-91.3312, 29.5137], [-91.8932, 29.836], [-92.2607, 29.5568], [-93.1758, 29.7791], [-93.6947, 29.7698], [-94.8886, 29.3708], [-95.2734, 28.9637], [-95.8534, 28.6401], [-96.4486, 28.5944], [-96.5616, 28.3671], [-97.1564, 28.1443], [-97.1715, 27.8797], [-97.5546, 26.9675], [-97.4023, 26.3967], [-97.1402, 26.0296], [-97.225, 25.5852], [-97.5071, 25.0144], [-97.6676, 24.3898], [-97.8578, 22.6245], [-97.6376, 21.6035], [-97.1214, 20.615], [-96.456, 19.8697], [-96.2895, 19.3437], [-95.821, 18.7546], [-95.1818, 18.7005], [-94.798, 18.5145], [-94.5461, 18.1749], [-94.189, 18.1953], [-93.5522, 18.4306], [-92.8849, 18.4688], [-92.7102, 18.6121], [-91.9738, 18.716], [-91.8031, 18.4705], [-91.2753, 18.6246], [-91.343, 18.9007], [-90.7393, 19.3521], [-90.6934, 19.7299], [-90.5071, 19.9119], [-90.4841, 20.5564], [-90.3531, 21.0096], [-89.8198, 21.2746], [-88.8787, 21.414], [-88.1317, 21.616], [-86.8242, 21.4215], [-86.8648, 20.8849], [-87.4672, 20.1023], [-87.4248, 19.5834], [-87.7619, 18.4461], [-88.0973, 18.1216], [-88.2717, 17.6098], [-88.3134, 16.6328], [-88.6952, 16.2475], [-88.894, 15.8906], [-88.131, 15.7011], [-87.6181, 15.9097], [-86.9072, 15.7624], [-86.3568, 15.7832], [-85.7839, 16.0029], [-85.4836, 15.8995], [-84.9738, 15.9901], [-84.2614, 15.8227], [-83.7604, 15.2204], [-83.3691, 15.2399], [-83.1576, 14.9931], [-83.2992, 14.749], [-83.1878, 14.3401], [-83.4124, 13.9966], [-83.5673, 13.3205], [-83.511, 12.4119], [-83.7693, 11.9316], [-83.6517, 11.6422], [-83.8679, 11.2999], [-83.4482, 10.4658], [-82.7783, 9.6695], [-82.3708, 9.428], [-82.2441, 9.0321], [-81.355, 8.7804], [-80.8387, 8.8874], [-80.1272, 9.2101], [-79.5774, 9.598], [-78.5043, 9.4063], [-78.0828, 9.2363], [-77.3742, 8.6583]]], [[[-25.4583, 70.9426], [-25.4022, 70.6527], [-27.8979, 70.4541], [-27.7088, 70.8971], [-25.4583, 70.9426]]], [[[-53.103, 70.1409], [-52.0452, 69.8071], [-52.1125, 69.4893], [-53.5784, 69.2567], [-53.7831, 69.5064], [-54.804, 69.6304], [-54.8304, 70.1611], [-54.3719, 70.3174], [-53.103, 70.1409]]], [[[-97.4694, 69.6668], [-96.2999, 69.3444], [-95.6856, 68.7358], [-96.4016, 68.4708], [-97.472, 68.544], [-99.254, 68.8632], [-99.5641, 69.0341], [-98.4559, 69.3346], [-98.5483, 69.545], [-97.4694, 69.6668]]], [[[-75.8665, 68.3367], [-75.1538, 68.234], [-75.1274, 67.5373], [-75.7801, 67.2836], [-77.0051, 67.2669], [-77.3058, 67.7062], [-76.7405, 68.2313], [-75.8665, 68.3367]]], [[[-85.0559, 65.4374], [-83.4071, 65.1039], [-82.0501, 64.6442], [-81.7161, 64.0219], [-80.829, 64.09], [-80.3021, 63.7622], [-81.0465, 63.4615], [-82.3782, 63.7067], [-82.4672, 63.9269], [-83.4943, 64.0993], [-83.7283, 63.8135], [-84.6329, 63.3092], [-85.4954, 63.1392], [-85.7142, 63.6579], [-87.1888, 63.6723], [-86.252, 64.1368], [-86.3743, 64.5659], [-85.9617, 65.7042], [-85.241, 65.7954], [-85.0559, 65.4374]]], [[[-82.0477, 62.9705], [-82.1138, 62.6522], [-83.0158, 62.2099], [-83.699, 62.1602], [-83.8994, 62.4765], [-83.3767, 62.905], [-82.0477, 62.9705]]], [[[-79.5978, 62.4132], [-79.324, 62.0261], [-79.7144, 61.6126], [-80.2761, 61.8586], [-80.0215, 62.3431], [-79.5978, 62.4132]]], [[[-166.1355, 60.3835], [-165.7298, 60.3143], [-165.5917, 59.9132], [-166.1876, 59.7738], [-167.1389, 60.0086], [-166.4759, 60.3828], [-166.1355, 60.3835]]], [[[-134.7332, 58.2251], [-134.2671, 57.8846], [-133.9253, 57.3369], [-134.4354, 57.057], [-134.7332, 58.2251]]], [[[-135.7304, 58.2442], [-135.002, 58.0511], [-135.0848, 57.5111], [-136.0767, 57.6747], [-136.5123, 58.0959], [-135.7304, 58.2442]]], [[[-152.8979, 57.8238], [-152.4121, 57.4547], [-153.7933, 56.9895], [-154.339, 56.9209], [-154.7059, 57.3353], [-154.2813, 57.638], [-153.8184, 57.5956], [-152.8979, 57.8238]]], [[[-135.0653, 57.4168], [-134.6207, 56.7183], [-135.787, 57.3173], [-135.0653, 57.4168]]], [[[-133.7078, 57.0627], [-133.0708, 56.9742], [-132.9592, 56.677], [-133.6029, 56.4642], [-133.7078, 57.0627]]], [[[-78.9067, 56.3203], [-79.1755, 55.8851], [-80.0009, 55.9322], [-79.3925, 56.2764], [-78.9067, 56.3203]]], [[[-133.566, 56.3392], [-133.2029, 56.3199], [-131.9764, 55.2086], [-131.9809, 54.8049], [-132.7823, 55.0484], [-133.447, 55.797], [-133.2415, 55.9208], [-133.566, 56.3392]]], [[[-130.965, 55.5679], [-131.6475, 55.5855], [-131.2693, 55.9555], [-130.965, 55.5679]]], [[[-163.4761, 54.9807], [-163.358, 54.7356], [-164.0734, 54.6209], [-164.5907, 54.4043], [-164.8877, 54.6078], [-164.5297, 54.8808], [-163.8681, 55.039], [-163.4761, 54.9807]]], [[[-132.8931, 54.1408], [-131.7025, 53.9864], [-132.0113, 53.2653], [-132.7477, 53.3105], [-133.0522, 53.7784], [-132.8931, 54.1408]]], [[[-166.6153, 53.9009], [-166.4442, 53.6519], [-167.136, 53.5265], [-166.9782, 53.9628], [-166.6153, 53.9009]]], [[[-128.6326, 53.1126], [-128.5099, 52.5186], [-129.0847, 52.8225], [-128.6326, 53.1126]]], [[[-131.8535, 53.23], [-131.6524, 53.103], [-131.8097, 52.5417], [-132.3455, 53.1361], [-131.8535, 53.23]]], [[[-77.7015, 24.2878], [-77.5186, 23.8696], [-77.7712, 23.7524], [-77.9998, 24.2198], [-77.7015, 24.2878]]], [[[-82.1016, 23.1904], [-81.1788, 23.0595], [-80.6503, 23.103], [-80.0752, 22.9423], [-79.183, 22.3879], [-78.6865, 22.367], [-77.8651, 21.9005], [-77.4973, 21.8716], [-76.6475, 21.2844], [-75.7229, 21.1108], [-75.6428, 20.7335], [-74.8826, 20.6505], [-74.2529, 20.0797], [-75.1165, 19.9012], [-76.1586, 19.9895], [-77.7151, 19.8555], [-77.2135, 20.3003], [-77.2297, 20.6438], [-77.9974, 20.7153], [-78.4908, 21.0536], [-78.6366, 21.5156], [-79.2745, 21.5627], [-80.2313, 21.8721], [-80.4992, 22.0634], [-80.9619, 22.0528], [-81.8164, 22.2001], [-81.9036, 22.6791], [-82.7384, 22.6893], [-83.3796, 22.2228], [-84.3264, 22.0745], [-84.3612, 22.379], [-84.045, 22.6662], [-83.2577, 22.9676], [-82.1016, 23.1904]]], [[[-82.5679, 21.6217], [-82.8531, 21.4437], [-83.0826, 21.7913], [-82.7146, 21.8903], [-82.5679, 21.6217]]], [[[-157.7994, 21.4566], [-158.1104, 21.3186], [-158.273, 21.5853], [-157.9625, 21.7012], [-157.7994, 21.4566]]], [[[-155.5813, 19.0121], [-155.8813, 19.0707], [-156.0487, 19.7498], [-155.8203, 20.014], [-155.8316, 20.2759], [-155.1989, 19.9944], [-154.8042, 19.5243], [-155.5813, 19.0121]]], [[[-71.7682, 18.0391], [-72.0601, 18.2286], [-72.8766, 18.1518], [-73.3851, 18.2513], [-73.8849, 18.0417], [-74.4189, 18.3463], [-74.2276, 18.6628], [-73.5915, 18.5225], [-72.7894, 18.4346], [-72.3477, 18.6747], [-72.8112, 19.0716], [-72.7033, 19.4409], [-73.0526, 19.6109], [-73.1177, 19.9039], [-72.6369, 19.9008], [-71.8348, 19.6966], [-71.5578, 19.8954], [-70.9541, 19.9141], [-70.1294, 19.6362], [-69.7394, 19.2993], [-69.3228, 19.2012], [-68.6848, 18.9047], [-68.3392, 18.6121], [-68.6588, 18.222], [-68.9349, 18.408], [-69.7707, 18.4435], [-70.1831, 18.2517], [-70.6448, 18.336], [-71.0281, 18.273], [-71.3958, 17.6462], [-71.7682, 18.0391]]], [[[-66.153, 18.4705], [-65.6288, 18.3813], [-65.9708, 17.9743], [-67.1968, 17.9942], [-67.1586, 18.4994], [-66.153, 18.4705]]], [[[-77.3544, 18.4666], [-76.9083, 18.3902], [-76.3499, 18.1518], [-76.5245, 17.8664], [-76.8533, 17.9738], [-77.3615, 17.8336], [-77.7681, 17.8775], [-78.2167, 18.4479], [-77.8735, 18.522], [-77.3544, 18.4666]]], [[[-61.0041, 10.168], [-61.5967, 10.0646], [-61.4648, 10.5391], [-61.0338, 10.67], [-61.0041, 10.168]]], [[[-80.7096, 52.7874], [-81.839, 52.9579], [-81.8473, 53.1865], [-81.1359, 53.2058], [-80.7096, 52.7874]]], [[[-55.4532, 51.5623], [-55.8714, 50.9073], [-56.6939, 50.0597], [-55.7648, 49.9605], [-55.892, 49.5803], [-54.9827, 49.268], [-54.579, 49.4908], [-53.9577, 49.4418], [-53.5733, 49.1413], [-53.853, 48.8112], [-53.5312, 48.2317], [-53.695, 47.921], [-52.955, 48.0293], [-53.1756, 47.6529], [-52.6536, 47.5495], [-53.0697, 46.6812], [-53.6164, 46.6803], [-53.5813, 46.9573], [-54.1737, 46.8805], [-53.8692, 47.387], [-54.8566, 47.3848], [-55.3156, 46.9058], [-55.7886, 46.8672], [-55.1909, 47.4492], [-56.2211, 47.6715], [-56.9525, 47.5743], [-58.3332, 47.6769], [-59.1169, 47.5708], [-59.3623, 47.8655], [-58.7105, 48.325], [-58.7165, 48.5979], [-58.0158, 49.5426], [-57.4656, 50.4636], [-56.7503, 51.2751], [-56.0256, 51.5685], [-55.4532, 51.5623]]], [[[-127.7131, 50.8207], [-126.701, 50.5156], [-125.4821, 50.3167], [-124.6429, 49.4285], [-123.9959, 49.2241], [-123.4972, 48.582], [-123.5946, 48.3334], [-124.6893, 48.5975], [-125.8285, 49.0918], [-125.8354, 49.2767], [-126.5485, 49.4189], [-126.6832, 49.8764], [-127.1143, 49.8797], [-127.9059, 50.4452], [-127.7131, 50.8207]]], [[[-61.7456, 49.1058], [-62.2195, 49.0791], [-63.5658, 49.3994], [-64.1315, 49.9416], [-62.8584, 49.7055], [-61.8171, 49.2835], [-61.7456, 49.1058]]], [[[-63.8337, 46.4939], [-63.1294, 46.422], [-62.1635, 46.4872], [-62.8784, 46.0012], [-63.641, 46.2307], [-63.8337, 46.4939]]], [[[-60.9122, 46.0447], [-60.8061, 45.738], [-60.4723, 45.9466], [-60.5049, 46.204], [-59.8651, 46.1596], [-60.3862, 45.6545], [-61.2837, 45.5737], [-61.4952, 45.9413], [-60.8702, 46.7966], [-60.3318, 46.7678], [-60.5768, 46.1721], [-60.9122, 46.0447]]], [[[-72.4274, 41.0385], [-72.3391, 40.8942], [-73.1942, 40.6541], [-73.5738, 40.9195], [-72.4274, 41.0385]]], [[[-77.8402, 24.7942], [-77.7453, 24.4635], [-78.0449, 24.2873], [-78.2988, 24.7538], [-78.0333, 25.1431], [-77.8402, 24.7942]]], [[[-30.7029, 83.5935], [-25.9475, 83.2897], [-24.4702, 82.8773], [-21.5208, 82.5954], [-25.1491, 82.001], [-21.3379, 82.0687], [-21.1466, 81.6952], [-17.2261, 81.4304], [-15.5555, 81.8337], [-12.1928, 81.649], [-11.5288, 81.424], [-14.5035, 80.7633], [-16.7607, 80.5733], [-16.8683, 80.1982], [-19.4292, 80.2577], [-20.1385, 79.8033], [-19.2836, 79.683], [-19.0749, 79.1524], [-20.9557, 78.5551], [-20.8625, 77.9119], [-20.2319, 77.3684], [-18.339, 77.2152], [-18.5103, 76.7782], [-20.9422, 76.887], [-21.8772, 76.5734], [-21.5692, 76.2937], [-20.1036, 76.2191], [-19.5091, 75.7575], [-19.426, 75.2299], [-20.4849, 75.3143], [-19.2252, 74.4795], [-19.3692, 74.284], [-21.1295, 74.1109], [-20.3673, 73.8483], [-20.5096, 73.493], [-22.1851, 73.2699], [-22.0364, 72.9183], [-22.2931, 72.1196], [-24.0692, 72.4986], [-24.6669, 72.4374], [-22.0133, 71.6888], [-21.7523, 71.4784], [-21.5228, 70.5262], [-23.3279, 70.451], [-23.7917, 70.5551], [-24.377, 71.1463], [-25.6558, 71.5301], [-25.7422, 71.1836], [-26.7179, 70.9506], [-27.6887, 70.9934], [-28.5409, 70.4769], [-28.0149, 70.4024], [-26.7472, 70.4756], [-26.4156, 70.2213], [-25.53, 70.3531], [-23.1732, 70.1145], [-23.0882, 69.883], [-26.3414, 68.7023], [-29.2496, 68.2988], [-29.8686, 68.3116], [-30.9786, 68.0613], [-32.1373, 68.3849], [-32.2747, 67.9228], [-33.157, 67.6267], [-34.1016, 66.7258], [-34.6329, 66.4351], [-36.3792, 65.8307], [-37.7541, 65.593], [-39.9609, 65.5562], [-39.5779, 65.3407], [-40.6554, 64.9154], [-40.1822, 64.48], [-40.6179, 64.1317], [-40.5504, 63.7253], [-42.1529, 62.5686], [-42.3216, 62.1526], [-42.1103, 61.8572], [-42.4188, 61.537], [-42.7171, 60.7675], [-43.1565, 60.3329], [-43.3203, 59.9281], [-44.0654, 59.9247], [-45.3793, 60.2028], [-45.5904, 60.5189], [-46.0467, 60.6157], [-46.0116, 61.0971], [-46.8746, 60.8163], [-47.7963, 60.8289], [-48.922, 61.2775], [-49.2891, 61.59], [-49.5534, 62.2328], [-50.3192, 62.4731], [-50.3382, 62.8287], [-51.4688, 63.6423], [-51.4511, 63.9047], [-52.0934, 64.4158], [-52.259, 65.1549], [-53.6346, 66.4136], [-53.0382, 66.8268], [-53.8845, 67.1355], [-53.4189, 67.5746], [-53.578, 67.8369], [-53.0393, 68.6108], [-51.2493, 68.74], [-50.5, 69.9358], [-52.2545, 70.059], [-54.0143, 70.4217], [-54.1659, 70.8201], [-52.4052, 70.6867], [-51.5245, 70.4394], [-51.1301, 70.9717], [-53.117, 71.313], [-53.4761, 71.6402], [-54.689, 71.3672], [-55.5939, 71.5536], [-55.3156, 72.1107], [-55.6017, 72.4536], [-54.7379, 72.8726], [-55.6687, 73.0078], [-55.2972, 73.2624], [-56.104, 73.5582], [-55.9295, 73.8954], [-56.7063, 74.2192], [-56.2555, 74.5268], [-58.6035, 75.3853], [-58.5163, 75.6891], [-61.3747, 76.1801], [-63.4388, 76.3394], [-66.8262, 75.9688], [-68.149, 76.0671], [-69.3728, 76.3319], [-69.252, 76.6861], [-70.7928, 76.869], [-70.8629, 77.1755], [-68.9784, 77.1952], [-68.1354, 77.3795], [-66.4531, 77.393], [-66.6912, 77.6813], [-69.3515, 77.4671], [-72.8181, 78.1944], [-72.3957, 78.5043], [-68.9935, 78.8574], [-67.4822, 79.1169], [-65.9679, 79.1324], [-64.7923, 80.0006], [-66.8437, 80.0761], [-66.996, 80.413], [-62.9932, 81.2069], [-61.436, 81.1337], [-61.2029, 81.7469], [-58.7174, 82.0932], [-54.7259, 82.3513], [-52.7757, 82.3218], [-50.8944, 81.8952], [-49.6942, 81.9722], [-48.8612, 82.4054], [-45.2912, 81.8288], [-44.2389, 82.3681], [-46.4782, 82.9519], [-43.1945, 83.255], [-37.828, 83.4856], [-30.7029, 83.5935]]], [[[-69.5694, 83.0249], [-63.641, 82.8127], [-61.477, 82.4674], [-62.1766, 82.0434], [-64.5741, 81.7336], [-65.4838, 81.2848], [-70.1434, 80.3977], [-71.3878, 79.7618], [-73.2937, 79.5217], [-75.2595, 79.4209], [-76.2558, 79.0068], [-74.4334, 78.724], [-75.866, 78.0098], [-78.0127, 77.9461], [-78.0762, 77.5191], [-79.3408, 77.1584], [-78.2888, 76.978], [-78.2844, 76.5711], [-80.6903, 76.1765], [-81.1708, 76.5128], [-83.8856, 76.4531], [-85.1412, 76.3046], [-89.5701, 76.4919], [-89.4997, 76.8268], [-88.3982, 77.104], [-86.8737, 77.2004], [-88.0946, 77.7193], [-87.0179, 77.8922], [-87.5519, 78.1767], [-86.808, 78.7744], [-84.3162, 78.9753], [-85.0901, 79.6122], [-86.4207, 79.8453], [-86.3073, 80.3194], [-83.7236, 80.229], [-80.051, 80.5287], [-83.4013, 80.714], [-85.3074, 80.526], [-88.9213, 80.8054], [-89.9474, 81.1725], [-88.9786, 81.5414], [-90.4903, 81.8772], [-86.5807, 82.1873], [-84.8968, 82.4494], [-82.1225, 82.6019], [-79.8864, 82.9385], [-77.4796, 82.8831], [-75.7449, 83.0471], [-69.5694, 83.0249]]], [[[-91.9977, 81.1854], [-90.643, 80.5937], [-87.6749, 80.3722], [-87.1442, 79.6624], [-85.5014, 79.5303], [-85.2899, 79.2083], [-87.0164, 78.8987], [-88.7911, 78.1925], [-90.6143, 78.1498], [-92.6782, 78.3893], [-95.1032, 79.29], [-95.297, 79.6531], [-96.7734, 80.1358], [-95.6148, 80.3962], [-96.1328, 80.6913], [-95.2697, 81.0007], [-91.9977, 81.1854]]], [[[-103.7063, 79.3521], [-99.6094, 78.5831], [-99.1664, 77.8569], [-100.5859, 77.8917], [-101.0742, 78.1938], [-102.7313, 78.3711], [-103.5183, 78.7691], [-105.5358, 79.0325], [-105.3877, 79.3235], [-103.7063, 79.3521]]], [[[-96.2564, 78.5511], [-94.8873, 78.3454], [-95.0872, 77.9927], [-96.9895, 77.806], [-98.2548, 78.4293], [-98.212, 78.8046], [-96.2564, 78.5511]]], [[[-109.9412, 78.6785], [-109.3908, 78.3367], [-113.1499, 78.4084], [-110.4077, 78.7566], [-109.9412, 78.6785]]], [[[-110.4581, 78.1035], [-109.7718, 77.9574], [-110.1984, 77.5246], [-111.952, 77.3442], [-113.1643, 77.5302], [-113.2153, 77.9035], [-110.4581, 78.1035]]], [[[-95.4843, 77.7921], [-93.301, 77.7399], [-93.5196, 77.4745], [-95.9872, 77.484], [-95.4843, 77.7921]]], [[[-116.0081, 77.4607], [-115.6239, 77.2658], [-116.2205, 76.6111], [-119.3679, 76.2218], [-119.9128, 75.8589], [-121.9083, 76.0347], [-122.7741, 76.2278], [-121.6138, 76.4415], [-119.0902, 77.3051], [-116.8353, 77.5288], [-116.0081, 77.4607]]], [[[-94.616, 76.9584], [-92.7162, 76.6029], [-91.305, 76.6808], [-90.8547, 76.4373], [-89.2844, 76.3017], [-90.2515, 76.0536], [-88.2014, 75.512], [-87.257, 75.6177], [-86.0687, 75.5022], [-83.932, 75.819], [-82.1538, 75.8309], [-79.6602, 75.4494], [-79.5082, 74.8801], [-80.2779, 74.5816], [-81.8089, 74.4766], [-83.5318, 74.5856], [-84.4256, 74.5081], [-88.4231, 74.4942], [-89.8444, 74.5485], [-91.9616, 74.7931], [-92.4283, 75.3828], [-92.1851, 75.8465], [-93.0917, 76.3541], [-95.2739, 76.2644], [-96.6397, 76.703], [-96.7583, 76.9717], [-94.616, 76.9584]]], [[[-108.3869, 76.0667], [-107.1356, 75.8787], [-106.3967, 76.0602], [-105.4812, 75.7457], [-105.8625, 75.1915], [-107.1533, 74.9272], [-108.8312, 75.0648], [-110.9408, 74.6387], [-112.5193, 74.4169], [-113.5141, 74.43], [-114.4518, 75.0879], [-115.7289, 74.9682], [-117.6001, 75.2716], [-116.6098, 76.0738], [-115.5806, 76.4375], [-114.1939, 76.4515], [-112.6975, 76.2016], [-111.0527, 75.5484], [-109.0865, 75.5065], [-108.9449, 75.6989], [-110.2703, 76.4169], [-109.3386, 76.76], [-108.467, 76.7376], [-108.3869, 76.0667]]], [[[-97.7259, 76.4961], [-97.4097, 75.5522], [-97.7994, 75.1167], [-100.2344, 75.0077], [-100.7122, 75.4064], [-102.5413, 75.5136], [-101.4313, 75.9919], [-102.1378, 76.2848], [-100.388, 76.6135], [-97.7259, 76.4961]]], [[[-102.4259, 76.0864], [-103.3148, 75.7641], [-104.3506, 76.1823], [-103.0981, 76.3115], [-102.4259, 76.0864]]], [[[-93.5518, 75.0513], [-93.5471, 74.691], [-94.6973, 74.6422], [-96.5658, 75.0987], [-95.6707, 75.5287], [-94.4272, 75.5935], [-93.5518, 75.0513]]], [[[-18.0005, 75.4073], [-17.5861, 74.9929], [-18.6708, 75.0015], [-18.0005, 75.4073]]], [[[-119.737, 74.13], [-117.5149, 74.2318], [-115.5107, 73.6188], [-115.4468, 73.4388], [-118.9615, 72.6842], [-119.4078, 72.3604], [-120.1802, 72.2126], [-120.6195, 71.5057], [-123.2107, 71.1235], [-124.0077, 71.6774], [-125.7626, 72.1375], [-124.9871, 72.5881], [-124.8364, 73.0762], [-123.7973, 73.7682], [-124.6962, 74.3481], [-121.3153, 74.5299], [-119.737, 74.13]]], [[[-93.4102, 74.1788], [-92.2228, 73.9726], [-90.3547, 73.8687], [-92.118, 72.7539], [-93.3407, 72.8018], [-94.0376, 72.0288], [-95.1929, 72.0275], [-95.5478, 72.7816], [-95.633, 73.6954], [-94.9736, 74.0414], [-93.4102, 74.1788]]], [[[-100.002, 73.946], [-99.1579, 73.7316], [-97.5819, 73.8876], [-97.0017, 73.6665], [-97.7959, 73.2852], [-97.0519, 72.6367], [-96.6133, 71.8339], [-98.663, 71.3021], [-99.167, 71.3672], [-100.5944, 72.1524], [-101.7241, 72.3149], [-102.7137, 72.783], [-101.9225, 73.0568], [-101.3508, 72.7463], [-100.4847, 72.773], [-100.2828, 73.1203], [-101.4509, 73.431], [-100.9151, 73.8052], [-100.002, 73.946]]], [[[-86.4735, 71.0427], [-84.7896, 71.0933], [-84.6995, 71.6315], [-85.9115, 71.9866], [-85.3411, 72.4216], [-85.6445, 72.7745], [-85.0184, 73.3356], [-82.6596, 73.7296], [-81.406, 73.6346], [-80.2748, 72.7455], [-80.9413, 72.2101], [-78.453, 72.4352], [-77.7532, 72.7248], [-76.6979, 72.6951], [-75.2943, 72.4809], [-74.9032, 72.1005], [-73.7136, 71.7198], [-71.6406, 71.5163], [-69.9501, 70.8449], [-68.3583, 70.5231], [-67.3637, 70.0344], [-66.6852, 69.2858], [-67.7517, 69.0387], [-68.038, 68.5507], [-67.033, 68.3261], [-66.2251, 67.9587], [-64.5275, 67.8127], [-64.0079, 67.3473], [-61.9684, 67.019], [-61.2997, 66.6488], [-61.9915, 66.0354], [-62.6589, 65.6399], [-63.3643, 65.5433], [-63.4018, 65.1185], [-64.6653, 65.1689], [-65.4017, 65.7639], [-65.3054, 66.0085], [-66.4771, 66.2797], [-67.1835, 66.0345], [-68.2568, 65.9386], [-67.3034, 65.4829], [-66.8606, 65.0916], [-65.2748, 64.6316], [-65.0107, 64.0088], [-64.6786, 64.0281], [-64.5144, 63.2639], [-65.0688, 63.2635], [-65.2659, 62.715], [-65.9788, 63.0007], [-67.676, 63.0935], [-66.2815, 62.3027], [-66.2567, 61.8683], [-67.4401, 62.1513], [-69.0823, 62.4052], [-69.5452, 62.7448], [-70.2364, 62.7634], [-71.2538, 63.0424], [-73.4439, 64.4236], [-74.5124, 64.6702], [-75.0675, 64.4567], [-76.7239, 64.242], [-77.7912, 64.367], [-78.1745, 64.6178], [-78.0957, 64.9392], [-77.4474, 65.1618], [-77.3267, 65.4532], [-75.8283, 65.227], [-73.5607, 65.5429], [-74.434, 66.139], [-73.0333, 66.7283], [-72.2201, 67.2543], [-73.3283, 68.2668], [-74.648, 68.7076], [-74.9174, 68.9828], [-76.4034, 68.6923], [-75.7872, 69.3186], [-77.5917, 69.8455], [-77.7219, 70.1707], [-79.3033, 69.8948], [-81.0982, 70.0912], [-82.1387, 69.8413], [-83.0913, 70.004], [-83.8594, 69.9627], [-86.3219, 70.1454], [-86.6244, 70.4013], [-87.9006, 70.2519], [-88.8483, 70.5231], [-89.3655, 71.0671], [-88.0387, 70.9512], [-87.8724, 71.2085], [-89.0794, 71.2879], [-89.8457, 71.4923], [-90.0251, 71.9489], [-89.2631, 73.0691], [-87.7197, 73.7229], [-86.7687, 73.8341], [-85.1108, 73.8081], [-86.6293, 72.8709], [-86.036, 71.7709], [-85.0235, 71.3532], [-86.4735, 71.0427]]], [[[-79.8893, 73.7014], [-78.2866, 73.6659], [-77.2066, 73.4996], [-76.2895, 73.081], [-76.4005, 72.8207], [-77.836, 72.8968], [-79.5006, 72.7559], [-80.1833, 73.2246], [-80.8241, 73.3807], [-80.8492, 73.7211], [-79.8893, 73.7014]]], [[[-105.2006, 72.9474], [-106.9216, 73.4799], [-105.5123, 73.7657], [-104.583, 73.3538], [-105.2006, 72.9474]]], [[[-114.4977, 72.6258], [-113.5003, 72.6944], [-112.7539, 72.986], [-111.2698, 72.7137], [-108.6983, 72.4995], [-108.2105, 71.7511], [-107.306, 71.8947], [-107.6958, 72.1493], [-108.2382, 73.1059], [-107.72, 73.3289], [-106.4822, 73.1962], [-105.415, 72.7883], [-105.2342, 72.415], [-104.3495, 71.434], [-104.5696, 71.1039], [-103.9535, 70.7626], [-100.9732, 70.0295], [-100.9351, 69.7152], [-102.2343, 69.8422], [-102.9197, 69.5647], [-101.9755, 69.4069], [-101.857, 69.0239], [-103.4681, 68.8084], [-105.0195, 69.0813], [-106.1408, 69.1621], [-106.659, 69.4396], [-107.4399, 69.0021], [-108.946, 68.7597], [-111.3108, 68.542], [-113.1277, 68.4941], [-113.6168, 68.8385], [-113.6941, 69.195], [-115.1591, 69.2647], [-116.5135, 69.4247], [-117.1043, 69.8042], [-117.1353, 70.1001], [-114.5923, 70.3125], [-112.6378, 70.2253], [-112.1143, 70.4468], [-113.7573, 70.6907], [-115.991, 70.5864], [-117.5872, 70.6296], [-118.2642, 70.8882], [-117.8141, 71.1588], [-118.8683, 71.687], [-118.9446, 71.9855], [-118.2136, 72.2629], [-118.3745, 72.5339], [-117.5517, 72.8311], [-114.6382, 73.3727], [-114.1091, 72.8611], [-114.4977, 72.6258]]]] }, \"properties\": { \"name\": \"North America\", \"id\": \"northAmerica\" }, \"id\": \"northAmerica\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"MultiPolygon\", \"coordinates\": [[[[179.9991, -16.1686], [179.7483, -16.4464], [179.9281, -16.7443], [179.007, -16.9001], [178.805, -16.6315], [179.5517, -16.2498], [179.9991, -16.1686]]], [[[178.2804, -17.372], [178.5915, -17.6516], [178.6679, -18.0809], [177.8471, -18.2549], [177.3216, -18.0773], [177.2638, -17.8633], [177.6181, -17.4612], [178.2804, -17.372]]], [[[164.0598, -20.1414], [164.4358, -20.2821], [165.1918, -20.7691], [165.6627, -21.2671], [166.3033, -21.6373], [166.9425, -22.0901], [166.7742, -22.376], [166.096, -21.9565], [165.2419, -21.5255], [164.4549, -20.829], [164.1699, -20.4801], [164.0598, -20.1414]]], [[[173.2404, -34.899], [173.8441, -35.0264], [174.3204, -35.2466], [174.5437, -35.5822], [174.391, -35.7739], [174.802, -36.3093], [174.7226, -36.8411], [175.2996, -36.9933], [175.4608, -36.4757], [175.8762, -36.9578], [176.108, -37.645], [176.7698, -37.8895], [177.3358, -37.9907], [178.0091, -37.5548], [178.536, -37.692], [178.2679, -38.5509], [177.9763, -38.7223], [177.9656, -39.1426], [177.4077, -39.0809], [176.954, -39.3677], [177.1098, -39.6731], [176.8422, -40.1578], [175.9828, -41.2134], [175.3098, -41.6107], [175.1656, -41.4176], [174.6356, -41.2893], [175.1625, -40.6217], [175.2543, -40.2892], [175.0093, -39.9523], [173.9342, -39.5093], [173.8441, -39.1395], [174.5974, -38.7849], [174.7155, -38.2256], [174.9281, -37.8043], [174.7292, -37.4488], [174.782, -36.9436], [174.4758, -36.9418], [174.4469, -36.4509], [173.9453, -36.1761], [173.1166, -35.2053], [173.2404, -34.899]]], [[[137.5963, -35.7384], [137.4485, -36.0749], [136.7551, -36.0332], [136.6388, -35.7491], [137.334, -35.5924], [137.5963, -35.7384]]], [[[173.0686, -41.1859], [173.2306, -41.2844], [173.7376, -40.9888], [174.3026, -41.0194], [174.0922, -41.5055], [174.2831, -41.7407], [173.5449, -42.518], [173.2213, -42.9765], [172.7184, -43.2589], [172.9208, -43.8914], [172.3855, -43.8297], [171.4426, -44.136], [171.1133, -45.0393], [170.7005, -45.6843], [169.6866, -46.5516], [168.382, -46.6054], [168.1889, -46.3621], [167.682, -46.193], [166.7316, -46.1979], [166.7338, -45.5436], [167.1946, -44.9634], [167.7872, -44.595], [168.3665, -44.0818], [168.8064, -43.9922], [169.6613, -43.5913], [170.3027, -43.1075], [170.7417, -42.9273], [171.2571, -42.4652], [171.4861, -41.7949], [172.0108, -41.4447], [172.1396, -40.9471], [172.6407, -40.5183], [172.9892, -40.8481], [173.0686, -41.1859]]], [[[144.8184, -40.7216], [145.2832, -40.77], [146.3175, -41.1637], [146.99, -40.9923], [147.4547, -41.0017], [147.9687, -40.7797], [148.2928, -40.9471], [148.3017, -42.0399], [147.9244, -42.5726], [147.9807, -43.1572], [147.4081, -42.894], [146.8741, -43.6126], [145.9943, -43.376], [145.4874, -42.9268], [145.2681, -42.5442], [145.2384, -42.0195], [144.7776, -41.4189], [144.6458, -40.9808], [144.8184, -40.7216]]], [[[167.9559, -46.6946], [168.2409, -47.0701], [167.6292, -47.1425], [167.9559, -46.6946]]], [[[150.9952, -2.6885], [152.1795, -3.4102], [153.1241, -4.2523], [153.0233, -4.6664], [152.6807, -4.4986], [152.5985, -3.9948], [152.1924, -3.5057], [151.9731, -3.4533], [150.9681, -2.7799], [150.9952, -2.6885]]], [[[140.9761, -9.1187], [140.9752, -6.9054], [140.8625, -6.7399], [140.9748, -6.3461], [140.9743, -5.0398], [140.9735, -2.6099], [141.1856, -2.6276], [142.2115, -3.0835], [142.9053, -3.3206], [143.509, -3.4311], [144.0159, -3.7835], [144.4775, -3.8253], [145.0879, -4.3491], [145.3347, -4.3855], [145.767, -4.8231], [145.8527, -5.4712], [146.4036, -5.6164], [147.0344, -5.9191], [147.3766, -5.9506], [147.8018, -6.3151], [147.8453, -6.6626], [147.1191, -6.7217], [146.9607, -6.929], [147.1902, -7.3782], [147.7242, -7.8762], [148.1268, -8.1035], [148.2466, -8.5545], [148.5831, -9.0516], [149.2476, -9.0712], [149.2032, -9.4068], [149.7612, -9.8058], [149.8748, -10.0131], [150.6672, -10.2573], [150.4825, -10.6368], [150.0169, -10.5773], [149.7541, -10.3531], [148.3833, -10.1853], [147.7686, -10.0699], [146.6966, -9.0255], [146.0334, -8.0764], [144.9738, -7.8021], [144.5099, -7.5673], [143.6137, -8.2003], [143.0948, -8.3112], [143.3922, -8.8017], [143.366, -8.9611], [142.6474, -9.3277], [142.2297, -9.1697], [141.1333, -9.2212], [140.9761, -9.1187]]], [[[151.9158, -4.2967], [152.4055, -4.3406], [152.4001, -4.7312], [152.0135, -5.0038], [152.1431, -5.3571], [151.8652, -5.5649], [151.515, -5.5524], [151.2291, -5.92], [150.4284, -6.2764], [149.6524, -6.2906], [149.3825, -6.078], [149.1264, -6.1277], [148.4011, -5.7651], [148.3447, -5.5449], [148.999, -5.4845], [149.2454, -5.5729], [150.2987, -5.5356], [150.953, -5.4237], [151.3268, -4.9603], [151.6713, -4.8835], [151.5518, -4.3455], [151.9158, -4.2967]]], [[[155.9575, -6.687], [155.7191, -6.8628], [155.344, -6.7217], [155.202, -6.3075], [154.782, -5.9706], [154.7412, -5.5453], [154.9969, -5.54], [155.467, -6.145], [155.8225, -6.3803], [155.9575, -6.687]]], [[[159.8793, -8.5341], [158.944, -8.0409], [158.5969, -7.759], [158.7345, -7.6046], [159.1096, -7.9037], [159.8433, -8.3272], [159.8793, -8.5341]]], [[[160.7493, -8.3139], [160.9979, -8.6122], [161.2584, -9.3171], [160.8736, -9.1569], [160.5904, -8.3729], [160.7493, -8.3139]]], [[[159.7505, -9.2727], [159.9707, -9.4334], [160.3547, -9.4214], [160.6254, -9.5888], [160.6494, -9.9288], [159.8535, -9.7916], [159.6218, -9.5319], [159.7505, -9.2727]]], [[[161.7152, -10.3873], [162.1054, -10.4539], [162.1236, -10.8246], [161.5381, -10.5671], [161.7152, -10.3873]]], [[[143.1787, -11.9547], [143.1104, -12.3036], [143.4015, -12.6401], [143.5866, -13.4435], [143.5485, -13.7409], [143.7562, -14.3491], [143.9617, -14.4627], [144.4731, -14.2319], [144.648, -14.4924], [145.2876, -14.943], [145.2717, -15.4765], [145.4581, -16.0563], [145.4261, -16.4061], [145.902, -17.0701], [146.1257, -17.6352], [146.0325, -18.2731], [146.3335, -18.5536], [146.2971, -18.8412], [146.4813, -19.0787], [147.1387, -19.393], [147.4183, -19.3784], [147.9155, -19.8693], [148.7593, -20.2897], [148.6839, -20.5804], [149.205, -21.1251], [149.7039, -22.4408], [150.0763, -22.1647], [150.5415, -22.5593], [150.7639, -22.5762], [150.843, -23.4582], [151.5004, -24.0126], [151.9025, -24.2008], [152.1298, -24.5976], [152.4565, -24.8023], [152.6545, -25.2022], [152.9137, -25.4322], [153.1649, -25.9644], [153.0842, -26.304], [153.117, -27.1944], [153.5756, -28.2407], [153.6044, -28.8546], [153.3483, -29.2905], [153.2724, -29.8924], [153.0305, -30.5635], [152.9439, -31.4349], [152.5595, -32.0457], [152.4703, -32.439], [152.1644, -32.7573], [151.8129, -32.9011], [151.4839, -33.3476], [151.2314, -34.0295], [150.9601, -34.2971], [150.6903, -35.1778], [150.1953, -35.8334], [149.9605, -36.8455], [149.9325, -37.5287], [149.2987, -37.8021], [148.2626, -37.8309], [147.3957, -38.2189], [146.8568, -38.6632], [145.9353, -38.9016], [145.791, -38.6668], [144.6653, -38.21], [143.5392, -38.8208], [142.6123, -38.4515], [141.725, -38.2713], [141.4244, -38.3636], [141.0112, -38.0769], [140.6272, -38.0285], [139.7843, -37.2459], [139.8575, -36.6622], [139.5481, -36.0967], [139.0376, -35.6892], [138.1845, -35.6128], [138.5112, -35.0242], [138.4899, -34.7637], [138.0895, -34.1697], [137.6918, -35.1432], [136.8834, -35.2399], [137.0144, -34.9159], [137.3908, -34.9137], [137.4938, -34.1613], [137.9319, -33.5789], [137.8525, -33.2007], [137.4423, -33.1936], [137.2372, -33.6295], [136.4307, -34.0299], [135.6476, -34.9394], [135.1855, -33.9069], [134.7909, -33.3285], [134.3013, -33.1652], [134.1002, -32.7488], [134.2343, -32.5486], [133.5511, -32.1829], [133.212, -32.1838], [132.7575, -31.956], [132.2146, -32.0071], [131.7214, -31.6964], [131.1435, -31.4957], [130.783, -31.604], [130.1296, -31.5792], [128.9462, -31.7026], [128.0677, -32.0666], [127.3198, -32.2641], [125.9171, -32.2969], [124.759, -32.8829], [124.126, -33.1292], [123.6506, -33.8364], [123.2076, -33.9882], [122.7774, -33.891], [122.1511, -33.9917], [122.061, -33.8745], [121.4054, -33.8266], [120.4186, -33.9629], [119.854, -33.9749], [119.4505, -34.3681], [118.8952, -34.48], [118.1357, -34.9865], [117.5817, -35.0979], [116.5172, -34.9878], [115.9868, -34.7952], [115.7262, -34.5262], [115.0089, -34.2558], [115.1816, -33.6433], [115.5154, -33.5314], [115.6832, -33.1927], [115.6982, -31.6946], [115.1767, -30.8081], [114.9947, -30.2164], [114.9592, -29.4334], [114.5375, -28.5429], [114.165, -28.0809], [114.0283, -27.3471], [113.5818, -26.5583], [113.853, -26.3319], [113.5889, -26.0984], [113.5396, -25.6252], [114.2156, -26.2893], [114.2143, -25.8516], [113.671, -24.9772], [113.4175, -24.4356], [113.5529, -23.7329], [113.7571, -23.4182], [113.7953, -22.9144], [113.683, -22.6379], [113.9586, -21.9392], [114.1637, -22.3231], [114.3777, -22.3413], [114.6027, -21.9423], [114.8588, -21.7359], [115.4563, -21.4917], [116.0107, -21.0305], [116.7068, -20.6537], [117.4063, -20.7211], [118.1991, -20.3753], [118.7513, -20.2617], [119.1047, -19.9954], [119.5858, -20.0384], [120.1962, -19.9092], [120.8785, -19.6651], [121.4937, -19.1067], [121.8337, -18.4773], [122.2372, -17.9686], [122.1604, -17.3138], [122.7202, -16.7878], [122.9705, -16.4367], [123.1419, -16.8633], [123.5254, -17.4856], [123.778, -16.8677], [123.4903, -16.4908], [124.577, -16.1135], [124.3817, -15.758], [124.8389, -15.1609], [125.2433, -14.9448], [125.1789, -14.7148], [125.6814, -14.3881], [126.021, -14.4947], [126.1115, -14.1142], [126.5696, -14.1608], [126.9034, -13.744], [127.6727, -14.195], [128.1996, -14.7517], [129.4589, -14.9332], [129.7536, -14.7894], [129.3786, -14.3926], [129.7097, -13.9802], [129.8389, -13.5731], [130.2597, -13.3024], [130.1682, -12.9575], [130.3999, -12.688], [130.898, -12.5238], [131.0458, -12.1895], [131.4382, -12.277], [132.3722, -12.2392], [132.5839, -12.1101], [132.6829, -11.5055], [133.0247, -11.4527], [133.1854, -11.7057], [133.904, -11.8322], [134.2369, -12.008], [134.7301, -11.9844], [135.218, -12.2215], [135.7884, -11.9072], [136.0818, -12.4226], [136.5403, -11.9578], [136.9474, -12.3498], [136.5372, -12.7843], [136.5945, -13.0036], [135.9273, -13.3041], [135.9894, -13.8102], [135.8833, -14.1533], [135.4053, -14.7583], [135.5309, -15.0002], [136.2052, -15.4033], [136.7844, -15.8942], [137.002, -15.8783], [137.7037, -16.2329], [138.2449, -16.7181], [139.0097, -16.8992], [139.2485, -17.3285], [140.036, -17.7027], [140.5114, -17.6245], [140.8305, -17.4146], [141.2189, -16.6462], [141.412, -16.0696], [141.4515, -15.6053], [141.6255, -15.0566], [141.523, -14.4702], [141.5945, -14.1529], [141.4724, -13.7977], [141.6455, -13.2593], [141.6779, -12.4914], [141.9513, -11.8961], [142.1684, -10.9466], [142.4565, -10.7074], [142.8369, -11.3071], [142.8724, -11.8215], [143.1787, -11.9547]]], [[[130.6188, -11.3763], [131.2682, -11.1899], [131.5385, -11.4367], [130.9508, -11.9263], [130.645, -11.7425], [130.6188, -11.3763]]], [[[136.7148, -13.804], [136.8945, -14.2931], [136.3632, -14.2288], [136.4249, -13.8648], [136.7148, -13.804]]], [[[166.7458, -14.8267], [166.8102, -15.1574], [167.1316, -15.1352], [167.1995, -15.4859], [166.8257, -15.635], [166.6313, -15.406], [166.5274, -14.8502], [166.7458, -14.8267]]], [[[167.4126, -16.0958], [167.8365, -16.4496], [167.4494, -16.5552], [167.4126, -16.0958]]]] }, \"properties\": { \"name\": \"Oceania\", \"id\": \"oceania\" }, \"id\": \"oceania\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"MultiPolygon\", \"coordinates\": [[[[-59.7339, -80.3442], [-60.5828, -80.9484], [-64.2683, -80.7486], [-65.9801, -80.3846], [-62.5189, -80.3736], [-61.3432, -79.8866], [-59.7064, -79.8755], [-59.7339, -80.3442]]], [[[-159.053, -79.8076], [-161.8655, -79.7037], [-164.2259, -79.3206], [-163.2562, -78.7223], [-161.6431, -78.9012], [-159.6842, -79.4023], [-159.053, -79.8076]]], [[[-70.334, -79.6797], [-71.7836, -79.4445], [-70.544, -78.8838], [-67.4785, -78.3627], [-66.7281, -78.3836], [-69.2509, -79.2101], [-70.334, -79.6797]]], [[[-45.2226, -78.8106], [-43.722, -78.8186], [-42.9654, -79.4769], [-43.5278, -80.1916], [-49.1875, -80.643], [-49.773, -80.7842], [-54.1626, -80.8703], [-53.4823, -80.1889], [-52.2971, -80.1414], [-50.3391, -79.4796], [-50.7331, -79.2829], [-50.2197, -78.6051], [-49.0811, -78.0476], [-46.8257, -77.7852], [-45.5302, -77.8815], [-43.8086, -78.2864], [-43.9473, -78.5975], [-45.2226, -78.8106]]], [[[-120.5562, -73.756], [-120.2726, -73.9891], [-121.0625, -74.3375], [-122.8591, -74.3428], [-122.6247, -73.9655], [-123.1121, -73.6823], [-120.5562, -73.756]]], [[[-126.3299, -73.2864], [-124.9933, -73.8297], [-124.8731, -74.2083], [-127.4143, -73.5163], [-126.3299, -73.2864]]], [[[-74.3544, -73.0986], [-74.5748, -73.6113], [-75.9009, -73.3325], [-75.3769, -72.8203], [-74.3544, -73.0986]]], [[[-91.1608, -73.1821], [-91.6699, -72.6236], [-90.8072, -72.6108], [-91.1608, -73.1821]]], [[[-98.0911, -71.9125], [-96.8695, -71.8508], [-95.6095, -72.0683], [-96.0518, -72.5775], [-98.4078, -72.5477], [-100.1951, -72.2725], [-102.2647, -72.1354], [-102.128, -71.9853], [-98.6155, -71.7638], [-98.0911, -71.9125]]], [[[-73.7067, -70.635], [-74.205, -70.924], [-76.1763, -71.1326], [-76.5004, -70.9413], [-75.0076, -70.6088], [-73.7067, -70.635]]], [[[-74.9871, -69.7277], [-74.8489, -70.1791], [-75.7267, -70.0961], [-74.9871, -69.7277]]], [[[-70.0511, -69.1892], [-69.417, -69.5834], [-68.3361, -70.8561], [-68.2411, -71.822], [-69.2092, -72.5344], [-72.3675, -72.6698], [-73.0864, -72.4079], [-71.1066, -72.047], [-72.4121, -71.6622], [-73.8994, -72.1522], [-75.3531, -71.8783], [-75.2925, -71.6151], [-74.1872, -71.383], [-72.6216, -71.3883], [-71.1941, -70.9848], [-71.0611, -70.5369], [-70.328, -70.3611], [-71.8537, -69.9692], [-71.869, -68.9411], [-70.417, -68.7889], [-70.0511, -69.1892]]], [[[-67.9885, -67.4745], [-68.5804, -67.7328], [-69.0825, -67.403], [-68.3359, -66.802], [-67.6878, -67.1473], [-67.9885, -67.4745]]], [[[-57.0206, -63.3729], [-58.2631, -63.7636], [-58.8954, -64.389], [-59.9632, -64.4312], [-61.0598, -64.9812], [-61.7361, -65.0335], [-62.1453, -65.3318], [-62.3051, -65.8405], [-61.8754, -66.296], [-63.7525, -66.2778], [-64.0778, -66.6542], [-64.6862, -66.8064], [-64.8193, -67.3076], [-65.4432, -67.3262], [-65.6394, -68.1306], [-64.8984, -68.6734], [-63.3436, -68.8106], [-63.4559, -69.0419], [-62.4505, -69.5843], [-61.9611, -70.1201], [-61.9611, -70.9005], [-61.0172, -71.1668], [-61.2136, -71.5641], [-60.7193, -72.0728], [-60.3846, -73.0072], [-61.4054, -73.467], [-60.8789, -73.6122], [-61.0107, -74.4782], [-62.2257, -74.5057], [-63.9247, -75.0047], [-63.3634, -75.4517], [-66.3705, -76.0132], [-69.3044, -76.3506], [-70.0954, -76.6546], [-71.7987, -76.7527], [-75.2683, -76.5814], [-77.19, -76.6298], [-76.2487, -77.2747], [-75.3869, -77.474], [-72.852, -77.5903], [-73.2515, -77.8944], [-74.812, -78.1776], [-80.6015, -77.7519], [-81.4411, -77.8855], [-77.4325, -78.4346], [-77.8691, -78.7454], [-80.2923, -78.8226], [-83.246, -78.3569], [-83.26, -78.7742], [-80.1512, -79.2683], [-76.499, -79.3255], [-76.5578, -79.9035], [-75.2366, -80.8028], [-73.0296, -80.9173], [-70.239, -80.8565], [-64.7501, -81.5219], [-64.1371, -81.8695], [-65.9133, -82.1833], [-62.7357, -82.5273], [-61.5898, -83.3414], [-59.5159, -83.4586], [-57.3535, -82.8403], [-53.9862, -82.2006], [-48.3607, -81.8921], [-43.6692, -82.2699], [-41.4338, -81.2977], [-38.7718, -80.8823], [-37.2093, -81.0638], [-35.3269, -80.6505], [-29.3291, -80.172], [-24.2403, -80.0619], [-25.2586, -79.7623], [-29.9494, -79.599], [-30.3161, -79.1631], [-32.9943, -79.2288], [-36.2391, -78.7742], [-36.181, -78.4684], [-34.0758, -77.4252], [-32.0634, -77.1598], [-28.9336, -76.3701], [-26.0594, -75.9573], [-24.2696, -75.7668], [-19.4931, -75.54], [-17.2989, -74.334], [-15.6725, -74.4072], [-15.7488, -73.9456], [-16.5188, -73.6441], [-15.5959, -73.0968], [-14.3211, -73.123], [-14.2978, -72.7328], [-13.2087, -72.7852], [-11.497, -72.4128], [-10.8254, -71.5534], [-9.8879, -71.0274], [-9.2307, -71.1739], [-8.6466, -71.6728], [-7.7137, -71.5463], [-7.8735, -70.9404], [-5.9364, -70.7127], [-5.5879, -70.8569], [-5.9499, -71.3417], [-2.8121, -71.3208], [-0.8958, -71.3492], [-0.5431, -71.7128], [0.835, -71.2023], [2.6096, -70.9], [5.1132, -70.6559], [8.5232, -70.4739], [9.1415, -70.1836], [10.2175, -70.5081], [11.7014, -70.7664], [12.9292, -70.2133], [13.8228, -70.3434], [15.807, -70.3238], [18.1246, -70.5405], [19.1966, -70.2932], [19.2649, -70.9022], [21.0707, -70.8436], [21.705, -70.2586], [22.979, -70.8103], [23.8037, -70.4046], [24.7567, -70.892], [25.9743, -71.0372], [27.207, -70.9111], [30.0035, -70.2999], [31.3787, -70.2257], [32.6212, -70.0007], [32.9892, -69.6243], [32.5675, -69.0743], [33.1214, -68.689], [34.193, -68.7023], [35.2246, -69.6371], [37.5599, -69.7184], [38.8592, -70.006], [39.7053, -69.4258], [39.8637, -68.9669], [41.1328, -68.5749], [42.409, -68.3521], [42.8196, -68.123], [44.6999, -67.9042], [44.9893, -67.7692], [47.1174, -67.5726], [48.6479, -67.7941], [48.7136, -67.217], [49.2472, -66.9414], [50.6059, -67.15], [50.3325, -66.4447], [51.8843, -66.0199], [53.6719, -65.8587], [54.9481, -65.9164], [55.7102, -66.0798], [57.1853, -66.6133], [56.4533, -66.7798], [56.8919, -67.0563], [57.6274, -67.0142], [58.7376, -67.2295], [59.2507, -67.4851], [60.4821, -67.3853], [62.6878, -67.6476], [63.6989, -67.5082], [68.3279, -67.8895], [69.4163, -67.743], [69.9822, -68.4644], [69.5344, -68.7369], [69.6293, -69.2314], [68.9062, -69.3726], [69.0825, -69.8666], [68.1783, -69.8373], [67.2678, -70.2732], [67.9408, -70.4228], [69.2503, -70.4313], [68.8725, -71.0354], [68.0375, -71.391], [67.4321, -72.0031], [66.8919, -72.9486], [67.9714, -73.0857], [68.4197, -72.5149], [69.5548, -72.3746], [71.2766, -71.624], [71.9047, -70.7069], [72.7601, -70.3957], [72.8223, -70.0961], [73.9422, -69.7432], [75.4239, -69.8933], [75.8913, -69.5754], [77.8174, -69.069], [78.7265, -68.2779], [79.288, -68.1195], [82.017, -67.6902], [83.3043, -67.6032], [84.4851, -67.1145], [85.7107, -67.1611], [87.9803, -66.7882], [89.6986, -66.8229], [92.0734, -66.5077], [93.9644, -66.6897], [94.8397, -66.5015], [95.5411, -66.6311], [98.2577, -66.4673], [99.3701, -66.6484], [100.8891, -66.3581], [101.4746, -65.9511], [102.674, -65.8654], [103.9511, -65.9879], [108.1578, -66.6391], [109.4629, -66.9085], [110.6223, -66.5241], [110.9069, -66.0767], [113.0992, -65.8001], [113.7096, -65.9297], [114.3368, -66.3603], [115.3103, -66.561], [115.2739, -67.0279], [113.991, -67.2117], [114.0265, -67.4412], [116.7134, -67.047], [118.1388, -67.0825], [119.1331, -67.3706], [121.4875, -67.0905], [122.1826, -66.8593], [123.9693, -66.608], [124.5978, -66.7083], [125.8656, -66.3643], [126.6646, -66.4975], [127.5413, -67.051], [129.2369, -67.0417], [129.7412, -66.4686], [130.9517, -66.1912], [131.831, -66.2356], [133.4446, -66.0816], [134.9716, -66.3301], [135.352, -66.1273], [136.1941, -66.2924], [137.7539, -66.4065], [139.9001, -66.715], [141.9726, -66.8069], [142.8884, -67], [143.4481, -66.877], [144.6214, -67.1416], [143.9422, -67.7941], [145.9752, -67.6241], [146.8279, -67.9645], [147.0938, -68.3685], [148.4561, -68.467], [151.068, -68.3849], [151.562, -68.6939], [153.0819, -68.8568], [154.1997, -68.4178], [155.5202, -69.0246], [157.4813, -69.3087], [158.1578, -69.2088], [159.7838, -69.5217], [160.2095, -69.9749], [161.0369, -70.3172], [161.4244, -70.8268], [162.6749, -70.3047], [163.3487, -70.6208], [164.4034, -70.5103], [166.6269, -70.6643], [167.5692, -70.8103], [168.1725, -71.1832], [170.1625, -71.6307], [169.8287, -72.7288], [169.545, -73.0502], [167.6158, -73.337], [164.7758, -74.0286], [165.3027, -74.5936], [163.1672, -74.6021], [162.5337, -75.1671], [161.6797, -75.2177], [162.8156, -75.8463], [162.7628, -76.7456], [164.4296, -78.0422], [166.2087, -78.4515], [164.6347, -78.6033], [160.4829, -79.2017], [160.542, -80.425], [160.9078, -81.3901], [162.8214, -81.8664], [167.2328, -82.9521], [168.1099, -83.3618], [171.9172, -83.6441], [179.403, -84.2061], [180, -84.3517], [180, -89.9989], [-180, -89.9989], [-180, -89.583], [-180, -89.2931], [-180, -88.5869], [-180, -87.8811], [-180, -87.1753], [-180, -86.4695], [-180, -85.7633], [-180, -85.0575], [-180, -84.3517], [-171.7037, -84.5426], [-162.9335, -84.9012], [-157.1276, -85.1858], [-156.9864, -84.8111], [-163.5685, -84.5288], [-164.951, -83.8057], [-167.5528, -83.8111], [-169.1677, -83.4497], [-174.0661, -82.9002], [-171.8213, -82.8474], [-168.4178, -83.2287], [-163.111, -83.329], [-159.4445, -83.5434], [-157.6796, -83.1292], [-155.4594, -82.9805], [-153.0098, -82.4496], [-154.7175, -81.9409], [-153.9566, -81.7003], [-157.0326, -81.319], [-156.5283, -81.1623], [-148.1228, -80.9009], [-150.5755, -80.3536], [-148.3172, -80.0708], [-148.1765, -79.7761], [-152.0914, -79.2416], [-155.21, -78.9646], [-156.4693, -78.6353], [-154.7164, -78.3982], [-155.3416, -78.1918], [-157.2667, -78.1998], [-158.5003, -77.7786], [-158.2136, -77.1571], [-154.8149, -77.1269], [-153.4606, -77.4159], [-151.719, -77.4261], [-149.7177, -77.7976], [-145.967, -77.0688], [-145.7504, -76.7492], [-147.3404, -76.4384], [-146.383, -76.0998], [-143.5742, -75.5635], [-142.3298, -75.4907], [-141.5057, -75.6905], [-139.6911, -75.2129], [-137.6181, -75.0757], [-136.5494, -75.1396], [-135.362, -74.6904], [-133.4748, -74.852], [-132.0495, -74.7659], [-129.7907, -74.8915], [-127.8633, -74.7193], [-123.8894, -74.773], [-119.6771, -74.6544], [-118.3421, -74.3815], [-115.1052, -74.4551], [-114.7909, -73.9886], [-113.5085, -74.0889], [-113.9318, -74.982], [-111.6963, -74.7921], [-111.8064, -74.2696], [-110.307, -74.3668], [-110.3005, -74.7108], [-111.4631, -75.1334], [-109.2722, -75.1849], [-106.6189, -75.3438], [-104.9019, -75.1152], [-101.7081, -75.1272], [-101.0394, -75.4219], [-98.5578, -75.1898], [-101.2518, -74.4858], [-101.7154, -74.0237], [-102.7663, -73.8838], [-102.4108, -73.6166], [-100.9854, -73.7573], [-99.7812, -73.7201], [-100.0209, -73.4027], [-102.6751, -73.321], [-102.4092, -72.9876], [-98.0125, -73.0334], [-96.1521, -73.3095], [-94.2463, -73.313], [-92.241, -73.1785], [-90.9209, -73.3192], [-90.2954, -72.9779], [-88.1945, -72.8585], [-88.4193, -73.2291], [-87.0379, -73.3538], [-85.9808, -73.2087], [-84.9811, -73.5021], [-82.1835, -73.8568], [-81.3088, -73.7383], [-81.2624, -73.3148], [-80.4421, -72.9446], [-79.5217, -73.0897], [-78.4078, -73.5558], [-76.8506, -73.4604], [-77.1349, -73.8177], [-75.293, -73.6388], [-73.9961, -73.6996], [-72.9293, -73.4479], [-68.821, -73.1053], [-67.6671, -72.8345], [-66.8277, -72.0905], [-67.4603, -71.5268], [-67.8884, -70.4215], [-68.4033, -70.0198], [-68.7078, -69.4321], [-67.3717, -69.4125], [-66.9749, -69.1608], [-67.3906, -68.8612], [-66.7933, -68.2402], [-67.1498, -68.0245], [-66.705, -67.5273], [-67.5859, -67.435], [-67.4934, -67.1127], [-66.371, -66.6089], [-65.7664, -66.6249], [-65.6172, -66.1353], [-64.0658, -65.5538], [-64.0381, -65.1791], [-62.5761, -64.7557], [-61.6317, -64.6047], [-60.8643, -64.0734], [-59.5102, -63.8208], [-58.8721, -63.5518], [-57.3897, -63.2264], [-57.0206, -63.3729]]]] }, \"properties\": { \"name\": \"Antarctica\", \"id\": \"antarctica\" }, \"id\": \"antarctica\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"MultiPolygon\", \"coordinates\": [[[[-77.9011, 7.2294], [-77.7439, 7.537], [-77.3509, 7.7057], [-77.2124, 8.0338], [-77.4072, 8.427], [-77.3742, 8.6583], [-76.8519, 8.0906], [-76.8879, 8.6197], [-76.2769, 8.9886], [-76.1355, 9.2656], [-75.6394, 9.4502], [-75.6709, 10.1964], [-75.4459, 10.611], [-74.8446, 11.1095], [-74.4545, 10.9892], [-74.0594, 11.3408], [-73.3137, 11.2959], [-72.7219, 11.7127], [-72.2749, 11.889], [-72.1358, 12.1886], [-71.7145, 12.4199], [-71.2622, 12.3351], [-71.1375, 12.0461], [-71.4886, 11.7189], [-71.8686, 11.6275], [-71.9469, 11.4144], [-71.5942, 10.6572], [-72.1129, 9.8155], [-71.7607, 9.3357], [-71.687, 9.0725], [-71.2979, 9.1257], [-71.0858, 9.3481], [-71.0527, 9.7059], [-71.3867, 10.2639], [-71.5445, 10.7788], [-71.4695, 10.9643], [-70.2326, 11.3732], [-70.2865, 11.8859], [-70.004, 12.1779], [-69.6316, 11.4801], [-68.8279, 11.4317], [-68.3987, 11.161], [-68.234, 10.5693], [-67.8715, 10.4721], [-66.9891, 10.6105], [-66.2471, 10.6323], [-65.8518, 10.2577], [-65.1292, 10.0699], [-64.8504, 10.0979], [-63.8734, 10.6638], [-63.4968, 10.6434], [-62.7024, 10.7499], [-62.8429, 10.4179], [-62.5151, 10.176], [-62.3204, 9.7831], [-62.1196, 9.9847], [-60.7923, 9.3605], [-61.0534, 9.0951], [-61.3039, 8.4102], [-60.801, 8.5926], [-60.3402, 8.6286], [-59.9807, 8.5327], [-59.2003, 8.0746], [-58.6266, 7.5459], [-58.4808, 7.0381], [-57.9825, 6.786], [-56.9698, 5.9927], [-55.9395, 5.7957], [-55.8283, 5.9617], [-54.834, 5.9883], [-53.8472, 5.7823], [-53.4544, 5.5635], [-52.8993, 5.425], [-52.2905, 4.942], [-51.6659, 4.2287], [-51.2198, 4.0938], [-51.0525, 3.2819], [-50.6592, 2.1309], [-50.459, 1.8295], [-49.9572, 1.6599], [-49.8988, 1.1628], [-50.2945, 0.8356], [-50.8163, 0.1724], [-51.2828, -0.085], [-51.7025, -0.7624], [-51.9476, -1.5867], [-51.2975, -1.2236], [-50.9177, -1.1153], [-50.69, -1.7616], [-50.4033, -2.0155], [-49.9993, -1.8317], [-49.7195, -1.9263], [-49.3137, -1.7319], [-48.9913, -1.83], [-48.71, -1.4877], [-48.4459, -1.5206], [-48.4497, -1.1455], [-48.115, -0.7376], [-47.3981, -0.6266], [-46.8113, -0.7797], [-46.6173, -0.9706], [-46.2191, -1.0314], [-45.6447, -1.3479], [-45.0763, -1.4664], [-44.6513, -1.7456], [-44.3084, -2.5353], [-43.9329, -2.5833], [-42.9368, -2.4652], [-42.2496, -2.7919], [-41.8761, -2.7466], [-41.3181, -2.9361], [-40.4745, -2.7954], [-39.9647, -2.8616], [-38.4757, -3.7174], [-38.0489, -4.2163], [-37.1746, -4.9124], [-36.5907, -5.0975], [-35.9799, -5.0544], [-35.5493, -5.1294], [-35.2357, -5.5667], [-34.9882, -6.3936], [-34.8056, -7.2885], [-34.8346, -7.9717], [-35.1578, -8.9305], [-35.3409, -9.2305], [-36.3983, -10.4841], [-36.9378, -10.8206], [-37.4119, -11.4971], [-37.6887, -12.0999], [-38.2397, -12.8443], [-38.7879, -12.7826], [-38.8352, -13.147], [-39.0894, -13.5882], [-38.9422, -14.0308], [-39.0596, -14.6549], [-38.8805, -15.8645], [-39.1251, -16.7634], [-39.2152, -17.3156], [-39.1539, -17.704], [-39.4869, -17.9903], [-39.7399, -18.6397], [-39.6999, -19.278], [-40.0013, -19.7419], [-40.3959, -20.5693], [-40.7892, -20.9062], [-41.0471, -21.5059], [-40.9879, -21.9201], [-41.1228, -22.0843], [-41.7054, -22.3098], [-41.9806, -22.5806], [-42.0423, -22.9472], [-42.9583, -22.9672], [-43.5327, -23.0462], [-43.8661, -22.9104], [-44.6373, -23.0556], [-44.9516, -23.3814], [-45.4232, -23.6854], [-45.9721, -23.796], [-46.8672, -24.2363], [-47.8766, -24.9976], [-48.5451, -25.8161], [-48.6776, -26.703], [-48.5542, -27.1962], [-48.6208, -28.0755], [-48.7997, -28.5754], [-49.2713, -28.871], [-49.7461, -29.3633], [-50.0333, -29.8009], [-50.2994, -30.4259], [-51.1572, -30.3642], [-51.4637, -31.0527], [-51.9724, -31.3839], [-52.1935, -31.8855], [-52.1273, -32.1678], [-52.3417, -32.4399], [-52.6523, -33.1377], [-53.4195, -33.7791], [-53.7853, -34.3806], [-54.1686, -34.6709], [-54.9023, -34.9328], [-55.6732, -34.7756], [-56.1179, -34.9079], [-56.8555, -34.6766], [-57.1706, -34.4525], [-57.8291, -34.4773], [-58.4002, -33.9123], [-58.5258, -34.2962], [-58.2835, -34.6838], [-57.3036, -35.1885], [-57.1589, -35.5058], [-57.354, -35.7202], [-57.265, -36.1442], [-56.6981, -36.4265], [-56.6721, -36.8513], [-57.3957, -37.7448], [-57.547, -38.0857], [-58.1792, -38.436], [-59.8282, -38.8381], [-61.1122, -38.9931], [-62.067, -38.9189], [-62.3382, -39.1506], [-62.0537, -39.3739], [-62.2869, -39.8955], [-62.395, -40.8907], [-62.959, -41.1095], [-63.7731, -41.1499], [-64.8533, -40.8139], [-65.1334, -40.8805], [-65.0182, -41.5667], [-65.059, -41.9698], [-64.4205, -42.4337], [-63.596, -42.4066], [-63.6925, -42.8052], [-64.1306, -42.8616], [-64.3246, -42.5722], [-64.6504, -42.5313], [-65.0269, -42.759], [-64.4323, -43.0591], [-64.9858, -43.2935], [-65.2836, -43.63], [-65.3613, -44.4773], [-65.6476, -44.6616], [-65.6388, -45.0078], [-66.1901, -44.9647], [-66.9416, -45.2573], [-67.5568, -45.9701], [-67.5633, -46.3452], [-66.7769, -47.0057], [-65.9985, -47.0936], [-65.7382, -47.3449], [-65.8101, -47.941], [-66.3934, -48.3423], [-67.033, -48.6277], [-67.6849, -49.2465], [-67.7834, -49.8591], [-68.9398, -50.3824], [-69.2352, -50.9506], [-69.0325, -51.6364], [-68.3938, -52.3072], [-69.2409, -52.2055], [-69.5605, -52.4217], [-70.795, -52.7688], [-70.9959, -53.7791], [-71.2977, -53.8834], [-72.1744, -53.6322], [-71.8528, -53.2855], [-71.4005, -53.107], [-71.3878, -52.7644], [-72.4583, -53.2544], [-73.0526, -53.2433], [-74.0146, -52.6392], [-73.8343, -52.2339], [-73.5183, -52.0408], [-73.9733, -51.7847], [-73.8958, -51.3315], [-74.8147, -51.0629], [-75.0948, -50.6812], [-74.3337, -49.9745], [-74.341, -48.5958], [-74.5772, -48.2744], [-74.6549, -47.7022], [-74.1584, -47.1824], [-74.1519, -46.9742], [-75.6567, -46.6102], [-74.9245, -46.1597], [-75.0666, -45.8752], [-74.1579, -45.7673], [-74.0379, -45.4175], [-73.5498, -45.4836], [-73.3625, -44.9781], [-72.739, -44.7344], [-72.6638, -44.4365], [-73.2651, -44.1688], [-72.9965, -43.6317], [-73.101, -43.4551], [-72.878, -43.048], [-72.7854, -42.3014], [-72.4996, -41.9809], [-72.6698, -41.6595], [-73.0149, -41.5441], [-73.5214, -41.7971], [-73.8108, -41.5175], [-73.966, -41.1184], [-73.6694, -40.0824], [-73.4104, -39.789], [-73.2264, -39.2243], [-73.5327, -38.3667], [-73.4648, -38.0405], [-73.6619, -37.6987], [-73.6017, -37.1886], [-73.216, -37.1669], [-73.1181, -36.6884], [-72.8746, -36.3905], [-72.6238, -35.5857], [-72.2237, -35.0961], [-72.0028, -34.1653], [-71.6646, -33.6526], [-71.7429, -33.0951], [-71.4522, -32.6596], [-71.5259, -31.806], [-71.6619, -31.1695], [-71.6695, -30.3305], [-71.4007, -30.1432], [-71.3157, -29.6496], [-71.5192, -28.9265], [-71.1863, -28.3778], [-71.0527, -27.7275], [-70.6465, -26.3293], [-70.7138, -25.7842], [-70.4454, -25.1725], [-70.5742, -24.6442], [-70.4878, -23.7818], [-70.5633, -23.0569], [-70.3316, -22.8487], [-70.0874, -21.4931], [-70.1971, -20.7256], [-70.1485, -19.8049], [-70.2759, -19.2683], [-70.3616, -18.3978], [-71.337, -17.6827], [-71.5325, -17.2943], [-72.1114, -17.0026], [-72.4676, -16.7079], [-72.7939, -16.6147], [-73.825, -16.153], [-74.1473, -15.9124], [-75.1043, -15.4117], [-75.5336, -14.899], [-75.934, -14.6336], [-76.2891, -14.1333], [-76.1839, -13.5154], [-76.8322, -12.3489], [-77.1527, -12.0603], [-77.2204, -11.6635], [-77.6332, -11.288], [-77.7362, -10.8365], [-78.1856, -10.089], [-78.7624, -8.6171], [-79.0123, -8.21], [-79.3774, -7.8354], [-79.7621, -7.0666], [-80.1103, -6.6497], [-80.8117, -6.2822], [-81.1805, -5.9426], [-80.8827, -5.7589], [-81.1084, -5.0278], [-81.3366, -4.6695], [-81.2833, -4.3224], [-80.7986, -3.7312], [-80.0266, -3.2282], [-79.7299, -2.5793], [-80.1272, -2.5282], [-80.4501, -2.6259], [-80.9628, -2.1891], [-80.7704, -2.0768], [-80.8014, -1.383], [-80.9024, -1.0789], [-80.554, -0.8481], [-80.4823, -0.3682], [-80.1334, -0.006], [-80.0251, 0.4104], [-80.0883, 0.7846], [-79.7412, 0.9799], [-78.8996, 1.2063], [-78.7931, 1.8486], [-78.6171, 2.3067], [-78.1201, 2.4882], [-77.67, 2.8788], [-77.2428, 3.5855], [-77.1666, 3.8621], [-77.4272, 4.0605], [-77.2863, 4.7219], [-77.4017, 5.4161], [-77.2492, 5.7801], [-77.4694, 6.177], [-77.36, 6.5045], [-77.9011, 7.2294]]], [[[-91.3057, 0.0912], [-90.7997, -0.7522], [-90.9055, -0.9404], [-91.3716, -1.0172], [-91.4582, -0.7997], [-91.1448, -0.623], [-91.3692, -0.287], [-91.3057, 0.0912]]], [[[-50.2481, -0.1165], [-49.6287, -0.2293], [-49.1169, -0.1636], [-48.3798, -0.3527], [-48.5396, -0.801], [-48.9289, -1.4824], [-49.5878, -1.7123], [-50.5076, -1.7878], [-50.7597, -1.2405], [-50.7713, -0.6452], [-50.6454, -0.2728], [-50.2481, -0.1165]]], [[[-51.6377, -1.3421], [-51.6784, -0.8552], [-51.5461, -0.6497], [-51.1608, -0.6665], [-51.2764, -1.0216], [-51.6377, -1.3421]]], [[[-73.7735, -43.3459], [-74.355, -43.2637], [-74.2094, -42.8789], [-74.037, -41.7953], [-73.5278, -41.8961], [-73.4708, -42.4665], [-73.7893, -42.5859], [-73.4364, -42.9366], [-73.7735, -43.3459]]], [[[-73.7354, -44.3948], [-73.9833, -44.4947], [-73.7271, -45.1192], [-74.0991, -45.3252], [-74.6178, -44.6478], [-74.5017, -44.4733], [-73.7354, -44.3948]]], [[[-72.8971, -44.7122], [-73.445, -44.6411], [-73.2078, -44.3349], [-72.8425, -44.4578], [-72.8971, -44.7122]]], [[[-74.6183, -48.4253], [-74.923, -48.6264], [-75.2128, -48.1417], [-74.7292, -48.1261], [-74.6183, -48.4253]]], [[[-74.5306, -48.8124], [-74.4589, -49.6913], [-74.5699, -49.9909], [-75.3001, -49.8475], [-75.1842, -49.0836], [-74.7934, -48.705], [-74.5306, -48.8124]]], [[[-58.8501, -51.2698], [-58.4737, -51.509], [-57.9767, -51.3843], [-57.8382, -51.7092], [-58.6834, -51.9361], [-59.068, -52.1731], [-59.5708, -51.9254], [-59.0596, -51.6857], [-58.8501, -51.2698]]], [[[-60.4454, -51.3994], [-60.1416, -51.4811], [-59.268, -51.4274], [-59.9214, -51.9694], [-60.4454, -51.3994]]], [[[-69.4141, -52.4865], [-68.7897, -52.5766], [-68.2781, -52.9841], [-68.0085, -53.5638], [-67.2943, -54.0499], [-65.346, -54.8777], [-66.5112, -55.0322], [-66.9305, -54.9248], [-68.3316, -54.8165], [-69.0816, -54.9097], [-69.7235, -54.7122], [-70.4972, -54.8094], [-71.4409, -54.6198], [-70.8982, -54.338], [-70.8678, -53.8843], [-70.0903, -53.4182], [-70.4603, -53.206], [-69.4141, -52.4865]]], [[[-72.9472, -53.4426], [-72.2055, -53.8075], [-73.3048, -53.9438], [-73.6865, -53.4266], [-72.9472, -53.4426]]], [[[-69.8846, -54.8822], [-68.9007, -55.0176], [-68.2826, -55.255], [-68.2932, -55.5214], [-69.4118, -55.4441], [-69.9798, -55.1476], [-69.8846, -54.8822]]], [[[-67.0854, -55.1152], [-67.7679, -55.2595], [-68.107, -54.9292], [-67.2452, -54.9776], [-67.0854, -55.1152]]]] }, \"properties\": { \"name\": \"South America\", \"id\": \"southAmerica\" }, \"id\": \"southAmerica\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"MultiPolygon\", \"coordinates\": [[[[54.719, 81.1159], [57.694, 80.7923], [55.7124, 80.6372], [54.0665, 80.8136], [54.719, 81.1159]]], [[[62.168, 80.8347], [61.0511, 80.4186], [59.3044, 80.5216], [59.5921, 80.8165], [62.168, 80.8347]]], [[[20.898, 80.2499], [22.4507, 80.4021], [26.8608, 80.16], [27.1986, 79.9065], [25.641, 79.4029], [23.9475, 79.1943], [20.8612, 79.3978], [18.7251, 79.7607], [18.3438, 80.0595], [20.898, 80.2499]]], [[[16.7867, 79.9068], [18.5813, 79.5716], [19.0896, 79.1573], [20.4581, 79.1293], [21.3889, 78.7404], [19.7687, 78.6228], [18.4393, 78.0251], [18.228, 77.5226], [17.6234, 77.3994], [16.7006, 76.5793], [14.3657, 77.2345], [14.921, 77.6889], [13.6808, 78.028], [11.7738, 78.7165], [10.866, 79.7965], [12.7535, 79.7758], [13.3838, 79.4808], [15.8163, 79.6819], [16.7867, 79.9068]]], [[[21.6082, 78.5957], [23.1166, 77.9916], [24.2383, 77.8986], [23.8414, 77.4978], [22.057, 77.5011], [21.6082, 77.9161], [20.2282, 78.4779], [21.6082, 78.5957]]], [[[67.7654, 76.2376], [66.2824, 75.9836], [61.3561, 75.3149], [60.2224, 74.7965], [58.5347, 74.499], [58.4415, 74.1288], [56.9638, 73.3665], [55.0067, 73.4539], [54.3, 73.3509], [53.7629, 73.7662], [54.6427, 73.9595], [55.5824, 74.6278], [56.4986, 74.9571], [57.0876, 75.3837], [58.8814, 75.8547], [61.0538, 76.1199], [62.9714, 76.2367], [65.8629, 76.6133], [67.5351, 77.0077], [68.4859, 76.9338], [68.9, 76.5729], [67.7654, 76.2376]]], [[[55.32, 73.3083], [56.4293, 73.2011], [56.0835, 72.7894], [55.356, 72.4651], [55.2979, 71.9354], [56.0431, 71.3456], [56.895, 70.927], [57.1458, 70.5892], [54.6014, 70.68], [53.7225, 70.8145], [53.3638, 71.5416], [51.8124, 71.4912], [51.5825, 72.0712], [52.6221, 72.3009], [53.7531, 73.2932], [55.32, 73.3083]]], [[[67.8751, 68.4763], [68.2688, 67.2858], [67.5444, 66.7227], [66.2021, 66.1716], [64.8011, 65.7162], [63.0824, 64.9054], [61.2167, 64.2824], [60.5424, 61.0083], [60.0644, 59.4402], [59.4318, 58.5187], [58.7984, 57.8522], [58.0265, 57.3293], [57.8276, 56.859], [58.58, 56.5143], [58.6901, 56.0873], [58.0984, 55.5504], [56.084, 55.3471], [56.9735, 54.4686], [57.6207, 53.983], [58.9546, 54.5315], [59.6294, 54.3086], [59.8828, 53.9417], [59.4083, 53.6477], [59.0052, 53.1794], [59.0372, 52.607], [59.707, 52.4616], [60.1789, 52.009], [60.0657, 51.9766], [60.4648, 51.6513], [61.3632, 51.442], [61.5851, 51.23], [61.3894, 50.8609], [60.6379, 50.6638], [59.9552, 50.7992], [59.8122, 50.5819], [58.8836, 50.6945], [58.3594, 51.0638], [57.8387, 51.0917], [57.4423, 50.8889], [57.0117, 51.0651], [56.4915, 51.0196], [55.7977, 50.6021], [55.5424, 50.6017], [54.727, 50.9981], [54.4216, 50.7803], [54.0416, 51.1153], [53.3381, 51.4824], [52.571, 51.4817], [52.3309, 51.6812], [51.6091, 51.4839], [50.7941, 51.7292], [50.2468, 51.2895], [49.498, 51.0835], [48.8086, 50.6012], [48.8432, 50.0131], [48.4344, 49.8284], [47.706, 50.378], [47.3264, 50.2734], [46.9917, 49.8526], [46.8022, 49.367], [47.0144, 49.0987], [46.7028, 48.8055], [46.661, 48.4124], [47.0042, 48.2846], [47.0934, 47.9476], [48.1099, 47.7452], [48.9595, 46.7744], [48.6102, 46.5663], [49.2321, 46.3372], [48.1592, 45.7371], [47.5244, 45.6017], [47.1147, 44.9061], [46.7552, 44.6566], [46.7529, 44.4205], [47.2301, 44.1923], [47.5089, 43.5096], [47.4632, 43.0351], [48.228, 42.181], [49.1064, 41.3017], [49.2263, 41.026], [49.7758, 40.5839], [50.3067, 40.4121], [49.5512, 40.1942], [49.3244, 39.6082], [49.363, 39.3495], [49.0137, 39.1346], [48.8508, 38.8155], [48.8685, 38.4355], [48.5929, 38.4111], [48.0234, 38.819], [48.2422, 38.9788], [47.9958, 39.6842], [47.773, 39.6486], [46.8528, 39.1484], [46.555, 38.9042], [46.1701, 38.8692], [45.4798, 39.0063], [44.5872, 39.7685], [44.3892, 39.4223], [44.023, 39.3774], [44.4309, 38.3569], [44.2112, 37.9081], [44.5614, 37.7448], [44.794, 37.2902], [44.2818, 36.9782], [44.1562, 37.2831], [43.5161, 37.2445], [42.7748, 37.3719], [41.5154, 37.0892], [40.7058, 37.0976], [40.0164, 36.8259], [39.3568, 36.6817], [38.7669, 36.6932], [38.1916, 36.9014], [37.4365, 36.6435], [36.6584, 36.8024], [36.5376, 36.4575], [36.1275, 35.8316], [35.8927, 35.9164], [35.811, 36.3097], [36.1879, 36.659], [36.0489, 36.9107], [35.5376, 36.5969], [34.6014, 36.7846], [33.6945, 36.1818], [32.7947, 36.0358], [32.3775, 36.1836], [32.0219, 36.5352], [31.3525, 36.8011], [30.6441, 36.8654], [30.4838, 36.3106], [29.6893, 36.1565], [29.1433, 36.3971], [29.0381, 36.6937], [28.4837, 36.8037], [28.1339, 37.0297], [27.3491, 37.0195], [27.0779, 37.6875], [27.2323, 37.9787], [26.6828, 38.1984], [26.8612, 38.3729], [26.7636, 38.7098], [27.0135, 38.8869], [26.6819, 39.2922], [26.8271, 39.563], [26.1133, 39.4675], [26.1812, 39.99], [26.7378, 40.4002], [27.2847, 40.4556], [27.4756, 40.3198], [28.2892, 40.4033], [29.3648, 40.8094], [29.0456, 41.0074], [29.3222, 41.2276], [31.2549, 41.1077], [31.4582, 41.3199], [32.3065, 41.7296], [33.3816, 42.0177], [34.7505, 41.9569], [35.0067, 42.0634], [35.2979, 41.7287], [36.0516, 41.6826], [36.5097, 41.2626], [38.3811, 40.9244], [39.4265, 41.1064], [40.2654, 40.9612], [41.4142, 41.4238], [41.7631, 41.9702], [41.4888, 42.6591], [40.8367, 43.0635], [40.5242, 43.1212], [39.8735, 43.4728], [38.7172, 44.2882], [38.1814, 44.4196], [37.8516, 44.6988], [37.4112, 44.7352], [36.9411, 45.2896], [37.6474, 45.3771], [37.9332, 46.0016], [38.1836, 46.0948], [37.9679, 46.6182], [39.2933, 47.1056], [38.485, 47.1757], [37.5435, 47.0745], [37.3398, 46.9169], [36.2793, 46.6586], [35.827, 46.6244], [34.8495, 46.1898], [35.0231, 45.7011], [35.558, 45.3109], [36.1705, 45.453], [36.5749, 45.3935], [36.3934, 45.0655], [35.87, 45.0055], [35.5695, 45.1192], [35.0879, 44.8027], [34.7168, 44.8071], [33.9098, 44.3876], [33.4508, 44.5536], [33.5551, 45.0979], [32.508, 45.4037], [33.6648, 45.947], [33.2022, 46.1756], [32.4769, 46.0837], [32.0357, 46.2609], [31.9744, 46.7087], [30.7963, 46.552], [30.2193, 45.8667], [29.6018, 45.6825], [29.727, 45.3433], [29.5574, 44.8435], [29.0483, 44.7574], [28.6452, 44.2957], [28.5618, 43.5012], [27.9288, 43.186], [27.8889, 42.7497], [27.4849, 42.4682], [27.9825, 42.0474], [28.3465, 41.4664], [29.0572, 41.2298], [28.7802, 40.9741], [28.1721, 41.0806], [27.4996, 40.9732], [27.2581, 40.6873], [26.1053, 40.6114], [25.8558, 40.844], [25.1043, 40.9945], [24.7931, 40.8574], [24.3839, 40.9128], [23.8787, 40.5444], [23.6643, 40.2239], [23.3123, 40.2164], [22.6296, 40.4956], [22.5923, 40.037], [22.919, 39.6291], [22.9656, 39.0307], [22.7739, 38.8004], [23.2528, 38.6614], [23.9671, 38.2748], [24.0554, 37.7097], [23.5804, 38.0107], [23.1938, 37.9592], [23.1614, 37.3337], [22.765, 37.3932], [23.0735, 36.7749], [22.6083, 36.7798], [22.0805, 37.0288], [21.5829, 37.0807], [21.5714, 37.541], [21.1448, 37.9192], [21.4036, 38.1967], [21.8248, 38.3281], [22.7996, 37.9814], [22.4219, 38.4386], [21.4724, 38.3214], [21.1133, 38.3849], [20.7768, 38.8075], [20.7795, 39.0085], [20.301, 39.3273], [19.8517, 40.0437], [19.3981, 40.2847], [19.4407, 41.4247], [19.5774, 41.7873], [19.1863, 41.9484], [18.8943, 42.2494], [17.824, 42.7976], [16.903, 43.3924], [15.9415, 43.6565], [15.123, 44.2567], [14.8548, 45.081], [14.3861, 45.342], [13.9657, 44.8355], [13.6293, 45.1081], [13.517, 45.4818], [13.0305, 45.6376], [12.2745, 45.4459], [12.5235, 44.9678], [12.2483, 44.7223], [12.3961, 44.2238], [12.6913, 43.9948], [13.564, 43.5713], [14.0106, 42.6897], [14.8659, 42.0523], [15.1687, 41.9338], [15.9641, 41.9396], [16.0125, 41.4353], [17.1032, 41.062], [17.955, 40.6554], [18.4859, 40.105], [18.078, 39.9367], [17.8649, 40.2803], [16.9283, 40.4579], [16.5301, 39.8595], [16.5976, 39.6389], [17.1147, 39.3805], [17.1746, 38.9979], [16.559, 38.7147], [16.5456, 38.4093], [16.0569, 37.9419], [15.7244, 37.9392], [15.9721, 38.7125], [16.1967, 38.7591], [16.0236, 39.3535], [15.6929, 39.99], [14.9507, 40.239], [14.7656, 40.6683], [14.1025, 40.8272], [13.7331, 41.2356], [13.0886, 41.244], [12.631, 41.4695], [11.6375, 42.2876], [11.1679, 42.5353], [10.7085, 42.9361], [10.0475, 44.0201], [9.2893, 44.3193], [8.766, 44.4223], [8.0815, 43.9189], [7.1813, 43.6592], [6.4941, 43.1691], [6.1159, 43.0724], [5.4066, 43.2286], [5.0599, 43.4444], [4.7119, 43.3733], [4.0527, 43.5931], [3.2591, 43.1931], [3.0518, 42.9152], [3.248, 41.9445], [2.0827, 41.2875], [1.0329, 41.062], [0.7147, 40.8227], [0.3638, 40.3189], [-0.3269, 39.5199], [-0.2049, 39.0627], [0.2015, 38.7591], [-0.3813, 38.4355], [-0.6467, 38.1518], [-0.8221, 37.581], [-1.3275, 37.561], [-1.7975, 37.233], [-2.1116, 36.7767], [-4.3668, 36.7181], [-4.6742, 36.5063], [-5.1716, 36.4238], [-5.6254, 36.026], [-6.0407, 36.1885], [-6.4924, 36.9547], [-6.8845, 37.1944], [-7.4936, 37.1682], [-7.8342, 37.0057], [-8.5977, 37.1211], [-8.8141, 37.431], [-8.9147, 38.5123], [-9.4742, 38.7307], [-9.3748, 39.3384], [-9.1482, 39.5426], [-8.8867, 40.1795], [-8.6557, 41.0296], [-8.8872, 42.1051], [-8.691, 42.2743], [-9.2352, 42.9769], [-8.8736, 43.3343], [-8.5369, 43.3369], [-8.2568, 43.5797], [-7.6982, 43.7644], [-7.2621, 43.5948], [-5.6658, 43.5824], [-4.523, 43.416], [-3.6046, 43.5194], [-3.0455, 43.3716], [-2.3371, 43.3281], [-1.4848, 43.5638], [-1.2456, 44.5599], [-1.0662, 45.8059], [-1.1463, 46.3115], [-1.7867, 46.5148], [-2.0188, 47.0377], [-3.1587, 47.6946], [-4.312, 47.8229], [-4.6291, 48.0857], [-4.3932, 48.3676], [-4.7208, 48.5398], [-3.2315, 48.8408], [-2.6926, 48.5367], [-2.4463, 48.6483], [-1.4375, 48.6414], [-1.5831, 49.2023], [-1.8564, 49.6837], [-1.2587, 49.6802], [-1.1386, 49.3879], [-0.1636, 49.2966], [0.2777, 49.4633], [0.1867, 49.703], [1.2456, 49.9982], [1.5514, 50.2938], [1.5794, 50.7393], [1.9123, 50.9905], [2.4458, 51.0664], [3.5871, 51.4539], [4.4829, 52.3091], [4.7687, 52.9412], [5.0257, 52.9499], [5.1203, 52.3881], [5.5611, 52.5948], [5.3755, 53.0957], [6.0622, 53.4071], [6.8164, 53.4413], [7.2852, 53.6814], [8.0091, 53.6909], [8.5387, 53.5569], [8.8983, 53.8357], [8.9573, 54.5383], [8.6821, 54.7918], [8.6159, 55.4181], [8.1321, 55.5999], [8.1641, 56.6069], [8.6186, 57.1114], [9.5543, 57.2325], [9.9623, 57.581], [10.5371, 57.4487], [10.2828, 56.6204], [10.8461, 56.5216], [10.3187, 56.2129], [10.1829, 55.8651], [9.5912, 55.4929], [9.6449, 55.0228], [10.2126, 54.4089], [11.0085, 54.1812], [11.3996, 53.9446], [12.1112, 54.1683], [12.5755, 54.4673], [13.0291, 54.4109], [13.8654, 53.8534], [14.4878, 53.6719], [14.7159, 54.0183], [16.1865, 54.2904], [16.5598, 54.5539], [17.2621, 54.7294], [18.3234, 54.8382], [18.6697, 54.4309], [19.407, 54.3861], [19.7585, 54.5448], [19.9747, 54.9214], [21.1887, 54.9352], [21.238, 55.455], [21.0618, 55.8134], [21.0707, 56.8237], [21.7285, 57.571], [22.5546, 57.7241], [23.6479, 56.9711], [24.4034, 57.3251], [24.3018, 57.7841], [24.529, 58.3543], [23.7678, 58.3609], [23.5094, 58.6585], [23.4943, 59.1956], [24.3803, 59.4726], [25.5096, 59.6389], [27.8924, 59.4143], [28.4535, 59.8142], [29.1473, 59.9998], [28.643, 60.3753], [28.6506, 60.611], [27.4623, 60.4647], [27.2421, 60.5386], [25.6565, 60.3331], [23.7216, 59.9656], [22.7934, 60.0768], [22.5759, 60.3591], [21.436, 60.5964], [21.3605, 60.9674], [21.606, 61.5916], [21.2562, 61.9897], [21.1035, 62.6229], [22.2434, 63.4379], [23.2488, 63.8962], [24.2782, 64.5153], [24.5579, 64.8009], [25.3729, 65.0095], [25.348, 65.4792], [24.5814, 65.757], [23.6914, 65.8285], [21.5656, 65.4081], [21.574, 65.1258], [21.1381, 64.8087], [21.4653, 64.3796], [20.7626, 63.8678], [19.0345, 63.2377], [18.4632, 62.8959], [17.8955, 62.8305], [17.4174, 61.7407], [17.1307, 61.5758], [17.251, 60.7011], [17.9559, 60.5899], [18.5574, 60.2537], [18.9706, 59.7572], [17.876, 59.2709], [18.2852, 59.1093], [17.4569, 58.8585], [16.6522, 58.4344], [16.5279, 57.0681], [15.9965, 56.2227], [14.7821, 56.1619], [14.2152, 55.8325], [14.3417, 55.5278], [13.3212, 55.3464], [12.5923, 56.1377], [12.8835, 56.6177], [12.4214, 56.9063], [11.7347, 57.7177], [11.2718, 58.4757], [11.1958, 59.0782], [10.645, 59.3892], [10.1793, 59.0094], [9.6183, 58.946], [8.1663, 58.1452], [7.0051, 58.0242], [5.7067, 58.5236], [5.8452, 59.3535], [5.1314, 59.2265], [5.305, 59.6426], [5.1194, 59.8337], [5.2441, 60.5697], [5.0493, 60.7075], [4.9276, 61.711], [5.5336, 62.3109], [6.353, 62.6114], [7.2838, 62.6023], [7.0082, 62.9576], [8.1006, 63.091], [8.398, 63.5349], [9.6968, 63.6246], [9.7079, 63.8652], [11.3499, 64.9059], [12.1595, 65.1789], [12.2727, 65.5682], [12.9763, 66.0192], [13.1046, 66.5394], [14.755, 67.4991], [14.7989, 67.8094], [16.0645, 68.2], [16.6517, 68.6257], [17.3908, 68.7995], [18.1015, 69.1564], [18.2932, 69.4751], [20.0688, 69.8835], [21.163, 69.8895], [21.4005, 70.1744], [22.6847, 70.3748], [23.0464, 70.1019], [24.4198, 70.702], [24.6582, 71.001], [25.7684, 70.8531], [27.5972, 71.0913], [29.1025, 70.8607], [30.9442, 70.2745], [29.6014, 69.9767], [31.4529, 69.6895], [31.9846, 69.9536], [32.9417, 69.7518], [32.3775, 69.4791], [33.6843, 69.3102], [35.858, 69.1917], [37.7304, 68.6921], [40.3809, 67.8318], [40.9664, 67.7135], [41.1887, 66.8262], [40.5216, 66.4466], [39.2889, 66.1321], [38.3976, 66.0644], [35.5136, 66.3958], [34.8247, 66.6111], [32.4636, 66.9163], [33.5667, 66.321], [34.3999, 66.1286], [34.7865, 65.8645], [34.4065, 65.3957], [34.8034, 64.986], [34.8695, 64.5601], [35.6472, 64.3783], [36.365, 64.0028], [37.4423, 63.8135], [38.0708, 64.0259], [37.9537, 64.3202], [37.1835, 64.4085], [36.5283, 64.8473], [36.883, 65.1724], [38.0096, 64.8788], [39.7581, 64.577], [40.281, 64.998], [39.8167, 65.5979], [40.6916, 65.9634], [41.4759, 66.1235], [42.2106, 66.5196], [44.0971, 66.2351], [44.4886, 66.6719], [44.292, 67.0996], [43.7824, 67.2545], [44.2254, 67.9956], [44.0483, 68.5489], [45.8922, 68.4799], [46.6903, 67.8489], [45.5287, 67.7577], [44.9396, 67.4776], [45.9859, 66.853], [46.6912, 66.8255], [47.7091, 67.045], [47.8746, 67.5841], [48.8778, 67.7315], [50.839, 68.3498], [52.5502, 68.5924], [53.8019, 68.9959], [53.968, 68.2273], [54.5614, 68.273], [56.0436, 68.649], [57.1267, 68.554], [58.9191, 69.0039], [59.8975, 68.4219], [60.9335, 68.9868], [60.1705, 69.5909], [61.0156, 69.8515], [63.3616, 69.6753], [66.416, 68.9477], [67.0024, 68.8736], [67.8751, 68.4763]]], [[[60.4506, 69.935], [59.5783, 69.7385], [58.9529, 69.8928], [58.473, 70.2668], [59.0052, 70.4652], [60.4506, 69.935]]], [[[17.5031, 69.5963], [17.951, 69.1981], [16.9718, 69.1382], [17.5031, 69.5963]]], [[[50.265, 69.1857], [49.6262, 68.8596], [48.667, 68.7331], [48.279, 69.0403], [48.6315, 69.436], [49.225, 69.5113], [50.265, 69.1857]]], [[[-15.5431, 66.2285], [-14.6982, 66.0203], [-14.7576, 65.7557], [-13.6159, 65.4872], [-13.853, 64.8622], [-15.0215, 64.296], [-16.0605, 64.1113], [-16.6404, 63.8656], [-17.8156, 63.7129], [-18.6537, 63.4066], [-20.1982, 63.5558], [-21.8328, 64.2054], [-21.9502, 64.515], [-22.684, 65.0264], [-22.0057, 65.4934], [-22.9024, 65.5804], [-24.2241, 65.4872], [-23.7371, 66.0695], [-22.4261, 66.4302], [-21.3037, 65.8764], [-21.23, 65.4206], [-20.3567, 65.7191], [-20.3567, 66.0331], [-18.7775, 66.1687], [-16.7485, 66.1317], [-16.5407, 66.4466], [-15.9854, 66.5145], [-15.5431, 66.2285]]], [[[-3.1097, 58.5154], [-3.2124, 58.3212], [-3.9901, 57.959], [-3.4029, 57.7082], [-2.0741, 57.7024], [-1.778, 57.4938], [-2.6527, 56.3183], [-3.1783, 56.0802], [-2.1471, 55.9031], [-1.6555, 55.5704], [-1.2917, 54.7738], [-0.6716, 54.5039], [-0.2055, 54.0219], [0.5589, 52.9672], [1.0556, 52.959], [1.6566, 52.7537], [1.7467, 52.4689], [1.559, 52.0869], [0.9553, 51.8077], [0.6867, 51.3865], [1.4151, 51.3632], [0.9601, 50.9259], [0.2051, 50.763], [-1.5168, 50.7477], [-2.5477, 50.6163], [-3.4046, 50.6323], [-3.7933, 50.2293], [-4.1726, 50.3908], [-5.3422, 50.2461], [-4.5832, 50.7763], [-4.1881, 51.1885], [-3.1359, 51.2049], [-4.3863, 51.7411], [-4.9023, 51.6262], [-5.0883, 51.9959], [-4.3832, 52.197], [-3.9804, 52.5417], [-4.1111, 53.2189], [-3.0646, 53.4268], [-2.925, 53.7327], [-3.958, 54.7809], [-5.1354, 54.8575], [-4.7212, 55.421], [-5.2457, 55.9293], [-5.6097, 56.0553], [-5.392, 56.5148], [-5.9368, 56.6058], [-5.562, 57.2328], [-5.8181, 57.4361], [-5.3382, 58.2388], [-4.7155, 58.5101], [-3.1097, 58.5154]]], [[[22.6172, 58.6213], [23.2928, 58.4834], [22.1875, 58.1543], [22.0819, 58.4781], [22.6172, 58.6213]]], [[[19.0767, 57.836], [18.8139, 57.7062], [18.6998, 57.2427], [18.1365, 57.5566], [18.5374, 57.8305], [19.0767, 57.836]]], [[[12.5688, 55.785], [11.6539, 55.1869], [11.2864, 55.2044], [10.9788, 55.7215], [12.219, 56.1186], [12.5688, 55.785]]], [[[10.645, 55.6099], [10.7852, 55.1334], [9.9889, 55.1631], [9.8606, 55.5156], [10.645, 55.6099]]], [[[-7.1786, 55.0568], [-6.1293, 55.2175], [-5.4703, 54.5002], [-5.6068, 54.2727], [-6.3452, 53.9872], [-6.0274, 52.927], [-6.5612, 52.1888], [-7.5275, 52.0989], [-7.6645, 51.9797], [-8.8135, 51.5849], [-9.2964, 51.4981], [-9.5799, 51.6892], [-10.3786, 51.8688], [-9.9558, 52.1367], [-9.2993, 53.0977], [-9.7954, 53.3951], [-9.996, 54.276], [-8.623, 54.3468], [-8.764, 54.6813], [-8.2746, 55.1462], [-7.2468, 55.3531], [-7.1786, 55.0568]]], [[[9.4802, 42.8056], [9.5508, 42.1296], [9.1863, 41.3847], [8.8077, 41.5884], [8.7132, 42.5499], [9.4802, 42.8056]]], [[[9.632, 40.8822], [9.8051, 40.4996], [9.5623, 39.1661], [9.0563, 39.2394], [8.8814, 38.9127], [8.418, 39.2056], [8.4712, 40.2927], [8.1898, 40.6518], [9.2831, 41.2018], [9.632, 40.8822]]], [[[3.1454, 39.7902], [3.4619, 39.6979], [3.0726, 39.3011], [2.3713, 39.6131], [2.785, 39.8546], [3.1454, 39.7902]]], [[[23.4153, 38.9588], [24.0989, 38.6712], [23.7589, 38.4013], [23.252, 38.8013], [23.4153, 38.9588]]], [[[15.5766, 38.2202], [15.0994, 37.4585], [15.2943, 37.0133], [15.1128, 36.6879], [14.502, 36.7989], [14.1428, 37.1038], [13.9054, 37.1007], [12.4356, 37.8198], [13.3518, 38.1807], [13.6816, 38.0009], [14.506, 38.0453], [14.846, 38.1718], [15.5766, 38.2202]]], [[[34.4633, 35.5937], [33.9418, 35.2918], [34.0501, 34.9882], [32.9417, 34.5758], [32.449, 34.7294], [32.3171, 34.9532], [32.9417, 35.3904], [33.4588, 35.3358], [34.4633, 35.5937]]], [[[23.8521, 35.5355], [24.3129, 35.3638], [24.7212, 35.425], [25.4759, 35.306], [25.7449, 35.1427], [24.7998, 34.9345], [24.4638, 35.1604], [23.5618, 35.2949], [23.8521, 35.5355]]], [[[-16.3346, 28.38], [-16.6579, 28.0071], [-16.9054, 28.3396], [-16.3346, 28.38]]]] }, \"properties\": { \"name\": \"Europe\", \"id\": \"europe\" }, \"id\": \"europe\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"MultiPolygon\", \"coordinates\": [[[[32.8862, -26.8495], [32.5346, -28.1998], [32.2856, -28.6215], [31.7782, -28.9371], [31.3352, -29.3779], [30.2885, -30.9701], [28.8561, -32.2943], [27.8604, -33.0538], [27.0774, -33.5212], [26.4293, -33.7596], [25.9894, -33.7112], [25.6383, -34.0113], [25.0031, -33.9735], [24.8273, -34.1688], [23.5858, -33.9851], [23.2679, -34.0814], [22.5537, -34.0099], [22.2457, -34.0694], [21.7889, -34.3726], [21.06, -34.3646], [20.53, -34.4631], [20.0204, -34.7858], [19.6351, -34.7534], [18.8086, -34.108], [18.3545, -33.9389], [18.4331, -33.7174], [17.8782, -32.9614], [18.2511, -32.6521], [18.3105, -32.1225], [18.2107, -31.7425], [17.6776, -31.019], [17.1893, -30.0997], [16.95, -29.4037], [16.4808, -28.6415], [15.7191, -27.9659], [15.3414, -27.3866], [14.9676, -26.3182], [14.8451, -25.7256], [14.8371, -25.0331], [14.5015, -24.2021], [14.474, -23.2811], [14.5259, -22.7027], [14.3217, -22.19], [13.9733, -21.7678], [13.4504, -20.9169], [13.1685, -20.1845], [12.4583, -18.9269], [12.0956, -18.5412], [11.776, -18.0018], [11.7219, -17.467], [11.8191, -16.7043], [11.7507, -15.8321], [11.9678, -15.6341], [12.2803, -14.6376], [12.5506, -13.4377], [12.9834, -12.7759], [13.4171, -12.5202], [13.7855, -11.8127], [13.8477, -11.0545], [13.2093, -9.7033], [12.9985, -9.0481], [13.3589, -8.6872], [13.3785, -8.3698], [12.8622, -7.2317], [12.8236, -6.9547], [12.5213, -6.5903], [12.1555, -5.6328], [12.2066, -5.4681], [11.7773, -4.5657], [11.0321, -3.8266], [10.3471, -3.0129], [9.6245, -2.3671], [9.2658, -1.8251], [9.3306, -1.5348], [9.0647, -1.2982], [8.8215, -0.7083], [9.2969, -0.3514], [9.47, 0.362], [9.3302, 0.611], [9.6258, 0.7792], [9.4944, 1.4353], [9.8069, 1.9276], [9.8216, 2.5393], [9.9485, 3.079], [9.8762, 3.3099], [9.4256, 3.9224], [8.9999, 4.0916], [8.762, 4.5798], [7.1547, 4.5146], [6.7569, 4.3437], [6.0764, 4.2904], [5.5877, 4.6473], [5.2326, 5.4836], [4.8611, 6.0265], [4.4314, 6.3487], [4.126, 6.4113], [2.7726, 6.3758], [1.8182, 6.2609], [1.1057, 6.0513], [0.9499, 5.8103], [0.2597, 5.7575], [-0.3487, 5.5009], [-0.7977, 5.2266], [-1.6384, 4.9807], [-2.0017, 4.7623], [-2.399, 4.9292], [-4.0372, 5.2301], [-5.5646, 5.0894], [-6.8453, 4.6713], [-7.4261, 4.3761], [-7.66, 4.3668], [-8.2591, 4.59], [-9.1322, 5.0548], [-10.2763, 6.0775], [-10.7857, 6.3101], [-11.9292, 7.1837], [-12.4856, 7.3861], [-12.5104, 7.6658], [-12.8809, 7.8566], [-13.1818, 8.5771], [-13.2695, 9.1706], [-13.7003, 9.851], [-14.4269, 10.2483], [-14.7758, 10.9315], [-15.0431, 10.9404], [-15.3933, 11.2173], [-15.5018, 11.7238], [-16.1384, 11.9174], [-16.7121, 12.355], [-16.8248, 13.3409], [-16.5878, 13.6894], [-17.168, 14.6406], [-17.1471, 14.9221], [-16.5354, 15.8383], [-16.5359, 16.2866], [-16.3468, 16.9262], [-16.0789, 17.5459], [-16.0849, 18.5211], [-16.2132, 19.0032], [-16.5146, 19.3619], [-16.2835, 19.7871], [-16.2105, 20.2279], [-16.4298, 20.6523], [-16.6224, 20.6341], [-16.8761, 21.086], [-16.9309, 21.9001], [-16.5143, 22.3333], [-16.2103, 23.0981], [-15.5864, 24.0729], [-15.0388, 24.5488], [-14.856, 24.8715], [-14.7949, 25.4041], [-14.4138, 26.2537], [-13.5758, 26.7349], [-13.176, 27.6556], [-12.949, 27.9144], [-11.9862, 28.1292], [-11.4302, 28.3822], [-11.0809, 28.7138], [-10.4865, 29.0649], [-9.6671, 30.1094], [-9.6529, 30.4476], [-9.8755, 30.718], [-9.8087, 31.4247], [-9.3475, 32.0865], [-9.2458, 32.5726], [-8.5962, 33.1873], [-6.901, 33.969], [-6.3532, 34.776], [-5.9248, 35.7859], [-5.3973, 35.9297], [-5.1054, 35.4676], [-4.3299, 35.1613], [-3.6932, 35.2799], [-2.84, 35.128], [-2.0177, 35.085], [-1.6737, 35.1831], [-0.9175, 35.6683], [-0.4261, 35.8614], [0.0479, 35.9004], [0.5149, 36.2617], [1.2571, 36.5196], [2.5932, 36.6009], [2.9727, 36.7846], [3.7789, 36.8961], [4.7581, 36.8965], [5.1958, 36.6768], [6.0649, 36.8641], [6.4866, 37.0856], [6.9274, 36.9196], [7.6079, 36.9999], [7.9106, 36.8566], [8.8237, 36.9977], [9.6879, 37.3404], [10.1962, 37.2059], [10.5713, 36.8796], [11.1266, 36.8739], [10.5256, 36.3234], [10.5908, 35.8871], [11.0045, 35.6336], [11.1199, 35.2403], [10.5349, 34.5448], [10.0648, 34.2119], [10.1589, 33.8501], [10.7227, 33.5145], [12.2798, 32.8584], [12.7535, 32.8012], [13.2835, 32.9148], [14.237, 32.6813], [14.5135, 32.5109], [15.1767, 32.391], [15.4963, 31.6568], [15.7058, 31.4264], [16.123, 31.2644], [17.3491, 31.0815], [18.1903, 30.7775], [18.9364, 30.2905], [19.2916, 30.2878], [19.7132, 30.4885], [20.1509, 31.0784], [19.9263, 31.8175], [20.1216, 32.2188], [20.621, 32.5801], [21.6357, 32.9374], [22.1875, 32.9183], [23.0908, 32.6187], [23.2866, 32.2139], [24.1295, 32.0093], [24.684, 32.0164], [25.0249, 31.8832], [25.2255, 31.5339], [25.8931, 31.6209], [27.2479, 31.378], [27.9674, 31.0975], [28.5147, 31.0505], [29.0723, 30.8303], [29.5916, 31.0114], [30.3951, 31.4575], [30.7005, 31.4038], [31.1941, 31.5876], [32.1018, 31.0922], [32.6034, 31.0687], [33.1299, 31.1681], [33.6666, 31.1304], [34.1983, 31.3226], [34.9041, 29.4773], [34.7363, 29.2704], [34.3999, 28.016], [34.2201, 27.7643], [33.7602, 28.0475], [33.2475, 28.5678], [33.0757, 29.0729], [32.7215, 29.5217], [32.5653, 29.3863], [32.6318, 28.9921], [32.8982, 28.5651], [33.5471, 27.8984], [33.5498, 27.6072], [33.8929, 27.0492], [33.9591, 26.6488], [34.565, 25.6913], [35.194, 24.4751], [35.6246, 24.0658], [35.5229, 23.4426], [35.6978, 22.9463], [36.2296, 22.6289], [36.8297, 22.0976], [36.9269, 21.5867], [37.1507, 21.1037], [37.2275, 20.5568], [37.2483, 19.5821], [37.4711, 18.8203], [37.9217, 18.5558], [38.2018, 18.2495], [38.5742, 18.0728], [38.9116, 17.427], [39.1424, 16.7292], [39.2991, 15.9213], [39.5064, 15.532], [39.8637, 15.4703], [40.2042, 15.014], [40.5464, 14.9336], [41.1763, 14.6202], [41.6584, 13.9832], [42.2452, 13.5877], [42.7961, 12.8642], [43.0828, 12.8247], [43.41, 12.1899], [43.2719, 11.9697], [42.7992, 11.7394], [43.4411, 11.3465], [43.853, 10.7841], [44.3865, 10.4303], [44.9427, 10.4365], [45.8168, 10.836], [46.5652, 10.7459], [47.405, 11.1738], [48.0194, 11.1392], [48.6745, 11.3226], [48.9031, 11.2546], [50.1101, 11.5294], [50.7923, 11.9835], [51.2549, 11.8308], [51.0844, 11.3354], [51.1408, 10.6567], [50.8984, 10.2532], [50.8248, 9.428], [50.4297, 8.8452], [50.103, 8.1998], [49.8522, 7.9627], [49.7612, 7.6596], [49.3484, 6.9906], [49.0492, 6.1738], [48.6492, 5.4942], [47.9754, 4.4968], [46.879, 3.2854], [46.0511, 2.4753], [44.9201, 1.8099], [44.3328, 1.3909], [43.4677, 0.6216], [41.9798, -0.9728], [41.3872, -1.8664], [40.9957, -1.9507], [40.8984, -2.2699], [40.6441, -2.5393], [40.2224, -2.6885], [40.1154, -3.2504], [39.4909, -4.4787], [39.2281, -4.6656], [38.8192, -5.8778], [38.8738, -6.3315], [39.4722, -6.8788], [39.5193, -7.1243], [39.2884, -7.518], [39.4411, -8.0116], [39.304, -8.444], [39.7838, -9.9146], [39.9836, -10.1596], [40.3889, -10.3536], [40.6117, -10.6616], [40.4031, -11.3319], [40.5806, -12.6356], [40.5451, -13.463], [40.6401, -14.3903], [40.835, -14.7916], [40.6179, -15.1157], [40.5589, -15.4734], [40.1088, -15.9795], [39.8446, -16.4358], [39.0843, -16.9729], [38.145, -17.2428], [37.2443, -17.7399], [36.5403, -18.5181], [35.6512, -19.164], [34.9481, -19.8129], [34.7559, -19.8218], [34.6982, -20.4042], [34.9822, -20.8064], [35.2677, -21.6511], [35.3156, -22.3968], [35.5753, -22.9632], [35.3702, -23.7982], [35.4381, -24.1711], [35.1558, -24.5413], [34.6072, -24.8214], [33.3474, -25.2608], [32.7921, -25.6443], [32.5906, -26.0039], [32.9337, -26.2525], [32.8862, -26.8495]]], [[[49.5384, -12.4323], [49.9374, -13.0724], [50.174, -14.0401], [50.2353, -14.7321], [50.483, -15.3855], [50.2091, -15.9604], [49.8926, -15.4579], [49.6498, -15.5671], [49.8389, -16.4864], [49.4491, -17.2406], [49.478, -17.8984], [48.6071, -20.4575], [48.3509, -21.3488], [47.9084, -22.4661], [47.5582, -23.8745], [47.1773, -24.7872], [46.7285, -25.1498], [46.1586, -25.2306], [45.5078, -25.5631], [45.1154, -25.5431], [44.8131, -25.3341], [44.3457, -25.2262], [44.0354, -24.9958], [43.6874, -24.3579], [43.7225, -23.5296], [43.398, -22.8864], [43.2666, -22.0493], [43.5019, -21.3563], [43.8556, -21.0767], [44.2396, -20.3798], [44.4047, -19.9221], [44.4487, -19.4285], [44.2387, -19.0752], [44.233, -18.7409], [44.0399, -18.2886], [43.9795, -17.3915], [44.4216, -16.7026], [44.4762, -16.2174], [44.9094, -16.1743], [45.1669, -15.983], [45.5984, -15.9928], [45.7, -15.8139], [46.3317, -15.7136], [46.4751, -15.5134], [47.8116, -14.5448], [47.9954, -13.9607], [48.7966, -13.2673], [48.9102, -12.9357], [48.8996, -12.4585], [49.2072, -12.0794], [49.5384, -12.4323]]], [[[55.8225, -21.2778], [55.5575, -21.3586], [55.233, -21.0585], [55.6618, -20.9062], [55.8225, -21.2778]]]] }, \"properties\": { \"name\": \"Africa\", \"id\": \"africa\" }, \"id\": \"africa\" },\r\n { \"type\": \"Feature\", \"geometry\": { \"type\": \"MultiPolygon\", \"coordinates\": [[[[110.8887, 19.9918], [111.0138, 19.6553], [110.5722, 19.1719], [110.4514, 18.748], [109.5193, 18.2184], [108.7016, 18.5354], [108.6936, 19.3384], [109.1792, 19.6739], [109.2188, 19.8426], [109.6511, 19.9842], [110.5882, 20.0726], [110.8887, 19.9918]]], [[[121.1017, 18.6153], [121.8457, 18.2952], [122.2998, 18.4026], [122.1511, 17.7563], [122.2368, 17.4349], [122.5191, 17.1247], [122.1351, 16.1849], [121.5953, 15.9333], [121.6069, 15.67], [121.3925, 15.3242], [121.6957, 14.7374], [121.6486, 14.4813], [121.8004, 14.1137], [122.1999, 14.1479], [122.4907, 14.3224], [122.856, 14.2509], [123.2315, 13.7475], [123.4322, 13.9664], [123.726, 13.8843], [123.608, 13.5283], [124.1428, 13.036], [124.0598, 12.5672], [123.311, 13.044], [123.1632, 13.4417], [122.5954, 13.9078], [122.4068, 13.4927], [121.7778, 13.9375], [121.2034, 13.6401], [120.8407, 13.8847], [120.6166, 14.1879], [120.922, 14.4933], [120.8882, 14.7157], [120.0821, 14.851], [119.8309, 16.327], [120.1598, 16.0478], [120.3893, 16.2218], [120.3054, 16.5294], [120.4088, 16.9555], [120.3582, 17.6382], [120.5997, 18.5078], [121.1017, 18.6153]]], [[[120.7045, 13.4794], [121.2029, 13.4324], [121.5226, 13.131], [121.5407, 12.6382], [121.2367, 12.2188], [120.922, 12.5117], [120.7635, 12.9698], [120.5083, 13.2601], [120.7045, 13.4794]]], [[[53.7633, 12.6369], [54.1872, 12.664], [54.1295, 12.3608], [53.5982, 12.3422], [53.7633, 12.6369]]], [[[125.2397, 12.5277], [125.5358, 12.1912], [125.4568, 11.9524], [125.6281, 11.1321], [125.2335, 11.145], [125.0342, 11.3412], [124.8841, 11.7753], [124.3848, 12.2441], [124.2947, 12.5694], [125.2397, 12.5277]]], [[[122.4964, 11.6151], [123.1583, 11.5356], [123.0167, 11.1166], [122.7699, 10.8236], [122.1977, 10.623], [121.9642, 10.8716], [122.1036, 11.643], [122.4964, 11.6151]]], [[[124.5748, 11.343], [124.9299, 11.3727], [125.0133, 10.7854], [125.2535, 10.2639], [125.0266, 10.033], [124.7807, 10.168], [124.7869, 10.7814], [124.4456, 10.9235], [124.5748, 11.343]]], [[[117.3109, 8.4395], [117.35, 8.7134], [117.8849, 9.2407], [118.1148, 9.3468], [119.0243, 10.3535], [119.2241, 10.4774], [119.2614, 10.8449], [119.5268, 10.9532], [119.6839, 10.5515], [119.1917, 10.061], [118.782, 9.9163], [118.4348, 9.2562], [117.9896, 8.8772], [117.3109, 8.4395]]], [[[123.3705, 9.4498], [123.386, 9.9669], [123.7114, 10.4738], [123.952, 10.3167], [123.6435, 10.0202], [123.3705, 9.4498]]], [[[123.1308, 9.064], [122.5626, 9.4826], [122.4716, 9.9616], [122.8556, 10.0868], [122.8169, 10.5036], [122.9834, 10.8866], [123.2564, 10.9941], [123.5676, 10.7806], [123.1618, 9.8644], [123.3083, 9.357], [123.1308, 9.064]]], [[[124.5938, 9.7871], [124.3599, 9.63], [123.9355, 9.6238], [123.817, 9.8173], [124.1726, 10.1351], [124.577, 10.0268], [124.5938, 9.7871]]], [[[79.9822, 9.8129], [80.253, 9.7965], [80.7111, 9.3663], [81.373, 8.4315], [81.436, 8.119], [81.8741, 7.2885], [81.8612, 6.9014], [81.6375, 6.4251], [81.3801, 6.2409], [80.724, 5.979], [80.2672, 6.0096], [80.0954, 6.153], [79.8593, 6.8295], [79.7923, 7.5854], [79.929, 8.8993], [80.1185, 9.3268], [79.9822, 9.8129]]], [[[126.0059, 9.321], [126.1932, 9.2767], [126.3201, 8.8447], [126.4355, 7.8327], [126.57, 7.6773], [126.5816, 7.2476], [126.08, 6.7332], [125.8243, 7.3333], [125.4008, 6.7957], [125.5886, 6.4659], [125.6681, 5.9785], [125.4559, 5.6643], [124.6365, 5.9981], [124.0776, 6.4042], [123.9853, 6.9937], [124.2068, 7.3963], [123.9684, 7.6644], [123.493, 7.8078], [123.3909, 7.4074], [122.4973, 7.6729], [122.176, 7.0044], [122.0472, 7.3635], [122.132, 7.8105], [122.3371, 8.0284], [122.911, 8.1563], [123.0176, 8.3982], [123.4344, 8.7031], [124.2259, 8.2712], [124.4513, 8.6064], [124.731, 8.5629], [124.8686, 8.9721], [125.5336, 9.1408], [125.4142, 9.6691], [125.5211, 9.7592], [126.0059, 9.321]]], [[[116.8075, 6.691], [117.1285, 6.9689], [117.294, 6.6768], [117.6456, 6.4735], [117.6172, 5.9408], [118.0038, 6.0531], [118.1157, 5.8627], [118.5946, 5.5919], [119.2236, 5.4126], [119.1322, 5.1005], [118.1854, 4.8284], [118.5627, 4.5022], [118.4979, 4.3623], [118.0083, 4.25], [117.741, 4.3375], [117.4654, 4.076], [117.6301, 3.6361], [117.1662, 3.5922], [117.6105, 3.0644], [118.0664, 2.3178], [117.8649, 1.9684], [118.0806, 1.7016], [118.639, 1.319], [118.9848, 0.9821], [118.5347, 0.8134], [118.196, 0.8742], [117.745, 0.7295], [117.5222, 0.2359], [117.4627, -0.3238], [117.5626, -0.7708], [116.5545, -1.474], [116.4236, -2.0528], [116.5656, -2.2996], [116.3308, -2.9024], [115.9561, -3.5949], [114.6937, -4.1697], [114.5361, -3.4946], [114.0825, -3.2788], [113.7953, -3.4564], [113.5258, -3.1843], [112.9714, -3.1869], [112.6003, -3.4005], [112.2852, -3.321], [111.8222, -3.5323], [111.8231, -3.0573], [111.3676, -2.9335], [111.0445, -3.0556], [110.574, -2.8913], [110.2326, -2.9251], [110.0191, -1.399], [109.7874, -1.0114], [109.454, -0.8689], [109.1606, -0.4947], [109.2574, 0.0313], [108.9444, 0.3558], [108.9058, 0.7939], [109.0758, 1.4957], [109.3786, 1.9227], [109.6289, 2.0275], [109.9845, 1.7176], [110.3493, 1.7198], [110.9397, 1.5174], [111.1541, 1.7389], [111.242, 2.4358], [111.7276, 2.854], [112.7375, 3.0706], [113.0447, 3.2051], [113.4459, 3.7404], [113.924, 4.2434], [114.0536, 4.5927], [114.2995, 4.6074], [114.9956, 5.0224], [115.5198, 5.049], [115.419, 5.413], [115.7968, 5.536], [116.1386, 6.1295], [116.4946, 6.5219], [116.8075, 6.691]]], [[[96.4924, 5.2293], [97.4512, 5.2359], [97.9084, 4.8799], [98.2484, 4.4147], [98.3074, 4.0929], [99.7319, 3.1829], [100.4572, 2.2574], [100.6854, 2.1202], [101.0463, 2.2574], [101.4768, 1.6932], [101.7849, 1.6213], [102.1573, 1.2591], [102.4694, 0.7792], [102.8493, 0.7153], [103.0664, 0.492], [103.4788, 0.48], [103.7868, 0.0468], [103.4286, -0.1916], [103.4313, -0.5334], [103.7211, -0.8867], [104.3608, -1.0385], [104.5685, -1.9219], [104.8451, -2.0932], [104.6684, -2.3857], [105.3968, -2.3804], [105.5819, -2.4918], [106.0445, -3.1062], [105.8438, -3.6135], [105.8873, -5.0096], [105.8163, -5.6767], [105.6183, -5.7997], [105.3493, -5.5493], [105.0812, -5.7455], [104.6396, -5.5205], [104.6014, -5.9045], [103.8312, -5.0797], [102.919, -4.4707], [102.5377, -4.152], [102.1276, -3.5993], [101.5785, -3.167], [100.8478, -2.1438], [100.8554, -1.9343], [100.4865, -1.2991], [100.3081, -0.8268], [99.8602, -0.3136], [99.5978, 0.1023], [99.1593, 0.3518], [98.7962, 1.4948], [98.5645, 1.9023], [97.7006, 2.3586], [97.591, 2.8464], [97.3912, 2.9752], [96.9691, 3.5753], [96.4449, 3.8163], [95.4949, 4.7614], [95.2069, 5.2838], [95.2277, 5.5648], [95.629, 5.6092], [96.1333, 5.2941], [96.4924, 5.2293]]], [[[96.4635, 2.3599], [95.8088, 2.6556], [95.8061, 2.9161], [96.4173, 2.5153], [96.4635, 2.3599]]], [[[128.4539, 2.0519], [128.2178, 2.2973], [128.6022, 2.5974], [128.623, 2.2245], [128.4539, 2.0519]]], [[[127.7326, 0.848], [128.161, 1.1579], [128.4242, 1.5174], [128.6883, 1.5725], [128.7025, 1.1064], [128.299, 0.8769], [128.6914, 0.3602], [127.983, 0.4721], [127.8875, 0.2985], [128.0464, -0.706], [127.6918, -0.2417], [127.7086, 0.2883], [127.5555, 0.4898], [127.4201, 1.252], [127.6318, 1.8437], [128.0109, 1.7012], [128.0118, 1.3319], [127.6527, 1.014], [127.7326, 0.848]]], [[[124.889, 0.9954], [124.4274, 0.4707], [123.754, 0.3056], [123.2653, 0.3265], [123.0824, 0.4858], [121.8422, 0.4365], [121.4258, 0.4947], [120.3489, 0.4494], [120.1274, 0.1667], [120.012, -0.307], [120.0972, -0.6501], [120.5176, -1.0394], [120.6676, -1.3701], [121.0338, -1.4065], [121.5194, -0.8556], [121.9691, -0.9333], [122.2798, -0.7571], [122.8888, -0.7553], [123.1716, -0.5706], [123.3798, -0.6488], [123.378, -1.0043], [123.0495, -0.8725], [122.8076, -0.9662], [122.5067, -1.3479], [121.7188, -1.8628], [121.349, -1.9458], [121.8484, -2.3316], [122.3992, -3.2007], [122.2528, -3.6206], [122.8773, -4.1089], [122.8973, -4.3491], [122.207, -4.4964], [121.9172, -4.848], [121.4866, -4.5812], [121.6175, -4.0929], [120.9144, -3.5558], [121.0542, -3.167], [121.052, -2.7515], [120.6539, -2.6676], [120.2539, -3.0529], [120.4368, -3.7072], [120.3627, -4.0858], [120.4199, -4.6176], [120.2792, -5.1463], [120.3116, -5.5418], [119.7172, -5.6932], [119.3768, -5.4255], [119.6116, -4.4236], [119.6236, -4.0343], [119.4194, -3.4755], [118.9946, -3.5376], [118.8126, -3.1568], [118.7837, -2.7648], [119.0922, -2.4829], [119.3217, -1.9298], [119.3089, -1.4083], [119.7718, -0.4836], [119.8091, 0.2386], [120.2694, 0.971], [120.5167, 0.8174], [120.9122, 1.2888], [121.44, 1.2142], [121.5918, 1.0678], [122.4365, 1.018], [122.8924, 0.8498], [123.2781, 0.9279], [123.8468, 0.8383], [124.2738, 1.022], [124.9893, 1.7012], [125.2339, 1.5023], [124.889, 0.9954]]], [[[97.4814, 1.465], [97.9319, 0.9741], [97.8764, 0.6283], [97.4055, 0.9466], [97.2443, 1.4238], [97.4814, 1.465]]], [[[140.9735, -2.6099], [140.9743, -5.0398], [140.9748, -6.3461], [140.8625, -6.7399], [140.9752, -6.9054], [140.9761, -9.1187], [139.9347, -8.1013], [139.3857, -8.1892], [138.8561, -8.1452], [139.0878, -7.5872], [138.7478, -7.2517], [138.8645, -6.8584], [138.4388, -6.3435], [138.2826, -5.8388], [138.0611, -5.4654], [137.0894, -4.9243], [136.6189, -4.8187], [135.9797, -4.5311], [135.1962, -4.4507], [134.6795, -4.0792], [134.1473, -3.7969], [133.9737, -3.8182], [133.6532, -3.3645], [133.2488, -4.0623], [132.9688, -4.0947], [132.7539, -3.7036], [132.7512, -3.2948], [132.3482, -2.9752], [133.1911, -2.4377], [133.6088, -2.5473], [133.9049, -2.391], [133.9213, -2.1021], [132.963, -2.2725], [132.3078, -2.2423], [132.0233, -1.9902], [131.9305, -1.5596], [131.2935, -1.3936], [131.2571, -0.8556], [131.8044, -0.7038], [132.1285, -0.4539], [132.6252, -0.3589], [133.4726, -0.726], [133.9746, -0.7442], [134.2596, -1.363], [134.106, -1.7212], [134.1557, -2.1953], [135.0373, -3.333], [135.4865, -3.345], [136.2433, -2.5833], [136.3898, -2.2734], [136.843, -2.1975], [137.1236, -1.8411], [137.8063, -1.4833], [138.6497, -1.7909], [139.7896, -2.3484], [140.6223, -2.4456], [140.9735, -2.6099]]], [[[135.3831, -0.6514], [135.8936, -0.726], [136.2828, -1.0647], [135.839, -1.1193], [135.3831, -0.6514]]], [[[99.1637, -1.778], [98.8743, -1.664], [98.6017, -1.1979], [98.869, -0.9156], [99.2671, -1.6276], [99.1637, -1.778]]], [[[128.153, -1.6604], [127.5617, -1.7283], [127.6465, -1.3324], [128.153, -1.6604]]], [[[106.0458, -1.6693], [106.3659, -2.4647], [106.6788, -2.704], [106.547, -3.0556], [105.9988, -2.8247], [105.7857, -2.1815], [105.1332, -2.0426], [105.5855, -1.5268], [106.0458, -1.6693]]], [[[135.4741, -1.5916], [136.2016, -1.6551], [136.1927, -1.8593], [135.4741, -1.5916]]], [[[124.9694, -1.7057], [124.8344, -1.8943], [124.4176, -2.0053], [124.3808, -1.6875], [124.9694, -1.7057]]], [[[108.2071, -2.9978], [107.6145, -3.2096], [107.6665, -2.5664], [108.0744, -2.597], [108.2071, -2.9978]]], [[[129.7545, -2.866], [130.3791, -2.9894], [130.8598, -3.5705], [130.8052, -3.8577], [129.8442, -3.3272], [129.4678, -3.4533], [128.9675, -3.3259], [128.4193, -3.416], [128.0819, -3.1843], [128.1987, -2.866], [129.4274, -2.7906], [129.7545, -2.866]]], [[[126.8612, -3.088], [127.2275, -3.3911], [127.2297, -3.6331], [126.6863, -3.8235], [126.1785, -3.5798], [126.0263, -3.1705], [126.8612, -3.088]]], [[[123.1796, -4.551], [123.0553, -4.7481], [122.9856, -5.3935], [122.8121, -5.6714], [122.5843, -5.5445], [122.7663, -5.2102], [122.8533, -4.6185], [123.1796, -4.551]]], [[[122.6452, -5.2692], [122.3961, -5.0699], [122.3691, -4.7672], [122.702, -4.6185], [122.7592, -4.9341], [122.6452, -5.2692]]], [[[140.0488, 75.8289], [140.9442, 75.7004], [141.4853, 76.1372], [142.4605, 75.9035], [143.6856, 75.8636], [145.2552, 75.5857], [144.0199, 75.0446], [141.9873, 74.9913], [139.0993, 74.6566], [138.0922, 74.7973], [137.0064, 75.235], [137.5013, 75.9097], [138.8139, 76.1996], [140.0488, 75.8289]]], [[[146.7951, 75.3709], [150.1039, 75.2193], [150.6463, 74.9445], [149.5969, 74.7725], [148.0926, 74.8258], [146.1483, 75.1984], [146.7951, 75.3709]]], [[[113.3873, 74.4005], [112.7823, 74.0951], [111.6428, 74.2729], [112.0845, 74.549], [113.3873, 74.4005]]], [[[142.1848, 73.8958], [143.3438, 73.5687], [143.1934, 73.2206], [140.6627, 73.4519], [141.0849, 73.8658], [142.1848, 73.8958]]], [[[70.6738, 73.095], [69.996, 73.3594], [70.9402, 73.5145], [71.626, 73.174], [70.6738, 73.095]]], [[[-178.8765, 71.5769], [-177.5322, 71.2631], [-177.8218, 71.0675], [-179.5066, 70.9235], [-180, 70.993], [-180, 71.5378], [-178.8765, 71.5769]]], [[[178.8614, 70.8265], [178.8912, 71.2311], [180, 71.5378], [180, 70.993], [178.8614, 70.8265]]], [[[169.201, 69.5805], [167.789, 69.8369], [168.358, 70.0157], [169.375, 69.8826], [169.201, 69.5805]]], [[[-179.7985, 68.9402], [-178.8738, 68.7542], [-177.4074, 68.2451], [-175.3451, 67.678], [-174.4476, 67.1031], [-173.6796, 67.1449], [-172.6405, 66.9249], [-171.7955, 66.9318], [-170.192, 66.2014], [-170.6663, 65.6217], [-172.2115, 65.4255], [-172.2132, 65.0481], [-172.9239, 64.705], [-173.0091, 64.2975], [-173.7298, 64.3645], [-174.318, 64.6375], [-175.3951, 64.8024], [-175.8538, 65.0109], [-176.0933, 65.471], [-177.0563, 65.6137], [-178.3103, 65.4849], [-178.8794, 65.9364], [-179.7283, 65.8039], [-179.3521, 65.5167], [-180, 65.0672], [-180, 67.0252], [-180, 68.9835], [-179.7985, 68.9402]]], [[[163.635, 58.6033], [163.7615, 59.015], [164.6156, 58.8856], [163.635, 58.6033]]], [[[142.761, 54.3941], [142.9181, 53.7941], [143.2235, 53.2961], [143.3234, 52.6138], [143.1556, 52.0838], [143.4553, 51.4717], [143.8161, 50.2825], [144.272, 49.3113], [143.105, 49.1988], [142.5741, 48.0719], [142.5568, 47.7381], [143.0056, 47.2228], [143.2821, 46.5592], [142.5781, 46.7008], [142.2088, 46.0891], [141.8302, 46.4508], [142.0388, 47.1402], [141.9647, 47.5872], [142.1817, 48.0133], [141.8661, 48.75], [142.1422, 49.5692], [142.0712, 50.5149], [142.2066, 51.2225], [141.7223, 51.7363], [141.661, 52.2729], [141.8035, 52.5557], [141.8235, 53.3394], [142.5262, 53.4475], [142.67, 53.9684], [142.3349, 54.2807], [142.761, 54.3941]]], [[[148.5991, 45.3176], [147.9137, 44.9904], [147.7694, 45.1906], [148.5991, 45.3176]]], [[[143.8241, 44.1169], [144.7985, 43.9402], [145.1012, 43.7644], [145.3471, 43.1767], [144.6307, 42.9468], [143.9693, 42.8815], [143.4295, 42.419], [143.2364, 42.0004], [142.5084, 42.2578], [141.8515, 42.5792], [141.4067, 42.5468], [140.9863, 42.3422], [140.4803, 42.5592], [140.3267, 42.2933], [140.7342, 42.1162], [140.3849, 41.5192], [139.9951, 41.5765], [140.1083, 41.9129], [139.8211, 42.3875], [139.8912, 42.6494], [140.7808, 43.2149], [141.2962, 43.1998], [141.6446, 44.0196], [141.7822, 44.7166], [141.5829, 45.156], [141.9376, 45.5093], [142.7042, 44.8191], [143.8241, 44.1169]]], [[[141.2296, 41.3727], [141.4626, 40.611], [141.7969, 40.2914], [141.978, 39.8444], [141.9007, 39.1115], [141.6584, 38.9748], [141.4675, 38.404], [141.1084, 38.3378], [140.9282, 37.9494], [141.0365, 37.4674], [140.9686, 37.0022], [140.6272, 36.5028], [140.6219, 36.0593], [140.874, 35.7251], [140.4572, 35.5102], [140.3147, 35.1551], [139.7994, 34.9567], [139.6502, 35.409], [139.2494, 35.2781], [138.9826, 34.6984], [138.5773, 35.0863], [138.1889, 34.5963], [136.8848, 34.8058], [136.5332, 34.6784], [136.8537, 34.3242], [136.3299, 34.1768], [135.9162, 33.5615], [135.4528, 33.5531], [135.1753, 33.898], [135.1003, 34.2882], [135.3849, 34.5004], [134.7399, 34.7654], [134.2081, 34.6975], [133.9684, 34.5275], [133.1423, 34.3024], [132.2381, 34.2269], [132.0903, 33.8554], [131.7405, 34.0521], [130.9189, 33.9757], [131.0041, 34.3925], [131.3543, 34.4134], [131.8564, 34.7263], [132.923, 35.5111], [133.3767, 35.4587], [134.2139, 35.5391], [135.1744, 35.7473], [135.68, 35.5031], [136.0955, 35.7677], [136.0063, 35.9905], [136.6983, 36.742], [137.3424, 36.7704], [137.5142, 36.9516], [138.3199, 37.2183], [138.8849, 37.8438], [139.4012, 38.1425], [140.0479, 39.4635], [139.9228, 40.5986], [140.2814, 40.8463], [141.1186, 40.8822], [141.2296, 41.3727]]], [[[134.3572, 34.2562], [134.6373, 34.2265], [134.739, 33.8203], [134.3772, 33.6082], [134.1815, 33.2473], [133.6319, 33.5109], [133.2861, 33.36], [132.9772, 32.842], [132.4951, 32.9166], [132.3659, 33.5123], [132.7841, 33.9926], [133.5822, 34.017], [134.0758, 34.3583], [134.3572, 34.2562]]], [[[131.1745, 33.6024], [131.5829, 33.6525], [131.8968, 33.2548], [131.9767, 32.8438], [131.7321, 32.593], [131.3374, 31.4047], [130.5886, 31.1783], [130.2006, 31.2919], [130.3218, 31.6013], [130.1944, 32.0909], [130.6405, 32.6192], [130.3817, 33.0924], [130.1749, 32.8513], [129.5801, 33.2362], [129.66, 33.3649], [130.3649, 33.6343], [130.4838, 33.8345], [130.953, 33.8718], [131.1745, 33.6024]]], [[[121.009, 22.6205], [120.5815, 22.3564], [120.3258, 22.5424], [120.0724, 23.1496], [120.1589, 23.7089], [121.0405, 25.0326], [121.5936, 25.2754], [121.9292, 24.9736], [121.6393, 24.1302], [121.4773, 23.4239], [121.2957, 22.9667], [121.009, 22.6205]]], [[[96.5265, 81.0755], [97.8316, 80.7983], [97.1751, 80.241], [94.565, 80.126], [93.8725, 80.0102], [91.5239, 80.3584], [93.2626, 80.7912], [93.0651, 80.9885], [95.8008, 81.2804], [96.5265, 81.0755]]], [[[97.6745, 80.1582], [100.0613, 79.7771], [99.4394, 78.8341], [97.5555, 78.8266], [94.6524, 79.1275], [93.0708, 79.4953], [94.9867, 80.0967], [97.6745, 80.1582]]], [[[102.8849, 79.254], [105.146, 78.8188], [105.3125, 78.4998], [103.7194, 78.2581], [101.2043, 78.192], [100.2841, 78.6792], [101.5905, 79.3503], [102.8849, 79.254]]], [[[34.9041, 29.4773], [34.1983, 31.3226], [34.6786, 31.8956], [35.2512, 33.3924], [35.6481, 34.2483], [35.9779, 34.5474], [35.9433, 35.2239], [35.7644, 35.5715], [35.8927, 35.9164], [36.1275, 35.8316], [36.5376, 36.4575], [36.6584, 36.8024], [37.4365, 36.6435], [38.1916, 36.9014], [38.7669, 36.6932], [39.3568, 36.6817], [40.0164, 36.8259], [40.7058, 37.0976], [41.5154, 37.0892], [42.7748, 37.3719], [43.5161, 37.2445], [44.1562, 37.2831], [44.2818, 36.9782], [44.794, 37.2902], [44.5614, 37.7448], [44.2112, 37.9081], [44.4309, 38.3569], [44.023, 39.3774], [44.3892, 39.4223], [44.5872, 39.7685], [45.4798, 39.0063], [46.1701, 38.8692], [46.555, 38.9042], [46.8528, 39.1484], [47.773, 39.6486], [47.9958, 39.6842], [48.2422, 38.9788], [48.0234, 38.819], [48.5929, 38.4111], [48.8685, 38.4355], [49.0811, 37.6676], [49.47, 37.4967], [50.1305, 37.407], [50.5331, 37.0137], [51.1186, 36.7425], [52.1902, 36.6217], [54.0172, 36.9524], [53.8237, 37.9281], [53.8685, 38.9491], [53.6177, 39.2158], [53.125, 39.432], [53.4721, 39.6686], [53.4042, 39.9603], [52.9874, 39.9878], [52.7335, 40.3988], [53.1454, 40.825], [53.6151, 40.8183], [53.8699, 40.6487], [54.7101, 40.8911], [54.5921, 41.1934], [54.0949, 41.5192], [53.8463, 42.0914], [53.1641, 42.0936], [52.6096, 41.5294], [52.4623, 42.1007], [52.5968, 42.7603], [51.8439, 42.9104], [51.3019, 43.4825], [50.8305, 44.1928], [50.3311, 44.3255], [50.4093, 44.6242], [50.8603, 44.6287], [51.4156, 45.358], [52.5311, 45.3988], [52.7739, 45.5728], [53.1352, 46.1916], [53.1703, 46.6692], [52.9159, 46.9542], [52.1888, 46.8397], [51.1781, 47.11], [50.4195, 46.8796], [50, 46.6342], [49.3475, 46.5192], [49.2321, 46.3372], [48.6102, 46.5663], [48.9595, 46.7744], [48.1099, 47.7452], [47.0934, 47.9476], [47.0042, 48.2846], [46.661, 48.4124], [46.7028, 48.8055], [47.0144, 49.0987], [46.8022, 49.367], [46.9917, 49.8526], [47.3264, 50.2734], [47.706, 50.378], [48.4344, 49.8284], [48.8432, 50.0131], [48.8086, 50.6012], [49.498, 51.0835], [50.2468, 51.2895], [50.7941, 51.7292], [51.6091, 51.4839], [52.3309, 51.6812], [52.571, 51.4817], [53.3381, 51.4824], [54.0416, 51.1153], [54.4216, 50.7803], [54.727, 50.9981], [55.5424, 50.6017], [55.7977, 50.6021], [56.4915, 51.0196], [57.0117, 51.0651], [57.4423, 50.8889], [57.8387, 51.0917], [58.3594, 51.0638], [58.8836, 50.6945], [59.8122, 50.5819], [59.9552, 50.7992], [60.6379, 50.6638], [61.3894, 50.8609], [61.5851, 51.23], [61.3632, 51.442], [60.4648, 51.6513], [60.0657, 51.9766], [60.1789, 52.009], [59.707, 52.4616], [59.0372, 52.607], [59.0052, 53.1794], [59.4083, 53.6477], [59.8828, 53.9417], [59.6294, 54.3086], [58.9546, 54.5315], [57.6207, 53.983], [56.9735, 54.4686], [56.084, 55.3471], [58.0984, 55.5504], [58.6901, 56.0873], [58.58, 56.5143], [57.8276, 56.859], [58.0265, 57.3293], [58.7984, 57.8522], [59.4318, 58.5187], [60.0644, 59.4402], [60.5424, 61.0083], [61.2167, 64.2824], [63.0824, 64.9054], [64.8011, 65.7162], [66.2021, 66.1716], [67.5444, 66.7227], [68.2688, 67.2858], [67.8751, 68.4763], [68.3714, 68.3143], [69.1406, 68.9506], [68.5427, 68.967], [68.006, 69.48], [67.0645, 69.6937], [66.9265, 70.0142], [67.2847, 70.7386], [66.6664, 70.9006], [66.9176, 71.2824], [68.2693, 71.6828], [69.039, 72.67], [69.6449, 72.8975], [71.5004, 72.9137], [72.8121, 72.6915], [72.6243, 72.0794], [71.9118, 71.5478], [72.5812, 71.1512], [72.7002, 70.4574], [72.4694, 70.275], [72.5275, 69.0805], [73.548, 68.5744], [73.1521, 67.8651], [72.5946, 67.587], [71.5514, 66.7605], [70.9393, 66.5481], [69.877, 66.8455], [69.1943, 66.5787], [70.3396, 66.3423], [71.9172, 66.2467], [72.4174, 66.5607], [73.7922, 66.9953], [74.0745, 67.4141], [74.7696, 67.7663], [74.3914, 68.4206], [74.5796, 68.7511], [76.4591, 68.9784], [77.2385, 68.4697], [77.6509, 68.9029], [76.0005, 69.2349], [74.8145, 69.0907], [73.7757, 69.1983], [73.56, 69.7072], [74.3111, 70.6538], [73.0864, 71.4448], [73.6719, 71.845], [75.7413, 72.2962], [75.2472, 71.8135], [75.332, 71.3416], [76.1106, 71.2185], [77.4809, 71.3115], [76.3121, 71.5956], [76.0325, 71.9103], [78.4828, 72.395], [79.4221, 72.3808], [80.7626, 72.0892], [81.511, 71.7463], [82.9861, 71.7487], [82.1835, 72.2376], [80.827, 72.4882], [80.5096, 73.0861], [80.5833, 73.5684], [83.5449, 73.6665], [86.5914, 73.8942], [86.6513, 74.6824], [87.6713, 75.1296], [90.1851, 75.591], [93.5498, 75.854], [94.5756, 76.1517], [96.879, 75.931], [98.6621, 76.2427], [98.8055, 76.4806], [100.3223, 76.479], [101.0991, 76.7041], [100.9899, 76.9904], [103.1312, 77.6265], [104.0146, 77.7304], [105.8944, 77.4889], [104.9121, 77.1748], [105.712, 77.0015], [107.4299, 76.9265], [108.0278, 76.7185], [111.1151, 76.7229], [112.6194, 76.3836], [113.8712, 75.856], [113.6137, 75.2929], [111.8683, 74.7403], [109.8402, 74.3219], [108.1996, 73.6941], [107.271, 73.621], [106.4782, 73.1394], [107.7504, 73.1731], [109.8553, 73.4725], [110.2615, 74.0174], [112.1471, 73.7089], [114.0607, 73.5846], [115.3378, 73.7025], [118.4504, 73.5897], [118.4304, 73.2466], [119.7505, 72.9792], [123.1605, 72.955], [123.6222, 73.1933], [123.3052, 73.5331], [124.3883, 73.7549], [125.617, 73.5207], [127.7406, 73.4816], [128.8885, 73.1902], [129.4118, 72.3155], [128.3589, 72.0883], [129.7621, 71.1195], [131.1572, 70.7419], [131.5621, 70.9011], [132.5621, 71.8952], [133.4264, 71.491], [134.1029, 71.3789], [135.8847, 71.6306], [137.3153, 71.3594], [138.1183, 71.5663], [139.695, 71.7003], [139.6014, 72.496], [142.0614, 72.7208], [145.4856, 72.5422], [146.594, 72.3027], [148.402, 72.312], [149.5015, 72.1644], [150.5997, 71.5201], [151.5825, 71.287], [152.5089, 70.8345], [153.7944, 70.88], [155.8949, 71.0955], [158.0371, 71.0394], [159.3506, 70.7908], [160.0062, 70.3096], [159.8327, 69.7849], [161.5368, 69.3796], [162.3757, 69.6491], [164.1597, 69.7192], [164.5135, 69.6091], [166.8204, 69.4995], [167.6287, 69.7403], [168.303, 69.2716], [169.3106, 69.0796], [169.6098, 68.7862], [170.5376, 68.8254], [170.9952, 69.0454], [170.5824, 69.5834], [170.4869, 70.1076], [172.5595, 69.9682], [173.2773, 69.8238], [176.1075, 69.8604], [176.9243, 69.646], [178.8485, 69.3872], [180, 68.9835], [180, 65.0672], [178.5196, 64.6029], [177.4672, 64.7368], [177.433, 64.4445], [178.6501, 63.9653], [178.7065, 63.5216], [179.3324, 63.1902], [179.5703, 62.6875], [179.1206, 62.3204], [177.3513, 62.5874], [175.2681, 62.1025], [174.5144, 61.8237], [173.6235, 61.7161], [172.856, 61.4693], [172.3926, 61.0618], [170.6081, 60.435], [169.9827, 60.067], [169.2267, 60.5959], [168.1374, 60.5739], [166.9642, 60.3069], [166.3521, 60.4847], [165.0843, 60.0985], [163.7802, 60.041], [163.41, 59.8349], [163.2728, 59.3026], [162.1418, 58.4475], [161.9602, 58.0768], [162.4672, 57.7661], [163.2138, 57.6869], [162.7792, 57.3577], [162.8027, 56.8113], [163.2564, 56.6881], [163.3354, 56.2324], [163.0473, 56.0447], [162.5284, 56.2606], [162.085, 56.0897], [161.7294, 55.358], [162.1058, 54.7521], [161.7259, 54.533], [160.7733, 54.5414], [160.0746, 54.1892], [159.8437, 53.7837], [159.8975, 53.3807], [158.6088, 52.8735], [158.4637, 52.3049], [158.1037, 51.8095], [156.7476, 50.9692], [156.5004, 51.475], [156.3645, 52.5093], [156.0986, 53.0065], [155.6201, 54.8646], [155.5549, 55.3484], [155.9828, 56.6952], [156.7285, 57.1522], [156.9767, 57.4662], [156.7915, 57.7479], [157.4503, 57.7994], [158.2102, 58.0253], [159.0368, 58.4239], [159.8473, 59.1271], [160.8554, 59.6269], [161.7534, 60.1522], [162.0037, 60.4201], [162.9732, 60.7828], [163.71, 60.9168], [164.0052, 61.3439], [164.2556, 62.6966], [163.3319, 62.5508], [163.0091, 61.7915], [162.3926, 61.6621], [160.7666, 60.7533], [159.8833, 61.2917], [160.3174, 61.7933], [159.5526, 61.7194], [159.0767, 61.9223], [158.07, 61.7536], [157.4694, 61.7989], [156.6801, 61.4806], [156.63, 61.2724], [155.8532, 60.7772], [154.9707, 60.3766], [154.2929, 59.8333], [154.5827, 59.5401], [155.1669, 59.3601], [154.011, 59.0756], [153.3612, 59.2147], [152.8822, 58.9391], [151.3268, 58.8752], [151.99, 59.1601], [151.4857, 59.5241], [150.4572, 59.5907], [149.6427, 59.7705], [149.205, 59.4882], [147.8746, 59.3881], [147.5146, 59.2687], [146.4444, 59.4305], [145.9317, 59.1983], [145.5544, 59.4136], [143.192, 59.3701], [142.0255, 58.9997], [141.7547, 58.7453], [140.6849, 58.2122], [140.447, 57.8136], [140.0022, 57.6875], [138.6621, 56.9658], [137.6913, 56.1395], [136.175, 55.3522], [135.2623, 54.9434], [135.2579, 54.7314], [135.8514, 54.5838], [136.7973, 54.6209], [136.6828, 53.9313], [137.1555, 53.8217], [137.3282, 53.5389], [138.2923, 53.5924], [138.6608, 53.7449], [138.6958, 54.3199], [139.3195, 54.193], [139.7075, 54.2771], [140.3471, 53.8126], [141.4023, 53.184], [141.1697, 52.3684], [141.4853, 52.1786], [140.6876, 51.2322], [140.4763, 50.546], [140.5171, 49.596], [140.1705, 48.5238], [139.3723, 47.8873], [139.0012, 47.3835], [138.5866, 47.0572], [138.3367, 46.5432], [137.6855, 45.8183], [136.8035, 45.1711], [136.1421, 44.4893], [135.8745, 44.3734], [135.4834, 43.835], [135.1309, 43.5256], [133.7092, 42.83], [133.1601, 42.6968], [132.4814, 42.9099], [132.3344, 43.2388], [131.7947, 43.2553], [131.1586, 42.6258], [130.8341, 42.5228], [130.0684, 42.0457], [129.7563, 41.7123], [129.7088, 40.8574], [128.3043, 40.0362], [127.5684, 39.7818], [127.3944, 39.2079], [127.7863, 39.084], [128.3745, 38.6233], [128.6191, 38.1763], [129.335, 37.2747], [129.4735, 36.742], [129.4034, 36.0522], [129.5619, 35.9475], [129.2143, 35.1818], [128.5112, 35.101], [128.4442, 34.8706], [127.7148, 34.9545], [127.0308, 34.6069], [126.4817, 34.4937], [126.2913, 35.1542], [126.7174, 35.769], [126.5483, 36.4775], [126.2172, 36.8708], [126.8688, 36.9755], [126.5727, 37.7967], [125.9419, 37.8735], [125.4492, 37.7301], [125.1931, 38.0378], [124.6911, 38.1292], [125.0675, 38.5567], [125.4097, 39.2882], [125.3609, 39.5266], [124.2676, 39.9243], [123.3483, 39.7632], [122.3349, 39.3663], [121.6499, 38.8652], [121.7853, 39.4009], [121.5177, 39.6389], [122.2749, 40.5418], [121.859, 40.8423], [121.1745, 40.9013], [120.479, 40.231], [119.5912, 39.9025], [119.2245, 39.4081], [118.9125, 39.1666], [118.2977, 39.0671], [117.7845, 39.1346], [117.5577, 38.625], [118.0149, 38.1834], [118.94, 38.0426], [119.0891, 37.7008], [118.9529, 37.3311], [119.45, 37.1247], [120.3702, 37.7008], [120.7502, 37.834], [121.6402, 37.4603], [122.6025, 37.4265], [122.5195, 36.9467], [121.9327, 36.9595], [120.9899, 36.5978], [120.3933, 36.054], [120.0546, 35.8614], [119.2156, 35.0117], [119.5827, 34.5821], [120.2015, 34.3255], [120.5047, 33.6383], [120.8709, 33.0165], [120.8532, 32.6613], [121.4009, 32.3719], [121.3521, 31.8588], [121.0556, 31.7194], [121.661, 31.3199], [121.8781, 30.9164], [120.9974, 30.5582], [121.1594, 30.3012], [121.9442, 29.8941], [121.7174, 29.2562], [121.602, 28.3667], [121.0986, 28.2903], [120.2788, 27.0971], [119.6484, 25.9186], [119.5392, 25.5915], [119.0252, 25.2235], [118.9089, 24.9287], [118.5605, 24.5803], [118.0873, 24.6269], [118.0562, 24.246], [117.6283, 23.8368], [117.4663, 23.8408], [116.5381, 23.1798], [116.4706, 22.9459], [115.4985, 22.719], [115.1958, 22.8171], [114.854, 22.6169], [114.6515, 22.7554], [114.268, 22.2956], [113.8965, 22.4283], [113.5494, 22.225], [112.3051, 21.7416], [111.9438, 21.8495], [111.6029, 21.5591], [110.771, 21.3865], [110.1935, 21.0376], [110.1802, 20.8587], [110.5114, 20.5182], [110.123, 20.2639], [109.6626, 20.9168], [109.9308, 21.4806], [109.5441, 21.5378], [109.1486, 21.4255], [109.0305, 21.6266], [108.3248, 21.6936], [107.4099, 21.2848], [107.3544, 21.0553], [106.6752, 20.9603], [106.7534, 20.7348], [106.5181, 20.2887], [105.9841, 19.9389], [105.6214, 18.9664], [105.8882, 18.5025], [106.4986, 17.9463], [106.479, 17.7195], [107.1804, 16.8983], [108.0296, 16.331], [108.6741, 15.4836], [108.8215, 15.3779], [109.0847, 14.7161], [109.3035, 13.8563], [109.272, 13.2792], [109.4238, 12.9561], [109.2188, 12.6458], [109.1988, 11.7247], [108.8206, 11.3154], [108.2715, 10.9341], [107.2616, 10.3984], [106.8129, 10.4334], [106.7853, 10.1165], [106.5075, 9.8213], [106.5723, 9.6411], [105.5012, 9.0933], [105.3223, 8.8012], [104.8921, 8.5833], [104.8184, 8.8017], [104.8451, 9.606], [105.028, 10.0672], [104.6635, 10.1698], [104.2623, 10.5413], [103.532, 10.6048], [103.722, 10.8902], [103.5325, 11.1468], [103.153, 10.9137], [103.1254, 11.4606], [102.7628, 12.0124], [101.7236, 12.6893], [101.4449, 12.6187], [100.8634, 12.7146], [100.9624, 13.4319], [100.6561, 13.5211], [100.0173, 13.3534], [100.0901, 13.0457], [99.964, 12.6902], [99.9889, 12.1708], [99.6271, 11.4628], [99.4869, 10.8898], [99.165, 10.3198], [99.161, 9.7339], [99.3936, 9.2136], [99.7239, 9.3144], [99.9046, 9.1129], [99.9605, 8.6712], [100.2792, 8.2686], [100.4537, 7.4425], [100.5864, 7.1762], [101.0178, 6.861], [101.4977, 6.8654], [101.7991, 6.4744], [102.3402, 6.1721], [102.5342, 5.8627], [102.9825, 5.5249], [103.4158, 4.8502], [103.4686, 4.3934], [103.362, 3.7693], [103.4535, 3.5207], [103.4397, 2.933], [103.8121, 2.5805], [104.2884, 1.4806], [103.6945, 1.4495], [102.7273, 1.8557], [101.2953, 2.8851], [101.2997, 3.2535], [100.7156, 3.9664], [100.6143, 4.6522], [100.3525, 5.5875], [100.3431, 5.9843], [100.119, 6.442], [99.6959, 6.8765], [99.7203, 7.106], [99.051, 7.8877], [98.5791, 8.3445], [98.2377, 8.423], [98.2417, 8.7684], [98.5618, 9.8373], [98.465, 10.6758], [98.6754, 10.987], [98.7416, 11.5916], [98.6364, 11.7385], [98.6963, 12.2254], [98.576, 13.162], [98.2453, 13.7333], [97.8121, 14.859], [97.7104, 15.8756], [97.5843, 16.0194], [97.6194, 16.5374], [97.3757, 16.5227], [97.1782, 17.0621], [96.97, 17.3173], [96.8106, 16.7784], [96.6224, 16.564], [95.7635, 16.169], [95.3897, 15.7229], [94.9432, 15.8183], [94.5876, 16.2888], [94.2143, 16.1268], [94.589, 17.5694], [94.4309, 18.2015], [94.07, 18.8936], [93.7056, 19.0267], [93.9981, 19.4409], [93.3625, 20.0583], [93.002, 20.0748], [92.6079, 20.4698], [92.0561, 21.1747], [92.0082, 21.6848], [91.693, 22.5046], [91.4094, 22.7972], [90.9455, 22.597], [90.6334, 23.0946], [90.435, 22.7519], [90.5895, 22.2583], [90.1589, 21.817], [89.8118, 21.9835], [89.0518, 21.6541], [88.2537, 21.6222], [87.9483, 21.8255], [87.678, 21.6537], [87.1005, 21.5006], [86.8595, 21.2369], [86.9753, 20.7002], [86.7503, 20.3131], [86.2793, 19.9194], [85.5748, 19.693], [84.771, 19.1253], [84.1042, 18.2925], [83.6541, 18.0697], [83.1982, 17.609], [82.3597, 17.0963], [82.259, 16.56], [81.7618, 16.3297], [81.2385, 16.264], [80.9788, 15.7584], [80.6468, 15.8951], [80.2934, 15.7109], [80.0533, 15.0739], [80.1656, 14.5776], [80.1119, 14.2123], [80.3422, 13.3613], [80.229, 12.6902], [79.8584, 11.9888], [79.7541, 11.5751], [79.8486, 11.1969], [79.838, 10.3225], [79.3905, 10.3065], [78.9964, 9.6833], [78.9795, 9.2687], [78.4215, 9.1049], [78.1925, 8.8909], [78.0602, 8.3844], [77.5178, 8.0781], [76.9669, 8.4071], [76.5536, 8.9029], [76.3246, 9.452], [76.3463, 9.9221], [75.9224, 10.7841], [75.724, 11.3616], [75.1966, 12.0576], [74.7701, 13.0773], [74.6711, 13.6676], [74.3821, 14.4946], [73.9493, 15.0748], [73.932, 15.397], [73.4761, 16.0544], [73.3376, 16.4597], [73.1561, 17.6218], [72.8711, 18.6832], [72.8116, 19.2988], [72.6678, 19.8311], [72.8809, 20.5631], [72.8138, 21.117], [72.5431, 21.6968], [72.5901, 22.2783], [72.3327, 22.2703], [72.037, 21.8233], [72.2541, 21.5312], [72.0153, 21.1556], [71.0245, 20.7388], [70.7191, 20.7406], [70.1274, 21.0948], [69.0088, 22.1966], [70.1771, 22.5726], [70.2512, 22.9707], [69.6644, 22.759], [69.2361, 22.8487], [68.6408, 23.19], [68.4175, 23.5713], [68.0371, 23.8483], [67.6687, 23.811], [67.3096, 24.175], [67.1715, 24.7561], [66.7032, 24.8608], [66.6988, 25.2261], [66.4284, 25.5755], [65.6796, 25.3553], [64.7767, 25.3074], [64.6591, 25.184], [63.7207, 25.3859], [63.4912, 25.2106], [62.5724, 25.2545], [62.3153, 25.1347], [61.4116, 25.1023], [60.6641, 25.2821], [59.4562, 25.4814], [59.0461, 25.4175], [58.7979, 25.5546], [57.7961, 25.6532], [57.3344, 25.7917], [56.9824, 26.9054], [56.8129, 27.09], [56.3561, 27.2001], [55.6503, 26.9777], [54.8957, 26.5565], [54.6449, 26.509], [54.2472, 26.6968], [53.7056, 26.7256], [53.4548, 26.9431], [52.6918, 27.3235], [52.476, 27.6165], [52.0308, 27.8242], [51.6664, 27.8451], [51.2789, 28.1314], [51.0622, 28.7262], [50.6752, 29.1466], [50.6499, 29.42], [49.9831, 30.2093], [49.5548, 30.0291], [48.9169, 30.397], [48.9191, 30.1209], [48.4544, 29.9385], [47.9825, 30.0113], [47.9696, 29.6167], [48.1836, 28.9793], [48.9067, 27.6289], [49.4052, 27.1815], [49.9858, 26.829], [50.214, 26.3083], [50.0315, 26.1108], [50.5584, 25.0868], [51.0032, 25.9816], [51.2624, 26.1534], [51.543, 25.9022], [51.4853, 25.5249], [51.5869, 24.9647], [51.3099, 24.3406], [51.7676, 24.2545], [51.9061, 23.9855], [52.6483, 24.1546], [53.8934, 24.0769], [54.3972, 24.278], [54.747, 24.8102], [55.0981, 25.0415], [55.5229, 25.4982], [55.9411, 25.7939], [56.1643, 26.2071], [56.4298, 26.327], [56.373, 25.0184], [56.6406, 24.4702], [57.2199, 23.9229], [58.5782, 23.6437], [59.5352, 22.5783], [59.8233, 22.5091], [59.7998, 22.2201], [59.3715, 21.4988], [58.8956, 21.1126], [58.4743, 20.4068], [57.8618, 20.2439], [57.7153, 19.6069], [57.8116, 19.017], [57.1764, 18.9025], [56.6553, 18.5873], [56.551, 18.166], [56.2704, 17.9507], [55.4785, 17.8433], [55.0644, 17.039], [54.0683, 17.0057], [53.6097, 16.7598], [52.5812, 16.4704], [52.3278, 16.2937], [52.1742, 15.9568], [52.2177, 15.6554], [51.6038, 15.3367], [50.5269, 15.0384], [50.1669, 14.851], [49.3497, 14.638], [49.0483, 14.4564], [48.6683, 14.0503], [47.9901, 14.048], [47.4077, 13.6614], [46.7889, 13.4657], [45.6574, 13.3387], [45.0386, 12.8158], [44.6178, 12.8171], [43.9298, 12.6165], [43.4752, 12.8389], [43.232, 13.2672], [43.2826, 13.6397], [43.089, 14.0108], [43.0211, 14.555], [42.7171, 15.6545], [42.8396, 16.0322], [42.6989, 16.7371], [42.3833, 17.1224], [42.294, 17.4349], [41.7498, 17.8855], [41.2296, 18.6783], [41.1159, 19.0822], [40.7591, 19.7556], [40.0808, 20.2661], [39.6138, 20.5178], [39.0936, 21.3101], [38.9879, 21.8819], [39.0958, 22.3928], [38.9413, 22.8819], [38.4641, 23.712], [37.9195, 24.1852], [37.5431, 24.2917], [37.1808, 24.82], [37.1489, 25.2909], [36.7627, 25.7513], [36.2496, 26.5947], [35.5815, 27.4323], [35.1807, 28.0346], [34.616, 28.1483], [34.7798, 28.5074], [34.9041, 29.4773]]], [[[134.747, -5.7069], [134.7559, -6.1708], [134.4411, -6.335], [134.3018, -6.0097], [134.3413, -5.7127], [134.747, -5.7069]]], [[[107.3739, -6.0074], [107.6669, -6.2156], [108.295, -6.2649], [108.6776, -6.7905], [110.4261, -6.9472], [110.7369, -6.4722], [111.1546, -6.6693], [111.5403, -6.6484], [112.0872, -6.8934], [112.5391, -6.9263], [112.7943, -7.5526], [113.2484, -7.7182], [114.0705, -7.633], [114.4442, -7.8958], [114.387, -8.4053], [114.5836, -8.7698], [113.2533, -8.2868], [112.6789, -8.4093], [111.5101, -8.305], [110.6072, -8.1501], [110.0386, -7.8904], [109.2818, -7.7049], [108.7411, -7.6671], [108.4517, -7.7968], [107.9173, -7.724], [107.2852, -7.4718], [106.6317, -7.4155], [106.5199, -7.0537], [105.4838, -6.7816], [105.8683, -6.1166], [106.0751, -5.9142], [106.8253, -6.0984], [107.0463, -5.9045], [107.3739, -6.0074]]], [[[134.5366, -6.4424], [134.3559, -6.8149], [134.0589, -6.7692], [134.1681, -6.1761], [134.5366, -6.4424]]], [[[113.8445, -7.1052], [113.4708, -7.2184], [112.7637, -7.1398], [112.868, -6.9001], [113.9746, -6.873], [113.8445, -7.1052]]], [[[131.3255, -7.9996], [131.0866, -7.8651], [131.2602, -7.4705], [131.5607, -7.1358], [131.6912, -7.439], [131.3255, -7.9996]]], [[[138.5352, -8.2735], [138.2963, -8.4053], [137.6851, -8.2624], [138.0074, -7.6414], [138.2955, -7.4385], [138.77, -7.3906], [138.9893, -7.696], [138.5352, -8.2735]]], [[[126.8009, -7.668], [126.4719, -7.9504], [125.8434, -7.8167], [126.6096, -7.5717], [126.8009, -7.668]]], [[[115.4479, -8.155], [115.7045, -8.4071], [115.2362, -8.7977], [114.4753, -8.1195], [115.4479, -8.155]]], [[[118.2426, -8.3179], [118.9879, -8.3379], [119.0061, -8.7498], [118.2342, -8.808], [117.0614, -9.0991], [116.7884, -9.0064], [116.8351, -8.5323], [117.1649, -8.3672], [117.567, -8.4266], [118.1175, -8.1221], [118.2426, -8.3179]]], [[[122.7828, -8.6117], [121.6513, -8.899], [121.0352, -8.9353], [119.8078, -8.6974], [119.9183, -8.4453], [120.6104, -8.2407], [121.4444, -8.578], [121.9664, -8.4551], [122.263, -8.6251], [122.6034, -8.4027], [122.7828, -8.6117]]], [[[116.6406, -8.614], [116.3774, -8.9291], [116.0764, -8.7449], [116.0613, -8.4373], [116.4014, -8.2043], [116.7343, -8.3871], [116.6406, -8.614]]], [[[127.2963, -8.4244], [126.915, -8.7152], [126.3823, -8.9575], [125.4079, -9.2758], [124.4274, -10.1485], [123.8574, -10.3438], [123.5893, -9.967], [123.7092, -9.6149], [123.9773, -9.373], [124.5756, -9.1555], [125.178, -8.6477], [125.8043, -8.4923], [126.6198, -8.4595], [126.9664, -8.3157], [127.2963, -8.4244]]], [[[120.0124, -9.3748], [120.5038, -9.674], [120.8327, -10.0375], [120.439, -10.2941], [120.1447, -10.2], [119.6009, -9.7734], [119.0856, -9.7068], [119.1855, -9.3846], [120.0124, -9.3748]]]] }, \"properties\": { \"name\": \"Asia\", \"id\": \"asia\" }, \"id\": \"asia\" }\r\n ] };\r\nexport default map;\r\n","declare const bootstrap: any;\n\nimport * as am5 from \"@amcharts/amcharts5\";\nimport * as am5radar from \"@amcharts/amcharts5/radar\";\nimport * as am5xy from \"@amcharts/amcharts5/xy\";\nimport * as am5map from \"@amcharts/amcharts5/map\";\n\nimport am5themes_Animated from \"@amcharts/amcharts5/themes/Animated\";\nimport am5themes_Dark from \"@amcharts/amcharts5/themes/Dark\";\n\nimport am5geodata_continentsLow from \"@amcharts/amcharts5-geodata/continentsLow\";\n\nexport class Banner {\n\n static new(): Banner {\n const x = new this(true);\n x._afterNew();\n return x;\n }\n\n constructor(isReal: boolean) {\n if (!isReal) {\n throw new Error(\"You cannot use `new Class()`, instead use `Class.new()`\");\n }\n }\n\n protected _afterNew() {\n\n var root = am5.Root.new(\"introchart\");\n root.container.set(\"minWidth\", 400);\n\n const myTheme = am5.Theme.new(root);\n\n myTheme.rule(\"Label\").setAll({\n fontSize: 9\n });\n\n root.setThemes([am5themes_Animated.new(root), am5themes_Dark.new(root), myTheme]);\n\n var previousSelectedId: any;\n var currentIndex: number = -1;\n var selectCountryInterval: any;\n var colorSet = am5.ColorSet.new(root, {})\n var continents = [\"europe\", \"asia\", \"northAmerica\", \"southAmerica\", \"oceania\", \"africa\"];\n var continentNames: any = { europe: \"Europe\", asia: \"Asia\", northAmerica: \"North America\", southAmerica: \"South America\", oceania: \"Oceania\", africa: \"Africa\" };\n\n var lineSeries: any = {};\n var radarRangeFills: any = {};\n var polygonSeries: any;\n var mapChart: any;\n var gaugeSeries: any;\n var radarGauge: any;\n var globeContainer: any;\n\n var colors: any = {\n europe: colorSet.next(),\n asia: colorSet.next(),\n northAmerica: colorSet.next(),\n southAmerica: colorSet.next(),\n oceania: colorSet.next(),\n africa: colorSet.next(),\n antarctica: am5.color(0x444444)\n }\n\n\n var categoryAxis: any;\n var continentsData = [\n { name: \"Europe\", id: \"europe\", count: 20 },\n { name: \"Asia\", id: \"asia\", count: 30 },\n { name: \"North America\", id: \"northAmerica\", count: 10 },\n { name: \"South America\", id: \"southAmerica\", count: 15 },\n { name: \"Oceania\", id: \"oceania\", count: 10 },\n { name: \"Africa\", id: \"africa\", count: 25 }\n ]\n var continentStartCategory: any = {};\n var continentEndCategory: any = {};\n\n makeLineSeriesChart();\n\n var mainContainer = root.container.children.push(am5.Container.new(root, {\n height: am5.p100,\n width: am5.p100,\n layout: root.horizontalLayout\n }))\n\n mainContainer.events.on(\"boundschanged\", function() {\n var width = mainContainer.width();\n if (width < 1000) {\n radarGauge.hide();\n if (width < 400) {\n globeContainer.hide(0);\n }\n else {\n if (globeContainer.isHidden()) {\n globeContainer.show(0);\n }\n }\n }\n else {\n if (radarGauge.isHidden()) {\n radarGauge.show();\n }\n }\n })\n\n var bg = am5.Rectangle.new(root, {\n fillOpacity: 0.0, fill: am5.color(0xff0000), cursorOverStyle: \"pointer\"\n })\n\n var navContainer = mainContainer.children.push(am5.Container.new(root, {\n height: am5.p100,\n width: am5.p100,\n minWidth: 400,\n centerY: am5.p50,\n y: am5.p50,\n layout: root.horizontalLayout,\n background: bg,\n setStateOnChildren: true\n }))\n\n navContainer.events.on(\"click\", function() {\n window.location.href = \"https://www.amcharts.com\"\n })\n\n navContainer.events.on(\"pointerover\", function() {\n label.hover();\n })\n\n navContainer.events.on(\"pointerout\", function() {\n label.unhover();\n })\n\n\n var navChartsContainer = navContainer.children.push(am5.Container.new(root, {\n height: am5.p100,\n centerY: am5.p50,\n y: am5.p50,\n centerX: am5.p50,\n x: am5.p50,\n layout: root.horizontalLayout\n }))\n\n\n var label = navChartsContainer.children.push(am5.Label.new(root, {\n text: \"Looking for a new\\ndata-viz library? Try\",\n fontSize: \"1.5em\",\n opacity: 0.7,\n centerY: am5.p50,\n y: am5.p50\n }))\n\n label.states.create(\"hover\", {\n opacity: 1\n })\n\n label.states.create(\"default\", {\n opacity: .7\n })\n\n const logo = navChartsContainer.children.push(am5.Container.new(root, {\n setStateOnChildren: true,\n paddingTop: 9,\n paddingRight: 9,\n paddingBottom: 9,\n paddingLeft: 9,\n scale: 1.4,\n dy: -11,\n y: am5.p50,\n marginLeft: -15,\n centerY: am5.p50\n }));\n\n logo.states.create(\"hover\", {});\n\n const m = logo.children.push(am5.Graphics.new(root, {\n stroke: am5.color(0xffffff),\n strokeWidth: 3,\n svgPath: \"M5 25 L13 25h13.6c3.4 0 6 0 10.3-4.3s5.2-12 8.6-12c3.4 0 4.3 8.6 7.7 8.6M83.4 25H79.8c-3.4 0-6 0-10.3-4.3s-5.2-12-8.6-12-4.3 8.6-7.7 8.6\"\n }));\n\n m.states.create(\"hover\", { stroke: am5.color(0x3CABFF) });\n\n logo.children.push(am5.Graphics.new(root, {\n stroke: am5.color(0x72acfe),\n strokeWidth: 3,\n svgPath: \"M83.4 25h-31C37 25 39.5 4.4 28.4 4.4S18.9 24.2 4.3 25H0\"\n }));\n\n logo.children.push(am5.Label.new(root, {\n text: \"AM[Bold #ffffff]CHARTS[/]\",\n fontSize: 10.5,\n fontFamily: \"Verdana\",\n dy: 20\n }))\n\n\n\n\n\n var container = mainContainer.children.push(am5.Container.new(root, {\n height: am5.p100,\n layout: root.horizontalLayout\n }))\n\n function makeRadarChart() {\n globeContainer = container.children.push(am5.Container.new(root, {\n height: 200,\n width: 200,\n marginRight: 100,\n marginLeft: 50,\n centerY: am5.p50,\n y: am5.p50\n }))\n\n // Create chart\n // https://www.amcharts.com/docs/v5/charts/radar-chart/\n var chart = globeContainer.children.push(am5radar.RadarChart.new(root, {\n panX: false,\n panY: false,\n innerRadius: 128,\n radius: 180\n }));\n\n chart.radarContainer.children.setIndex(0, am5.Circle.new(root, {\n radius: 125,\n fillOpacity: 1,\n fill: am5.color(0x111111)\n }))\n\n chart.zoomOutButton.set(\"forceHidden\", true);\n\n // Create axes and their renderers\n // https://www.amcharts.com/docs/v5/charts/radar-chart/#Adding_axes\n var xRenderer = am5radar.AxisRendererCircular.new(root, {\n strokeOpacity: 0\n });\n\n xRenderer.labels.template.setAll({\n forceHidden: true\n });\n\n xRenderer.grid.template.setAll({\n forceHidden: true\n });\n\n var yRenderer = am5radar.AxisRendererRadial.new(root, {\n strokeOpacity: 0\n });\n\n yRenderer.labels.template.setAll({\n forceHidden: true\n });\n\n yRenderer.grid.template.setAll({\n forceHidden: true\n });\n\n categoryAxis = chart.xAxes.push(am5xy.CategoryAxis.new(root, {\n maxDeviation: 0,\n categoryField: \"category\",\n renderer: xRenderer\n }));\n\n var valueAxis = chart.yAxes.push(am5xy.ValueAxis.new(root, {\n renderer: yRenderer\n }));\n\n // Create series\n // https://www.amcharts.com/docs/v5/charts/radar-chart/#Adding_series\n var series = chart.series.push(am5radar.RadarColumnSeries.new(root, {\n xAxis: categoryAxis,\n yAxis: valueAxis,\n stroke: am5.color(0xffffff),\n fill: am5.color(0xffffff),\n valueYField: \"value\",\n categoryXField: \"category\"\n }));\n\n series.columns.template.setAll({\n fillOpacity: 0.1,\n strokeOpacity: 0,\n cornerRadius: 5\n })\n\n var lineSeries = chart.series.push(am5radar.RadarLineSeries.new(root, {\n xAxis: categoryAxis,\n yAxis: valueAxis,\n valueYField: \"value2\",\n categoryXField: \"category\"\n }));\n\n lineSeries.strokes.template.setAll({\n forceHidden: true\n })\n\n lineSeries.bullets.push(function() {\n var sprite = am5.Circle.new(root, {\n radius: 4 * Math.random(), fill: lineSeries.get(\"stroke\")\n })\n\n return am5.Bullet.new(root, {\n sprite: sprite\n })\n })\n\n var i = 0;\n // Generate and set data\n // https://www.amcharts.com/docs/v5/charts/radar-chart/#Setting_data\n var data = generateRadarData();\n\n series.data.setAll(data);\n lineSeries.data.setAll(data);\n categoryAxis.data.setAll(data);\n\n series.appear(2000);\n lineSeries.appear(2000);\n\n function createRange(id: string, startCategory: string, endCategory: string) {\n var axisRange = categoryAxis.createAxisRange(categoryAxis.makeDataItem({ above: true }));\n // first country\n axisRange.set(\"category\", startCategory);\n // last country\n axisRange.set(\"endCategory\", endCategory);\n\n // every 3rd color for a bigger contrast\n var fill = axisRange.get(\"axisFill\");\n fill.setAll({\n toggleKey: \"active\",\n cursorOverStyle: \"pointer\",\n fill: chart.get(\"colors\").getIndex(i),\n stroke: am5.color(0x000000),\n strokeOpacity: 0,\n visible: true,\n innerRadius: 110,\n radius: 127,\n fillOpacity: 0.8\n });\n\n radarRangeFills[id] = fill;\n i++;\n\n continentStartCategory[id] = startCategory;\n continentEndCategory[id] = endCategory;\n\n axisRange.get(\"grid\").set(\"visible\", false);\n\n var label = axisRange.get(\"label\");\n label.setAll({\n forceHidden: false,\n fontSize: 9,\n fill: am5.color(0xffffff),\n textType: \"circular\",\n opacity: .8,\n radius: -65,\n text: continentNames[id],\n interactive: false\n });\n\n fill.states.create(\"hover\", {\n fillOpacity: 1,\n innerRadius: 105\n })\n\n fill.events.on(\"pointerover\", function(_event: any) {\n hoverCountry(id)\n })\n\n fill.events.on(\"pointerout\", function(_event: any) {\n unhoverCountry(id)\n })\n\n fill.events.on(\"click\", function(_event: any) {\n clearInterval(selectCountryInterval);\n //var dataItem = event.target.dataItem;\n if (previousSelectedId == id) {\n unselectContinent();\n }\n else {\n selectContinent(id)\n }\n });\n }\n\n function generateRadarData() {\n var data: any[] = [];\n var c = 0;\n i = 0;\n am5.array.each(continentsData, function(obj) {\n var first = c;\n for (var i = 0; i < obj.count; i++) {\n data.push({ category: \"c\" + c, value: Math.random(), value2: Math.random() * 0.5 + .2 })\n c++;\n }\n\n createRange(obj.id, \"c\" + first, \"c\" + (c - 1));\n })\n\n return data;\n }\n }\n\n\n\n function makeMapChart() {\n // Create the map chart\n // https://www.amcharts.com/docs/v5/charts/map-chart/\n mapChart = globeContainer.children.push(am5map.MapChart.new(root, {\n panX: \"rotateX\",\n panY: \"rotateY\",\n wheelX: \"none\",\n wheelY: \"none\",\n height: 200,\n width: 200,\n centerY: am5.p50,\n y: am5.p50,\n projection: am5map.geoOrthographic(),\n paddingBottom: 0,\n paddingTop: 0,\n paddingLeft: 0,\n paddingRight: 0\n }));\n\n mapChart.chartContainer.set(\"background\", am5.Circle.new(root, {\n themeTags: [\"map\", \"background\"],\n fill: am5.color(0x222222),\n fillOpacity: 0,\n radius: 100,\n dx: 100,\n dy: 100\n }));\n\n // Create series for background fill\n // https://www.amcharts.com/docs/v5/charts/map-chart/map-polygon-series/#Background_polygon\n var graticuleSeries = mapChart.series.push(am5map.GraticuleSeries.new(root, {}));\n graticuleSeries.mapLines.template.setAll({\n stroke: root.interfaceColors.get(\"alternativeBackground\"),\n strokeOpacity: 0.04\n });\n\n // Create main polygon series for countries\n // https://www.amcharts.com/docs/v5/charts/map-chart/map-polygon-series/\n polygonSeries = mapChart.series.push(am5map.MapPolygonSeries.new(root, {\n geoJSON: am5geodata_continentsLow\n }));\n\n polygonSeries.mapPolygons.template.setAll({\n toggleKey: \"active\",\n interactive: true,\n fillOpacity: 0.7,\n strokeOpacity: 0,\n cursorOverStyle: \"pointer\"\n });\n\n polygonSeries.mapPolygons.template.adapters.add(\"fill\", function(fill: any, target: any) {\n if (target.dataItem) {\n var color = colors[target.dataItem.dataContext.id];\n target.set(\"stroke\", color)\n return color;\n }\n return fill\n })\n\n polygonSeries.mapPolygons.template.states.create(\"hover\", {\n fillOpacity: 1\n });\n\n polygonSeries.mapPolygons.template.states.create(\"active\", {\n fillOpacity: 1\n });\n\n polygonSeries.mapPolygons.template.states.create(\"dimm\", {\n fillOpacity: 0.5\n });\n\n polygonSeries.mapPolygons.template.events.on(\"pointerover\", function(e: any) {\n hoverCountry(e.target.dataItem.get(\"id\"))\n })\n\n polygonSeries.mapPolygons.template.events.on(\"pointerout\", function(e: any) {\n unhoverCountry(e.target.dataItem.get(\"id\"))\n })\n\n // Set up events\n var previousPolygon: any;\n\n polygonSeries.mapPolygons.template.on(\"active\", function(_active: boolean, target: any) {\n\n clearInterval(selectCountryInterval);\n\n if (previousPolygon && previousPolygon != target) {\n previousPolygon.set(\"active\", false);\n }\n if (target.get(\"active\")) {\n selectContinent(target.dataItem.get(\"id\"));\n }\n else {\n unselectContinent();\n }\n previousPolygon = target;\n });\n\n // Make stuff animate on load\n mapChart.appear(1000, 1000);\n }\n\n\n function selectContinent(id: string) {\n if (previousSelectedId) {\n unhoverCountry(previousSelectedId);\n }\n hoverCountry(id, true);\n var dataItem = polygonSeries.getDataItemById(id);\n var target = dataItem.get(\"mapPolygon\");\n if (target) {\n var centroid = target.geoCentroid();\n if (centroid) {\n mapChart.animate({ key: \"rotationX\", to: -centroid.longitude, duration: 1500, easing: am5.ease.inOut(am5.ease.cubic) });\n mapChart.animate({ key: \"rotationY\", to: -centroid.latitude, duration: 1500, easing: am5.ease.inOut(am5.ease.cubic) });\n }\n }\n\n\n am5.array.each(polygonSeries.dataItems, function(dataItem: any) {\n if (dataItem.dataContext.id != id) {\n dataItem.get(\"mapPolygon\").states.applyAnimate(\"dimm\");\n }\n else {\n dataItem.get(\"mapPolygon\").states.applyAnimate(\"active\");\n }\n })\n\n if (previousSelectedId) {\n radarRangeFills[previousSelectedId].set(\"active\", false);\n }\n\n\n categoryAxis.zoomToCategories(continentStartCategory[id], continentEndCategory[id]);\n currentIndex = continents.indexOf(id);\n\n previousSelectedId = id;\n }\n\n\n selectCountryInterval = setInterval(function() {\n currentIndex++;\n\n if (currentIndex >= continents.length) {\n clearInterval(selectCountryInterval)\n\n setTimeout(function() {\n var animation = mapChart.animate({\n key: \"rotationX\",\n to: 0,\n duration: 3000,\n easing: am5.ease.cubic\n });\n\n\n animation.events.on(\"stopped\", function() {\n mapChart.animate({\n key: \"rotationX\",\n to: 360,\n from: 0,\n duration: 30000,\n loops: Infinity\n });\n })\n\n }, 1000)\n\n unselectContinent();\n }\n else {\n selectContinent(continents[currentIndex])\n }\n }, 4000)\n\n\n function makeRadarGauge() {\n\n // Create chart\n // https://www.amcharts.com/docs/v5/charts/radar-chart/\n radarGauge = container.children.push(am5radar.RadarChart.new(root, {\n width: 230,\n panX: false,\n panY: false,\n wheelX: \"none\",\n wheelY: \"none\",\n innerRadius: am5.percent(20),\n startAngle: -90,\n endAngle: 180,\n paddingRight: 50,\n paddingTop: 0,\n paddingBottom: 0,\n paddingLeft: 20\n }));\n\n radarGauge.states.create(\"hidden\", {\n width: 1,\n opacity: 0,\n visible: false\n })\n\n // Data\n var data: any[] = [];\n\n am5.array.each(continents, function(id) {\n data.push({\n category: continentNames[id],\n value: Math.round(Math.random() * 70) + 20,\n full: 100,\n id: id,\n settings: {\n fill: colors[id]\n }\n })\n })\n\n\n // Create axes and their renderers\n // https://www.amcharts.com/docs/v5/charts/radar-chart/#Adding_axes\n var xRenderer = am5radar.AxisRendererCircular.new(root, {\n minGridDistance: 20\n });\n\n xRenderer.labels.template.setAll({\n radius: 10,\n opacity: 0.3\n });\n\n xRenderer.grid.template.setAll({\n forceHidden: true\n });\n\n var xAxis = radarGauge.xAxes.push(am5xy.ValueAxis.new(root, {\n renderer: xRenderer,\n min: 0,\n max: 100,\n strictMinMax: true,\n numberFormat: \"#'%'\"\n }));\n\n //xRenderer.labels.template.set(\"forceHidden\", true)\n\n\n var yRenderer = am5radar.AxisRendererRadial.new(root, {\n minGridDistance: 20\n });\n\n yRenderer.labels.template.setAll({\n forceHidden: true\n });\n\n yRenderer.grid.template.setAll({\n forceHidden: true\n });\n\n var yAxis = radarGauge.yAxes.push(am5xy.CategoryAxis.new(root, {\n categoryField: \"category\",\n renderer: yRenderer\n }));\n\n yAxis.data.setAll(data);\n\n // Create series\n // https://www.amcharts.com/docs/v5/charts/radar-chart/#Adding_series\n var series1 = radarGauge.series.push(am5radar.RadarColumnSeries.new(root, {\n xAxis: xAxis,\n yAxis: yAxis,\n clustered: false,\n valueXField: \"full\",\n categoryYField: \"category\",\n fill: root.interfaceColors.get(\"alternativeBackground\")\n }));\n\n series1.columns.template.setAll({\n width: am5.p100,\n fillOpacity: 0.1,\n strokeOpacity: 0,\n cornerRadius: 20\n });\n\n series1.data.setAll(data);\n\n gaugeSeries = radarGauge.series.push(am5radar.RadarColumnSeries.new(root, {\n xAxis: xAxis,\n yAxis: yAxis,\n clustered: false,\n valueXField: \"value\",\n categoryYField: \"category\"\n }));\n\n gaugeSeries.columns.template.setAll({\n width: am5.p100,\n strokeOpacity: 0,\n cornerRadius: 20,\n templateField: \"settings\",\n cursorOverStyle: \"pointer\"\n });\n\n gaugeSeries.columns.template.states.create(\"dimm\", {\n opacity: 0.4\n })\n\n gaugeSeries.columns.template.events.on(\"pointerover\", function(event: any) {\n hoverCountry(event.target.dataItem.dataContext.id, true)\n })\n\n gaugeSeries.columns.template.events.on(\"pointerout\", function(event: any) {\n unhoverCountry(event.target.dataItem.dataContext.id)\n })\n\n gaugeSeries.columns.template.events.on(\"click\", function(event: any) {\n clearInterval(selectCountryInterval);\n //var dataItem = event.target.dataItem;\n var id = event.target.dataItem.dataContext.id;\n if (previousSelectedId == id) {\n unselectContinent();\n }\n else {\n selectContinent(id)\n }\n })\n\n gaugeSeries.data.setAll(data);\n\n // Animate chart and series in\n // https://www.amcharts.com/docs/v5/concepts/animations/#Initial_animation\n gaugeSeries.appear(1000, 2000);\n }\n\n\n function makeLineSeriesChart() {\n // Create chart\n // https://www.amcharts.com/docs/v5/charts/xy-chart/\n var lineSeriesChart = root.container.children.push(\n am5xy.XYChart.new(root, {})\n );\n\n // The data\n var data = [\n {\n year: \"1930\",\n europe: 0,\n asia: 0,\n northAmerica: 0,\n southAmerica: 0,\n oceania: 0,\n africa: 0\n },\n {\n year: \"1934\",\n europe: 0,\n asia: 0,\n northAmerica: 0,\n southAmerica: 0,\n oceania: 0,\n africa: 0\n },\n {\n year: \"1938\",\n europe: 1,\n asia: 0,\n northAmerica: -1,\n southAmerica: 1.5,\n oceania: 1.5,\n africa: -2\n },\n {\n year: \"1950\",\n europe: 3,\n asia: -4,\n northAmerica: 1,\n southAmerica: -3,\n oceania: -1.5,\n africa: 0.5\n },\n {\n year: \"1954\",\n europe: -1,\n asia: 1,\n northAmerica: -2,\n southAmerica: 4,\n oceania: .5,\n africa: -2.5\n },\n {\n year: \"1958\",\n europe: 2,\n asia: -4,\n northAmerica: 3,\n southAmerica: -3.5,\n oceania: -2,\n africa: 5\n },\n {\n year: \"1962\",\n europe: -2,\n asia: 4,\n northAmerica: -5,\n southAmerica: 6,\n oceania: 1,\n africa: -4.5\n },\n {\n year: \"1966\",\n europe: 2,\n asia: -1,\n northAmerica: 3,\n southAmerica: -3.5,\n oceania: -2,\n africa: 4\n },\n {\n year: \"1970\",\n europe: -1,\n asia: 1.5,\n northAmerica: -2.5,\n southAmerica: 2,\n oceania: 0.5,\n africa: -2\n },\n {\n year: \"1978\",\n europe: 0,\n asia: 0,\n northAmerica: 0,\n southAmerica: 0,\n oceania: 0,\n africa: 0\n },\n {\n year: \"1982\",\n europe: 0,\n asia: 0,\n northAmerica: 0,\n southAmerica: 0,\n oceania: 0,\n africa: 0\n }\n ];\n\n // Create axes\n // https://www.amcharts.com/docs/v5/charts/xy-chart/axes/\n var xRenderer = am5xy.AxisRendererX.new(root, {\n inside: true\n });\n xRenderer.labels.template.setAll({ forceHidden: true });\n xRenderer.grid.template.setAll({\n strokeGradient: am5.LinearGradient.new(root, {\n stops: [\n { color: am5.color(0xffffff), opacity: 0 },\n { color: am5.color(0xffffff), opacity: .1 },\n { color: am5.color(0xffffff), opacity: 0 }\n ]\n })\n\n });\n\n var xAxis = lineSeriesChart.xAxes.push(\n am5xy.CategoryAxis.new(root, {\n startLocation: 0.6,\n endLocation: 0.4,\n categoryField: \"year\",\n renderer: xRenderer,\n tooltip: am5.Tooltip.new(root, {})\n })\n );\n\n xAxis.data.setAll(data);\n\n var yRenderer = am5xy.AxisRendererY.new(root, {});\n yRenderer.labels.template.setAll({ forceHidden: true });\n yRenderer.grid.template.setAll({ forceHidden: true });\n\n var yAxis = lineSeriesChart.yAxes.push(\n am5xy.ValueAxis.new(root, {\n maxPrecision: 0,\n strictMinMax: true,\n min: - 9,\n max: 9,\n renderer: yRenderer\n })\n );\n\n // Add series\n // https://www.amcharts.com/docs/v5/charts/xy-chart/series/\n\n function createSeries(id: string) {\n var series = lineSeriesChart.series.push(\n am5xy.SmoothedXLineSeries.new(root, {\n name: id,\n xAxis: xAxis,\n yAxis: yAxis,\n valueYField: id,\n categoryXField: \"year\",\n tooltip: am5.Tooltip.new(root, {\n pointerOrientation: \"horizontal\",\n labelText: \"[bold]{name}[/]\\n{categoryX}: {valueY}\"\n }),\n opacity: 0.5\n })\n );\n lineSeries[id] = series;\n\n series.strokes.template.setAll({\n strokeOpacity: 1,\n\n strokeGradient: am5.LinearGradient.new(root, {\n rotation: 0,\n stops: [\n { color: series.get(\"fill\"), opacity: 0 },\n { color: series.get(\"fill\"), opacity: 0.4 },\n { color: series.get(\"fill\"), opacity: .9 },\n { color: series.get(\"fill\"), opacity: 0 }\n ]\n })\n })\n series.states.create(\"default\", {\n opacity: 0.6\n })\n\n series.states.create(\"highlight\", {\n opacity: 1\n })\n\n series.states.create(\"dimm\", {\n opacity: .4\n })\n\n series.data.setAll(data);\n series.appear(1000 + Math.random() * 500, Math.random() * 1000);\n }\n\n\n\n createSeries(\"europe\");\n createSeries(\"asia\");\n createSeries(\"northAmerica\");\n createSeries(\"southAmerica\");\n createSeries(\"oceania\");\n createSeries(\"africa\");\n }\n\n\n\n function unselectContinent() {\n categoryAxis.zoom(0, 1);\n if (previousSelectedId) {\n radarRangeFills[previousSelectedId].set(\"active\", false);\n unhoverCountry(previousSelectedId);\n\n am5.array.each(polygonSeries.dataItems, function(dataItem: any) {\n dataItem.get(\"mapPolygon\").states.applyAnimate(\"default\");\n dataItem.get(\"mapPolygon\").set(\"active\", false);\n })\n }\n previousSelectedId = undefined\n }\n\n function hoverCountry(id: string, fake: boolean = false) {\n var series = lineSeries[id];\n if (series) {\n series.states.applyAnimate(\"highlight\");\n\n am5.array.each(series.dataItems, function(dataItem: any) {\n animateDataItem(dataItem, dataItem.get(\"valueYWorking\") * -1, am5.ease.out(am5.ease.cubic), 700)\n })\n\n am5.object.each(lineSeries, function(_key, s) {\n if (s != series) {\n s.states.applyAnimate(\"dimm\");\n }\n })\n\n if (!fake) {\n radarRangeFills[id].hover();\n }\n\n am5.array.each(gaugeSeries.dataItems, function(dataItem: any) {\n if (dataItem.dataContext.id != id) {\n dataItem.get(\"graphics\").states.applyAnimate(\"dimm\");\n }\n })\n }\n }\n\n function animateDataItem(dataItem: any, toValue: number, ease: any, duration: number) {\n dataItem.animate({ key: \"valueYWorking\", to: toValue, duration: duration, easing: ease })\n }\n\n\n function unhoverCountry(id: string) {\n var series = lineSeries[id];\n if (series) {\n radarRangeFills[id].unhover();\n\n am5.array.each(series.dataItems, function(dataItem: any) {\n animateDataItem(dataItem, dataItem.get(\"valueY\"), am5.ease.out(am5.ease.cubic), 600)\n })\n\n am5.object.each(lineSeries, function(_key, s) {\n s.states.applyAnimate(\"default\");\n })\n\n am5.array.each(gaugeSeries.dataItems, function(dataItem: any) {\n if (dataItem.dataContext.id != id) {\n dataItem.get(\"graphics\").states.applyAnimate(\"default\");\n }\n })\n }\n }\n\n\n makeRadarGauge();\n makeRadarChart();\n makeMapChart();\n }\n\n}","import type { VisitedPlaces } from \"./VisitedPlaces\";\r\nimport { UIQuery } from \"./UIQuery\";\r\n\r\nexport class CommonUI {\r\n\r\n protected _visitedPlaces!: VisitedPlaces;\r\n\r\n protected _resizing: { x: number, y: number, width: number, height: number, resizing: boolean } = {\r\n x: 0,\r\n y: 0,\r\n width: 0,\r\n height: 0,\r\n resizing: false\r\n };\r\n\r\n static new(visitedPlaces: VisitedPlaces): CommonUI {\r\n const x = new this(visitedPlaces, true);\r\n x._afterNew();\r\n return x;\r\n }\r\n\r\n constructor(visitedPlaces: VisitedPlaces, isReal: boolean) {\r\n if (!isReal) {\r\n throw new Error(\"You cannot use `new Class()`, instead use `Class.new()`\");\r\n }\r\n\r\n this._visitedPlaces = visitedPlaces;\r\n }\r\n\r\n protected _afterNew() {\r\n const vp = this._visitedPlaces;\r\n vp.chart.onPrivate(\"width\", (_width) => {\r\n if (!vp.width && !vp.height) {\r\n this.setMapSize();\r\n }\r\n });\r\n\r\n UIQuery.find(\"#resizer\").on(\"mousedown\", (_target, ev) => {\r\n const div = UIQuery.find(\"#resizable\").firstNode()!;\r\n const bbox = div.getBoundingClientRect();\r\n this._resizing.x = ev.clientX;\r\n this._resizing.y = ev.clientY;\r\n this._resizing.width = bbox.width;\r\n this._resizing.height = bbox.height;\r\n this._resizing.resizing = true;\r\n });\r\n\r\n UIQuery.find(\"#size\").on(\"change\", (target: HTMLSelectElement) => {\r\n const size = UIQuery.envelope(target).val();\r\n const dims = size.split(\"x\");\r\n if (dims.length == 2) {\r\n this.setMapSize(dims[0], dims[1], false);\r\n }\r\n else if (size == \"\") {\r\n this.setMapSize();\r\n UIQuery.find(\"#size\").val(\"\");\r\n }\r\n else {\r\n this.setMapSize();\r\n }\r\n });\r\n\r\n document.documentElement.addEventListener(\"mousemove\", (ev) => {\r\n if (this._resizing.resizing) {\r\n const w = this._resizing.width + (ev.clientX - this._resizing.x) * 2;\r\n const h = this._resizing.height + ev.clientY - this._resizing.y;\r\n this.setMapSize(w, h, true);\r\n }\r\n });\r\n document.documentElement.addEventListener(\"mouseup\", (ev) => {\r\n if (this._resizing.resizing) {\r\n const w = this._resizing.width + (ev.clientX - this._resizing.x) * 2;\r\n const h = this._resizing.height + ev.clientY - this._resizing.y;\r\n this.setMapSize(w, h, true);\r\n this._resizing.resizing = false;\r\n }\r\n });\r\n }\r\n\r\n public setMapSize(w?: number, h?: number, custom: boolean = false) {\r\n const vp = this._visitedPlaces;\r\n const div = UIQuery.find(\"#resizable\").firstNode()! as HTMLDivElement;\r\n const size = UIQuery.find(\"#size\");\r\n const customsize = UIQuery.find(\"#customsize\");\r\n const maxw = window.innerWidth;\r\n const maxh = window.innerHeight * .7;\r\n\r\n if (w && h) {\r\n w = Math.round(w);\r\n h = Math.round(h);\r\n let ratio = Math.floor(Math.min(maxw / w, maxh / h) * 10) / 10;\r\n\r\n if (ratio < 1) {\r\n vp.root._renderer.resolution /= ratio;\r\n }\r\n else {\r\n vp.root._renderer.resolution = window.devicePixelRatio;\r\n }\r\n\r\n div.style.maxWidth = \"100vw\";\r\n div.style.width = \"\" + w + \"px\";\r\n div.style.height = \"\" + h + \"px\";\r\n customsize.html(\"Custom (\" + w + \"x\" + h + \")\")\r\n customsize.val(w + \"x\" + h);\r\n if (custom) {\r\n size.val(w + \"x\" + h);\r\n }\r\n }\r\n else {\r\n vp.root._renderer.resolution = window.devicePixelRatio;\r\n div.style.maxWidth = \"\";\r\n div.style.width = \"\";\r\n\r\n const bbox = div.getBoundingClientRect();\r\n let w = bbox.width;\r\n let h = Math.round(w / 1.9);\r\n\r\n if (w > maxw) {\r\n h *= w / maxw;\r\n w = maxw;\r\n }\r\n if (h > maxh) {\r\n w *= h / maxh;\r\n h = maxh;\r\n }\r\n\r\n div.style.height = h + \"px\";\r\n\r\n }\r\n //vp.setSize(w, h);\r\n }\r\n\r\n}","import type { VisitedPlaces } from \"./VisitedPlaces\";\r\nimport { UIQuery } from \"./UIQuery\";\r\nimport am5geodata_data_countries2 from \"@amcharts/amcharts5-geodata/data/countries2\";\r\n\r\nexport class Sharing {\r\n\r\n public visited: number = 0;\r\n public total: number = 0;\r\n public percent: number = 0;\r\n public placeName: string = \"country\";\r\n public placeNameMany: string = \"countries\";\r\n public description: string = \"\";\r\n public url: string = \"\";\r\n public image: string = \"\";\r\n\r\n protected _visitedPlaces!: VisitedPlaces;\r\n protected _exporting!: VisitedPlaces;\r\n\r\n static new(visitedPlaces: VisitedPlaces): Sharing {\r\n const x = new this(visitedPlaces, true);\r\n x._afterNew();\r\n return x;\r\n }\r\n\r\n constructor(visitedPlaces: VisitedPlaces, isReal: boolean) {\r\n if (!isReal) {\r\n throw new Error(\"You cannot use `new Class()`, instead use `Class.new()`\");\r\n }\r\n\r\n this._visitedPlaces = visitedPlaces;\r\n }\r\n\r\n protected _afterNew() {\r\n // Sharing\r\n UIQuery.find(\".download\").on(\"click\", (target: any) => {\r\n this.download(target.getAttribute(\"data-download\"));\r\n });\r\n\r\n UIQuery.find(\".share\").on(\"click\", (target: any) => {\r\n const label = UIQuery.create(\"span\").appendTo(target).html(\"Opening...\");\r\n setTimeout(() => {\r\n this.share(target.getAttribute(\"data-share\"));\r\n label.remove();\r\n }, 100);\r\n });\r\n\r\n UIQuery.find(\"#exportvideo\").on(\"click\", () => {\r\n window.location.href = window.location.href.replace(/\\/[a-z_]*\\/\\?/i, \"/video/?\");\r\n });\r\n\r\n UIQuery.find(\"#saveshot\").on(\"click\", () => {\r\n this.generateScreenshot();\r\n });\r\n\r\n if (!this._visitedPlaces.worldMap) {\r\n this.placeName = \"place\";\r\n this.placeNameMany = \"places\";\r\n }\r\n\r\n }\r\n\r\n public resetScreenshot() {\r\n this.loadImage().then(async (resp) => {\r\n const data = await resp.json();\r\n if (data.image != '') {\r\n this.image = data.image;\r\n this.updateSnapshot();\r\n }\r\n else {\r\n this.updateSnapshot(true);\r\n }\r\n });\r\n }\r\n\r\n public download(format: string) {\r\n if (format == \"png\" || format == \"jpg\") {\r\n this._visitedPlaces.toggleTimeline(true);\r\n this._visitedPlaces.exporting.download(format).then(() => {\r\n this._visitedPlaces.toggleTimeline();\r\n });\r\n return;\r\n }\r\n\r\n if (format == \"html\") {\r\n const uri = \"data:text/html;utf-8,\" + encodeURIComponent(this.getPage());\r\n this.stream(uri);\r\n }\r\n }\r\n\r\n public stream(uri: string) {\r\n const exporting = this._visitedPlaces.exporting;\r\n exporting.streamFile(uri, exporting.get(\"filePrefix\", \"MyVisitedPlaces\") + \".html\");\r\n }\r\n\r\n public async generateScreenshot() {\r\n UIQuery.find(\"#saveshot\").removeClass(\"btn-idle\").addClass(\"btn-working\");\r\n setTimeout(async () => {\r\n let imgData = await this.getImage();\r\n const imageResp = await this.saveImage(imgData);\r\n const imageRespData = await imageResp.json();\r\n this.image = imageRespData.image;\r\n this.updateSnapshot();\r\n UIQuery.find(\"#saveshot\").removeClass(\"btn-working\").addClass(\"btn-idle\");\r\n }, 100);\r\n }\r\n\r\n public updateSnapshot(empty: boolean = false) {\r\n UIQuery.find(\"#snapshot\").prop(\"src\", empty ? \"/lib/share_empty.png\" : \"/share/\" + this.image);\r\n }\r\n\r\n public async share(network: string) {\r\n this._visitedPlaces.toggleTimeline(true);\r\n this.updateCounts();\r\n if (!this.image) {\r\n let imgData = await this.getImage();\r\n //imgData = imgData.replace(\"data:image/png;base64,\", \"\");\r\n const imageResp = await this.saveImage(imgData);\r\n const imageRespData = await imageResp.json();\r\n this.image = imageRespData.image;\r\n this.updateSnapshot();\r\n }\r\n const url = this.getShareURL(network);\r\n if (url) {\r\n this.openShareWin(url);\r\n }\r\n this._visitedPlaces.toggleTimeline();\r\n }\r\n\r\n public saveImage(imgData: string): Promise<any> {\r\n const fd = new FormData();\r\n fd.append(\"image\", imgData)\r\n fd.append(\"config\", window.location.search);\r\n if (this.image) {\r\n fd.append(\"prev\", this.image);\r\n }\r\n return fetch(\"/view/save/\", {\r\n method: \"POST\",\r\n mode: \"cors\",\r\n cache: \"no-cache\",\r\n credentials: \"same-origin\",\r\n redirect: \"follow\",\r\n referrerPolicy: \"no-referrer\",\r\n // headers: {\r\n // \"Content-Type\": \"application/json\"\r\n // },\r\n body: fd\r\n });\r\n }\r\n\r\n public loadImage(): Promise<any> {\r\n const fd = new FormData();\r\n fd.append(\"config\", window.location.search);\r\n return fetch(\"/view/save/\", {\r\n method: \"POST\",\r\n mode: \"cors\",\r\n cache: \"no-cache\",\r\n credentials: \"same-origin\",\r\n redirect: \"follow\",\r\n referrerPolicy: \"no-referrer\",\r\n body: fd\r\n });\r\n }\r\n\r\n public getImage(): Promise<any> {\r\n return this._visitedPlaces.exporting.export(\"png\");\r\n }\r\n\r\n public updateCounts() {\r\n this.visited = 0;\r\n this._visitedPlaces.data.forEach((step) => {\r\n this.visited += step.places.length;\r\n });\r\n this.total = this._visitedPlaces.polygonSeries.dataItems.length;\r\n this.percent = Math.round((this.visited / this.total) * 1000) / 10;\r\n const name = this.visited == 1 ? this.placeName : this.placeNameMany;\r\n if (this._visitedPlaces.worldMap) {\r\n this.description = 'I visited ' + this.visited + ' ' + name + ' out of ' + this.total + '. That\\'s ' + this.percent + '% of all countries in the world!';\r\n this.description += \" #visitedcountries\";\r\n }\r\n else {\r\n this.description = 'I visited ' + this.visited + ' ' + name + ' out of ' + this.total + '.';\r\n const country = this.getCountryByMap(this._visitedPlaces.map);\r\n if (country) {\r\n this.description += ' That\\'s ' + this.percent + '% of ' + country + '!'\r\n this.description += \" #\" + country.replace(\" \", \"\");\r\n }\r\n }\r\n this.description += \" #mytravels #travelmap\";\r\n this.url = this.getViewURL();\r\n }\r\n\r\n public getCountryByMap(map: string): string | undefined {\r\n let country = undefined;\r\n Object.keys(am5geodata_data_countries2).forEach((key: string) => {\r\n const item = am5geodata_data_countries2[key];\r\n if (item.maps.indexOf(map + \"Low\") !== -1) {\r\n country = item.country;\r\n }\r\n })\r\n return country;\r\n }\r\n\r\n // public updateHeaders() {\r\n // this.updateCounts();\r\n // if (this.visited > 0) {\r\n // UIQuery.find(\"meta[property='og:description']\").attr(\"content\", this.description);\r\n // UIQuery.find(\"meta[property='og:url']\").attr(\"content\", this.url);\r\n // }\r\n // }\r\n\r\n public getViewURL(): string {\r\n let url = window.location.protocol + \"//\" + window.location.hostname + (window.location.port ? \":\" + window.location.port : \"\");\r\n return url + \"/view/\" + window.location.search;\r\n }\r\n\r\n public getEmbedURL(): string {\r\n let url = window.location.protocol + \"//\" + window.location.hostname + (window.location.port ? \":\" + window.location.port : \"\");\r\n return url + \"/embed/\" + window.location.search;\r\n }\r\n\r\n public getIframe(): string {\r\n return \"<iframe src=\\\"\" + this.getEmbedURL() + \"\\\" style=\\\"width: 100%; height: 600px;\\\"></iframe>\";\r\n }\r\n\r\n public getPage(): string {\r\n // @todo image\r\n let html = `<!DOCTYPE html>\r\n<html>\r\n <head>\r\n <meta charset=\"UTF-8\" />\r\n <title>My visited places | VisitedPlaces.com</title>\r\n <meta name=\"apple-mobile-web-app-capable\" content=\"yes\">\r\n <meta name=\"apple-mobile-web-app-status-bar-style\" content=\"white\">\r\n <meta name=\"viewport\" content=\"width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes, minimal-ui\">\r\n\r\n <meta name=\"description\" content=\"${this.description}\">\r\n <meta name=\"keywords\" content=\"maps, travel, visited countries, charts, visual\">\r\n\r\n <meta name=\"twitter:card\" content=\"photo\" />\r\n <meta name=\"twitter:site\" content=\"@visitedplaces\" />\r\n <meta name=\"twitter:image\" content=\"https://www.visitedplaces.com/lib/index.png\" />\r\n\r\n <meta property=\"og:title\" content=\"Interactive Visited Places Map\" />\r\n <meta property=\"og:site_name\" content=\"VisitedPlaces.com\" />\r\n <meta property=\"og:url\" content=\"https://www.visitedplaces.com/\" />\r\n <meta property=\"og:description\" content=\"${this.description}\" />\r\n <meta property=\"og:type\" content=\"article\" />\r\n <meta property=\"og:image\" content=\"https://www.amcharts.com/inspiration/images/shots/index.jpg\" />\r\n <style>\r\n body {\r\n font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";\r\n padding: 0;\r\n margin: 0;\r\n }\r\n </style>\r\n </head>\r\n <body>\r\n ${this.getHTML()}\r\n </body>\r\n</html>`;\r\n return html;\r\n }\r\n\r\n public getHTML(): string {\r\n const vp = this._visitedPlaces;\r\n const width = vp.width ? vp.width + \"px\" : \"100%\";\r\n const height = vp.height ? vp.height + \"px\" : \"600px\";\r\n return `<!-- VisitedPlaces.com code -->\r\n<script>\r\n// VisitedPlaces.com code\r\nvar visitedplaces_config = ${JSON.stringify(this._visitedPlaces.getConfig(), undefined, \" \")};\r\n</script>\r\n<div id=\"chartdiv\" style=\"width: ${width}; height: ${height};\">\r\n<script src=\"https://www.visitedplaces.com/js/common.js\"></script>\r\n<script src=\"https://www.visitedplaces.com/js/viewer.js\"></script>\r\n<!-- end: VisitedPlaces.com code -->\r\n`;\r\n }\r\n\r\n public getShareURL(network: string): string | undefined {\r\n // https://www.facebook.com/share.php?u=http%3A%2F%2Flocalhost%3A8080%2Feditor.html%23projection%3DgeoNaturalEarth1%26theme%3Dlight-green%26width%3D1416%26height%3D602%26water%3D1%26graticule%3D0%26names%3D1%26duration%3D2500%26position%3D0%26autoplay%3D0%26autozoom%3Dnone%26home%3DLT%26places%3D%3ACY%3A\r\n // https://twitter.com/intent/tweet?url=http%3A%2F%2Flocalhost%3A8080%2Feditor.html%23projection%3DgeoNaturalEarth1%26theme%3Dlight-green%26width%3D1416%26height%3D602%26water%3D1%26graticule%3D0%26names%3D1%26duration%3D2500%26position%3D0%26autoplay%3D0%26autozoom%3Dnone%26home%3DLT%26places%3D%3ACY%3A&text=Visited%20places%20map%20editor%20-%20Make%20your%20own%20interactive%20countries%20or%20visited%20places%20map.%20Select%2C%20configure%2C%20share%2C%20download.&via=amCharts\r\n // https://pinterest.com/pin/create/button/?url=http%3A%2F%2Flocalhost%3A8080%2Feditor.html%23projection%3DgeoNaturalEarth1%26theme%3Dlight-green%26width%3D1416%26height%3D602%26water%3D1%26graticule%3D0%26names%3D1%26duration%3D2500%26position%3D0%26autoplay%3D0%26autozoom%3Dnone%26home%3DLT%26places%3D%3ACY%3A&description=Make%20your%20own%20interactive%20countries%20or%20visited%20places%20map.%20Select%2C%20configure%2C%20share%2C%20download.&media=https%3A%2F%2Fwww.amcharts.com%2Finspiration%2Fimages%2Fshots%2Findex.jpg\r\n // https://www.linkedin.com/shareArticle?mini=true&url=http%3A%2F%2Flocalhost%3A8080%2Feditor.html%23projection%3DgeoNaturalEarth1%26theme%3Dlight-green%26width%3D1416%26height%3D602%26water%3D1%26graticule%3D0%26names%3D1%26duration%3D2500%26position%3D0%26autoplay%3D0%26autozoom%3Dnone%26home%3DLT%26places%3D%3ACY%3A&title=Visited%20places%20map%20editor&summary=Make%20your%20own%20interactive%20countries%20or%20visited%20places%20map.%20Select%2C%20configure%2C%20share%2C%20download.\r\n //console.log(this.url);\r\n let url: string = \"\";\r\n const params: any = {};\r\n switch (network) {\r\n case \"facebook\":\r\n url = \"https://www.facebook.com/share.php\";\r\n //url = \"https://www.facebook.com/sharer/sharer.php?\";\r\n params.u = this.url + \"&i=\" + this.image;\r\n break;\r\n case \"twitter\":\r\n url = \"https://twitter.com/intent/tweet\";\r\n params.url = this.url;\r\n params.text = this.description;\r\n params.via = \"visitedplaces\";\r\n break;\r\n case \"pinterest\":\r\n url = \"https://pinterest.com/pin/create/button/\";\r\n params.url = this.url;\r\n params.description = this.description;\r\n params.image_url = this.image;\r\n break;\r\n case \"linkedin\":\r\n url = \"https://www.linkedin.com/shareArticle\";\r\n params.mini = \"true\";\r\n params.url = this.url;\r\n params.title = \"My visited places map\";\r\n params.summary = this.description;\r\n break;\r\n case \"reddit\":\r\n url = \"https://www.reddit.com/submit\";\r\n params.url = this.url;\r\n params.title = \"My visited places map\";\r\n params.text = this.description;\r\n params.media = this.image;\r\n break;\r\n }\r\n\r\n const querystring: string[] = [];\r\n Object.keys(params).forEach(function(key) {\r\n querystring.push(key + \"=\" + encodeURIComponent(params[key]));\r\n });\r\n url += \"?\" + querystring.join(\"&\");\r\n\r\n return url;\r\n }\r\n\r\n public openShareWin(url: string) {\r\n const clientWidth = document.documentElement.clientWidth;\r\n const clientHeight = document.documentElement.clientHeight;\r\n const width = Math.min(clientWidth * 0.8, 800);\r\n const height = Math.min(clientHeight * 0.8, 800);\r\n const left = (clientWidth / 2 - width / 2);\r\n const top = (clientHeight - height) / 2;\r\n const options = \"status=1,resizable=yes,width=\" + width + \",height=\" + height + \",top=\" + top + \",left=\" + left;\r\n window.open(url, '', options)!.focus();\r\n }\r\n\r\n}","export class UIQuery {\r\n\r\n public static find(query: string): UIQuery {\r\n return new UIQuery(document.querySelectorAll(query));\r\n }\r\n\r\n public static findNode(target: HTMLElement, query: string): UIQuery {\r\n return new UIQuery(target.querySelectorAll(query));\r\n }\r\n\r\n public static envelope(element: Element): UIQuery {\r\n return new UIQuery([element]);\r\n }\r\n\r\n public static create(tag: string): UIQuery {\r\n return new UIQuery([document.createElement(tag)]);\r\n }\r\n\r\n public nodes: NodeList | Array<Element>;\r\n\r\n constructor(nodes: NodeList | Array<Element>) {\r\n this.nodes = nodes;\r\n }\r\n\r\n public each(callback: (item: Node) => unknown): UIQuery {\r\n this.nodes.forEach((node: any) => callback.call(this, node));\r\n return this;\r\n }\r\n\r\n public on(event: string, callback: (target?: any, event?: any) => unknown, options?: any): UIQuery {\r\n this.nodes.forEach((node: any) => {\r\n node.addEventListener(event, (ev: any) => callback.call(node, node, ev), options)\r\n });\r\n return this;\r\n }\r\n\r\n public attr(name: string, value?: any): any {\r\n if (value !== undefined) {\r\n this.nodes.forEach((node: any) => node.setAttribute(name, \"\" + value));\r\n }\r\n else {\r\n const element = this.firstNode();\r\n return element ? element.getAttribute(name) : undefined;\r\n }\r\n return this;\r\n }\r\n\r\n public prop(name: string, value?: any): any {\r\n if (value !== undefined) {\r\n this.nodes.forEach((node: any) => node[name] = value);\r\n }\r\n else {\r\n const element: any = this.firstNode();\r\n return element ? element[name] : undefined;\r\n }\r\n return this;\r\n }\r\n\r\n public val(value?: any): any {\r\n if (value === undefined) {\r\n const element = this.firstNode() as any;\r\n return element ? element.value : undefined;\r\n }\r\n else {\r\n this.each((item) => (item as HTMLInputElement).value = value + \"\");\r\n return this;\r\n }\r\n }\r\n\r\n public html(html?: string | number): any {\r\n if (html === undefined) {\r\n const element = this.firstNode() as any;\r\n return element ? element.innerHTML : undefined;\r\n }\r\n else {\r\n this.each((item) => (item as Element).innerHTML = html + \"\");\r\n return this;\r\n }\r\n }\r\n\r\n public remove() {\r\n this.each((element: any) => {\r\n if (element.parentElement) {\r\n element.parentElement.removeChild(element);\r\n }\r\n });\r\n }\r\n\r\n public appendTo(target: HTMLElement): any {\r\n this.each((element: any) => {\r\n target.appendChild(element);\r\n });\r\n return this;\r\n }\r\n\r\n public firstNode(): Element | undefined {\r\n return this.nodes.length ? this.nodes[0] as Element : undefined;\r\n }\r\n\r\n public first(): UIQuery {\r\n return new UIQuery(this.nodes.length ? [this.nodes[0] as Element] : []);\r\n }\r\n\r\n public lastNode(): Element | undefined {\r\n return this.nodes.length ? this.nodes[this.nodes.length - 1] as Element : undefined;\r\n }\r\n\r\n public last(): UIQuery {\r\n return new UIQuery(this.nodes.length ? [this.nodes[this.nodes.length - 1] as Element] : []);\r\n }\r\n\r\n public addClass(className: string): any {\r\n this.each((element: any) => {\r\n if (!element) {\r\n return;\r\n }\r\n if (element.classList) {\r\n const classes = className.split(\" \");\r\n classes.forEach((name: string) => {\r\n element.classList.add(name);\r\n });\r\n }\r\n else {\r\n let currentClassName = element.getAttribute(\"class\");\r\n if (currentClassName) {\r\n element.setAttribute(\"class\", currentClassName.split(\" \").filter((item: any) => {\r\n return item !== className;\r\n }).join(\" \") + \" \" + className);\r\n }\r\n else {\r\n element.setAttribute(\"class\", className);\r\n }\r\n }\r\n });\r\n return this;\r\n }\r\n\r\n public removeClass(className: string): any {\r\n this.each((element: any) => {\r\n if (!element) {\r\n return;\r\n }\r\n if (element.classList) {\r\n element.classList.remove(className);\r\n }\r\n else {\r\n let currentClassName = element.getAttribute(\"class\");\r\n if (currentClassName) {\r\n element.setAttribute(\"class\", currentClassName.split(\" \").filter((item: any) => {\r\n return item !== className;\r\n }).join(\" \"));\r\n }\r\n }\r\n });\r\n return this;\r\n }\r\n\r\n public show(): any {\r\n this.each((element: any) => {\r\n element.style.display = \"\";\r\n });\r\n return this;\r\n }\r\n\r\n public hide(): any {\r\n this.each((element: any) => {\r\n element.style.display = \"none\";\r\n });\r\n return this;\r\n }\r\n\r\n}","declare const visitedplaces_config: any;\n\nimport * as am5 from \"@amcharts/amcharts5\";\nimport * as am5map from \"@amcharts/amcharts5/map\";\nimport * as am5plugins_exporting from \"@amcharts/amcharts5/plugins/exporting\";\n//import am5geodata_worldLow from \"@amcharts/amcharts5-geodata/worldLow\";\nimport am5themes_Animated from \"@amcharts/amcharts5/themes/Animated\";\nimport am5geodata_data_countries2 from \"@amcharts/amcharts5-geodata/data/countries2\";\n\nexport class VisitedPlaces {\n // settings which users might want to edit\n public nameLabelBaseSize = 13;\n public nameLabelFontWeight = \"500\";\n public baseHeight = 600; // name font size is adjusted using this\n public previouslyVisitedOpacity = 0.6; // opacity of in previous steps visited countries\n public pinRadius = 3; // radius of pins on small areas\n public oneStepAnimationDuration = 600; // when pressing next/previous\n public minZoomLevel = 0.8;\n public zoomStep = 2;\n public placeDuration = 100; // interval at which new visited area is colorized\n public animationDuration = 1500;\n // slider\n public sliderWidth = am5.p100;\n public sliderPaddingLeft = 15;\n public sliderPaddingRight = 32;\n public sliderPaddingBottom = 15;\n protected _appeared = false;\n public _continentSteps: any = {};\n public isEditor = false;\n\n // various elements\n public map: string = \"\";\n public worldMap: boolean = true;\n public root!: am5.Root;\n public chart!: am5map.MapChart;\n public zoomControl!: am5map.ZoomControl;\n public background!: am5.Rectangle;\n public waterSeries!: am5map.MapPolygonSeries;\n public polygonSeries!: am5map.MapPolygonSeries;\n public pinSeries!: am5map.MapPointSeries;\n public nameSeries!: am5map.MapPointSeries;\n public graticuleSeries!: am5map.GraticuleSeries;\n public systemTooltipH!: am5.Tooltip;\n public systemTooltipD!: am5.Tooltip;\n public systemTooltipU!: am5.Tooltip;\n public playButton!: am5.Button;\n public nextButton!: am5.Button;\n public prevButton!: am5.Button;\n public replayButton!: am5.Button;\n public visitedLabel!: am5.Label;\n public comLabel!: am5.Label;\n public placesLabel!: am5.Label;\n public bottomContainer!: am5.Container;\n public sliderContainer!: am5.Container;\n public slider!: am5.Slider;\n public sliderBackground!: am5.Graphics;\n public stepLabel!: am5.Label;\n public playButtonOutline!: am5.Circle;\n public saveStepButton!: am5.Button;\n public saveHomeButton!: am5.Button;\n public logoContainer!: am5.Container;\n public homeButton!: am5.Button;\n public buttonTemplate!: am5.Template<am5.RoundedRectangle>;\n public logoPin!: am5.Graphics;\n protected _buttonOutlineAnimation: any;\n public _isPlaying: boolean = false;\n public stepLabelX = 50;\n public resetHomePointButton!: am5.Button;\n public resetStepPointButton!: am5.Button;\n\n // settings\n public pinThreshold: number = 0.00002;\n public themeName: \"dark-yellow\" | \"dark-green\" | \"dark-blue\" | \"dark-gray\" | \"light-yellow\" | \"light-green\" | \"light-blue\" | \"light-gray\" = \"dark-green\";\n public homeId?: string;\n public width?: number;\n public height?: number;\n public homePolygon?: am5map.MapPolygon;\n public duration: number = 2000;\n public sliderPosition: number = 0;\n public graticuleEnabled: boolean = false;\n public waterEnabled: boolean = true;\n public autoStep: boolean = false;\n public autoHomeStep: boolean = false;\n public namesEnabled: boolean = true;\n public autoPlay: boolean = false;\n public projection: string = \"geoNaturalEarth1\";\n public autoZoom: \"none\" | \"step\" | \"all\" = \"none\";\n\n public pinTemplate!: am5.Template<am5.Circle>;\n public nameLabelTemplate!: am5.Template<am5.Label>;\n\n public data: Array<{ text?: string, color: string, places: Array<string>, colors: { [index: string]: string }, position?: { zoomLevel: number, geoPoint: am5.IGeoPoint, rotationX: number, rotationY: number } }> = [];\n public homePosition?: { zoomLevel: number, geoPoint: am5.IGeoPoint, rotationX: number, rotationY: number };\n\n public exporting!: am5plugins_exporting.Exporting;\n\n protected _polygonAreas: { [index: string]: number } = {}; // measured areas to know where pins should go\n protected _stepDisposers: Array<am5.IDisposer> = [];\n protected _fitLabelsDp?: am5.IDisposer;\n\n protected _currentStep: number = -1;\n protected _visitedPlaces: Array<string> = []; // all the places visited at least once\n protected _firstVisit: { [index: string]: number } = {}; // step of the first visit of the place\n protected _sliderAnimation: any;\n protected _stepTimes: Array<number> = [];\n protected _replay: boolean = false;\n\n public homeStepData: any;\n\n protected _div: string | HTMLDivElement;\n\n public themes = {\n \"dark-yellow\": {\n \"background\": am5.color(0x222222),\n \"water\": am5.color(0x333333),\n \"unvisited\": am5.color(0x666666),\n \"border\": am5.color(0x444444),\n \"hover\": am5.color(0x777777),\n \"label\": am5.color(0xffffff),\n \"alternativeLabel\": am5.color(0xffffff),\n \"graticule\": am5.color(0x000000),\n \"sliderBackground\": am5.color(0x000000),\n \"visited\": am5.color(0xdaaa44),\n \"home\": am5.color(0xaaba42),\n \"hovervisited\": am5.color(0xf1c347),\n \"sliderOpacity\": 0.3,\n \"nameLabelOpacity\": 0.6\n },\n \"dark-green\": {\n \"background\": am5.color(0x222222),\n \"water\": am5.color(0x333333),\n \"unvisited\": am5.color(0x666666),\n \"border\": am5.color(0x444444),\n \"hover\": am5.color(0x777777),\n \"label\": am5.color(0xffffff),\n \"alternativeLabel\": am5.color(0xffffff),\n \"graticule\": am5.color(0x000000),\n \"sliderBackground\": am5.color(0x000000),\n \"visited\": am5.color(0xaaba42),\n \"home\": am5.color(0xdaaa44),\n \"hovervisited\": am5.color(0x97ad05),\n \"sliderOpacity\": 0.3,\n \"nameLabelOpacity\": 0.6\n },\n \"dark-blue\": {\n \"background\": am5.color(0x222222),\n \"water\": am5.color(0x333333),\n \"unvisited\": am5.color(0x666666),\n \"border\": am5.color(0x444444),\n \"hover\": am5.color(0x777777),\n \"label\": am5.color(0xffffff),\n \"alternativeLabel\": am5.color(0xffffff),\n \"graticule\": am5.color(0x000000),\n \"sliderBackground\": am5.color(0x000000),\n \"visited\": am5.color(0x6490a9),\n \"home\": am5.color(0xcc9f40),\n \"hovervisited\": am5.color(0x4b99c4),\n \"sliderOpacity\": 0.3,\n \"nameLabelOpacity\": 0.6\n },\n \"dark-gray\": {\n \"background\": am5.color(0x222222),\n \"water\": am5.color(0x333333),\n \"unvisited\": am5.color(0x666666),\n \"border\": am5.color(0x444444),\n \"hover\": am5.color(0x777777),\n \"label\": am5.color(0xffffff),\n \"alternativeLabel\": am5.color(0xffffff),\n \"graticule\": am5.color(0x000000),\n \"sliderBackground\": am5.color(0x000000),\n \"visited\": am5.color(0xb3b3b3),\n \"home\": am5.color(0xcc9f40),\n \"hovervisited\": am5.color(0x97ad05),\n \"sliderOpacity\": 0.3,\n \"nameLabelOpacity\": 0.6\n },\n \"light-yellow\": {\n \"background\": am5.color(0xffffff),\n \"water\": am5.color(0xe6e6e6),\n \"unvisited\": am5.color(0xbbbbbb),\n \"border\": am5.color(0xffffff),\n \"hover\": am5.color(0x999999),\n \"label\": am5.color(0x000000),\n \"alternativeLabel\": am5.color(0x000000),\n \"graticule\": am5.color(0x444444),\n \"sliderBackground\": am5.color(0x000000),\n \"visited\": am5.color(0xdaaa44),\n \"home\": am5.color(0xaaba42),\n \"hovervisited\": am5.color(0xf1c347),\n \"sliderOpacity\": 0.15,\n \"nameLabelOpacity\": 0.5\n },\n \"light-green\": {\n \"background\": am5.color(0xffffff),\n \"water\": am5.color(0xe6e6e6),\n \"unvisited\": am5.color(0xbbbbbb),\n \"border\": am5.color(0xffffff),\n \"hover\": am5.color(0x999999),\n \"label\": am5.color(0x000000),\n \"alternativeLabel\": am5.color(0x000000),\n \"graticule\": am5.color(0x444444),\n \"sliderBackground\": am5.color(0x000000),\n \"visited\": am5.color(0xaaba42),\n \"home\": am5.color(0xdaaa44),\n \"hovervisited\": am5.color(0x97ad05),\n \"sliderOpacity\": 0.15,\n \"nameLabelOpacity\": 0.5\n },\n \"light-blue\": {\n \"background\": am5.color(0xffffff),\n \"water\": am5.color(0xe6e6e6),\n \"unvisited\": am5.color(0xbbbbbb),\n \"border\": am5.color(0xffffff),\n \"hover\": am5.color(0x999999),\n \"label\": am5.color(0x000000),\n \"alternativeLabel\": am5.color(0x000000),\n \"graticule\": am5.color(0x444444),\n \"sliderBackground\": am5.color(0x000000),\n \"visited\": am5.color(0x6490a9),\n \"home\": am5.color(0xdaaa44),\n \"hovervisited\": am5.color(0x4b99c4),\n \"sliderOpacity\": 0.15,\n \"nameLabelOpacity\": 0.5\n },\n \"light-gray\": {\n \"background\": am5.color(0xffffff),\n \"water\": am5.color(0xe6e6e6),\n \"unvisited\": am5.color(0xbbbbbb),\n \"border\": am5.color(0xffffff),\n \"hover\": am5.color(0x999999),\n \"label\": am5.color(0x000000),\n \"alternativeLabel\": am5.color(0x000000),\n \"graticule\": am5.color(0x444444),\n \"sliderBackground\": am5.color(0x000000),\n \"visited\": am5.color(0xb3b3b3),\n \"home\": am5.color(0xdaaa44),\n \"hovervisited\": am5.color(0x97ad05),\n \"sliderOpacity\": 0.15,\n \"nameLabelOpacity\": 0.5\n }\n }\n\n static new<C extends typeof VisitedPlaces, T extends InstanceType<C>>(this: C, div: string): T {\n const x = (new this(div, true)) as T;\n x._afterNew();\n return x;\n }\n\n constructor(div: string, isReal: boolean) {\n if (!isReal) {\n throw new Error(\"You cannot use `new Class()`, instead use `Class.new()`\");\n }\n this._div = div;\n\n am5.addLicense(\"AM5C8151581515\");\n am5.addLicense(\"AM5M8151581515\");\n }\n\n /// public ///////////////////////////////////////////////////////////////////\n\n /**\n * Sets step of the data\n */\n public setStep(step: number, zoomOut?: boolean) {\n if (this.data.length == 0) {\n return;\n }\n\n am5.array.each(this._stepDisposers, (disposer) => {\n disposer.dispose();\n })\n\n this._setStep(step, zoomOut);\n this.slider.set(\"start\", this._stepToPosition(step));\n }\n\n protected _setStep(step: number, zoomOut?: boolean) {\n this._currentStep = step;\n this._togglePolygons(zoomOut);\n this._toggleButtons();\n }\n\n public get step(): number {\n return this._currentStep;\n }\n\n public getEstimatedTime() {\n let duration = this.animationDuration + this._totalDuration();\n\n if (this.projection == \"geoOrthographic\" && !this.homePosition) {\n duration += this.animationDuration * 5;\n }\n else {\n duration += this.animationDuration;\n }\n\n return duration;\n }\n\n public dispose() {\n this.root.dispose();\n }\n\n /**\n * starts and stops play animation\n */\n public start() {\n this._isPlaying = true;\n if (this._buttonOutlineAnimation) {\n this._buttonOutlineAnimation.stop();\n }\n this.playButtonOutline.set(\"forceHidden\", true);\n\n this.playButton.setRaw(\"active\", true);\n this.playButton.states.apply(\"active\");\n\n this._animateSlider(1);\n }\n\n protected _animateSlider(position: number, duration?: number, easing?: am5.ease.Easing) {\n if (this._sliderAnimation) {\n this._sliderAnimation.stop();\n }\n\n if (duration == undefined) {\n duration = this._totalDuration() * (position - this.slider.get(\"start\", 0))\n }\n\n let start = this.slider.get(\"start\", 0);\n if (start == 1) {\n start = 0;\n }\n\n this._sliderAnimation = this.slider.animate({\n key: \"start\",\n from: start,\n to: position,\n duration: duration,\n easing: easing\n });\n\n this._sliderAnimation.events.on(\"stopped\", () => {\n this.stop();\n })\n }\n\n public stop() {\n if (this._sliderAnimation) {\n this._sliderAnimation.stop();\n this._sliderAnimation = undefined;\n }\n this.playButton.setRaw(\"active\", false);\n this.playButton.states.applyAnimate(\"default\");\n }\n\n public clear() {\n this.data = [];\n this.toggleTimeline();\n this._currentStep = 0;\n this.homeStepData = undefined;\n this._continentSteps = {};\n this.polygonSeries.data.setAll([]);\n this.pinSeries.data.setAll([]);\n this.nameSeries.data.setAll([]);\n this._visitedPlaces = [];\n this._firstVisit = {};\n this._createHash();\n\n setTimeout(() => {\n this._goHome();\n }, 10)\n }\n\n\n public replay() {\n this.root.dispose();\n this._currentStep = -1;\n this._appeared = false;\n this._isPlaying = false;\n if (this.data.length > 1) {\n this._replay = true;\n }\n this.slider.set(\"start\", 0);\n this.data = [];\n this._init();\n }\n\n /***\n * animates to next step\n */\n public next() {\n const count = this.data.length;\n let nextStep = Math.min(count, this._currentStep + 1);\n\n this.slider.animate({\n key: \"start\",\n to: Math.min(1, this._stepToPosition(nextStep) + 0.01),\n duration: this.oneStepAnimationDuration,\n easing: this.chart.get(\"animationEasing\")\n });\n }\n\n protected toggleButtonStates() {\n const position = this.slider.get(\"start\");\n if (position == 0) {\n this.prevButton.set(\"disabled\", true);\n this.prevButton.set(\"interactive\", false);\n }\n else {\n this.prevButton.set(\"disabled\", false);\n this.prevButton.set(\"interactive\", true);\n }\n\n if (position == 1) {\n this.nextButton.set(\"disabled\", true);\n this.nextButton.set(\"interactive\", false);\n\n }\n else {\n this.nextButton.set(\"interactive\", true);\n this.nextButton.set(\"disabled\", false);\n }\n }\n\n /***\n * animates to previous step\n */\n public previous() {\n let nextStep = Math.max(0, this._currentStep - 1);\n\n let position = this._stepToPosition(nextStep) + 0.01;\n if (nextStep == 0) {\n position = 0;\n this.prevButton.states.applyAnimate(\"disabled\");\n this.prevButton.set(\"interactive\", false);\n }\n\n this.slider.animate({\n key: \"start\",\n to: position,\n duration: this.oneStepAnimationDuration,\n easing: this.chart.get(\"animationEasing\")\n });\n }\n\n\n public applyTheme(themeName: \"dark-yellow\" | \"dark-green\" | \"dark-blue\" | \"dark-gray\" | \"light-yellow\" | \"light-green\" | \"light-blue\" | \"light-gray\") {\n this.themeName = themeName;\n const theme = this.themes[themeName];\n\n this.stepLabel.set(\"fill\", theme.label);\n\n this.background.set(\"fill\", theme.background);\n this.waterSeries.mapPolygons.template.set(\"fill\", theme.water);\n\n this.graticuleSeries.mapLines.template.setAll({\n stroke: theme.graticule,\n strokeOpacity: 0.1\n });\n this.polygonSeries.mapPolygons.template.setAll({\n fill: theme.unvisited,\n stroke: theme.border,\n fillOpacity: 0.8\n });\n\n this.polygonSeries.mapPolygons.template.states.create(\"active\", {\n fill: theme.visited,\n fillOpacity: 1\n })\n\n this.polygonSeries.mapPolygons.template.states.lookup(\"active\")!.set(\"stateAnimationDuration\", 1000);\n\n this.polygonSeries.mapPolygons.template.states.create(\"hover\", { fill: theme.hover })\n\n am5.array.each(this.polygonSeries.mapPolygons.template.entities, (mapPolygon) => {\n const dataItem = mapPolygon.dataItem as am5.DataItem<am5map.IMapSeriesDataItem>;\n if (dataItem) {\n this._togglePolygon(dataItem.get(\"id\"))\n }\n })\n\n this.pinTemplate.setAll({\n\n });\n\n this.pinTemplate.states.create(\"active\", {\n fill: theme.visited,\n fillOpacity: 1,\n strokeOpacity: 1\n })\n\n this.pinTemplate.states.create(\"hover\", {\n fill: theme.hover\n })\n\n const labelColor = theme.label;\n this.visitedLabel.set(\"fill\", labelColor);\n this.comLabel.set(\"fill\", labelColor);\n this.placesLabel.set(\"fill\", labelColor);\n\n this.stepLabel.states.lookup(\"default\")!.setAll({ opacity: theme.nameLabelOpacity, dx: 0 });\n this.stepLabel.states.create(\"hidden\", { dx: -400, opacity: 0 });\n\n this.nameLabelTemplate.setAll({\n fill: theme.alternativeLabel\n });\n\n this.nameLabelTemplate.states.lookup(\"default\")!.set(\"opacity\", theme.nameLabelOpacity);\n\n this.playButtonOutline.set(\"stroke\", labelColor);\n\n this.sliderBackground.setAll({\n fill: theme.sliderBackground,\n fillOpacity: theme.sliderOpacity\n });\n\n const buttons = [this.homeButton, this.zoomControl.plusButton, this.zoomControl.minusButton, this.nextButton, this.prevButton, this.replayButton, this.slider.startGrip, this.playButton, this.saveStepButton, this.saveHomeButton]\n am5.array.each(buttons, (button) => {\n const bg = button.get(\"background\")!;\n bg.set(\"fill\", theme.home)\n bg.states.lookup(\"default\")!.set(\"fill\", theme.home);\n bg.states.create(\"hover\", { fill: theme.hovervisited });\n bg.states.create(\"down\", { fill: theme.hovervisited });\n bg.states.create(\"active\", { fill: theme.hovervisited });\n })\n\n this.logoPin.set(\"fill\", theme.home);\n }\n\n public setProjection(projection: \"geoEquirectangular\" | \"geoMercator\" | \"geoOrthographic\" | \"geoNaturalEarth1\" | \"geoEqualEarth\" | \"geoAlbersUsa\", createHash?: boolean) {\n this.projection = projection;\n this.chart.set(\"projection\", am5map[projection]());\n\n if (projection != \"geoOrthographic\") {\n\n if (this.homePosition) {\n this.homePosition.rotationY = 0;\n }\n\n this.chart.rotate(this.chart.get(\"rotationX\"), 0);\n }\n\n if (projection == \"geoOrthographic\") {\n this.chart.setAll({\n panY: \"rotateY\"\n });\n }\n else if (projection == \"geoAlbersUsa\") {\n this.chart.setAll({\n panY: \"translateY\",\n panX: \"translateX\"\n })\n }\n else {\n this.chart.setAll({\n panY: \"translateY\"\n })\n }\n\n if (createHash) {\n this._createHash();\n }\n }\n\n public toggleWater(enabled: boolean) {\n this.waterSeries.set(\"forceHidden\", !enabled);\n this.waterEnabled = enabled;\n this._createHash();\n }\n\n public toggleAutoStep(enabled: boolean) {\n this.autoStep = enabled;\n this._createHash();\n }\n\n public toggleGraticule(enabled: boolean) {\n this.graticuleSeries.set(\"forceHidden\", !enabled);\n this.graticuleEnabled = enabled;\n this._createHash();\n }\n\n public toggleTimeline(hide?: boolean) {\n if (hide === false || this.data.length > 1) {\n this.sliderContainer.show();\n if (this._buttonOutlineAnimation) {\n this._buttonOutlineAnimation.play();\n }\n }\n else {\n this.sliderContainer.hide(0);\n\n if (this._buttonOutlineAnimation) {\n this._buttonOutlineAnimation.stop();\n }\n }\n\n if (hide) {\n this.bottomContainer.set(\"forceHidden\", true);\n this.stepLabel.set(\"dy\", 0);\n }\n\n this._fixStepLabelPosition();\n }\n\n protected _fixStepLabelPosition() {\n if (this.data.length > 1) {\n this.stepLabel.set(\"dy\", -45);\n this.stepLabel.set(\"dx\", 0);\n this.stepLabel.states.lookup(\"default\")!.set(\"dx\", 0);\n }\n else {\n this.stepLabel.set(\"dy\", 0);\n this.stepLabel.set(\"dx\", this.stepLabelX);\n this.stepLabel.states.lookup(\"default\")!.set(\"dx\", this.stepLabelX);\n }\n\n if (this.bottomContainer.get(\"forceHidden\")) {\n this.stepLabel.set(\"dy\", 0);\n this.stepLabel.set(\"dx\", 0);\n this.stepLabel.states.lookup(\"default\")!.set(\"dx\", 0);\n }\n }\n\n public toggleNames(enabled: boolean) {\n this.namesEnabled = enabled;\n if (!enabled) {\n this.nameSeries.hide();\n }\n else {\n this.nameSeries.show();\n }\n this._createHash();\n }\n\n public toggleAutoplay(enabled: boolean) {\n this.autoPlay = enabled;\n this._createHash();\n }\n\n public removePlace(_id: string) {\n\n }\n\n public setHome(id?: string) {\n let mapPolygon = this.homePolygon;\n let prevId = this.homeId;\n if (prevId) {\n this.removePlace(prevId);\n }\n this.homeId = id;\n\n let dataItem = this.polygonSeries.getDataItemById(id as any);\n if (dataItem) {\n mapPolygon = dataItem.get(\"mapPolygon\");\n this.homePolygon = mapPolygon;\n this._addPin(id as string);\n this._addName(id as string);\n\n var centroid = mapPolygon.geoCentroid();\n\n if (this.projection == \"geoOrthographic\" && this.isEditor) {\n if (mapPolygon) {\n var centroid = mapPolygon.geoCentroid();\n if (centroid) {\n this.chart.animate({ key: \"rotationX\", to: -centroid.longitude, duration: 1500, easing: am5.ease.inOut(am5.ease.cubic) });\n this.chart.animate({ key: \"rotationY\", to: -centroid.latitude, duration: 1500, easing: am5.ease.inOut(am5.ease.cubic) });\n\n if (this.homeStepData) {\n this.homeStepData.places = [id];\n\n const position = this.homeStepData.position;\n\n if (position) {\n position.rotationX = -centroid.longitude;\n position.rotationY = -centroid.latitude;\n }\n }\n }\n }\n }\n this._togglePolygons();\n }\n else {\n this.homePolygon = undefined;\n }\n\n this._togglePolygon(prevId);\n this._toggleName(prevId);\n\n if (this.autoHomeStep) {\n am5.array.each(this.data, (dataItem) => {\n if (dataItem.places.length == 1) {\n if (dataItem.places[0] == id) {\n this.homeStepData = dataItem;\n }\n }\n })\n }\n this._createHash();\n }\n\n protected _togglePolygon(id?: string) {\n if (id) {\n this._toggleName(id);\n\n const dataItem = this.polygonSeries.getDataItemById(id);\n if (dataItem) {\n const mapPolygon = dataItem.get(\"mapPolygon\");\n const pinSprite = this._getFirstBulletsSprite(this.pinSeries.getDataItemById(id)) as am5.Graphics;\n\n if (mapPolygon) {\n let opacity = 1;\n let fill = this.themes[this.themeName].unvisited;\n let active = false;\n let visible = false;\n\n if (this.homeId == id) {\n fill = this.themes[this.themeName].home;\n }\n\n if (am5.type.isNumber(this._firstVisit[id]) && this._firstVisit[id] <= this._currentStep) {\n visible = true;\n fill = this.themes[this.themeName].visited;\n if (this.homeId == id) {\n fill = this.themes[this.themeName].home;\n }\n\n for (let s = this._currentStep; s >= 0; s--) {\n const stepData = this.data[s];\n\n if (stepData) {\n\n if (stepData.places.indexOf(id) == -1) {\n continue;\n }\n else {\n if (stepData) {\n const colors = stepData.colors;\n if (colors) {\n const color = colors[id];\n if (color != undefined) {\n fill = am5.color(\"#\" + color);\n break;\n }\n }\n if (stepData.color != undefined) {\n fill = am5.color(\"#\" + stepData.color);\n break;\n }\n }\n }\n }\n }\n\n active = true;\n const currentStepData = this.data[this._currentStep];\n if (currentStepData) {\n if (currentStepData.places.indexOf(id) == -1) {\n if (this._firstVisit[id] < this._currentStep) {\n opacity = this.previouslyVisitedOpacity;\n }\n }\n }\n }\n\n if (this.slider.get(\"start\", 0) == 1) {\n opacity = 1;\n }\n\n if (this.homeId == id) {\n opacity = 1;\n }\n\n const hsl = fill.toHSL()\n let l = -0.1;\n\n if (hsl.l < 0.2) {\n l = 0.1;\n }\n\n let hover = am5.Color.brighten(fill, l);\n\n mapPolygon.states.lookup(\"default\")!.setAll({\n fill: fill\n })\n\n mapPolygon.states.lookup(\"active\")!.setAll({\n fill: fill\n })\n\n mapPolygon.states.lookup(\"hover\")!.setAll({\n fill: hover\n })\n\n mapPolygon.set(\"active\", active);\n\n if (!active) {\n if (this._currentStep == -1) {\n mapPolygon.states.apply(\"default\");\n }\n else {\n mapPolygon.states.applyAnimate(\"default\");\n }\n }\n else {\n mapPolygon.states.applyAnimate(\"active\");\n }\n\n this.root.events.once(\"frameended\", () => {\n mapPolygon.animate({ key: \"opacity\", to: opacity, duration: this.animationDuration / 2 });\n mapPolygon.animate({ key: \"fill\", to: fill, duration: this.animationDuration / 2 });\n })\n\n if (pinSprite) {\n pinSprite.animate({ key: \"fill\", to: fill, duration: this.animationDuration / 2 });\n\n pinSprite.states.lookup(\"hover\")!.setAll({\n fill: hover\n })\n\n if (visible) {\n pinSprite.animate({ key: \"opacity\", to: opacity, duration: this.animationDuration / 2 });\n\n const currentStepData = this.data[this._currentStep];\n if (currentStepData) {\n if (currentStepData.places.indexOf(id) != -1) {\n pinSprite.appear();\n }\n }\n }\n else {\n pinSprite.hide();\n\n const polygonDataItem = this.polygonSeries.getDataItemById(id);\n if (polygonDataItem) {\n const mapPolygon = polygonDataItem.get(\"mapPolygon\");\n if (mapPolygon) {\n mapPolygon.hideTooltip();\n }\n }\n }\n }\n }\n }\n }\n }\n\n\n protected _toggleName(id?: string) {\n if (id) {\n const dataItem = this.nameSeries.getDataItemById(id);\n\n if (dataItem) {\n const nameLabel = this._getFirstBulletsSprite(dataItem) as am5.Label;\n if (nameLabel) {\n\n const dataContext = dataItem.dataContext as any;\n nameLabel.set(\"text\", dataContext.name);\n let visible = false;\n\n if (am5.type.isNumber(this._firstVisit[id]) && this._firstVisit[id] == this._currentStep) {\n visible = true;\n }\n\n if (id == this.homeId) {\n visible = true;\n }\n\n if (this._currentStep >= this.data.length) {\n visible = false;\n }\n\n if (visible) {\n nameLabel.show();\n }\n else {\n let duration = this.animationDuration / 2 + Math.random() * this.animationDuration / 3;\n\n nameLabel.hide(duration);\n }\n }\n }\n }\n }\n\n\n // protected //////////////////////////////////////////////////////////////////\n\n protected _afterNew() {\n\n if (!this.map) {\n const path = window.location.pathname.replace(/\\/*/ig, \"\");\n if (path !== \"\" && path !== \"view\" && path !== \"embed\" && path !== \"video\") {\n this.map = path;\n }\n }\n\n this.worldMap = this.map.match(/world/) ? true : false;\n\n // Default projection fuzzy logic\n if (this.worldMap) {\n this.waterEnabled = true;\n }\n else if (this.map.match(/(^usa)|(\\_usa)/)) {\n this.projection = \"geoAlbersUsa\";\n this.waterEnabled = false;\n }\n else {\n this.projection = \"geoMercator\";\n this.waterEnabled = false;\n }\n\n this._init();\n }\n\n protected _init() {\n\n this.root = am5.Root.new(this._div);\n this._firstVisit = {};\n\n this.exporting = am5plugins_exporting.Exporting.new(this.root, {\n filePrefix: \"myVisitedPlaces\"\n });\n\n const logo = this.root._logo;\n if (logo) {\n logo.setAll({\n tooltipX: 0,\n x: am5.p100,\n centerX: am5.p100\n })\n }\n\n const theme = this.themes[this.themeName];\n const myTheme = am5.Theme.new(this.root);\n\n myTheme.rule(\"InterfaceColors\").setAll({\n primaryButton: theme.home,\n primaryButtonHover: theme.hovervisited,\n primaryButtonDown: theme.hovervisited,\n primaryButtonActive: theme.hovervisited,\n primaryButtonText: am5.Color.fromHex(0xffffff),\n primaryButtonStroke: am5.Color.fromHex(0xffffff),\n secondaryButton: theme.home,\n secondaryButtonHover: theme.hovervisited,\n secondaryButtonDown: theme.hovervisited,\n secondaryButtonActive: theme.hovervisited,\n secondaryButtonText: am5.Color.fromHex(0xffffff),\n secondaryButtonStroke: am5.Color.fromHex(0xffffff)\n });\n\n this.buttonTemplate = myTheme.rule(\"RoundedRectangle\", [\"button\"])\n this.buttonTemplate.setAll({\n cornerRadiusTL: 50,\n cornerRadiusTR: 50,\n cornerRadiusBL: 50,\n cornerRadiusBR: 50\n })\n\n myTheme.rule(\"Graphics\", [\"button\", \"icon\"]).setAll({\n fill: am5.color(0xffffff),\n x: am5.p50,\n y: am5.p50,\n centerX: am5.p50,\n centerY: am5.p50\n })\n\n myTheme.rule(\"Tooltip\", [\"tooltip\"]).setAll({\n paddingLeft: 8,\n paddingTop: 6,\n paddingBottom: 6,\n paddingRight: 8\n })\n\n myTheme.rule(\"Label\", [\"tooltip\"]).setAll({\n fontSize: \"0.8em\"\n })\n\n myTheme.rule(\"PointedRectangle\", [\"tooltip\"]).setAll({\n fillOpacity: 0.7\n })\n\n myTheme.rule(\"Button\").setAll({\n marginTop: 2,\n centerY: am5.p50,\n centerX: am5.p50,\n marginBottom: 2,\n marginLeft: 2,\n marginRight: 2,\n width: 37,\n height: 37\n })\n\n\n myTheme.rule(\"Button\").states.create(\"disabled\", {\n\n })\n\n myTheme.rule(\"RoundedRectangle\", [\"button\"]).states.create(\"disabled\", {\n fill: am5.color(0xdadada)\n })\n\n myTheme.rule(\"Button\", [\"zoomcontrol\"]).setAll({\n marginTop: 2,\n marginBottom: 2\n })\n\n this.root.setThemes([\n am5themes_Animated.new(this.root),\n myTheme\n ]);\n\n // Get map from the URL\n if (typeof visitedplaces_config != \"undefined\") {\n if (visitedplaces_config.map) {\n this.map = visitedplaces_config.map;\n }\n }\n\n\n // if (!this.map) {\n // this.map = \"world\";\n // }\n\n\n this.systemTooltipU = this._createSystemTooltip(\"up\");\n this.systemTooltipD = this._createSystemTooltip(\"down\");\n this.systemTooltipH = this._createSystemTooltip(\"horizontal\");\n\n this.background = am5.Rectangle.new(this.root, {});\n\n this.chart = this.root.container.children.push(\n am5map.MapChart.new(this.root, {\n animationEasing: am5.ease.out(am5.ease.cubic),\n animationDuration: this.animationDuration,\n zoomStep: this.zoomStep,\n minZoomLevel: this.minZoomLevel,\n panX: \"rotateX\",\n background: this.background\n })\n );\n\n this.setProjection(this.projection as any);\n\n /*this.chart.getTooltip()!.setAll({\n autoTextColor: false\n })\n */\n\n this.chart.events.on(\"boundschanged\", () => {\n this.stepLabel.set(\"maxWidth\", this.chart.width() - 20);\n })\n\n this.chart.on(\"rotationX\", () => {\n this._fitLabels0();\n })\n\n this.chart.on(\"rotationY\", () => {\n this._fitLabels0();\n })\n\n this.chart.on(\"zoomLevel\", () => {\n this._fitLabels0();\n })\n\n this.waterSeries = this.chart.series.push(am5map.MapPolygonSeries.new(this.root, {\n affectsBounds: this.worldMap\n }));\n this.waterSeries.data.push({\n geometry: am5map.getGeoRectangle(90, 180, -90, -180)\n });\n this.waterSeries.mapPolygons.template.setAll({\n fillOpacity: 1,\n strokeOpacity: 0\n });\n\n this.graticuleSeries = this.chart.series.push(am5map.GraticuleSeries.new(this.root, {\n affectsBounds: this.worldMap\n }));\n this.graticuleSeries.mapLines.template.setAll({\n strokeOpacity: 1\n });\n\n // Create polygon series\n this.polygonSeries = this.chart.series.push(\n am5map.MapPolygonSeries.new(this.root, {\n opacity: 0\n })\n );\n\n // Load GeoJSON\n this._loadGeodata();\n\n this.polygonSeries.events.on(\"datavalidated\", () => {\n this._handleDataValidated()\n });\n this.polygonSeries.mapPolygons.template.setAll({\n tooltipText: \"{name}\",\n strokeWidth: 0.3\n });\n\n // pin series\n this.pinSeries = this.chart.series.push(am5map.MapPointSeries.new(this.root, {\n longitudeField: \"longitude\",\n latitudeField: \"latitude\"\n }));\n\n this.pinTemplate = am5.Template.new({});\n\n this.pinSeries.bullets.push(() => {\n\n const sprite = am5.Circle.new(this.root, {\n radius: this.pinRadius,\n tooltipText: \"{name}\",\n scale: 1,\n }, this.pinTemplate)\n\n sprite.states.lookup(\"default\")!.set(\"scale\", 1);\n\n sprite.states.create(\"hidden\", {\n opacity: 0,\n scale: 3,\n visible: true\n })\n\n sprite.hide(0);\n\n sprite.events.on(\"click\", (e) => {\n this._handlePolygonClick(e.target);\n })\n\n return am5.Bullet.new(this.root, {\n sprite: sprite\n })\n })\n\n // pin series\n this.nameSeries = this.chart.series.push(am5map.MapPointSeries.new(this.root, {\n longitudeField: \"longitude\",\n latitudeField: \"latitude\"\n }));\n\n this.nameLabelTemplate = am5.Template.new({});\n\n this.nameSeries.bullets.push(() => {\n const label = am5.Label.new(this.root, {\n centerX: am5.percent(50),\n centerY: am5.percent(50),\n oversizedBehavior: \"fit\",\n minScale: 0.3,\n opacity: 0,\n fontWeight: this.nameLabelFontWeight as any,\n }, this.nameLabelTemplate)\n\n label.hide(0);\n\n return am5.Bullet.new(this.root, {\n sprite: label\n })\n })\n this.nameLabelTemplate.states.create(\"default\", {\n stateAnimationDuration: this.animationDuration / 2,\n opacity: this.themes[this.themeName].nameLabelOpacity,\n stateAnimationEasing: am5.ease.out(am5.ease.cubic),\n dx: 0\n })\n\n this.nameLabelTemplate.states.create(\"hidden\", {\n stateAnimationDuration: this.animationDuration / 2,\n opacity: 0,\n stateAnimationEasing: am5.ease.out(am5.ease.cubic),\n dx: -100\n })\n\n\n this.bottomContainer = this.chart.children.push(am5.Container.new(this.root, {\n y: am5.p100,\n centerX: am5.p50,\n centerY: am5.p100,\n x: am5.p50,\n width: this.sliderWidth,\n paddingLeft: this.sliderPaddingLeft,\n paddingRight: this.sliderPaddingRight,\n paddingBottom: this.sliderPaddingBottom,\n layout: this.root.horizontalLayout,\n tooltip: this.systemTooltipD,\n exportable: false\n }));\n\n this._setInteractivity();\n\n // Replay\n const replayIcon = am5.Graphics.new(this.root, {\n themeTags: [\"icon\"],\n svgPath: \"M 9.2 1.9 C 7.3 1.9 5.6 2.5 4.3 3.7 L 3.1 2.5 L 3.1 6.1 L 6.7 6.1 L 5.2 4.6 C 6.2 3.6 7.6 3.1 9.2 3.1 C 12.6 3.1 15.3 5.8 15.3 9.2 C 15.3 12.6 12.6 15.3 9.2 15.3 C 5.8 15.3 3.1 12.6 3.1 9.2 A 0.6 0.6 90 1 0 1.9 9.2 C 1.9 13.3 5.1 16.5 9.2 16.5 C 13.3 16.5 16.5 13.3 16.5 9.2 C 16.5 5.1 13.3 1.9 9.2 1.9 z\"\n })\n\n this.replayButton = this.bottomContainer.children.push(am5.Button.new(this.root, {\n tooltipY: 0,\n tooltipText: \"Replay\",\n icon: replayIcon\n }));\n\n const replayBg = this.replayButton.get(\"background\")!\n replayBg.setAll({\n strokeOpacity: 1\n })\n\n this.replayButton.events.on(\"click\", () => {\n this.replay();\n });\n\n // timeline slider //////////////////////////////////////////////////////////////\n this.sliderContainer = this.bottomContainer.children.push(am5.Container.new(this.root, {\n width: am5.p100,\n layout: this.root.horizontalLayout,\n visible: false\n }));\n\n this.sliderContainer.hide();\n\n\n // PREVIOUS\n const prevIcon = am5.Graphics.new(this.root, {\n themeTags: [\"icon\"],\n\n draw: (display) => {\n display.moveTo(8, -5);\n display.lineTo(0, 0);\n display.lineTo(8, 5);\n display.lineTo(8, -5);\n\n display.moveTo(0, -5);\n display.lineTo(-2, -5);\n display.lineTo(-2, 5);\n display.lineTo(0, 5);\n display.lineTo(0, -5);\n display.closePath();\n }\n })\n\n this.prevButton = this.sliderContainer.children.push(am5.Button.new(this.root, {\n tooltipY: 0,\n tooltipText: \"Previous step\",\n icon: prevIcon\n }));\n\n const prevBg = this.prevButton.get(\"background\")!\n prevBg.setAll({\n strokeOpacity: 1\n })\n\n this.prevButton.events.on(\"click\", () => {\n this.previous();\n });\n\n // NEXT\n const nextIcon = am5.Graphics.new(this.root, {\n themeTags: [\"icon\"],\n\n draw: (display) => {\n display.moveTo(0, -5);\n display.lineTo(8, 0);\n display.lineTo(0, 5);\n display.lineTo(0, -5);\n display.moveTo(8, -5);\n display.lineTo(10, -5);\n display.lineTo(10, 5);\n display.lineTo(8, 5);\n display.lineTo(8, -5);\n display.closePath();\n }\n\n })\n\n this.nextButton = this.sliderContainer.children.push(am5.Button.new(this.root, {\n tooltipText: \"Next step\",\n tooltipY: 0,\n icon: nextIcon\n }));\n\n const nextBg = this.nextButton.get(\"background\")!;\n nextBg.setAll({\n strokeOpacity: 1\n })\n\n this.nextButton.events.on(\"click\", () => {\n this.next();\n });\n\n const playIcon = am5.Graphics.new(this.root, {\n themeTags: [\"icon\"]\n })\n\n // PLAY\n this.playButton = this.sliderContainer.children.push(am5.Button.new(this.root, {\n themeTags: [\"play\"],\n tooltipY: 0,\n tooltipText: \"Play/Stop\",\n icon: playIcon,\n toggleKey: \"none\"\n }));\n\n\n this.playButton.get(\"background\")!.setAll({\n strokeOpacity: 1,\n strokeWidth: 1\n })\n\n this.playButton.events.on(\"click\", () => {\n if (!this._sliderAnimation) {\n this.start();\n }\n else {\n this.stop();\n }\n });\n\n\n this.slider = this.sliderContainer.children.push(am5.Slider.new(this.root, {\n orientation: \"horizontal\",\n start: 0,\n marginLeft: 40,\n centerY: am5.p50\n }));\n\n this.sliderBackground = this.slider.get(\"background\")!;\n\n var labelColor = this.themes[this.themeName].label;\n\n this.stepLabel = this.chart.children.push(am5.Label.new(this.root, {\n text: \"\",\n oversizedBehavior: \"fit\",\n centerX: 0,\n fontSize: \"2em\",\n y: am5.p100,\n paddingLeft: 17,\n paddingBottom: 15,\n opacity: 0.5,\n centerY: am5.p100,\n fill: labelColor\n }))\n\n this.slider.startGrip.setAll({\n tooltipY: 0,\n tooltipText: \"Drag to change position\"\n })\n\n const sliderGripIcon = this.slider.startGrip.get(\"icon\")!;\n sliderGripIcon.setAll({\n x: am5.p50,\n y: am5.p50,\n centerX: am5.p50,\n centerY: am5.p50\n })\n\n this.slider.events.on(\"rangechanged\", () => {\n if (this._appeared) {\n this._handleSlider();\n }\n });\n\n this.zoomControl = this.chart.set(\"zoomControl\", am5map.ZoomControl.new(this.root, {\n tooltip: this.systemTooltipH,\n exportable: false,\n y: 0,\n centerY: 0,\n paddingTop: 15,\n paddingRight: 15\n }));\n\n this.zoomControl.plusButton.setAll({\n tooltipX: 0,\n tooltipText: \"Zoom in\"\n })\n\n this.zoomControl.minusButton.setAll({\n tooltipX: 0,\n tooltipText: \"Zoom out\"\n })\n\n this.homeButton = this.zoomControl.children.moveValue(am5.Button.new(this.root, {\n tooltipText: \"Zoom out to home view\",\n tooltipX: 0,\n icon: am5.Graphics.new(this.root, {\n x: am5.p50,\n y: am5.p50,\n centerX: am5.p50,\n centerY: am5.p50,\n svgPath: \"M11.5 2.9C11.2 2.9 10.9 3 10.6 3.2L3.2 9.4C2.9 9.7 2.8 10.1 3 10.4 3.2 10.8 3.7 10.8 4.1 10.6L11.4 4.4C11.5 4.4 11.6 4.4 11.6 4.4L19 10.6C19.1 10.7 19.3 10.7 19.4 10.7 19.7 10.7 19.9 10.6 20.1 10.3 20.2 10 20.1 9.6 19.9 9.4L18.7 8.5 18.7 5.4C18.7 5 18.4 4.7 18 4.7L17.3 4.7C16.9 4.7 16.6 5 16.6 5.4L16.6 6.7 12.4 3.2C12.2 3 11.8 2.9 11.5 2.9zM11.5 5.8 4.3 11.8 4.3 16.9C4.3 17.9 5.1 18.7 6.1 18.7L9 18.7C9.6 18.7 10.1 18.2 10.1 17.6L10.1 14C10.1 13.6 10.4 13.3 10.8 13.3L12.2 13.3C12.6 13.3 13 13.6 13 14L13 17.6C13 18.2 13.4 18.7 14 18.7L16.9 18.7C17.9 18.7 18.7 17.9 18.7 16.9L18.7 11.8 11.5 5.8z\",\n fill: am5.color(0xffffff)\n })\n }), 0);\n\n this.homeButton.events.on(\"click\", () => {\n this._goHome();\n });\n\n\n // save button only in edit mode\n this.saveStepButton = this.zoomControl.children.moveValue(am5.Button.new(this.root, {\n tooltipX: 0,\n width: 37,\n height: 37,\n paddingTop: 0,\n paddingBottom: 0,\n paddingLeft: 0,\n paddingRight: 0,\n visible: false,\n marginBottom: 30,\n tooltipText: \"Save current position ant zoom level\",\n icon: am5.Graphics.new(this.root, {\n x: am5.p50,\n y: am5.p50,\n centerX: am5.p50,\n centerY: am5.p50,\n svgPath: \"M8.8 1C5.3 1 2.4 3.9 2.4 7.4 2.4 8.4 2.6 9.5 3.2 10.4L8.5 20C8.6 20.1 8.6 20.2 8.8 20.2 9 20.2 9 20.1 9.1 20L10.9 16.8C11 16.7 11 16.5 10.9 16.4 10.9 16.3 10.7 16.2 10.6 16.2L9.8 16.2C8.8 16.2 8 15.4 8 14.4L8 10.8C8 10.6 7.9 10.4 7.8 10.4 6.5 10 5.6 8.8 5.6 7.4 5.6 5.6 7 4.2 8.8 4.2 10.2 4.2 11.4 5.1 11.8 6.4 11.8 6.5 12 6.6 12.2 6.6L14.6 6.6C14.8 6.6 14.9 6.5 15 6.4 15 6.4 15.1 6.2 15 6.1 14.5 3.2 11.8 1 8.8 1zM9.8 7.4C9.3 7.4 8.8 7.9 8.8 8.4L8.8 14.4C8.8 14.9 9.3 15.4 9.8 15.4L15.8 15.4C16.3 15.4 16.8 14.9 16.8 14.4L16.8 8.6C16.8 8.5 16.7 8.4 16.7 8.3L15.9 7.5C15.6 7.2 15.2 7.5 15.2 7.8L15.2 9.6C15.2 10.2 14.7 10.6 14.2 10.6L11.4 10.6C10.9 10.6 10.4 10.2 10.4 9.6L10.4 7.8C10.4 7.6 10.2 7.4 10 7.4L9.8 7.4zM14 8.2C13.8 8.2 13.6 8.4 13.6 8.6L13.6 9.4C13.6 9.6 13.8 9.8 14 9.8 14.2 9.8 14.4 9.6 14.4 9.4L14.4 8.6C14.4 8.4 14.2 8.2 14 8.2zM10.8 11.4 14.8 11.4C15 11.4 15.2 11.6 15.2 11.8L15.2 14.6 10.4 14.6 10.4 11.8C10.4 11.6 10.6 11.4 10.8 11.4z\",\n fill: am5.color(0xffffff)\n })\n }), 0);\n\n this.saveHomeButton = this.zoomControl.children.moveValue(am5.Button.new(this.root, {\n tooltipX: 0,\n width: 37,\n height: 37,\n paddingTop: 0,\n paddingBottom: 0,\n paddingLeft: 0,\n paddingRight: 0,\n visible: false,\n tooltipText: \"Save home position ant zoom level\",\n icon: am5.Graphics.new(this.root, {\n x: am5.p50,\n y: am5.p50,\n centerX: am5.p50,\n centerY: am5.p50,\n svgPath: \"M12.8 11.9C12.4 11.9 12 12.4 12 12.8V17.9c0 .4.4.8.8.8H17.9c.4 0 .8-.4.8-.8V12.9c0-.1-.1-.2-.1-.3l-.7-.7c-.3-.3-.6 0-.6.3v1.5c0 .5-.4.8-.8.8h-2.4c-.4 0-.8-.3-.8-.8V12.3c0-.2-.2-.3-.3-.3H12.8zM16.4 12.6c-.2 0-.3.2-.3.3v.7c0 .2.2.3.3.3s.3-.2.3-.3V12.9C16.7 12.8 16.6 12.6 16.4 12.6zM13.7 15.3h3.4c.2 0 .3.2.3.3v2.4h-4.1v-2.4C13.4 15.5 13.5 15.3 13.7 15.3zM11.5 2.9C11.2 2.9 10.9 3 10.6 3.2L3.2 9.4C2.9 9.7 2.8 10.1 3 10.4 3.2 10.8 3.7 10.8 4.1 10.6L11.4 4.4C11.5 4.4 11.6 4.4 11.6 4.4L19 10.6C19.1 10.7 19.3 10.7 19.4 10.7 19.7 10.7 19.9 10.6 20.1 10.3 20.2 10 20.1 9.6 19.9 9.4L18.7 8.5 18.7 5.4C18.7 5 18.4 4.7 18 4.7L17.3 4.7C16.9 4.7 16.6 5 16.6 5.4L16.6 6.7 12.4 3.2C12.2 3 11.8 2.9 11.5 2.9zM11.5 5.8 4.3 11.8 4.3 16.9C4.3 17.9 5.1 18.7 6.1 18.7L9 18.7C9.6 18.7 10.1 18.2 10.1 17.6Q10.1 14.8 10.1 12C10.1 10.4 10.1 10.4 11.3 10.4L17 10.4 11.5 5.8z\",\n fill: am5.color(0xffffff)\n })\n }), 0);\n\n\n this.polygonSeries.mapPolygons.template.setAll({\n toggleKey: \"active\"\n });\n\n var iconHome = am5.Graphics.new(this.root, {\n strokeOpacity: 0.7,\n strokeWidth: 0.5,\n draw: (display) => {\n let r = 5;\n display.moveTo(-r, -r);\n display.lineTo(r, r);\n display.moveTo(-r, r);\n display.lineTo(r, -r);\n display.moveTo(0, 0);\n },\n themeTags: [\"icon\"],\n fill: this.root.interfaceColors.get(\"background\"),\n fillOpacity: 0.1,\n stroke: this.root.interfaceColors.get(\"background\")\n })\n\n // reset home button only in edit mode\n const resetHomePointButton = this.zoomControl.children.push(am5.Button.new(this.root, {\n tooltip: this.systemTooltipH,\n tooltipText: \"Reset home position ant zoom level\",\n tooltipX: 0,\n position: \"absolute\",\n x: -37,\n y: 35,\n width: 25,\n height: 25,\n visible: false,\n icon: iconHome\n }))\n\n this.resetHomePointButton = resetHomePointButton;\n\n const resetHomeBackground = resetHomePointButton.get(\"background\")! as am5.RoundedRectangle;\n\n resetHomeBackground.setAll({\n fillOpacity: 0,\n cornerRadiusTR: 50,\n cornerRadiusTL: 50,\n cornerRadiusBR: 50,\n cornerRadiusBL: 50\n })\n\n resetHomeBackground.states.create(\"hover\", {\n fillOpacity: 0.6\n })\n\n var iconStep = am5.Graphics.new(this.root, {\n strokeOpacity: 0.7,\n strokeWidth: 0.5,\n draw: (display) => {\n let r = 5;\n display.moveTo(-r, -r);\n display.lineTo(r, r);\n display.moveTo(-r, r);\n display.lineTo(r, -r);\n display.moveTo(0, 0);\n },\n themeTags: [\"icon\"],\n fill: this.root.interfaceColors.get(\"background\"),\n fillOpacity: 0.1,\n stroke: this.root.interfaceColors.get(\"background\")\n })\n\n\n // reset home button only in edit mode\n const resetStepPointButton = this.zoomControl.children.push(am5.Button.new(this.root, {\n tooltip: this.systemTooltipH,\n tooltipText: \"Reset step position ant zoom level\",\n tooltipX: 0,\n position: \"absolute\",\n x: -37,\n y: 35 + 42,\n width: 25,\n height: 25,\n visible: false,\n icon: iconStep\n }))\n\n resetStepPointButton.events.on(\"click\", () => {\n this.resetStepPoint();\n })\n\n resetHomePointButton.events.on(\"click\", () => {\n this.resetHomePoint();\n })\n\n this.resetStepPointButton = resetStepPointButton;\n\n const resetStepbackground = resetStepPointButton.get(\"background\")! as am5.RoundedRectangle;\n\n resetStepbackground.setAll({\n fillOpacity: 0,\n cornerRadiusTR: 50,\n cornerRadiusTL: 50,\n cornerRadiusBR: 50,\n cornerRadiusBL: 50\n })\n\n resetStepbackground.states.create(\"hover\", {\n fillOpacity: 0.6\n })\n\n this.logoContainer = this.chart.children.push(am5.Container.new(this.root, {\n layout: this.root.horizontalLayout,\n paddingLeft: 16,\n paddingTop: 3,\n background: am5.Rectangle.new(this.root, {\n fillOpacity: 0,\n fill: labelColor\n }),\n tooltip: this.systemTooltipU,\n tooltipY: am5.p100,\n tooltipText: \"Create your own visited places map\",\n setStateOnChildren: true,\n cursorOverStyle: \"pointer\"\n }));\n\n try {\n if ((window.top && window.top != window.self && window.top.location.host == window.self.location.host) ? true : false) {\n this.logoContainer.set(\"forceHidden\", true);\n }\n }\n catch (e) {\n // Nothing\n }\n\n this.logoContainer.states.create(\"hover\", {});\n\n this.logoContainer.events.on(\"click\", () => {\n window.open(\"https://visitedplaces.com/\")\n });\n\n this.visitedLabel = this.logoContainer.children.push(am5.Label.new(this.root, {\n text: \"visited\",\n fillOpacity: 0.5,\n fontSize: \"2em\",\n paddingRight: 0,\n paddingLeft: 0,\n fill: labelColor\n }))\n\n this.visitedLabel.states.create(\"hover\", { fillOpacity: 1 });\n\n this.placesLabel = this.logoContainer.children.push(am5.Label.new(this.root, {\n text: \"places\",\n fillOpacity: 0.9,\n fontSize: \"2em\",\n paddingRight: 0,\n paddingLeft: 0,\n fill: labelColor\n }))\n\n this.placesLabel.states.create(\"hover\", { fillOpacity: 0.5 });\n\n\n this.logoPin = this.logoContainer.children.push(am5.Graphics.new(this.root, {\n svgPath: \"M4.6 1.6c-.3.3-.4.6-.4 1 0 .8.6 1.5 1.5 1.5h.8l-.9 6.6c-1.5.4-2.7 1.4-3.3 2.8-.4.8.2 2 1.3 2h5.4l.2 10c0 .2.1.3.3.3s.3-.1.3-.3l.2-10h5.4c1 0 1.7-1 1.3-2-.6-1.4-1.8-2.5-3.3-2.8l-.9-6.6h.8c.8 0 1.5-.7 1.5-1.5 0-.8-.7-1.5-1.5-1.5h-7.7C5.3 1.1 4.9 1.3 4.6 1.6L4.6 1.6z\",\n fill: this.themes[this.themeName].home,\n scale: 0.75,\n marginLeft: 2,\n marginRight: 1,\n y: 30,\n dy: 0\n }))\n\n this.logoPin.states.create(\"hover\", {\n dy: -15\n })\n\n this.comLabel = this.logoContainer.children.push(am5.Label.new(this.root, {\n text: \"com\",\n fillOpacity: 0.5,\n fontSize: \"2em\",\n paddingRight: 0,\n paddingLeft: 0,\n fill: labelColor\n }))\n\n this.comLabel.states.create(\"hover\", { fillOpacity: 1 });\n\n this.playButtonOutline = this.playButton.children.push(am5.Circle.new(this.root, {\n radius: 20,\n visible: false,\n isMeasured: false,\n strokeWidth: 3,\n strokeOpacity: 0.5,\n x: am5.p50,\n y: am5.p50,\n centerX: am5.p50,\n centerY: am5.p50\n }))\n\n this.applyTheme(this.themeName);\n\n this._isPlaying = true;\n const promise = this.chart.appear(this.animationDuration);\n promise.then(() => {\n this._appeared = true;\n\n if ((this.autoPlay && !this.isEditor) || this._replay) {\n this.start();\n this._replay = false;\n }\n else {\n if (!this._sliderAnimation) {\n this._animateSlider(this._stepToPosition(1) * 0.5, this.animationDuration, this.chart.get(\"animationEasing\"));\n this._showPlayAnimation();\n }\n }\n })\n this._parseHash();\n }\n\n public resetHomePoint() {\n\n }\n\n public resetStepPoint() {\n\n }\n\n protected _loadGeodata() {\n if (this.map) {\n am5.net.load(\"https://cdn.amcharts.com/lib/5/geodata/json/\" + this.map.replace(/\\_/g, \"/\") + \"Low.json\").then((res) => {\n if (res && res.response) {\n var geodata = am5.JSONParser.parse(res.response);\n this.polygonSeries.set(\"geoJSON\", geodata);\n }\n });\n }\n }\n\n protected _createSystemTooltip(pointerOrientation: \"up\" | \"down\" | \"horizontal\"): am5.Tooltip {\n const tooltip = am5.Tooltip.new(this.root, {\n getFillFromSprite: false,\n autoTextColor: false,\n getStrokeFromSprite: false,\n pointerOrientation: pointerOrientation\n });\n\n tooltip.label.setAll({\n fontSize: 10,\n fill: am5.color(0x000000)\n })\n\n const tooltipBackgroundV = tooltip.get(\"background\") as am5.PointedRectangle;\n tooltipBackgroundV!.setAll({\n cornerRadius: 0,\n fill: am5.color(0xffffff),\n strokeOpacity: 0.2,\n stroke: am5.color(0x000000),\n fillOpacity: 0.8\n })\n return tooltip;\n }\n\n public getConfig(): { [index: string]: any } {\n const config: { [index: string]: any } = {\n map: this.map,\n projection: this.projection,\n theme: this.themeName,\n water: (this.waterEnabled ? 1 : 0),\n graticule: (this.graticuleEnabled ? 1 : 0),\n names: (this.namesEnabled ? 1 : 0),\n duration: this.duration,\n slider: this.sliderPosition,\n autoplay: (this.autoPlay ? 1 : 0),\n autozoom: this.autoZoom,\n data: this.data\n };\n if (am5.type.isNumber(this.width) && this.width > 0) {\n config[\"width\"] = this.width;\n }\n if (am5.type.isNumber(this.height) && this.height > 0) {\n config[\"height\"] = this.height;\n }\n if (this.homeId) {\n config[\"home\"] = this.homeId;\n }\n return config;\n }\n\n\n protected _parseHash() {\n\n this._visitedPlaces = [];\n let string = window.location.search;\n\n const bits = string.replace(\"?\", \"\").split(\"&\");\n const config: { [index: string]: string } = {};\n am5.array.each(bits, (bit) => {\n const nv = bit.split(\"=\");\n config[nv[0]] = nv[1];\n });\n\n if (typeof visitedplaces_config != \"undefined\") {\n am5.object.each(visitedplaces_config, (name: any, value: any) => {\n config[name] = value;\n\n if (name == \"data\") {\n this.data = value;\n delete config[\"places\"]; // disregard hash if data is present from config\n this._visitedPlaces = [];\n am5.array.each(this.data, (step, index) => {\n am5.array.each(step.places, (place) => {\n if (this._visitedPlaces.indexOf(place) === -1) {\n this._visitedPlaces.push(place);\n if (this._firstVisit[place] == undefined) {\n this._firstVisit[place] = index;\n }\n }\n })\n });\n }\n });\n }\n\n if (!this.map) {\n this.map = config.map || \"world\";\n this._loadGeodata();\n }\n\n am5.object.each(config, (name: any, value: string) => {\n switch (name) {\n case \"map\":\n this.map = value as string;\n break;\n case \"theme\":\n this.themeName = value as any;\n break;\n case \"position\":\n const positions = value.split(\"_\")\n this.homePosition = {\n zoomLevel: Number(positions[0]),\n geoPoint: {\n longitude: Number(positions[1]),\n latitude: Number(positions[2])\n },\n rotationX: Number(positions[3]),\n rotationY: Number(positions[4])\n };\n break;\n case \"water\":\n this.waterEnabled = Boolean(Number(value));\n this.toggleWater(this.waterEnabled);\n break;\n case \"width\":\n this.width = Number(value);\n break;\n case \"height\":\n this.height = Number(value);\n break;\n case \"graticule\":\n this.graticuleEnabled = Boolean(Number(value));\n this.toggleGraticule(this.graticuleEnabled);\n break;\n case \"autoplay\":\n this.autoPlay = Boolean(Number(value));\n break;\n case \"autozoom\":\n this.autoZoom = value as any;\n break;\n case \"projection\":\n this.setProjection(value as any);\n break;\n case \"duration\":\n this.duration = Number(value);\n break;\n case \"autostep\":\n this.autoStep = Boolean(Number(value));\n this.toggleAutoStep(this.autoStep);\n break;\n case \"placeduration\":\n this.placeDuration = Number(value);\n break;\n case \"slider\":\n this.sliderPosition = Number(value)\n this.slider.set(\"start\", this.sliderPosition);\n break;\n case \"places\":\n value = value.replace(\"~~~~~\", \"§§§\").replace(\"**\", \"©©©\");\n const datas = value.split(\"*\");\n let step = 0;\n am5.array.each(datas, (data) => {\n\n // temporarily encode escaped ~ and *\n const sdp = data.split(\"~\");\n const text = decodeURIComponent(sdp[0].replace(\"§§§\", \"~\").replace(\"©©©\", \"*\"));\n\n const ids = sdp[1].split(\"_\");\n\n const positions = sdp[2];\n const position = {} as any;\n const color = sdp[3];\n\n if (positions) {\n const pos = positions.split(\"_\");\n position.zoomLevel = Number(pos[0]);\n position.geoPoint = { longitude: Number(pos[1]), latitude: Number(pos[2]) };\n position.rotationX = Number(pos[3]);\n position.rotationY = Number(pos[4]);\n }\n\n const obj: any = { colors: {}, places: [] };\n\n if (color) {\n obj.color = color;\n }\n\n if (sdp[1]) {\n am5.array.each(ids, (idColor, i) => {\n const idColorArr = idColor.split(\".\")\n const id = idColorArr[0];\n const color = idColorArr[1];\n\n ids[i] = id;\n\n if (color != undefined) {\n obj.colors[id] = color;\n }\n\n if (this._firstVisit[id] == undefined) {\n this._firstVisit[id] = step;\n }\n this._visitedPlaces.push(id);\n\n if (this.worldMap) {\n let continent = am5geodata_data_countries2[id] ? am5geodata_data_countries2[id].continent : \"Other\";\n if (continent == \"Antarctica\") {\n continent = \"Other\";\n }\n if (id != this.homeId) {\n this._continentSteps[continent] = obj;\n }\n }\n });\n if (ids && ids.length > 0) {\n obj.places = ids;\n }\n }\n\n if (text) {\n obj.text = text;\n }\n if (positions) {\n obj.position = position;\n }\n\n this.data.push(obj);\n\n step++;\n })\n break;\n\n case \"home\":\n this.setHome(value);\n break;\n }\n });\n\n if (this.homeId) {\n this.createHomeStep(this.homeId);\n }\n\n this.toggleTimeline();\n this.applyTheme(this.themeName);\n }\n\n public createHomeStep(_id: string) {\n\n }\n\n protected _showPlayAnimation() {\n this.playButtonOutline.show();\n this._buttonOutlineAnimation = this.playButtonOutline.animate({\n key: \"scale\",\n to: 2,\n duration: 2000,\n easing:\n am5.ease.yoyo(am5.ease.cubic),\n loops: Infinity\n });\n }\n\n protected _totalDuration(): number {\n let totalDuration = 0;\n am5.array.each(this.data, (data) => {\n const placesCount = data.places.length;\n const stepDuration = this.duration + placesCount * this.placeDuration + this.animationDuration * 0.8;\n totalDuration += stepDuration;\n })\n\n return totalDuration;\n }\n\n protected _positionToStep(position: number): number {\n let totalDuration = 0;\n let stepStart: Array<number> = [];\n let stepEnd: Array<number> = [];\n let step = 0;\n\n am5.array.each(this.data, (data) => {\n const placesCount = data.places.length;\n\n const stepDuration = this.duration + placesCount * this.placeDuration + this.animationDuration * 0.8;\n stepStart[step] = totalDuration;\n\n this._stepTimes[step] = totalDuration;\n\n totalDuration += stepDuration;\n stepEnd[step] = totalDuration;\n step++;\n\n this._stepTimes[step] = totalDuration;\n })\n\n let currentTime = totalDuration * position;\n let currentStep = 0;\n\n step = 0;\n\n am5.array.each(stepStart, (start) => {\n if (currentTime >= start) {\n currentStep = step;\n }\n step++;\n })\n\n if (currentTime >= totalDuration) {\n currentStep = this.data.length;\n }\n\n return currentStep;\n }\n\n protected _stepToPosition(step: number) {\n this._positionToStep(0);\n return this._stepTimes[step] / this._totalDuration() + 0.001;\n }\n\n protected _handleSlider() {\n const position = this.slider.get(\"start\", 0);\n let count = this.data.length;\n let step = this._positionToStep(position);\n\n step = am5.math.fitToRange(step, 0, count);\n\n if (step != this._currentStep) {\n this._setStep(step);\n }\n\n if (position == 1) {\n this._handleSliderEnd();\n }\n\n setTimeout(() => {\n this.toggleButtonStates();\n }, 10)\n }\n\n protected _goHome(duration?: number) {\n if (duration == null) {\n duration = this.animationDuration;\n }\n const homePosition = this.homePosition;\n if (homePosition) {\n let rotationX: number | undefined = homePosition.rotationX;\n let rotationY: number | undefined = homePosition.rotationY;\n\n if (this.projection == \"geoAlbersUsa\") {\n rotationX = undefined;\n rotationY = undefined;\n }\n\n if (this.projection != \"geoOrthographic\") {\n rotationY = 0;\n }\n\n this.chart.zoomToGeoPoint(homePosition.geoPoint, homePosition.zoomLevel, true, duration, rotationX, rotationY)\n }\n else {\n this.chart.rotate(0, 0);\n this.chart.goHome();\n }\n }\n\n\n protected _handleSliderEnd() {\n this.playButton.set(\"active\", false);\n this.playButton.states.applyAnimate(\"default\");\n\n if (this.data.length > 1) {\n this.stepLabel.hide();\n }\n\n let animationDuration = this.animationDuration;\n let endDuration = animationDuration;\n\n if (this.homePosition) {\n this._goHome();\n }\n else if (this.projection == \"geoOrthographic\") {\n this.chart.animate({ key: \"rotationY\", to: -10, duration: animationDuration, easing: am5.ease.out(am5.ease.sine) });\n this.chart.animate({ key: \"rotationX\", to: this.chart.get(\"rotationX\", 0) + 360, loops: Infinity, duration: animationDuration * 4, easing: am5.ease.linear });\n this.chart.animate({ key: \"translateX\", to: this.chart.width() / 2, duration: animationDuration, easing: am5.ease.out(am5.ease.sine) });\n this.chart.animate({ key: \"translateY\", to: this.chart.height() / 2, duration: animationDuration, easing: am5.ease.out(am5.ease.sine) });\n this.chart.animate({ key: \"zoomLevel\", to: .9, duration: animationDuration * 2, easing: am5.ease.out(am5.ease.sine) });\n endDuration = this.animationDuration * 5;\n }\n else {\n this._goHome();\n }\n\n const logoAnimation = this.logoPin.animate({\n key: \"marginBottom\", from: 0, to: 1, duration: endDuration\n })\n\n logoAnimation.events.on(\"stopped\", () => {\n this._isPlaying = false;\n })\n\n this._toggleName(this.homeId);\n }\n\n\n protected _togglePolygons(zoomOut?: boolean) {\n const data = this.data[this._currentStep];\n let duration = this.animationDuration;\n\n am5.array.each(this._visitedPlaces, (id) => {\n this._addPin(id);\n })\n\n let text = \"\";\n let position;\n\n if (data) {\n am5.array.each(data.places, (id) => {\n this._addName(id);\n })\n\n text = data.text || \"\";\n position = data.position;\n }\n if (this.data.length == 1) {\n let txt = this.data[0].text;\n if (txt) {\n text = txt;\n }\n }\n\n if (text != this.stepLabel.get(\"text\")) {\n const promise = this.stepLabel.hide();\n\n promise.then(() => {\n this._fixStepLabelPosition();\n this.stepLabel.set(\"text\", text);\n this.stepLabel.appear(duration / 3);\n })\n }\n\n if (zoomOut) {\n this._goHome();\n }\n else {\n if (position) {\n const geoPoint = position.geoPoint;\n const zoomLevel = position.zoomLevel;\n\n let rotationX: number | undefined = position.rotationX;\n let rotationY: number | undefined = position.rotationY;\n\n if (this.projection == \"geoAlbersUsa\") {\n rotationX = undefined;\n rotationY = undefined;\n }\n if (this.projection != \"geoOrthographic\") {\n rotationY = 0;\n }\n\n this.chart.zoomToGeoPoint(geoPoint, zoomLevel, true, undefined, rotationX, rotationY);\n }\n else if (this.autoZoom != \"none\") {\n if (data) {\n let arr = data.places;\n if (this.autoZoom == \"all\") {\n arr = [];\n am5.array.each(this._visitedPlaces, (id) => {\n if (this._firstVisit[id] <= this._currentStep) {\n arr.push(id);\n }\n })\n }\n this._autoZoom(arr);\n }\n }\n }\n\n const logoAnimation = this.logoPin.animate({\n key: \"marginTop\", from: 0, to: 1, duration: this.animationDuration * 0.8\n })\n\n this._stepDisposers.push(logoAnimation.events.on(\"stopped\", () => {\n this._realTogglePolygons();\n }))\n }\n\n protected _autoZoom(arr: Array<string>) {\n let left: number | undefined;\n let right: number | undefined;\n let top: number | undefined;\n let bottom: number | undefined;\n\n const geometryColection: any = { type: \"GeometryCollection\", geometries: [] as any };\n\n am5.array.each(arr, (id) => {\n const dataItem = this.polygonSeries.getDataItemById(id);\n if (dataItem) {\n const geometry = dataItem.get(\"geometry\");\n if (geometry) {\n geometryColection.geometries.push(geometry);\n const bounds = am5map.getGeoBounds(geometry);\n if (left == null || left > bounds.left) {\n left = bounds.left;\n }\n if (right == null || right < bounds.right) {\n right = bounds.right;\n }\n if (top == null || top < bounds.top) {\n top = bounds.top;\n }\n if (bottom == null || bottom > bounds.bottom) {\n bottom = bounds.bottom;\n }\n }\n }\n })\n if (left != undefined && right != undefined && top != undefined && bottom != undefined) {\n const centroid = am5map.getGeoCentroid(geometryColection);\n let rotationX: number | undefined = -centroid.longitude;\n let rotationY: number | undefined = -centroid.latitude;\n if (this.projection != \"geoOrthographic\") {\n rotationY = 0;\n rotationX = 0;\n }\n\n if (this.projection == \"geoAlbersUsa\") {\n rotationX = undefined;\n rotationY = undefined;\n }\n\n this.chart.zoomToGeoBounds({ left, right, top, bottom }, undefined, rotationX, rotationY);\n }\n }\n\n protected _toggleButtons() {\n\n }\n\n\n protected _realTogglePolygons() {\n\n this._togglePolygon(this.homeId);\n this._toggleName(this.homeId);\n\n const data = this.data[this._currentStep];\n\n am5.array.each(this._visitedPlaces, (id) => {\n if (!data || data.places.indexOf(id) == -1) {\n this._togglePolygon(id);\n }\n })\n\n if (data) {\n let i = 1;\n\n let interval = Math.max(1, this.placeDuration);\n\n am5.array.each(data.places, (id) => {\n const dataItem = this.polygonSeries.getDataItemById(id);\n if (dataItem) {\n const mapPolygon = dataItem.get(\"mapPolygon\");\n if (mapPolygon) {\n\n let duration = interval * i;\n\n const animation = mapPolygon.animate({ key: \"marginTop\", from: 0, to: 100, duration: duration });\n this._stepDisposers.push(animation.events.on(\"stopped\", () => {\n this._togglePolygon(id);\n }))\n }\n }\n i++;\n })\n }\n\n this._fitLabels0();\n }\n\n\n protected _handleDataValidated() {\n this.waterSeries.mapPolygons.template.set(\"fillOpacity\", 0.99999) // hack for video bug\n this.setHome(this.homeId);\n this._setStep(this._currentStep);\n this.polygonSeries.appear();\n this._goHome(0);\n }\n\n\n protected _measurePolygon(mapPolygon: am5map.MapPolygon) {\n const geometry = mapPolygon.get(\"geometry\");\n let area = 0;\n if (geometry) {\n area = am5map.getGeoArea(geometry);\n }\n\n const dataItem = mapPolygon.dataItem as am5.DataItem<am5map.IMapPolygonSeriesDataItem>;\n if (dataItem) {\n const id = dataItem.get(\"id\");\n if (id) {\n this._polygonAreas[id] = area;\n }\n }\n }\n\n protected _addName(id: string) {\n const nameDataItem = this.nameSeries.getDataItemById(id);\n const polygonDataItem = this.polygonSeries.getDataItemById(id);\n\n if (polygonDataItem) {\n const mapPolygon = polygonDataItem.get(\"mapPolygon\");\n\n const dataContext = polygonDataItem.dataContext as any;\n const center = mapPolygon.visualCentroid();\n\n if (!nameDataItem) {\n this.nameSeries.data.push({\n id: id,\n name: dataContext.name,\n latitude: center.latitude,\n longitude: center.longitude\n })\n }\n }\n }\n\n protected _addPin(id: string) {\n const pinDataItem = this.pinSeries.getDataItemById(id);\n const polygonDataItem = this.polygonSeries.getDataItemById(id);\n\n if (polygonDataItem) {\n const mapPolygon = polygonDataItem.get(\"mapPolygon\");\n this._measurePolygon(mapPolygon);\n if (this._polygonAreas[id] < this.pinThreshold) {\n const dataContext = polygonDataItem.dataContext as any;\n const center = mapPolygon.geoCentroid();\n\n if (!pinDataItem) {\n this.pinSeries.data.push({\n id: id,\n name: dataContext.name,\n latitude: center.latitude,\n longitude: center.longitude\n })\n }\n }\n }\n }\n\n\n protected _handlePolygonClick(_sprite: am5.Graphics) {\n\n // void\n }\n\n protected _createHash() {\n // void\n }\n\n protected _getFirstBulletsSprite(dataItem?: am5.DataItem<am5map.IMapSeriesDataItem>): am5.Sprite | undefined {\n if (dataItem) {\n const bullets = dataItem.bullets;\n if (bullets) {\n const bullet = bullets[0];\n\n if (bullet) {\n return bullet.get(\"sprite\");\n }\n }\n }\n }\n\n protected _fitLabels0() {\n if (this._fitLabelsDp) {\n this._fitLabelsDp.dispose();\n }\n this._fitLabelsDp = this.root.events.once(\"frameended\", () => {\n this._fitLabels()\n })\n }\n\n protected _fitLabels() {\n am5.array.each(this.nameSeries.dataItems, (dataItem) => {\n const label = this._getFirstBulletsSprite(dataItem) as am5.Label;\n if (label) {\n const id = dataItem.get(\"id\");\n if (id) {\n const polygonDataItem = this.polygonSeries.getDataItemById(id);\n if (polygonDataItem) {\n const mapPolygon = polygonDataItem.get(\"mapPolygon\");\n this._fitLabel(label, mapPolygon);\n }\n }\n }\n })\n }\n\n protected _fitLabel(label: am5.Label, mapPolygon: am5map.MapPolygon) {\n\n const geometry = mapPolygon.get(\"geometry\");\n if (geometry) {\n const geoPath = this.chart.getPrivate(\"geoPath\");\n const bounds = geoPath.bounds(geometry);\n\n const left = bounds[0][0];\n const right = bounds[1][0];\n label.set(\"maxWidth\", Math.abs(right - left))\n }\n }\n\n protected _setInteractivity() {\n\n }\n}\n","// https://github.com/python/cpython/blob/a74eea238f5baba15797e2e8b570d153bc8690a7/Modules/mathmodule.c#L1423\nexport class Adder {\n constructor() {\n this._partials = new Float64Array(32);\n this._n = 0;\n }\n add(x) {\n const p = this._partials;\n let i = 0;\n for (let j = 0; j < this._n && j < 32; j++) {\n const y = p[j],\n hi = x + y,\n lo = Math.abs(x) < Math.abs(y) ? x - (hi - y) : y - (hi - x);\n if (lo) p[i++] = lo;\n x = hi;\n }\n p[i] = x;\n this._n = i + 1;\n return this;\n }\n valueOf() {\n const p = this._partials;\n let n = this._n, x, y, lo, hi = 0;\n if (n > 0) {\n hi = p[--n];\n while (n > 0) {\n x = hi;\n y = p[--n];\n hi = x + y;\n lo = y - (hi - x);\n if (lo) break;\n }\n if (n > 0 && ((lo < 0 && p[n - 1] < 0) || (lo > 0 && p[n - 1] > 0))) {\n y = lo * 2;\n x = hi + y;\n if (y == x - hi) hi = x;\n }\n }\n return hi;\n }\n}\n\nexport function fsum(values, valueof) {\n const adder = new Adder();\n if (valueof === undefined) {\n for (let value of values) {\n if (value = +value) {\n adder.add(value);\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if (value = +valueof(value, ++index, values)) {\n adder.add(value);\n }\n }\n }\n return +adder;\n}\n\nexport function fcumsum(values, valueof) {\n const adder = new Adder();\n let index = -1;\n return Float64Array.from(values, valueof === undefined\n ? v => adder.add(+v || 0)\n : v => adder.add(+valueof(v, ++index, values) || 0)\n );\n}\n","function* flatten(arrays) {\n for (const array of arrays) {\n yield* array;\n }\n}\n\nexport default function merge(arrays) {\n return Array.from(flatten(arrays));\n}\n","export default function range(start, stop, step) {\n start = +start, stop = +stop, step = (n = arguments.length) < 2 ? (stop = start, start = 0, 1) : n < 3 ? 1 : +step;\n\n var i = -1,\n n = Math.max(0, Math.ceil((stop - start) / step)) | 0,\n range = new Array(n);\n\n while (++i < n) {\n range[i] = start + i * step;\n }\n\n return range;\n}\n","import {Adder} from \"d3-array\";\nimport {atan2, cos, quarterPi, radians, sin, tau} from \"./math.js\";\nimport noop from \"./noop.js\";\nimport stream from \"./stream.js\";\n\nexport var areaRingSum = new Adder();\n\n// hello?\n\nvar areaSum = new Adder(),\n lambda00,\n phi00,\n lambda0,\n cosPhi0,\n sinPhi0;\n\nexport var areaStream = {\n point: noop,\n lineStart: noop,\n lineEnd: noop,\n polygonStart: function() {\n areaRingSum = new Adder();\n areaStream.lineStart = areaRingStart;\n areaStream.lineEnd = areaRingEnd;\n },\n polygonEnd: function() {\n var areaRing = +areaRingSum;\n areaSum.add(areaRing < 0 ? tau + areaRing : areaRing);\n this.lineStart = this.lineEnd = this.point = noop;\n },\n sphere: function() {\n areaSum.add(tau);\n }\n};\n\nfunction areaRingStart() {\n areaStream.point = areaPointFirst;\n}\n\nfunction areaRingEnd() {\n areaPoint(lambda00, phi00);\n}\n\nfunction areaPointFirst(lambda, phi) {\n areaStream.point = areaPoint;\n lambda00 = lambda, phi00 = phi;\n lambda *= radians, phi *= radians;\n lambda0 = lambda, cosPhi0 = cos(phi = phi / 2 + quarterPi), sinPhi0 = sin(phi);\n}\n\nfunction areaPoint(lambda, phi) {\n lambda *= radians, phi *= radians;\n phi = phi / 2 + quarterPi; // half the angular distance from south pole\n\n // Spherical excess E for a spherical triangle with vertices: south pole,\n // previous point, current point. Uses a formula derived from Cagnoli’s\n // theorem. See Todhunter, Spherical Trig. (1871), Sec. 103, Eq. (2).\n var dLambda = lambda - lambda0,\n sdLambda = dLambda >= 0 ? 1 : -1,\n adLambda = sdLambda * dLambda,\n cosPhi = cos(phi),\n sinPhi = sin(phi),\n k = sinPhi0 * sinPhi,\n u = cosPhi0 * cosPhi + k * cos(adLambda),\n v = k * sdLambda * sin(adLambda);\n areaRingSum.add(atan2(v, u));\n\n // Advance the previous points.\n lambda0 = lambda, cosPhi0 = cosPhi, sinPhi0 = sinPhi;\n}\n\nexport default function(object) {\n areaSum = new Adder();\n stream(object, areaStream);\n return areaSum * 2;\n}\n","import {Adder} from \"d3-array\";\nimport {areaStream, areaRingSum} from \"./area.js\";\nimport {cartesian, cartesianCross, cartesianNormalizeInPlace, spherical} from \"./cartesian.js\";\nimport {abs, degrees, epsilon, radians} from \"./math.js\";\nimport stream from \"./stream.js\";\n\nvar lambda0, phi0, lambda1, phi1, // bounds\n lambda2, // previous lambda-coordinate\n lambda00, phi00, // first point\n p0, // previous 3D point\n deltaSum,\n ranges,\n range;\n\nvar boundsStream = {\n point: boundsPoint,\n lineStart: boundsLineStart,\n lineEnd: boundsLineEnd,\n polygonStart: function() {\n boundsStream.point = boundsRingPoint;\n boundsStream.lineStart = boundsRingStart;\n boundsStream.lineEnd = boundsRingEnd;\n deltaSum = new Adder();\n areaStream.polygonStart();\n },\n polygonEnd: function() {\n areaStream.polygonEnd();\n boundsStream.point = boundsPoint;\n boundsStream.lineStart = boundsLineStart;\n boundsStream.lineEnd = boundsLineEnd;\n if (areaRingSum < 0) lambda0 = -(lambda1 = 180), phi0 = -(phi1 = 90);\n else if (deltaSum > epsilon) phi1 = 90;\n else if (deltaSum < -epsilon) phi0 = -90;\n range[0] = lambda0, range[1] = lambda1;\n },\n sphere: function() {\n lambda0 = -(lambda1 = 180), phi0 = -(phi1 = 90);\n }\n};\n\nfunction boundsPoint(lambda, phi) {\n ranges.push(range = [lambda0 = lambda, lambda1 = lambda]);\n if (phi < phi0) phi0 = phi;\n if (phi > phi1) phi1 = phi;\n}\n\nfunction linePoint(lambda, phi) {\n var p = cartesian([lambda * radians, phi * radians]);\n if (p0) {\n var normal = cartesianCross(p0, p),\n equatorial = [normal[1], -normal[0], 0],\n inflection = cartesianCross(equatorial, normal);\n cartesianNormalizeInPlace(inflection);\n inflection = spherical(inflection);\n var delta = lambda - lambda2,\n sign = delta > 0 ? 1 : -1,\n lambdai = inflection[0] * degrees * sign,\n phii,\n antimeridian = abs(delta) > 180;\n if (antimeridian ^ (sign * lambda2 < lambdai && lambdai < sign * lambda)) {\n phii = inflection[1] * degrees;\n if (phii > phi1) phi1 = phii;\n } else if (lambdai = (lambdai + 360) % 360 - 180, antimeridian ^ (sign * lambda2 < lambdai && lambdai < sign * lambda)) {\n phii = -inflection[1] * degrees;\n if (phii < phi0) phi0 = phii;\n } else {\n if (phi < phi0) phi0 = phi;\n if (phi > phi1) phi1 = phi;\n }\n if (antimeridian) {\n if (lambda < lambda2) {\n if (angle(lambda0, lambda) > angle(lambda0, lambda1)) lambda1 = lambda;\n } else {\n if (angle(lambda, lambda1) > angle(lambda0, lambda1)) lambda0 = lambda;\n }\n } else {\n if (lambda1 >= lambda0) {\n if (lambda < lambda0) lambda0 = lambda;\n if (lambda > lambda1) lambda1 = lambda;\n } else {\n if (lambda > lambda2) {\n if (angle(lambda0, lambda) > angle(lambda0, lambda1)) lambda1 = lambda;\n } else {\n if (angle(lambda, lambda1) > angle(lambda0, lambda1)) lambda0 = lambda;\n }\n }\n }\n } else {\n ranges.push(range = [lambda0 = lambda, lambda1 = lambda]);\n }\n if (phi < phi0) phi0 = phi;\n if (phi > phi1) phi1 = phi;\n p0 = p, lambda2 = lambda;\n}\n\nfunction boundsLineStart() {\n boundsStream.point = linePoint;\n}\n\nfunction boundsLineEnd() {\n range[0] = lambda0, range[1] = lambda1;\n boundsStream.point = boundsPoint;\n p0 = null;\n}\n\nfunction boundsRingPoint(lambda, phi) {\n if (p0) {\n var delta = lambda - lambda2;\n deltaSum.add(abs(delta) > 180 ? delta + (delta > 0 ? 360 : -360) : delta);\n } else {\n lambda00 = lambda, phi00 = phi;\n }\n areaStream.point(lambda, phi);\n linePoint(lambda, phi);\n}\n\nfunction boundsRingStart() {\n areaStream.lineStart();\n}\n\nfunction boundsRingEnd() {\n boundsRingPoint(lambda00, phi00);\n areaStream.lineEnd();\n if (abs(deltaSum) > epsilon) lambda0 = -(lambda1 = 180);\n range[0] = lambda0, range[1] = lambda1;\n p0 = null;\n}\n\n// Finds the left-right distance between two longitudes.\n// This is almost the same as (lambda1 - lambda0 + 360°) % 360°, except that we want\n// the distance between ±180° to be 360°.\nfunction angle(lambda0, lambda1) {\n return (lambda1 -= lambda0) < 0 ? lambda1 + 360 : lambda1;\n}\n\nfunction rangeCompare(a, b) {\n return a[0] - b[0];\n}\n\nfunction rangeContains(range, x) {\n return range[0] <= range[1] ? range[0] <= x && x <= range[1] : x < range[0] || range[1] < x;\n}\n\nexport default function(feature) {\n var i, n, a, b, merged, deltaMax, delta;\n\n phi1 = lambda1 = -(lambda0 = phi0 = Infinity);\n ranges = [];\n stream(feature, boundsStream);\n\n // First, sort ranges by their minimum longitudes.\n if (n = ranges.length) {\n ranges.sort(rangeCompare);\n\n // Then, merge any ranges that overlap.\n for (i = 1, a = ranges[0], merged = [a]; i < n; ++i) {\n b = ranges[i];\n if (rangeContains(a, b[0]) || rangeContains(a, b[1])) {\n if (angle(a[0], b[1]) > angle(a[0], a[1])) a[1] = b[1];\n if (angle(b[0], a[1]) > angle(a[0], a[1])) a[0] = b[0];\n } else {\n merged.push(a = b);\n }\n }\n\n // Finally, find the largest gap between the merged ranges.\n // The final bounding box will be the inverse of this gap.\n for (deltaMax = -Infinity, n = merged.length - 1, i = 0, a = merged[n]; i <= n; a = b, ++i) {\n b = merged[i];\n if ((delta = angle(a[1], b[0])) > deltaMax) deltaMax = delta, lambda0 = b[0], lambda1 = a[1];\n }\n }\n\n ranges = range = null;\n\n return lambda0 === Infinity || phi0 === Infinity\n ? [[NaN, NaN], [NaN, NaN]]\n : [[lambda0, phi0], [lambda1, phi1]];\n}\n","import {asin, atan2, cos, sin, sqrt} from \"./math.js\";\n\nexport function spherical(cartesian) {\n return [atan2(cartesian[1], cartesian[0]), asin(cartesian[2])];\n}\n\nexport function cartesian(spherical) {\n var lambda = spherical[0], phi = spherical[1], cosPhi = cos(phi);\n return [cosPhi * cos(lambda), cosPhi * sin(lambda), sin(phi)];\n}\n\nexport function cartesianDot(a, b) {\n return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];\n}\n\nexport function cartesianCross(a, b) {\n return [a[1] * b[2] - a[2] * b[1], a[2] * b[0] - a[0] * b[2], a[0] * b[1] - a[1] * b[0]];\n}\n\n// TODO return a\nexport function cartesianAddInPlace(a, b) {\n a[0] += b[0], a[1] += b[1], a[2] += b[2];\n}\n\nexport function cartesianScale(vector, k) {\n return [vector[0] * k, vector[1] * k, vector[2] * k];\n}\n\n// TODO return d\nexport function cartesianNormalizeInPlace(d) {\n var l = sqrt(d[0] * d[0] + d[1] * d[1] + d[2] * d[2]);\n d[0] /= l, d[1] /= l, d[2] /= l;\n}\n","import {Adder} from \"d3-array\";\nimport {asin, atan2, cos, degrees, epsilon, epsilon2, hypot, radians, sin, sqrt} from \"./math.js\";\nimport noop from \"./noop.js\";\nimport stream from \"./stream.js\";\n\nvar W0, W1,\n X0, Y0, Z0,\n X1, Y1, Z1,\n X2, Y2, Z2,\n lambda00, phi00, // first point\n x0, y0, z0; // previous point\n\nvar centroidStream = {\n sphere: noop,\n point: centroidPoint,\n lineStart: centroidLineStart,\n lineEnd: centroidLineEnd,\n polygonStart: function() {\n centroidStream.lineStart = centroidRingStart;\n centroidStream.lineEnd = centroidRingEnd;\n },\n polygonEnd: function() {\n centroidStream.lineStart = centroidLineStart;\n centroidStream.lineEnd = centroidLineEnd;\n }\n};\n\n// Arithmetic mean of Cartesian vectors.\nfunction centroidPoint(lambda, phi) {\n lambda *= radians, phi *= radians;\n var cosPhi = cos(phi);\n centroidPointCartesian(cosPhi * cos(lambda), cosPhi * sin(lambda), sin(phi));\n}\n\nfunction centroidPointCartesian(x, y, z) {\n ++W0;\n X0 += (x - X0) / W0;\n Y0 += (y - Y0) / W0;\n Z0 += (z - Z0) / W0;\n}\n\nfunction centroidLineStart() {\n centroidStream.point = centroidLinePointFirst;\n}\n\nfunction centroidLinePointFirst(lambda, phi) {\n lambda *= radians, phi *= radians;\n var cosPhi = cos(phi);\n x0 = cosPhi * cos(lambda);\n y0 = cosPhi * sin(lambda);\n z0 = sin(phi);\n centroidStream.point = centroidLinePoint;\n centroidPointCartesian(x0, y0, z0);\n}\n\nfunction centroidLinePoint(lambda, phi) {\n lambda *= radians, phi *= radians;\n var cosPhi = cos(phi),\n x = cosPhi * cos(lambda),\n y = cosPhi * sin(lambda),\n z = sin(phi),\n w = atan2(sqrt((w = y0 * z - z0 * y) * w + (w = z0 * x - x0 * z) * w + (w = x0 * y - y0 * x) * w), x0 * x + y0 * y + z0 * z);\n W1 += w;\n X1 += w * (x0 + (x0 = x));\n Y1 += w * (y0 + (y0 = y));\n Z1 += w * (z0 + (z0 = z));\n centroidPointCartesian(x0, y0, z0);\n}\n\nfunction centroidLineEnd() {\n centroidStream.point = centroidPoint;\n}\n\n// See J. E. Brock, The Inertia Tensor for a Spherical Triangle,\n// J. Applied Mechanics 42, 239 (1975).\nfunction centroidRingStart() {\n centroidStream.point = centroidRingPointFirst;\n}\n\nfunction centroidRingEnd() {\n centroidRingPoint(lambda00, phi00);\n centroidStream.point = centroidPoint;\n}\n\nfunction centroidRingPointFirst(lambda, phi) {\n lambda00 = lambda, phi00 = phi;\n lambda *= radians, phi *= radians;\n centroidStream.point = centroidRingPoint;\n var cosPhi = cos(phi);\n x0 = cosPhi * cos(lambda);\n y0 = cosPhi * sin(lambda);\n z0 = sin(phi);\n centroidPointCartesian(x0, y0, z0);\n}\n\nfunction centroidRingPoint(lambda, phi) {\n lambda *= radians, phi *= radians;\n var cosPhi = cos(phi),\n x = cosPhi * cos(lambda),\n y = cosPhi * sin(lambda),\n z = sin(phi),\n cx = y0 * z - z0 * y,\n cy = z0 * x - x0 * z,\n cz = x0 * y - y0 * x,\n m = hypot(cx, cy, cz),\n w = asin(m), // line weight = angle\n v = m && -w / m; // area weight multiplier\n X2.add(v * cx);\n Y2.add(v * cy);\n Z2.add(v * cz);\n W1 += w;\n X1 += w * (x0 + (x0 = x));\n Y1 += w * (y0 + (y0 = y));\n Z1 += w * (z0 + (z0 = z));\n centroidPointCartesian(x0, y0, z0);\n}\n\nexport default function(object) {\n W0 = W1 =\n X0 = Y0 = Z0 =\n X1 = Y1 = Z1 = 0;\n X2 = new Adder();\n Y2 = new Adder();\n Z2 = new Adder();\n stream(object, centroidStream);\n\n var x = +X2,\n y = +Y2,\n z = +Z2,\n m = hypot(x, y, z);\n\n // If the area-weighted ccentroid is undefined, fall back to length-weighted ccentroid.\n if (m < epsilon2) {\n x = X1, y = Y1, z = Z1;\n // If the feature has zero length, fall back to arithmetic mean of point vectors.\n if (W1 < epsilon) x = X0, y = Y0, z = Z0;\n m = hypot(x, y, z);\n // If the feature still has an undefined ccentroid, then return.\n if (m < epsilon2) return [NaN, NaN];\n }\n\n return [atan2(y, x) * degrees, asin(z / m) * degrees];\n}\n","import {cartesian, cartesianNormalizeInPlace, spherical} from \"./cartesian.js\";\nimport constant from \"./constant.js\";\nimport {acos, cos, degrees, epsilon, radians, sin, tau} from \"./math.js\";\nimport {rotateRadians} from \"./rotation.js\";\n\n// Generates a circle centered at [0°, 0°], with a given radius and precision.\nexport function circleStream(stream, radius, delta, direction, t0, t1) {\n if (!delta) return;\n var cosRadius = cos(radius),\n sinRadius = sin(radius),\n step = direction * delta;\n if (t0 == null) {\n t0 = radius + direction * tau;\n t1 = radius - step / 2;\n } else {\n t0 = circleRadius(cosRadius, t0);\n t1 = circleRadius(cosRadius, t1);\n if (direction > 0 ? t0 < t1 : t0 > t1) t0 += direction * tau;\n }\n for (var point, t = t0; direction > 0 ? t > t1 : t < t1; t -= step) {\n point = spherical([cosRadius, -sinRadius * cos(t), -sinRadius * sin(t)]);\n stream.point(point[0], point[1]);\n }\n}\n\n// Returns the signed angle of a cartesian point relative to [cosRadius, 0, 0].\nfunction circleRadius(cosRadius, point) {\n point = cartesian(point), point[0] -= cosRadius;\n cartesianNormalizeInPlace(point);\n var radius = acos(-point[1]);\n return ((-point[2] < 0 ? -radius : radius) + tau - epsilon) % tau;\n}\n\nexport default function() {\n var center = constant([0, 0]),\n radius = constant(90),\n precision = constant(6),\n ring,\n rotate,\n stream = {point: point};\n\n function point(x, y) {\n ring.push(x = rotate(x, y));\n x[0] *= degrees, x[1] *= degrees;\n }\n\n function circle() {\n var c = center.apply(this, arguments),\n r = radius.apply(this, arguments) * radians,\n p = precision.apply(this, arguments) * radians;\n ring = [];\n rotate = rotateRadians(-c[0] * radians, -c[1] * radians, 0).invert;\n circleStream(stream, r, p, 1);\n c = {type: \"Polygon\", coordinates: [ring]};\n ring = rotate = null;\n return c;\n }\n\n circle.center = function(_) {\n return arguments.length ? (center = typeof _ === \"function\" ? _ : constant([+_[0], +_[1]]), circle) : center;\n };\n\n circle.radius = function(_) {\n return arguments.length ? (radius = typeof _ === \"function\" ? _ : constant(+_), circle) : radius;\n };\n\n circle.precision = function(_) {\n return arguments.length ? (precision = typeof _ === \"function\" ? _ : constant(+_), circle) : precision;\n };\n\n return circle;\n}\n","import clip from \"./index.js\";\nimport {abs, atan, cos, epsilon, halfPi, pi, sin} from \"../math.js\";\n\nexport default clip(\n function() { return true; },\n clipAntimeridianLine,\n clipAntimeridianInterpolate,\n [-pi, -halfPi]\n);\n\n// Takes a line and cuts into visible segments. Return values: 0 - there were\n// intersections or the line was empty; 1 - no intersections; 2 - there were\n// intersections, and the first and last segments should be rejoined.\nfunction clipAntimeridianLine(stream) {\n var lambda0 = NaN,\n phi0 = NaN,\n sign0 = NaN,\n clean; // no intersections\n\n return {\n lineStart: function() {\n stream.lineStart();\n clean = 1;\n },\n point: function(lambda1, phi1) {\n var sign1 = lambda1 > 0 ? pi : -pi,\n delta = abs(lambda1 - lambda0);\n if (abs(delta - pi) < epsilon) { // line crosses a pole\n stream.point(lambda0, phi0 = (phi0 + phi1) / 2 > 0 ? halfPi : -halfPi);\n stream.point(sign0, phi0);\n stream.lineEnd();\n stream.lineStart();\n stream.point(sign1, phi0);\n stream.point(lambda1, phi0);\n clean = 0;\n } else if (sign0 !== sign1 && delta >= pi) { // line crosses antimeridian\n if (abs(lambda0 - sign0) < epsilon) lambda0 -= sign0 * epsilon; // handle degeneracies\n if (abs(lambda1 - sign1) < epsilon) lambda1 -= sign1 * epsilon;\n phi0 = clipAntimeridianIntersect(lambda0, phi0, lambda1, phi1);\n stream.point(sign0, phi0);\n stream.lineEnd();\n stream.lineStart();\n stream.point(sign1, phi0);\n clean = 0;\n }\n stream.point(lambda0 = lambda1, phi0 = phi1);\n sign0 = sign1;\n },\n lineEnd: function() {\n stream.lineEnd();\n lambda0 = phi0 = NaN;\n },\n clean: function() {\n return 2 - clean; // if intersections, rejoin first and last segments\n }\n };\n}\n\nfunction clipAntimeridianIntersect(lambda0, phi0, lambda1, phi1) {\n var cosPhi0,\n cosPhi1,\n sinLambda0Lambda1 = sin(lambda0 - lambda1);\n return abs(sinLambda0Lambda1) > epsilon\n ? atan((sin(phi0) * (cosPhi1 = cos(phi1)) * sin(lambda1)\n - sin(phi1) * (cosPhi0 = cos(phi0)) * sin(lambda0))\n / (cosPhi0 * cosPhi1 * sinLambda0Lambda1))\n : (phi0 + phi1) / 2;\n}\n\nfunction clipAntimeridianInterpolate(from, to, direction, stream) {\n var phi;\n if (from == null) {\n phi = direction * halfPi;\n stream.point(-pi, phi);\n stream.point(0, phi);\n stream.point(pi, phi);\n stream.point(pi, 0);\n stream.point(pi, -phi);\n stream.point(0, -phi);\n stream.point(-pi, -phi);\n stream.point(-pi, 0);\n stream.point(-pi, phi);\n } else if (abs(from[0] - to[0]) > epsilon) {\n var lambda = from[0] < to[0] ? pi : -pi;\n phi = direction * lambda / 2;\n stream.point(-lambda, phi);\n stream.point(0, phi);\n stream.point(lambda, phi);\n } else {\n stream.point(to[0], to[1]);\n }\n}\n","import noop from \"../noop.js\";\n\nexport default function() {\n var lines = [],\n line;\n return {\n point: function(x, y, m) {\n line.push([x, y, m]);\n },\n lineStart: function() {\n lines.push(line = []);\n },\n lineEnd: noop,\n rejoin: function() {\n if (lines.length > 1) lines.push(lines.pop().concat(lines.shift()));\n },\n result: function() {\n var result = lines;\n lines = [];\n line = null;\n return result;\n }\n };\n}\n","import {cartesian, cartesianAddInPlace, cartesianCross, cartesianDot, cartesianScale, spherical} from \"../cartesian.js\";\nimport {circleStream} from \"../circle.js\";\nimport {abs, cos, epsilon, pi, radians, sqrt} from \"../math.js\";\nimport pointEqual from \"../pointEqual.js\";\nimport clip from \"./index.js\";\n\nexport default function(radius) {\n var cr = cos(radius),\n delta = 6 * radians,\n smallRadius = cr > 0,\n notHemisphere = abs(cr) > epsilon; // TODO optimise for this common case\n\n function interpolate(from, to, direction, stream) {\n circleStream(stream, radius, delta, direction, from, to);\n }\n\n function visible(lambda, phi) {\n return cos(lambda) * cos(phi) > cr;\n }\n\n // Takes a line and cuts into visible segments. Return values used for polygon\n // clipping: 0 - there were intersections or the line was empty; 1 - no\n // intersections 2 - there were intersections, and the first and last segments\n // should be rejoined.\n function clipLine(stream) {\n var point0, // previous point\n c0, // code for previous point\n v0, // visibility of previous point\n v00, // visibility of first point\n clean; // no intersections\n return {\n lineStart: function() {\n v00 = v0 = false;\n clean = 1;\n },\n point: function(lambda, phi) {\n var point1 = [lambda, phi],\n point2,\n v = visible(lambda, phi),\n c = smallRadius\n ? v ? 0 : code(lambda, phi)\n : v ? code(lambda + (lambda < 0 ? pi : -pi), phi) : 0;\n if (!point0 && (v00 = v0 = v)) stream.lineStart();\n if (v !== v0) {\n point2 = intersect(point0, point1);\n if (!point2 || pointEqual(point0, point2) || pointEqual(point1, point2))\n point1[2] = 1;\n }\n if (v !== v0) {\n clean = 0;\n if (v) {\n // outside going in\n stream.lineStart();\n point2 = intersect(point1, point0);\n stream.point(point2[0], point2[1]);\n } else {\n // inside going out\n point2 = intersect(point0, point1);\n stream.point(point2[0], point2[1], 2);\n stream.lineEnd();\n }\n point0 = point2;\n } else if (notHemisphere && point0 && smallRadius ^ v) {\n var t;\n // If the codes for two points are different, or are both zero,\n // and there this segment intersects with the small circle.\n if (!(c & c0) && (t = intersect(point1, point0, true))) {\n clean = 0;\n if (smallRadius) {\n stream.lineStart();\n stream.point(t[0][0], t[0][1]);\n stream.point(t[1][0], t[1][1]);\n stream.lineEnd();\n } else {\n stream.point(t[1][0], t[1][1]);\n stream.lineEnd();\n stream.lineStart();\n stream.point(t[0][0], t[0][1], 3);\n }\n }\n }\n if (v && (!point0 || !pointEqual(point0, point1))) {\n stream.point(point1[0], point1[1]);\n }\n point0 = point1, v0 = v, c0 = c;\n },\n lineEnd: function() {\n if (v0) stream.lineEnd();\n point0 = null;\n },\n // Rejoin first and last segments if there were intersections and the first\n // and last points were visible.\n clean: function() {\n return clean | ((v00 && v0) << 1);\n }\n };\n }\n\n // Intersects the great circle between a and b with the clip circle.\n function intersect(a, b, two) {\n var pa = cartesian(a),\n pb = cartesian(b);\n\n // We have two planes, n1.p = d1 and n2.p = d2.\n // Find intersection line p(t) = c1 n1 + c2 n2 + t (n1 ⨯ n2).\n var n1 = [1, 0, 0], // normal\n n2 = cartesianCross(pa, pb),\n n2n2 = cartesianDot(n2, n2),\n n1n2 = n2[0], // cartesianDot(n1, n2),\n determinant = n2n2 - n1n2 * n1n2;\n\n // Two polar points.\n if (!determinant) return !two && a;\n\n var c1 = cr * n2n2 / determinant,\n c2 = -cr * n1n2 / determinant,\n n1xn2 = cartesianCross(n1, n2),\n A = cartesianScale(n1, c1),\n B = cartesianScale(n2, c2);\n cartesianAddInPlace(A, B);\n\n // Solve |p(t)|^2 = 1.\n var u = n1xn2,\n w = cartesianDot(A, u),\n uu = cartesianDot(u, u),\n t2 = w * w - uu * (cartesianDot(A, A) - 1);\n\n if (t2 < 0) return;\n\n var t = sqrt(t2),\n q = cartesianScale(u, (-w - t) / uu);\n cartesianAddInPlace(q, A);\n q = spherical(q);\n\n if (!two) return q;\n\n // Two intersection points.\n var lambda0 = a[0],\n lambda1 = b[0],\n phi0 = a[1],\n phi1 = b[1],\n z;\n\n if (lambda1 < lambda0) z = lambda0, lambda0 = lambda1, lambda1 = z;\n\n var delta = lambda1 - lambda0,\n polar = abs(delta - pi) < epsilon,\n meridian = polar || delta < epsilon;\n\n if (!polar && phi1 < phi0) z = phi0, phi0 = phi1, phi1 = z;\n\n // Check that the first point is between a and b.\n if (meridian\n ? polar\n ? phi0 + phi1 > 0 ^ q[1] < (abs(q[0] - lambda0) < epsilon ? phi0 : phi1)\n : phi0 <= q[1] && q[1] <= phi1\n : delta > pi ^ (lambda0 <= q[0] && q[0] <= lambda1)) {\n var q1 = cartesianScale(u, (-w + t) / uu);\n cartesianAddInPlace(q1, A);\n return [q, spherical(q1)];\n }\n }\n\n // Generates a 4-bit vector representing the location of a point relative to\n // the small circle's bounding box.\n function code(lambda, phi) {\n var r = smallRadius ? radius : pi - radius,\n code = 0;\n if (lambda < -r) code |= 1; // left\n else if (lambda > r) code |= 2; // right\n if (phi < -r) code |= 4; // below\n else if (phi > r) code |= 8; // above\n return code;\n }\n\n return clip(visible, clipLine, interpolate, smallRadius ? [0, -radius] : [-pi, radius - pi]);\n}\n","import clipBuffer from \"./buffer.js\";\nimport clipRejoin from \"./rejoin.js\";\nimport {epsilon, halfPi} from \"../math.js\";\nimport polygonContains from \"../polygonContains.js\";\nimport {merge} from \"d3-array\";\n\nexport default function(pointVisible, clipLine, interpolate, start) {\n return function(sink) {\n var line = clipLine(sink),\n ringBuffer = clipBuffer(),\n ringSink = clipLine(ringBuffer),\n polygonStarted = false,\n polygon,\n segments,\n ring;\n\n var clip = {\n point: point,\n lineStart: lineStart,\n lineEnd: lineEnd,\n polygonStart: function() {\n clip.point = pointRing;\n clip.lineStart = ringStart;\n clip.lineEnd = ringEnd;\n segments = [];\n polygon = [];\n },\n polygonEnd: function() {\n clip.point = point;\n clip.lineStart = lineStart;\n clip.lineEnd = lineEnd;\n segments = merge(segments);\n var startInside = polygonContains(polygon, start);\n if (segments.length) {\n if (!polygonStarted) sink.polygonStart(), polygonStarted = true;\n clipRejoin(segments, compareIntersection, startInside, interpolate, sink);\n } else if (startInside) {\n if (!polygonStarted) sink.polygonStart(), polygonStarted = true;\n sink.lineStart();\n interpolate(null, null, 1, sink);\n sink.lineEnd();\n }\n if (polygonStarted) sink.polygonEnd(), polygonStarted = false;\n segments = polygon = null;\n },\n sphere: function() {\n sink.polygonStart();\n sink.lineStart();\n interpolate(null, null, 1, sink);\n sink.lineEnd();\n sink.polygonEnd();\n }\n };\n\n function point(lambda, phi) {\n if (pointVisible(lambda, phi)) sink.point(lambda, phi);\n }\n\n function pointLine(lambda, phi) {\n line.point(lambda, phi);\n }\n\n function lineStart() {\n clip.point = pointLine;\n line.lineStart();\n }\n\n function lineEnd() {\n clip.point = point;\n line.lineEnd();\n }\n\n function pointRing(lambda, phi) {\n ring.push([lambda, phi]);\n ringSink.point(lambda, phi);\n }\n\n function ringStart() {\n ringSink.lineStart();\n ring = [];\n }\n\n function ringEnd() {\n pointRing(ring[0][0], ring[0][1]);\n ringSink.lineEnd();\n\n var clean = ringSink.clean(),\n ringSegments = ringBuffer.result(),\n i, n = ringSegments.length, m,\n segment,\n point;\n\n ring.pop();\n polygon.push(ring);\n ring = null;\n\n if (!n) return;\n\n // No intersections.\n if (clean & 1) {\n segment = ringSegments[0];\n if ((m = segment.length - 1) > 0) {\n if (!polygonStarted) sink.polygonStart(), polygonStarted = true;\n sink.lineStart();\n for (i = 0; i < m; ++i) sink.point((point = segment[i])[0], point[1]);\n sink.lineEnd();\n }\n return;\n }\n\n // Rejoin connected segments.\n // TODO reuse ringBuffer.rejoin()?\n if (n > 1 && clean & 2) ringSegments.push(ringSegments.pop().concat(ringSegments.shift()));\n\n segments.push(ringSegments.filter(validSegment));\n }\n\n return clip;\n };\n}\n\nfunction validSegment(segment) {\n return segment.length > 1;\n}\n\n// Intersections are sorted along the clip edge. For both antimeridian cutting\n// and circle clipping, the same comparison is used.\nfunction compareIntersection(a, b) {\n return ((a = a.x)[0] < 0 ? a[1] - halfPi - epsilon : halfPi - a[1])\n - ((b = b.x)[0] < 0 ? b[1] - halfPi - epsilon : halfPi - b[1]);\n}\n","export default function(a, b, x0, y0, x1, y1) {\n var ax = a[0],\n ay = a[1],\n bx = b[0],\n by = b[1],\n t0 = 0,\n t1 = 1,\n dx = bx - ax,\n dy = by - ay,\n r;\n\n r = x0 - ax;\n if (!dx && r > 0) return;\n r /= dx;\n if (dx < 0) {\n if (r < t0) return;\n if (r < t1) t1 = r;\n } else if (dx > 0) {\n if (r > t1) return;\n if (r > t0) t0 = r;\n }\n\n r = x1 - ax;\n if (!dx && r < 0) return;\n r /= dx;\n if (dx < 0) {\n if (r > t1) return;\n if (r > t0) t0 = r;\n } else if (dx > 0) {\n if (r < t0) return;\n if (r < t1) t1 = r;\n }\n\n r = y0 - ay;\n if (!dy && r > 0) return;\n r /= dy;\n if (dy < 0) {\n if (r < t0) return;\n if (r < t1) t1 = r;\n } else if (dy > 0) {\n if (r > t1) return;\n if (r > t0) t0 = r;\n }\n\n r = y1 - ay;\n if (!dy && r < 0) return;\n r /= dy;\n if (dy < 0) {\n if (r > t1) return;\n if (r > t0) t0 = r;\n } else if (dy > 0) {\n if (r < t0) return;\n if (r < t1) t1 = r;\n }\n\n if (t0 > 0) a[0] = ax + t0 * dx, a[1] = ay + t0 * dy;\n if (t1 < 1) b[0] = ax + t1 * dx, b[1] = ay + t1 * dy;\n return true;\n}\n","import {abs, epsilon} from \"../math.js\";\nimport clipBuffer from \"./buffer.js\";\nimport clipLine from \"./line.js\";\nimport clipRejoin from \"./rejoin.js\";\nimport {merge} from \"d3-array\";\n\nvar clipMax = 1e9, clipMin = -clipMax;\n\n// TODO Use d3-polygon’s polygonContains here for the ring check?\n// TODO Eliminate duplicate buffering in clipBuffer and polygon.push?\n\nexport default function clipRectangle(x0, y0, x1, y1) {\n\n function visible(x, y) {\n return x0 <= x && x <= x1 && y0 <= y && y <= y1;\n }\n\n function interpolate(from, to, direction, stream) {\n var a = 0, a1 = 0;\n if (from == null\n || (a = corner(from, direction)) !== (a1 = corner(to, direction))\n || comparePoint(from, to) < 0 ^ direction > 0) {\n do stream.point(a === 0 || a === 3 ? x0 : x1, a > 1 ? y1 : y0);\n while ((a = (a + direction + 4) % 4) !== a1);\n } else {\n stream.point(to[0], to[1]);\n }\n }\n\n function corner(p, direction) {\n return abs(p[0] - x0) < epsilon ? direction > 0 ? 0 : 3\n : abs(p[0] - x1) < epsilon ? direction > 0 ? 2 : 1\n : abs(p[1] - y0) < epsilon ? direction > 0 ? 1 : 0\n : direction > 0 ? 3 : 2; // abs(p[1] - y1) < epsilon\n }\n\n function compareIntersection(a, b) {\n return comparePoint(a.x, b.x);\n }\n\n function comparePoint(a, b) {\n var ca = corner(a, 1),\n cb = corner(b, 1);\n return ca !== cb ? ca - cb\n : ca === 0 ? b[1] - a[1]\n : ca === 1 ? a[0] - b[0]\n : ca === 2 ? a[1] - b[1]\n : b[0] - a[0];\n }\n\n return function(stream) {\n var activeStream = stream,\n bufferStream = clipBuffer(),\n segments,\n polygon,\n ring,\n x__, y__, v__, // first point\n x_, y_, v_, // previous point\n first,\n clean;\n\n var clipStream = {\n point: point,\n lineStart: lineStart,\n lineEnd: lineEnd,\n polygonStart: polygonStart,\n polygonEnd: polygonEnd\n };\n\n function point(x, y) {\n if (visible(x, y)) activeStream.point(x, y);\n }\n\n function polygonInside() {\n var winding = 0;\n\n for (var i = 0, n = polygon.length; i < n; ++i) {\n for (var ring = polygon[i], j = 1, m = ring.length, point = ring[0], a0, a1, b0 = point[0], b1 = point[1]; j < m; ++j) {\n a0 = b0, a1 = b1, point = ring[j], b0 = point[0], b1 = point[1];\n if (a1 <= y1) { if (b1 > y1 && (b0 - a0) * (y1 - a1) > (b1 - a1) * (x0 - a0)) ++winding; }\n else { if (b1 <= y1 && (b0 - a0) * (y1 - a1) < (b1 - a1) * (x0 - a0)) --winding; }\n }\n }\n\n return winding;\n }\n\n // Buffer geometry within a polygon and then clip it en masse.\n function polygonStart() {\n activeStream = bufferStream, segments = [], polygon = [], clean = true;\n }\n\n function polygonEnd() {\n var startInside = polygonInside(),\n cleanInside = clean && startInside,\n visible = (segments = merge(segments)).length;\n if (cleanInside || visible) {\n stream.polygonStart();\n if (cleanInside) {\n stream.lineStart();\n interpolate(null, null, 1, stream);\n stream.lineEnd();\n }\n if (visible) {\n clipRejoin(segments, compareIntersection, startInside, interpolate, stream);\n }\n stream.polygonEnd();\n }\n activeStream = stream, segments = polygon = ring = null;\n }\n\n function lineStart() {\n clipStream.point = linePoint;\n if (polygon) polygon.push(ring = []);\n first = true;\n v_ = false;\n x_ = y_ = NaN;\n }\n\n // TODO rather than special-case polygons, simply handle them separately.\n // Ideally, coincident intersection points should be jittered to avoid\n // clipping issues.\n function lineEnd() {\n if (segments) {\n linePoint(x__, y__);\n if (v__ && v_) bufferStream.rejoin();\n segments.push(bufferStream.result());\n }\n clipStream.point = point;\n if (v_) activeStream.lineEnd();\n }\n\n function linePoint(x, y) {\n var v = visible(x, y);\n if (polygon) ring.push([x, y]);\n if (first) {\n x__ = x, y__ = y, v__ = v;\n first = false;\n if (v) {\n activeStream.lineStart();\n activeStream.point(x, y);\n }\n } else {\n if (v && v_) activeStream.point(x, y);\n else {\n var a = [x_ = Math.max(clipMin, Math.min(clipMax, x_)), y_ = Math.max(clipMin, Math.min(clipMax, y_))],\n b = [x = Math.max(clipMin, Math.min(clipMax, x)), y = Math.max(clipMin, Math.min(clipMax, y))];\n if (clipLine(a, b, x0, y0, x1, y1)) {\n if (!v_) {\n activeStream.lineStart();\n activeStream.point(a[0], a[1]);\n }\n activeStream.point(b[0], b[1]);\n if (!v) activeStream.lineEnd();\n clean = false;\n } else if (v) {\n activeStream.lineStart();\n activeStream.point(x, y);\n clean = false;\n }\n }\n }\n x_ = x, y_ = y, v_ = v;\n }\n\n return clipStream;\n };\n}\n","import pointEqual from \"../pointEqual.js\";\nimport {epsilon} from \"../math.js\";\n\nfunction Intersection(point, points, other, entry) {\n this.x = point;\n this.z = points;\n this.o = other; // another intersection\n this.e = entry; // is an entry?\n this.v = false; // visited\n this.n = this.p = null; // next & previous\n}\n\n// A generalized polygon clipping algorithm: given a polygon that has been cut\n// into its visible line segments, and rejoins the segments by interpolating\n// along the clip edge.\nexport default function(segments, compareIntersection, startInside, interpolate, stream) {\n var subject = [],\n clip = [],\n i,\n n;\n\n segments.forEach(function(segment) {\n if ((n = segment.length - 1) <= 0) return;\n var n, p0 = segment[0], p1 = segment[n], x;\n\n if (pointEqual(p0, p1)) {\n if (!p0[2] && !p1[2]) {\n stream.lineStart();\n for (i = 0; i < n; ++i) stream.point((p0 = segment[i])[0], p0[1]);\n stream.lineEnd();\n return;\n }\n // handle degenerate cases by moving the point\n p1[0] += 2 * epsilon;\n }\n\n subject.push(x = new Intersection(p0, segment, null, true));\n clip.push(x.o = new Intersection(p0, null, x, false));\n subject.push(x = new Intersection(p1, segment, null, false));\n clip.push(x.o = new Intersection(p1, null, x, true));\n });\n\n if (!subject.length) return;\n\n clip.sort(compareIntersection);\n link(subject);\n link(clip);\n\n for (i = 0, n = clip.length; i < n; ++i) {\n clip[i].e = startInside = !startInside;\n }\n\n var start = subject[0],\n points,\n point;\n\n while (1) {\n // Find first unvisited intersection.\n var current = start,\n isSubject = true;\n while (current.v) if ((current = current.n) === start) return;\n points = current.z;\n stream.lineStart();\n do {\n current.v = current.o.v = true;\n if (current.e) {\n if (isSubject) {\n for (i = 0, n = points.length; i < n; ++i) stream.point((point = points[i])[0], point[1]);\n } else {\n interpolate(current.x, current.n.x, 1, stream);\n }\n current = current.n;\n } else {\n if (isSubject) {\n points = current.p.z;\n for (i = points.length - 1; i >= 0; --i) stream.point((point = points[i])[0], point[1]);\n } else {\n interpolate(current.x, current.p.x, -1, stream);\n }\n current = current.p;\n }\n current = current.o;\n points = current.z;\n isSubject = !isSubject;\n } while (!current.v);\n stream.lineEnd();\n }\n}\n\nfunction link(array) {\n if (!(n = array.length)) return;\n var n,\n i = 0,\n a = array[0],\n b;\n while (++i < n) {\n a.n = b = array[i];\n b.p = a;\n a = b;\n }\n a.n = b = array[0];\n b.p = a;\n}\n","export default function(a, b) {\n\n function compose(x, y) {\n return x = a(x, y), b(x[0], x[1]);\n }\n\n if (a.invert && b.invert) compose.invert = function(x, y) {\n return x = b.invert(x, y), x && a.invert(x[0], x[1]);\n };\n\n return compose;\n}\n","export default function(x) {\n return function() {\n return x;\n };\n}\n","export default x => x;\n","import {Adder} from \"d3-array\";\nimport {abs, atan2, cos, radians, sin, sqrt} from \"./math.js\";\nimport noop from \"./noop.js\";\nimport stream from \"./stream.js\";\n\nvar lengthSum,\n lambda0,\n sinPhi0,\n cosPhi0;\n\nvar lengthStream = {\n sphere: noop,\n point: noop,\n lineStart: lengthLineStart,\n lineEnd: noop,\n polygonStart: noop,\n polygonEnd: noop\n};\n\nfunction lengthLineStart() {\n lengthStream.point = lengthPointFirst;\n lengthStream.lineEnd = lengthLineEnd;\n}\n\nfunction lengthLineEnd() {\n lengthStream.point = lengthStream.lineEnd = noop;\n}\n\nfunction lengthPointFirst(lambda, phi) {\n lambda *= radians, phi *= radians;\n lambda0 = lambda, sinPhi0 = sin(phi), cosPhi0 = cos(phi);\n lengthStream.point = lengthPoint;\n}\n\nfunction lengthPoint(lambda, phi) {\n lambda *= radians, phi *= radians;\n var sinPhi = sin(phi),\n cosPhi = cos(phi),\n delta = abs(lambda - lambda0),\n cosDelta = cos(delta),\n sinDelta = sin(delta),\n x = cosPhi * sinDelta,\n y = cosPhi0 * sinPhi - sinPhi0 * cosPhi * cosDelta,\n z = sinPhi0 * sinPhi + cosPhi0 * cosPhi * cosDelta;\n lengthSum.add(atan2(sqrt(x * x + y * y), z));\n lambda0 = lambda, sinPhi0 = sinPhi, cosPhi0 = cosPhi;\n}\n\nexport default function(object) {\n lengthSum = new Adder();\n stream(object, lengthStream);\n return +lengthSum;\n}\n","export var epsilon = 1e-6;\nexport var epsilon2 = 1e-12;\nexport var pi = Math.PI;\nexport var halfPi = pi / 2;\nexport var quarterPi = pi / 4;\nexport var tau = pi * 2;\n\nexport var degrees = 180 / pi;\nexport var radians = pi / 180;\n\nexport var abs = Math.abs;\nexport var atan = Math.atan;\nexport var atan2 = Math.atan2;\nexport var cos = Math.cos;\nexport var ceil = Math.ceil;\nexport var exp = Math.exp;\nexport var floor = Math.floor;\nexport var hypot = Math.hypot;\nexport var log = Math.log;\nexport var pow = Math.pow;\nexport var sin = Math.sin;\nexport var sign = Math.sign || function(x) { return x > 0 ? 1 : x < 0 ? -1 : 0; };\nexport var sqrt = Math.sqrt;\nexport var tan = Math.tan;\n\nexport function acos(x) {\n return x > 1 ? 0 : x < -1 ? pi : Math.acos(x);\n}\n\nexport function asin(x) {\n return x > 1 ? halfPi : x < -1 ? -halfPi : Math.asin(x);\n}\n\nexport function haversin(x) {\n return (x = sin(x / 2)) * x;\n}\n","export default function noop() {}\n","import {Adder} from \"d3-array\";\nimport {abs} from \"../math.js\";\nimport noop from \"../noop.js\";\n\nvar areaSum = new Adder(),\n areaRingSum = new Adder(),\n x00,\n y00,\n x0,\n y0;\n\nvar areaStream = {\n point: noop,\n lineStart: noop,\n lineEnd: noop,\n polygonStart: function() {\n areaStream.lineStart = areaRingStart;\n areaStream.lineEnd = areaRingEnd;\n },\n polygonEnd: function() {\n areaStream.lineStart = areaStream.lineEnd = areaStream.point = noop;\n areaSum.add(abs(areaRingSum));\n areaRingSum = new Adder();\n },\n result: function() {\n var area = areaSum / 2;\n areaSum = new Adder();\n return area;\n }\n};\n\nfunction areaRingStart() {\n areaStream.point = areaPointFirst;\n}\n\nfunction areaPointFirst(x, y) {\n areaStream.point = areaPoint;\n x00 = x0 = x, y00 = y0 = y;\n}\n\nfunction areaPoint(x, y) {\n areaRingSum.add(y0 * x - x0 * y);\n x0 = x, y0 = y;\n}\n\nfunction areaRingEnd() {\n areaPoint(x00, y00);\n}\n\nexport default areaStream;\n","import noop from \"../noop.js\";\n\nvar x0 = Infinity,\n y0 = x0,\n x1 = -x0,\n y1 = x1;\n\nvar boundsStream = {\n point: boundsPoint,\n lineStart: noop,\n lineEnd: noop,\n polygonStart: noop,\n polygonEnd: noop,\n result: function() {\n var bounds = [[x0, y0], [x1, y1]];\n x1 = y1 = -(y0 = x0 = Infinity);\n return bounds;\n }\n};\n\nfunction boundsPoint(x, y) {\n if (x < x0) x0 = x;\n if (x > x1) x1 = x;\n if (y < y0) y0 = y;\n if (y > y1) y1 = y;\n}\n\nexport default boundsStream;\n","import {sqrt} from \"../math.js\";\n\n// TODO Enforce positive area for exterior, negative area for interior?\n\nvar X0 = 0,\n Y0 = 0,\n Z0 = 0,\n X1 = 0,\n Y1 = 0,\n Z1 = 0,\n X2 = 0,\n Y2 = 0,\n Z2 = 0,\n x00,\n y00,\n x0,\n y0;\n\nvar centroidStream = {\n point: centroidPoint,\n lineStart: centroidLineStart,\n lineEnd: centroidLineEnd,\n polygonStart: function() {\n centroidStream.lineStart = centroidRingStart;\n centroidStream.lineEnd = centroidRingEnd;\n },\n polygonEnd: function() {\n centroidStream.point = centroidPoint;\n centroidStream.lineStart = centroidLineStart;\n centroidStream.lineEnd = centroidLineEnd;\n },\n result: function() {\n var centroid = Z2 ? [X2 / Z2, Y2 / Z2]\n : Z1 ? [X1 / Z1, Y1 / Z1]\n : Z0 ? [X0 / Z0, Y0 / Z0]\n : [NaN, NaN];\n X0 = Y0 = Z0 =\n X1 = Y1 = Z1 =\n X2 = Y2 = Z2 = 0;\n return centroid;\n }\n};\n\nfunction centroidPoint(x, y) {\n X0 += x;\n Y0 += y;\n ++Z0;\n}\n\nfunction centroidLineStart() {\n centroidStream.point = centroidPointFirstLine;\n}\n\nfunction centroidPointFirstLine(x, y) {\n centroidStream.point = centroidPointLine;\n centroidPoint(x0 = x, y0 = y);\n}\n\nfunction centroidPointLine(x, y) {\n var dx = x - x0, dy = y - y0, z = sqrt(dx * dx + dy * dy);\n X1 += z * (x0 + x) / 2;\n Y1 += z * (y0 + y) / 2;\n Z1 += z;\n centroidPoint(x0 = x, y0 = y);\n}\n\nfunction centroidLineEnd() {\n centroidStream.point = centroidPoint;\n}\n\nfunction centroidRingStart() {\n centroidStream.point = centroidPointFirstRing;\n}\n\nfunction centroidRingEnd() {\n centroidPointRing(x00, y00);\n}\n\nfunction centroidPointFirstRing(x, y) {\n centroidStream.point = centroidPointRing;\n centroidPoint(x00 = x0 = x, y00 = y0 = y);\n}\n\nfunction centroidPointRing(x, y) {\n var dx = x - x0,\n dy = y - y0,\n z = sqrt(dx * dx + dy * dy);\n\n X1 += z * (x0 + x) / 2;\n Y1 += z * (y0 + y) / 2;\n Z1 += z;\n\n z = y0 * x - x0 * y;\n X2 += z * (x0 + x);\n Y2 += z * (y0 + y);\n Z2 += z * 3;\n centroidPoint(x0 = x, y0 = y);\n}\n\nexport default centroidStream;\n","import {tau} from \"../math.js\";\nimport noop from \"../noop.js\";\n\nexport default function PathContext(context) {\n this._context = context;\n}\n\nPathContext.prototype = {\n _radius: 4.5,\n pointRadius: function(_) {\n return this._radius = _, this;\n },\n polygonStart: function() {\n this._line = 0;\n },\n polygonEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._point = 0;\n },\n lineEnd: function() {\n if (this._line === 0) this._context.closePath();\n this._point = NaN;\n },\n point: function(x, y) {\n switch (this._point) {\n case 0: {\n this._context.moveTo(x, y);\n this._point = 1;\n break;\n }\n case 1: {\n this._context.lineTo(x, y);\n break;\n }\n default: {\n this._context.moveTo(x + this._radius, y);\n this._context.arc(x, y, this._radius, 0, tau);\n break;\n }\n }\n },\n result: noop\n};\n","import {Adder} from \"d3-array\";\nimport {sqrt} from \"../math.js\";\nimport noop from \"../noop.js\";\n\nvar lengthSum = new Adder(),\n lengthRing,\n x00,\n y00,\n x0,\n y0;\n\nvar lengthStream = {\n point: noop,\n lineStart: function() {\n lengthStream.point = lengthPointFirst;\n },\n lineEnd: function() {\n if (lengthRing) lengthPoint(x00, y00);\n lengthStream.point = noop;\n },\n polygonStart: function() {\n lengthRing = true;\n },\n polygonEnd: function() {\n lengthRing = null;\n },\n result: function() {\n var length = +lengthSum;\n lengthSum = new Adder();\n return length;\n }\n};\n\nfunction lengthPointFirst(x, y) {\n lengthStream.point = lengthPoint;\n x00 = x0 = x, y00 = y0 = y;\n}\n\nfunction lengthPoint(x, y) {\n x0 -= x, y0 -= y;\n lengthSum.add(sqrt(x0 * x0 + y0 * y0));\n x0 = x, y0 = y;\n}\n\nexport default lengthStream;\n","// Simple caching for constant-radius points.\nlet cacheDigits, cacheAppend, cacheRadius, cacheCircle;\n\nexport default class PathString {\n constructor(digits) {\n this._append = digits == null ? append : appendRound(digits);\n this._radius = 4.5;\n this._ = \"\";\n }\n pointRadius(_) {\n this._radius = +_;\n return this;\n }\n polygonStart() {\n this._line = 0;\n }\n polygonEnd() {\n this._line = NaN;\n }\n lineStart() {\n this._point = 0;\n }\n lineEnd() {\n if (this._line === 0) this._ += \"Z\";\n this._point = NaN;\n }\n point(x, y) {\n switch (this._point) {\n case 0: {\n this._append`M${x},${y}`;\n this._point = 1;\n break;\n }\n case 1: {\n this._append`L${x},${y}`;\n break;\n }\n default: {\n this._append`M${x},${y}`;\n if (this._radius !== cacheRadius || this._append !== cacheAppend) {\n const r = this._radius;\n const s = this._;\n this._ = \"\"; // stash the old string so we can cache the circle path fragment\n this._append`m0,${r}a${r},${r} 0 1,1 0,${-2 * r}a${r},${r} 0 1,1 0,${2 * r}z`;\n cacheRadius = r;\n cacheAppend = this._append;\n cacheCircle = this._;\n this._ = s;\n }\n this._ += cacheCircle;\n break;\n }\n }\n }\n result() {\n const result = this._;\n this._ = \"\";\n return result.length ? result : null;\n }\n}\n\nfunction append(strings) {\n let i = 1;\n this._ += strings[0];\n for (const j = strings.length; i < j; ++i) {\n this._ += arguments[i] + strings[i];\n }\n}\n\nfunction appendRound(digits) {\n const d = Math.floor(digits);\n if (!(d >= 0)) throw new RangeError(`invalid digits: ${digits}`);\n if (d > 15) return append;\n if (d !== cacheDigits) {\n const k = 10 ** d;\n cacheDigits = d;\n cacheAppend = function append(strings) {\n let i = 1;\n this._ += strings[0];\n for (const j = strings.length; i < j; ++i) {\n this._ += Math.round(arguments[i] * k) / k + strings[i];\n }\n };\n }\n return cacheAppend;\n}\n","import {abs, epsilon} from \"./math.js\";\n\nexport default function(a, b) {\n return abs(a[0] - b[0]) < epsilon && abs(a[1] - b[1]) < epsilon;\n}\n","import {Adder} from \"d3-array\";\nimport {cartesian, cartesianCross, cartesianNormalizeInPlace} from \"./cartesian.js\";\nimport {abs, asin, atan2, cos, epsilon, epsilon2, halfPi, pi, quarterPi, sign, sin, tau} from \"./math.js\";\n\nfunction longitude(point) {\n return abs(point[0]) <= pi ? point[0] : sign(point[0]) * ((abs(point[0]) + pi) % tau - pi);\n}\n\nexport default function(polygon, point) {\n var lambda = longitude(point),\n phi = point[1],\n sinPhi = sin(phi),\n normal = [sin(lambda), -cos(lambda), 0],\n angle = 0,\n winding = 0;\n\n var sum = new Adder();\n\n if (sinPhi === 1) phi = halfPi + epsilon;\n else if (sinPhi === -1) phi = -halfPi - epsilon;\n\n for (var i = 0, n = polygon.length; i < n; ++i) {\n if (!(m = (ring = polygon[i]).length)) continue;\n var ring,\n m,\n point0 = ring[m - 1],\n lambda0 = longitude(point0),\n phi0 = point0[1] / 2 + quarterPi,\n sinPhi0 = sin(phi0),\n cosPhi0 = cos(phi0);\n\n for (var j = 0; j < m; ++j, lambda0 = lambda1, sinPhi0 = sinPhi1, cosPhi0 = cosPhi1, point0 = point1) {\n var point1 = ring[j],\n lambda1 = longitude(point1),\n phi1 = point1[1] / 2 + quarterPi,\n sinPhi1 = sin(phi1),\n cosPhi1 = cos(phi1),\n delta = lambda1 - lambda0,\n sign = delta >= 0 ? 1 : -1,\n absDelta = sign * delta,\n antimeridian = absDelta > pi,\n k = sinPhi0 * sinPhi1;\n\n sum.add(atan2(k * sign * sin(absDelta), cosPhi0 * cosPhi1 + k * cos(absDelta)));\n angle += antimeridian ? delta + sign * tau : delta;\n\n // Are the longitudes either side of the point’s meridian (lambda),\n // and are the latitudes smaller than the parallel (phi)?\n if (antimeridian ^ lambda0 >= lambda ^ lambda1 >= lambda) {\n var arc = cartesianCross(cartesian(point0), cartesian(point1));\n cartesianNormalizeInPlace(arc);\n var intersection = cartesianCross(normal, arc);\n cartesianNormalizeInPlace(intersection);\n var phiArc = (antimeridian ^ delta >= 0 ? -1 : 1) * asin(intersection[2]);\n if (phi > phiArc || phi === phiArc && (arc[0] || arc[1])) {\n winding += antimeridian ^ delta >= 0 ? 1 : -1;\n }\n }\n }\n }\n\n // First, determine whether the South pole is inside or outside:\n //\n // It is inside if:\n // * the polygon winds around it in a clockwise direction.\n // * the polygon does not (cumulatively) wind around it, but has a negative\n // (counter-clockwise) area.\n //\n // Second, count the (signed) number of times a segment crosses a lambda\n // from the point to the South pole. If it is zero, then the point is the\n // same side as the South pole.\n\n return (angle < -epsilon || angle < epsilon && sum < -epsilon2) ^ (winding & 1);\n}\n","import conicEqualArea from \"./conicEqualArea.js\";\n\nexport default function() {\n return conicEqualArea()\n .parallels([29.5, 45.5])\n .scale(1070)\n .translate([480, 250])\n .rotate([96, 0])\n .center([-0.6, 38.7]);\n}\n","import {epsilon} from \"../math.js\";\nimport albers from \"./albers.js\";\nimport conicEqualArea from \"./conicEqualArea.js\";\nimport {fitExtent, fitSize, fitWidth, fitHeight} from \"./fit.js\";\n\n// The projections must have mutually exclusive clip regions on the sphere,\n// as this will avoid emitting interleaving lines and polygons.\nfunction multiplex(streams) {\n var n = streams.length;\n return {\n point: function(x, y) { var i = -1; while (++i < n) streams[i].point(x, y); },\n sphere: function() { var i = -1; while (++i < n) streams[i].sphere(); },\n lineStart: function() { var i = -1; while (++i < n) streams[i].lineStart(); },\n lineEnd: function() { var i = -1; while (++i < n) streams[i].lineEnd(); },\n polygonStart: function() { var i = -1; while (++i < n) streams[i].polygonStart(); },\n polygonEnd: function() { var i = -1; while (++i < n) streams[i].polygonEnd(); }\n };\n}\n\n// A composite projection for the United States, configured by default for\n// 960×500. The projection also works quite well at 960×600 if you change the\n// scale to 1285 and adjust the translate accordingly. The set of standard\n// parallels for each region comes from USGS, which is published here:\n// http://egsc.usgs.gov/isb/pubs/MapProjections/projections.html#albers\nexport default function() {\n var cache,\n cacheStream,\n lower48 = albers(), lower48Point,\n alaska = conicEqualArea().rotate([154, 0]).center([-2, 58.5]).parallels([55, 65]), alaskaPoint, // EPSG:3338\n hawaii = conicEqualArea().rotate([157, 0]).center([-3, 19.9]).parallels([8, 18]), hawaiiPoint, // ESRI:102007\n point, pointStream = {point: function(x, y) { point = [x, y]; }};\n\n function albersUsa(coordinates) {\n var x = coordinates[0], y = coordinates[1];\n return point = null,\n (lower48Point.point(x, y), point)\n || (alaskaPoint.point(x, y), point)\n || (hawaiiPoint.point(x, y), point);\n }\n\n albersUsa.invert = function(coordinates) {\n var k = lower48.scale(),\n t = lower48.translate(),\n x = (coordinates[0] - t[0]) / k,\n y = (coordinates[1] - t[1]) / k;\n return (y >= 0.120 && y < 0.234 && x >= -0.425 && x < -0.214 ? alaska\n : y >= 0.166 && y < 0.234 && x >= -0.214 && x < -0.115 ? hawaii\n : lower48).invert(coordinates);\n };\n\n albersUsa.stream = function(stream) {\n return cache && cacheStream === stream ? cache : cache = multiplex([lower48.stream(cacheStream = stream), alaska.stream(stream), hawaii.stream(stream)]);\n };\n\n albersUsa.precision = function(_) {\n if (!arguments.length) return lower48.precision();\n lower48.precision(_), alaska.precision(_), hawaii.precision(_);\n return reset();\n };\n\n albersUsa.scale = function(_) {\n if (!arguments.length) return lower48.scale();\n lower48.scale(_), alaska.scale(_ * 0.35), hawaii.scale(_);\n return albersUsa.translate(lower48.translate());\n };\n\n albersUsa.translate = function(_) {\n if (!arguments.length) return lower48.translate();\n var k = lower48.scale(), x = +_[0], y = +_[1];\n\n lower48Point = lower48\n .translate(_)\n .clipExtent([[x - 0.455 * k, y - 0.238 * k], [x + 0.455 * k, y + 0.238 * k]])\n .stream(pointStream);\n\n alaskaPoint = alaska\n .translate([x - 0.307 * k, y + 0.201 * k])\n .clipExtent([[x - 0.425 * k + epsilon, y + 0.120 * k + epsilon], [x - 0.214 * k - epsilon, y + 0.234 * k - epsilon]])\n .stream(pointStream);\n\n hawaiiPoint = hawaii\n .translate([x - 0.205 * k, y + 0.212 * k])\n .clipExtent([[x - 0.214 * k + epsilon, y + 0.166 * k + epsilon], [x - 0.115 * k - epsilon, y + 0.234 * k - epsilon]])\n .stream(pointStream);\n\n return reset();\n };\n\n albersUsa.fitExtent = function(extent, object) {\n return fitExtent(albersUsa, extent, object);\n };\n\n albersUsa.fitSize = function(size, object) {\n return fitSize(albersUsa, size, object);\n };\n\n albersUsa.fitWidth = function(width, object) {\n return fitWidth(albersUsa, width, object);\n };\n\n albersUsa.fitHeight = function(height, object) {\n return fitHeight(albersUsa, height, object);\n };\n\n function reset() {\n cache = cacheStream = null;\n return albersUsa;\n }\n\n return albersUsa.scale(1070);\n}\n","import {degrees, pi, radians} from \"../math.js\";\nimport {projectionMutator} from \"./index.js\";\n\nexport function conicProjection(projectAt) {\n var phi0 = 0,\n phi1 = pi / 3,\n m = projectionMutator(projectAt),\n p = m(phi0, phi1);\n\n p.parallels = function(_) {\n return arguments.length ? m(phi0 = _[0] * radians, phi1 = _[1] * radians) : [phi0 * degrees, phi1 * degrees];\n };\n\n return p;\n}\n","import {abs, asin, atan2, cos, epsilon, pi, sign, sin, sqrt} from \"../math.js\";\nimport {conicProjection} from \"./conic.js\";\nimport {cylindricalEqualAreaRaw} from \"./cylindricalEqualArea.js\";\n\nexport function conicEqualAreaRaw(y0, y1) {\n var sy0 = sin(y0), n = (sy0 + sin(y1)) / 2;\n\n // Are the parallels symmetrical around the Equator?\n if (abs(n) < epsilon) return cylindricalEqualAreaRaw(y0);\n\n var c = 1 + sy0 * (2 * n - sy0), r0 = sqrt(c) / n;\n\n function project(x, y) {\n var r = sqrt(c - 2 * n * sin(y)) / n;\n return [r * sin(x *= n), r0 - r * cos(x)];\n }\n\n project.invert = function(x, y) {\n var r0y = r0 - y,\n l = atan2(x, abs(r0y)) * sign(r0y);\n if (r0y * n < 0)\n l -= pi * sign(x) * sign(r0y);\n return [l / n, asin((c - (x * x + r0y * r0y) * n * n) / (2 * n))];\n };\n\n return project;\n}\n\nexport default function() {\n return conicProjection(conicEqualAreaRaw)\n .scale(155.424)\n .center([0, 33.6442]);\n}\n","import {asin, cos, sin} from \"../math.js\";\n\nexport function cylindricalEqualAreaRaw(phi0) {\n var cosPhi0 = cos(phi0);\n\n function forward(lambda, phi) {\n return [lambda * cosPhi0, sin(phi) / cosPhi0];\n }\n\n forward.invert = function(x, y) {\n return [x / cosPhi0, asin(y * cosPhi0)];\n };\n\n return forward;\n}\n","import projection from \"./index.js\";\nimport {abs, asin, cos, epsilon2, sin, sqrt} from \"../math.js\";\n\nvar A1 = 1.340264,\n A2 = -0.081106,\n A3 = 0.000893,\n A4 = 0.003796,\n M = sqrt(3) / 2,\n iterations = 12;\n\nexport function equalEarthRaw(lambda, phi) {\n var l = asin(M * sin(phi)), l2 = l * l, l6 = l2 * l2 * l2;\n return [\n lambda * cos(l) / (M * (A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2))),\n l * (A1 + A2 * l2 + l6 * (A3 + A4 * l2))\n ];\n}\n\nequalEarthRaw.invert = function(x, y) {\n var l = y, l2 = l * l, l6 = l2 * l2 * l2;\n for (var i = 0, delta, fy, fpy; i < iterations; ++i) {\n fy = l * (A1 + A2 * l2 + l6 * (A3 + A4 * l2)) - y;\n fpy = A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2);\n l -= delta = fy / fpy, l2 = l * l, l6 = l2 * l2 * l2;\n if (abs(delta) < epsilon2) break;\n }\n return [\n M * x * (A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2)) / cos(l),\n asin(sin(l) / M)\n ];\n};\n\nexport default function() {\n return projection(equalEarthRaw)\n .scale(177.158);\n}\n","import projection from \"./index.js\";\n\nexport function equirectangularRaw(lambda, phi) {\n return [lambda, phi];\n}\n\nequirectangularRaw.invert = equirectangularRaw;\n\nexport default function() {\n return projection(equirectangularRaw)\n .scale(152.63);\n}\n","import {default as geoStream} from \"../stream.js\";\nimport boundsStream from \"../path/bounds.js\";\n\nfunction fit(projection, fitBounds, object) {\n var clip = projection.clipExtent && projection.clipExtent();\n projection.scale(150).translate([0, 0]);\n if (clip != null) projection.clipExtent(null);\n geoStream(object, projection.stream(boundsStream));\n fitBounds(boundsStream.result());\n if (clip != null) projection.clipExtent(clip);\n return projection;\n}\n\nexport function fitExtent(projection, extent, object) {\n return fit(projection, function(b) {\n var w = extent[1][0] - extent[0][0],\n h = extent[1][1] - extent[0][1],\n k = Math.min(w / (b[1][0] - b[0][0]), h / (b[1][1] - b[0][1])),\n x = +extent[0][0] + (w - k * (b[1][0] + b[0][0])) / 2,\n y = +extent[0][1] + (h - k * (b[1][1] + b[0][1])) / 2;\n projection.scale(150 * k).translate([x, y]);\n }, object);\n}\n\nexport function fitSize(projection, size, object) {\n return fitExtent(projection, [[0, 0], size], object);\n}\n\nexport function fitWidth(projection, width, object) {\n return fit(projection, function(b) {\n var w = +width,\n k = w / (b[1][0] - b[0][0]),\n x = (w - k * (b[1][0] + b[0][0])) / 2,\n y = -k * b[0][1];\n projection.scale(150 * k).translate([x, y]);\n }, object);\n}\n\nexport function fitHeight(projection, height, object) {\n return fit(projection, function(b) {\n var h = +height,\n k = h / (b[1][1] - b[0][1]),\n x = -k * b[0][0],\n y = (h - k * (b[1][1] + b[0][1])) / 2;\n projection.scale(150 * k).translate([x, y]);\n }, object);\n}\n","import clipAntimeridian from \"../clip/antimeridian.js\";\nimport clipCircle from \"../clip/circle.js\";\nimport clipRectangle from \"../clip/rectangle.js\";\nimport compose from \"../compose.js\";\nimport identity from \"../identity.js\";\nimport {cos, degrees, radians, sin, sqrt} from \"../math.js\";\nimport {rotateRadians} from \"../rotation.js\";\nimport {transformer} from \"../transform.js\";\nimport {fitExtent, fitSize, fitWidth, fitHeight} from \"./fit.js\";\nimport resample from \"./resample.js\";\n\nvar transformRadians = transformer({\n point: function(x, y) {\n this.stream.point(x * radians, y * radians);\n }\n});\n\nfunction transformRotate(rotate) {\n return transformer({\n point: function(x, y) {\n var r = rotate(x, y);\n return this.stream.point(r[0], r[1]);\n }\n });\n}\n\nfunction scaleTranslate(k, dx, dy, sx, sy) {\n function transform(x, y) {\n x *= sx; y *= sy;\n return [dx + k * x, dy - k * y];\n }\n transform.invert = function(x, y) {\n return [(x - dx) / k * sx, (dy - y) / k * sy];\n };\n return transform;\n}\n\nfunction scaleTranslateRotate(k, dx, dy, sx, sy, alpha) {\n if (!alpha) return scaleTranslate(k, dx, dy, sx, sy);\n var cosAlpha = cos(alpha),\n sinAlpha = sin(alpha),\n a = cosAlpha * k,\n b = sinAlpha * k,\n ai = cosAlpha / k,\n bi = sinAlpha / k,\n ci = (sinAlpha * dy - cosAlpha * dx) / k,\n fi = (sinAlpha * dx + cosAlpha * dy) / k;\n function transform(x, y) {\n x *= sx; y *= sy;\n return [a * x - b * y + dx, dy - b * x - a * y];\n }\n transform.invert = function(x, y) {\n return [sx * (ai * x - bi * y + ci), sy * (fi - bi * x - ai * y)];\n };\n return transform;\n}\n\nexport default function projection(project) {\n return projectionMutator(function() { return project; })();\n}\n\nexport function projectionMutator(projectAt) {\n var project,\n k = 150, // scale\n x = 480, y = 250, // translate\n lambda = 0, phi = 0, // center\n deltaLambda = 0, deltaPhi = 0, deltaGamma = 0, rotate, // pre-rotate\n alpha = 0, // post-rotate angle\n sx = 1, // reflectX\n sy = 1, // reflectX\n theta = null, preclip = clipAntimeridian, // pre-clip angle\n x0 = null, y0, x1, y1, postclip = identity, // post-clip extent\n delta2 = 0.5, // precision\n projectResample,\n projectTransform,\n projectRotateTransform,\n cache,\n cacheStream;\n\n function projection(point) {\n return projectRotateTransform(point[0] * radians, point[1] * radians);\n }\n\n function invert(point) {\n point = projectRotateTransform.invert(point[0], point[1]);\n return point && [point[0] * degrees, point[1] * degrees];\n }\n\n projection.stream = function(stream) {\n return cache && cacheStream === stream ? cache : cache = transformRadians(transformRotate(rotate)(preclip(projectResample(postclip(cacheStream = stream)))));\n };\n\n projection.preclip = function(_) {\n return arguments.length ? (preclip = _, theta = undefined, reset()) : preclip;\n };\n\n projection.postclip = function(_) {\n return arguments.length ? (postclip = _, x0 = y0 = x1 = y1 = null, reset()) : postclip;\n };\n\n projection.clipAngle = function(_) {\n return arguments.length ? (preclip = +_ ? clipCircle(theta = _ * radians) : (theta = null, clipAntimeridian), reset()) : theta * degrees;\n };\n\n projection.clipExtent = function(_) {\n return arguments.length ? (postclip = _ == null ? (x0 = y0 = x1 = y1 = null, identity) : clipRectangle(x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1]), reset()) : x0 == null ? null : [[x0, y0], [x1, y1]];\n };\n\n projection.scale = function(_) {\n return arguments.length ? (k = +_, recenter()) : k;\n };\n\n projection.translate = function(_) {\n return arguments.length ? (x = +_[0], y = +_[1], recenter()) : [x, y];\n };\n\n projection.center = function(_) {\n return arguments.length ? (lambda = _[0] % 360 * radians, phi = _[1] % 360 * radians, recenter()) : [lambda * degrees, phi * degrees];\n };\n\n projection.rotate = function(_) {\n return arguments.length ? (deltaLambda = _[0] % 360 * radians, deltaPhi = _[1] % 360 * radians, deltaGamma = _.length > 2 ? _[2] % 360 * radians : 0, recenter()) : [deltaLambda * degrees, deltaPhi * degrees, deltaGamma * degrees];\n };\n\n projection.angle = function(_) {\n return arguments.length ? (alpha = _ % 360 * radians, recenter()) : alpha * degrees;\n };\n\n projection.reflectX = function(_) {\n return arguments.length ? (sx = _ ? -1 : 1, recenter()) : sx < 0;\n };\n\n projection.reflectY = function(_) {\n return arguments.length ? (sy = _ ? -1 : 1, recenter()) : sy < 0;\n };\n\n projection.precision = function(_) {\n return arguments.length ? (projectResample = resample(projectTransform, delta2 = _ * _), reset()) : sqrt(delta2);\n };\n\n projection.fitExtent = function(extent, object) {\n return fitExtent(projection, extent, object);\n };\n\n projection.fitSize = function(size, object) {\n return fitSize(projection, size, object);\n };\n\n projection.fitWidth = function(width, object) {\n return fitWidth(projection, width, object);\n };\n\n projection.fitHeight = function(height, object) {\n return fitHeight(projection, height, object);\n };\n\n function recenter() {\n var center = scaleTranslateRotate(k, 0, 0, sx, sy, alpha).apply(null, project(lambda, phi)),\n transform = scaleTranslateRotate(k, x - center[0], y - center[1], sx, sy, alpha);\n rotate = rotateRadians(deltaLambda, deltaPhi, deltaGamma);\n projectTransform = compose(project, transform);\n projectRotateTransform = compose(rotate, projectTransform);\n projectResample = resample(projectTransform, delta2);\n return reset();\n }\n\n function reset() {\n cache = cacheStream = null;\n return projection;\n }\n\n return function() {\n project = projectAt.apply(this, arguments);\n projection.invert = project.invert && invert;\n return recenter();\n };\n}\n","import {atan, exp, halfPi, log, pi, tan, tau} from \"../math.js\";\nimport rotation from \"../rotation.js\";\nimport projection from \"./index.js\";\n\nexport function mercatorRaw(lambda, phi) {\n return [lambda, log(tan((halfPi + phi) / 2))];\n}\n\nmercatorRaw.invert = function(x, y) {\n return [x, 2 * atan(exp(y)) - halfPi];\n};\n\nexport default function() {\n return mercatorProjection(mercatorRaw)\n .scale(961 / tau);\n}\n\nexport function mercatorProjection(project) {\n var m = projection(project),\n center = m.center,\n scale = m.scale,\n translate = m.translate,\n clipExtent = m.clipExtent,\n x0 = null, y0, x1, y1; // clip extent\n\n m.scale = function(_) {\n return arguments.length ? (scale(_), reclip()) : scale();\n };\n\n m.translate = function(_) {\n return arguments.length ? (translate(_), reclip()) : translate();\n };\n\n m.center = function(_) {\n return arguments.length ? (center(_), reclip()) : center();\n };\n\n m.clipExtent = function(_) {\n return arguments.length ? ((_ == null ? x0 = y0 = x1 = y1 = null : (x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1])), reclip()) : x0 == null ? null : [[x0, y0], [x1, y1]];\n };\n\n function reclip() {\n var k = pi * scale(),\n t = m(rotation(m.rotate()).invert([0, 0]));\n return clipExtent(x0 == null\n ? [[t[0] - k, t[1] - k], [t[0] + k, t[1] + k]] : project === mercatorRaw\n ? [[Math.max(t[0] - k, x0), y0], [Math.min(t[0] + k, x1), y1]]\n : [[x0, Math.max(t[1] - k, y0)], [x1, Math.min(t[1] + k, y1)]]);\n }\n\n return reclip();\n}\n","import projection from \"./index.js\";\nimport {abs, epsilon} from \"../math.js\";\n\nexport function naturalEarth1Raw(lambda, phi) {\n var phi2 = phi * phi, phi4 = phi2 * phi2;\n return [\n lambda * (0.8707 - 0.131979 * phi2 + phi4 * (-0.013791 + phi4 * (0.003971 * phi2 - 0.001529 * phi4))),\n phi * (1.007226 + phi2 * (0.015085 + phi4 * (-0.044475 + 0.028874 * phi2 - 0.005916 * phi4)))\n ];\n}\n\nnaturalEarth1Raw.invert = function(x, y) {\n var phi = y, i = 25, delta;\n do {\n var phi2 = phi * phi, phi4 = phi2 * phi2;\n phi -= delta = (phi * (1.007226 + phi2 * (0.015085 + phi4 * (-0.044475 + 0.028874 * phi2 - 0.005916 * phi4))) - y) /\n (1.007226 + phi2 * (0.015085 * 3 + phi4 * (-0.044475 * 7 + 0.028874 * 9 * phi2 - 0.005916 * 11 * phi4)));\n } while (abs(delta) > epsilon && --i > 0);\n return [\n x / (0.8707 + (phi2 = phi * phi) * (-0.131979 + phi2 * (-0.013791 + phi2 * phi2 * phi2 * (0.003971 - 0.001529 * phi2)))),\n phi\n ];\n};\n\nexport default function() {\n return projection(naturalEarth1Raw)\n .scale(175.295);\n}\n","import {asin, atan2, cos, sin, sqrt} from \"../math.js\";\n\nexport function azimuthalRaw(scale) {\n return function(x, y) {\n var cx = cos(x),\n cy = cos(y),\n k = scale(cx * cy);\n if (k === Infinity) return [2, 0];\n return [\n k * cy * sin(x),\n k * sin(y)\n ];\n }\n}\n\nexport function azimuthalInvert(angle) {\n return function(x, y) {\n var z = sqrt(x * x + y * y),\n c = angle(z),\n sc = sin(c),\n cc = cos(c);\n return [\n atan2(x * sc, z * cc),\n asin(z && y * sc / z)\n ];\n }\n}\n","import {asin, cos, epsilon, sin} from \"../math.js\";\nimport {azimuthalInvert} from \"./azimuthal.js\";\nimport projection from \"./index.js\";\n\nexport function orthographicRaw(x, y) {\n return [cos(y) * sin(x), sin(y)];\n}\n\northographicRaw.invert = azimuthalInvert(asin);\n\nexport default function() {\n return projection(orthographicRaw)\n .scale(249.5)\n .clipAngle(90 + epsilon);\n}\n","import {cartesian} from \"../cartesian.js\";\nimport {abs, asin, atan2, cos, epsilon, radians, sqrt} from \"../math.js\";\nimport {transformer} from \"../transform.js\";\n\nvar maxDepth = 16, // maximum depth of subdivision\n cosMinDistance = cos(30 * radians); // cos(minimum angular distance)\n\nexport default function(project, delta2) {\n return +delta2 ? resample(project, delta2) : resampleNone(project);\n}\n\nfunction resampleNone(project) {\n return transformer({\n point: function(x, y) {\n x = project(x, y);\n this.stream.point(x[0], x[1]);\n }\n });\n}\n\nfunction resample(project, delta2) {\n\n function resampleLineTo(x0, y0, lambda0, a0, b0, c0, x1, y1, lambda1, a1, b1, c1, depth, stream) {\n var dx = x1 - x0,\n dy = y1 - y0,\n d2 = dx * dx + dy * dy;\n if (d2 > 4 * delta2 && depth--) {\n var a = a0 + a1,\n b = b0 + b1,\n c = c0 + c1,\n m = sqrt(a * a + b * b + c * c),\n phi2 = asin(c /= m),\n lambda2 = abs(abs(c) - 1) < epsilon || abs(lambda0 - lambda1) < epsilon ? (lambda0 + lambda1) / 2 : atan2(b, a),\n p = project(lambda2, phi2),\n x2 = p[0],\n y2 = p[1],\n dx2 = x2 - x0,\n dy2 = y2 - y0,\n dz = dy * dx2 - dx * dy2;\n if (dz * dz / d2 > delta2 // perpendicular projected distance\n || abs((dx * dx2 + dy * dy2) / d2 - 0.5) > 0.3 // midpoint close to an end\n || a0 * a1 + b0 * b1 + c0 * c1 < cosMinDistance) { // angular distance\n resampleLineTo(x0, y0, lambda0, a0, b0, c0, x2, y2, lambda2, a /= m, b /= m, c, depth, stream);\n stream.point(x2, y2);\n resampleLineTo(x2, y2, lambda2, a, b, c, x1, y1, lambda1, a1, b1, c1, depth, stream);\n }\n }\n }\n return function(stream) {\n var lambda00, x00, y00, a00, b00, c00, // first point\n lambda0, x0, y0, a0, b0, c0; // previous point\n\n var resampleStream = {\n point: point,\n lineStart: lineStart,\n lineEnd: lineEnd,\n polygonStart: function() { stream.polygonStart(); resampleStream.lineStart = ringStart; },\n polygonEnd: function() { stream.polygonEnd(); resampleStream.lineStart = lineStart; }\n };\n\n function point(x, y) {\n x = project(x, y);\n stream.point(x[0], x[1]);\n }\n\n function lineStart() {\n x0 = NaN;\n resampleStream.point = linePoint;\n stream.lineStart();\n }\n\n function linePoint(lambda, phi) {\n var c = cartesian([lambda, phi]), p = project(lambda, phi);\n resampleLineTo(x0, y0, lambda0, a0, b0, c0, x0 = p[0], y0 = p[1], lambda0 = lambda, a0 = c[0], b0 = c[1], c0 = c[2], maxDepth, stream);\n stream.point(x0, y0);\n }\n\n function lineEnd() {\n resampleStream.point = point;\n stream.lineEnd();\n }\n\n function ringStart() {\n lineStart();\n resampleStream.point = ringPoint;\n resampleStream.lineEnd = ringEnd;\n }\n\n function ringPoint(lambda, phi) {\n linePoint(lambda00 = lambda, phi), x00 = x0, y00 = y0, a00 = a0, b00 = b0, c00 = c0;\n resampleStream.point = linePoint;\n }\n\n function ringEnd() {\n resampleLineTo(x0, y0, lambda0, a0, b0, c0, x00, y00, lambda00, a00, b00, c00, maxDepth, stream);\n resampleStream.lineEnd = lineEnd;\n lineEnd();\n }\n\n return resampleStream;\n };\n}\n","import compose from \"./compose.js\";\nimport {abs, asin, atan2, cos, degrees, pi, radians, sin, tau} from \"./math.js\";\n\nfunction rotationIdentity(lambda, phi) {\n if (abs(lambda) > pi) lambda -= Math.round(lambda / tau) * tau;\n return [lambda, phi];\n}\n\nrotationIdentity.invert = rotationIdentity;\n\nexport function rotateRadians(deltaLambda, deltaPhi, deltaGamma) {\n return (deltaLambda %= tau) ? (deltaPhi || deltaGamma ? compose(rotationLambda(deltaLambda), rotationPhiGamma(deltaPhi, deltaGamma))\n : rotationLambda(deltaLambda))\n : (deltaPhi || deltaGamma ? rotationPhiGamma(deltaPhi, deltaGamma)\n : rotationIdentity);\n}\n\nfunction forwardRotationLambda(deltaLambda) {\n return function(lambda, phi) {\n lambda += deltaLambda;\n if (abs(lambda) > pi) lambda -= Math.round(lambda / tau) * tau;\n return [lambda, phi];\n };\n}\n\nfunction rotationLambda(deltaLambda) {\n var rotation = forwardRotationLambda(deltaLambda);\n rotation.invert = forwardRotationLambda(-deltaLambda);\n return rotation;\n}\n\nfunction rotationPhiGamma(deltaPhi, deltaGamma) {\n var cosDeltaPhi = cos(deltaPhi),\n sinDeltaPhi = sin(deltaPhi),\n cosDeltaGamma = cos(deltaGamma),\n sinDeltaGamma = sin(deltaGamma);\n\n function rotation(lambda, phi) {\n var cosPhi = cos(phi),\n x = cos(lambda) * cosPhi,\n y = sin(lambda) * cosPhi,\n z = sin(phi),\n k = z * cosDeltaPhi + x * sinDeltaPhi;\n return [\n atan2(y * cosDeltaGamma - k * sinDeltaGamma, x * cosDeltaPhi - z * sinDeltaPhi),\n asin(k * cosDeltaGamma + y * sinDeltaGamma)\n ];\n }\n\n rotation.invert = function(lambda, phi) {\n var cosPhi = cos(phi),\n x = cos(lambda) * cosPhi,\n y = sin(lambda) * cosPhi,\n z = sin(phi),\n k = z * cosDeltaGamma - y * sinDeltaGamma;\n return [\n atan2(y * cosDeltaGamma + z * sinDeltaGamma, x * cosDeltaPhi + k * sinDeltaPhi),\n asin(k * cosDeltaPhi - x * sinDeltaPhi)\n ];\n };\n\n return rotation;\n}\n\nexport default function(rotate) {\n rotate = rotateRadians(rotate[0] * radians, rotate[1] * radians, rotate.length > 2 ? rotate[2] * radians : 0);\n\n function forward(coordinates) {\n coordinates = rotate(coordinates[0] * radians, coordinates[1] * radians);\n return coordinates[0] *= degrees, coordinates[1] *= degrees, coordinates;\n }\n\n forward.invert = function(coordinates) {\n coordinates = rotate.invert(coordinates[0] * radians, coordinates[1] * radians);\n return coordinates[0] *= degrees, coordinates[1] *= degrees, coordinates;\n };\n\n return forward;\n}\n","function streamGeometry(geometry, stream) {\n if (geometry && streamGeometryType.hasOwnProperty(geometry.type)) {\n streamGeometryType[geometry.type](geometry, stream);\n }\n}\n\nvar streamObjectType = {\n Feature: function(object, stream) {\n streamGeometry(object.geometry, stream);\n },\n FeatureCollection: function(object, stream) {\n var features = object.features, i = -1, n = features.length;\n while (++i < n) streamGeometry(features[i].geometry, stream);\n }\n};\n\nvar streamGeometryType = {\n Sphere: function(object, stream) {\n stream.sphere();\n },\n Point: function(object, stream) {\n object = object.coordinates;\n stream.point(object[0], object[1], object[2]);\n },\n MultiPoint: function(object, stream) {\n var coordinates = object.coordinates, i = -1, n = coordinates.length;\n while (++i < n) object = coordinates[i], stream.point(object[0], object[1], object[2]);\n },\n LineString: function(object, stream) {\n streamLine(object.coordinates, stream, 0);\n },\n MultiLineString: function(object, stream) {\n var coordinates = object.coordinates, i = -1, n = coordinates.length;\n while (++i < n) streamLine(coordinates[i], stream, 0);\n },\n Polygon: function(object, stream) {\n streamPolygon(object.coordinates, stream);\n },\n MultiPolygon: function(object, stream) {\n var coordinates = object.coordinates, i = -1, n = coordinates.length;\n while (++i < n) streamPolygon(coordinates[i], stream);\n },\n GeometryCollection: function(object, stream) {\n var geometries = object.geometries, i = -1, n = geometries.length;\n while (++i < n) streamGeometry(geometries[i], stream);\n }\n};\n\nfunction streamLine(coordinates, stream, closed) {\n var i = -1, n = coordinates.length - closed, coordinate;\n stream.lineStart();\n while (++i < n) coordinate = coordinates[i], stream.point(coordinate[0], coordinate[1], coordinate[2]);\n stream.lineEnd();\n}\n\nfunction streamPolygon(coordinates, stream) {\n var i = -1, n = coordinates.length;\n stream.polygonStart();\n while (++i < n) streamLine(coordinates[i], stream, 1);\n stream.polygonEnd();\n}\n\nexport default function(object, stream) {\n if (object && streamObjectType.hasOwnProperty(object.type)) {\n streamObjectType[object.type](object, stream);\n } else {\n streamGeometry(object, stream);\n }\n}\n","export default function(methods) {\n return {\n stream: transformer(methods)\n };\n}\n\nexport function transformer(methods) {\n return function(stream) {\n var s = new TransformStream;\n for (var key in methods) s[key] = methods[key];\n s.stream = stream;\n return s;\n };\n}\n\nfunction TransformStream() {}\n\nTransformStream.prototype = {\n constructor: TransformStream,\n point: function(x, y) { this.stream.point(x, y); },\n sphere: function() { this.stream.sphere(); },\n lineStart: function() { this.stream.lineStart(); },\n lineEnd: function() { this.stream.lineEnd(); },\n polygonStart: function() { this.stream.polygonStart(); },\n polygonEnd: function() { this.stream.polygonEnd(); }\n};\n","export function optional(f) {\n return f == null ? null : required(f);\n}\n\nexport function required(f) {\n if (typeof f !== \"function\") throw new Error;\n return f;\n}\n","export default function(x) {\n return typeof x === \"object\" && \"length\" in x\n ? x // Array, TypedArray, NodeList, array-like\n : Array.from(x); // Map, Set, iterable, string, or anything else\n}\n\nexport function shuffle(array, random) {\n let m = array.length,\n t,\n i;\n\n while (m) {\n i = random() * m-- | 0;\n t = array[m];\n array[m] = array[i];\n array[i] = t;\n }\n\n return array;\n}\n","export function constantZero() {\n return 0;\n}\n\nexport default function(x) {\n return function() {\n return x;\n };\n}\n","// https://en.wikipedia.org/wiki/Linear_congruential_generator#Parameters_in_common_use\nconst a = 1664525;\nconst c = 1013904223;\nconst m = 4294967296; // 2^32\n\nexport default function() {\n let s = 1;\n return () => (s = (a * s + c) % m) / m;\n}\n","import {shuffle} from \"../array.js\";\nimport lcg from \"../lcg.js\";\n\nexport default function(circles) {\n return packEncloseRandom(circles, lcg());\n}\n\nexport function packEncloseRandom(circles, random) {\n var i = 0, n = (circles = shuffle(Array.from(circles), random)).length, B = [], p, e;\n\n while (i < n) {\n p = circles[i];\n if (e && enclosesWeak(e, p)) ++i;\n else e = encloseBasis(B = extendBasis(B, p)), i = 0;\n }\n\n return e;\n}\n\nfunction extendBasis(B, p) {\n var i, j;\n\n if (enclosesWeakAll(p, B)) return [p];\n\n // If we get here then B must have at least one element.\n for (i = 0; i < B.length; ++i) {\n if (enclosesNot(p, B[i])\n && enclosesWeakAll(encloseBasis2(B[i], p), B)) {\n return [B[i], p];\n }\n }\n\n // If we get here then B must have at least two elements.\n for (i = 0; i < B.length - 1; ++i) {\n for (j = i + 1; j < B.length; ++j) {\n if (enclosesNot(encloseBasis2(B[i], B[j]), p)\n && enclosesNot(encloseBasis2(B[i], p), B[j])\n && enclosesNot(encloseBasis2(B[j], p), B[i])\n && enclosesWeakAll(encloseBasis3(B[i], B[j], p), B)) {\n return [B[i], B[j], p];\n }\n }\n }\n\n // If we get here then something is very wrong.\n throw new Error;\n}\n\nfunction enclosesNot(a, b) {\n var dr = a.r - b.r, dx = b.x - a.x, dy = b.y - a.y;\n return dr < 0 || dr * dr < dx * dx + dy * dy;\n}\n\nfunction enclosesWeak(a, b) {\n var dr = a.r - b.r + Math.max(a.r, b.r, 1) * 1e-9, dx = b.x - a.x, dy = b.y - a.y;\n return dr > 0 && dr * dr > dx * dx + dy * dy;\n}\n\nfunction enclosesWeakAll(a, B) {\n for (var i = 0; i < B.length; ++i) {\n if (!enclosesWeak(a, B[i])) {\n return false;\n }\n }\n return true;\n}\n\nfunction encloseBasis(B) {\n switch (B.length) {\n case 1: return encloseBasis1(B[0]);\n case 2: return encloseBasis2(B[0], B[1]);\n case 3: return encloseBasis3(B[0], B[1], B[2]);\n }\n}\n\nfunction encloseBasis1(a) {\n return {\n x: a.x,\n y: a.y,\n r: a.r\n };\n}\n\nfunction encloseBasis2(a, b) {\n var x1 = a.x, y1 = a.y, r1 = a.r,\n x2 = b.x, y2 = b.y, r2 = b.r,\n x21 = x2 - x1, y21 = y2 - y1, r21 = r2 - r1,\n l = Math.sqrt(x21 * x21 + y21 * y21);\n return {\n x: (x1 + x2 + x21 / l * r21) / 2,\n y: (y1 + y2 + y21 / l * r21) / 2,\n r: (l + r1 + r2) / 2\n };\n}\n\nfunction encloseBasis3(a, b, c) {\n var x1 = a.x, y1 = a.y, r1 = a.r,\n x2 = b.x, y2 = b.y, r2 = b.r,\n x3 = c.x, y3 = c.y, r3 = c.r,\n a2 = x1 - x2,\n a3 = x1 - x3,\n b2 = y1 - y2,\n b3 = y1 - y3,\n c2 = r2 - r1,\n c3 = r3 - r1,\n d1 = x1 * x1 + y1 * y1 - r1 * r1,\n d2 = d1 - x2 * x2 - y2 * y2 + r2 * r2,\n d3 = d1 - x3 * x3 - y3 * y3 + r3 * r3,\n ab = a3 * b2 - a2 * b3,\n xa = (b2 * d3 - b3 * d2) / (ab * 2) - x1,\n xb = (b3 * c2 - b2 * c3) / ab,\n ya = (a3 * d2 - a2 * d3) / (ab * 2) - y1,\n yb = (a2 * c3 - a3 * c2) / ab,\n A = xb * xb + yb * yb - 1,\n B = 2 * (r1 + xa * xb + ya * yb),\n C = xa * xa + ya * ya - r1 * r1,\n r = -(Math.abs(A) > 1e-6 ? (B + Math.sqrt(B * B - 4 * A * C)) / (2 * A) : C / B);\n return {\n x: x1 + xa + xb * r,\n y: y1 + ya + yb * r,\n r: r\n };\n}\n","import array from \"../array.js\";\nimport lcg from \"../lcg.js\";\nimport {packEncloseRandom} from \"./enclose.js\";\n\nfunction place(b, a, c) {\n var dx = b.x - a.x, x, a2,\n dy = b.y - a.y, y, b2,\n d2 = dx * dx + dy * dy;\n if (d2) {\n a2 = a.r + c.r, a2 *= a2;\n b2 = b.r + c.r, b2 *= b2;\n if (a2 > b2) {\n x = (d2 + b2 - a2) / (2 * d2);\n y = Math.sqrt(Math.max(0, b2 / d2 - x * x));\n c.x = b.x - x * dx - y * dy;\n c.y = b.y - x * dy + y * dx;\n } else {\n x = (d2 + a2 - b2) / (2 * d2);\n y = Math.sqrt(Math.max(0, a2 / d2 - x * x));\n c.x = a.x + x * dx - y * dy;\n c.y = a.y + x * dy + y * dx;\n }\n } else {\n c.x = a.x + c.r;\n c.y = a.y;\n }\n}\n\nfunction intersects(a, b) {\n var dr = a.r + b.r - 1e-6, dx = b.x - a.x, dy = b.y - a.y;\n return dr > 0 && dr * dr > dx * dx + dy * dy;\n}\n\nfunction score(node) {\n var a = node._,\n b = node.next._,\n ab = a.r + b.r,\n dx = (a.x * b.r + b.x * a.r) / ab,\n dy = (a.y * b.r + b.y * a.r) / ab;\n return dx * dx + dy * dy;\n}\n\nfunction Node(circle) {\n this._ = circle;\n this.next = null;\n this.previous = null;\n}\n\nexport function packSiblingsRandom(circles, random) {\n if (!(n = (circles = array(circles)).length)) return 0;\n\n var a, b, c, n, aa, ca, i, j, k, sj, sk;\n\n // Place the first circle.\n a = circles[0], a.x = 0, a.y = 0;\n if (!(n > 1)) return a.r;\n\n // Place the second circle.\n b = circles[1], a.x = -b.r, b.x = a.r, b.y = 0;\n if (!(n > 2)) return a.r + b.r;\n\n // Place the third circle.\n place(b, a, c = circles[2]);\n\n // Initialize the front-chain using the first three circles a, b and c.\n a = new Node(a), b = new Node(b), c = new Node(c);\n a.next = c.previous = b;\n b.next = a.previous = c;\n c.next = b.previous = a;\n\n // Attempt to place each remaining circle…\n pack: for (i = 3; i < n; ++i) {\n place(a._, b._, c = circles[i]), c = new Node(c);\n\n // Find the closest intersecting circle on the front-chain, if any.\n // “Closeness†is determined by linear distance along the front-chain.\n // “Ahead†or “behind†is likewise determined by linear distance.\n j = b.next, k = a.previous, sj = b._.r, sk = a._.r;\n do {\n if (sj <= sk) {\n if (intersects(j._, c._)) {\n b = j, a.next = b, b.previous = a, --i;\n continue pack;\n }\n sj += j._.r, j = j.next;\n } else {\n if (intersects(k._, c._)) {\n a = k, a.next = b, b.previous = a, --i;\n continue pack;\n }\n sk += k._.r, k = k.previous;\n }\n } while (j !== k.next);\n\n // Success! Insert the new circle c between a and b.\n c.previous = a, c.next = b, a.next = b.previous = b = c;\n\n // Compute the new closest circle pair to the centroid.\n aa = score(a);\n while ((c = c.next) !== b) {\n if ((ca = score(c)) < aa) {\n a = c, aa = ca;\n }\n }\n b = a.next;\n }\n\n // Compute the enclosing circle of the front chain.\n a = [b._], c = b; while ((c = c.next) !== b) a.push(c._); c = packEncloseRandom(a, random);\n\n // Translate the circles to put the enclosing circle around the origin.\n for (i = 0; i < n; ++i) a = circles[i], a.x -= c.x, a.y -= c.y;\n\n return c.r;\n}\n\nexport default function(circles) {\n packSiblingsRandom(circles, lcg());\n return circles;\n}\n","const pi = Math.PI,\n tau = 2 * pi,\n epsilon = 1e-6,\n tauEpsilon = tau - epsilon;\n\nfunction append(strings) {\n this._ += strings[0];\n for (let i = 1, n = strings.length; i < n; ++i) {\n this._ += arguments[i] + strings[i];\n }\n}\n\nfunction appendRound(digits) {\n let d = Math.floor(digits);\n if (!(d >= 0)) throw new Error(`invalid digits: ${digits}`);\n if (d > 15) return append;\n const k = 10 ** d;\n return function(strings) {\n this._ += strings[0];\n for (let i = 1, n = strings.length; i < n; ++i) {\n this._ += Math.round(arguments[i] * k) / k + strings[i];\n }\n };\n}\n\nexport class Path {\n constructor(digits) {\n this._x0 = this._y0 = // start of current subpath\n this._x1 = this._y1 = null; // end of current subpath\n this._ = \"\";\n this._append = digits == null ? append : appendRound(digits);\n }\n moveTo(x, y) {\n this._append`M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}`;\n }\n closePath() {\n if (this._x1 !== null) {\n this._x1 = this._x0, this._y1 = this._y0;\n this._append`Z`;\n }\n }\n lineTo(x, y) {\n this._append`L${this._x1 = +x},${this._y1 = +y}`;\n }\n quadraticCurveTo(x1, y1, x, y) {\n this._append`Q${+x1},${+y1},${this._x1 = +x},${this._y1 = +y}`;\n }\n bezierCurveTo(x1, y1, x2, y2, x, y) {\n this._append`C${+x1},${+y1},${+x2},${+y2},${this._x1 = +x},${this._y1 = +y}`;\n }\n arcTo(x1, y1, x2, y2, r) {\n x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r;\n\n // Is the radius negative? Error.\n if (r < 0) throw new Error(`negative radius: ${r}`);\n\n let x0 = this._x1,\n y0 = this._y1,\n x21 = x2 - x1,\n y21 = y2 - y1,\n x01 = x0 - x1,\n y01 = y0 - y1,\n l01_2 = x01 * x01 + y01 * y01;\n\n // Is this path empty? Move to (x1,y1).\n if (this._x1 === null) {\n this._append`M${this._x1 = x1},${this._y1 = y1}`;\n }\n\n // Or, is (x1,y1) coincident with (x0,y0)? Do nothing.\n else if (!(l01_2 > epsilon));\n\n // Or, are (x0,y0), (x1,y1) and (x2,y2) collinear?\n // Equivalently, is (x1,y1) coincident with (x2,y2)?\n // Or, is the radius zero? Line to (x1,y1).\n else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) {\n this._append`L${this._x1 = x1},${this._y1 = y1}`;\n }\n\n // Otherwise, draw an arc!\n else {\n let x20 = x2 - x0,\n y20 = y2 - y0,\n l21_2 = x21 * x21 + y21 * y21,\n l20_2 = x20 * x20 + y20 * y20,\n l21 = Math.sqrt(l21_2),\n l01 = Math.sqrt(l01_2),\n l = r * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2),\n t01 = l / l01,\n t21 = l / l21;\n\n // If the start tangent is not coincident with (x0,y0), line to.\n if (Math.abs(t01 - 1) > epsilon) {\n this._append`L${x1 + t01 * x01},${y1 + t01 * y01}`;\n }\n\n this._append`A${r},${r},0,0,${+(y01 * x20 > x01 * y20)},${this._x1 = x1 + t21 * x21},${this._y1 = y1 + t21 * y21}`;\n }\n }\n arc(x, y, r, a0, a1, ccw) {\n x = +x, y = +y, r = +r, ccw = !!ccw;\n\n // Is the radius negative? Error.\n if (r < 0) throw new Error(`negative radius: ${r}`);\n\n let dx = r * Math.cos(a0),\n dy = r * Math.sin(a0),\n x0 = x + dx,\n y0 = y + dy,\n cw = 1 ^ ccw,\n da = ccw ? a0 - a1 : a1 - a0;\n\n // Is this path empty? Move to (x0,y0).\n if (this._x1 === null) {\n this._append`M${x0},${y0}`;\n }\n\n // Or, is (x0,y0) not coincident with the previous point? Line to (x0,y0).\n else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) {\n this._append`L${x0},${y0}`;\n }\n\n // Is this arc empty? We’re done.\n if (!r) return;\n\n // Does the angle go the wrong way? Flip the direction.\n if (da < 0) da = da % tau + tau;\n\n // Is this a complete circle? Draw two arcs to complete the circle.\n if (da > tauEpsilon) {\n this._append`A${r},${r},0,1,${cw},${x - dx},${y - dy}A${r},${r},0,1,${cw},${this._x1 = x0},${this._y1 = y0}`;\n }\n\n // Is this arc non-empty? Draw an arc!\n else if (da > epsilon) {\n this._append`A${r},${r},0,${+(da >= pi)},${cw},${this._x1 = x + r * Math.cos(a1)},${this._y1 = y + r * Math.sin(a1)}`;\n }\n }\n rect(x, y, w, h) {\n this._append`M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}h${w = +w}v${+h}h${-w}Z`;\n }\n toString() {\n return this._;\n }\n}\n\nexport function path() {\n return new Path;\n}\n\n// Allow instanceof d3.path\npath.prototype = Path.prototype;\n\nexport function pathRound(digits = 3) {\n return new Path(+digits);\n}\n","import constant from \"./constant.js\";\nimport {abs, acos, asin, atan2, cos, epsilon, halfPi, max, min, pi, sin, sqrt, tau} from \"./math.js\";\nimport {withPath} from \"./path.js\";\n\nfunction arcInnerRadius(d) {\n return d.innerRadius;\n}\n\nfunction arcOuterRadius(d) {\n return d.outerRadius;\n}\n\nfunction arcStartAngle(d) {\n return d.startAngle;\n}\n\nfunction arcEndAngle(d) {\n return d.endAngle;\n}\n\nfunction arcPadAngle(d) {\n return d && d.padAngle; // Note: optional!\n}\n\nfunction intersect(x0, y0, x1, y1, x2, y2, x3, y3) {\n var x10 = x1 - x0, y10 = y1 - y0,\n x32 = x3 - x2, y32 = y3 - y2,\n t = y32 * x10 - x32 * y10;\n if (t * t < epsilon) return;\n t = (x32 * (y0 - y2) - y32 * (x0 - x2)) / t;\n return [x0 + t * x10, y0 + t * y10];\n}\n\n// Compute perpendicular offset line of length rc.\n// http://mathworld.wolfram.com/Circle-LineIntersection.html\nfunction cornerTangents(x0, y0, x1, y1, r1, rc, cw) {\n var x01 = x0 - x1,\n y01 = y0 - y1,\n lo = (cw ? rc : -rc) / sqrt(x01 * x01 + y01 * y01),\n ox = lo * y01,\n oy = -lo * x01,\n x11 = x0 + ox,\n y11 = y0 + oy,\n x10 = x1 + ox,\n y10 = y1 + oy,\n x00 = (x11 + x10) / 2,\n y00 = (y11 + y10) / 2,\n dx = x10 - x11,\n dy = y10 - y11,\n d2 = dx * dx + dy * dy,\n r = r1 - rc,\n D = x11 * y10 - x10 * y11,\n d = (dy < 0 ? -1 : 1) * sqrt(max(0, r * r * d2 - D * D)),\n cx0 = (D * dy - dx * d) / d2,\n cy0 = (-D * dx - dy * d) / d2,\n cx1 = (D * dy + dx * d) / d2,\n cy1 = (-D * dx + dy * d) / d2,\n dx0 = cx0 - x00,\n dy0 = cy0 - y00,\n dx1 = cx1 - x00,\n dy1 = cy1 - y00;\n\n // Pick the closer of the two intersection points.\n // TODO Is there a faster way to determine which intersection to use?\n if (dx0 * dx0 + dy0 * dy0 > dx1 * dx1 + dy1 * dy1) cx0 = cx1, cy0 = cy1;\n\n return {\n cx: cx0,\n cy: cy0,\n x01: -ox,\n y01: -oy,\n x11: cx0 * (r1 / r - 1),\n y11: cy0 * (r1 / r - 1)\n };\n}\n\nexport default function() {\n var innerRadius = arcInnerRadius,\n outerRadius = arcOuterRadius,\n cornerRadius = constant(0),\n padRadius = null,\n startAngle = arcStartAngle,\n endAngle = arcEndAngle,\n padAngle = arcPadAngle,\n context = null,\n path = withPath(arc);\n\n function arc() {\n var buffer,\n r,\n r0 = +innerRadius.apply(this, arguments),\n r1 = +outerRadius.apply(this, arguments),\n a0 = startAngle.apply(this, arguments) - halfPi,\n a1 = endAngle.apply(this, arguments) - halfPi,\n da = abs(a1 - a0),\n cw = a1 > a0;\n\n if (!context) context = buffer = path();\n\n // Ensure that the outer radius is always larger than the inner radius.\n if (r1 < r0) r = r1, r1 = r0, r0 = r;\n\n // Is it a point?\n if (!(r1 > epsilon)) context.moveTo(0, 0);\n\n // Or is it a circle or annulus?\n else if (da > tau - epsilon) {\n context.moveTo(r1 * cos(a0), r1 * sin(a0));\n context.arc(0, 0, r1, a0, a1, !cw);\n if (r0 > epsilon) {\n context.moveTo(r0 * cos(a1), r0 * sin(a1));\n context.arc(0, 0, r0, a1, a0, cw);\n }\n }\n\n // Or is it a circular or annular sector?\n else {\n var a01 = a0,\n a11 = a1,\n a00 = a0,\n a10 = a1,\n da0 = da,\n da1 = da,\n ap = padAngle.apply(this, arguments) / 2,\n rp = (ap > epsilon) && (padRadius ? +padRadius.apply(this, arguments) : sqrt(r0 * r0 + r1 * r1)),\n rc = min(abs(r1 - r0) / 2, +cornerRadius.apply(this, arguments)),\n rc0 = rc,\n rc1 = rc,\n t0,\n t1;\n\n // Apply padding? Note that since r1 ≥ r0, da1 ≥ da0.\n if (rp > epsilon) {\n var p0 = asin(rp / r0 * sin(ap)),\n p1 = asin(rp / r1 * sin(ap));\n if ((da0 -= p0 * 2) > epsilon) p0 *= (cw ? 1 : -1), a00 += p0, a10 -= p0;\n else da0 = 0, a00 = a10 = (a0 + a1) / 2;\n if ((da1 -= p1 * 2) > epsilon) p1 *= (cw ? 1 : -1), a01 += p1, a11 -= p1;\n else da1 = 0, a01 = a11 = (a0 + a1) / 2;\n }\n\n var x01 = r1 * cos(a01),\n y01 = r1 * sin(a01),\n x10 = r0 * cos(a10),\n y10 = r0 * sin(a10);\n\n // Apply rounded corners?\n if (rc > epsilon) {\n var x11 = r1 * cos(a11),\n y11 = r1 * sin(a11),\n x00 = r0 * cos(a00),\n y00 = r0 * sin(a00),\n oc;\n\n // Restrict the corner radius according to the sector angle. If this\n // intersection fails, it’s probably because the arc is too small, so\n // disable the corner radius entirely.\n if (da < pi) {\n if (oc = intersect(x01, y01, x00, y00, x11, y11, x10, y10)) {\n var ax = x01 - oc[0],\n ay = y01 - oc[1],\n bx = x11 - oc[0],\n by = y11 - oc[1],\n kc = 1 / sin(acos((ax * bx + ay * by) / (sqrt(ax * ax + ay * ay) * sqrt(bx * bx + by * by))) / 2),\n lc = sqrt(oc[0] * oc[0] + oc[1] * oc[1]);\n rc0 = min(rc, (r0 - lc) / (kc - 1));\n rc1 = min(rc, (r1 - lc) / (kc + 1));\n } else {\n rc0 = rc1 = 0;\n }\n }\n }\n\n // Is the sector collapsed to a line?\n if (!(da1 > epsilon)) context.moveTo(x01, y01);\n\n // Does the sector’s outer ring have rounded corners?\n else if (rc1 > epsilon) {\n t0 = cornerTangents(x00, y00, x01, y01, r1, rc1, cw);\n t1 = cornerTangents(x11, y11, x10, y10, r1, rc1, cw);\n\n context.moveTo(t0.cx + t0.x01, t0.cy + t0.y01);\n\n // Have the corners merged?\n if (rc1 < rc) context.arc(t0.cx, t0.cy, rc1, atan2(t0.y01, t0.x01), atan2(t1.y01, t1.x01), !cw);\n\n // Otherwise, draw the two corners and the ring.\n else {\n context.arc(t0.cx, t0.cy, rc1, atan2(t0.y01, t0.x01), atan2(t0.y11, t0.x11), !cw);\n context.arc(0, 0, r1, atan2(t0.cy + t0.y11, t0.cx + t0.x11), atan2(t1.cy + t1.y11, t1.cx + t1.x11), !cw);\n context.arc(t1.cx, t1.cy, rc1, atan2(t1.y11, t1.x11), atan2(t1.y01, t1.x01), !cw);\n }\n }\n\n // Or is the outer ring just a circular arc?\n else context.moveTo(x01, y01), context.arc(0, 0, r1, a01, a11, !cw);\n\n // Is there no inner ring, and it’s a circular sector?\n // Or perhaps it’s an annular sector collapsed due to padding?\n if (!(r0 > epsilon) || !(da0 > epsilon)) context.lineTo(x10, y10);\n\n // Does the sector’s inner ring (or point) have rounded corners?\n else if (rc0 > epsilon) {\n t0 = cornerTangents(x10, y10, x11, y11, r0, -rc0, cw);\n t1 = cornerTangents(x01, y01, x00, y00, r0, -rc0, cw);\n\n context.lineTo(t0.cx + t0.x01, t0.cy + t0.y01);\n\n // Have the corners merged?\n if (rc0 < rc) context.arc(t0.cx, t0.cy, rc0, atan2(t0.y01, t0.x01), atan2(t1.y01, t1.x01), !cw);\n\n // Otherwise, draw the two corners and the ring.\n else {\n context.arc(t0.cx, t0.cy, rc0, atan2(t0.y01, t0.x01), atan2(t0.y11, t0.x11), !cw);\n context.arc(0, 0, r0, atan2(t0.cy + t0.y11, t0.cx + t0.x11), atan2(t1.cy + t1.y11, t1.cx + t1.x11), cw);\n context.arc(t1.cx, t1.cy, rc0, atan2(t1.y11, t1.x11), atan2(t1.y01, t1.x01), !cw);\n }\n }\n\n // Or is the inner ring just a circular arc?\n else context.arc(0, 0, r0, a10, a00, cw);\n }\n\n context.closePath();\n\n if (buffer) return context = null, buffer + \"\" || null;\n }\n\n arc.centroid = function() {\n var r = (+innerRadius.apply(this, arguments) + +outerRadius.apply(this, arguments)) / 2,\n a = (+startAngle.apply(this, arguments) + +endAngle.apply(this, arguments)) / 2 - pi / 2;\n return [cos(a) * r, sin(a) * r];\n };\n\n arc.innerRadius = function(_) {\n return arguments.length ? (innerRadius = typeof _ === \"function\" ? _ : constant(+_), arc) : innerRadius;\n };\n\n arc.outerRadius = function(_) {\n return arguments.length ? (outerRadius = typeof _ === \"function\" ? _ : constant(+_), arc) : outerRadius;\n };\n\n arc.cornerRadius = function(_) {\n return arguments.length ? (cornerRadius = typeof _ === \"function\" ? _ : constant(+_), arc) : cornerRadius;\n };\n\n arc.padRadius = function(_) {\n return arguments.length ? (padRadius = _ == null ? null : typeof _ === \"function\" ? _ : constant(+_), arc) : padRadius;\n };\n\n arc.startAngle = function(_) {\n return arguments.length ? (startAngle = typeof _ === \"function\" ? _ : constant(+_), arc) : startAngle;\n };\n\n arc.endAngle = function(_) {\n return arguments.length ? (endAngle = typeof _ === \"function\" ? _ : constant(+_), arc) : endAngle;\n };\n\n arc.padAngle = function(_) {\n return arguments.length ? (padAngle = typeof _ === \"function\" ? _ : constant(+_), arc) : padAngle;\n };\n\n arc.context = function(_) {\n return arguments.length ? ((context = _ == null ? null : _), arc) : context;\n };\n\n return arc;\n}\n","export var slice = Array.prototype.slice;\n\nexport default function(x) {\n return typeof x === \"object\" && \"length\" in x\n ? x // Array, TypedArray, NodeList, array-like\n : Array.from(x); // Map, Set, iterable, string, or anything else\n}\n","export default function(x) {\n return function constant() {\n return x;\n };\n}\n","function Linear(context) {\n this._context = context;\n}\n\nLinear.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._point = 0;\n },\n lineEnd: function() {\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; // falls through\n default: this._context.lineTo(x, y); break;\n }\n }\n};\n\nexport default function(context) {\n return new Linear(context);\n}\n","import array from \"./array.js\";\nimport constant from \"./constant.js\";\nimport curveLinear from \"./curve/linear.js\";\nimport {withPath} from \"./path.js\";\nimport {x as pointX, y as pointY} from \"./point.js\";\n\nexport default function(x, y) {\n var defined = constant(true),\n context = null,\n curve = curveLinear,\n output = null,\n path = withPath(line);\n\n x = typeof x === \"function\" ? x : (x === undefined) ? pointX : constant(x);\n y = typeof y === \"function\" ? y : (y === undefined) ? pointY : constant(y);\n\n function line(data) {\n var i,\n n = (data = array(data)).length,\n d,\n defined0 = false,\n buffer;\n\n if (context == null) output = curve(buffer = path());\n\n for (i = 0; i <= n; ++i) {\n if (!(i < n && defined(d = data[i], i, data)) === defined0) {\n if (defined0 = !defined0) output.lineStart();\n else output.lineEnd();\n }\n if (defined0) output.point(+x(d, i, data), +y(d, i, data));\n }\n\n if (buffer) return output = null, buffer + \"\" || null;\n }\n\n line.x = function(_) {\n return arguments.length ? (x = typeof _ === \"function\" ? _ : constant(+_), line) : x;\n };\n\n line.y = function(_) {\n return arguments.length ? (y = typeof _ === \"function\" ? _ : constant(+_), line) : y;\n };\n\n line.defined = function(_) {\n return arguments.length ? (defined = typeof _ === \"function\" ? _ : constant(!!_), line) : defined;\n };\n\n line.curve = function(_) {\n return arguments.length ? (curve = _, context != null && (output = curve(context)), line) : curve;\n };\n\n line.context = function(_) {\n return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), line) : context;\n };\n\n return line;\n}\n","export const abs = Math.abs;\nexport const atan2 = Math.atan2;\nexport const cos = Math.cos;\nexport const max = Math.max;\nexport const min = Math.min;\nexport const sin = Math.sin;\nexport const sqrt = Math.sqrt;\n\nexport const epsilon = 1e-12;\nexport const pi = Math.PI;\nexport const halfPi = pi / 2;\nexport const tau = 2 * pi;\n\nexport function acos(x) {\n return x > 1 ? 0 : x < -1 ? pi : Math.acos(x);\n}\n\nexport function asin(x) {\n return x >= 1 ? halfPi : x <= -1 ? -halfPi : Math.asin(x);\n}\n","import {Path} from \"d3-path\";\n\nexport function withPath(shape) {\n let digits = 3;\n\n shape.digits = function(_) {\n if (!arguments.length) return digits;\n if (_ == null) {\n digits = null;\n } else {\n const d = Math.floor(_);\n if (!(d >= 0)) throw new RangeError(`invalid digits: ${_}`);\n digits = d;\n }\n return shape;\n };\n\n return () => new Path(digits);\n}\n","export function x(p) {\n return p[0];\n}\n\nexport function y(p) {\n return p[1];\n}\n"],"names":["defaultRadius","d","Math","sqrt","value","radius","dx","dy","padding","constant","pack","root","random","lcg","x","y","eachBefore","radiusLeaf","eachAfter","packChildrenRandom","translateChild","r","min","arguments","length","size","node","children","max","k","i","e","n","parent","ClusteredPointSeries","MapPointSeries","this","makeDataItem","_afterNew","fields","push","_setRawDefault","super","_updateChildren","isDirty","_spiral","chart","zoomLevel","get","_previousZL","clusterDelay","_clusterDP","dispose","setTimeout","_doTheCluster","clusteredDataItems","dataItem","bullet","longitude","latitude","_positionBulletReal","type","coordinates","groups","dataItems","groupId","_scatterIndex","_scatters","_clusterIndex","_clusters","setRaw","undefined","_key","group","_scatterGroup","_clusterGroup","bullets","sprite","set","zoomToCluster","rotate","zoomToDataItems","sort","a","b","pointA","pointB","hypot","cluster","_clusterDataItem","bulletMethod","sumX","sumY","len","clusteredDataItem","_root","bulletsContainer","_setDataItem","events","once","Container","walkChildren","child","Component","markDirtyValues","point","averageX","averageY","prevLen","geoPoint","invert","setAll","_positionBullets","Label","text","markDirtyText","_onDataClear","minDistance","di","diPoint","scatter","_scatterDataItem","previousCircles","s","spiralPoint","intersects","previousCircle","scatterDistance","className","graticuleX","y0","y1","range","concat","map","graticuleY","x0","x1","GraticuleSeries","MapLineSeries","_dataItem","_generate","on","graticule","X1","X0","Y1","Y0","X","Y","DX","DY","precision","lines","filter","outline","slice","reverse","extent","_","extentMajor","extentMinor","step","stepMajor","stepMinor","geoBounds","left","bottom","right","top","MapChart","SerialChart","geometries","_makeGeoPath","projection","path","context","projectionStream","contextStream","digits","pointRadius","object","apply","stream","result","area","measure","bounds","centroid","identity","floor","RangeError","setPrivateRaw","seriesContainer","toGlobal","width","height","geoCentroid","_geoCentroid","_geoBounds","_handleSetWheel","wheelX","wheelY","chartContainer","_wheelDp","event","wheelEasing","wheelSensitivity","wheelDuration","wheelEvent","originalEvent","prevent","_display","toLocal","deltaY","_handleWheelZoom","_handleWheelRotateY","_handleWheelRotateX","deltaX","preventDefault","_disposers","_prepareChildren","w","innerWidth","h","innerHeight","previousGeometries","_geometryColection","markDirtyProjection","_fitMap","scale","getPrivate","prev","_prevSettings","hw","hh","centerLocation","xy","translate","xx","yy","_dirtyGeometries","series","each","_geometries","_pw","_ph","fitSize","newScale","_centerLocation","_centerX","_centerY","geoPath","_mapBounds","previous","zoomControl","_disposeProperty","setPrivate","isType","minusButton","plusButton","_setUpTouch","prevGeoBounds","_prevGeoBounds","_dispatchBounds","_mapFitted","homeGeoPoint","goHome","duration","zoomToGeoPoint","_afterChanged","isEnabled","dispatch","target","cancelTouch","markDirtyGeometries","markDirty","_defaultThemes","MapChartDefaultTheme","_settings","themeTags","Rectangle","fill","Color","fillOpacity","_handleChartDown","_handleChartUp","_handleChartMove","license","match","_licenseApplied","_showBranding","_downZoomLevel","downPoints","_downPoints","count","downPoint","_downTranslateX","_downTranslateY","_downRotationX","_downRotationY","_downRotationZ","downId","_getDownPointId","movePoint","_movePoints","bg","enableType","_za","stop","_txa","_tya","_rxa","_rya","l0","l1","_pLon","abs","_pLat","ll","convert","rotationX","rotationY","rotation","_event","_handlePinch","movePoints","display","downPoint0","downPoint1","movePoint0","movePoint1","initialDistance","level","moveCenter","downCenter","tx","ty","_getDownPoint","downPointId","pointerId","panX","panY","local","disableType","maxPanOut","ww","cx","cy","downLocation","location","delta","easing","animate","key","to","newZoomLevel","zoomToPoint","zoomToGeoBounds","mapBounds","p0","p1","zl","center","readerAlert","_t","locale","zoomIn","zoomOut","_clearDirty","getArea","geometry","setupDefaultRules","ic","interfaceColors","rule","bind","pinchZoom","zoomStep","rotationZ","maxZoomLevel","minZoomLevel","animationEasing","centerMapOnZoomOut","role","affectsBounds","clipFront","clipBack","autoScale","scatterRadius","stopClusterZoom","isMeasured","position","strokeWidth","strokeOpacity","visible","MapLine","Graphics","_beforeChanged","_projectionDirty","clipAngle","_clear","segments","segment","gp0","lineTo","p","gp","pn","_getTooltipPoint","tooltipX","tooltipY","Percent","positionToGeoPoint","lineType","distanceAB","totalDistance","currentDistance","positionA","positionB","positionAB","cy0","sy0","cy1","sy1","kx0","ky0","kx1","ky1","interpolate","t","B","A","z","distance","addDisposer","mapLines","template","makeMapLine","mapLine","make","processDataItem","_handlePointsToConnect","_addGeometry","pointsToConnect","coords","disposeDataItem","removeValue","_excludeDataItem","_unexcludeDataItem","_notIncludeDataItem","_unNotIncludeDataItem","_makeBullets","bulletFunction","_setBulletParent","_makeBullet","moveValue","_positionBullet","lineDataItem","fixed","line","lineId","lineDI","getDataItemById","_lineChangedDp","polygonDataItem","polygon","polygonId","polygonDI","positionOnLine","angle","visualCentroid","geoPoint0","geoPoint1","point0","point1","index","_index","zoomToDataItem","MapPolygon","isHover","showTooltip","biggestArea","MapPolygonSeries","mapPolygons","makeMapPolygon","mapPolygon","_removeGeometry","rx","ry","getPolygonByPoint","found","displayObject","_renderer","getObjectAtPoint","getPolygonByGeoPoint","MapSeries","geoJSON","data","clear","_handleDirties","_geoJSONparsed","_parseGeoJSON","_valuesDirty","exclude","id","_excluded","include","indexOf","_notIncluded","checkInclude","includes","excludes","features","console","log","geodataNames","idField","feature","properties","name","_types","dataObject","dataContext","geometryType","madeFromGeoData","_placeBulletsContainer","_chart","_removeBulletsContainer","_dispose","_markDirtyKey","getGeoCircle","getGeoCentroid","getGeoArea","getGeoBounds","getGeoRectangle","north","east","south","west","multiPolygon","stepLong","ceil","stepLat","ln","surface","lt","normalizeGeoPoint","wrapAngleTo180","asin","sin","latitude180","ZoomableContainer","draggable","background","contents","_handleThisDown","_handleThisUp","_handleThisMove","adapters","add","Number","_animateTo","_downScale","_downX","_downY","_isDragging","ZoomTools","Button","verticalLayout","addTag","icon","layout","homeButton","_targetDisposer","_disposer","ZoomControl","isPrivateDirty","classNames","AxisRendererCircular","labels","axisFills","_changed","updateLayout","processAxis","axis","labelsContainer","ir","startAngle","endAngle","positionToPoint","moveTo","arc","markDirtySize","updateGrid","grid","endPosition","innerRadius","positionToAngle","toggleVisibility","start","end","_handleOpposite","updateLabel","label","fillDrawMethod","_fillGenerator","outerRadius","updateTick","tick","updateBullet","updateFill","fitAngle","_setSoft","minAngle","maxAngle","axisLength","PI","positionTooltip","tooltip","_positionTooltip","updateTooltipBounds","_tooltip","AxisRendererRadial","axisAngle","positionToCoordinate","_inversed","_end","_axisLength","_start","RadarDefaultTheme","Theme","clustered","connectEnds","tension","minGridDistance","inversed","cellStartLocation","cellEndLocation","textType","paddingTop","paddingRight","paddingBottom","paddingLeft","centerX","centerY","populateText","textAlign","topWidth","bottomWidth","pinRadius","RadarChart","XYChart","plotContainer","radarContainer","gridContainer","topGridContainer","pushAll","_updateRadius","_maskGrid","_sizeDirty","wr","hr","innerBounds","mr","_maxRadius","_addCursor","cursor","xAxes","yAxes","_updateMask","remove","container","mask","_arcGenerator","inPlot","atan2","inArc","_tooltipToLocal","BaseColumnSeries","XYSeries","_makeGraphics","listTemplate","makeColumn","_makeFieldNames","xAxis","yAxis","categoryAxis","valueAxis","_xOpenField","_xField","_yOpenField","_yField","startIndex","endIndex","inited","_createGraphics","baseAxis","columnsTemplate","columns","clusterCount","stacked","xRenderer","yRenderer","cellLocationX0","cellLocationX1","cellLocationY0","cellLocationY1","_aLocationX0","_aLocationX1","_aLocationY0","_aLocationY1","_axesDirty","_stackDirty","_toggleColumn","j","_updateGraphics","_skipped","updateLegendMarker","graphics","legendDataItem","markerRectangle","ds","states","lookup","setting","graphicsArray","axisRanges","axisRange","rangeGraphics","createAxisRange","axisDataItem","previousDataItem","xField","yField","valueX","valueY","xOpenField","yOpenField","locationX","locationY","openLocationX","openLocationY","xStart","xEnd","yStart","yEnd","l","vcy","vcx","fitW","fitH","startLocation","endLocation","offset","getDataItemPositionX","getDataItemPositionY","stackToItemY","component","basePosition","stackToItemX","_updateSeriesGraphics","_applyGraphicsStates","maxWidth","maxHeight","ptl","getPoint","pbr","tooltipPoint","_x","_y","_handleDataSetChange","_dataItems","dropFromOpen","riseFromOpen","dropFromPrevious","riseFromPrevious","open","close","previousClose","list","hideDataItem","promises","hide","Promise","all","showDataItem","show","lastDataItem","column","_getTooltipTarget","RadarColumnSeries","List","Template","Slice","mainContainer","positionX","positionY","rendererY","rendererX","axisInnerRadius","axisStartAngle","axisEndAngle","_shouldInclude","_shouldShowBullet","_positionY","_showBullets","_handleMaskBullets","_processAxisRange","RadarLineSeries","_endLine","points","firstPoint","XYChartDefaultTheme","language","colors","ColorSet","wheelStep","arrangeTooltips","pinchZoomX","pinchZoomY","legendLabelText","saturation","cornerRadiusTR","cornerRadiusTL","cornerRadiusBR","cornerRadiusBL","focusable","create","inside","opacity","minPosition","maxPosition","fontSize","behavior","layer","exportable","snapToSeriesBy","moveThreshold","forceInactive","strokeDasharray","ariaLabel","minZoomCount","maxZoomCount","Infinity","maxZoomFactor","maxDeviation","snapTooltip","tooltipLocation","zoomX","zoomY","fixAxisSize","multiLocation","crisp","opposite","cursorOverStyle","fillRule","axisFill","gridIntervals","timeUnit","dateFormats","periodChangeDateFormats","tooltipDateFormats","markUnitChange","strictMinMax","groupData","groupCount","groupIntervals","endValue","intervalDuration","baseInterval","gridInterval","Date","firstDayOfWeek","utc","timezone","getTime","val","round","baseValue","logarithmic","autoZoom","baseUnit","maskBullets","stackToNegative","openValueXGrouped","openValueYGrouped","valueXGrouped","valueYGrouped","seriesTooltipTarget","adjustBulletPosition","connect","autoGapCount","draw","lowValueXGrouped","lowValueYGrouped","highValueXGrouped","highValueYGrouped","interactive","horizontalLayout","yAxesAndPlotContainer","maskContent","plotsContainer","topPlotContainer","zoomOutButton","_processAxis","bottomAxesContainer","leftAxesContainer","_handlePlotDown","_handlePlotUp","_handlePlotMove","_removeSeries","_unstack","_posXDp","_posYDp","markDirtyExtremes","snapToSeries","handleWheel","plotPoint","shiftY","shiftX","wheelZoomPositionX","wheelZoomPositionY","fixPosition","newStart","newEnd","_handleWheelAnimation","zoom","_getWheelSign","se","_fixWheel","sign","diff","button","getIndex","_downStartX","_downEndX","_downStartY","_downEndY","_downPoint","clientX","clientY","_panStart","_panEnd","eventType","animation","_dispatchWheelAnimation","_isPanning","documentPointToRoot","scrollbarX","panStart","panEnd","scrollbarY","downStartX","downEndX","downPos0","downPos1","movePos0","movePos1","sa","ea","downStartY","downEndY","_handleCursorPosition","cursorPoint","isHidden","isHiding","tooltipDataItem","closestItem","showDataItemTooltip","handleMove","_updateCursor","updateCursor","_colorize","_setChart","_pushPropertyDisposer","_handleCursorSelectEnd","topAxesContainer","_handleScrollbar","grip","_handleAxisSelection","getTooltipText","rightAxesContainer","_handleZoomOut","_processSeries","_fixPosition","_markDirtyAxes","_seriesAdded","colorSet","color","next","patternSet","pattern","downPositionX","downPositionY","position0","toAxisPosition","position1","axes","priority","axisStart","axisEnd","zoomAnimation","updateScrollbar","onAll","change","oldValues","_removeAxis","newValue","processChart","setIndex","insertIndex","oldValue","Error","newIndex","isDisposed","axisParent","gridParent","topGridParent","_updateChartLayout","force","updateGrips","otherCharts","_otherCharts","global","chartPlotContainer","documentPoint","rootPointToDocument","chartRoot","tooltipContainer","plotT","plotB","tooltips","closest","closestPoint","sum","_movePoint","maxTooltipDistance","maxTooltipDistanceBy","tooltipSeries","hidden","prevY","_fy","prevBottom","Axis","axisHeader","renderer","ghostLabel","makeLabel","disable","tooltipText","tooltipHTML","_updateFinals","sAnimation","_sAnimation","eAnimation","_eAnimation","maxZoomFactorReal","minZoomFactor","playing","_series","_createAssets","_rangesDirty","_prepareDataItem","above","markDirtySelectionExtremes","_calculateTotals","_updateAxisRanges","_bullets","_seriesAxisRanges","_updateLC","rendererTags","toLowerCase","_applyThemes","_updateTooltipBounds","_updateBounds","axisHeadersContainer","onPrivate","_toggleFHDataItem","forceHidden","fh","_toggleDataItem","v","tags","minor","m","makeGrid","makeTick","ticks","makeAxisFill","_processBullet","axisBullet","_updatePositions","_updateGhost","getCellWidthPosition","localBounds","gWidth","_getText","_cursorPosition","_snapToSeries","updateTooltip","getSeriesItem","updateLegendValue","roundAxisPosition","_updateTooltipText","_location","handleCursorShow","handleCursorHide","processSeriesDataItem","_fields","coordinateToPosition","coordinate","toGlobalPosition","shouldGap","_nextItem","_autoGapCount","_fieldName","_groupSeriesData","RadialText","Text","makeRadialText","textStyle","markDirtyBounds","orientation","kerning","RadialLabel","_textKeys","_makeText","_text","baseRadius","radiusPrivate","innerRadiusPrivate","labelAngle","cos","_flipped","_dirty","markDirtyPosition","_updatePosition","AxisLabelRadial","segmentedLine","firstGroup","g","Line","Tick","AxisTick","Grid","AxisLabel","AxisRenderer","_new","gridCount","thumb","_handleThumbDown","_handleThumbUp","_handleThumbMove","pan","_thumbDownPoint","_downStart","_downEnd","downStart","downEnd","extra","_getPan","_point1","_point2","_updateSize","AxisRendererX","gridTemplate","axisChildren","removeTag","_markDirtyRedraw","point2","_ls","_lc","bulletPosition","previousBullet","previousSprite","num","pointerOrientation","oldBounds","AxisRendererY","CategoryAxis","_itemMap","_handleRangeChange","_prepareAxisItems","startCategory","endCategory","openKey","otherAxis","startDataItem","endDataItem","hasValue","__valueXShowFields","__valueYShowFields","minorLabelsEnabled","minorGridEnabled","maxCount","frequency","_frequency","f","fillIndex","categoryLocation","endCategoryLocation","categoryToIndex","indexToPosition","fillEndIndex","fillEndPosition","getX","NaN","getY","field","cellLocation","_axisLocation","category","getDataItemCoordinateX","getDataItemCoordinateY","dataItemToPosition","axisPositionToIndex","_adjustPosition","fieldName","seriesDataItem","zoomToIndexes","zoomToCategories","nextPosition","ValueAxis","_dirtyExtremes","_dirtySelectionExtremes","syncWithAxis","_syncDp","someDirty","_getMinMax","_handleSizeDirty","getMM","letter","_getSelectionMinMax","_groupData","_baseValue","_dseHandled","_formatText","numberFormat","formatter","getNumberFormatter","format","selectionMin","selectionMax","differencePower","minLog","_minLogAdjusted","_minRealLog","pow","LOG10E","stepPower","stepAdjusted","minorGridCount","minorStep","nextValue","minorValue","_adjustMinMax","minorDataItem","minorDataItems","minorLabel","decCount","valueToPosition","labelEndPosition","labelEndValue","hasTag","positionToValue","minMaxStep","stepDecimalPlaces","E","treatZeroAs","valueToFinalPosition","_cellLocation","axisLocation","getStackedXValueWorking","getStackedYValueWorking","cellEndValue","fixSmallStep","_fixMin","_fixMax","vc","fieldWorking","total","minDefined","maxDefined","extraMin","extraMax","selectionStrictMinMax","seriesMin","seriesMax","outOfSelection","minX","maxX","minY","maxY","isShowing","_minReal","_maxReal","smin","_deltaMinMax","minMaxStep2","selectionMinReal","selectionMaxReal","_syncAxes","LN10","minDiff","initialMin","initialMax","minAdapted","fold","maxAdapted","_getDelta","strictMinMaxSelection","strict","_fixZoomFactor","_saveMinMax","animatePrivate","exponent","power","_min","_max","strictMode","difference","stepDivisor","maxPrecision","ceiledStep","MAX_VALUE","minCount","extraDecimals","decimals","oldDiff","zoomToValues","syncMin","syncMax","syncStep","currentCount","synced","c","omin","omax","ostep","_checkSync","defined","curve","output","buffer","array","defined0","x0z","Array","y0z","areaStart","lineStart","lineEnd","areaEnd","arealine","lineX0","lineY0","lineY1","lineX1","LineSeries","strokes","fills","makeStroke","stroke","makeFill","_strokeTemplate","_fillTemplate","legendStroke","_legendStroke","legendFill","_legendFill","fillPattern","curveFactory","_strokeGenerator","strokeTemplateField","fillTemplateField","strokeTemplateFound","fillTemplateFound","hasValues","_valueFields","_endIndex","_clearGraphics","_sindex","_dindex","_startSegment","dataItemIndex","currentEndIndex","fillTemplate","originalTemplate","strokeTemplate","xOpenFieldValue","yOpenFieldValue","basePosX","basePosY","baseField","fillVisible","getOpen","o","rangeStrokeTemplate","rangeFillTemplate","_getPoints","nextItem","_drawStroke","_drawFill","itemLocationX","itemLocationY","xPos","yPos","iPoint","xPos0","yPos0","closeIPoint","p2","p3","_previousPoint","pp0","pp1","pp2","pp3","_points","_firstPoint","createLegendMarker","marker","disabledColor","legend","MonotoneXTension","constructor","_context","_tension","_line","_x0","_x1","_y0","_y1","_t0","_point","slope2","closePath","t1","slope3","curveMonotoneXTension","that","x2","y2","h0","h1","s0","s1","t0","bezierCurveTo","SmoothedXLineSeries","_setDefault","valueFields","_removeAxisRange","_updateFields","_valueXFields","_valueYFields","_valueXShowFields","_valueYShowFields","valueXFields","split","valueYFields","_shouldMakeBullet","minBulletDistance","xName","xCapName","yName","yCapName","xLetter","yLetter","low","high","_xLowField","_xHighField","_yLowField","_yHighField","_fixVC","hiddenState","sequencedInterpolation","tooltipFieldX","tooltipFieldY","_tooltipFieldX","_tooltipFieldY","_dataProcessed","_stack","getStackedXValue","getStackedYValue","_seriesValuesDirty","_markStakedDirtyStack","_dataGrouped","_psi","_pei","_selectionProcessed","processYSelectionDataItem","processXSelectionDataItem","selectionMinY","selectionMaxY","selectionMinX","selectionMaxX","_makeRangeMask","mainContainerMask","_mainContainerMask","seriesIndex","_couldStackTo","_stackDataItems","_reallyStackedTo","_stackedSeries","uid","stackToItemKey","stackToSeries","stackToItem","stackValue","stackedToSeries","_markDataSetDirty","_afterDataChange","_aggregatesCalculated","realField","previousBounds","yo","xo","_positionX","setDataSet","_dataSets","_dataSetId","resetGrouping","dataSet","_mainDataItems","mainDataItems","then","_isShowing","_sequencedShowHide","_isHiding","waitForStop","_markDirtyStack","stackedSeries","hideTooltip","txt","_emptyDataItem","valueLabel","_getItemReaderLabel","_position","resetExtremes","_adjustStartIndex","baseDuration","minSelection","dl","registry","addLicense","licenses","rAF","fps","callback","requestAnimationFrame","Root","settings","isReal","resolution","dom","accessible","_a11yD","useSafeResolution","HTMLElement","document","getElementById","inner","createElement","style","appendChild","tooltipContainerBounds","_tooltipContainerSettings","_inner","_updateComputedStyles","static","_init","moveDOM","childNodes","_initResizeSensor","resize","_handleLogo","_logo","offsetWidth","offsetHeight","logo","interactiveChildren","setStateOnChildren","window","svgPath","_getRealSize","getBoundingClientRect","_getCalculatedSize","rect","calculateSize","setAttribute","tabindex","realWidth","realHeight","rootContainer","_rootContainer","view","htmlElementContainer","_htmlElementContainer","pointerEvents","overflow","readerAlertElement","clip","_readerAlertElement","focusElementContainer","_focusElementContainer","tooltipElementContainer","_tooltipElementContainer","ev","eventKey","_isShift","shiftKey","focusedSprite","_focusedSprite","announceText","downEvent","getEvent","MouseEvent","simulated","dragOffsetX","dragOffsetY","isDragging","_keyboardDragPoint","dragPoint","moveEvent","upEvent","items","_tabindexes","item","isVisibleDeep","lastIndex","_focusNext","_startTicker","setThemes","_addTooltip","_hasLicense","_resizeSensorDisposer","autoResize","_render","render","_focusElementDirty","_updateCurrentFocus","_runTickers","currentTime","_tickers","_runAnimations","running","_animations","state","_runAnimation","_isDirtyAnimation","_runDirties","allParents","_isDirtyParents","_dirtyParents","forEach","objects","entity","_isDirty","depths","_dirtyBounds","depth","_positionHTMLElements","dirtyPositions","_dirtyPositions","_renderFrame","_updateTick","timestamp","_checkComputedStyles","animationDone","resetImageArray","_runTicker","now","animationTime","_ticker","_paused","_runTickerNow","timeout","endTime","performance","_addDirtyEntity","_addDirtyParent","_addDirtyBounds","_addDirtyPosition","_addAnimation","_markDirty","eachFrame","markDirtyGlobal","_isDisposed","innerHTML","themes","tooltipContainerSettings","layerMargin","_registerTabindexOrder","_invalidateTabindexes","_unregisterTabindexOrder","aindex","bindex","_moveFocusElement","_makeFocusElement","_decorateFocusElement","_positionFocusElement","focusElement","removeAttribute","ariaLive","ariaChecked","ariaCurrent","ariaSelected","ariaOrientation","ariaValueNow","ariaValueMin","ariaValueMax","ariaValueText","ariaControls","getAttribute","tabIndex","disposers","_handleFocus","_handleBlur","_removeFocusElement","removeChild","_hideFocusElement","insertBefore","append","globalBounds","focusPadding","_getSpriteByFocusElement","focused","el","direction","focusableElements","from","querySelectorAll","join","targetElement","focus","tooltipElement","_makeTooltipElement","removePrivate","_removeTooltipElement","parentElement","_invalidateAccessibility","scaleWidth","scaleHeight","disposer","styles","getComputedStyle","fontHash","changed","_fontHash","_invalidateLabelBounds","debugGhostView","tapToActivate","tapToActivateTimeout","_makeHTMLElement","htmlElement","boxSizing","_positionHTMLElement","_htmlEnabledContainers","visualSettings","strtingSettings","compositeScale","compositeRotation","transform","transformOrigin","compositeOpacity","pos","bbox","lw","lh","lr","lb","_localBounds","_adjustedLocalBounds","newBounds","getAdjustedBounds","minWidth","minHeight","originX","percent","originY","_setHTMLContent","html","_removeHTMLContent","_lookupRules","themeClass","_rules","ruleRaw","rules","order","splice","Bullet","_afterNewApplyThemes","Circle","drawCircle","ListData","incrementRef","decrementRef","_onPush","processor","processRow","_onInsertIndex","_onSetIndex","DataItem","_checkDirty","_startAnimation","_animationTime","_data","_markDirtyGroup","_dataChanged","_makeDataItem","oldIndex","_valueFieldsF","fieldKey","workingKey","_fieldsF","pushDataItem","_duration","Children","_container","_events","_onRemoved","_onInserted","_setParent","childrenDisplay","_childrenDisplay","addChild","addChildAt","_disposed","values","Sprite","makeContainer","allChildren","_prevWidth","_prevHeight","contentMask","_contentMask","_percentageSizeChildren","_percentagePositionChildren","updateBackground","verticalScrollbar","_contentHeight","eachChildren","_applyState","_applyStateAnimated","applyAnimate","_getBounds","_contentWidth","pWidth","pHeight","horizontal","vertical","HorizontalLayout","GridLayout","VerticalLayout","childBounds","adjustedLocalBounds","childX","childY","cl","cr","ct","cb","updateContainer","_handleStates","_updateHTMLContent","scrollToChild","ch","contentH","startGrip","endGrip","_vsbd0","_vsbd1","markDirtyLayer","_processTemplateField","updated","Pattern","Entity","makeGraphics","_pattern","_draw","_checkDirtyFill","repetition","backgroundDisplay","_backgroundDisplay","beginFill","drawRect","endFill","createPattern","PicturePattern","_load","canvas","colorOpacity","alpha","image","_image","patternWidth","patternHeight","fit","src","Image","decode","catch","_error","gradient","gradientTarget","setLineDash","strokeDashoffset","setLineDashOffset","blendMode","fillGradient","strokeGradient","strokePattern","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","shadowOpacity","shadow","stops","colorInherited","opacityInherited","getFill","lineJoin","lineCap","lineStyle","endStroke","availableWidth","minCellWidth","maxCellWidth","childWidth","columnCount","columnWidths","getColumnWidths","maxColumnHeight","prevX","isVisible","marginTop","marginBottom","marginLeft","marginRight","totalWidth","totalPercent","privateWidth","property","propValue","_setMaxDimentions","_maybeUpdateHTMLColor","textVisible","toCSSHex","getText","getAccessibleText","_getAccessibleText","eachReverse","Layout","RoundedRectangle","wSign","hSign","minSide","crtl","crtr","crbr","crbl","maxcr","arcTo","Chart","reset","patterns","Series","_handleBullets","_makeBulletReal","addBullet","_selectionAggregatesCalculated","baseValueSeries","_calculateAggregates","absSum","average","changePercent","changePrevious","changePreviousPercent","changeSelection","changeSelectionPercent","adjustedStartIndex","_getBase","minValue","dataField","maxValue","_entities","neutral","defaultState","customFunction","call","propertyValue","_hideBullets","_bullet","realDuration","delay","_onHide","getTooltip","hoverDataItem","unhoverDataItem","ix","iy","generator","_generator","cornerRadius","middleAngle","shiftRadius","Scrollbar","_makeThumb","_makeButton","_addOrientationClass","_handleAnimation","_thumbBusy","newMiddle","newCoordinate","_startDown","_gripDown","_endDown","_thumbDown","_released","_updateThumb","_updateGripsByThumb","_value","valueFunction","fromValue","toValue","thumbSize","Slider","SpriteEventDispatcher","_sprite","_makePointerEvent","native","_onRenderer","_rendererDisposers","increment","_on","shouldClone","info","rendererEvent","RENDERER_EVENTS","stopParentDispatch","_dispatchParents","dispatchParents","old","_hasDown","_hasMoved","removeHovering","markDirtyKey","_addPercentagePositionChildren","_markDirtyPrivateKey","_removeTemplateField","_templateField","_removeObjectTemplate","_createEvents","_setObjectTemplate","_applyTemplates","oldDataItem","newDataItem","_parent","_addPercentageSizeChildren","updatePivotPoint","pivot","setLayer","tooltipMoveDp","_tooltipMoveDp","tooltipPointerDp","_tooltipPointerDp","_statesHandled","markDirtyAccessibility","_dragDp","dragStart","dragMove","dragStop","showTooltipOn","_tooltipDp","_ev","toggleKey","_toggleDp","wheelable","blur","saturate","brightness","contrast","sepia","hue","_focusDp","_hoverDp","_handleOver","_handleOut","_isDown","_handleUp","_handleDown","inactive","_dragEvent","_dragPoint","dragEvent","getLocalBounds","self","invalidateBounds","isFocus","_fixMinBounds","privateHeight","_removeParent","hover","unhover","tooltipPosition","tooltipTarget","_setMatrix","promise","_onShow","appear","success","_isHidden","animations","hovering","_findStaticTemplate","_walkParents","_walkParent","updateChildren","prevParent","numberFormatter","getDateFormatter","dateFormatter","getDurationFormatter","durationFormatter","toFront","toBack","makeTextStyle","makeText","wordWrapWidth","oversizedBehavior","breakWords","ellipsis","ignoreFormatting","minScale","_textStyles","styleName","PointedRectangle","bwh","xtl","ytl","xbl","d1","d2","stemX","stemY","Tooltip","templates","_setDefaultFn","_label","_updateBackground","_updateTextColor","_htmlContentHovered","_handleReaderAnnouncement","_tooltips","updateBackgroundColor","_keepHoverDp","outEvent","_fillDp","_strokeDp","_labelDp","cw","parentW","parentH","_w","_h","pointTo","pointerLength","bgStrokeSizeY","bgStrokeSizeX","pointerX","pointerY","boundsW","boundsH","_fx","animationDuration","availableHeight","childHeight","TAU","mapToEllipse","_ref","cosphi","sinphi","centerx","centery","approxUnitArc","ang1","ang2","tan","vectorAngle","ux","uy","vx","vy","dot","acos","_ref2","px","py","_ref2$xAxisRotation","xAxisRotation","_ref2$largeArcFlag","largeArcFlag","_ref2$sweepFlag","sweepFlag","curves","pxp","pyp","lambda","_getArcCenter","rxsq","rysq","pxpsq","pypsq","radicant","centerxp","centeryp","vx1","vy1","vx2","vy2","getArcCenter","_getArcCenter2","arr","isArray","Symbol","iterator","Object","_arr","_n","_d","_e","_s","_i","done","err","sliceIterator","TypeError","_slicedToArray","ratio","_mapToEllipse","_mapToEllipse2","_mapToEllipse3","checkArgs","actual","expected","checkMinArgs","checkEvenArgs","splitArcFlags","args","flag","exec","assertBinary","eachTargets","hitTarget","onPointerEvent","element","touches","changedTouches","isTainted","getContext","willReadFrequently","drawImage","getImageData","warn","clearCanvas","CanvasPivot","CanvasDisplayObject","Disposer","Matrix","subStatus","status","_layer","_removeObject","getLayer","dirty","getCanvas","defaultLayer","margin","_ghostLayer","setMargin","layers","registerChildLayer","resizeLayer","resizeGhost","_addBounds","_bounds","_getColorId","_colorId","paintId","_isInteractive","_forceInteractive","_isInteractiveMask","contains","_matrix","applyInverse","getLocalMatrix","_uMatrix","setTransform","bn","matrix","_addEvent","_localMatrix","copyFrom","prepend","_transform","_transformMargin","_transformLayer","_omitTainted","ghostLayer","ghostContext","save","_runPath","globalAlpha","compoundAlpha","restore","tainted","_hovering","has","dragging","_dragging","some","shouldCancelTouch","_touchActive","CanvasContainer","_children","_childLayers","deep","setPoint","Op","colorize","_forceColor","colorizeGhost","forceColor","pathGhost","addBounds","BeginPath","beginPath","BeginFill","fillStyle","EndFill","clearShadow","EndStroke","LineStyle","strokeStyle","lineWidth","LineDash","dash","LineDashOffset","dashOffset","lineDashOffset","DrawRect","DrawCircle","DrawEllipse","radiusX","radiusY","ellipse","Arc","anticlockwise","arcBounds","ArcTo","LineTo","MoveTo","ClosePath","BezierCurveTo","cpX","cpY","cpX2","cpY2","toX","toY","QuadraticCurveTo","quadraticCurveTo","Shadow","offsetX","offsetY","GraphicsImage","CanvasGraphics","_operations","_pushOp","op","_fillAlpha","toCSS","_hasShadows","_strokeAlpha","drawEllipse","cpx","cpy","qcpx","qcpy","SEGMENTS_REGEXP","ARGS_REGEXP","rest","relative","bs","layerDirty","globalCompositeOperation","renderDetached","CanvasText","_textInfo","_shared","textBaseline","_prerender","ignoreGhost","ignoreFontWeight","fontStyle","_getFontStyle","font","style2","fontVariant","fontWeight","fontFamily","_measure","textChunks","chunk","fillText","textDecoration","thickness","metrics","_measureText","actualBoundingBoxLeft","actualBoundingBoxRight","TextFormatter","_ignoreFontWeight","test","navigator","vendor","rtl","truncate","wrap","refText","toString","replace","currentStyle","styleRestored","chunks","lineInfo","ascent","actualBoundingBoxAscent","actualBoundingBoxDescent","currentFormat","currentFill","currentChunkWidth","currentVerticalAlign","currentDecoration","skipFurtherText","firstTextChunk","leftoverChunks","verticalAlign","chunkWidth","truncated","ellipsisMetrics","ellipsisWidth","excessWidth","_truncateText","tmpText","unshift","substr","leftBoundMod","rightBoundMod","boundsMod","chunkHeight","lineHeight","currentChunkOffset","baselineRatio","_fitRatio","_originalScale","maxW","maxH","fallbackBreakWords","tmp","measureText","fakeMetrics","div","innerText","visibility","body","fontBoundingBoxAscent","fontBoundingBoxDescent","CanvasTextStyle","CanvasRadialText","_renderCircular","deltaAngle","inward","align","clockwise","shouldReverse","_textReversed","midAngle","textHeight","lineStartAngle","angleShift","char","charWidth","_measureCircular","chars","CanvasImage","_imageMask","naturalWidth","naturalHeight","_getMask","imageSmoothingEnabled","fillRect","CanvasRendererEvent","originalPoint","Touch","identifier","CanvasRenderer","GhostLayer","_patternCanvas","Set","devicePixelRatio","_layerDom","exportableView","listener","_touchActiveTimeout","_delayTouchDeactivate","passive","obj","imageArray","clearTimeout","parentNode","createLinearGradient","createRadialGradient","radius1","radius2","_patternContext","clearRect","makePicture","_calculatedWidth","_calculatedHeight","calculatedWidth","calculatedHeight","_realWidth","_realHeight","createDetachedLayer","CanvasLayer","getLayerByOrder","existingLayer","_dirtyLayers","_lastPointerMoveEvent","_dispatchGlobalMousemove","rgb","distributeId","_colorMap","_adjustBoundingBox","DOMRect","adjustPoint","widthScale","heightScale","_getHitTarget","pixel","colorId","getImageArray","_withEvents","dispatching","cleanup","callbacks","disposed","_dispatchEventAll","interactionsEnabled","_dispatchEvent","dispatched","_dispatchMousedown","originalTarget","dragged","_mousedown","delete","_replacedCursorStyle","_dispatchGlobalMouseup","_dispatchDragMove","_dispatchDragEnd","clickevent","_dispatchDoubleClick","_dispatchWheel","_makeSharedEvent","_listeners","_onPointerEvent","timer","_initEvent","mouseup","pointercancel","mousedown","mousemove","options","canvasWidth","canvasHeight","maxScale","maintainPixelRatio","canvases","forceRender","needRerender","exportableContext","extraX","extraY","clientWidth","clientHeight","domWidth","domHeight","_resolution","_width","_height","BlendMode","Gradient","_target","addColorStop","_offset","_color","getBounds","LinearGradient","longer","lighten","brighten","waitForAnimations","defaultInterpolate","percentInterpolate","colorInterpolate","getInterpolate","AnimationState","any","fn","eachContinue","input","removeFirst","move","toIndex","removeIndex","pushOne","copy","findIndex","matches","find","findReverse","findIndexReverse","getSortedIndex","ordering","getFirstSortedIndex","keepIf","keep","string2hex","string","repeat","parseInt","fromAny","hex","_hex","toHSL","fromRGB","rgba2hex","fromString","fromCSS","fromHex","lightAlternative","darkAlternative","mode","fromHSL","generateColors","pass","passOptions","reuse","hsl","lightness","currentStep","JSONParser","_applyDefaults","JSON","parse","normalized","DateFormatter","_setDefaults","source","ignoreTimezone","formatted","date","locales","Intl","DateTimeFormat","parseFormat","convertLocal","applyFormat","toUpperCase","fullYear","month","weekday","day","hours","minutes","seconds","milliseconds","res","getUTCFullYear","getUTCMonth","getUTCDay","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","getUTCMilliseconds","getFullYear","getMonth","getDay","getDate","getHours","getMinutes","getSeconds","getMilliseconds","parts","year","_getMonth","_getShortMonth","translateFunc","_getShortWeekday","_getWeekday","getTimezoneOffset","tz","tzh","tzm","toISOString","toUTCString","dateFormat","_months","_shortMonths","_weekdays","_shortWeekdays","reg","parsedIndexes","resValues","indexAdjust","year3","year2","year1","getStringList","monthLong","monthShort","week","yearDay","weekdayLong","weekdayShort","am","hour12Base1","hourBase0","hour12Base0","hourBase1","minute","second","millisecond","millisecondDigits","zone","iso","regex","RegExp","resolveMonth","resolveShortMonth","hour","isAm","ts","resolveTimezoneOffset","UTC","dir","isDefault","translateAll","DisposerClass","ArrayDisposer","MultiDisposer","CounterDisposer","_counter","DurationFormatter","dmillisecond","dsecond","dminute","dhour","dday","dweek","dmonth","aminute","ahour","aday","aweek","amonth","ayear","base","getFormat","details","positive","negative","zero","_part","parsed","partFormat","dirs","absolute","_unitAliases","tstamp","toTimeStamp","ints","part","unit","_toTimeUnit","unitValue","_getUnitValue","code","maxUnit","getValueUnit","currentUnit","ms","_getUnitValues","linear","cubic","sine","yoyo","ease","out","inOut","State","_entity","_userSettings","fallback","_eachSetting","seen","stateAnimationDuration","stateAnimationEasing","States","_states","newState","Adapters","_callbacks","enable","_disabled","Animation","loops","startingTime","EventDispatcher","_animation","_from","_to","_easing","_loops","_interpolate","_oldTime","_playing","stopped","_stopped","pause","play","percentage","_time","resolve","_reject","_checkEnded","_run","_reset","counter","Settings","_userProperties","resetUserSettings","paused","_animatingSettings","_stopAnimation","_set","_animatingPrivateSettings","_stopAnimationPrivate","_setPrivate","_settingEvents","off","_privateSettingEvents","offPrivate","getRaw","_sendKeyEvent","_sendPrivateKeyEvent","_setRaw","removeAll","_privateSettings","_setPrivateRaw","_prevPrivateSettings","enableDispose","_internalTemplates","_registerId","_template","shouldApply","_dirtyPrivate","_disposerProperties","_name","isUserSetting","_removeTemplateProperty","_userPrivateProperties","_removeTemplatePrivateProperty","_setTemplateProperty","_findTemplateByKey","_setTemplatePrivateProperty","_findTemplateByPrivateKey","_applyStateByKey","other","_eachTemplate","_apply","_applyTemplate","_templateDisposers","privateSettings","_runSetup","setup","_templates","_disposeTemplates","_findTemplate","_removeTemplates","isConnected","defaults","tag","theme","allRules","every","prevId","removeDispose","_killed","_iterating","_enabled","hasListeners","hasListenersByType","killed","amount","_removeListener","_removeExistingListener","_eachListener","removeType","_shouldDispatch","_type","InterfaceColors","Language","prompt","translation","translateAny","setTranslationAny","setTranslationsAny","translations","translateEmpty","checkBounds","initial","_values","hasIndex","_onRemoveIndex","_onMoveIndex","_onClear","swap","value_a","value_b","pop","shift","newArray","ListAutoDispose","autoDispose","ListTemplate","HALFPI","RADIANS","DEGREES","rounded","fitToRange","normalizeAngle","getArcBounds","bpoints","getArcPoint","fromAngle","toAngle","pt","mergeBounds","bound","inBounds","getAngle","diffX","diffY","spiralPoints","radiusStep","stepSize","degrees","circlesOverlap","circle1","circle2","pivotX","pivotY","origin","a1","b1","c1","tx1","load","url","error","isBlob","responseType","xhr","XMLHttpRequest","onload","response","blob","reader","FileReader","onerror","readAsText","readBlob","getResponseHeader","responseText","withCredentials","requestHeaders","header","setRequestHeader","send","NumberFormatter","bns","sns","suffix","NumberFormat","mod","active","thousandSeparator","decimalSeparator","mods","modSpacing","thousands","interval","prefix","applyPrefix","ol","parseFloat","toPrecision","exp","toExponential","toFixed","ip","intsr","separator","decs","prefixes","newvalue","applied","number","escape","unescape","keys","keysOrdered","assign","hasKey","eachOrdered","ord","hasOwnProperty","softCopyProperties","compare","compareArray","leftLength","rightLength","compareNumber","p100","p50","isPercent","populateString","getTagValue","tagName","prop","dateFields","numericFields","durationFields","method","params","matches2","reg2","getTagValueFromObject","getCustomDataValue","customData","current","formatApplied","numberValue","dateValue","durationValue","encodeURIComponent","formatParts","formatterType","Native","_observer","ResizeObserver","entries","entry","_targets","addTarget","observe","box","removeTarget","unobserve","Raf","_timer","lastTime","loop","newSize","cancelAnimationFrame","observer","ResizeSensor","_sensor","_element","_listener","sensor","disposeSettings","TemplateState","_stateChanged","TemplateStates","TemplateAdapters","_checkDisposed","entities","quotedBlocks","noFormatting","chunks2","i2","chunk2","cleanUp","isImage","q","sleep","timeUnitDurations","getDuration","firstDateOfWeek","firstDate","timeZoneOffset","setUTCMinutes","unitCount","setTime","setUTCDate","setUTCHours","setUTCSeconds","setUTCMilliseconds","setUTCMonth","setUTCFullYear","wday","weekDay","newTimeZoneOffset","isNaN","tzoffset","offsetUTC","parsedDate","parseDate","offsetDif","newDiff","formatToParts","toUTCDate","Timezone","_utc","hour12","timeZone","fractionalSecondDigits","_dtf","userOffset","newUserOffset","toNumber","isNumber","converted","isString","toDate","isDate","numberToString","zeros","getType","isObject","PLACEHOLDER","PLACEHOLDER2","removeElement","addEventListener","removeEventListener","onZoom","supports","cap","getPointerId","activeElement","getRendererEvent","isTouchEvent","PointerEvent","pointerType","setStyle","getStyle","getEventTarget","composedPath","isLocalEvent","host","setInteractive","getEventKey","keyCode","getShadowRoot","rootStylesheet","appendStylesheet","selector","cssRules","insertRule","StyleRule","nonce","head","sheet","getStylesheet","_rule","selectorText","deleteRule","_setVendorPrefixName","setProperty","getSafeResolution","relativeToValue","full","decimalPlaces","padString","trim","trimLeft","trimRight","truncateTextWithEllipsis","maxLength","lastNonAlphanumericIndex","charAt","substring","hints","cleanFormat","stripTags","escapeForRgex","splitString","rtlChar","splitPattern","getYearDay","getWeek","firstDay","getWeekYear","getMonthWeek","firstWeek","currentWeek","getDayFromWeek","get12Hours","getTimeZone","long","savings","toLocaleString","timeZoneName","wotz","wtz","utcDate","capitalizeFirst","hslToRgb","hue2rgb","rgbToHsl","getLightnessStep","isLight","alternativeColor","light","dark","mergeTags","tags1","tags2","sameBounds","pdfmakePromise","Exporting","quality","printMethod","imageFormat","indent","renameFields","addColumnNames","emptyAs","addBOM","addURL","menu","_getFormatOptions","newOptions","download","customOptions","ext","fileName","uri","export","streamFile","print","initiatePrint","exportImage","exportJSON","exportCSV","exportHTML","exportXLSX","exportPDF","exportPDFData","toDataURL","getContentType","disposeCanvas","exportCanvas","mainCanvas","extraImages","middleLeft","middleTop","middleWidth","middleHeight","extraRight","extraBottom","extras","extraRoot","extraCanvas","extraWidth","extraHeight","crop","newCanvas","getDisposableCanvas","ctx","findBackgroundColor","backgroundOpacity","getJSON","stringify","getData","convertToSpecialFormat","getCSV","csv","br","dataFields","getDataFields","dataFieldsOrder","dataRow","dataValue","getCSVRow","ai","bi","row","asIs","convertEmptyValue","forceQuotes","search","getHTML","tableClass","getHTMLRow","headerRow","rowClass","first","charCodeAt","useTag","cellClass","getXLSX","XLSX","getXLSXLib","wbOptions","bookType","bookSST","sheetName","_normalizeExcelSheetName","wb","SheetNames","Sheets","wsData","getXLSXRow","utils","aoa_to_sheet","workbook","workbookOptions","xlsx","write","_xlsx","getPDF","includeImage","includeData","dataOptions","pageOrientation","imageSize","imageOptions","pdfmake","getPdfmake","doc","pageSize","pageMargins","defaultStyle","content","title","extraMargin","bold","href","getPageSizeFit","alignment","hasData","table","getPDFData","fonts","vfs","addFont","paths","normal","bytes","italics","bolditalics","extraFonts","createPdf","getBase64","getPDFDataRow","headerRows","default","vfs_fonts","pdfMake","_pdfmake","margins","newMargins","A0","A1","A2","A3","A4","A5","A6","A7","A8","A9","A10","B0","B1","B2","B3","B4","B5","B6","B7","B8","B9","B10","C0","C1","C2","C3","C4","C5","C6","C7","C8","C9","C10","RA0","RA1","RA2","RA3","RA4","SRA0","SRA1","SRA2","SRA3","SRA4","EXECUTIVE","FOLIO","LEGAL","LETTER","TABLOID","dataSource","newRow","_field","keepOriginal","isDateField","isNumericField","isDurationField","useTimestamps","useLocale","contentType","currentColor","getPropertyValue","blobDownloadSupport","link","decodeURIComponent","Blob","URL","createObjectURL","click","revokeObjectURL","atob","charCode","Uint8Array","linkDownloadSupport","downloadSupport","_printViaCSS","_printViaIframe","originalTitle","scroll","documentElement","scrollTop","rule2","img","clipPath","userAgent","MSStream","iframe","contentWindow","execCommand","supportedFormats","disabled","supportedExportTypes","AnimatedTheme","interpolationDuration","DarkTheme","primaryButton","primaryButtonHover","primaryButtonDown","primaryButtonActive","primaryButtonText","primaryButtonStroke","secondaryButton","secondaryButtonHover","secondaryButtonDown","secondaryButtonActive","secondaryButtonText","secondaryButtonStroke","alternativeBackground","alternativeText","setColor","DefaultTheme","primaryButtonDisabled","primaryButtonTextDisabled","interpolationEasing","gap","checkered","centered","horizontalGap","verticalGap","density","minOpacity","maxOpacity","fillField","strokeField","nameField","clickTarget","stepCount","editOn","multiLine","pointerBaseWidth","dRadius","dInnerRadius","getFillFromSprite","getStrokeFromSprite","autoTextColor","labelText","spikes","rotationStep","Queue","polylabel","debug","cellSize","degeneratePoleOfInaccessibility","cellQueue","compareMax","Cell","bestCell","getCentroidCell","bboxCell","numProbes","cell","poleOfInaccessibility","minDistSq","ring","getSegDistSq","pointToPolygonDist","SQRT2","module","exports","TinyQueue","defaultCompare","_down","_up","peek","halfLength","best","__awaiter","thisArg","_arguments","P","reject","fulfilled","rejected","Banner","myTheme","previousSelectedId","selectCountryInterval","polygonSeries","mapChart","gaugeSeries","radarGauge","globeContainer","currentIndex","continents","continentNames","europe","asia","northAmerica","southAmerica","oceania","africa","lineSeries","radarRangeFills","antarctica","continentsData","continentStartCategory","continentEndCategory","lineSeriesChart","categoryField","createSeries","valueYField","categoryXField","makeLineSeriesChart","navContainer","navChartsContainer","previousPolygon","selectContinent","unhoverCountry","hoverCountry","unselectContinent","fake","animateDataItem","setInterval","clearInterval","series1","valueXField","categoryYField","templateField","makeRadarGauge","value2","createRange","generateRadarData","makeRadarChart","_active","CommonUI","visitedPlaces","resizing","_visitedPlaces","vp","setMapSize","firstNode","_resizing","dims","custom","customsize","maxw","maxh","Sharing","appendTo","share","generateScreenshot","worldMap","placeName","placeNameMany","resetScreenshot","loadImage","resp","json","updateSnapshot","toggleTimeline","exporting","getPage","removeClass","addClass","imgData","getImage","imageResp","saveImage","imageRespData","empty","network","updateCounts","getShareURL","openShareWin","fd","FormData","fetch","cache","credentials","redirect","referrerPolicy","visited","places","description","country","getCountryByMap","getViewURL","maps","protocol","hostname","port","getEmbedURL","getIframe","getConfig","u","via","image_url","mini","summary","media","querystring","UIQuery","query","nodes","attr","lastNode","last","classList","currentClassName","VisitedPlaces","_div","setStep","_stepDisposers","_setStep","slider","_stepToPosition","_currentStep","_togglePolygons","_toggleButtons","getEstimatedTime","_totalDuration","homePosition","_isPlaying","_buttonOutlineAnimation","playButtonOutline","playButton","_animateSlider","_sliderAnimation","homeStepData","_continentSteps","pinSeries","nameSeries","_firstVisit","_createHash","_goHome","replay","_appeared","_replay","nextStep","oneStepAnimationDuration","toggleButtonStates","prevButton","nextButton","applyTheme","themeName","stepLabel","waterSeries","water","graticuleSeries","unvisited","border","_togglePolygon","pinTemplate","labelColor","visitedLabel","comLabel","placesLabel","nameLabelOpacity","nameLabelTemplate","alternativeLabel","sliderBackground","sliderOpacity","buttons","replayButton","saveStepButton","saveHomeButton","home","hovervisited","logoPin","setProjection","createHash","toggleWater","enabled","waterEnabled","toggleAutoStep","autoStep","toggleGraticule","graticuleEnabled","sliderContainer","bottomContainer","_fixStepLabelPosition","stepLabelX","toggleNames","namesEnabled","toggleAutoplay","autoPlay","removePlace","_id","setHome","homePolygon","homeId","_addPin","_addName","isEditor","_toggleName","autoHomeStep","pinSprite","_getFirstBulletsSprite","stepData","currentStepData","previouslyVisitedOpacity","nameLabel","pathname","filePrefix","buttonTemplate","visitedplaces_config","systemTooltipU","_createSystemTooltip","systemTooltipD","systemTooltipH","_fitLabels0","_loadGeodata","_handleDataValidated","longitudeField","latitudeField","_handlePolygonClick","nameLabelFontWeight","sliderWidth","sliderPaddingLeft","sliderPaddingRight","sliderPaddingBottom","_setInteractivity","replayIcon","prevIcon","nextIcon","playIcon","_handleSlider","iconHome","resetHomePointButton","resetHomeBackground","iconStep","resetStepPointButton","resetStepPoint","resetHomePoint","resetStepbackground","logoContainer","_showPlayAnimation","_parseHash","geodata","config","names","sliderPosition","autoplay","autozoom","bits","bit","nv","place","positions","Boolean","placeDuration","datas","sdp","ids","idColor","idColorArr","continent","createHomeStep","totalDuration","placesCount","stepDuration","_positionToStep","stepStart","stepEnd","_stepTimes","_handleSliderEnd","endDuration","_autoZoom","logoAnimation","_realTogglePolygons","geometryColection","_measurePolygon","_polygonAreas","nameDataItem","pinDataItem","pinThreshold","_fitLabelsDp","_fitLabels","_fitLabel","Adder","_partials","Float64Array","hi","lo","valueOf","merge","arrays","flatten","lambda00","phi00","lambda0","cosPhi0","sinPhi0","areaRingSum","areaSum","areaStream","polygonStart","areaRingStart","areaRingEnd","polygonEnd","areaRing","sphere","areaPointFirst","areaPoint","phi","dLambda","sdLambda","adLambda","cosPhi","sinPhi","phi0","lambda1","phi1","lambda2","deltaSum","ranges","boundsStream","boundsPoint","boundsLineStart","boundsLineEnd","boundsRingPoint","boundsRingStart","boundsRingEnd","linePoint","equatorial","inflection","phii","lambdai","antimeridian","rangeCompare","rangeContains","merged","deltaMax","spherical","cartesian","cartesianDot","cartesianCross","cartesianAddInPlace","cartesianScale","vector","cartesianNormalizeInPlace","W0","W1","Z0","Z1","X2","Y2","Z2","z0","centroidStream","centroidPoint","centroidLineStart","centroidLineEnd","centroidRingStart","centroidRingEnd","centroidPointCartesian","centroidLinePointFirst","centroidLinePoint","centroidRingPointFirst","centroidRingPoint","cz","circleStream","cosRadius","sinRadius","circleRadius","circle","clean","sign0","sign1","pi","cosPhi1","sinLambda0Lambda1","clipAntimeridianIntersect","rejoin","smallRadius","notHemisphere","intersect","two","pa","pb","n1","n2","n2n2","n1n2","determinant","c2","n1xn2","uu","t2","polar","q1","c0","v0","v00","pointVisible","clipLine","sink","ringBuffer","ringSink","polygonStarted","pointRing","ringStart","ringEnd","startInside","compareIntersection","pointLine","ringSegments","validSegment","ax","ay","clipMax","clipMin","clipRectangle","corner","comparePoint","ca","x__","y__","v__","x_","y_","v_","activeStream","bufferStream","clipStream","winding","a0","b0","polygonInside","cleanInside","Intersection","subject","isSubject","compose","lengthSum","lengthStream","lengthPointFirst","lengthLineEnd","lengthPoint","cosDelta","epsilon","epsilon2","halfPi","quarterPi","tau","radians","atan","haversin","noop","x00","y00","centroidPointFirstLine","centroidPointLine","centroidPointFirstRing","centroidPointRing","PathContext","prototype","_radius","lengthRing","cacheDigits","cacheAppend","cacheRadius","cacheCircle","PathString","_append","strings","appendRound","sinPhi1","absDelta","intersection","phiArc","parallels","cacheStream","lower48Point","alaskaPoint","hawaiiPoint","lower48","alaska","hawaii","pointStream","albersUsa","streams","clipExtent","fitExtent","fitWidth","fitHeight","conicProjection","projectAt","conicEqualAreaRaw","r0","project","r0y","cylindricalEqualAreaRaw","forward","M","equalEarthRaw","l2","l6","equirectangularRaw","fitBounds","transformRadians","scaleTranslateRotate","sx","sy","scaleTranslate","cosAlpha","sinAlpha","ci","fi","projectionMutator","projectResample","projectTransform","projectRotateTransform","deltaLambda","deltaPhi","deltaGamma","theta","preclip","postclip","delta2","recenter","transformRotate","reflectX","reflectY","mercatorRaw","reclip","mercatorProjection","naturalEarth1Raw","phi2","phi4","orthographicRaw","sc","cc","maxDepth","cosMinDistance","resampleLineTo","dx2","dy2","dz","a00","b00","c00","resampleStream","ringPoint","resample","resampleNone","rotationIdentity","rotateRadians","rotationLambda","rotationPhiGamma","forwardRotationLambda","cosDeltaPhi","sinDeltaPhi","cosDeltaGamma","sinDeltaGamma","streamGeometry","streamGeometryType","streamObjectType","Feature","FeatureCollection","Sphere","Point","MultiPoint","LineString","streamLine","MultiLineString","Polygon","streamPolygon","MultiPolygon","GeometryCollection","closed","transformer","methods","TransformStream","optional","required","shuffle","constantZero","packEncloseRandom","circles","enclosesWeak","encloseBasis","extendBasis","enclosesWeakAll","enclosesNot","encloseBasis2","encloseBasis3","dr","r1","r2","x21","y21","r21","x3","y3","r3","a2","a3","b2","b3","c3","d3","ab","xa","xb","ya","yb","C","score","Node","packSiblingsRandom","aa","sj","sk","tauEpsilon","Path","x01","y01","l01_2","x20","y20","l21_2","l20_2","l21","l01","t01","t21","ccw","da","arcInnerRadius","arcOuterRadius","arcStartAngle","arcEndAngle","arcPadAngle","padAngle","cornerTangents","rc","ox","oy","x11","y11","x10","y10","D","cx0","cx1","dx0","dy0","dx1","dy1","padRadius","a01","a11","a10","da0","da1","ap","rp","rc0","rc1","oc","x32","y32","bx","by","kc","lc","Linear","withPath","shape"],"sourceRoot":""}