@hybridcore/ui 1.5.89 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (267) hide show
  1. package/dist/{AccordionDetails-DhriPVPP.js → AccordionSummary-DgAwVTk8.js} +81 -82
  2. package/dist/{Add-CMz4N2zT.js → Add-DJLrrVHm.js} +52 -51
  3. package/dist/AnimatedTheme-jnasw6rT.js +11305 -0
  4. package/dist/AxisRenderer-DTyLLA6c.js +3579 -0
  5. package/dist/AxisRendererY-C_ItLPNV.js +445 -0
  6. package/dist/Box-p6OtTUEo.js +30 -0
  7. package/dist/Bullet-DVczI2TD.js +41 -0
  8. package/dist/Button-CcsPEIDh.js +35 -0
  9. package/dist/{Button-eqWvpDuh.js → Button-CvE2gnly.js} +138 -124
  10. package/dist/{ButtonBase-DsX-jMQJ.js → ButtonBase-2bPw77UP.js} +5 -5
  11. package/dist/{CardContent-DsYqqPeJ.js → CardContent-CSHh-ZlM.js} +4 -4
  12. package/dist/CategoryAxis-CwnfaGc8.js +458 -0
  13. package/dist/{Checkbox-CrU2hpWB.js → Checkbox-CWRMFTBp.js} +12 -11
  14. package/dist/Circle-Cy5s-pVc.js +27 -0
  15. package/dist/ColorSet-C7vpNXhM.js +2957 -0
  16. package/dist/{ColumnSeries-BTcqshjB.js → ColumnSeries-CjgdJ2QL.js} +129 -126
  17. package/dist/DataProcessor-CHDO51q4.js +83 -0
  18. package/dist/DateAxis-YX3QNIB-.js +569 -0
  19. package/dist/{Delete-86TO0fMo.js → Delete-CW0UZv1m.js} +1 -1
  20. package/dist/{DialogContent-CqTojymQ.js → DialogContent-B3nbEbuv.js} +10 -11
  21. package/dist/FormControl-BLbrq4C7.js +1636 -0
  22. package/dist/{FormControlLabel-BrdX4R71.js → FormControlLabel-C8SPv14J.js} +8 -8
  23. package/dist/Hierarchy-Bihj0S61.js +925 -0
  24. package/dist/{IconButton-DJ-31-Fd.js → IconButton-CHwRQF-g.js} +20 -19
  25. package/dist/IconPlus-yPkff_Vj.js +19 -0
  26. package/dist/{InputAdornment-B7qEA4kN.js → InputAdornment-DLxWUE6H.js} +6 -6
  27. package/dist/Legend-Dp_MKfS4.js +178 -0
  28. package/dist/LineSeries-Uiv5o56b.js +472 -0
  29. package/dist/{List-DOD5kSk3.js → List-tqElle9C.js} +4 -4
  30. package/dist/{ListItem-r8PbsvCz.js → ListItem-CfjsIg4B.js} +9 -8
  31. package/dist/{MenuItem-C6qlUyV3.js → MenuItem-xZx_w7zA.js} +14 -13
  32. package/dist/{Modal-CkcFEpHa.js → Modal-DhPpOoGB.js} +292 -277
  33. package/dist/{Paper-CjqLScHA.js → Paper-2B03OBmZ.js} +47 -41
  34. package/dist/PieSeries-B2fW3z0s.js +693 -0
  35. package/dist/RoundedRectangle-CWLi2PXn.js +34 -0
  36. package/dist/Scrollbar-D86MJyr2.js +171 -0
  37. package/dist/{Select-t3ewnSdf.js → Select-BgYwkZgI.js} +2066 -1633
  38. package/dist/Slice-B19rbYDZ.js +261 -0
  39. package/dist/{Source-BESIjd9X.js → Source-BSZST_GH.js} +2472 -2445
  40. package/dist/{Text-Cl1H4b0h.js → Text-ChJRuaD8.js} +398 -397
  41. package/dist/{TextField-BQ8a50fA.js → TextField-1yCesIbH.js} +23 -25
  42. package/dist/Tick-2bcLyHpF.js +162 -0
  43. package/dist/{Typography-D1t7XuLN.js → Typography-CxbneZy_.js} +11 -11
  44. package/dist/Vector-BmuhQO4p.js +3606 -0
  45. package/dist/Vector-DfTqQEln.js +1735 -0
  46. package/dist/WKT-2wsDT-nq.js +2310 -0
  47. package/dist/XYCursor-C8WktvKM.js +362 -0
  48. package/dist/ZoomableContainer-DYyqwaMb.js +220 -0
  49. package/dist/_commonjsHelpers-BVfed4GL.js +28 -0
  50. package/dist/capitalize-ciszXJ7R.js +9 -0
  51. package/dist/components/access/helpers.js +1 -1
  52. package/dist/components/access/index.js +1 -1
  53. package/dist/components/card/index.js +6 -6
  54. package/dist/components/card/styled.js +1 -1
  55. package/dist/components/charts/_common/utils.js +20 -0
  56. package/dist/components/charts/candlestick/logic.js +170 -140
  57. package/dist/components/charts/chart-wrapper/helpers.js +27 -0
  58. package/dist/components/charts/chart-wrapper/index.js +44 -0
  59. package/dist/components/charts/chart-wrapper/logic.js +47 -0
  60. package/dist/components/charts/chart-wrapper/styled.js +44 -0
  61. package/dist/components/charts/column-line-mix/index.js +10 -0
  62. package/dist/components/charts/column-line-mix/logic.js +162 -0
  63. package/dist/components/charts/column-line-mix/styled.js +12 -0
  64. package/dist/components/charts/drill-down-treemap/index.js +10 -0
  65. package/dist/components/charts/drill-down-treemap/logic.js +391 -0
  66. package/dist/components/charts/drill-down-treemap/styled.js +12 -0
  67. package/dist/components/charts/drill-down-voronoi-treemap/index.js +10 -0
  68. package/dist/components/charts/drill-down-voronoi-treemap/logic.js +1527 -0
  69. package/dist/components/charts/drill-down-voronoi-treemap/styled.js +12 -0
  70. package/dist/components/charts/heatmap/index.js +10 -0
  71. package/dist/components/charts/heatmap/logic.js +361 -0
  72. package/dist/components/charts/heatmap/styled.js +12 -0
  73. package/dist/components/charts/highlighting-line-data/logic.js +89 -256
  74. package/dist/components/charts/line/index.js +10 -0
  75. package/dist/components/charts/line/logic.js +148 -0
  76. package/dist/components/charts/line/styled.js +12 -0
  77. package/dist/components/charts/logaritmic-scale/index.js +10 -0
  78. package/dist/components/charts/logaritmic-scale/logic.js +119 -0
  79. package/dist/components/charts/logaritmic-scale/styled.js +12 -0
  80. package/dist/components/charts/multiple-value-axes/index.js +10 -0
  81. package/dist/components/charts/multiple-value-axes/logic.js +191 -0
  82. package/dist/components/charts/multiple-value-axes/styled.js +12 -0
  83. package/dist/components/charts/nested-pie/index.js +10 -0
  84. package/dist/components/charts/nested-pie/logic.js +110 -0
  85. package/dist/components/charts/nested-pie/styled.js +12 -0
  86. package/dist/components/charts/packed-circles/index.js +10 -0
  87. package/dist/components/charts/packed-circles/logic.js +423 -0
  88. package/dist/components/charts/packed-circles/styled.js +12 -0
  89. package/dist/components/charts/pie-chart/index.js +10 -0
  90. package/dist/components/charts/pie-chart/logic.js +70 -0
  91. package/dist/components/charts/pie-chart/styled.js +12 -0
  92. package/dist/components/charts/stacked-area-radar/index.js +10 -0
  93. package/dist/components/charts/stacked-area-radar/logic.js +868 -0
  94. package/dist/components/charts/stacked-area-radar/styled.js +12 -0
  95. package/dist/components/charts/stacked-column-chart/index.js +10 -0
  96. package/dist/components/charts/stacked-column-chart/logic.js +148 -0
  97. package/dist/components/charts/stacked-column-chart/styled.js +12 -0
  98. package/dist/components/charts/xy-chart/index.js +10 -0
  99. package/dist/components/charts/xy-chart/logic.js +170 -0
  100. package/dist/components/charts/xy-chart/styled.js +12 -0
  101. package/dist/components/collapsible-card/index.js +58 -32
  102. package/dist/components/collapsible-card/logic.js +20 -0
  103. package/dist/components/collapsible-card/styled.js +52 -0
  104. package/dist/components/confirm/dialog.js +3 -3
  105. package/dist/components/confirm/index.js +1 -1
  106. package/dist/components/container/index.js +7 -7
  107. package/dist/components/context-menu/index.js +153 -253
  108. package/dist/components/data-map/components/controls/index.js +12 -0
  109. package/dist/components/data-map/components/controls/styled.js +34 -0
  110. package/dist/components/data-map/index.js +51 -0
  111. package/dist/components/data-map/logic.js +108 -0
  112. package/dist/components/data-map/styled.js +32 -0
  113. package/dist/components/data-security-selectors/security-level/index.js +5 -5
  114. package/dist/components/date-picker-with-custom-range/index.js +9 -0
  115. package/dist/components/date-picker-with-custom-range/logic.js +66 -0
  116. package/dist/components/date-picker-with-custom-range/styled.js +43 -0
  117. package/dist/components/divider/index.js +18 -0
  118. package/dist/components/divider/logic.js +13 -0
  119. package/dist/components/divider/styled.js +14 -0
  120. package/dist/components/geometry-picker/coordinate/index.js +1 -1
  121. package/dist/components/geometry-picker/edit/index.js +1 -1
  122. package/dist/components/geometry-picker/geometry/index.js +1 -1
  123. package/dist/components/geometry-picker/index.js +7 -8
  124. package/dist/components/geometry-picker/kml/index.js +1 -1
  125. package/dist/components/geometry-picker/map/index.js +1 -1
  126. package/dist/components/geometry-picker/map/logic.js +65 -62
  127. package/dist/components/geometry-picker/map/style.js +1 -1
  128. package/dist/components/heat-map/components/controls/index.js +12 -0
  129. package/dist/components/heat-map/components/controls/styled.js +34 -0
  130. package/dist/components/heat-map/components/legend/index.js +26 -0
  131. package/dist/components/heat-map/components/legend/styled.js +14 -0
  132. package/dist/components/heat-map/index.js +37 -0
  133. package/dist/components/heat-map/logic.js +1945 -0
  134. package/dist/components/heat-map/styled.js +32 -0
  135. package/dist/components/icon-button/index.js +22 -15
  136. package/dist/components/icon-button/logic.js +15 -0
  137. package/dist/components/icon-button/styled.js +22 -10
  138. package/dist/components/instance-form/components/composite-list/index.js +1 -1
  139. package/dist/components/instance-form/components/composite-matrix/components/json-editor/index.js +8 -7
  140. package/dist/components/instance-form/components/variable/index.js +8 -8
  141. package/dist/components/instance-form/components/variables/index.js +1 -1
  142. package/dist/components/instance-hierarchy-table/styled.js +1 -1
  143. package/dist/components/instance-variable-list/index.js +34 -29
  144. package/dist/components/instance-variable-list/styled.js +21 -21
  145. package/dist/components/instance-variable-list/variable.js +44 -74
  146. package/dist/components/linear-indicator/index.js +10 -67
  147. package/dist/components/linear-indicator/logic.js +47 -0
  148. package/dist/components/linear-indicator/styled.js +39 -40
  149. package/dist/components/map/helpers/kml.js +1 -1
  150. package/dist/components/map/helpers/mapbox.js +14 -14
  151. package/dist/components/map/helpers/ol.js +23 -19
  152. package/dist/components/map/helpers/wkt.js +26 -1314
  153. package/dist/components/map/index.js +1 -1
  154. package/dist/components/map/logic.js +113 -101
  155. package/dist/components/map/styled.js +39 -31
  156. package/dist/components/metric-card/MetricChart.js +50 -498
  157. package/dist/components/metric-card/index.js +94 -115
  158. package/dist/components/metric-card/logic.js +70 -131
  159. package/dist/components/object-profile-card/components/avatar/index.js +44 -0
  160. package/dist/components/object-profile-card/components/avatar/logic.js +19 -0
  161. package/dist/components/object-profile-card/components/avatar/styled.js +41 -0
  162. package/dist/components/object-profile-card/index.js +90 -0
  163. package/dist/components/object-profile-card/logic.js +33 -0
  164. package/dist/components/object-profile-card/styled.js +48 -0
  165. package/dist/components/paginated-list/index.js +93 -89
  166. package/dist/components/paginated-list/logic.js +51 -40
  167. package/dist/components/paginated-list/styled.js +25 -21
  168. package/dist/components/property-mapping/index.js +2 -2
  169. package/dist/components/prr-map/components/controls/index.js +12 -0
  170. package/dist/components/prr-map/components/controls/styled.js +34 -0
  171. package/dist/components/prr-map/components/legend/index.js +36 -0
  172. package/dist/components/prr-map/components/legend/styled.js +21 -0
  173. package/dist/components/prr-map/index.js +38 -0
  174. package/dist/components/prr-map/logic.js +104 -0
  175. package/dist/components/prr-map/styled.js +32 -0
  176. package/dist/components/range-selector/components/composite-list-range/index.js +1 -1
  177. package/dist/components/range-selector/components/date-range/index.js +4282 -7
  178. package/dist/components/range-selector/index.js +1 -1
  179. package/dist/components/raster-grid-map/components/controls/index.js +12 -0
  180. package/dist/components/raster-grid-map/components/controls/styled.js +34 -0
  181. package/dist/components/raster-grid-map/components/legend/index.js +14 -0
  182. package/dist/components/raster-grid-map/components/legend/styled.js +21 -0
  183. package/dist/components/raster-grid-map/helpers.js +190 -0
  184. package/dist/components/raster-grid-map/index.js +38 -0
  185. package/dist/components/raster-grid-map/logic.js +172 -0
  186. package/dist/components/raster-grid-map/styled.js +32 -0
  187. package/dist/components/search-input/index.js +62 -140
  188. package/dist/components/search-input/logic.js +43 -0
  189. package/dist/components/search-input/styled.js +33 -0
  190. package/dist/components/simple-pivot-table/index.js +66 -0
  191. package/dist/components/simple-pivot-table/logic.js +51 -0
  192. package/dist/components/simple-pivot-table/styled.js +45 -0
  193. package/dist/components/static-text/index.js +18 -0
  194. package/dist/components/static-text/logic.js +13 -0
  195. package/dist/components/static-text/styled.js +45 -0
  196. package/dist/components/tabs/index.js +56 -2160
  197. package/dist/components/tabs/logic.js +36 -0
  198. package/dist/components/tabs/styled.js +94 -16
  199. package/dist/components/tabs/tab-panel.js +11 -10
  200. package/dist/components/template-filters/components/tab-panel/index.js +1 -1
  201. package/dist/components/template-form/components/property-list/index.js +7 -7
  202. package/dist/components/template-form/components/property-list/property-list-columns.js +3 -3
  203. package/dist/components/template-form/components/property-list/property-list-form.js +9 -9
  204. package/dist/components/template-form/components/recognition-property-list/index.js +6 -6
  205. package/dist/components/template-form/components/recognition-property-list/recognition-property-list-columns.js +2 -2
  206. package/dist/components/template-form/components/recognition-property-list/recognition-property-list-form.js +7 -7
  207. package/dist/components/template-form/index.js +5 -5
  208. package/dist/components/template-property-filters/property.js +5 -5
  209. package/dist/components/timeline/index.js +61 -0
  210. package/dist/components/timeline/logic.js +40 -0
  211. package/dist/components/timeline/styled.js +48 -0
  212. package/dist/components/tree-select/index.js +5 -5
  213. package/dist/components/treeview-filter/item-label/index.js +3 -3
  214. package/dist/constant-BiOGvlZc.js +21 -0
  215. package/dist/createReactComponent-C7L-DMHj.js +60 -0
  216. package/dist/{createSvgIcon-DLPYMuH1.js → createSvgIcon-BjpIhJ30.js} +30 -32
  217. package/dist/{createSvgIcon-OuwzpcaC.js → createSvgIcon-DrtgaibK.js} +5 -5
  218. package/dist/{createTheme-CNnKNxwL.js → createTheme-DYxDnE9u.js} +226 -285
  219. package/dist/{dialog-BE4D6swf.js → dialog-DcwXug9J.js} +6 -6
  220. package/dist/{helpers-DaCoWmi2.js → helpers-B4UL9NMD.js} +3 -3
  221. package/dist/index-BMS1Otro.js +183 -0
  222. package/dist/index-C__OZmYy.js +663 -0
  223. package/dist/{index-CGNxsLVm.js → index-CcdvNlgr.js} +7 -7
  224. package/dist/{index-JrtqxUdI.js → index-kCJ_Zvl8.js} +5 -5
  225. package/dist/index-syTc6m_V.js +1934 -0
  226. package/dist/index.es-CHNMhaMi.js +2067 -0
  227. package/dist/index.esm-BLLrbTzY.js +318 -0
  228. package/dist/{listItemTextClasses-CNjn41Of.js → listItemTextClasses-C3lndiXO.js} +2 -2
  229. package/dist/main.d.ts +1226 -358
  230. package/dist/main.js +141 -443
  231. package/dist/{has-DNclCIDV.js → math-Bvt2Ubuz.js} +220 -222
  232. package/dist/ol-yOE-NV0X.js +7465 -0
  233. package/dist/path-CNVruS--.js +84 -0
  234. package/dist/{property-list-form-C5hcK2y2.js → property-list-form-zZQfpR0X.js} +13 -13
  235. package/dist/styled-eZwjUruw.js +12 -0
  236. package/dist/useId-B4-oF9Mq.js +34 -0
  237. package/dist/useMobilePicker-BLg3Blg8.js +7589 -0
  238. package/dist/useThemeProps-BzzHcQyd.js +58 -0
  239. package/dist/{utils-CsOZUsQj.js → utils-BDNynJcd.js} +2 -2
  240. package/package.json +42 -9
  241. package/dist/AxisRendererY-kADUad00.js +0 -18370
  242. package/dist/Box-B1AVyJ_s.js +0 -71
  243. package/dist/DateAxis-CMum47iz.js +0 -924
  244. package/dist/Input-CoIrGZAh.js +0 -326
  245. package/dist/InputLabel-CBuAYyuT.js +0 -1367
  246. package/dist/LineSeries-CfcpoYla.js +0 -549
  247. package/dist/OutlinedInput-B-iZoc9l.js +0 -450
  248. package/dist/Tabs-Cn42Z5QI.js +0 -789
  249. package/dist/components/collapsible-card/style.js +0 -49
  250. package/dist/components/profile-card/index.js +0 -80
  251. package/dist/components/profile-card/logic.js +0 -33
  252. package/dist/components/profile-card/styled.js +0 -43
  253. package/dist/components/tabs/appleTabs.style.js +0 -55
  254. package/dist/createStyled-BGx1I94c.js +0 -352
  255. package/dist/createTheme-CyC5HawC.js +0 -879
  256. package/dist/exactProp-cjT0t_Pt.js +0 -36
  257. package/dist/extendSxProp-FEpqY5_S.js +0 -30
  258. package/dist/index-DMSHuq6l.js +0 -688
  259. package/dist/index-SpeaLUQD.js +0 -10963
  260. package/dist/ol-lGwSyEIV.js +0 -15050
  261. package/dist/ownerDocument-CUrv0DIK.js +0 -6
  262. package/dist/ownerWindow-niciwP7I.js +0 -7
  263. package/dist/styled-B8ugzvji.js +0 -12
  264. package/dist/useId-BHG98T5I.js +0 -26
  265. package/dist/useTheme-C15Eq8KG.js +0 -18
  266. package/dist/useTheme-D-uii9iX.js +0 -10
  267. package/dist/useThemeProps-DRP1dikX.js +0 -95
@@ -0,0 +1,3579 @@
1
+ import { a as ye, n as T, B as we, r as C, u as ae, C as Y, G as I, b as ge, S as pe, E as me, D as Z, F as be, j as J, H as Pe, L as _e, k as G, l as z } from "./AnimatedTheme-jnasw6rT.js";
2
+ import { C as re, u as Ae, b as k, a as B, f as v, z as ne, l as W, p as V, A as U, w as De, k as oe, r as j, e as M, B as le, D as he, P as ue, F as ce, G as de, x as fe, _ as N, m as F, h as Q, M as Me, H as ke } from "./ColorSet-C7vpNXhM.js";
3
+ import { S as xe, T as ve } from "./Tick-2bcLyHpF.js";
4
+ import { B as Se } from "./Button-CcsPEIDh.js";
5
+ class Te extends ye {
6
+ setupDefaultRules() {
7
+ super.setupDefaultRules();
8
+ const e = this._root.interfaceColors, i = this._root.language, t = this.rule.bind(this);
9
+ t("XYChart").setAll({
10
+ colors: re.new(this._root, {}),
11
+ paddingLeft: 20,
12
+ paddingRight: 20,
13
+ paddingTop: 16,
14
+ paddingBottom: 16,
15
+ panX: !1,
16
+ panY: !1,
17
+ wheelStep: 0.25,
18
+ arrangeTooltips: !0,
19
+ pinchZoomX: !1,
20
+ pinchZoomY: !1
21
+ }), t("XYSeries").setAll({
22
+ legendLabelText: "{name}"
23
+ }), t("Rectangle", ["plotbackground", "xy", "background"]).setAll({
24
+ fill: Ae.fromHex(0),
25
+ fillOpacity: 0
26
+ }), t("XYChart", ["scrollbar", "chart"]).setAll({
27
+ paddingBottom: 0,
28
+ paddingLeft: 0,
29
+ paddingTop: 0,
30
+ paddingRight: 0,
31
+ colors: re.new(this._root, {
32
+ saturation: 0
33
+ })
34
+ });
35
+ {
36
+ const a = t("Graphics", ["scrollbar", "overlay"]);
37
+ a.setAll({
38
+ fillOpacity: 0.5
39
+ }), T(a, "fill", e, "background");
40
+ }
41
+ t("RoundedRectangle", ["xy", "scrollbar", "thumb"]).setAll({
42
+ cornerRadiusTR: 0,
43
+ cornerRadiusTL: 0,
44
+ cornerRadiusBR: 0,
45
+ cornerRadiusBL: 0,
46
+ fillOpacity: 0,
47
+ focusable: !0
48
+ }), t("RoundedRectangle", ["xy", "scrollbar", "thumb"]).states.create("hover", { fillOpacity: 0.4 }), t("RoundedRectangle", ["xy", "scrollbar", "chart", "background"]).setAll({
49
+ cornerRadiusTL: 0,
50
+ cornerRadiusBL: 0,
51
+ cornerRadiusTR: 0,
52
+ cornerRadiusBR: 0
53
+ }), t("RoundedRectangle", ["xy", "scrollbar", "chart", "background", "resize", "button"]).setAll({
54
+ cornerRadiusBL: 40,
55
+ cornerRadiusBR: 40,
56
+ cornerRadiusTL: 40,
57
+ cornerRadiusTR: 40
58
+ }), t("AxisRendererX", ["xy", "chart", "scrollbar"]).setAll({
59
+ strokeOpacity: 0,
60
+ inside: !0
61
+ }), t("AxisRendererY", ["xy", "chart", "scrollbar"]).setAll({
62
+ strokeOpacity: 0,
63
+ inside: !0,
64
+ minGridDistance: 5
65
+ }), t("AxisLabel", ["xy", "scrollbar", "x"]).setAll({
66
+ opacity: 0.5,
67
+ centerY: k,
68
+ minPosition: 0.01,
69
+ maxPosition: 0.99,
70
+ fontSize: "0.8em"
71
+ }), t("AxisLabel", ["category"]).setAll({
72
+ text: "{category}",
73
+ populateText: !0
74
+ }), t("AxisLabel", ["x"]).setAll({
75
+ centerY: 0
76
+ }), t("AxisLabel", ["x", "inside"]).setAll({
77
+ centerY: k
78
+ }), t("AxisLabel", ["x", "inside", "opposite"]).setAll({
79
+ centerY: 0
80
+ }), t("AxisLabel", ["x", "opposite"]).setAll({
81
+ centerY: k
82
+ }), t("AxisLabel", ["y"]).setAll({
83
+ centerX: k
84
+ }), t("AxisLabel", ["y", "inside"]).setAll({
85
+ centerX: 0
86
+ }), t("AxisLabel", ["y", "inside", "opposite"]).setAll({
87
+ centerX: k
88
+ }), t("AxisLabel", ["y", "opposite"]).setAll({
89
+ centerX: 0
90
+ }), t("AxisLabel", ["minor"]).setAll({
91
+ fontSize: "0.6em"
92
+ }), t("AxisLabel", ["xy", "scrollbar", "y"]).setAll({
93
+ visible: !1
94
+ }), t("Grid", ["xy", "scrollbar", "y"]).setAll({
95
+ visible: !1
96
+ }), t("Grid", ["xy", "scrollbar", "x"]).setAll({
97
+ opacity: 0.5
98
+ }), t("XYCursor").setAll({
99
+ behavior: "none",
100
+ layer: 30,
101
+ exportable: !1,
102
+ snapToSeriesBy: "xy",
103
+ moveThreshold: 1
104
+ });
105
+ {
106
+ const a = t("Grid", ["cursor", "x"]);
107
+ a.setAll({
108
+ forceInactive: !0,
109
+ strokeOpacity: 0.8,
110
+ strokeDasharray: [2, 2],
111
+ role: "slider",
112
+ ariaLabel: i.translate("Use left and right arrows to move selection")
113
+ }), T(a, "stroke", e, "alternativeBackground");
114
+ }
115
+ {
116
+ const a = t("Grid", ["cursor", "y"]);
117
+ a.setAll({
118
+ forceInactive: !0,
119
+ strokeOpacity: 0.8,
120
+ strokeDasharray: [2, 2],
121
+ role: "slider",
122
+ ariaLabel: i.translate("Use up and down arrows to move selection")
123
+ }), T(a, "stroke", e, "alternativeBackground");
124
+ }
125
+ {
126
+ const a = t("Graphics", ["cursor", "selection"]);
127
+ a.setAll({
128
+ fillOpacity: 0.15
129
+ }), T(a, "fill", e, "alternativeBackground");
130
+ }
131
+ t("Axis").setAll({
132
+ zoomOut: !0,
133
+ start: 0,
134
+ end: 1,
135
+ minZoomCount: 1,
136
+ maxZoomCount: 1 / 0,
137
+ maxZoomFactor: 1e3,
138
+ maxDeviation: 0.1,
139
+ snapTooltip: !0,
140
+ tooltipLocation: 0.5,
141
+ panX: !0,
142
+ panY: !0,
143
+ zoomX: !0,
144
+ zoomY: !0,
145
+ fixAxisSize: !0
146
+ }), t("AxisLabel").setAll({
147
+ location: 0.5,
148
+ multiLocation: 0,
149
+ centerX: B,
150
+ centerY: B,
151
+ paddingTop: 3,
152
+ paddingBottom: 3,
153
+ paddingLeft: 5,
154
+ paddingRight: 5
155
+ }), t("Container", ["axis", "header"]).setAll({
156
+ layer: 30
157
+ }), t("Rectangle", ["axis", "header", "background"]).setAll({
158
+ crisp: !0
159
+ });
160
+ {
161
+ const a = t("AxisRenderer");
162
+ a.setAll({
163
+ crisp: !0,
164
+ strokeOpacity: 0
165
+ }), T(a, "stroke", e, "grid");
166
+ }
167
+ t("AxisRendererX").setAll({
168
+ minGridDistance: 120,
169
+ opposite: !1,
170
+ inversed: !1,
171
+ cellStartLocation: 0,
172
+ cellEndLocation: 1,
173
+ width: k
174
+ }), t("AxisRendererY").setAll({
175
+ minGridDistance: 40,
176
+ opposite: !1,
177
+ inversed: !1,
178
+ cellStartLocation: 0,
179
+ cellEndLocation: 1,
180
+ height: k
181
+ });
182
+ {
183
+ const a = t("Rectangle", ["axis", "thumb", "zoomgrip"]);
184
+ a.setAll({
185
+ fillOpacity: 0
186
+ }), T(a, "fill", e, "alternativeBackground"), a.states.create("hover", { fillOpacity: 0.1 });
187
+ }
188
+ t("Rectangle", ["axis", "thumb", "x", "zoomgrip"]).setAll({
189
+ cursorOverStyle: "ew-resize"
190
+ }), t("Rectangle", ["axis", "thumb", "y", "zoomgrip"]).setAll({
191
+ cursorOverStyle: "ns-resize"
192
+ });
193
+ {
194
+ const a = t("Grid");
195
+ a.setAll({
196
+ location: 0,
197
+ strokeOpacity: 0.15,
198
+ crisp: !0
199
+ }), T(a, "stroke", e, "grid");
200
+ }
201
+ {
202
+ const a = t("Grid", ["minor"]);
203
+ a.setAll({
204
+ location: 0,
205
+ strokeOpacity: 0.07,
206
+ crisp: !0
207
+ }), T(a, "stroke", e, "grid");
208
+ }
209
+ t("Grid", ["base"]).setAll({
210
+ strokeOpacity: 0.3
211
+ });
212
+ {
213
+ const a = t("Graphics", ["axis", "fill"]);
214
+ a.setAll({
215
+ visible: !1,
216
+ isMeasured: !1,
217
+ position: "absolute",
218
+ fillOpacity: 0.05
219
+ }), T(a, "fill", e, "alternativeBackground");
220
+ }
221
+ t("Graphics", ["axis", "fill", "range"]).setAll({
222
+ isMeasured: !0
223
+ }), t("Graphics", ["series", "fill", "range"]).setAll({
224
+ visible: !1,
225
+ isMeasured: !0
226
+ }), t("Grid", ["series", "range"]).setAll({
227
+ visible: !1
228
+ }), t("AxisTick", ["series", "range"]).setAll({
229
+ visible: !1
230
+ }), t("AxisLabel", ["series", "range"]).setAll({
231
+ visible: !1
232
+ });
233
+ {
234
+ const a = t("AxisTick");
235
+ a.setAll({
236
+ location: 0.5,
237
+ multiLocation: 0,
238
+ strokeOpacity: 1,
239
+ isMeasured: !1,
240
+ position: "absolute",
241
+ visible: !1
242
+ }), T(a, "stroke", e, "grid");
243
+ }
244
+ t("CategoryAxis").setAll({
245
+ startLocation: 0,
246
+ endLocation: 1,
247
+ fillRule: (a, l) => {
248
+ const u = a.get("axisFill");
249
+ u && (!v(l) || l % 2 == 0 ? u.setPrivate("visible", !0) : u.setPrivate("visible", !1));
250
+ }
251
+ });
252
+ const s = [
253
+ { timeUnit: "millisecond", count: 1 },
254
+ { timeUnit: "millisecond", count: 5 },
255
+ { timeUnit: "millisecond", count: 10 },
256
+ { timeUnit: "millisecond", count: 50 },
257
+ { timeUnit: "millisecond", count: 100 },
258
+ { timeUnit: "millisecond", count: 500 },
259
+ { timeUnit: "second", count: 1 },
260
+ { timeUnit: "second", count: 5 },
261
+ { timeUnit: "second", count: 10 },
262
+ { timeUnit: "second", count: 30 },
263
+ { timeUnit: "minute", count: 1 },
264
+ { timeUnit: "minute", count: 5 },
265
+ { timeUnit: "minute", count: 10 },
266
+ { timeUnit: "minute", count: 15 },
267
+ { timeUnit: "minute", count: 30 },
268
+ { timeUnit: "hour", count: 1 },
269
+ { timeUnit: "hour", count: 3 },
270
+ { timeUnit: "hour", count: 6 },
271
+ { timeUnit: "hour", count: 12 },
272
+ { timeUnit: "day", count: 1 },
273
+ { timeUnit: "day", count: 2 },
274
+ { timeUnit: "day", count: 3 },
275
+ { timeUnit: "day", count: 4 },
276
+ { timeUnit: "day", count: 5 },
277
+ { timeUnit: "week", count: 1 },
278
+ { timeUnit: "month", count: 1 },
279
+ { timeUnit: "month", count: 2 },
280
+ { timeUnit: "month", count: 3 },
281
+ { timeUnit: "month", count: 6 },
282
+ { timeUnit: "year", count: 1 },
283
+ { timeUnit: "year", count: 2 },
284
+ { timeUnit: "year", count: 5 },
285
+ { timeUnit: "year", count: 10 },
286
+ { timeUnit: "year", count: 50 },
287
+ { timeUnit: "year", count: 100 },
288
+ { timeUnit: "year", count: 200 },
289
+ { timeUnit: "year", count: 500 },
290
+ { timeUnit: "year", count: 1e3 },
291
+ { timeUnit: "year", count: 2e3 },
292
+ { timeUnit: "year", count: 5e3 },
293
+ { timeUnit: "year", count: 1e4 },
294
+ { timeUnit: "year", count: 1e5 }
295
+ ], r = {
296
+ millisecond: i.translate("_date_millisecond"),
297
+ second: i.translate("_date_second"),
298
+ minute: i.translate("_date_minute"),
299
+ hour: i.translate("_date_hour"),
300
+ day: i.translate("_date_day"),
301
+ week: i.translate("_date_day"),
302
+ month: i.translate("_date_month"),
303
+ year: i.translate("_date_year")
304
+ }, h = {
305
+ millisecond: i.translate("_date_millisecond"),
306
+ second: i.translate("_date_second"),
307
+ minute: i.translate("_date_minute"),
308
+ hour: i.translate("_date_day"),
309
+ day: i.translate("_date_day"),
310
+ week: i.translate("_date_day"),
311
+ month: i.translate("_date_month") + " " + i.translate("_date_year"),
312
+ year: i.translate("_date_year")
313
+ }, o = {
314
+ millisecond: i.translate("_date_millisecond_full"),
315
+ second: i.translate("_date_second_full"),
316
+ minute: i.translate("_date_minute_full"),
317
+ hour: i.translate("_date_hour_full"),
318
+ day: i.translate("_date_day_full"),
319
+ week: i.translate("_date_week_full"),
320
+ month: i.translate("_date_month_full"),
321
+ year: i.translate("_date_year")
322
+ };
323
+ t("CategoryDateAxis").setAll({
324
+ markUnitChange: !0,
325
+ gridIntervals: ne(s),
326
+ dateFormats: W(r),
327
+ periodChangeDateFormats: W(h)
328
+ }), t("DateAxis").setAll({
329
+ maxZoomFactor: null,
330
+ strictMinMax: !0,
331
+ startLocation: 0,
332
+ endLocation: 1,
333
+ markUnitChange: !0,
334
+ groupData: !1,
335
+ groupCount: 500,
336
+ skipFirstMinor: !0,
337
+ weekLabelLocation: 0,
338
+ gridIntervals: ne(s),
339
+ dateFormats: W(r),
340
+ periodChangeDateFormats: W(h),
341
+ tooltipDateFormats: o,
342
+ groupIntervals: [
343
+ { timeUnit: "millisecond", count: 1 },
344
+ { timeUnit: "millisecond", count: 10 },
345
+ { timeUnit: "millisecond", count: 100 },
346
+ { timeUnit: "second", count: 1 },
347
+ { timeUnit: "second", count: 10 },
348
+ { timeUnit: "minute", count: 1 },
349
+ { timeUnit: "minute", count: 10 },
350
+ { timeUnit: "hour", count: 1 },
351
+ { timeUnit: "day", count: 1 },
352
+ { timeUnit: "week", count: 1 },
353
+ { timeUnit: "month", count: 1 },
354
+ { timeUnit: "year", count: 1 }
355
+ ],
356
+ fillRule: (a) => {
357
+ const l = a.get("axisFill");
358
+ if (l) {
359
+ const u = a.component, n = a.get("value"), d = a.get("endValue"), c = u.intervalDuration(), m = u.getPrivate("baseInterval"), g = u.getPrivate("gridInterval", m);
360
+ let p = u.getPrivate("min", 0);
361
+ if (p = we(new Date(p), g.timeUnit, g.count, this._root.locale.firstDayOfWeek, this._root.utc, void 0, this._root.timezone).getTime(), n != null && d != null) {
362
+ const f = Math.round(Math.round((n - p) / c)) / 2;
363
+ f == Math.round(f) ? l.setPrivate("visible", !0) : l.setPrivate("visible", !1);
364
+ }
365
+ }
366
+ }
367
+ }), t("GaplessDateAxis").setAll({
368
+ fillRule: (a) => {
369
+ const l = a.get("axisFill");
370
+ if (l) {
371
+ const u = a.get("index");
372
+ let n = !1;
373
+ (!v(u) || u % 2 == 0) && (n = !0), l.setPrivate("visible", n);
374
+ }
375
+ }
376
+ }), t("ValueAxis").setAll({
377
+ baseValue: 0,
378
+ logarithmic: !1,
379
+ strictMinMax: !1,
380
+ autoZoom: !0,
381
+ fillRule: (a) => {
382
+ const l = a.get("axisFill");
383
+ if (l) {
384
+ const u = a.component, n = a.get("value"), d = u.getPrivate("step");
385
+ v(n) && v(d) && (C(n / d / 2, 5) == Math.round(n / d / 2) ? l.setPrivate("visible", !1) : l.setPrivate("visible", !0));
386
+ }
387
+ }
388
+ }), t("DurationAxis").setAll({
389
+ baseUnit: "second"
390
+ }), t("XYSeries").setAll({
391
+ maskBullets: !0,
392
+ stackToNegative: !0,
393
+ locationX: 0.5,
394
+ locationY: 0.5,
395
+ snapTooltip: !1,
396
+ openValueXGrouped: "open",
397
+ openValueYGrouped: "open",
398
+ valueXGrouped: "close",
399
+ valueYGrouped: "close",
400
+ seriesTooltipTarget: "series"
401
+ }), t("BaseColumnSeries").setAll({
402
+ adjustBulletPosition: !0
403
+ }), t("ColumnSeries").setAll({
404
+ clustered: !0
405
+ }), t("RoundedRectangle", ["series", "column"]).setAll({
406
+ position: "absolute",
407
+ isMeasured: !1,
408
+ width: V(70),
409
+ height: V(70),
410
+ strokeWidth: 1,
411
+ strokeOpacity: 1,
412
+ cornerRadiusBL: 0,
413
+ cornerRadiusTL: 0,
414
+ cornerRadiusBR: 0,
415
+ cornerRadiusTR: 0,
416
+ fillOpacity: 1,
417
+ role: "figure"
418
+ }), t("LineSeries").setAll({
419
+ connect: !0,
420
+ autoGapCount: 1.1,
421
+ stackToNegative: !1
422
+ }), t("Graphics", ["series", "stroke"]).setAll({
423
+ position: "absolute",
424
+ strokeWidth: 1,
425
+ strokeOpacity: 1,
426
+ isMeasured: !1
427
+ }), t("Graphics", ["series", "fill"]).setAll({
428
+ visible: !1,
429
+ fillOpacity: 0,
430
+ position: "absolute",
431
+ strokeWidth: 0,
432
+ strokeOpacity: 0,
433
+ isMeasured: !1
434
+ }), t("Graphics", ["line", "series", "legend", "marker", "stroke"]).setAll({
435
+ draw: (a, l) => {
436
+ const u = l.parent;
437
+ if (u) {
438
+ const n = u.height(), d = u.width();
439
+ a.moveTo(0, n / 2), a.lineTo(d, n / 2);
440
+ }
441
+ }
442
+ });
443
+ {
444
+ const a = t("Graphics", ["line", "series", "legend", "marker", "stroke"]).states.create("disabled", {});
445
+ T(a, "stroke", e, "disabled");
446
+ }
447
+ t("Graphics", ["line", "series", "legend", "marker", "fill"]).setAll({
448
+ draw: (a, l) => {
449
+ const u = l.parent;
450
+ if (u) {
451
+ const n = u.height(), d = u.width();
452
+ a.moveTo(0, 0), a.lineTo(d, 0), a.lineTo(d, n), a.lineTo(0, n), a.lineTo(0, 0);
453
+ }
454
+ }
455
+ });
456
+ {
457
+ const a = t("Graphics", ["line", "series", "legend", "marker", "fill"]).states.create("disabled", {});
458
+ T(a, "stroke", e, "disabled");
459
+ }
460
+ t("SmoothedXYLineSeries").setAll({
461
+ tension: 0.5
462
+ }), t("SmoothedXLineSeries").setAll({
463
+ tension: 0.5
464
+ }), t("SmoothedYLineSeries").setAll({
465
+ tension: 0.5
466
+ }), t("Candlestick").setAll({
467
+ position: "absolute",
468
+ isMeasured: !1,
469
+ width: V(50),
470
+ height: V(50),
471
+ strokeWidth: 1,
472
+ strokeOpacity: 1,
473
+ cornerRadiusBL: 0,
474
+ cornerRadiusTL: 0,
475
+ cornerRadiusBR: 0,
476
+ cornerRadiusTR: 0,
477
+ fillOpacity: 1,
478
+ role: "figure"
479
+ }), t("OHLC").setAll({
480
+ width: V(80),
481
+ height: V(80)
482
+ }), t("CandlestickSeries").setAll({
483
+ lowValueXGrouped: "low",
484
+ lowValueYGrouped: "low",
485
+ highValueXGrouped: "high",
486
+ highValueYGrouped: "high",
487
+ openValueXGrouped: "open",
488
+ openValueYGrouped: "open",
489
+ valueXGrouped: "close",
490
+ valueYGrouped: "close"
491
+ });
492
+ {
493
+ const a = t("Rectangle", ["column", "autocolor"]).states.create("riseFromOpen", {});
494
+ T(a, "fill", e, "positive"), T(a, "stroke", e, "positive");
495
+ }
496
+ {
497
+ const a = t("Rectangle", ["column", "autocolor"]).states.create("dropFromOpen", {});
498
+ T(a, "fill", e, "negative"), T(a, "stroke", e, "negative");
499
+ }
500
+ t("Rectangle", ["column", "autocolor", "pro"]).states.create("riseFromOpen", { fillOpacity: 0 }), t("Rectangle", ["column", "autocolor", "pro"]).states.create("dropFromOpen", { fillOpacity: 1 });
501
+ {
502
+ const a = t("Rectangle", ["column", "autocolor", "pro"]).states.create("riseFromPrevious", {});
503
+ T(a, "fill", e, "positive"), T(a, "stroke", e, "positive");
504
+ }
505
+ {
506
+ const a = t("Rectangle", ["column", "autocolor", "pro"]).states.create("dropFromPrevious", {});
507
+ T(a, "fill", e, "negative"), T(a, "stroke", e, "negative");
508
+ }
509
+ t("RoundedRectangle", ["rangegrip"]).setAll({
510
+ strokeOpacity: 0,
511
+ fillOpacity: 0,
512
+ strokeWidth: 1,
513
+ width: 12,
514
+ height: 12
515
+ });
516
+ {
517
+ const a = t("Graphics", ["rangegrip", "button", "icon"]);
518
+ a.setAll({
519
+ interactive: !1,
520
+ crisp: !0,
521
+ strokeOpacity: 0.5,
522
+ draw: (l) => {
523
+ l.moveTo(0, 0.5), l.lineTo(0, 12.5), l.moveTo(2, 0.5), l.lineTo(2, 12.5), l.moveTo(4, 0.5), l.lineTo(4, 12.5);
524
+ }
525
+ }), T(a, "stroke", e, "secondaryButtonText");
526
+ }
527
+ t("Button", ["rangegrip"]).setAll({
528
+ draggable: !0,
529
+ paddingTop: 0,
530
+ paddingBottom: 0
531
+ }), t("Button", ["rangegrip", "vertical"]).setAll({
532
+ rotation: 90,
533
+ cursorOverStyle: "ns-resize",
534
+ centerX: B
535
+ }), t("Button", ["rangegrip", "horizontal"]).setAll({
536
+ cursorOverStyle: "ew-resize",
537
+ centerX: B
538
+ }), t("Button", ["rangegrip", "vertical", "left"]).setAll({
539
+ centerY: k
540
+ }), t("Button", ["rangegrip", "vertical", "right"]).setAll({
541
+ centerY: 0
542
+ }), t("Button", ["rangegrip", "horizontal", "top"]).setAll({
543
+ centerY: 0
544
+ }), t("Button", ["rangegrip", "horizontal", "bottom"]).setAll({
545
+ centerY: k
546
+ });
547
+ }
548
+ }
549
+ class ee extends xe {
550
+ constructor() {
551
+ super(...arguments), Object.defineProperty(this, "xAxes", {
552
+ enumerable: !0,
553
+ configurable: !0,
554
+ writable: !0,
555
+ value: new ae()
556
+ }), Object.defineProperty(this, "yAxes", {
557
+ enumerable: !0,
558
+ configurable: !0,
559
+ writable: !0,
560
+ value: new ae()
561
+ }), Object.defineProperty(this, "topAxesContainer", {
562
+ enumerable: !0,
563
+ configurable: !0,
564
+ writable: !0,
565
+ value: this.chartContainer.children.push(Y.new(this._root, { width: k, layout: this._root.verticalLayout }))
566
+ }), Object.defineProperty(this, "yAxesAndPlotContainer", {
567
+ enumerable: !0,
568
+ configurable: !0,
569
+ writable: !0,
570
+ value: this.chartContainer.children.push(Y.new(this._root, { width: k, height: k, layout: this._root.horizontalLayout }))
571
+ }), Object.defineProperty(this, "bottomAxesContainer", {
572
+ enumerable: !0,
573
+ configurable: !0,
574
+ writable: !0,
575
+ value: this.chartContainer.children.push(Y.new(this._root, { width: k, layout: this._root.verticalLayout }))
576
+ }), Object.defineProperty(this, "leftAxesContainer", {
577
+ enumerable: !0,
578
+ configurable: !0,
579
+ writable: !0,
580
+ value: this.yAxesAndPlotContainer.children.push(Y.new(this._root, { height: k, layout: this._root.horizontalLayout }))
581
+ }), Object.defineProperty(this, "plotsContainer", {
582
+ enumerable: !0,
583
+ configurable: !0,
584
+ writable: !0,
585
+ value: this.yAxesAndPlotContainer.children.push(Y.new(this._root, { width: k, height: k, maskContent: !1 }))
586
+ }), Object.defineProperty(this, "plotContainer", {
587
+ enumerable: !0,
588
+ configurable: !0,
589
+ writable: !0,
590
+ value: this.plotsContainer.children.push(Y.new(this._root, { width: k, height: k }))
591
+ }), Object.defineProperty(this, "topPlotContainer", {
592
+ enumerable: !0,
593
+ configurable: !0,
594
+ writable: !0,
595
+ value: this.plotsContainer.children.push(Y.new(this._root, { width: k, height: k }))
596
+ }), Object.defineProperty(this, "gridContainer", {
597
+ enumerable: !0,
598
+ configurable: !0,
599
+ writable: !0,
600
+ value: this.plotContainer.children.push(Y.new(this._root, { width: k, height: k, isMeasured: !1 }))
601
+ }), Object.defineProperty(this, "topGridContainer", {
602
+ enumerable: !0,
603
+ configurable: !0,
604
+ writable: !0,
605
+ value: Y.new(this._root, { width: k, height: k, isMeasured: !1 })
606
+ }), Object.defineProperty(this, "rightAxesContainer", {
607
+ enumerable: !0,
608
+ configurable: !0,
609
+ writable: !0,
610
+ value: this.yAxesAndPlotContainer.children.push(Y.new(this._root, { height: k, layout: this._root.horizontalLayout }))
611
+ }), Object.defineProperty(this, "axisHeadersContainer", {
612
+ enumerable: !0,
613
+ configurable: !0,
614
+ writable: !0,
615
+ value: this.plotContainer.children.push(Y.new(this._root, {}))
616
+ }), Object.defineProperty(this, "zoomOutButton", {
617
+ enumerable: !0,
618
+ configurable: !0,
619
+ writable: !0,
620
+ value: this.topPlotContainer.children.push(Se.new(this._root, {
621
+ themeTags: ["zoom"],
622
+ icon: I.new(this._root, {
623
+ themeTags: ["button", "icon"]
624
+ })
625
+ }))
626
+ }), Object.defineProperty(this, "_movePoint", {
627
+ enumerable: !0,
628
+ configurable: !0,
629
+ writable: !0,
630
+ value: { x: 0, y: 0 }
631
+ }), Object.defineProperty(this, "_wheelDp", {
632
+ enumerable: !0,
633
+ configurable: !0,
634
+ writable: !0,
635
+ value: void 0
636
+ }), Object.defineProperty(this, "_otherCharts", {
637
+ enumerable: !0,
638
+ configurable: !0,
639
+ writable: !0,
640
+ value: void 0
641
+ }), Object.defineProperty(this, "_movePoints", {
642
+ enumerable: !0,
643
+ configurable: !0,
644
+ writable: !0,
645
+ value: {}
646
+ }), Object.defineProperty(this, "_downStartX", {
647
+ enumerable: !0,
648
+ configurable: !0,
649
+ writable: !0,
650
+ value: void 0
651
+ }), Object.defineProperty(this, "_downEndX", {
652
+ enumerable: !0,
653
+ configurable: !0,
654
+ writable: !0,
655
+ value: void 0
656
+ }), Object.defineProperty(this, "_downStartY", {
657
+ enumerable: !0,
658
+ configurable: !0,
659
+ writable: !0,
660
+ value: void 0
661
+ }), Object.defineProperty(this, "_downEndY", {
662
+ enumerable: !0,
663
+ configurable: !0,
664
+ writable: !0,
665
+ value: void 0
666
+ });
667
+ }
668
+ _afterNew() {
669
+ this._defaultThemes.push(Te.new(this._root)), super._afterNew(), this._disposers.push(this.xAxes), this._disposers.push(this.yAxes);
670
+ const e = this._root;
671
+ let i = this._root.verticalLayout;
672
+ const t = this.zoomOutButton;
673
+ t.events.on("click", () => {
674
+ this.zoomOut();
675
+ }), t.hide(0), t.states.lookup("default").set("opacity", 1), this.chartContainer.set("layout", i);
676
+ const s = this.plotContainer;
677
+ s.children.push(this.seriesContainer), this._disposers.push(this._processAxis(this.xAxes, this.bottomAxesContainer)), this._disposers.push(this._processAxis(this.yAxes, this.leftAxesContainer)), s.children.push(this.topGridContainer), s.children.push(this.bulletsContainer), s.set("interactive", !0), s.set("interactiveChildren", !1), s.set("background", ge.new(e, {
678
+ themeTags: ["plotbackground", "xy", "background"]
679
+ })), this._disposers.push(s.events.on("pointerdown", (r) => {
680
+ this._handlePlotDown(r);
681
+ })), this._disposers.push(s.events.on("globalpointerup", (r) => {
682
+ this._handlePlotUp(r);
683
+ })), this._disposers.push(s.events.on("globalpointermove", (r) => {
684
+ this._handlePlotMove(r);
685
+ })), this._maskGrid(), this._setUpTouch();
686
+ }
687
+ _beforeChanged() {
688
+ super._beforeChanged(), (this.isDirty("pinchZoomX") || this.isDirty("pinchZoomY") || this.get("panX") || this.get("panY")) && this._setUpTouch();
689
+ }
690
+ _setUpTouch() {
691
+ this.plotContainer._display.cancelTouch || (this.plotContainer._display.cancelTouch = !!(this.get("pinchZoomX") || this.get("pinchZoomY") || this.get("panX") || this.get("panY")));
692
+ }
693
+ _maskGrid() {
694
+ this.gridContainer.set("maskContent", !0), this.topGridContainer.set("maskContent", !0);
695
+ }
696
+ _removeSeries(e) {
697
+ e._unstack(), e._posXDp && e._posXDp.dispose(), e._posYDp && e._posYDp.dispose(), e.set("baseAxis", void 0);
698
+ const i = e.get("xAxis");
699
+ i && (U(i.series, e), i.markDirtyExtremes());
700
+ const t = e.get("yAxis");
701
+ t && (U(t.series, e), t.markDirtyExtremes());
702
+ const s = this.get("cursor");
703
+ if (s) {
704
+ const r = s.get("snapToSeries");
705
+ r && U(r, e);
706
+ }
707
+ super._removeSeries(e);
708
+ }
709
+ /**
710
+ * This method is invoked when mouse wheel is used over chart's plot
711
+ * container, and handles zooming/pan.
712
+ *
713
+ * You can invoke this method manually, if you need to mimic chart's wheel
714
+ * behavior over other elements of the chart.
715
+ */
716
+ handleWheel(e) {
717
+ const i = this.get("wheelX"), t = this.get("wheelY"), s = this.plotContainer, r = e.originalEvent;
718
+ let h = !1;
719
+ if (De(r, this))
720
+ h = !0;
721
+ else
722
+ return;
723
+ const o = s.toLocal(e.point), a = this.get("wheelStep", 0.2), l = r.deltaY / 100, u = r.deltaX / 100, n = this.get("wheelZoomPositionX"), d = this.get("wheelZoomPositionY");
724
+ (i === "zoomX" || i === "zoomXY") && u != 0 && this.xAxes.each((c) => {
725
+ if (c.get("zoomX")) {
726
+ let m = c.get("start"), g = c.get("end"), p = c.fixPosition(o.x / s.width());
727
+ n != null && (p = n);
728
+ let f = c.get("maxDeviation", 0), _ = Math.min(1 + f, Math.max(-f, m - a * (g - m) * u * p)), x = Math.max(-f, Math.min(1 + f, g + a * (g - m) * u * (1 - p)));
729
+ _ == m && x == g && (h = !1), 1 / (x - _) < c.getPrivate("maxZoomFactor", 1 / 0) / c.get("minZoomCount", 1) ? this._handleWheelAnimation(c.zoom(_, x)) : h = !1;
730
+ }
731
+ }), (t === "zoomX" || t === "zoomXY") && l != 0 && this.xAxes.each((c) => {
732
+ if (c.get("zoomX")) {
733
+ let m = c.get("start"), g = c.get("end"), p = c.fixPosition(o.x / s.width());
734
+ n != null && (p = n);
735
+ let f = c.get("maxDeviation", 0), _ = Math.min(1 + f, Math.max(-f, m - a * (g - m) * l * p)), x = Math.max(-f, Math.min(1 + f, g + a * (g - m) * l * (1 - p)));
736
+ _ == m && x == g && (h = !1), 1 / (x - _) < c.getPrivate("maxZoomFactor", 1 / 0) / c.get("minZoomCount", 1) ? this._handleWheelAnimation(c.zoom(_, x)) : h = !1;
737
+ }
738
+ }), (i === "zoomY" || i === "zoomXY") && u != 0 && this.yAxes.each((c) => {
739
+ if (c.get("zoomY")) {
740
+ let m = c.get("start"), g = c.get("end"), p = c.fixPosition(o.y / s.height());
741
+ d != null && (p = d);
742
+ let f = c.get("maxDeviation", 0), _ = Math.min(1 + f, Math.max(-f, m - a * (g - m) * u * p)), x = Math.max(-f, Math.min(1 + f, g + a * (g - m) * u * (1 - p)));
743
+ _ == m && x == g && (h = !1), 1 / (x - _) < c.getPrivate("maxZoomFactor", 1 / 0) / c.get("minZoomCount", 1) ? this._handleWheelAnimation(c.zoom(_, x)) : h = !1;
744
+ }
745
+ }), (t === "zoomY" || t === "zoomXY") && l != 0 && this.yAxes.each((c) => {
746
+ if (c.get("zoomY")) {
747
+ let m = c.get("start"), g = c.get("end"), p = c.fixPosition(o.y / s.height());
748
+ d != null && (p = d);
749
+ let f = c.get("maxDeviation", 0), _ = Math.min(1 + f, Math.max(-f, m - a * (g - m) * l * p)), x = Math.max(-f, Math.min(1 + f, g + a * (g - m) * l * (1 - p)));
750
+ _ == m && x == g && (h = !1), 1 / (x - _) < c.getPrivate("maxZoomFactor", 1 / 0) / c.get("minZoomCount", 1) ? this._handleWheelAnimation(c.zoom(_, x)) : h = !1;
751
+ }
752
+ }), (i === "panX" || i === "panXY") && u != 0 && this.xAxes.each((c) => {
753
+ if (c.get("panX")) {
754
+ let m = c.get("start"), g = c.get("end"), p = this._getWheelSign(c) * a * (g - m) * u, f = m + p, _ = g + p, x = this._fixWheel(f, _);
755
+ f = x[0], _ = x[1], f == m && _ == g && (h = !1), this._handleWheelAnimation(c.zoom(f, _));
756
+ }
757
+ }), (t === "panX" || t === "panXY") && l != 0 && this.xAxes.each((c) => {
758
+ if (c.get("panX")) {
759
+ let m = c.get("start"), g = c.get("end"), p = this._getWheelSign(c) * a * (g - m) * l, f = m + p, _ = g + p, x = this._fixWheel(f, _);
760
+ f = x[0], _ = x[1], f == m && _ == g && (h = !1), this._handleWheelAnimation(c.zoom(f, _));
761
+ }
762
+ }), (i === "panY" || i === "panXY") && u != 0 && this.yAxes.each((c) => {
763
+ if (c.get("panY")) {
764
+ let m = c.get("start"), g = c.get("end"), p = this._getWheelSign(c) * a * (g - m) * u, f = m + p, _ = g + p, x = this._fixWheel(f, _);
765
+ f = x[0], _ = x[1], f == m && _ == g && (h = !1), this._handleWheelAnimation(c.zoom(f, _));
766
+ }
767
+ }), (t === "panY" || t === "panXY") && l != 0 && this.yAxes.each((c) => {
768
+ if (c.get("panY")) {
769
+ let m = c.get("start"), g = c.get("end"), p = this._getWheelSign(c) * a * (g - m) * l, f = m - p, _ = g - p, x = this._fixWheel(f, _);
770
+ f = x[0], _ = x[1], f == m && _ == g && (h = !1), this._handleWheelAnimation(c.zoom(f, _));
771
+ }
772
+ }), h && r.preventDefault();
773
+ }
774
+ _handleSetWheel() {
775
+ const e = this.get("wheelX"), i = this.get("wheelY"), t = this.plotContainer;
776
+ e !== "none" || i !== "none" ? (this._wheelDp = t.events.on("wheel", (s) => {
777
+ const r = s.originalEvent;
778
+ (e !== "none" && Math.abs(r.deltaX) != 0 || i !== "none" && Math.abs(r.deltaY) != 0) && this.handleWheel(s);
779
+ }), this._disposers.push(this._wheelDp)) : this._wheelDp && this._wheelDp.dispose();
780
+ }
781
+ _getWheelSign(e) {
782
+ let i = 1;
783
+ return e.get("renderer").get("inversed") && (i = -1), i;
784
+ }
785
+ _fixWheel(e, i) {
786
+ const t = i - e;
787
+ return e < 0 && (e = 0, i = e + t), i > 1 && (i = 1, e = i - t), [e, i];
788
+ }
789
+ _handlePlotDown(e) {
790
+ const i = e.originalEvent;
791
+ if (i.button == 2)
792
+ return;
793
+ const t = this.plotContainer;
794
+ let s = t.toLocal(e.point);
795
+ if ((this.get("pinchZoomX") || this.get("pinchZoomY")) && i.pointerId && oe(t._downPoints).length > 0) {
796
+ const h = this.xAxes.getIndex(0), o = this.yAxes.getIndex(0);
797
+ h && (this._downStartX = h.get("start", 0), this._downEndX = h.get("end", 1)), o && (this._downStartY = o.get("start", 0), this._downEndY = o.get("end", 1));
798
+ }
799
+ if ((this.get("panX") || this.get("panY")) && s.x >= 0 && s.y >= 0 && s.x <= t.width() && s.y <= this.height()) {
800
+ this._downPoint = { x: i.clientX, y: i.clientY };
801
+ const r = this.get("panX"), h = this.get("panY");
802
+ r && this.xAxes.each((a) => {
803
+ a._panStart = a.get("start"), a._panEnd = a.get("end");
804
+ }), h && this.yAxes.each((a) => {
805
+ a._panStart = a.get("start"), a._panEnd = a.get("end");
806
+ });
807
+ const o = "panstarted";
808
+ this.events.isEnabled(o) && this.events.dispatch(o, { type: o, target: this, originalEvent: e.originalEvent });
809
+ }
810
+ }
811
+ _handleWheelAnimation(e) {
812
+ e ? e.events.on("stopped", () => {
813
+ this._dispatchWheelAnimation();
814
+ }) : this._dispatchWheelAnimation();
815
+ }
816
+ _dispatchWheelAnimation() {
817
+ const e = "wheelended";
818
+ this.events.isEnabled(e) && this.events.dispatch(e, { type: e, target: this });
819
+ }
820
+ _handlePlotUp(e) {
821
+ const i = this._downPoint;
822
+ if (i && (this.get("panX") || this.get("panY"))) {
823
+ if (e.originalEvent.clientX == i.x && e.originalEvent.clientY == i.y) {
824
+ const s = "pancancelled";
825
+ this.events.isEnabled(s) && this.events.dispatch(s, { type: s, target: this, originalEvent: e.originalEvent });
826
+ }
827
+ const t = "panended";
828
+ this.events.isEnabled(t) && this.events.dispatch(t, { type: t, target: this, originalEvent: e.originalEvent });
829
+ }
830
+ this._downPoint = void 0, this.xAxes.each((t) => {
831
+ t._isPanning = !1;
832
+ }), this.yAxes.each((t) => {
833
+ t._isPanning = !1;
834
+ });
835
+ }
836
+ _handlePlotMove(e) {
837
+ const i = this.plotContainer;
838
+ if (this.get("pinchZoomX") || this.get("pinchZoomY")) {
839
+ const r = e.originalEvent.pointerId;
840
+ if (r && (this._movePoints[r] = e.point, oe(i._downPoints).length > 1)) {
841
+ this._handlePinch();
842
+ return;
843
+ }
844
+ }
845
+ let t = this._downPoint;
846
+ if (t) {
847
+ t = i.toLocal(this._root.documentPointToRoot(t));
848
+ let s = i.toLocal(e.point);
849
+ const r = this.get("panX"), h = this.get("panY");
850
+ if (r) {
851
+ let o = this.get("scrollbarX");
852
+ o && o.events.disableType("rangechanged"), this.xAxes.each((a) => {
853
+ if (a.get("panX")) {
854
+ a._isPanning = !0;
855
+ let l = a._panStart, u = a._panEnd, d = (u - l) * (t.x - s.x) / i.width();
856
+ a.get("renderer").get("inversed") && (d *= -1);
857
+ let c = l + d, m = u + d;
858
+ m - c < 1 + a.get("maxDeviation", 1) * 2 && (a.set("start", c), a.set("end", m));
859
+ }
860
+ }), o && o.events.enableType("rangechanged");
861
+ }
862
+ if (h) {
863
+ let o = this.get("scrollbarY");
864
+ o && o.events.disableType("rangechanged"), this.yAxes.each((a) => {
865
+ if (a.get("panY")) {
866
+ a._isPanning = !0;
867
+ let l = a._panStart, u = a._panEnd, d = (u - l) * (t.y - s.y) / i.height();
868
+ a.get("renderer").get("inversed") && (d *= -1);
869
+ let c = l - d, m = u - d;
870
+ m - c < 1 + a.get("maxDeviation", 1) * 2 && (a.set("start", c), a.set("end", m));
871
+ }
872
+ }), o && o.events.enableType("rangechanged");
873
+ }
874
+ }
875
+ }
876
+ _handlePinch() {
877
+ const e = this.plotContainer;
878
+ let i = 0, t = [], s = [];
879
+ if (j(e._downPoints, (r, h) => {
880
+ t[i] = h;
881
+ let o = this._movePoints[r];
882
+ o && (s[i] = o), i++;
883
+ }), t.length > 1 && s.length > 1) {
884
+ const r = e.width(), h = e.height();
885
+ let o = t[0], a = t[1], l = s[0], u = s[1];
886
+ if (o && a && l && u) {
887
+ if (l = e.toLocal(l), u = e.toLocal(u), o = e.toLocal(o), a = e.toLocal(a), this.get("pinchZoomX")) {
888
+ const n = this._downStartX, d = this._downEndX;
889
+ if (n != null && d != null) {
890
+ o.x > a.x && ([o, a] = [a, o], [l, u] = [u, l]);
891
+ let c = n + o.x / r * (d - n), m = n + a.x / r * (d - n), g = n + l.x / r * (d - n), p = n + u.x / r * (d - n), f = Math.max(1e-3, m - c), _ = Math.max(1e-3, p - g), x = f / _, b = n * x + c - g * x, P = d * x + m - p * x;
892
+ this.xAxes.each((y) => {
893
+ let A = y.fixPosition(b), w = y.fixPosition(P);
894
+ y.zoom(A, w, 0);
895
+ });
896
+ }
897
+ }
898
+ if (this.get("pinchZoomY")) {
899
+ const n = this._downStartY, d = this._downEndY;
900
+ if (n != null && d != null) {
901
+ o.y < a.y && ([o, a] = [a, o], [l, u] = [u, l]);
902
+ let c = n + (1 - o.y / h) * (d - n), m = n + (1 - a.y / h) * (d - n), g = n + (1 - l.y / h) * (d - n), p = n + (1 - u.y / h) * (d - n), f = Math.max(1e-3, m - c), _ = Math.max(1e-3, p - g), x = f / _, b = n * x + c - g * x, P = d * x + m - p * x;
903
+ this.yAxes.each((y) => {
904
+ let A = y.fixPosition(b), w = y.fixPosition(P);
905
+ y.zoom(A, w, 0);
906
+ });
907
+ }
908
+ }
909
+ }
910
+ }
911
+ }
912
+ _handleCursorPosition() {
913
+ const e = this.get("cursor");
914
+ if (e) {
915
+ const i = e.getPrivate("point");
916
+ let t = e.get("snapToSeries");
917
+ if (e._downPoint && (t = void 0), t && i) {
918
+ const s = e.get("snapToSeriesBy"), r = [];
919
+ M(t, (a) => {
920
+ if (!a.isHidden() && !a.isHiding())
921
+ if (s != "x!" && s != "y!") {
922
+ const l = a.startIndex(), u = a.endIndex();
923
+ for (let n = l; n < u; n++) {
924
+ const d = a.dataItems[n];
925
+ d && !d.isHidden() && r.push(d);
926
+ }
927
+ } else {
928
+ const l = a.get("tooltipDataItem");
929
+ l && r.push(l);
930
+ }
931
+ });
932
+ let h = 1 / 0, o;
933
+ if (M(r, (a) => {
934
+ const l = a.get("point");
935
+ if (l) {
936
+ let u = 0;
937
+ s == "x" || s == "x!" ? u = Math.abs(i.x - l.x) : s == "y" || s == "y!" ? u = Math.abs(i.y - l.y) : u = Math.hypot(i.x - l.x, i.y - l.y), u < h && (h = u, o = a);
938
+ }
939
+ }), M(t, (a) => {
940
+ const l = a.get("tooltip");
941
+ l && l._setDataItem(void 0);
942
+ }), o) {
943
+ let a = o.component;
944
+ a.showDataItemTooltip(o), a.setRaw("tooltipDataItem", o);
945
+ const l = o.get("point");
946
+ l && e.handleMove(a.toGlobal({ x: l.x - a.x(), y: l.y - a.y() }), !0);
947
+ }
948
+ }
949
+ }
950
+ }
951
+ _updateCursor() {
952
+ let e = this.get("cursor");
953
+ e && e.updateCursor();
954
+ }
955
+ _addCursor(e) {
956
+ this.plotContainer.children.push(e);
957
+ }
958
+ _prepareChildren() {
959
+ if (super._prepareChildren(), this.series.each((e) => {
960
+ this._colorize(e);
961
+ }), (this.isDirty("wheelX") || this.isDirty("wheelY")) && this._handleSetWheel(), this.isDirty("cursor")) {
962
+ const e = this._prevSettings.cursor, i = this.get("cursor");
963
+ i !== e && (this._disposeProperty("cursor"), e && e.dispose(), i && (i._setChart(this), this._addCursor(i), this._pushPropertyDisposer("cursor", i.events.on("selectended", () => {
964
+ this._handleCursorSelectEnd();
965
+ }))), this._prevSettings.cursor = i);
966
+ }
967
+ if (this.isDirty("scrollbarX")) {
968
+ const e = this._prevSettings.scrollbarX, i = this.get("scrollbarX");
969
+ i !== e && (this._disposeProperty("scrollbarX"), e && e.dispose(), i && (i.parent || this.topAxesContainer.children.push(i), this._pushPropertyDisposer("scrollbarX", i.events.on("rangechanged", (t) => {
970
+ this._handleScrollbar(this.xAxes, t.start, t.end, t.grip);
971
+ })), this._pushPropertyDisposer("scrollbarX", i.events.on("released", () => {
972
+ this.xAxes.each((t) => {
973
+ t.get("zoomable") && this._handleAxisSelection(t);
974
+ });
975
+ })), i.setPrivate("positionTextFunction", (t) => {
976
+ const s = this.xAxes.getIndex(0);
977
+ return s && s.getTooltipText(t, !1) || "";
978
+ })), this._prevSettings.scrollbarX = i);
979
+ }
980
+ if (this.isDirty("scrollbarY")) {
981
+ const e = this._prevSettings.scrollbarY, i = this.get("scrollbarY");
982
+ i !== e && (this._disposeProperty("scrollbarY"), e && e.dispose(), i && (i.parent || this.rightAxesContainer.children.push(i), this._pushPropertyDisposer("scrollbarY", i.events.on("rangechanged", (t) => {
983
+ this._handleScrollbar(this.yAxes, t.start, t.end, t.grip);
984
+ })), this._pushPropertyDisposer("scrollbarY", i.events.on("released", () => {
985
+ this.yAxes.each((t) => {
986
+ t.get("zoomable") && this._handleAxisSelection(t);
987
+ });
988
+ })), i.setPrivate("positionTextFunction", (t) => {
989
+ const s = this.yAxes.getIndex(0);
990
+ return s && s.getTooltipText(t, !1) || "";
991
+ })), this._prevSettings.scrollbarY = i);
992
+ }
993
+ this._handleZoomOut();
994
+ }
995
+ _processSeries(e) {
996
+ super._processSeries(e);
997
+ const i = e.get("xAxis"), t = e.get("yAxis");
998
+ le(i.series, e), le(t.series, e), e._posXDp = e.addDisposer(i.events.on("positionchanged", () => {
999
+ e._fixPosition();
1000
+ })), e._posXDp = e.addDisposer(t.events.on("positionchanged", () => {
1001
+ e._fixPosition();
1002
+ })), e.get("baseAxis") || (t.isType("CategoryAxis") || t.isType("DateAxis") ? e.set("baseAxis", t) : e.set("baseAxis", i)), e.get("stacked") && (e._markDirtyKey("stacked"), M(e.dataItems, (s) => {
1003
+ s.set("stackToItemY", void 0), s.set("stackToItemX", void 0);
1004
+ })), e._markDirtyAxes(), t.markDirtyExtremes(), i.markDirtyExtremes(), i._seriesAdded = !0, t._seriesAdded = !0, this._colorize(e);
1005
+ }
1006
+ _colorize(e) {
1007
+ const i = this.get("colors");
1008
+ if (i && e.get("fill") == null) {
1009
+ const s = i.next();
1010
+ e._setSoft("stroke", s), e._setSoft("fill", s);
1011
+ }
1012
+ const t = this.get("patterns");
1013
+ if (t && e.get("fillPattern") == null) {
1014
+ const s = t.next();
1015
+ e._setSoft("fillPattern", s);
1016
+ }
1017
+ }
1018
+ _handleCursorSelectEnd() {
1019
+ const e = this.get("cursor"), i = e.get("behavior"), t = e.getPrivate("downPositionX", 0), s = e.getPrivate("downPositionY", 0), r = Math.min(1, Math.max(0, e.getPrivate("positionX", 0.5))), h = Math.min(1, Math.max(0, e.getPrivate("positionY", 0.5)));
1020
+ this.xAxes.each((o) => {
1021
+ if (i === "zoomX" || i === "zoomXY") {
1022
+ let a = o.toAxisPosition(t), l = o.toAxisPosition(r);
1023
+ o.zoom(a, l);
1024
+ }
1025
+ o.setPrivate("updateScrollbar", !0);
1026
+ }), this.yAxes.each((o) => {
1027
+ if (i === "zoomY" || i === "zoomXY") {
1028
+ let a = o.toAxisPosition(s), l = o.toAxisPosition(h);
1029
+ o.zoom(a, l);
1030
+ }
1031
+ o.setPrivate("updateScrollbar", !0);
1032
+ });
1033
+ }
1034
+ _handleScrollbar(e, i, t, s) {
1035
+ e.each((r) => {
1036
+ let h = r.fixPosition(i), o = r.fixPosition(t), a = r.zoom(h, o, void 0, s);
1037
+ const l = "updateScrollbar";
1038
+ r.setPrivateRaw(l, !1), a ? a.events.on("stopped", () => {
1039
+ r.setPrivateRaw(l, !0);
1040
+ }) : r.setPrivateRaw(l, !0);
1041
+ });
1042
+ }
1043
+ _processAxis(e, i) {
1044
+ return e.events.onAll((t) => {
1045
+ if (t.type === "clear")
1046
+ M(t.oldValues, (s) => {
1047
+ this._removeAxis(s);
1048
+ });
1049
+ else if (t.type === "push")
1050
+ i.children.push(t.newValue), t.newValue.processChart(this);
1051
+ else if (t.type === "setIndex")
1052
+ i.children.setIndex(t.index, t.newValue), t.newValue.processChart(this);
1053
+ else if (t.type === "insertIndex")
1054
+ i.children.insertIndex(t.index, t.newValue), t.newValue.processChart(this);
1055
+ else if (t.type === "removeIndex")
1056
+ this._removeAxis(t.oldValue);
1057
+ else if (t.type === "moveIndex")
1058
+ i.children.moveValue(t.value, t.newIndex), t.value.processChart(this);
1059
+ else
1060
+ throw new Error("Unknown IListEvent type");
1061
+ });
1062
+ }
1063
+ _removeAxis(e) {
1064
+ if (!e.isDisposed()) {
1065
+ const i = e.parent;
1066
+ i && i.children.removeValue(e);
1067
+ const t = e.gridContainer, s = t.parent;
1068
+ s && s.children.removeValue(t);
1069
+ const r = e.topGridContainer, h = r.parent;
1070
+ h && h.children.removeValue(r);
1071
+ }
1072
+ }
1073
+ _updateChartLayout() {
1074
+ const e = this.leftAxesContainer.width(), i = this.rightAxesContainer.width(), t = this.bottomAxesContainer;
1075
+ t.set("paddingLeft", e), t.set("paddingRight", i);
1076
+ const s = this.topAxesContainer;
1077
+ s.set("paddingLeft", e), s.set("paddingRight", i);
1078
+ }
1079
+ /**
1080
+ * @ignore
1081
+ */
1082
+ processAxis(e) {
1083
+ var i = this.get("cursor");
1084
+ i && (this.addDisposer(e.on("start", () => {
1085
+ this._updateCursor();
1086
+ })), this.addDisposer(e.on("end", () => {
1087
+ this._updateCursor();
1088
+ })));
1089
+ }
1090
+ _handleAxisSelection(e, i) {
1091
+ let t = e.fixPosition(e.get("start", 0)), s = e.fixPosition(e.get("end", 1));
1092
+ if (t > s && ([t, s] = [s, t]), this.xAxes.indexOf(e) != -1) {
1093
+ if (i || e.getPrivate("updateScrollbar")) {
1094
+ let r = this.get("scrollbarX");
1095
+ r && (!r.getPrivate("isBusy") || i) && (r.setRaw("start", t), r.setRaw("end", s), r.updateGrips());
1096
+ }
1097
+ } else if (this.yAxes.indexOf(e) != -1 && (i || e.getPrivate("updateScrollbar"))) {
1098
+ let r = this.get("scrollbarY");
1099
+ r && (!r.getPrivate("isBusy") || i) && (r.setRaw("start", t), r.setRaw("end", s), r.updateGrips());
1100
+ }
1101
+ this._handleZoomOut();
1102
+ }
1103
+ _handleZoomOut() {
1104
+ let e = this.zoomOutButton;
1105
+ if (e && e.parent) {
1106
+ let i = !1;
1107
+ this.xAxes.each((t) => {
1108
+ t.get("zoomOut", !0) && (C(t.get("start", 0), 5) != 0 || C(t.get("end", 1), 5) != 1) && (i = !0);
1109
+ }), this.yAxes.each((t) => {
1110
+ t.get("zoomOut", !0) && (C(t.get("start", 0), 5) != 0 || C(t.get("end", 1), 5) != 1) && (i = !0);
1111
+ }), i ? e.isHidden() && e.show() : e.hide();
1112
+ }
1113
+ }
1114
+ /**
1115
+ * Checks if point is within plot area.
1116
+ *
1117
+ * @param point Reference point
1118
+ * @return Is within plot area?
1119
+ */
1120
+ inPlot(e) {
1121
+ const i = this.plotContainer, t = this.getPrivate("otherCharts", this._otherCharts), s = i.toGlobal(e);
1122
+ if (e.x >= -0.5 && e.y >= -0.5 && e.x <= i.width() + 0.5 && e.y <= i.height() + 0.5)
1123
+ return !0;
1124
+ if (t)
1125
+ for (let r = t.length - 1; r >= 0; r--) {
1126
+ const h = t[r];
1127
+ if (h != this) {
1128
+ const o = h.plotContainer, a = this._root.rootPointToDocument(s), l = h._root.documentPointToRoot(a), u = o.toLocal(l);
1129
+ if (u.x >= -0.1 && u.y >= -0.1 && u.x <= o.width() + 0.1 && u.y <= o.height() + 0.1)
1130
+ return !0;
1131
+ }
1132
+ }
1133
+ return !1;
1134
+ }
1135
+ /**
1136
+ * @ignore
1137
+ */
1138
+ arrangeTooltips() {
1139
+ const e = this.plotContainer, i = e.width(), t = e.height();
1140
+ let s = this.height();
1141
+ const r = this._root.tooltipContainer.get("layerMargin");
1142
+ r && r.bottom > s && (s = r.bottom);
1143
+ let h = e._display.toGlobal({ x: 0, y: 0 }), o = e._display.toGlobal({ x: i, y: t });
1144
+ const a = [];
1145
+ let l = 0, u = 1 / 0, n = this._movePoint, d = this.get("maxTooltipDistance"), c = this.get("maxTooltipDistanceBy", "xy"), m, g;
1146
+ v(d) && this.series.each((f) => {
1147
+ if (!f.isHidden()) {
1148
+ const _ = f.get("tooltip");
1149
+ if (_) {
1150
+ let x = _.get("pointTo");
1151
+ if (x) {
1152
+ let b = Math.hypot(n.x - x.x, n.y - x.y);
1153
+ c == "x" ? b = Math.abs(n.x - x.x) : c == "y" && (b = Math.abs(n.y - x.y)), b < u && (u = b, m = f, g = x);
1154
+ }
1155
+ }
1156
+ }
1157
+ });
1158
+ const p = [];
1159
+ if (this.series.each((f) => {
1160
+ const _ = f.get("tooltip");
1161
+ if (_ && !_.get("forceHidden")) {
1162
+ let x = !1, b = _.get("pointTo");
1163
+ if (b) {
1164
+ if (d >= 0) {
1165
+ let P = _.get("pointTo");
1166
+ if (P && g && f != m) {
1167
+ let y = Math.hypot(g.x - P.x, g.y - P.y);
1168
+ c == "x" ? y = Math.abs(g.x - P.x) : c == "y" && (y = Math.abs(g.y - P.y)), y > d && (x = !0);
1169
+ }
1170
+ } else d == -1 && f != m && (x = !0);
1171
+ !this.inPlot(this._tooltipToLocal(b)) || !_.dataItem ? x = !0 : x || (l += b.y), x || f.isHidden() || f.isHiding() ? _.hide(0) : (_.show(), a.push(_), p.push(f));
1172
+ }
1173
+ }
1174
+ }), this.setPrivate("tooltipSeries", p), this.get("arrangeTooltips")) {
1175
+ let f = 0, _ = 0;
1176
+ const x = this._root.tooltipContainer, b = a.length;
1177
+ if (l / b > t / 2 + h.y) {
1178
+ a.sort((A, w) => he(w.get("pointTo").y, A.get("pointTo").y));
1179
+ let y = o.y;
1180
+ if (M(a, (A) => {
1181
+ let w = A.height();
1182
+ _++, f += w;
1183
+ let D = A.get("centerY");
1184
+ D instanceof ue && (w *= D.value), w += A.get("marginBottom", 0), A.set("bounds", { left: h.x, top: h.y, right: o.x, bottom: y }), A.setPrivate("customData", { left: h.x, top: h.y, right: o.x, bottom: y }), y = Math.min(y - w, A._fy - w), A.parent == x && x.children.moveValue(A, 0);
1185
+ }), y < 0) {
1186
+ a.reverse();
1187
+ let A = y;
1188
+ M(a, (w) => {
1189
+ _++;
1190
+ let D = w.get("bounds");
1191
+ if (D) {
1192
+ let S = D.top - y, X = D.bottom - y;
1193
+ S < A && (S = A, X = S + w.height()), w.set("bounds", { left: D.left, top: S, right: D.right, bottom: X }), A = D.bottom - y + w.get("marginBottom", 0);
1194
+ }
1195
+ });
1196
+ }
1197
+ } else {
1198
+ a.reverse(), a.sort((A, w) => he(A.get("pointTo").y, w.get("pointTo").y));
1199
+ let y = 0;
1200
+ if (M(a, (A) => {
1201
+ _++;
1202
+ let w = A.height();
1203
+ f += w;
1204
+ let D = A.get("centerY");
1205
+ D instanceof ue && (w *= D.value), w += A.get("marginBottom", 0), A.set("bounds", { left: h.x, top: y, right: o.x, bottom: Math.max(h.y + s, y + w) }), A.parent == x && x.children.moveValue(A, 0), y = Math.max(y + w, A._fy + w);
1206
+ }), y > s) {
1207
+ a.reverse();
1208
+ let A = s;
1209
+ M(a, (w) => {
1210
+ _++;
1211
+ let D = w.get("bounds");
1212
+ if (D) {
1213
+ let S = D.top - (s - y), X = D.bottom - (s - y);
1214
+ X > A && (X = A, S = X - w.height()), w.set("bounds", { left: D.left, top: S, right: D.right, bottom: X }), A = X - w.height() - w.get("marginBottom", 0);
1215
+ }
1216
+ });
1217
+ }
1218
+ }
1219
+ f == 0 && _ > 0 && this._disposers.push(this.root.events.once("frameended", () => {
1220
+ this.arrangeTooltips();
1221
+ }));
1222
+ }
1223
+ }
1224
+ _tooltipToLocal(e) {
1225
+ return this.plotContainer.toLocal(e);
1226
+ }
1227
+ /**
1228
+ * Fully zooms out the chart.
1229
+ */
1230
+ zoomOut() {
1231
+ this.xAxes.each((e) => {
1232
+ e.get("zoomOut", !0) && (e.setPrivate("updateScrollbar", !0), e.zoom(0, 1));
1233
+ }), this.yAxes.each((e) => {
1234
+ e.get("zoomOut", !0) && (e.setPrivate("updateScrollbar", !0), e.zoom(0, 1));
1235
+ });
1236
+ }
1237
+ _dispose() {
1238
+ super._dispose();
1239
+ const e = this.get("cursor");
1240
+ e && e.dispose();
1241
+ }
1242
+ }
1243
+ Object.defineProperty(ee, "className", {
1244
+ enumerable: !0,
1245
+ configurable: !0,
1246
+ writable: !0,
1247
+ value: "XYChart"
1248
+ });
1249
+ Object.defineProperty(ee, "classNames", {
1250
+ enumerable: !0,
1251
+ configurable: !0,
1252
+ writable: !0,
1253
+ value: xe.classNames.concat([ee.className])
1254
+ });
1255
+ class H extends I {
1256
+ _beforeChanged() {
1257
+ super._beforeChanged(), (this.isPrivateDirty("width") || this.isPrivateDirty("height")) && (this._clear = !0);
1258
+ }
1259
+ }
1260
+ Object.defineProperty(H, "className", {
1261
+ enumerable: !0,
1262
+ configurable: !0,
1263
+ writable: !0,
1264
+ value: "Grid"
1265
+ });
1266
+ Object.defineProperty(H, "classNames", {
1267
+ enumerable: !0,
1268
+ configurable: !0,
1269
+ writable: !0,
1270
+ value: I.classNames.concat([H.className])
1271
+ });
1272
+ function Ce(O, e) {
1273
+ return O == null ? e : e == null ? O : e < O ? e : O;
1274
+ }
1275
+ function Oe(O, e) {
1276
+ return O == null ? e : e == null || O > e ? O : e;
1277
+ }
1278
+ class te extends pe {
1279
+ constructor() {
1280
+ super(...arguments), Object.defineProperty(this, "_xField", {
1281
+ enumerable: !0,
1282
+ configurable: !0,
1283
+ writable: !0,
1284
+ value: void 0
1285
+ }), Object.defineProperty(this, "_yField", {
1286
+ enumerable: !0,
1287
+ configurable: !0,
1288
+ writable: !0,
1289
+ value: void 0
1290
+ }), Object.defineProperty(this, "_xOpenField", {
1291
+ enumerable: !0,
1292
+ configurable: !0,
1293
+ writable: !0,
1294
+ value: void 0
1295
+ }), Object.defineProperty(this, "_yOpenField", {
1296
+ enumerable: !0,
1297
+ configurable: !0,
1298
+ writable: !0,
1299
+ value: void 0
1300
+ }), Object.defineProperty(this, "_xLowField", {
1301
+ enumerable: !0,
1302
+ configurable: !0,
1303
+ writable: !0,
1304
+ value: void 0
1305
+ }), Object.defineProperty(this, "_xHighField", {
1306
+ enumerable: !0,
1307
+ configurable: !0,
1308
+ writable: !0,
1309
+ value: void 0
1310
+ }), Object.defineProperty(this, "_yLowField", {
1311
+ enumerable: !0,
1312
+ configurable: !0,
1313
+ writable: !0,
1314
+ value: void 0
1315
+ }), Object.defineProperty(this, "_yHighField", {
1316
+ enumerable: !0,
1317
+ configurable: !0,
1318
+ writable: !0,
1319
+ value: void 0
1320
+ }), Object.defineProperty(this, "_axesDirty", {
1321
+ enumerable: !0,
1322
+ configurable: !0,
1323
+ writable: !0,
1324
+ value: !1
1325
+ }), Object.defineProperty(this, "_stackDirty", {
1326
+ enumerable: !0,
1327
+ configurable: !0,
1328
+ writable: !0,
1329
+ value: !1
1330
+ }), Object.defineProperty(this, "_selectionProcessed", {
1331
+ enumerable: !0,
1332
+ configurable: !0,
1333
+ writable: !0,
1334
+ value: !1
1335
+ }), Object.defineProperty(this, "_dataSets", {
1336
+ enumerable: !0,
1337
+ configurable: !0,
1338
+ writable: !0,
1339
+ value: {}
1340
+ }), Object.defineProperty(this, "_mainContainerMask", {
1341
+ enumerable: !0,
1342
+ configurable: !0,
1343
+ writable: !0,
1344
+ value: void 0
1345
+ }), Object.defineProperty(this, "_x", {
1346
+ enumerable: !0,
1347
+ configurable: !0,
1348
+ writable: !0,
1349
+ value: 0
1350
+ }), Object.defineProperty(this, "_y", {
1351
+ enumerable: !0,
1352
+ configurable: !0,
1353
+ writable: !0,
1354
+ value: 0
1355
+ }), Object.defineProperty(this, "_bullets", {
1356
+ enumerable: !0,
1357
+ configurable: !0,
1358
+ writable: !0,
1359
+ value: {}
1360
+ }), Object.defineProperty(this, "mainContainer", {
1361
+ enumerable: !0,
1362
+ configurable: !0,
1363
+ writable: !0,
1364
+ value: this.children.push(Y.new(this._root, {}))
1365
+ }), Object.defineProperty(this, "axisRanges", {
1366
+ enumerable: !0,
1367
+ configurable: !0,
1368
+ writable: !0,
1369
+ value: new me()
1370
+ }), Object.defineProperty(this, "_skipped", {
1371
+ enumerable: !0,
1372
+ configurable: !0,
1373
+ writable: !0,
1374
+ value: !1
1375
+ }), Object.defineProperty(this, "_couldStackTo", {
1376
+ enumerable: !0,
1377
+ configurable: !0,
1378
+ writable: !0,
1379
+ value: []
1380
+ }), Object.defineProperty(this, "_reallyStackedTo", {
1381
+ enumerable: !0,
1382
+ configurable: !0,
1383
+ writable: !0,
1384
+ value: {}
1385
+ }), Object.defineProperty(this, "_stackedSeries", {
1386
+ enumerable: !0,
1387
+ configurable: !0,
1388
+ writable: !0,
1389
+ value: {}
1390
+ }), Object.defineProperty(this, "_aLocationX0", {
1391
+ enumerable: !0,
1392
+ configurable: !0,
1393
+ writable: !0,
1394
+ value: 0
1395
+ }), Object.defineProperty(this, "_aLocationX1", {
1396
+ enumerable: !0,
1397
+ configurable: !0,
1398
+ writable: !0,
1399
+ value: 1
1400
+ }), Object.defineProperty(this, "_aLocationY0", {
1401
+ enumerable: !0,
1402
+ configurable: !0,
1403
+ writable: !0,
1404
+ value: 0
1405
+ }), Object.defineProperty(this, "_aLocationY1", {
1406
+ enumerable: !0,
1407
+ configurable: !0,
1408
+ writable: !0,
1409
+ value: 1
1410
+ }), Object.defineProperty(this, "_showBullets", {
1411
+ enumerable: !0,
1412
+ configurable: !0,
1413
+ writable: !0,
1414
+ value: !0
1415
+ }), Object.defineProperty(this, "valueXFields", {
1416
+ enumerable: !0,
1417
+ configurable: !0,
1418
+ writable: !0,
1419
+ value: [
1420
+ "valueX",
1421
+ "openValueX",
1422
+ "lowValueX",
1423
+ "highValueX"
1424
+ ]
1425
+ }), Object.defineProperty(this, "valueYFields", {
1426
+ enumerable: !0,
1427
+ configurable: !0,
1428
+ writable: !0,
1429
+ value: [
1430
+ "valueY",
1431
+ "openValueY",
1432
+ "lowValueY",
1433
+ "highValueY"
1434
+ ]
1435
+ }), Object.defineProperty(this, "_valueXFields", {
1436
+ enumerable: !0,
1437
+ configurable: !0,
1438
+ writable: !0,
1439
+ value: void 0
1440
+ }), Object.defineProperty(this, "_valueYFields", {
1441
+ enumerable: !0,
1442
+ configurable: !0,
1443
+ writable: !0,
1444
+ value: void 0
1445
+ }), Object.defineProperty(this, "_valueXShowFields", {
1446
+ enumerable: !0,
1447
+ configurable: !0,
1448
+ writable: !0,
1449
+ value: void 0
1450
+ }), Object.defineProperty(this, "_valueYShowFields", {
1451
+ enumerable: !0,
1452
+ configurable: !0,
1453
+ writable: !0,
1454
+ value: void 0
1455
+ }), Object.defineProperty(this, "__valueXShowFields", {
1456
+ enumerable: !0,
1457
+ configurable: !0,
1458
+ writable: !0,
1459
+ value: void 0
1460
+ }), Object.defineProperty(this, "__valueYShowFields", {
1461
+ enumerable: !0,
1462
+ configurable: !0,
1463
+ writable: !0,
1464
+ value: void 0
1465
+ }), Object.defineProperty(this, "_emptyDataItem", {
1466
+ enumerable: !0,
1467
+ configurable: !0,
1468
+ writable: !0,
1469
+ value: new Z(this, void 0, {})
1470
+ }), Object.defineProperty(this, "_dataSetId", {
1471
+ enumerable: !0,
1472
+ configurable: !0,
1473
+ writable: !0,
1474
+ value: void 0
1475
+ }), Object.defineProperty(this, "_tooltipFieldX", {
1476
+ enumerable: !0,
1477
+ configurable: !0,
1478
+ writable: !0,
1479
+ value: void 0
1480
+ }), Object.defineProperty(this, "_tooltipFieldY", {
1481
+ enumerable: !0,
1482
+ configurable: !0,
1483
+ writable: !0,
1484
+ value: void 0
1485
+ }), Object.defineProperty(this, "_posXDp", {
1486
+ enumerable: !0,
1487
+ configurable: !0,
1488
+ writable: !0,
1489
+ value: void 0
1490
+ }), Object.defineProperty(this, "_posYDp", {
1491
+ enumerable: !0,
1492
+ configurable: !0,
1493
+ writable: !0,
1494
+ value: void 0
1495
+ });
1496
+ }
1497
+ _afterNew() {
1498
+ this.fields.push("categoryX", "categoryY", "openCategoryX", "openCategoryY"), this.valueFields.push("valueX", "valueY", "openValueX", "openValueY", "lowValueX", "lowValueY", "highValueX", "highValueY"), this._setRawDefault("vcx", 1), this._setRawDefault("vcy", 1), this._setRawDefault("valueXShow", "valueXWorking"), this._setRawDefault("valueYShow", "valueYWorking"), this._setRawDefault("openValueXShow", "openValueXWorking"), this._setRawDefault("openValueYShow", "openValueYWorking"), this._setRawDefault("lowValueXShow", "lowValueXWorking"), this._setRawDefault("lowValueYShow", "lowValueYWorking"), this._setRawDefault("highValueXShow", "highValueXWorking"), this._setRawDefault("highValueYShow", "highValueYWorking"), this._setRawDefault("lowValueXGrouped", "low"), this._setRawDefault("lowValueYGrouped", "low"), this._setRawDefault("highValueXGrouped", "high"), this._setRawDefault("highValueYGrouped", "high"), super._afterNew(), this.set("maskContent", !0), this._disposers.push(this.axisRanges.events.onAll((e) => {
1499
+ if (e.type === "clear")
1500
+ M(e.oldValues, (i) => {
1501
+ this._removeAxisRange(i);
1502
+ });
1503
+ else if (e.type === "push")
1504
+ this._processAxisRange(e.newValue);
1505
+ else if (e.type === "setIndex")
1506
+ this._processAxisRange(e.newValue);
1507
+ else if (e.type === "insertIndex")
1508
+ this._processAxisRange(e.newValue);
1509
+ else if (e.type === "removeIndex")
1510
+ this._removeAxisRange(e.oldValue);
1511
+ else if (e.type === "moveIndex")
1512
+ this._processAxisRange(e.value);
1513
+ else
1514
+ throw new Error("Unknown IStreamEvent type");
1515
+ })), this.states.create("hidden", { opacity: 1, visible: !1 }), this.onPrivate("startIndex", () => {
1516
+ this.root.events.once("frameended", () => {
1517
+ this.updateLegendValue();
1518
+ });
1519
+ }), this.onPrivate("endIndex", () => {
1520
+ this.root.events.once("frameended", () => {
1521
+ this.updateLegendValue();
1522
+ });
1523
+ }), this._makeFieldNames();
1524
+ }
1525
+ _processAxisRange(e) {
1526
+ const i = Y.new(this._root, {});
1527
+ e.container = i, this.children.push(i), e.series = this;
1528
+ const t = e.axisDataItem;
1529
+ t.setRaw("isRange", !0);
1530
+ const s = t.component;
1531
+ if (s) {
1532
+ s._processAxisRange(t, ["range", "series"]);
1533
+ const r = t.get("bullet");
1534
+ if (r) {
1535
+ const o = r.get("sprite");
1536
+ o && o.setPrivate("visible", !1);
1537
+ }
1538
+ const h = t.get("axisFill");
1539
+ h && i.set("mask", h), s._seriesAxisRanges.push(t);
1540
+ }
1541
+ }
1542
+ _onDataClear() {
1543
+ super._onDataClear(), j(this._dataSets, (e, i) => {
1544
+ M(i, (t) => {
1545
+ t.dispose();
1546
+ }), i.length = 0;
1547
+ });
1548
+ }
1549
+ _removeAxisRange(e) {
1550
+ const i = e.axisDataItem, t = i.component;
1551
+ i.dispose(), U(t._seriesAxisRanges, i);
1552
+ const s = e.container;
1553
+ s && s.dispose();
1554
+ }
1555
+ _updateFields() {
1556
+ super._updateFields(), this._valueXFields = [], this._valueYFields = [], this._valueXShowFields = [], this._valueYShowFields = [], this.__valueXShowFields = [], this.__valueYShowFields = [], this.valueXFields && M(this.valueXFields, (e) => {
1557
+ if (this.get(e + "Field")) {
1558
+ this._valueXFields.push(e);
1559
+ let t = this.get(e + "Show");
1560
+ this.__valueXShowFields.push(t), t.indexOf("Working") != -1 ? this._valueXShowFields.push(t.split("Working")[0]) : this._valueXShowFields.push(t);
1561
+ }
1562
+ }), this.valueYFields && M(this.valueYFields, (e) => {
1563
+ if (this.get(e + "Field")) {
1564
+ this._valueYFields.push(e);
1565
+ let t = this.get(e + "Show");
1566
+ this.__valueYShowFields.push(t), t.indexOf("Working") != -1 ? this._valueYShowFields.push(t.split("Working")[0]) : this._valueYShowFields.push(t);
1567
+ }
1568
+ });
1569
+ }
1570
+ _dispose() {
1571
+ super._dispose(), this._bullets = {};
1572
+ const e = this.chart;
1573
+ e && e.series.removeValue(this), ce(this.get("xAxis").series, this), ce(this.get("yAxis").series, this);
1574
+ }
1575
+ // TODO use SelectKeys<this["_privateSettings"], number | undefined>
1576
+ _min(e, i) {
1577
+ let t = Ce(this.getPrivate(e), i);
1578
+ this.setPrivate(e, t);
1579
+ }
1580
+ // TODO use SelectKeys<this["_privateSettings"], number | undefined>
1581
+ _max(e, i) {
1582
+ let t = Oe(this.getPrivate(e), i);
1583
+ this.setPrivate(e, t);
1584
+ }
1585
+ _shouldMakeBullet(e) {
1586
+ const i = this.get("xAxis"), t = this.get("yAxis"), s = this.get("baseAxis");
1587
+ if (!i.inited || !t.inited)
1588
+ return !1;
1589
+ const r = this.get("minBulletDistance", 0);
1590
+ if (r > 0) {
1591
+ let h = this.startIndex(), a = this.endIndex() - h;
1592
+ if (i == s) {
1593
+ if (i.get("renderer").axisLength() / a < r / 5)
1594
+ return !1;
1595
+ } else if (t == s && t.get("renderer").axisLength() / a < r / 5)
1596
+ return !1;
1597
+ }
1598
+ return e.get(this._xField) != null && e.get(this._yField) != null;
1599
+ }
1600
+ _makeFieldNames() {
1601
+ const e = this.get("xAxis"), i = this.get("yAxis"), t = e.getPrivate("name"), s = de(t), r = i.getPrivate("name"), h = de(r), o = e.get("renderer").getPrivate("letter"), a = i.get("renderer").getPrivate("letter"), l = "open", u = "low", n = "high", d = "Show";
1602
+ e.className === "ValueAxis" ? (this._xField = this.get(t + o + d), this._xOpenField = this.get(l + s + o + d), this._xLowField = this.get(u + s + o + d), this._xHighField = this.get(n + s + o + d)) : (this._xField = t + o, this._xOpenField = l + s + o, this._xLowField = u + s + o, this._xHighField = n + s + o), i.className === "ValueAxis" ? (this._yField = this.get(r + a + d), this._yOpenField = this.get(l + h + a + d), this._yLowField = this.get(u + h + a + d), this._yHighField = this.get(n + h + a + d)) : (this._yField = r + a, this._yOpenField = l + h + a, this._yLowField = u + h + a, this._yHighField = n + h + a);
1603
+ }
1604
+ _fixVC() {
1605
+ const e = this.get("xAxis"), i = this.get("yAxis"), t = this.get("baseAxis"), s = this.states.lookup("hidden"), r = this.get("sequencedInterpolation");
1606
+ if (s) {
1607
+ let h = 0;
1608
+ r && (h = 0.999999999999), e === t ? s.set("vcy", h) : (i === t || s.set("vcy", h), s.set("vcx", h));
1609
+ }
1610
+ }
1611
+ _handleMaskBullets() {
1612
+ this.isDirty("maskBullets") && this.bulletsContainer.set("maskContent", this.get("maskBullets"));
1613
+ }
1614
+ _fixPosition() {
1615
+ const e = this.get("xAxis"), i = this.get("yAxis");
1616
+ this.set("x", e.x() - fe(e.get("centerX", 0), e.width()) - e.parent.get("paddingLeft", 0)), this.set("y", i.y() - fe(i.get("centerY", 0), i.height()) - i.parent.get("paddingTop", 0)), this.bulletsContainer.set("y", this.y()), this.bulletsContainer.set("x", this.x());
1617
+ }
1618
+ _prepareChildren() {
1619
+ super._prepareChildren(), this._bullets = {}, (this.isDirty("valueYShow") || this.isDirty("valueXShow") || this.isDirty("openValueYShow") || this.isDirty("openValueXShow") || this.isDirty("lowValueYShow") || this.isDirty("lowValueXShow") || this.isDirty("highValueYShow") || this.isDirty("highValueXShow")) && (this._updateFields(), this._makeFieldNames(), this._valuesDirty = !0), (this.isDirty("xAxis") || this.isDirty("yAxis")) && (this._valuesDirty = !0), this.set("width", this.get("xAxis").width()), this.set("height", this.get("yAxis").height()), this._handleMaskBullets();
1620
+ const e = this.get("xAxis"), i = this.get("yAxis"), t = this.get("baseAxis"), s = this.get("tooltipPositionX");
1621
+ let r;
1622
+ switch (s) {
1623
+ case "open":
1624
+ r = this._xOpenField;
1625
+ break;
1626
+ case "low":
1627
+ r = this._xLowField;
1628
+ break;
1629
+ case "high":
1630
+ r = this._xHighField;
1631
+ break;
1632
+ default:
1633
+ r = this._xField;
1634
+ }
1635
+ this._tooltipFieldX = r;
1636
+ const h = this.get("tooltipPositionY");
1637
+ let o;
1638
+ switch (h) {
1639
+ case "open":
1640
+ o = this._yOpenField;
1641
+ break;
1642
+ case "low":
1643
+ o = this._yLowField;
1644
+ break;
1645
+ case "high":
1646
+ o = this._yHighField;
1647
+ break;
1648
+ default:
1649
+ o = this._yField;
1650
+ }
1651
+ this._tooltipFieldY = o, this.isDirty("baseAxis") && this._fixVC(), this._fixPosition();
1652
+ const a = this.get("stacked");
1653
+ if (this.isDirty("stacked") && (a ? this._valuesDirty && !this._dataProcessed || this._stack() : this._unstack()), this._valuesDirty && !this._dataProcessed && (this._dataProcessed = !0, a && this._stack(), M(this.dataItems, (l) => {
1654
+ M(this._valueXShowFields, (u) => {
1655
+ let n = l.get(u);
1656
+ n != null && (a && (n += this.getStackedXValue(l, u)), this._min("minX", n), this._max("maxX", n));
1657
+ }), M(this._valueYShowFields, (u) => {
1658
+ let n = l.get(u);
1659
+ n != null && (a && (n += this.getStackedYValue(l, u)), this._min("minY", n), this._max("maxY", n));
1660
+ }), e.processSeriesDataItem(l, this._valueXFields), i.processSeriesDataItem(l, this._valueYFields);
1661
+ }), e._seriesValuesDirty = !0, i._seriesValuesDirty = !0, this.get("ignoreMinMax") || ((this.isPrivateDirty("minX") || this.isPrivateDirty("maxX")) && e.markDirtyExtremes(), (this.isPrivateDirty("minY") || this.isPrivateDirty("maxY")) && i.markDirtyExtremes()), this._markStakedDirtyStack(), this.get("tooltipDataItem") || this.updateLegendValue(void 0)), (this.isDirty("vcx") || this.isDirty("vcy")) && this._markStakedDirtyStack(), this._dataGrouped || (e._groupSeriesData(this), i._groupSeriesData(this), this._dataGrouped = !0), this._valuesDirty || this.isPrivateDirty("startIndex") || this.isPrivateDirty("adjustedStartIndex") || this.isPrivateDirty("endIndex") || this.isDirty("vcx") || this.isDirty("vcy") || this._stackDirty || this._sizeDirty) {
1662
+ let l = this.startIndex(), u = this.endIndex(), n = this.get("minBulletDistance", 0);
1663
+ if (n > 0 && t && (t.get("renderer").axisLength() / (u - l) > n ? this._showBullets = !0 : this._showBullets = !1), (this._psi != l || this._pei != u || this.isDirty("vcx") || this.isDirty("vcy") || this.isPrivateDirty("adjustedStartIndex") || this._stackDirty || this._valuesDirty) && !this._selectionProcessed) {
1664
+ this._selectionProcessed = !0;
1665
+ const d = this.get("vcx", 1), c = this.get("vcy", 1), m = this.get("stacked", !1), g = this.getPrivate("outOfSelection");
1666
+ if (t === e || !t)
1667
+ if (i._calculateTotals(), this.setPrivateRaw("selectionMinY", void 0), this.setPrivateRaw("selectionMaxY", void 0), g)
1668
+ i.markDirtySelectionExtremes();
1669
+ else
1670
+ for (let p = l; p < u; p++)
1671
+ this.processYSelectionDataItem(this.dataItems[p], c, m);
1672
+ if (t === i || !t)
1673
+ if (e._calculateTotals(), this.setPrivateRaw("selectionMinX", void 0), this.setPrivateRaw("selectionMaxX", void 0), g)
1674
+ i.markDirtySelectionExtremes();
1675
+ else
1676
+ for (let p = l; p < u; p++)
1677
+ this.processXSelectionDataItem(this.dataItems[p], d, m);
1678
+ if ((t === e || !t) && (this.get("valueYShow") !== "valueYWorking" || this.get("useSelectionExtremes"))) {
1679
+ const p = this.getPrivate("selectionMinY");
1680
+ p != null && (this.setPrivateRaw("minY", p), i.markDirtyExtremes());
1681
+ const f = this.getPrivate("selectionMaxY");
1682
+ f != null && (this.setPrivateRaw("maxY", f), i.markDirtyExtremes());
1683
+ }
1684
+ if ((t === i || !t) && (this.get("valueXShow") !== "valueXWorking" || this.get("useSelectionExtremes"))) {
1685
+ const p = this.getPrivate("selectionMinX");
1686
+ p != null && (this.setPrivateRaw("minX", p), i.markDirtyExtremes());
1687
+ const f = this.getPrivate("selectionMaxX");
1688
+ f != null && (this.setPrivateRaw("maxX", f), e.markDirtyExtremes());
1689
+ }
1690
+ (this.isPrivateDirty("selectionMinX") || this.isPrivateDirty("selectionMaxX")) && e.markDirtySelectionExtremes(), (this.isPrivateDirty("selectionMinY") || this.isPrivateDirty("selectionMaxY")) && i.markDirtySelectionExtremes();
1691
+ }
1692
+ }
1693
+ }
1694
+ _makeRangeMask() {
1695
+ if (this.axisRanges.length > 0) {
1696
+ let e = this._mainContainerMask;
1697
+ e == null && (e = this.children.push(I.new(this._root, {})), this._mainContainerMask = e, e.set("draw", (i, t) => {
1698
+ const s = this.parent;
1699
+ if (s) {
1700
+ const r = this._root.container.width(), h = this._root.container.height();
1701
+ i.moveTo(-r, -h), i.lineTo(-r, h * 2), i.lineTo(r * 2, h * 2), i.lineTo(r * 2, -h), i.lineTo(-r, -h), this.axisRanges.each((o) => {
1702
+ const a = o.axisDataItem.get("axisFill");
1703
+ if (s && a) {
1704
+ let l = a.get("draw");
1705
+ l && l(i, t);
1706
+ }
1707
+ });
1708
+ }
1709
+ this.mainContainer._display.mask = e._display;
1710
+ })), e.markDirty(), e._markDirtyKey("fill");
1711
+ } else
1712
+ this.mainContainer._display.mask = null;
1713
+ }
1714
+ _updateChildren() {
1715
+ super._updateChildren(), this._x = this.x(), this._y = this.y(), this._makeRangeMask();
1716
+ }
1717
+ _stack() {
1718
+ const e = this.chart;
1719
+ if (e) {
1720
+ const i = e.series.indexOf(this);
1721
+ if (this._couldStackTo = [], i > 0) {
1722
+ let t;
1723
+ for (let s = i - 1; s >= 0 && (t = e.series.getIndex(s), !(t.get("xAxis") === this.get("xAxis") && t.get("yAxis") === this.get("yAxis") && t.className === this.className && (this._couldStackTo.push(t), !t.get("stacked")))); s--)
1724
+ ;
1725
+ }
1726
+ this._stackDataItems();
1727
+ }
1728
+ }
1729
+ _unstack() {
1730
+ j(this._reallyStackedTo, (e, i) => {
1731
+ delete i._stackedSeries[this.uid];
1732
+ }), this._reallyStackedTo = {}, M(this.dataItems, (e) => {
1733
+ e.setRaw("stackToItemY", void 0), e.setRaw("stackToItemX", void 0);
1734
+ });
1735
+ }
1736
+ _handleRemoved() {
1737
+ const e = this.get("xAxis");
1738
+ e && e._handleSeriesRemoved();
1739
+ const i = this.get("yAxis");
1740
+ i && i._handleSeriesRemoved();
1741
+ }
1742
+ _stackDataItems() {
1743
+ const e = this.get("baseAxis"), i = this.get("xAxis"), t = this.get("yAxis");
1744
+ let s, r;
1745
+ e === i ? (s = "valueY", r = "stackToItemY") : e === t && (s = "valueX", r = "stackToItemX");
1746
+ let h = this._couldStackTo.length, o = 0;
1747
+ const a = this.get("stackToNegative");
1748
+ this._reallyStackedTo = {}, M(this.dataItems, (l) => {
1749
+ for (let u = 0; u < h; u++) {
1750
+ let n = this._couldStackTo[u], d = n.dataItems[o], c = l.get(s);
1751
+ if (d) {
1752
+ let m = d.get(s);
1753
+ if (a)
1754
+ if (v(c)) {
1755
+ if (v(m)) {
1756
+ if (u == h - 1 && l.setRaw(r, void 0), c >= 0 && m >= 0) {
1757
+ l.setRaw(r, d), this._reallyStackedTo[n.uid] = n, n._stackedSeries[this.uid] = this;
1758
+ break;
1759
+ }
1760
+ if (c < 0 && m < 0) {
1761
+ l.setRaw(r, d), this._reallyStackedTo[n.uid] = n, n._stackedSeries[this.uid] = this;
1762
+ break;
1763
+ }
1764
+ }
1765
+ } else
1766
+ break;
1767
+ else if (v(c) && v(m)) {
1768
+ l.setRaw(r, d), this._reallyStackedTo[n.uid] = n, n._stackedSeries[this.uid] = this;
1769
+ break;
1770
+ }
1771
+ }
1772
+ }
1773
+ o++;
1774
+ });
1775
+ }
1776
+ processXSelectionDataItem(e, i, t) {
1777
+ M(this.__valueXShowFields, (s) => {
1778
+ let r = e.get(s);
1779
+ r != null && (t && (r += this.getStackedXValueWorking(e, s)), this._min("selectionMinX", r), this._max("selectionMaxX", r * i));
1780
+ });
1781
+ }
1782
+ processYSelectionDataItem(e, i, t) {
1783
+ M(this.__valueYShowFields, (s) => {
1784
+ let r = e.get(s);
1785
+ r != null && (t && (r += this.getStackedYValueWorking(e, s)), this._min("selectionMinY", r), this._max("selectionMaxY", r * i));
1786
+ });
1787
+ }
1788
+ /**
1789
+ * @ignore
1790
+ */
1791
+ getStackedYValueWorking(e, i) {
1792
+ const t = e.get("stackToItemY");
1793
+ if (t) {
1794
+ const s = t.component;
1795
+ return t.get(i, 0) * s.get("vcy", 1) + this.getStackedYValueWorking(t, i);
1796
+ }
1797
+ return 0;
1798
+ }
1799
+ /**
1800
+ * @ignore
1801
+ */
1802
+ getStackedXValueWorking(e, i) {
1803
+ const t = e.get("stackToItemX");
1804
+ if (t) {
1805
+ const s = t.component;
1806
+ return t.get(i, 0) * s.get("vcx", 1) + this.getStackedXValueWorking(t, i);
1807
+ }
1808
+ return 0;
1809
+ }
1810
+ /**
1811
+ * @ignore
1812
+ */
1813
+ getStackedYValue(e, i) {
1814
+ const t = e.get("stackToItemY");
1815
+ return t ? t.get(i, 0) + this.getStackedYValue(t, i) : 0;
1816
+ }
1817
+ /**
1818
+ * @ignore
1819
+ */
1820
+ getStackedXValue(e, i) {
1821
+ const t = e.get("stackToItemX");
1822
+ return t ? t.get(i, 0) + this.getStackedXValue(t, i) : 0;
1823
+ }
1824
+ /**
1825
+ * @ignore
1826
+ */
1827
+ createLegendMarker(e) {
1828
+ this.updateLegendMarker();
1829
+ }
1830
+ _markDirtyAxes() {
1831
+ this._axesDirty = !0, this.markDirty();
1832
+ }
1833
+ _markDataSetDirty() {
1834
+ this._afterDataChange(), this._valuesDirty = !0, this._dataProcessed = !1, this._aggregatesCalculated = !1, this.markDirty();
1835
+ }
1836
+ _clearDirty() {
1837
+ super._clearDirty(), this._axesDirty = !1, this._selectionProcessed = !1, this._stackDirty = !1, this._dataProcessed = !1;
1838
+ }
1839
+ _positionBullet(e) {
1840
+ let i = e.get("sprite");
1841
+ if (i) {
1842
+ let t = i.dataItem, s = e.get("locationX", t.get("locationX", 0.5)), r = e.get("locationY", t.get("locationY", 0.5)), h = this.get("xAxis"), o = this.get("yAxis"), a = this.get("exactLocationX", !1), l = this.get("exactLocationY", !1), u = h.getDataItemPositionX(t, this._xField, s, this.get("vcx", 1), a), n = o.getDataItemPositionY(t, this._yField, r, this.get("vcy", 1), l), d = this.getPoint(u, n), c = t.get("left", d.x), m = t.get("right", d.x), g = t.get("top", d.y), p = t.get("bottom", d.y), f = 0, _ = 0, x = m - c, b = p - g;
1843
+ if (this._shouldShowBullet(u, n)) {
1844
+ i.setPrivate("visible", !e.getPrivate("hidden"));
1845
+ let P = e.get("field");
1846
+ const y = this.get("baseAxis"), A = this.get("xAxis"), w = this.get("yAxis");
1847
+ if (P != null) {
1848
+ let S;
1849
+ y == A ? (P == "value" ? S = this._yField : P == "open" ? S = this._yOpenField : P == "high" ? S = this._yHighField : P == "low" && (S = this._yLowField), S && (n = w.getDataItemPositionY(t, S, 0, this.get("vcy", 1), l), d = w.get("renderer").positionToPoint(n), _ = d.y, f = c + x * s)) : (P == "value" ? S = this._xField : P == "open" ? S = this._xOpenField : P == "high" ? S = this._xHighField : P == "low" && (S = this._xLowField), S && (u = A.getDataItemPositionX(t, S, 0, this.get("vcx", 1), a), d = A.get("renderer").positionToPoint(u), f = d.x, _ = p - b * r));
1850
+ } else
1851
+ f = c + x * s, _ = p - b * r;
1852
+ const D = e.get("stacked");
1853
+ if (D) {
1854
+ const S = this.chart;
1855
+ if (y == A) {
1856
+ let X = this._bullets[u + "_" + n];
1857
+ if (X) {
1858
+ let R = X.bounds(), L = i.localBounds(), $ = _;
1859
+ _ = R.top, D == "down" ? _ = R.bottom - L.top : D == "auto" ? S && ($ < S.plotContainer.height() / 2 ? _ = R.bottom - L.top : _ += L.bottom) : _ += L.bottom;
1860
+ }
1861
+ this._bullets[u + "_" + n] = i;
1862
+ } else {
1863
+ let X = this._bullets[u + "_" + n];
1864
+ if (X) {
1865
+ let R = X.bounds(), L = i.localBounds(), $ = f;
1866
+ f = R.right, D == "down" ? f = R.left - L.right : D == "auto" ? S && ($ < S.plotContainer.width() / 2 ? f = R.left - L.right : f -= L.left) : f -= L.left;
1867
+ }
1868
+ this._bullets[u + "_" + n] = i;
1869
+ }
1870
+ }
1871
+ i.isType("Label") && (i.setPrivate("maxWidth", Math.abs(x)), i.setPrivate("maxHeight", Math.abs(b))), i.setAll({ x: f, y: _ });
1872
+ } else
1873
+ i.setPrivate("visible", !1);
1874
+ }
1875
+ }
1876
+ _shouldShowBullet(e, i) {
1877
+ return this._showBullets;
1878
+ }
1879
+ /**
1880
+ * @ignore
1881
+ */
1882
+ setDataSet(e) {
1883
+ if (this._dataSets[e]) {
1884
+ this._handleDataSetChange(), this._dataItems = this._dataSets[e], this._markDataSetDirty(), this._dataSetId = e;
1885
+ const i = "datasetchanged";
1886
+ this.events.isEnabled(i) && this.events.dispatch(i, { type: i, target: this, id: e });
1887
+ }
1888
+ }
1889
+ /**
1890
+ * @ignore
1891
+ */
1892
+ resetGrouping() {
1893
+ j(this._dataSets, (e, i) => {
1894
+ i != this._mainDataItems && M(i, (t) => {
1895
+ t.dispose();
1896
+ });
1897
+ }), this._dataSets = {}, this._dataItems = this.mainDataItems;
1898
+ }
1899
+ _handleDataSetChange() {
1900
+ M(this._dataItems, (e) => {
1901
+ let i = e.bullets;
1902
+ i && M(i, (t) => {
1903
+ if (t) {
1904
+ let s = t.get("sprite");
1905
+ s && s.setPrivate("visible", !1);
1906
+ }
1907
+ });
1908
+ }), this._selectionProcessed = !1;
1909
+ }
1910
+ /**
1911
+ * Shows hidden series.
1912
+ *
1913
+ * @param duration Duration of animation in milliseconds
1914
+ * @return Animation promise
1915
+ */
1916
+ show(e) {
1917
+ const i = Object.create(null, {
1918
+ show: { get: () => super.show }
1919
+ });
1920
+ return N(this, void 0, void 0, function* () {
1921
+ this._fixVC();
1922
+ let t = [];
1923
+ t.push(i.show.call(this, e).then(() => {
1924
+ this._isShowing = !1;
1925
+ let s = this.get("xAxis"), r = this.get("yAxis"), h = this.get("baseAxis");
1926
+ r !== h && r.markDirtySelectionExtremes(), s !== h && s.markDirtySelectionExtremes();
1927
+ })), t.push(this.bulletsContainer.show(e)), t.push(this._sequencedShowHide(!0, e)), yield Promise.all(t);
1928
+ });
1929
+ }
1930
+ /**
1931
+ * Hides series.
1932
+ *
1933
+ * @param duration Duration of animation in milliseconds
1934
+ * @return Animation promise
1935
+ */
1936
+ hide(e) {
1937
+ const i = Object.create(null, {
1938
+ hide: { get: () => super.hide }
1939
+ });
1940
+ return N(this, void 0, void 0, function* () {
1941
+ this._fixVC();
1942
+ let t = [];
1943
+ t.push(i.hide.call(this, e).then(() => {
1944
+ this._isHiding = !1;
1945
+ })), t.push(this.bulletsContainer.hide(e)), t.push(this._sequencedShowHide(!1, e)), yield Promise.all(t);
1946
+ });
1947
+ }
1948
+ /**
1949
+ * Shows series's data item.
1950
+ *
1951
+ * @param dataItem Data item
1952
+ * @param duration Animation duration in milliseconds
1953
+ * @return Promise
1954
+ */
1955
+ showDataItem(e, i) {
1956
+ const t = Object.create(null, {
1957
+ showDataItem: { get: () => super.showDataItem }
1958
+ });
1959
+ return N(this, void 0, void 0, function* () {
1960
+ const s = [t.showDataItem.call(this, e, i)];
1961
+ v(i) || (i = this.get("stateAnimationDuration", 0));
1962
+ const r = this.get("stateAnimationEasing");
1963
+ M(this._valueFields, (h) => {
1964
+ s.push(e.animate({ key: h + "Working", to: e.get(h), duration: i, easing: r }).waitForStop());
1965
+ }), yield Promise.all(s);
1966
+ });
1967
+ }
1968
+ /**
1969
+ * Hides series's data item.
1970
+ *
1971
+ * @param dataItem Data item
1972
+ * @param duration Animation duration in milliseconds
1973
+ * @return Promise
1974
+ */
1975
+ hideDataItem(e, i) {
1976
+ const t = Object.create(null, {
1977
+ hideDataItem: { get: () => super.hideDataItem }
1978
+ });
1979
+ return N(this, void 0, void 0, function* () {
1980
+ const s = [t.hideDataItem.call(this, e, i)];
1981
+ let r = this.states.lookup("hidden");
1982
+ r || (r = this.states.create("hidden", {})), v(i) || (i = r.get("stateAnimationDuration", this.get("stateAnimationDuration", 0)));
1983
+ const h = r.get("stateAnimationEasing", this.get("stateAnimationEasing")), o = this.get("xAxis"), a = this.get("yAxis"), l = this.get("baseAxis"), u = this.get("stacked");
1984
+ if ((l === o || !l) && M(this._valueYFields, (n) => {
1985
+ let d = a.getPrivate("min"), c = a.baseValue();
1986
+ v(d) && d > c && (c = d), u && (c = 0), e.get(n) != null && s.push(e.animate({ key: n + "Working", to: c, duration: i, easing: h }).waitForStop());
1987
+ }), l === a || !l) {
1988
+ let n = o.getPrivate("min"), d = o.baseValue();
1989
+ v(n) && n > d && (d = n), u && (d = 0), M(this._valueXFields, (c) => {
1990
+ e.get(c) != null && s.push(e.animate({ key: c + "Working", to: d, duration: i, easing: h }).waitForStop());
1991
+ });
1992
+ }
1993
+ yield Promise.all(s);
1994
+ });
1995
+ }
1996
+ _markDirtyStack() {
1997
+ this._stackDirty = !0, this.markDirty(), this._markStakedDirtyStack();
1998
+ }
1999
+ _markStakedDirtyStack() {
2000
+ const e = this._stackedSeries;
2001
+ e && j(e, (i, t) => {
2002
+ t._stackDirty || t._markDirtyStack();
2003
+ });
2004
+ }
2005
+ _afterChanged() {
2006
+ super._afterChanged(), this._skipped && (this._markDirtyAxes(), this._skipped = !1);
2007
+ }
2008
+ /**
2009
+ * Shows a tooltip for specific data item.
2010
+ *
2011
+ * @param dataItem Data item
2012
+ */
2013
+ showDataItemTooltip(e) {
2014
+ this.getPrivate("doNotUpdateLegend") || (this.updateLegendMarker(e), this.updateLegendValue(e));
2015
+ const i = this.get("tooltip"), t = this.get("exactLocationX", !1), s = this.get("exactLocationY", !1);
2016
+ if (i)
2017
+ if (!this.isHidden() && this.get("visible")) {
2018
+ if (i._setDataItem(e), e) {
2019
+ let r = this.get("locationX", 0), h = this.get("locationY", 1), o = e.get("locationX", r), a = e.get("locationY", h);
2020
+ const l = this.get("xAxis"), u = this.get("yAxis"), n = this.get("vcx", 1), d = this.get("vcy", 1), c = l.getDataItemPositionX(e, this._tooltipFieldX, this._aLocationX0 + (this._aLocationX1 - this._aLocationX0) * o, n, t), m = u.getDataItemPositionY(e, this._tooltipFieldY, this._aLocationY0 + (this._aLocationY1 - this._aLocationY0) * a, d, s), g = this.getPoint(c, m);
2021
+ let p = !0;
2022
+ if (M(this._valueFields, (f) => {
2023
+ e.get(f) == null && (p = !1);
2024
+ }), p) {
2025
+ const f = this.chart;
2026
+ f && f.inPlot(g) ? (i.label.text.markDirtyText(), i.set("tooltipTarget", this._getTooltipTarget(e)), i.set("pointTo", this._display.toGlobal({ x: g.x, y: g.y }))) : i._setDataItem(void 0);
2027
+ } else
2028
+ i._setDataItem(void 0);
2029
+ }
2030
+ } else
2031
+ this.hideTooltip();
2032
+ }
2033
+ hideTooltip() {
2034
+ const e = this.get("tooltip");
2035
+ return e && e.set("tooltipTarget", this), super.hideTooltip();
2036
+ }
2037
+ _getTooltipTarget(e) {
2038
+ if (this.get("seriesTooltipTarget") == "bullet") {
2039
+ const i = e.bullets;
2040
+ if (i && i.length > 0) {
2041
+ const s = i[0].get("sprite");
2042
+ if (s)
2043
+ return s;
2044
+ }
2045
+ }
2046
+ return this;
2047
+ }
2048
+ /**
2049
+ * @ignore
2050
+ */
2051
+ updateLegendValue(e) {
2052
+ const i = this.get("legendDataItem");
2053
+ if (i) {
2054
+ const t = i.get("label");
2055
+ if (t) {
2056
+ let r = "";
2057
+ e ? (t._setDataItem(e), r = this.get("legendLabelText", t.get("text", this.get("name", "")))) : (t._setDataItem(this._emptyDataItem), r = this.get("legendRangeLabelText", this.get("legendLabelText", t.get("text", this.get("name", ""))))), t.set("text", r);
2058
+ }
2059
+ const s = i.get("valueLabel");
2060
+ if (s) {
2061
+ let r = "";
2062
+ e ? (s._setDataItem(e), r = this.get("legendValueText", s.get("text", ""))) : (s._setDataItem(this._emptyDataItem), r = this.get("legendRangeValueText", s.get("text", ""))), s.set("text", r);
2063
+ }
2064
+ }
2065
+ }
2066
+ _getItemReaderLabel() {
2067
+ let e = "X: {" + this._xField;
2068
+ return this.get("xAxis").isType("DateAxis") && (e += ".formatDate()"), e += "}; Y: {" + this._yField, this.get("yAxis").isType("DateAxis") && (e += ".formatDate()"), e += "}", e;
2069
+ }
2070
+ /**
2071
+ * @ignore
2072
+ */
2073
+ getPoint(e, i) {
2074
+ let t = this.get("xAxis").get("renderer").positionToCoordinate(e), s = this.get("yAxis").get("renderer").positionToCoordinate(i), r = 999999999;
2075
+ return s < -r && (s = -r), s > r && (s = r), t < -r && (t = -r), t > r && (t = r), { x: t, y: s };
2076
+ }
2077
+ _shouldInclude(e) {
2078
+ return !0;
2079
+ }
2080
+ /**
2081
+ * @ignore
2082
+ */
2083
+ handleCursorHide() {
2084
+ this.hideTooltip(), this.updateLegendValue(void 0), this.updateLegendMarker(void 0);
2085
+ }
2086
+ _afterDataChange() {
2087
+ super._afterDataChange(), this.get("xAxis")._markDirtyKey("start"), this.get("yAxis")._markDirtyKey("start"), this.resetExtremes();
2088
+ }
2089
+ /**
2090
+ * Resets cached axis scale values.
2091
+ */
2092
+ resetExtremes() {
2093
+ this.setPrivate("selectionMinX", void 0), this.setPrivate("selectionMaxX", void 0), this.setPrivate("selectionMinY", void 0), this.setPrivate("selectionMaxY", void 0), this.setPrivate("minX", void 0), this.setPrivate("minY", void 0), this.setPrivate("maxX", void 0), this.setPrivate("maxY", void 0);
2094
+ }
2095
+ /**
2096
+ * Creates and returns an axis range object.
2097
+ *
2098
+ * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/axis-ranges/} for more info
2099
+ * @param axisDataItem Axis data item
2100
+ * @return Axis range
2101
+ */
2102
+ createAxisRange(e) {
2103
+ return this.axisRanges.push({
2104
+ axisDataItem: e
2105
+ });
2106
+ }
2107
+ /**
2108
+ * A list of series's main (ungrouped) data items.
2109
+ *
2110
+ * @return Data items
2111
+ */
2112
+ get mainDataItems() {
2113
+ return this._mainDataItems;
2114
+ }
2115
+ /**
2116
+ * @ignore
2117
+ */
2118
+ _adjustStartIndex(e) {
2119
+ const i = this.get("xAxis");
2120
+ if (this.get("baseAxis") == i && i.isType("DateAxis")) {
2121
+ const s = i.baseDuration(), r = i.getPrivate("selectionMin", i.getPrivate("min", 0)), h = s * this.get("locationX", 0.5);
2122
+ let o = -1 / 0;
2123
+ for (; o < r; ) {
2124
+ const a = this.dataItems[e];
2125
+ if (a) {
2126
+ const l = a.open;
2127
+ if (l ? o = l.valueX : o = a.get("valueX", 0), o += h, o < r)
2128
+ e++;
2129
+ else
2130
+ break;
2131
+ } else
2132
+ break;
2133
+ }
2134
+ }
2135
+ return e;
2136
+ }
2137
+ }
2138
+ Object.defineProperty(te, "className", {
2139
+ enumerable: !0,
2140
+ configurable: !0,
2141
+ writable: !0,
2142
+ value: "XYSeries"
2143
+ });
2144
+ Object.defineProperty(te, "classNames", {
2145
+ enumerable: !0,
2146
+ configurable: !0,
2147
+ writable: !0,
2148
+ value: pe.classNames.concat([te.className])
2149
+ });
2150
+ class E extends be {
2151
+ constructor() {
2152
+ super(...arguments), Object.defineProperty(this, "_series", {
2153
+ enumerable: !0,
2154
+ configurable: !0,
2155
+ writable: !0,
2156
+ value: []
2157
+ }), Object.defineProperty(this, "_isPanning", {
2158
+ enumerable: !0,
2159
+ configurable: !0,
2160
+ writable: !0,
2161
+ value: !1
2162
+ }), Object.defineProperty(this, "minorDataItems", {
2163
+ enumerable: !0,
2164
+ configurable: !0,
2165
+ writable: !0,
2166
+ value: []
2167
+ }), Object.defineProperty(this, "labelsContainer", {
2168
+ enumerable: !0,
2169
+ configurable: !0,
2170
+ writable: !0,
2171
+ value: this.children.push(Y.new(this._root, {}))
2172
+ }), Object.defineProperty(this, "gridContainer", {
2173
+ enumerable: !0,
2174
+ configurable: !0,
2175
+ writable: !0,
2176
+ value: Y.new(this._root, { width: k, height: k })
2177
+ }), Object.defineProperty(this, "topGridContainer", {
2178
+ enumerable: !0,
2179
+ configurable: !0,
2180
+ writable: !0,
2181
+ value: Y.new(this._root, { width: k, height: k })
2182
+ }), Object.defineProperty(this, "bulletsContainer", {
2183
+ enumerable: !0,
2184
+ configurable: !0,
2185
+ writable: !0,
2186
+ value: this.children.push(Y.new(this._root, { isMeasured: !1, width: k, height: k, position: "absolute" }))
2187
+ }), Object.defineProperty(this, "chart", {
2188
+ enumerable: !0,
2189
+ configurable: !0,
2190
+ writable: !0,
2191
+ value: void 0
2192
+ }), Object.defineProperty(this, "_rangesDirty", {
2193
+ enumerable: !0,
2194
+ configurable: !0,
2195
+ writable: !0,
2196
+ value: !1
2197
+ }), Object.defineProperty(this, "_panStart", {
2198
+ enumerable: !0,
2199
+ configurable: !0,
2200
+ writable: !0,
2201
+ value: 0
2202
+ }), Object.defineProperty(this, "_panEnd", {
2203
+ enumerable: !0,
2204
+ configurable: !0,
2205
+ writable: !0,
2206
+ value: 1
2207
+ }), Object.defineProperty(this, "_sAnimation", {
2208
+ enumerable: !0,
2209
+ configurable: !0,
2210
+ writable: !0,
2211
+ value: void 0
2212
+ }), Object.defineProperty(this, "_eAnimation", {
2213
+ enumerable: !0,
2214
+ configurable: !0,
2215
+ writable: !0,
2216
+ value: void 0
2217
+ }), Object.defineProperty(this, "_skipSync", {
2218
+ enumerable: !0,
2219
+ configurable: !0,
2220
+ writable: !0,
2221
+ value: !1
2222
+ }), Object.defineProperty(this, "axisRanges", {
2223
+ enumerable: !0,
2224
+ configurable: !0,
2225
+ writable: !0,
2226
+ value: new me()
2227
+ }), Object.defineProperty(this, "_seriesAxisRanges", {
2228
+ enumerable: !0,
2229
+ configurable: !0,
2230
+ writable: !0,
2231
+ value: []
2232
+ }), Object.defineProperty(this, "ghostLabel", {
2233
+ enumerable: !0,
2234
+ configurable: !0,
2235
+ writable: !0,
2236
+ value: void 0
2237
+ }), Object.defineProperty(this, "_cursorPosition", {
2238
+ enumerable: !0,
2239
+ configurable: !0,
2240
+ writable: !0,
2241
+ value: -1
2242
+ }), Object.defineProperty(this, "_snapToSeries", {
2243
+ enumerable: !0,
2244
+ configurable: !0,
2245
+ writable: !0,
2246
+ value: void 0
2247
+ }), Object.defineProperty(this, "_seriesValuesDirty", {
2248
+ enumerable: !0,
2249
+ configurable: !0,
2250
+ writable: !0,
2251
+ value: !1
2252
+ }), Object.defineProperty(this, "_seriesAdded", {
2253
+ enumerable: !0,
2254
+ configurable: !0,
2255
+ writable: !0,
2256
+ value: !1
2257
+ }), Object.defineProperty(this, "axisHeader", {
2258
+ enumerable: !0,
2259
+ configurable: !0,
2260
+ writable: !0,
2261
+ value: this.children.push(Y.new(this._root, {
2262
+ themeTags: ["axis", "header"],
2263
+ position: "absolute",
2264
+ background: ge.new(this._root, {
2265
+ themeTags: ["header", "background"],
2266
+ fill: this._root.interfaceColors.get("background")
2267
+ })
2268
+ }))
2269
+ }), Object.defineProperty(this, "_bullets", {
2270
+ enumerable: !0,
2271
+ configurable: !0,
2272
+ writable: !0,
2273
+ value: {}
2274
+ });
2275
+ }
2276
+ _dispose() {
2277
+ this.gridContainer.dispose(), this.topGridContainer.dispose(), this.bulletsContainer.dispose(), this.labelsContainer.dispose(), this.axisHeader.dispose(), super._dispose();
2278
+ }
2279
+ _afterNew() {
2280
+ super._afterNew(), this.setPrivate("updateScrollbar", !0), this._disposers.push(this.axisRanges.events.onAll((i) => {
2281
+ if (i.type === "clear")
2282
+ M(i.oldValues, (t) => {
2283
+ t.dispose();
2284
+ });
2285
+ else if (i.type === "push")
2286
+ this._processAxisRange(i.newValue, ["range"]);
2287
+ else if (i.type === "setIndex")
2288
+ this._processAxisRange(i.newValue, ["range"]);
2289
+ else if (i.type === "insertIndex")
2290
+ this._processAxisRange(i.newValue, ["range"]);
2291
+ else if (i.type === "removeIndex")
2292
+ this.disposeDataItem(i.oldValue);
2293
+ else if (i.type === "moveIndex")
2294
+ this._processAxisRange(i.value, ["range"]);
2295
+ else
2296
+ throw new Error("Unknown IStreamEvent type");
2297
+ }));
2298
+ const e = this.get("renderer");
2299
+ e && (e.axis = this, e.processAxis()), this.children.push(e), this._createGhostLabel();
2300
+ }
2301
+ _createGhostLabel() {
2302
+ const i = this.get("renderer").makeLabel(new Z(this, void 0, {}), []);
2303
+ i.adapters.disable("text"), i.setAll({ opacity: 0, tooltipText: void 0, tooltipHTML: void 0, interactive: !1 }), i.events.disable(), this.ghostLabel = i;
2304
+ }
2305
+ _updateFinals(e, i) {
2306
+ }
2307
+ /**
2308
+ * Zooms the axis to relative locations.
2309
+ *
2310
+ * Both `start` and `end` are relative: 0 means start of the axis, 1 - end.
2311
+ *
2312
+ * @param start Relative start
2313
+ * @param end Relative end
2314
+ * @param duration Duration of the zoom animation in milliseconds
2315
+ * @return Zoom animation
2316
+ */
2317
+ zoom(e, i, t, s) {
2318
+ if (this.get("zoomable", !0))
2319
+ if (this._updateFinals(e, i), this.get("start") !== e || this.get("end") != i) {
2320
+ let r = this._sAnimation, h = this._eAnimation;
2321
+ e > i && ([e, i] = [i, e]);
2322
+ let o = this.get("maxDeviation", 0.5) * Math.min(1, i - e);
2323
+ e < -o && (e = -o), i > 1 + o && (i = 1 + o);
2324
+ let a = this.getPrivate("maxZoomFactor", this.get("maxZoomFactor", 100)), l = a;
2325
+ v(t) || (t = this.get("interpolationDuration", 0)), s || (s = "end"), i === 1 && e !== 0 && (e < this.get("start", 0) ? s = "start" : s = "end"), e === 0 && i !== 1 && (i > this.get("end", 1) ? s = "end" : s = "start");
2326
+ let u = this.get("minZoomCount", 0);
2327
+ const n = this.dataItems;
2328
+ n && n.length < u && (u = n.length);
2329
+ let d = this.get("maxZoomCount", 1 / 0);
2330
+ v(u) && (a = l / u);
2331
+ let c = 1;
2332
+ if (v(d) && (c = l / d), e > i && ([e, i] = [i, e]), s === "start" ? (d > 0 && 1 / (i - e) < c && (i = e + 1 / c), 1 / (i - e) > a && (i = e + 1 / a), i > 1 && i - e < 1 / a && (e = i - 1 / a)) : (d > 0 && 1 / (i - e) < c && (e = i - 1 / c), 1 / (i - e) > a && (e = i - 1 / a), e < 0 && i - e < 1 / a && (i = e + 1 / a)), 1 / (i - e) > a && (i = e + 1 / a), 1 / (i - e) > a && (e = i - 1 / a), d != null && u != null && e == this.get("start") && i == this.get("end")) {
2333
+ const m = this.chart;
2334
+ m && m._handleAxisSelection(this, !0);
2335
+ }
2336
+ if ((r && r.playing && r.to == e || this.get("start") == e) && (h && h.playing && h.to == i || this.get("end") == i))
2337
+ return;
2338
+ if (t > 0) {
2339
+ let m = this.get("interpolationEasing"), g, p;
2340
+ if (this.get("start") != e && (g = this.animate({ key: "start", to: e, duration: t, easing: m })), this.get("end") != i && (p = this.animate({ key: "end", to: i, duration: t, easing: m })), this._sAnimation = g, this._eAnimation = p, g)
2341
+ return g;
2342
+ if (p)
2343
+ return p;
2344
+ } else
2345
+ this.set("start", e), this.set("end", i), this.root.events.once("frameended", () => {
2346
+ this.markDirtyKey("start");
2347
+ });
2348
+ } else
2349
+ this._sAnimation && this._sAnimation.stop(), this._eAnimation && this._eAnimation.stop();
2350
+ }
2351
+ /**
2352
+ * A list of series using this axis.
2353
+ *
2354
+ * @return Series
2355
+ */
2356
+ get series() {
2357
+ return this._series;
2358
+ }
2359
+ _processAxisRange(e, i) {
2360
+ e.setRaw("isRange", !0), this._createAssets(e, i), this._rangesDirty = !0, this._prepareDataItem(e);
2361
+ const t = e.get("above"), s = this.topGridContainer, r = e.get("grid");
2362
+ t && r && s.children.moveValue(r);
2363
+ const h = e.get("axisFill");
2364
+ t && h && s.children.moveValue(h);
2365
+ }
2366
+ _prepareDataItem(e, i) {
2367
+ }
2368
+ /**
2369
+ * @ignore
2370
+ */
2371
+ markDirtyExtremes() {
2372
+ }
2373
+ /**
2374
+ * @ignore
2375
+ */
2376
+ markDirtySelectionExtremes() {
2377
+ }
2378
+ _calculateTotals() {
2379
+ }
2380
+ _updateAxisRanges() {
2381
+ this._bullets = {}, this.axisRanges.each((e) => {
2382
+ this._prepareDataItem(e);
2383
+ }), M(this._seriesAxisRanges, (e) => {
2384
+ this._prepareDataItem(e);
2385
+ });
2386
+ }
2387
+ _prepareChildren() {
2388
+ super._prepareChildren();
2389
+ const e = this.ghostLabel;
2390
+ if (e && (this.get("fixAxisSize") ? e.set("visible", !0) : e.set("visible", !1)), this.isDirty("start") || this.isDirty("end")) {
2391
+ const t = this.chart;
2392
+ t && t._updateCursor();
2393
+ let s = this.get("start", 0), r = this.get("end", 1), h = this.get("maxDeviation", 0.5) * Math.min(1, r - s);
2394
+ if (s < -h) {
2395
+ let o = s + h;
2396
+ s = -h, this.setRaw("start", s), this.isDirty("end") && this.setRaw("end", r - o);
2397
+ }
2398
+ if (r > 1 + h) {
2399
+ let o = r - 1 - h;
2400
+ r = 1 + h, this.setRaw("end", r), this.isDirty("start") && this.setRaw("start", s - o);
2401
+ }
2402
+ }
2403
+ const i = this.get("renderer");
2404
+ if (i._start = this.get("start"), i._end = this.get("end"), i._inversed = i.get("inversed", !1), i._axisLength = i.axisLength() / (i._end - i._start), i._updateLC(), this.isDirty("tooltip")) {
2405
+ const t = this.get("tooltip");
2406
+ if (t) {
2407
+ const s = i.get("themeTags");
2408
+ t.addTag("axis"), t.addTag(this.className.toLowerCase()), t._applyThemes(), s && (t.set("themeTags", F(t.get("themeTags"), s)), t.label._applyThemes());
2409
+ }
2410
+ }
2411
+ }
2412
+ _updateTooltipBounds() {
2413
+ const e = this.get("tooltip");
2414
+ e && this.get("renderer").updateTooltipBounds(e);
2415
+ }
2416
+ _updateBounds() {
2417
+ super._updateBounds(), this._updateTooltipBounds();
2418
+ }
2419
+ /**
2420
+ * @ignore
2421
+ */
2422
+ processChart(e) {
2423
+ this.chart = e;
2424
+ const i = this.get("renderer");
2425
+ i.chart = e, e.gridContainer.children.push(this.gridContainer), e.topGridContainer.children.push(this.topGridContainer), e.axisHeadersContainer.children.push(this.axisHeader), this.on("start", () => {
2426
+ e._handleAxisSelection(this);
2427
+ }), this.on("end", () => {
2428
+ e._handleAxisSelection(this);
2429
+ }), e.plotContainer.onPrivate("width", () => {
2430
+ this.markDirtySize();
2431
+ }), e.plotContainer.onPrivate("height", () => {
2432
+ this.markDirtySize();
2433
+ }), e.processAxis(this);
2434
+ }
2435
+ /**
2436
+ * @ignore
2437
+ */
2438
+ hideDataItem(e) {
2439
+ return this._toggleFHDataItem(e, !0), super.hideDataItem(e);
2440
+ }
2441
+ /**
2442
+ * @ignore
2443
+ */
2444
+ showDataItem(e) {
2445
+ return this._toggleFHDataItem(e, !1), super.showDataItem(e);
2446
+ }
2447
+ _toggleFHDataItem(e, i) {
2448
+ const t = "forceHidden", s = e.get("label");
2449
+ s && s.set(t, i);
2450
+ const r = e.get("grid");
2451
+ r && r.set(t, i);
2452
+ const h = e.get("tick");
2453
+ h && h.set(t, i);
2454
+ const o = e.get("axisFill");
2455
+ o && o.set(t, i);
2456
+ const a = e.get("bullet");
2457
+ if (a) {
2458
+ const l = a.get("sprite");
2459
+ l && l.set(t, i);
2460
+ }
2461
+ }
2462
+ _toggleDataItem(e, i) {
2463
+ const t = e.get("label"), s = "visible";
2464
+ t && t.setPrivate(s, i);
2465
+ const r = e.get("grid");
2466
+ r && r.setPrivate(s, i);
2467
+ const h = e.get("tick");
2468
+ h && h.setPrivate(s, i);
2469
+ const o = e.get("axisFill");
2470
+ o && o.setPrivate(s, i);
2471
+ const a = e.get("bullet");
2472
+ if (a) {
2473
+ const l = a.get("sprite");
2474
+ l && l.setPrivate(s, i);
2475
+ }
2476
+ }
2477
+ _createAssets(e, i, t) {
2478
+ var s, r, h;
2479
+ const o = this.get("renderer");
2480
+ let a = "minor";
2481
+ const l = e.get("label");
2482
+ if (!l)
2483
+ o.makeLabel(e, i);
2484
+ else {
2485
+ let d = l.get("themeTags"), c = !1;
2486
+ t ? (d == null ? void 0 : d.indexOf(a)) == -1 && (c = !0) : (d == null ? void 0 : d.indexOf(a)) != -1 && (c = !0), c && ((s = l.parent) === null || s === void 0 || s.children.removeValue(l), o.makeLabel(e, i), l.dispose(), o.labels.removeValue(l));
2487
+ }
2488
+ const u = e.get("grid");
2489
+ if (!u)
2490
+ o.makeGrid(e, i);
2491
+ else {
2492
+ let d = u.get("themeTags"), c = !1;
2493
+ t ? (d == null ? void 0 : d.indexOf(a)) == -1 && (c = !0) : (d == null ? void 0 : d.indexOf(a)) != -1 && (c = !0), c && ((r = u.parent) === null || r === void 0 || r.children.removeValue(u), o.makeGrid(e, i), u.dispose(), o.grid.removeValue(u));
2494
+ }
2495
+ const n = e.get("tick");
2496
+ if (!n)
2497
+ o.makeTick(e, i);
2498
+ else {
2499
+ let d = !1, c = n.get("themeTags");
2500
+ t ? (c == null ? void 0 : c.indexOf(a)) == -1 && (d = !0) : (c == null ? void 0 : c.indexOf(a)) != -1 && (d = !0), d && ((h = n.parent) === null || h === void 0 || h.children.removeValue(n), o.makeTick(e, i), n.dispose(), o.ticks.removeValue(n));
2501
+ }
2502
+ (!t && !e.get("axisFill") || t && !e.get("axisFill") && this.get("minorAxisFillsEnabled")) && o.makeAxisFill(e, i), this._processBullet(e);
2503
+ }
2504
+ _processBullet(e) {
2505
+ let i = e.get("bullet"), t = this.get("bullet");
2506
+ if (!i && t && !e.get("isRange") && (i = t(this._root, this, e)), i) {
2507
+ i.axis = this;
2508
+ const s = i.get("sprite");
2509
+ s && (s._setDataItem(e), e.setRaw("bullet", i), s.parent || this.bulletsContainer.children.push(s));
2510
+ }
2511
+ }
2512
+ _afterChanged() {
2513
+ super._afterChanged();
2514
+ const e = this.chart;
2515
+ e && (e._updateChartLayout(), e.axisHeadersContainer.markDirtySize()), this.get("renderer")._updatePositions(), this._seriesAdded = !1;
2516
+ }
2517
+ /**
2518
+ * @ignore
2519
+ */
2520
+ disposeDataItem(e) {
2521
+ super.disposeDataItem(e);
2522
+ const i = this.get("renderer"), t = e.get("label");
2523
+ t && (i.labels.removeValue(t), t.dispose());
2524
+ const s = e.get("tick");
2525
+ s && (i.ticks.removeValue(s), s.dispose());
2526
+ const r = e.get("grid");
2527
+ r && (i.grid.removeValue(r), r.dispose());
2528
+ const h = e.get("axisFill");
2529
+ h && (i.axisFills.removeValue(h), h.dispose());
2530
+ const o = e.get("bullet");
2531
+ o && o.dispose();
2532
+ }
2533
+ _updateGhost() {
2534
+ this.setPrivate("cellWidth", this.getCellWidthPosition() * this.get("renderer").axisLength());
2535
+ const e = this.ghostLabel;
2536
+ if (e) {
2537
+ if (!e.isHidden()) {
2538
+ const s = e.localBounds(), r = Math.ceil(s.right - s.left);
2539
+ let h = e.get("text");
2540
+ M(this.dataItems, (o) => {
2541
+ const a = o.get("label");
2542
+ if (a && !a.isHidden()) {
2543
+ const l = a.localBounds();
2544
+ Math.ceil(l.right - l.left) > r && (h = a.text._getText());
2545
+ }
2546
+ }), e.set("text", h);
2547
+ }
2548
+ let i = this.get("start", 0), t = this.get("end", 1);
2549
+ this.get("renderer").updateLabel(e, i + (t - i) * 0.5);
2550
+ }
2551
+ }
2552
+ _handleCursorPosition(e, i) {
2553
+ e = this.get("renderer").toAxisPosition(e), this._cursorPosition = e, this._snapToSeries = i, this.updateTooltip();
2554
+ }
2555
+ /**
2556
+ * Can be called when axis zoom changes and you need to update tooltip
2557
+ * position.
2558
+ */
2559
+ updateTooltip() {
2560
+ const e = this._snapToSeries;
2561
+ let i = this._cursorPosition;
2562
+ const t = this.get("tooltip"), s = this.get("renderer");
2563
+ v(i) && (M(this.series, (r) => {
2564
+ if (r.get("baseAxis") === this) {
2565
+ const h = this.getSeriesItem(r, i, this.get("tooltipLocation"));
2566
+ e && e.indexOf(r) != -1 ? (r.updateLegendMarker(h), r.updateLegendValue(h), r._settings.tooltipDataItem = h) : (r.showDataItemTooltip(h), r.setRaw("tooltipDataItem", h));
2567
+ }
2568
+ }), this.get("snapTooltip") && (i = this.roundAxisPosition(i, this.get("tooltipLocation", 0.5))), this.setPrivateRaw("tooltipPosition", i), t && (s.updateTooltipBounds(t), Q(i) ? t.hide(0) : (this._updateTooltipText(t, i), s.positionTooltip(t, i), i < this.get("start", 0) || i > this.get("end", 1) ? t.hide(0) : t.show(0))));
2569
+ }
2570
+ _updateTooltipText(e, i) {
2571
+ e.label.set("text", this.getTooltipText(i));
2572
+ }
2573
+ /**
2574
+ * @ignore
2575
+ */
2576
+ roundAxisPosition(e, i) {
2577
+ return e;
2578
+ }
2579
+ _handleSeriesRemoved() {
2580
+ }
2581
+ /**
2582
+ * @ignore
2583
+ */
2584
+ handleCursorShow() {
2585
+ let e = this.get("tooltip");
2586
+ e && e.show();
2587
+ }
2588
+ /**
2589
+ * @ignore
2590
+ */
2591
+ handleCursorHide() {
2592
+ let e = this.get("tooltip");
2593
+ e && e.hide();
2594
+ }
2595
+ /**
2596
+ * @ignore
2597
+ */
2598
+ processSeriesDataItem(e, i) {
2599
+ }
2600
+ _clearDirty() {
2601
+ super._clearDirty(), this._sizeDirty = !1, this._rangesDirty = !1;
2602
+ }
2603
+ /**
2604
+ * Converts pixel coordinate to a relative position on axis.
2605
+ *
2606
+ * @param coordinate Coordinate
2607
+ * @return Relative position
2608
+ */
2609
+ coordinateToPosition(e) {
2610
+ const i = this.get("renderer");
2611
+ return i.toAxisPosition(e / i.axisLength());
2612
+ }
2613
+ /**
2614
+ * Converts relative position of the plot area to relative position of the
2615
+ * axis with zoom taken into account.
2616
+ *
2617
+ * @param position Position
2618
+ * @return Relative position
2619
+ */
2620
+ toAxisPosition(e) {
2621
+ return this.get("renderer").toAxisPosition(e);
2622
+ }
2623
+ /**
2624
+ * Converts relative position of the axis to a global position taking current
2625
+ * zoom into account (opposite to what `toAxisPosition` does).
2626
+ *
2627
+ * @since 5.4.2
2628
+ * @param position Position
2629
+ * @return Global position
2630
+ */
2631
+ toGlobalPosition(e) {
2632
+ return this.get("renderer").toGlobalPosition(e);
2633
+ }
2634
+ /**
2635
+ * Adjusts position with inversed taken into account.
2636
+ *
2637
+ * @ignore
2638
+ */
2639
+ fixPosition(e) {
2640
+ return this.get("renderer").fixPosition(e);
2641
+ }
2642
+ /**
2643
+ * @ignore
2644
+ */
2645
+ shouldGap(e, i, t, s) {
2646
+ return !1;
2647
+ }
2648
+ /**
2649
+ * Creates and returns an axis range object.
2650
+ *
2651
+ * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/axis-ranges/} for more info
2652
+ * @param axisDataItem Axis data item
2653
+ * @return Axis range
2654
+ */
2655
+ createAxisRange(e) {
2656
+ return this.axisRanges.push(e);
2657
+ }
2658
+ /**
2659
+ * @ignore
2660
+ */
2661
+ _groupSeriesData(e) {
2662
+ }
2663
+ /**
2664
+ * Returns relative position between two grid lines of the axis.
2665
+ *
2666
+ * @return Position
2667
+ */
2668
+ getCellWidthPosition() {
2669
+ return 0.05;
2670
+ }
2671
+ }
2672
+ Object.defineProperty(E, "className", {
2673
+ enumerable: !0,
2674
+ configurable: !0,
2675
+ writable: !0,
2676
+ value: "Axis"
2677
+ });
2678
+ Object.defineProperty(E, "classNames", {
2679
+ enumerable: !0,
2680
+ configurable: !0,
2681
+ writable: !0,
2682
+ value: be.classNames.concat([E.className])
2683
+ });
2684
+ class ie extends E {
2685
+ constructor() {
2686
+ super(...arguments), Object.defineProperty(this, "_dirtyExtremes", {
2687
+ enumerable: !0,
2688
+ configurable: !0,
2689
+ writable: !0,
2690
+ value: !1
2691
+ }), Object.defineProperty(this, "_dirtySelectionExtremes", {
2692
+ enumerable: !0,
2693
+ configurable: !0,
2694
+ writable: !0,
2695
+ value: !1
2696
+ }), Object.defineProperty(this, "_dseHandled", {
2697
+ enumerable: !0,
2698
+ configurable: !0,
2699
+ writable: !0,
2700
+ value: !1
2701
+ }), Object.defineProperty(this, "_deltaMinMax", {
2702
+ enumerable: !0,
2703
+ configurable: !0,
2704
+ writable: !0,
2705
+ value: 1
2706
+ }), Object.defineProperty(this, "_minReal", {
2707
+ enumerable: !0,
2708
+ configurable: !0,
2709
+ writable: !0,
2710
+ value: void 0
2711
+ }), Object.defineProperty(this, "_maxReal", {
2712
+ enumerable: !0,
2713
+ configurable: !0,
2714
+ writable: !0,
2715
+ value: void 0
2716
+ }), Object.defineProperty(this, "_minRealLog", {
2717
+ enumerable: !0,
2718
+ configurable: !0,
2719
+ writable: !0,
2720
+ value: void 0
2721
+ }), Object.defineProperty(this, "_baseValue", {
2722
+ enumerable: !0,
2723
+ configurable: !0,
2724
+ writable: !0,
2725
+ value: 0
2726
+ }), Object.defineProperty(this, "_syncDp", {
2727
+ enumerable: !0,
2728
+ configurable: !0,
2729
+ writable: !0,
2730
+ value: void 0
2731
+ }), Object.defineProperty(this, "_minLogAdjusted", {
2732
+ enumerable: !0,
2733
+ configurable: !0,
2734
+ writable: !0,
2735
+ value: 1
2736
+ });
2737
+ }
2738
+ /**
2739
+ * @ignore
2740
+ */
2741
+ markDirtyExtremes() {
2742
+ this._dirtyExtremes = !0, this.markDirty();
2743
+ }
2744
+ /**
2745
+ * @ignore
2746
+ */
2747
+ markDirtySelectionExtremes() {
2748
+ this._dirtySelectionExtremes = !0, this.markDirty();
2749
+ }
2750
+ _afterNew() {
2751
+ this._settings.themeTags = F(this._settings.themeTags, ["axis"]), this.setPrivateRaw("name", "value"), this.addTag("value"), super._afterNew();
2752
+ }
2753
+ _prepareChildren() {
2754
+ var e;
2755
+ if (super._prepareChildren(), this.isDirty("syncWithAxis")) {
2756
+ this._prevSettings.syncWithAxis && this._syncDp && this._syncDp.dispose();
2757
+ let s = this.get("syncWithAxis");
2758
+ s && (this._syncDp = new Me([
2759
+ s.onPrivate("selectionMinFinal", () => {
2760
+ this._dirtySelectionExtremes = !0;
2761
+ }),
2762
+ s.onPrivate("selectionMaxFinal", () => {
2763
+ this._dirtySelectionExtremes = !0;
2764
+ })
2765
+ ]));
2766
+ }
2767
+ let i = !1;
2768
+ if ((this.isDirty("min") || this.isDirty("max") || this.isDirty("maxPrecision") || this.isDirty("numberFormat")) && (i = !0, (e = this.ghostLabel) === null || e === void 0 || e.set("text", "")), (this._sizeDirty || this._dirtyExtremes || this._valuesDirty || i || 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")) && (this._getMinMax(), this._dirtyExtremes = !1), this._handleSizeDirty(), this._dirtySelectionExtremes && !this._isPanning && this.get("autoZoom", !0)) {
2769
+ const t = this.chart;
2770
+ let s = !1;
2771
+ if (t) {
2772
+ const r = this.get("renderer").getPrivate("letter");
2773
+ r == "Y" ? t.xAxes.each((h) => {
2774
+ h.className != "ValueAxis" && (s = !0);
2775
+ }) : r == "X" && t.yAxes.each((h) => {
2776
+ h.className != "ValueAxis" && (s = !0);
2777
+ });
2778
+ }
2779
+ s && this._getSelectionMinMax(), this._dirtySelectionExtremes = !1;
2780
+ }
2781
+ this._groupData(), (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")) && (this._handleRangeChange(), this._prepareAxisItems(), this._updateAxisRanges()), this._baseValue = this.baseValue();
2782
+ }
2783
+ _handleSizeDirty() {
2784
+ this._sizeDirty && !this._dseHandled && (this._dirtySelectionExtremes = !0, this._dseHandled = !0, (this.getPrivate("selectionMinFinal") != this.getPrivate("selectionMin") || this.getPrivate("selectionMaxFinal") != this.getPrivate("selectionMax")) && (this._dirtySelectionExtremes = !1));
2785
+ }
2786
+ _clearDirty() {
2787
+ super._clearDirty(), this._dseHandled = !1;
2788
+ }
2789
+ _groupData() {
2790
+ }
2791
+ _formatText(e) {
2792
+ const i = this.get("numberFormat"), t = this.getNumberFormatter();
2793
+ let s = "";
2794
+ return i ? s = t.format(e, i) : s = t.format(e, void 0, this.getPrivate("stepDecimalPlaces")), s;
2795
+ }
2796
+ _prepareAxisItems() {
2797
+ const e = this.getPrivate("min"), i = this.getPrivate("max");
2798
+ if (v(e) && v(i)) {
2799
+ const t = this.get("logarithmic"), s = this.getPrivate("step"), r = this.getPrivate("selectionMin"), h = this.getPrivate("selectionMax") + s;
2800
+ let o = r - s, a = 1, l = e;
2801
+ if (t) {
2802
+ if (o = this._minLogAdjusted, o < r)
2803
+ for (; o < r; )
2804
+ o += s;
2805
+ if (l = o, l <= 0) {
2806
+ let b = this._minRealLog;
2807
+ v(b) || (b = 1), l = Math.pow(10, Math.log(b) * Math.LOG10E), s < 1 && (v(this._minRealLog) ? l = this._minRealLog : l = Math.pow(10, -50));
2808
+ }
2809
+ a = Math.log(h - s) * Math.LOG10E - Math.log(l) * Math.LOG10E, a > 2 && (o = Math.pow(10, Math.log(l) * Math.LOG10E - 50));
2810
+ }
2811
+ const u = this.get("renderer"), n = u.get("minorLabelsEnabled"), d = u.get("minorGridEnabled", n);
2812
+ let c = Math.pow(10, Math.floor(Math.log(Math.abs(s)) * Math.LOG10E));
2813
+ const m = Math.round(s / c);
2814
+ let g = 2;
2815
+ C(m / 5, 10) % 1 == 0 && (g = 5), C(m / 10, 10) % 1 == 0 && (g = 10);
2816
+ let p = s / g, f = 0, _ = 0, x = -1 / 0;
2817
+ for (; o < h; ) {
2818
+ let b;
2819
+ this.dataItems.length < f + 1 ? (b = new Z(this, void 0, {}), this._dataItems.push(b), this.processDataItem(b)) : b = this.dataItems[f], this._createAssets(b, []), this._toggleDataItem(b, !0), b.setRaw("value", o);
2820
+ const P = b.get("label");
2821
+ P && P.set("text", this._formatText(o)), this._prepareDataItem(b);
2822
+ let y = o;
2823
+ if (t && a > 2 ? y = Math.pow(10, Math.log(l) * Math.LOG10E + f - 50) : y += s, d) {
2824
+ let w = o + p;
2825
+ for (t && (a > 2 && (p = this._adjustMinMax(o, y, 10).step), w = o + p); w < y - s * 1e-11; ) {
2826
+ let D;
2827
+ this.minorDataItems.length < _ + 1 ? (D = new Z(this, void 0, {}), this.minorDataItems.push(D), this.processDataItem(D)) : D = this.minorDataItems[_], this._createAssets(D, ["minor"], !0), this._toggleDataItem(D, !0), D.setRaw("value", w);
2828
+ const S = D.get("label");
2829
+ S && (n ? S.set("text", this._formatText(w)) : S.setPrivate("visible", !1)), this._prepareDataItem(D), w += p, _++;
2830
+ }
2831
+ }
2832
+ if (o = y, x == o)
2833
+ break;
2834
+ let A = Math.pow(10, Math.floor(Math.log(Math.abs(s)) * Math.LOG10E));
2835
+ if (A < 1 && !t) {
2836
+ let w = Math.round(Math.abs(Math.log(Math.abs(A)) * Math.LOG10E)) + 2;
2837
+ o = C(o, w);
2838
+ }
2839
+ f++, t && a <= 2 && o - s < s && (o = s), x = o;
2840
+ }
2841
+ for (let b = f; b < this.dataItems.length; b++)
2842
+ this._toggleDataItem(this.dataItems[b], !1);
2843
+ for (let b = _; b < this.minorDataItems.length; b++)
2844
+ this._toggleDataItem(this.minorDataItems[b], !1);
2845
+ M(this.series, (b) => {
2846
+ b.inited && b._markDirtyAxes();
2847
+ }), this._updateGhost();
2848
+ }
2849
+ }
2850
+ _prepareDataItem(e, i) {
2851
+ let t = this.get("renderer"), s = e.get("value"), r = e.get("endValue"), h = this.valueToPosition(s), o = h, a = this.valueToPosition(s + this.getPrivate("step"));
2852
+ v(r) && (o = this.valueToPosition(r), a = o), e.get("isRange") && r == null && (a = h);
2853
+ let l = o, u = e.get("labelEndValue");
2854
+ u != null && (l = this.valueToPosition(u)), t.updateLabel(e.get("label"), h, l, i);
2855
+ const n = e.get("grid");
2856
+ if (t.updateGrid(n, h, o), n && (s == this.get("baseValue", 0) ? (n.addTag("base"), n._applyThemes()) : n.hasTag("base") && (n.removeTag("base"), n._applyThemes())), t.updateTick(e.get("tick"), h, l, i), t.updateFill(e.get("axisFill"), h, a), this._processBullet(e), t.updateBullet(e.get("bullet"), h, o), !e.get("isRange")) {
2857
+ const d = this.get("fillRule");
2858
+ d && d(e);
2859
+ }
2860
+ }
2861
+ _handleRangeChange() {
2862
+ let e = this.positionToValue(this.get("start", 0)), i = this.positionToValue(this.get("end", 1));
2863
+ const t = this.get("renderer").gridCount();
2864
+ let s = this._adjustMinMax(e, i, t, !0), r = ke(s.step);
2865
+ this.setPrivateRaw("stepDecimalPlaces", r), e = C(e, r), i = C(i, r), s = this._adjustMinMax(e, i, t, !0);
2866
+ let h = s.step;
2867
+ e = s.min, i = s.max, (this.getPrivate("selectionMin") !== e || this.getPrivate("selectionMax") !== i || this.getPrivate("step") !== h) && (this.setPrivateRaw("selectionMin", e), this.setPrivateRaw("selectionMax", i), this.setPrivateRaw("step", h));
2868
+ }
2869
+ /**
2870
+ * Converts a relative position to a corresponding numeric value from axis
2871
+ * scale.
2872
+ *
2873
+ * @param position Relative position
2874
+ * @return Value
2875
+ */
2876
+ positionToValue(e) {
2877
+ const i = this.getPrivate("min"), t = this.getPrivate("max");
2878
+ return this.get("logarithmic") ? Math.pow(Math.E, (e * (Math.log(t) * Math.LOG10E - Math.log(i) * Math.LOG10E) + Math.log(i) * Math.LOG10E) / Math.LOG10E) : e * (t - i) + i;
2879
+ }
2880
+ /**
2881
+ * Convers value to a relative position on axis.
2882
+ *
2883
+ * @param value Value
2884
+ * @return Relative position
2885
+ */
2886
+ valueToPosition(e) {
2887
+ const i = this.getPrivate("min"), t = this.getPrivate("max");
2888
+ if (this.get("logarithmic")) {
2889
+ if (e <= 0) {
2890
+ let s = this.get("treatZeroAs");
2891
+ v(s) && (e = s);
2892
+ }
2893
+ return (Math.log(e) * Math.LOG10E - Math.log(i) * Math.LOG10E) / (Math.log(t) * Math.LOG10E - Math.log(i) * Math.LOG10E);
2894
+ } else
2895
+ return (e - i) / (t - i);
2896
+ }
2897
+ /**
2898
+ * @ignore
2899
+ */
2900
+ valueToFinalPosition(e) {
2901
+ const i = this.getPrivate("minFinal"), t = this.getPrivate("maxFinal");
2902
+ if (this.get("logarithmic")) {
2903
+ if (e <= 0) {
2904
+ let s = this.get("treatZeroAs");
2905
+ v(s) && (e = s);
2906
+ }
2907
+ return (Math.log(e) * Math.LOG10E - Math.log(i) * Math.LOG10E) / (Math.log(t) * Math.LOG10E - Math.log(i) * Math.LOG10E);
2908
+ } else
2909
+ return (e - i) / (t - i);
2910
+ }
2911
+ /**
2912
+ * Returns X coordinate in pixels corresponding to specific value.
2913
+ *
2914
+ * @param value Numeric value
2915
+ * @param location Location
2916
+ * @param baseValue Base value
2917
+ * @return X coordinate
2918
+ */
2919
+ getX(e, i, t) {
2920
+ e = t + (e - t) * i;
2921
+ const s = this.valueToPosition(e);
2922
+ return this._settings.renderer.positionToCoordinate(s);
2923
+ }
2924
+ /**
2925
+ * Returns X coordinate in pixels corresponding to specific value.
2926
+ *
2927
+ * @param value Numeric value
2928
+ * @param location Location
2929
+ * @param baseValue Base value
2930
+ * @return X coordinate
2931
+ */
2932
+ getY(e, i, t) {
2933
+ e = t + (e - t) * i;
2934
+ const s = this.valueToPosition(e);
2935
+ return this._settings.renderer.positionToCoordinate(s);
2936
+ }
2937
+ /**
2938
+ * @ignore
2939
+ */
2940
+ getDataItemCoordinateX(e, i, t, s) {
2941
+ return this._settings.renderer.positionToCoordinate(this.getDataItemPositionX(e, i, t, s));
2942
+ }
2943
+ /**
2944
+ * @ignore
2945
+ */
2946
+ getDataItemPositionX(e, i, t, s) {
2947
+ let r = e.get(i);
2948
+ if (e.get("stackToItemX")) {
2949
+ const o = e.component;
2950
+ r = r * s + o.getStackedXValueWorking(e, i);
2951
+ } else
2952
+ r = this._baseValue + (r - this._baseValue) * s;
2953
+ return this.valueToPosition(r);
2954
+ }
2955
+ /**
2956
+ * @ignore
2957
+ */
2958
+ getDataItemCoordinateY(e, i, t, s) {
2959
+ return this._settings.renderer.positionToCoordinate(this.getDataItemPositionY(e, i, t, s));
2960
+ }
2961
+ /**
2962
+ * @ignore
2963
+ */
2964
+ getDataItemPositionY(e, i, t, s) {
2965
+ let r = e.get(i);
2966
+ if (e.get("stackToItemY")) {
2967
+ const o = e.component;
2968
+ r = r * s + o.getStackedYValueWorking(e, i);
2969
+ } else
2970
+ r = this._baseValue + (r - this._baseValue) * s;
2971
+ return this.valueToPosition(r);
2972
+ }
2973
+ /**
2974
+ * Returns relative position of axis' `baseValue`.
2975
+ *
2976
+ * @return Base value position
2977
+ */
2978
+ basePosition() {
2979
+ return this.valueToPosition(this.baseValue());
2980
+ }
2981
+ /**
2982
+ * Base value of the [[ValueAxis]], which determines positive and negative
2983
+ * values.
2984
+ *
2985
+ * @return Base value
2986
+ */
2987
+ baseValue() {
2988
+ const e = Math.min(this.getPrivate("minFinal", -1 / 0), this.getPrivate("selectionMin", -1 / 0)), i = Math.max(this.getPrivate("maxFinal", 1 / 0), this.getPrivate("selectionMax", 1 / 0));
2989
+ let t = this.get("baseValue", 0);
2990
+ return t < e && (t = e), t > i && (t = i), t;
2991
+ }
2992
+ /**
2993
+ * @ignore
2994
+ */
2995
+ cellEndValue(e) {
2996
+ return e;
2997
+ }
2998
+ fixSmallStep(e) {
2999
+ return 1 + e === 1 ? (e *= 2, this.fixSmallStep(e)) : e;
3000
+ }
3001
+ _fixMin(e) {
3002
+ return e;
3003
+ }
3004
+ _fixMax(e) {
3005
+ return e;
3006
+ }
3007
+ _calculateTotals() {
3008
+ if (this.get("calculateTotals")) {
3009
+ let e = this.series[0];
3010
+ if (e) {
3011
+ let i = e.startIndex();
3012
+ if (e.dataItems.length > 0) {
3013
+ i > 0 && i--;
3014
+ let t = e.endIndex();
3015
+ t < e.dataItems.length && t++;
3016
+ let s, r;
3017
+ e.get("yAxis") == this ? (s = "valueY", r = "vcy") : e.get("xAxis") == this && (s = "valueX", r = "vcx");
3018
+ let h = s + "Working";
3019
+ if (s)
3020
+ for (let o = i; o < t; o++) {
3021
+ let a = 0, l = 0;
3022
+ M(this.series, (u) => {
3023
+ if (!u.get("excludeFromTotal")) {
3024
+ let n = u.dataItems[o];
3025
+ if (n) {
3026
+ let d = n.get(h) * u.get(r);
3027
+ Q(d) || (a += d, l += Math.abs(d));
3028
+ }
3029
+ }
3030
+ }), M(this.series, (u) => {
3031
+ if (!u.get("excludeFromTotal")) {
3032
+ let n = u.dataItems[o];
3033
+ if (n) {
3034
+ let d = n.get(h) * u.get(r);
3035
+ if (!Q(d)) {
3036
+ n.set(s + "Total", l), n.set(s + "Sum", a);
3037
+ let c = d / l * 100;
3038
+ l == 0 && (c = 0), n.set(s + "TotalPercent", c);
3039
+ }
3040
+ }
3041
+ }
3042
+ });
3043
+ }
3044
+ }
3045
+ }
3046
+ }
3047
+ }
3048
+ _getSelectionMinMax() {
3049
+ const e = this.getPrivate("minFinal"), i = this.getPrivate("maxFinal"), t = this.get("min"), s = this.get("max");
3050
+ let r = this.get("extraMin", 0), h = this.get("extraMax", 0);
3051
+ this.get("logarithmic") && (this.get("extraMin") == null && (r = 0.1), this.get("extraMax") == null && (h = 0.2));
3052
+ const o = this.get("renderer").gridCount(), a = this.get("strictMinMaxSelection");
3053
+ let l = this.get("strictMinMax");
3054
+ if (v(e) && v(i)) {
3055
+ let u = i, n = e;
3056
+ if (M(this.series, (b) => {
3057
+ if (!b.get("ignoreMinMax")) {
3058
+ let P, y;
3059
+ const A = b.getPrivate("outOfSelection");
3060
+ if (b.get("xAxis") === this) {
3061
+ if (!A) {
3062
+ let w = b.getPrivate("minX"), D = b.getPrivate("maxX");
3063
+ (b.startIndex() != 0 || b.endIndex() != b.dataItems.length) && (w = void 0, D = void 0), P = b.getPrivate("selectionMinX", w), y = b.getPrivate("selectionMaxX", D);
3064
+ }
3065
+ } else if (b.get("yAxis") === this && !A) {
3066
+ let w = b.getPrivate("minY"), D = b.getPrivate("maxY");
3067
+ (b.startIndex() != 0 || b.endIndex() != b.dataItems.length) && (w = void 0, D = void 0), P = b.getPrivate("selectionMinY", w), y = b.getPrivate("selectionMaxY", D);
3068
+ }
3069
+ !b.isHidden() && !b.isShowing() && (v(P) && (u = Math.min(u, P)), v(y) && (n = Math.max(n, y)));
3070
+ }
3071
+ }), this.axisRanges.each((b) => {
3072
+ if (b.get("affectsMinMax")) {
3073
+ let P = b.get("value");
3074
+ P != null && (u = Math.min(u, P), n = Math.max(n, P)), P = b.get("endValue"), P != null && (u = Math.min(u, P), n = Math.max(n, P));
3075
+ }
3076
+ }), u > n && ([u, n] = [n, u]), v(t) ? l ? u = t : u = e : l && v(this._minReal) && (u = this._minReal), v(s) ? l ? n = s : n = i : l && v(this._maxReal) && (n = this._maxReal), u === n) {
3077
+ let b = u;
3078
+ if (u -= this._deltaMinMax, n += this._deltaMinMax, u < e) {
3079
+ let y = b - e;
3080
+ y == 0 && (y = this._deltaMinMax), u = b - y, n = b + y, l = !0;
3081
+ }
3082
+ let P = this._adjustMinMax(u, n, o, l);
3083
+ u = P.min, n = P.max;
3084
+ }
3085
+ let d = u, c = n, m = n - u;
3086
+ u -= m * r, n += m * h;
3087
+ let g = this._adjustMinMax(u, n, o);
3088
+ u = g.min, n = g.max, u = J(u, e, i), n = J(n, e, i), g = this._adjustMinMax(u, n, o, !0), l || (u = g.min, n = g.max);
3089
+ const p = this.get("syncWithAxis");
3090
+ if (p && (g = this._syncAxes(u, n, g.step, p.getPrivate("selectionMinFinal", p.getPrivate("minFinal", 0)), p.getPrivate("selectionMaxFinal", p.getPrivate("maxFinal", 1)), p.getPrivate("selectionStepFinal", p.getPrivate("step", 1))), g.min < e && (g.min = e), g.max > i && (g.max = i), u = g.min, n = g.max), l && (v(t) && (u = Math.max(u, t)), v(s) && (n = Math.min(n, s))), a && (u = d - (c - d) * r, n = c + (c - d) * h), l) {
3091
+ v(t) ? u = t : u = d, v(s) ? n = s : n = c, n - u <= 1e-8 && (u -= this._deltaMinMax, n += this._deltaMinMax);
3092
+ let b = n - u;
3093
+ u -= b * r, n += b * h;
3094
+ }
3095
+ this.get("logarithmic") && (u <= 0 && (u = d * (1 - Math.min(r, 0.99))), u < e && (u = e), n > i && (n = i));
3096
+ let f = Math.min(20, Math.ceil(Math.log(this.getPrivate("maxZoomFactor", 100) + 1) / Math.LN10) + 2), _ = C(this.valueToFinalPosition(u), f), x = C(this.valueToFinalPosition(n), f);
3097
+ this.setPrivateRaw("selectionMinFinal", u), this.setPrivateRaw("selectionMaxFinal", n), this.setPrivateRaw("selectionStepFinal", g.step), this.zoom(_, x);
3098
+ }
3099
+ }
3100
+ _getMinMax() {
3101
+ let e = this.get("min"), i = this.get("max"), t = 1 / 0, s = -1 / 0, r = this.get("extraMin", 0), h = this.get("extraMax", 0);
3102
+ this.get("logarithmic") && (this.get("strictMinMax") || (this.get("extraMin") == null && (r = 0.1), this.get("extraMax") == null && (h = 0.2)));
3103
+ let o = 1 / 0;
3104
+ if (M(this.series, (x) => {
3105
+ if (!x.get("ignoreMinMax")) {
3106
+ let b, P;
3107
+ if (x.get("xAxis") === this ? (b = x.getPrivate("minX"), P = x.getPrivate("maxX")) : x.get("yAxis") === this && (b = x.getPrivate("minY"), P = x.getPrivate("maxY")), v(b) && v(P)) {
3108
+ t = Math.min(t, b), s = Math.max(s, P);
3109
+ let y = P - b;
3110
+ y <= 0 && (y = Math.abs(P / 100)), y < o && (o = y);
3111
+ }
3112
+ }
3113
+ }), this.axisRanges.each((x) => {
3114
+ if (x.get("affectsMinMax")) {
3115
+ let b = x.get("value");
3116
+ b != null && (t = Math.min(t, b), s = Math.max(s, b)), b = x.get("endValue"), b != null && (t = Math.min(t, b), s = Math.max(s, b));
3117
+ }
3118
+ }), this.get("logarithmic")) {
3119
+ let x = this.get("treatZeroAs");
3120
+ v(x) && t <= 0 && (t = x);
3121
+ }
3122
+ if (t === 0 && s === 0 && (s = 0.9, t = -0.9), v(e) && (t = e), v(i) && (s = i), t === 1 / 0 || s === -1 / 0) {
3123
+ this.setPrivate("minFinal", void 0), this.setPrivate("maxFinal", void 0);
3124
+ return;
3125
+ }
3126
+ t > s && ([t, s] = [s, t]);
3127
+ const a = t, l = s;
3128
+ let u = this.adapters.fold("min", t), n = this.adapters.fold("max", s);
3129
+ this._minRealLog = t, v(u) && (t = u), v(n) && (s = n), t = this._fixMin(t), s = this._fixMax(s), s - t <= 1 / Math.pow(10, 15) && (s - t !== 0 ? this._deltaMinMax = (s - t) / 2 : this._getDelta(s), t -= this._deltaMinMax, s += this._deltaMinMax), t -= (s - t) * r, s += (s - t) * h, this.get("logarithmic") && (t < 0 && a >= 0 && (t = 0), s > 0 && l <= 0 && (s = 0)), this._minReal = t, this._maxReal = s;
3130
+ let d = this.get("strictMinMax"), c = this.get("strictMinMaxSelection", !1);
3131
+ c && (d = c);
3132
+ let m = d;
3133
+ v(i) && (m = !0);
3134
+ let g = this.get("renderer").gridCount(), p = this._adjustMinMax(t, s, g, m);
3135
+ if (t = p.min, s = p.max, p = this._adjustMinMax(t, s, g, !0), t = p.min, s = p.max, d) {
3136
+ v(e) ? t = e : t = this._minReal, v(i) ? s = i : s = this._maxReal, s - t <= 1e-8 && (t -= this._deltaMinMax, s += this._deltaMinMax);
3137
+ let x = s - t;
3138
+ t -= x * r, s += x * h;
3139
+ }
3140
+ u = this.adapters.fold("min", t), n = this.adapters.fold("max", s), v(u) && (t = u), v(n) && (s = n), o == 1 / 0 && (o = s - t);
3141
+ let f = Math.round(Math.abs(Math.log(Math.abs(s - t)) * Math.LOG10E)) + 5;
3142
+ t = C(t, f), s = C(s, f);
3143
+ const _ = this.get("syncWithAxis");
3144
+ if (_ && (p = this._syncAxes(t, s, p.step, _.getPrivate("minFinal", _.getPrivate("min", 0)), _.getPrivate("maxFinal", _.getPrivate("max", 1)), _.getPrivate("step", 1)), t = p.min, s = p.max), this.setPrivateRaw("maxZoomFactor", Math.max(1, Math.ceil((s - t) / o * this.get("maxZoomFactor", 100)))), this._fixZoomFactor(), this.get("logarithmic") && (this._minLogAdjusted = t, t = this._minReal, s = this._maxReal, t <= 0 && (t = a * (1 - Math.min(r, 0.99)))), v(t) && v(s) && (this.getPrivate("minFinal") !== t || this.getPrivate("maxFinal") !== s)) {
3145
+ this.setPrivate("minFinal", t), this.setPrivate("maxFinal", s), this._saveMinMax(t, s);
3146
+ const x = this.get("interpolationDuration", 0), b = this.get("interpolationEasing");
3147
+ this.animatePrivate({ key: "min", to: t, duration: x, easing: b }), this.animatePrivate({ key: "max", to: s, duration: x, easing: b });
3148
+ }
3149
+ }
3150
+ _fixZoomFactor() {
3151
+ }
3152
+ _getDelta(e) {
3153
+ let i = Math.log(Math.abs(e)) * Math.LOG10E, t = Math.pow(10, Math.floor(i));
3154
+ t = t / 10, this._deltaMinMax = t;
3155
+ }
3156
+ _saveMinMax(e, i) {
3157
+ }
3158
+ _adjustMinMax(e, i, t, s) {
3159
+ t <= 1 && (t = 1), t = Math.round(t);
3160
+ let r = e, h = i, o = i - e;
3161
+ o === 0 && (o = Math.abs(i));
3162
+ let a = Math.log(Math.abs(o)) * Math.LOG10E, l = Math.pow(10, Math.floor(a));
3163
+ l = l / 10;
3164
+ let u = l;
3165
+ s && (u = 0), s ? (e = Math.floor(e / l) * l, i = Math.ceil(i / l) * l) : (e = Math.ceil(e / l) * l - u, i = Math.floor(i / l) * l + u), e < 0 && r >= 0 && (e = 0), i > 0 && h <= 0 && (i = 0), a = Math.log(Math.abs(o)) * Math.LOG10E, l = Math.pow(10, Math.floor(a)), l = l / 100;
3166
+ let n = Math.ceil(o / t / l) * l, d = Math.pow(10, Math.floor(Math.log(Math.abs(n)) * Math.LOG10E)), c = Math.ceil(n / d);
3167
+ c > 5 ? c = 10 : c <= 5 && c > 2 && (c = 5), n = Math.ceil(n / (d * c)) * d * c;
3168
+ let m = this.get("maxPrecision");
3169
+ if (v(m)) {
3170
+ let _ = Pe(n, m);
3171
+ m < Number.MAX_VALUE && n !== _ && (n = _, n == 0 && (n = 1));
3172
+ }
3173
+ let g = 0;
3174
+ d < 1 && (g = Math.round(Math.abs(Math.log(Math.abs(d)) * Math.LOG10E)) + 1, n = C(n, g));
3175
+ let p = Math.floor(e / n);
3176
+ e = C(n * p, g);
3177
+ let f;
3178
+ return s ? f = Math.floor(i / n) : f = Math.ceil(i / n), f === p && f++, i = C(n * f, g), i < h && (i = i + n), e > r && (e = e - n), n = this.fixSmallStep(n), { min: e, max: i, step: n };
3179
+ }
3180
+ /**
3181
+ * Returns text to be used in an axis tooltip for specific relative position.
3182
+ *
3183
+ * @param position Position
3184
+ * @return Tooltip text
3185
+ */
3186
+ getTooltipText(e, i) {
3187
+ const t = this.get("tooltipNumberFormat", this.get("numberFormat")), s = this.getNumberFormatter(), r = this.get("extraTooltipPrecision", 0), h = this.getPrivate("stepDecimalPlaces", 0) + r, o = C(this.positionToValue(e), h);
3188
+ return t ? s.format(o, t) : s.format(o, void 0, h);
3189
+ }
3190
+ /**
3191
+ * Returns a data item from series that is closest to the `position`.
3192
+ *
3193
+ * @param series Series
3194
+ * @param position Relative position
3195
+ * @return Data item
3196
+ */
3197
+ getSeriesItem(e, i) {
3198
+ let t = this.getPrivate("name") + this.get("renderer").getPrivate("letter"), s = this.positionToValue(i), r, h;
3199
+ if (M(e.dataItems, (o, a) => {
3200
+ const l = Math.abs(o.get(t) - s);
3201
+ (r === void 0 || l < h) && (r = a, h = l);
3202
+ }), r != null)
3203
+ return e.dataItems[r];
3204
+ }
3205
+ /**
3206
+ * Zooms the axis to specific `start` and `end` values.
3207
+ *
3208
+ * Optional `duration` specifies duration of zoom animation in milliseconds.
3209
+ *
3210
+ * @param start Start value
3211
+ * @param end End value
3212
+ * @param duration Duration in milliseconds
3213
+ */
3214
+ zoomToValues(e, i, t) {
3215
+ const s = this.getPrivate("minFinal", this.getPrivate("min", 0)), r = this.getPrivate("maxFinal", this.getPrivate("max", 1));
3216
+ this.getPrivate("min") != null && this.getPrivate("max") != null && this.zoom((e - s) / (r - s), (i - s) / (r - s), t);
3217
+ }
3218
+ /**
3219
+ * Syncs with a target axis.
3220
+ *
3221
+ * @param min Min
3222
+ * @param max Max
3223
+ * @param step Step
3224
+ */
3225
+ _syncAxes(e, i, t, s, r, h) {
3226
+ if (this.get("syncWithAxis")) {
3227
+ let a = Math.round(r - s) / h, l = Math.round((i - e) / t), u = this.get("renderer").gridCount();
3228
+ if (v(a) && v(l)) {
3229
+ let n = !1, d = 0, c = (i - e) * 0.01, m = e, g = i, p = t;
3230
+ for (; n != !0; )
3231
+ if (n = this._checkSync(m, g, p, a), d++, d > 500 && (n = !0), n)
3232
+ e = m, i = g, t = p;
3233
+ else {
3234
+ d / 3 == Math.round(d / 3) ? (m = e - c * d, e >= 0 && m < 0 && (m = 0)) : (g = i + c * d, g <= 0 && g > 0 && (g = 0));
3235
+ let f = this._adjustMinMax(m, g, u, !0);
3236
+ m = f.min, g = f.max, p = f.step;
3237
+ }
3238
+ }
3239
+ }
3240
+ return { min: e, max: i, step: t };
3241
+ }
3242
+ /**
3243
+ * Returns `true` if axis needs to be resunced with some other axis.
3244
+ */
3245
+ _checkSync(e, i, t, s) {
3246
+ let r = (i - e) / t;
3247
+ for (let h = 1; h < s; h++)
3248
+ if (C(r / h, 1) == s || r * h == s)
3249
+ return !0;
3250
+ return !1;
3251
+ }
3252
+ /**
3253
+ * Returns relative position between two grid lines of the axis.
3254
+ *
3255
+ * @return Position
3256
+ */
3257
+ getCellWidthPosition() {
3258
+ let e = this.getPrivate("selectionMax", this.getPrivate("max")), i = this.getPrivate("selectionMin", this.getPrivate("min"));
3259
+ return v(e) && v(i) ? this.getPrivate("step", 1) / (e - i) : 0.05;
3260
+ }
3261
+ /**
3262
+ * @ignore
3263
+ */
3264
+ nextPosition(e) {
3265
+ e == null && (e = 1), this.get("renderer").getPrivate("letter") == "Y" && (e *= -1);
3266
+ let i = this.positionToValue(this.getPrivate("tooltipPosition", 0));
3267
+ return i += this.getPrivate("step", 1) * e, i = J(i, this.getPrivate("selectionMin", 0), this.getPrivate("selectionMax", 1)), this.toGlobalPosition(this.valueToPosition(i));
3268
+ }
3269
+ }
3270
+ Object.defineProperty(ie, "className", {
3271
+ enumerable: !0,
3272
+ configurable: !0,
3273
+ writable: !0,
3274
+ value: "ValueAxis"
3275
+ });
3276
+ Object.defineProperty(ie, "classNames", {
3277
+ enumerable: !0,
3278
+ configurable: !0,
3279
+ writable: !0,
3280
+ value: E.classNames.concat([ie.className])
3281
+ });
3282
+ class K extends _e {
3283
+ constructor() {
3284
+ super(...arguments), Object.defineProperty(this, "_tickPoints", {
3285
+ enumerable: !0,
3286
+ configurable: !0,
3287
+ writable: !0,
3288
+ value: []
3289
+ });
3290
+ }
3291
+ }
3292
+ Object.defineProperty(K, "className", {
3293
+ enumerable: !0,
3294
+ configurable: !0,
3295
+ writable: !0,
3296
+ value: "AxisLabel"
3297
+ });
3298
+ Object.defineProperty(K, "classNames", {
3299
+ enumerable: !0,
3300
+ configurable: !0,
3301
+ writable: !0,
3302
+ value: _e.classNames.concat([K.className])
3303
+ });
3304
+ class q extends ve {
3305
+ constructor() {
3306
+ super(...arguments), Object.defineProperty(this, "_tickPoints", {
3307
+ enumerable: !0,
3308
+ configurable: !0,
3309
+ writable: !0,
3310
+ value: []
3311
+ });
3312
+ }
3313
+ }
3314
+ Object.defineProperty(q, "className", {
3315
+ enumerable: !0,
3316
+ configurable: !0,
3317
+ writable: !0,
3318
+ value: "AxisTick"
3319
+ });
3320
+ Object.defineProperty(q, "classNames", {
3321
+ enumerable: !0,
3322
+ configurable: !0,
3323
+ writable: !0,
3324
+ value: ve.classNames.concat([q.className])
3325
+ });
3326
+ class se extends I {
3327
+ constructor() {
3328
+ super(...arguments), Object.defineProperty(this, "_axisLength", {
3329
+ enumerable: !0,
3330
+ configurable: !0,
3331
+ writable: !0,
3332
+ value: 100
3333
+ }), Object.defineProperty(this, "_start", {
3334
+ enumerable: !0,
3335
+ configurable: !0,
3336
+ writable: !0,
3337
+ value: 0
3338
+ }), Object.defineProperty(this, "_end", {
3339
+ enumerable: !0,
3340
+ configurable: !0,
3341
+ writable: !0,
3342
+ value: 1
3343
+ }), Object.defineProperty(this, "_inversed", {
3344
+ enumerable: !0,
3345
+ configurable: !0,
3346
+ writable: !0,
3347
+ value: !1
3348
+ }), Object.defineProperty(this, "_minSize", {
3349
+ enumerable: !0,
3350
+ configurable: !0,
3351
+ writable: !0,
3352
+ value: 0
3353
+ }), Object.defineProperty(this, "chart", {
3354
+ enumerable: !0,
3355
+ configurable: !0,
3356
+ writable: !0,
3357
+ value: void 0
3358
+ }), Object.defineProperty(this, "_lc", {
3359
+ enumerable: !0,
3360
+ configurable: !0,
3361
+ writable: !0,
3362
+ value: 1
3363
+ }), Object.defineProperty(this, "_ls", {
3364
+ enumerable: !0,
3365
+ configurable: !0,
3366
+ writable: !0,
3367
+ value: 0
3368
+ }), Object.defineProperty(this, "_thumbDownPoint", {
3369
+ enumerable: !0,
3370
+ configurable: !0,
3371
+ writable: !0,
3372
+ value: void 0
3373
+ }), Object.defineProperty(this, "_downStart", {
3374
+ enumerable: !0,
3375
+ configurable: !0,
3376
+ writable: !0,
3377
+ value: void 0
3378
+ }), Object.defineProperty(this, "_downEnd", {
3379
+ enumerable: !0,
3380
+ configurable: !0,
3381
+ writable: !0,
3382
+ value: void 0
3383
+ }), Object.defineProperty(this, "ticks", {
3384
+ enumerable: !0,
3385
+ configurable: !0,
3386
+ writable: !0,
3387
+ value: this.addDisposer(new G(z.new({}), () => q._new(this._root, {
3388
+ themeTags: F(this.ticks.template.get("themeTags", []), this.get("themeTags", []))
3389
+ }, [this.ticks.template])))
3390
+ }), Object.defineProperty(this, "grid", {
3391
+ enumerable: !0,
3392
+ configurable: !0,
3393
+ writable: !0,
3394
+ value: this.addDisposer(new G(z.new({}), () => H._new(this._root, {
3395
+ themeTags: F(this.grid.template.get("themeTags", []), this.get("themeTags", []))
3396
+ }, [this.grid.template])))
3397
+ }), Object.defineProperty(this, "axisFills", {
3398
+ enumerable: !0,
3399
+ configurable: !0,
3400
+ writable: !0,
3401
+ value: this.addDisposer(new G(z.new({}), () => I._new(this._root, {
3402
+ themeTags: F(this.axisFills.template.get("themeTags", ["axis", "fill"]), this.get("themeTags", []))
3403
+ }, [this.axisFills.template])))
3404
+ }), Object.defineProperty(this, "labels", {
3405
+ enumerable: !0,
3406
+ configurable: !0,
3407
+ writable: !0,
3408
+ value: this.addDisposer(new G(z.new({}), () => K._new(this._root, {
3409
+ themeTags: F(this.labels.template.get("themeTags", []), this.get("themeTags", []))
3410
+ }, [this.labels.template])))
3411
+ }), Object.defineProperty(this, "axis", {
3412
+ enumerable: !0,
3413
+ configurable: !0,
3414
+ writable: !0,
3415
+ value: void 0
3416
+ }), Object.defineProperty(this, "thumb", {
3417
+ enumerable: !0,
3418
+ configurable: !0,
3419
+ writable: !0,
3420
+ value: void 0
3421
+ });
3422
+ }
3423
+ /**
3424
+ * @ignore
3425
+ */
3426
+ makeTick(e, i) {
3427
+ const t = this.ticks.make();
3428
+ return t._setDataItem(e), e.setRaw("tick", t), t.set("themeTags", F(t.get("themeTags"), i)), this.axis.labelsContainer.children.push(t), this.ticks.push(t), t;
3429
+ }
3430
+ /**
3431
+ * @ignore
3432
+ */
3433
+ makeGrid(e, i) {
3434
+ const t = this.grid.make();
3435
+ return t._setDataItem(e), e.setRaw("grid", t), t.set("themeTags", F(t.get("themeTags"), i)), this.axis.gridContainer.children.push(t), this.grid.push(t), t;
3436
+ }
3437
+ /**
3438
+ * @ignore
3439
+ */
3440
+ makeAxisFill(e, i) {
3441
+ const t = this.axisFills.make();
3442
+ return t._setDataItem(e), t.set("themeTags", F(t.get("themeTags"), i)), this.axis.gridContainer.children.push(t), e.setRaw("axisFill", t), this.axisFills.push(t), t;
3443
+ }
3444
+ /**
3445
+ * @ignore
3446
+ */
3447
+ makeLabel(e, i) {
3448
+ const t = this.labels.make();
3449
+ return t.set("themeTags", F(t.get("themeTags"), i)), this.axis.labelsContainer.children.moveValue(t, 0), t._setDataItem(e), e.setRaw("label", t), this.labels.push(t), t;
3450
+ }
3451
+ axisLength() {
3452
+ return 0;
3453
+ }
3454
+ /**
3455
+ * @ignore
3456
+ */
3457
+ gridCount() {
3458
+ return this.axisLength() / this.get("minGridDistance", 50);
3459
+ }
3460
+ _updatePositions() {
3461
+ }
3462
+ _afterNew() {
3463
+ super._afterNew(), this.set("isMeasured", !1);
3464
+ const e = this.thumb;
3465
+ e && (this._disposers.push(e.events.on("pointerdown", (i) => {
3466
+ this._handleThumbDown(i);
3467
+ })), this._disposers.push(e.events.on("globalpointerup", (i) => {
3468
+ this._handleThumbUp(i);
3469
+ })), this._disposers.push(e.events.on("globalpointermove", (i) => {
3470
+ this._handleThumbMove(i);
3471
+ })));
3472
+ }
3473
+ _beforeChanged() {
3474
+ super._beforeChanged(), this.isDirty("minGridDistance") && this.root.events.once("frameended", () => {
3475
+ this.axis.markDirtySize();
3476
+ });
3477
+ }
3478
+ _changed() {
3479
+ if (super._changed(), this.isDirty("pan")) {
3480
+ const e = this.thumb;
3481
+ if (e) {
3482
+ const i = this.axis.labelsContainer, t = this.get("pan");
3483
+ t == "zoom" ? i.children.push(e) : t == "none" && i.children.removeValue(e);
3484
+ }
3485
+ }
3486
+ }
3487
+ _handleThumbDown(e) {
3488
+ this._thumbDownPoint = this.toLocal(e.point);
3489
+ const i = this.axis;
3490
+ this._downStart = i.get("start"), this._downEnd = i.get("end");
3491
+ }
3492
+ _handleThumbUp(e) {
3493
+ this._thumbDownPoint = void 0;
3494
+ }
3495
+ _handleThumbMove(e) {
3496
+ const i = this._thumbDownPoint;
3497
+ if (i) {
3498
+ const t = this.toLocal(e.point), s = this._downStart, r = this._downEnd, h = this._getPan(t, i) * Math.min(1, r - s) / 2 * this.get("panSensitivity", 1);
3499
+ this.axis.zoom(s - h, r + h, 0);
3500
+ }
3501
+ }
3502
+ _getPan(e, i) {
3503
+ return 0;
3504
+ }
3505
+ /**
3506
+ * Converts relative position (0-1) on axis to a pixel coordinate.
3507
+ *
3508
+ * @param position Position (0-1)
3509
+ * @return Coordinate (px)
3510
+ */
3511
+ positionToCoordinate(e) {
3512
+ return this._inversed ? (this._end - e) * this._axisLength : (e - this._start) * this._axisLength;
3513
+ }
3514
+ /**
3515
+ * @ignore
3516
+ */
3517
+ updateTooltipBounds(e) {
3518
+ }
3519
+ _updateSize() {
3520
+ this.markDirty(), this._clear = !0;
3521
+ }
3522
+ /**
3523
+ * @ignore
3524
+ */
3525
+ toAxisPosition(e) {
3526
+ const i = this._start || 0, t = this._end || 1;
3527
+ return e = e * (t - i), this.get("inversed") ? e = t - e : e = i + e, e;
3528
+ }
3529
+ /**
3530
+ * @ignore
3531
+ */
3532
+ toGlobalPosition(e) {
3533
+ const i = this._start || 0, t = this._end || 1;
3534
+ return this.get("inversed") ? e = t - e : e = e - i, e = e / (t - i), e;
3535
+ }
3536
+ /**
3537
+ * @ignore
3538
+ */
3539
+ fixPosition(e) {
3540
+ return this.get("inversed") ? 1 - e : e;
3541
+ }
3542
+ /**
3543
+ * @ignore
3544
+ */
3545
+ _updateLC() {
3546
+ }
3547
+ toggleVisibility(e, i, t, s) {
3548
+ let r = this.axis;
3549
+ const h = r.get("start", 0), o = r.get("end", 1);
3550
+ let a = h + (o - h) * (t - 1e-4), l = h + (o - h) * (s + 1e-4);
3551
+ i < a || i > l ? e.setPrivate("visible", !1) : e.setPrivate("visible", !0);
3552
+ }
3553
+ _positionTooltip(e, i) {
3554
+ const t = this.chart;
3555
+ t && (e.set("pointTo", this._display.toGlobal(i)), t.inPlot(i) || e.hide());
3556
+ }
3557
+ processAxis() {
3558
+ }
3559
+ }
3560
+ Object.defineProperty(se, "className", {
3561
+ enumerable: !0,
3562
+ configurable: !0,
3563
+ writable: !0,
3564
+ value: "AxisRenderer"
3565
+ });
3566
+ Object.defineProperty(se, "classNames", {
3567
+ enumerable: !0,
3568
+ configurable: !0,
3569
+ writable: !0,
3570
+ value: I.classNames.concat([se.className])
3571
+ });
3572
+ export {
3573
+ E as A,
3574
+ H as G,
3575
+ ie as V,
3576
+ ee as X,
3577
+ se as a,
3578
+ te as b
3579
+ };