highcharts 12.2.0 → 12.4.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 (1311) hide show
  1. package/bower.json +1 -1
  2. package/css/annotations/popup.css +86 -45
  3. package/css/highcharts.css +40 -35
  4. package/css/stocktools/gui.css +28 -11
  5. package/es-modules/Accessibility/Components/InfoRegionsComponent.js +3 -3
  6. package/es-modules/Accessibility/Components/LegendComponent.js +10 -1
  7. package/es-modules/Accessibility/Components/MenuComponent.js +26 -23
  8. package/es-modules/Accessibility/Components/NavigatorComponent.js +5 -1
  9. package/es-modules/Accessibility/Components/SeriesComponent/ForcedMarkers.js +3 -1
  10. package/es-modules/Accessibility/FocusBorder.js +4 -0
  11. package/es-modules/Accessibility/HighContrastMode.js +0 -5
  12. package/es-modules/Accessibility/Options/A11yDefaults.js +12 -0
  13. package/es-modules/Core/Axis/Axis.js +4 -3
  14. package/es-modules/Core/Axis/Axis3DComposition.js +0 -3
  15. package/es-modules/Core/Axis/AxisDefaults.js +5 -8
  16. package/es-modules/Core/Axis/BrokenAxis.js +114 -90
  17. package/es-modules/Core/Axis/Color/ColorAxis.js +3 -3
  18. package/es-modules/Core/Axis/Color/ColorAxisDefaults.js +2 -3
  19. package/es-modules/Core/Axis/OrdinalAxis.js +19 -12
  20. package/es-modules/Core/Axis/PlotLineOrBand/PlotLineOrBand.js +15 -2
  21. package/es-modules/Core/Axis/RadialAxis.js +18 -7
  22. package/es-modules/Core/Axis/ScrollbarAxis.js +19 -17
  23. package/es-modules/Core/Axis/Stacking/StackingAxis.js +0 -1
  24. package/es-modules/Core/Axis/Tick.js +1 -1
  25. package/es-modules/Core/Axis/TreeGrid/TreeGridAxis.js +36 -51
  26. package/es-modules/Core/Axis/TreeGrid/TreeGridTick.js +39 -17
  27. package/es-modules/Core/Axis/WaterfallAxis.js +4 -4
  28. package/es-modules/Core/Chart/Chart.js +41 -34
  29. package/es-modules/Core/Chart/ChartDefaults.js +16 -2
  30. package/es-modules/Core/Chart/GanttChart.js +4 -2
  31. package/es-modules/Core/Chart/StockChart.js +42 -49
  32. package/es-modules/Core/Color/Color.js +4 -8
  33. package/es-modules/Core/Defaults.js +16 -7
  34. package/es-modules/Core/Geometry/CircleUtilities.js +3 -1
  35. package/es-modules/Core/Globals.js +1 -1
  36. package/es-modules/Core/HttpUtilities.js +45 -38
  37. package/es-modules/Core/Legend/Legend.js +8 -7
  38. package/es-modules/Core/Pointer.js +17 -9
  39. package/es-modules/Core/Renderer/HTML/AST.js +15 -15
  40. package/es-modules/Core/Renderer/HTML/HTMLElement.js +8 -3
  41. package/es-modules/Core/Renderer/SVG/SVGElement.js +2 -2
  42. package/es-modules/Core/Renderer/SVG/SVGLabel.js +10 -1
  43. package/es-modules/Core/Renderer/SVG/SVGRenderer.js +10 -7
  44. package/es-modules/Core/Renderer/SVG/TextBuilder.js +2 -2
  45. package/es-modules/Core/Series/DataLabel.js +4 -2
  46. package/es-modules/Core/Series/Point.js +9 -0
  47. package/es-modules/Core/Series/Series.js +17 -7
  48. package/es-modules/Core/Series/SeriesDefaults.js +1 -3
  49. package/es-modules/Core/Series/SeriesRegistry.js +8 -1
  50. package/es-modules/Core/Templating.js +6 -5
  51. package/es-modules/Core/Tooltip.js +3 -1
  52. package/es-modules/Data/Connectors/CSVConnector.js +32 -15
  53. package/es-modules/Data/Connectors/DataConnector.js +107 -12
  54. package/es-modules/Data/Connectors/GoogleSheetsConnector.js +29 -17
  55. package/es-modules/Data/Connectors/HTMLTableConnector.js +3 -3
  56. package/es-modules/Data/Connectors/JSONConnector.js +37 -17
  57. package/es-modules/Data/Converters/HTMLTableConverter.js +2 -2
  58. package/es-modules/Data/Converters/JSONConverter.js +0 -1
  59. package/es-modules/Data/DataPool.js +15 -4
  60. package/es-modules/Data/DataTable.js +1 -2
  61. package/es-modules/Data/Formula/FormulaParser.js +33 -1
  62. package/es-modules/Data/Formula/FormulaProcessor.js +97 -45
  63. package/es-modules/Data/Modifiers/DataModifier.js +1 -1
  64. package/es-modules/Data/Modifiers/FilterModifier.js +168 -0
  65. package/es-modules/Data/Modifiers/FilterModifierOptions.js +14 -0
  66. package/es-modules/Data/Modifiers/SortModifier.js +12 -3
  67. package/es-modules/Extensions/Annotations/Annotation.js +10 -7
  68. package/es-modules/Extensions/Annotations/AnnotationChart.js +7 -3
  69. package/es-modules/Extensions/Annotations/AnnotationDefaults.js +38 -12
  70. package/es-modules/Extensions/Annotations/Controllables/ControllableLabel.js +10 -3
  71. package/es-modules/Extensions/Annotations/MockPoint.js +6 -3
  72. package/es-modules/Extensions/Annotations/NavigationBindingsDefaults.js +1 -1
  73. package/es-modules/Extensions/Annotations/Popup/PopupAnnotations.js +10 -4
  74. package/es-modules/Extensions/Annotations/Popup/PopupComposition.js +1 -1
  75. package/es-modules/Extensions/Annotations/Types/BasicAnnotation.js +0 -3
  76. package/es-modules/Extensions/Annotations/Types/CrookedLine.js +97 -94
  77. package/es-modules/Extensions/Annotations/Types/ElliottWave.js +43 -36
  78. package/es-modules/Extensions/Annotations/Types/Fibonacci.js +86 -82
  79. package/es-modules/Extensions/Annotations/Types/FibonacciTimeZones.js +74 -71
  80. package/es-modules/Extensions/Annotations/Types/InfinityLine.js +17 -3
  81. package/es-modules/Extensions/Annotations/Types/Measure.js +229 -226
  82. package/es-modules/Extensions/Annotations/Types/Pitchfork.js +39 -40
  83. package/es-modules/Extensions/Annotations/Types/TimeCycles.js +56 -52
  84. package/es-modules/Extensions/Annotations/Types/Tunnel.js +80 -76
  85. package/es-modules/Extensions/Annotations/Types/VerticalLine.js +57 -53
  86. package/es-modules/Extensions/Boost/Boost.js +5 -1
  87. package/es-modules/Extensions/Boost/BoostSeries.js +53 -21
  88. package/es-modules/Extensions/Boost/WGLRenderer.js +30 -21
  89. package/es-modules/Extensions/Boost/WGLShader.js +18 -5
  90. package/es-modules/Extensions/BoostCanvas.js +0 -5
  91. package/es-modules/Extensions/BorderRadius.js +6 -2
  92. package/es-modules/Extensions/Breadcrumbs/Breadcrumbs.js +1 -1
  93. package/es-modules/Extensions/DownloadURL.js +43 -8
  94. package/es-modules/Extensions/ExportData/ExportData.js +875 -781
  95. package/es-modules/Extensions/ExportData/ExportDataDefaults.js +67 -13
  96. package/es-modules/Extensions/Exporting/Exporting.js +1177 -546
  97. package/es-modules/Extensions/Exporting/ExportingDefaults.js +52 -36
  98. package/es-modules/Extensions/Exporting/Fullscreen.js +2 -2
  99. package/es-modules/Extensions/NonCartesianSeriesZoom/NonCartesianSeriesZoom.js +311 -0
  100. package/es-modules/Extensions/OfflineExporting/OfflineExporting.js +254 -575
  101. package/es-modules/Extensions/OfflineExporting/OfflineExportingDefaults.js +9 -38
  102. package/es-modules/Extensions/Pane/Pane.js +1 -1
  103. package/es-modules/Extensions/Pane/PaneComposition.js +19 -12
  104. package/es-modules/Extensions/Pane/PaneDefaults.js +9 -1
  105. package/es-modules/Extensions/ScrollablePlotArea.js +29 -21
  106. package/es-modules/Extensions/Sonification/Sonification.js +1 -1
  107. package/es-modules/Extensions/StaticScale.js +13 -11
  108. package/es-modules/Extensions/TextPath.js +2 -2
  109. package/es-modules/Extensions/Themes/Adaptive.js +1009 -0
  110. package/es-modules/Maps/MapNavigation.js +1 -1
  111. package/es-modules/Series/Bellcurve/BellcurveSeries.js +16 -9
  112. package/es-modules/Series/Bubble/BubblePoint.js +2 -2
  113. package/es-modules/Series/Column/ColumnSeriesDefaults.js +1 -2
  114. package/es-modules/Series/DataModifyComposition.js +0 -2
  115. package/es-modules/Series/DragNodesComposition.js +4 -0
  116. package/es-modules/Series/DrawPointUtilities.js +1 -1
  117. package/es-modules/Series/Flags/FlagsSeriesDefaults.js +2 -0
  118. package/es-modules/Series/GraphLayoutComposition.js +2 -1
  119. package/es-modules/Series/Heatmap/HeatmapSeriesDefaults.js +1 -2
  120. package/es-modules/Series/Histogram/HistogramSeries.js +19 -17
  121. package/es-modules/Series/Item/ItemSeries.js +1 -1
  122. package/es-modules/Series/PackedBubble/PackedBubblePoint.js +5 -0
  123. package/es-modules/Series/Pie/PieDataLabel.js +2 -2
  124. package/es-modules/Series/Pie/PieSeries.js +2 -2
  125. package/es-modules/Series/Pie/PieSeriesDefaults.js +1 -2
  126. package/es-modules/Series/PolarComposition.js +37 -2
  127. package/es-modules/Series/SeriesOnPointComposition.js +0 -1
  128. package/es-modules/Series/SimulationSeriesUtilities.js +7 -0
  129. package/es-modules/Series/SolidGauge/SolidGaugeSeries.js +7 -2
  130. package/es-modules/Series/SolidGauge/SolidGaugeSeriesDefaults.js +13 -0
  131. package/es-modules/Series/Treegraph/TreegraphLayout.js +10 -4
  132. package/es-modules/Series/Treegraph/TreegraphSeries.js +3 -1
  133. package/es-modules/Series/Treemap/TreemapSeries.js +4 -4
  134. package/es-modules/Series/Variwide/VariwideComposition.js +9 -11
  135. package/es-modules/Series/Variwide/VariwideSeries.js +8 -1
  136. package/es-modules/Series/Waterfall/WaterfallSeries.js +12 -17
  137. package/es-modules/Series/Wordcloud/WordcloudSeries.js +87 -10
  138. package/es-modules/Series/XRange/XRangePoint.js +2 -1
  139. package/es-modules/Shared/BaseForm.js +6 -3
  140. package/es-modules/Shared/TimeBase.js +5 -1
  141. package/es-modules/Stock/Indicators/MACD/MACDIndicator.js +1 -1
  142. package/es-modules/Stock/Navigator/NavigatorComposition.js +2 -2
  143. package/es-modules/Stock/Scrollbar/Scrollbar.js +5 -7
  144. package/es-modules/Stock/StockTools/StockToolbar.js +1 -1
  145. package/es-modules/Stock/StockTools/StockToolsBindings.js +34 -113
  146. package/es-modules/masters/highcharts-3d.src.js +3 -1
  147. package/es-modules/masters/highcharts-gantt.src.js +8 -2
  148. package/es-modules/masters/highcharts-more.src.js +2 -2
  149. package/es-modules/masters/highcharts.src.js +2 -2
  150. package/es-modules/masters/highmaps.src.js +2 -2
  151. package/es-modules/masters/highstock.src.js +2 -2
  152. package/es-modules/masters/i18n/fr-FR.src.d.ts +1 -1
  153. package/es-modules/masters/i18n/fr-FR.src.js +1 -1
  154. package/es-modules/masters/i18n/nb-NO.src.d.ts +1 -1
  155. package/es-modules/masters/i18n/nb-NO.src.js +1 -1
  156. package/es-modules/masters/i18n/zh-CN.src.d.ts +1 -1
  157. package/es-modules/masters/i18n/zh-CN.src.js +1 -1
  158. package/es-modules/masters/indicators/acceleration-bands.src.js +1 -1
  159. package/es-modules/masters/indicators/accumulation-distribution.src.js +1 -1
  160. package/es-modules/masters/indicators/ao.src.js +1 -1
  161. package/es-modules/masters/indicators/apo.src.js +1 -1
  162. package/es-modules/masters/indicators/aroon-oscillator.src.js +1 -1
  163. package/es-modules/masters/indicators/aroon.src.js +1 -1
  164. package/es-modules/masters/indicators/atr.src.js +1 -1
  165. package/es-modules/masters/indicators/bollinger-bands.src.js +1 -1
  166. package/es-modules/masters/indicators/cci.src.js +1 -1
  167. package/es-modules/masters/indicators/chaikin.src.js +1 -1
  168. package/es-modules/masters/indicators/cmf.src.js +1 -1
  169. package/es-modules/masters/indicators/cmo.src.js +1 -1
  170. package/es-modules/masters/indicators/dema.src.js +1 -1
  171. package/es-modules/masters/indicators/disparity-index.src.js +1 -1
  172. package/es-modules/masters/indicators/dmi.src.js +1 -1
  173. package/es-modules/masters/indicators/dpo.src.js +1 -1
  174. package/es-modules/masters/indicators/ema.src.js +0 -3
  175. package/es-modules/masters/indicators/ichimoku-kinko-hyo.src.js +1 -1
  176. package/es-modules/masters/indicators/indicators-all.src.js +1 -1
  177. package/es-modules/masters/indicators/indicators.src.js +1 -1
  178. package/es-modules/masters/indicators/keltner-channels.src.js +1 -1
  179. package/es-modules/masters/indicators/klinger.src.js +1 -1
  180. package/es-modules/masters/indicators/macd.src.js +1 -1
  181. package/es-modules/masters/indicators/mfi.src.js +1 -1
  182. package/es-modules/masters/indicators/momentum.src.js +1 -1
  183. package/es-modules/masters/indicators/natr.src.js +1 -1
  184. package/es-modules/masters/indicators/obv.src.js +1 -1
  185. package/es-modules/masters/indicators/pivot-points.src.js +1 -1
  186. package/es-modules/masters/indicators/ppo.src.js +1 -1
  187. package/es-modules/masters/indicators/price-channel.src.js +1 -1
  188. package/es-modules/masters/indicators/price-envelopes.src.js +1 -1
  189. package/es-modules/masters/indicators/psar.src.js +1 -1
  190. package/es-modules/masters/indicators/regressions.src.js +1 -1
  191. package/es-modules/masters/indicators/roc.src.js +1 -1
  192. package/es-modules/masters/indicators/rsi.src.js +1 -1
  193. package/es-modules/masters/indicators/slow-stochastic.src.js +1 -1
  194. package/es-modules/masters/indicators/stochastic.src.js +1 -1
  195. package/es-modules/masters/indicators/supertrend.src.js +1 -1
  196. package/es-modules/masters/indicators/tema.src.js +1 -1
  197. package/es-modules/masters/indicators/trendline.src.js +1 -1
  198. package/es-modules/masters/indicators/trix.src.js +1 -1
  199. package/es-modules/masters/indicators/volume-by-price.src.js +1 -1
  200. package/es-modules/masters/indicators/vwap.src.js +1 -1
  201. package/es-modules/masters/indicators/williams-r.src.js +1 -1
  202. package/es-modules/masters/indicators/wma.src.js +1 -1
  203. package/es-modules/masters/indicators/zigzag.src.js +1 -1
  204. package/es-modules/masters/modules/accessibility.src.js +1 -1
  205. package/es-modules/masters/modules/annotations-advanced.src.js +1 -1
  206. package/es-modules/masters/modules/annotations.src.js +1 -1
  207. package/es-modules/masters/modules/arc-diagram.src.js +1 -1
  208. package/es-modules/masters/modules/arrow-symbols.src.js +1 -1
  209. package/es-modules/masters/modules/boost-canvas.src.js +1 -1
  210. package/es-modules/masters/modules/boost.src.js +1 -1
  211. package/es-modules/masters/modules/broken-axis.src.js +1 -1
  212. package/es-modules/masters/modules/bullet.src.js +1 -1
  213. package/es-modules/masters/modules/coloraxis.src.js +1 -1
  214. package/es-modules/masters/modules/current-date-indicator.src.js +1 -1
  215. package/es-modules/masters/modules/cylinder.src.js +1 -1
  216. package/es-modules/masters/modules/data-tools.src.d.ts +1 -0
  217. package/es-modules/masters/modules/data-tools.src.js +2 -1
  218. package/es-modules/masters/modules/data.src.js +1 -1
  219. package/es-modules/masters/modules/datagrouping.src.js +1 -1
  220. package/es-modules/masters/modules/debugger.src.js +1 -1
  221. package/es-modules/masters/modules/dependency-wheel.src.js +1 -1
  222. package/es-modules/masters/modules/dotplot.src.js +1 -1
  223. package/es-modules/masters/modules/drag-panes.src.js +1 -1
  224. package/es-modules/masters/modules/draggable-points.src.js +1 -1
  225. package/es-modules/masters/modules/drilldown.src.js +3 -1
  226. package/es-modules/masters/modules/dumbbell.src.js +1 -1
  227. package/es-modules/masters/modules/export-data.src.js +3 -3
  228. package/es-modules/masters/modules/exporting.src.js +5 -1
  229. package/es-modules/masters/modules/flowmap.src.js +1 -1
  230. package/es-modules/masters/modules/full-screen.src.js +1 -1
  231. package/es-modules/masters/modules/funnel.src.js +1 -1
  232. package/es-modules/masters/modules/funnel3d.src.js +1 -1
  233. package/es-modules/masters/modules/gantt.src.js +1 -1
  234. package/es-modules/masters/modules/geoheatmap.src.js +1 -1
  235. package/es-modules/masters/modules/grid-axis.src.js +1 -1
  236. package/es-modules/masters/modules/heatmap.src.js +1 -1
  237. package/es-modules/masters/modules/heikinashi.src.js +1 -1
  238. package/es-modules/masters/modules/histogram-bellcurve.src.js +1 -1
  239. package/es-modules/masters/modules/hollowcandlestick.src.js +1 -1
  240. package/es-modules/masters/modules/item-series.src.js +1 -1
  241. package/es-modules/masters/modules/lollipop.src.js +1 -1
  242. package/es-modules/masters/modules/map.src.js +1 -1
  243. package/es-modules/masters/modules/marker-clusters.src.js +1 -1
  244. package/es-modules/masters/modules/mouse-wheel-zoom.src.js +1 -1
  245. package/es-modules/masters/modules/navigator.src.js +1 -1
  246. package/es-modules/masters/modules/networkgraph.src.js +1 -1
  247. package/es-modules/masters/modules/no-data-to-display.src.js +1 -1
  248. package/es-modules/masters/modules/non-cartesian-zoom.src.d.ts +2 -0
  249. package/es-modules/masters/modules/non-cartesian-zoom.src.js +18 -0
  250. package/es-modules/masters/modules/offline-exporting.src.js +2 -2
  251. package/es-modules/masters/modules/organization.src.js +1 -1
  252. package/es-modules/masters/modules/parallel-coordinates.src.js +1 -1
  253. package/es-modules/masters/modules/pareto.src.js +1 -1
  254. package/es-modules/masters/modules/pathfinder.src.js +1 -1
  255. package/es-modules/masters/modules/pattern-fill.src.js +1 -1
  256. package/es-modules/masters/modules/pictorial.src.js +1 -1
  257. package/es-modules/masters/modules/pointandfigure.src.js +1 -1
  258. package/es-modules/masters/modules/price-indicator.src.js +1 -1
  259. package/es-modules/masters/modules/pyramid3d.src.js +1 -1
  260. package/es-modules/masters/modules/renko.src.js +1 -1
  261. package/es-modules/masters/modules/sankey.src.js +1 -1
  262. package/es-modules/masters/modules/series-label.src.js +1 -1
  263. package/es-modules/masters/modules/series-on-point.src.js +1 -1
  264. package/es-modules/masters/modules/solid-gauge.src.js +1 -1
  265. package/es-modules/masters/modules/sonification.src.js +1 -1
  266. package/es-modules/masters/modules/static-scale.src.js +1 -1
  267. package/es-modules/masters/modules/stock-tools.src.js +1 -1
  268. package/es-modules/masters/modules/stock.src.js +1 -1
  269. package/es-modules/masters/modules/streamgraph.src.js +1 -1
  270. package/es-modules/masters/modules/sunburst.src.js +1 -1
  271. package/es-modules/masters/modules/textpath.src.js +1 -1
  272. package/es-modules/masters/modules/tiledwebmap.src.js +1 -1
  273. package/es-modules/masters/modules/tilemap.src.js +1 -1
  274. package/es-modules/masters/modules/timeline.src.js +1 -1
  275. package/es-modules/masters/modules/treegraph.src.js +1 -1
  276. package/es-modules/masters/modules/treegrid.src.js +1 -1
  277. package/es-modules/masters/modules/treemap.src.js +1 -1
  278. package/es-modules/masters/modules/variable-pie.src.js +1 -1
  279. package/es-modules/masters/modules/variwide.src.js +1 -1
  280. package/es-modules/masters/modules/vector.src.js +1 -1
  281. package/es-modules/masters/modules/venn.src.js +1 -1
  282. package/es-modules/masters/modules/windbarb.src.js +1 -1
  283. package/es-modules/masters/modules/wordcloud.src.js +1 -1
  284. package/es-modules/masters/modules/xrange.src.js +1 -1
  285. package/es-modules/masters/standalone-navigator.src.js +7 -6
  286. package/es-modules/masters/themes/adaptive.src.d.ts +2 -0
  287. package/es-modules/masters/themes/adaptive.src.js +15 -0
  288. package/es-modules/masters/themes/avocado.src.js +1 -1
  289. package/es-modules/masters/themes/brand-dark.src.js +1 -1
  290. package/es-modules/masters/themes/brand-light.src.js +1 -1
  291. package/es-modules/masters/themes/dark-blue.src.js +1 -1
  292. package/es-modules/masters/themes/dark-green.src.js +1 -1
  293. package/es-modules/masters/themes/dark-unica.src.js +1 -1
  294. package/es-modules/masters/themes/gray.src.js +1 -1
  295. package/es-modules/masters/themes/grid-light.src.js +1 -1
  296. package/es-modules/masters/themes/grid.src.js +1 -1
  297. package/es-modules/masters/themes/high-contrast-dark.src.js +1 -1
  298. package/es-modules/masters/themes/high-contrast-light.src.js +1 -1
  299. package/es-modules/masters/themes/sand-signika.src.js +1 -1
  300. package/es-modules/masters/themes/skies.src.js +1 -1
  301. package/es-modules/masters/themes/sunset.src.js +1 -1
  302. package/es-modules/tsconfig.tsbuildinfo +1 -1
  303. package/esm/highcharts-3d.js +11 -1
  304. package/esm/highcharts-3d.src.js +3 -4
  305. package/esm/highcharts-gantt.js +14 -1
  306. package/esm/highcharts-gantt.src.js +8 -2
  307. package/esm/highcharts-more.js +9 -1
  308. package/esm/highcharts-more.src.js +516 -57
  309. package/esm/highcharts.js +9 -2
  310. package/esm/highcharts.src.js +273 -168
  311. package/esm/highmaps.js +8 -1
  312. package/esm/highmaps.src.js +2 -2
  313. package/esm/highstock.js +8 -1
  314. package/esm/highstock.src.js +2 -2
  315. package/esm/i18n/fr-FR.js +13 -1
  316. package/esm/i18n/fr-FR.src.js +1 -1
  317. package/esm/i18n/nb-NO.js +13 -1
  318. package/esm/i18n/nb-NO.src.js +1 -1
  319. package/esm/i18n/zh-CN.js +13 -1
  320. package/esm/i18n/zh-CN.src.js +1 -1
  321. package/esm/indicators/acceleration-bands.js +12 -1
  322. package/esm/indicators/acceleration-bands.src.js +1 -1
  323. package/esm/indicators/accumulation-distribution.js +12 -1
  324. package/esm/indicators/accumulation-distribution.src.js +1 -1
  325. package/esm/indicators/ao.js +12 -1
  326. package/esm/indicators/ao.src.js +1 -1
  327. package/esm/indicators/apo.js +12 -1
  328. package/esm/indicators/apo.src.js +1 -1
  329. package/esm/indicators/aroon-oscillator.js +12 -1
  330. package/esm/indicators/aroon-oscillator.src.js +1 -1
  331. package/esm/indicators/aroon.js +12 -1
  332. package/esm/indicators/aroon.src.js +1 -1
  333. package/esm/indicators/atr.js +12 -1
  334. package/esm/indicators/atr.src.js +1 -1
  335. package/esm/indicators/bollinger-bands.js +12 -1
  336. package/esm/indicators/bollinger-bands.src.js +1 -1
  337. package/esm/indicators/cci.js +12 -1
  338. package/esm/indicators/cci.src.js +1 -1
  339. package/esm/indicators/chaikin.js +12 -1
  340. package/esm/indicators/chaikin.src.js +1 -1
  341. package/esm/indicators/cmf.js +11 -1
  342. package/esm/indicators/cmf.src.js +1 -1
  343. package/esm/indicators/cmo.js +12 -1
  344. package/esm/indicators/cmo.src.js +1 -1
  345. package/esm/indicators/dema.js +12 -1
  346. package/esm/indicators/dema.src.js +1 -1
  347. package/esm/indicators/disparity-index.js +12 -1
  348. package/esm/indicators/disparity-index.src.js +1 -1
  349. package/esm/indicators/dmi.js +12 -1
  350. package/esm/indicators/dmi.src.js +1 -1
  351. package/esm/indicators/dpo.js +12 -1
  352. package/esm/indicators/dpo.src.js +1 -1
  353. package/esm/indicators/ema.src.js +0 -3
  354. package/esm/indicators/ichimoku-kinko-hyo.js +12 -1
  355. package/esm/indicators/ichimoku-kinko-hyo.src.js +1 -1
  356. package/esm/indicators/indicators-all.js +12 -1
  357. package/esm/indicators/indicators-all.src.js +2 -2
  358. package/esm/indicators/indicators.js +12 -1
  359. package/esm/indicators/indicators.src.js +1 -1
  360. package/esm/indicators/keltner-channels.js +12 -1
  361. package/esm/indicators/keltner-channels.src.js +1 -1
  362. package/esm/indicators/klinger.js +12 -1
  363. package/esm/indicators/klinger.src.js +1 -1
  364. package/esm/indicators/macd.js +12 -1
  365. package/esm/indicators/macd.src.js +2 -2
  366. package/esm/indicators/mfi.js +12 -1
  367. package/esm/indicators/mfi.src.js +1 -1
  368. package/esm/indicators/momentum.js +12 -1
  369. package/esm/indicators/momentum.src.js +1 -1
  370. package/esm/indicators/natr.js +12 -1
  371. package/esm/indicators/natr.src.js +1 -1
  372. package/esm/indicators/obv.js +12 -1
  373. package/esm/indicators/obv.src.js +1 -1
  374. package/esm/indicators/pivot-points.js +12 -1
  375. package/esm/indicators/pivot-points.src.js +1 -1
  376. package/esm/indicators/ppo.js +12 -1
  377. package/esm/indicators/ppo.src.js +1 -1
  378. package/esm/indicators/price-channel.js +12 -1
  379. package/esm/indicators/price-channel.src.js +1 -1
  380. package/esm/indicators/price-envelopes.js +12 -1
  381. package/esm/indicators/price-envelopes.src.js +1 -1
  382. package/esm/indicators/psar.js +12 -1
  383. package/esm/indicators/psar.src.js +1 -1
  384. package/esm/indicators/regressions.js +12 -1
  385. package/esm/indicators/regressions.src.js +1 -1
  386. package/esm/indicators/roc.js +12 -1
  387. package/esm/indicators/roc.src.js +1 -1
  388. package/esm/indicators/rsi.js +12 -1
  389. package/esm/indicators/rsi.src.js +1 -1
  390. package/esm/indicators/slow-stochastic.js +12 -1
  391. package/esm/indicators/slow-stochastic.src.js +1 -1
  392. package/esm/indicators/stochastic.js +12 -1
  393. package/esm/indicators/stochastic.src.js +1 -1
  394. package/esm/indicators/supertrend.js +12 -1
  395. package/esm/indicators/supertrend.src.js +1 -1
  396. package/esm/indicators/tema.js +12 -1
  397. package/esm/indicators/tema.src.js +1 -1
  398. package/esm/indicators/trendline.js +12 -1
  399. package/esm/indicators/trendline.src.js +1 -1
  400. package/esm/indicators/trix.js +12 -1
  401. package/esm/indicators/trix.src.js +1 -1
  402. package/esm/indicators/volume-by-price.js +12 -1
  403. package/esm/indicators/volume-by-price.src.js +1 -1
  404. package/esm/indicators/vwap.js +12 -1
  405. package/esm/indicators/vwap.src.js +1 -1
  406. package/esm/indicators/williams-r.js +12 -1
  407. package/esm/indicators/williams-r.src.js +1 -1
  408. package/esm/indicators/wma.js +12 -1
  409. package/esm/indicators/wma.src.js +1 -1
  410. package/esm/indicators/zigzag.js +12 -1
  411. package/esm/indicators/zigzag.src.js +1 -1
  412. package/esm/modules/accessibility.js +12 -1
  413. package/esm/modules/accessibility.src.js +92 -63
  414. package/esm/modules/annotations-advanced.js +11 -1
  415. package/esm/modules/annotations-advanced.src.js +872 -778
  416. package/esm/modules/annotations.js +11 -1
  417. package/esm/modules/annotations.src.js +95 -43
  418. package/esm/modules/arc-diagram.js +11 -1
  419. package/esm/modules/arc-diagram.src.js +3 -3
  420. package/esm/modules/arrow-symbols.js +11 -1
  421. package/esm/modules/arrow-symbols.src.js +1 -1
  422. package/esm/modules/boost-canvas.js +12 -1
  423. package/esm/modules/boost-canvas.src.js +102 -53
  424. package/esm/modules/boost.js +13 -1
  425. package/esm/modules/boost.src.js +107 -49
  426. package/esm/modules/broken-axis.js +9 -1
  427. package/esm/modules/broken-axis.src.js +115 -91
  428. package/esm/modules/bullet.js +11 -1
  429. package/esm/modules/bullet.src.js +1 -1
  430. package/esm/modules/coloraxis.js +11 -1
  431. package/esm/modules/coloraxis.src.js +6 -7
  432. package/esm/modules/current-date-indicator.js +11 -1
  433. package/esm/modules/current-date-indicator.src.js +1 -1
  434. package/esm/modules/cylinder.js +12 -1
  435. package/esm/modules/cylinder.src.js +1 -1
  436. package/esm/modules/data-tools.js +11 -1
  437. package/esm/modules/data-tools.src.js +542 -125
  438. package/esm/modules/data.js +11 -1
  439. package/esm/modules/data.src.js +46 -39
  440. package/esm/modules/datagrouping.js +11 -1
  441. package/esm/modules/datagrouping.src.js +1 -1
  442. package/esm/modules/debugger.js +11 -1
  443. package/esm/modules/debugger.src.js +1 -1
  444. package/esm/modules/dependency-wheel.js +12 -1
  445. package/esm/modules/dependency-wheel.src.js +3 -3
  446. package/esm/modules/dotplot.js +11 -1
  447. package/esm/modules/dotplot.src.js +1 -1
  448. package/esm/modules/drag-panes.js +13 -1
  449. package/esm/modules/drag-panes.src.js +1 -1
  450. package/esm/modules/draggable-points.js +9 -1
  451. package/esm/modules/draggable-points.src.js +1 -1
  452. package/esm/modules/drilldown.js +13 -1
  453. package/esm/modules/drilldown.src.js +4 -2
  454. package/esm/modules/dumbbell.js +9 -1
  455. package/esm/modules/dumbbell.src.js +1 -1
  456. package/esm/modules/export-data.js +12 -1
  457. package/esm/modules/export-data.src.js +985 -799
  458. package/esm/modules/exporting.js +11 -1
  459. package/esm/modules/exporting.src.js +1453 -634
  460. package/esm/modules/flowmap.js +9 -1
  461. package/esm/modules/flowmap.src.js +1 -1
  462. package/esm/modules/full-screen.js +12 -1
  463. package/esm/modules/full-screen.src.js +3 -3
  464. package/esm/modules/funnel.js +11 -1
  465. package/esm/modules/funnel.src.js +7 -3
  466. package/esm/modules/funnel3d.js +13 -1
  467. package/esm/modules/funnel3d.src.js +1 -1
  468. package/esm/modules/gantt.js +11 -1
  469. package/esm/modules/gantt.src.js +254 -212
  470. package/esm/modules/geoheatmap.js +9 -1
  471. package/esm/modules/geoheatmap.src.js +1 -1
  472. package/esm/modules/grid-axis.js +11 -1
  473. package/esm/modules/grid-axis.src.js +1 -1
  474. package/esm/modules/heatmap.js +9 -1
  475. package/esm/modules/heatmap.src.js +2 -3
  476. package/esm/modules/heikinashi.js +12 -1
  477. package/esm/modules/heikinashi.src.js +1 -1
  478. package/esm/modules/histogram-bellcurve.js +10 -1
  479. package/esm/modules/histogram-bellcurve.src.js +36 -27
  480. package/esm/modules/hollowcandlestick.js +12 -1
  481. package/esm/modules/hollowcandlestick.src.js +1 -1
  482. package/esm/modules/item-series.js +11 -1
  483. package/esm/modules/item-series.src.js +3 -5
  484. package/esm/modules/lollipop.js +9 -1
  485. package/esm/modules/lollipop.src.js +1 -1
  486. package/esm/modules/map.js +11 -1
  487. package/esm/modules/map.src.js +5 -6
  488. package/esm/modules/marker-clusters.js +11 -1
  489. package/esm/modules/marker-clusters.src.js +1 -1
  490. package/esm/modules/mouse-wheel-zoom.js +11 -1
  491. package/esm/modules/mouse-wheel-zoom.src.js +1 -1
  492. package/esm/modules/navigator.js +11 -1
  493. package/esm/modules/navigator.src.js +29 -29
  494. package/esm/modules/networkgraph.js +11 -1
  495. package/esm/modules/networkgraph.src.js +16 -4
  496. package/esm/modules/no-data-to-display.js +12 -1
  497. package/esm/modules/no-data-to-display.src.js +1 -1
  498. package/esm/modules/non-cartesian-zoom.d.ts +2 -0
  499. package/esm/modules/non-cartesian-zoom.js +11 -0
  500. package/esm/modules/non-cartesian-zoom.src.d.ts +2 -0
  501. package/esm/modules/non-cartesian-zoom.src.js +374 -0
  502. package/esm/modules/offline-exporting.js +12 -1
  503. package/esm/modules/offline-exporting.src.js +339 -3363
  504. package/esm/modules/organization.js +11 -1
  505. package/esm/modules/organization.src.js +3 -3
  506. package/esm/modules/parallel-coordinates.js +11 -1
  507. package/esm/modules/parallel-coordinates.src.js +1 -1
  508. package/esm/modules/pareto.js +11 -1
  509. package/esm/modules/pareto.src.js +1 -1
  510. package/esm/modules/pathfinder.js +11 -1
  511. package/esm/modules/pathfinder.src.js +1 -1
  512. package/esm/modules/pattern-fill.js +12 -1
  513. package/esm/modules/pattern-fill.src.js +1 -1
  514. package/esm/modules/pictorial.js +11 -1
  515. package/esm/modules/pictorial.src.js +1 -1
  516. package/esm/modules/pointandfigure.js +12 -1
  517. package/esm/modules/pointandfigure.src.js +1 -1
  518. package/esm/modules/price-indicator.js +13 -1
  519. package/esm/modules/price-indicator.src.js +1 -1
  520. package/esm/modules/pyramid3d.js +14 -1
  521. package/esm/modules/pyramid3d.src.js +1 -1
  522. package/esm/modules/renko.js +12 -1
  523. package/esm/modules/renko.src.js +1 -1
  524. package/esm/modules/sankey.js +11 -1
  525. package/esm/modules/sankey.src.js +3 -3
  526. package/esm/modules/series-label.js +9 -1
  527. package/esm/modules/series-label.src.js +1 -1
  528. package/esm/modules/series-on-point.js +12 -1
  529. package/esm/modules/series-on-point.src.js +1 -9
  530. package/esm/modules/solid-gauge.js +12 -1
  531. package/esm/modules/solid-gauge.src.js +27 -5
  532. package/esm/modules/sonification.js +12 -1
  533. package/esm/modules/sonification.src.js +45 -10
  534. package/esm/modules/static-scale.js +11 -1
  535. package/esm/modules/static-scale.src.js +14 -12
  536. package/esm/modules/stock-tools.js +13 -1
  537. package/esm/modules/stock-tools.src.js +37 -116
  538. package/esm/modules/stock.js +11 -1
  539. package/esm/modules/stock.src.js +98 -98
  540. package/esm/modules/streamgraph.js +11 -1
  541. package/esm/modules/streamgraph.src.js +1 -1
  542. package/esm/modules/sunburst.js +10 -1
  543. package/esm/modules/sunburst.src.js +9 -9
  544. package/esm/modules/textpath.js +9 -1
  545. package/esm/modules/textpath.src.js +3 -3
  546. package/esm/modules/tiledwebmap.js +10 -2
  547. package/esm/modules/tiledwebmap.src.js +1 -1
  548. package/esm/modules/tilemap.js +12 -1
  549. package/esm/modules/tilemap.src.js +1 -1
  550. package/esm/modules/timeline.js +12 -1
  551. package/esm/modules/timeline.src.js +1 -1
  552. package/esm/modules/treegraph.js +11 -1
  553. package/esm/modules/treegraph.src.js +16 -8
  554. package/esm/modules/treegrid.js +11 -1
  555. package/esm/modules/treegrid.src.js +190 -159
  556. package/esm/modules/treemap.js +10 -1
  557. package/esm/modules/treemap.src.js +7 -7
  558. package/esm/modules/variable-pie.js +11 -1
  559. package/esm/modules/variable-pie.src.js +1 -1
  560. package/esm/modules/variwide.js +11 -1
  561. package/esm/modules/variwide.src.js +18 -13
  562. package/esm/modules/vector.js +11 -1
  563. package/esm/modules/vector.src.js +1 -1
  564. package/esm/modules/venn.js +10 -1
  565. package/esm/modules/venn.src.js +5 -3
  566. package/esm/modules/windbarb.js +11 -1
  567. package/esm/modules/windbarb.src.js +1 -1
  568. package/esm/modules/wordcloud.js +10 -1
  569. package/esm/modules/wordcloud.src.js +89 -12
  570. package/esm/modules/xrange.js +11 -1
  571. package/esm/modules/xrange.src.js +3 -2
  572. package/esm/standalone-navigator.js +11 -2
  573. package/esm/standalone-navigator.src.js +312 -206
  574. package/esm/themes/adaptive.d.ts +2 -0
  575. package/esm/themes/adaptive.js +130 -0
  576. package/esm/themes/adaptive.src.d.ts +2 -0
  577. package/esm/themes/adaptive.src.js +1069 -0
  578. package/esm/themes/avocado.js +9 -1
  579. package/esm/themes/avocado.src.js +1 -1
  580. package/esm/themes/brand-dark.js +9 -1
  581. package/esm/themes/brand-dark.src.js +1 -1
  582. package/esm/themes/brand-light.js +9 -1
  583. package/esm/themes/brand-light.src.js +1 -1
  584. package/esm/themes/dark-blue.js +9 -1
  585. package/esm/themes/dark-blue.src.js +1 -1
  586. package/esm/themes/dark-green.js +9 -1
  587. package/esm/themes/dark-green.src.js +1 -1
  588. package/esm/themes/dark-unica.js +9 -1
  589. package/esm/themes/dark-unica.src.js +1 -1
  590. package/esm/themes/gray.js +9 -1
  591. package/esm/themes/gray.src.js +1 -1
  592. package/esm/themes/grid-light.js +9 -1
  593. package/esm/themes/grid-light.src.js +1 -1
  594. package/esm/themes/grid.js +9 -1
  595. package/esm/themes/grid.src.js +1 -1
  596. package/esm/themes/high-contrast-dark.js +9 -1
  597. package/esm/themes/high-contrast-dark.src.js +1 -1
  598. package/esm/themes/high-contrast-light.js +9 -1
  599. package/esm/themes/high-contrast-light.src.js +1 -1
  600. package/esm/themes/sand-signika.js +9 -1
  601. package/esm/themes/sand-signika.src.js +1 -1
  602. package/esm/themes/skies.js +9 -1
  603. package/esm/themes/skies.src.js +1 -1
  604. package/esm/themes/sunset.js +9 -1
  605. package/esm/themes/sunset.src.js +1 -1
  606. package/highcharts-3d.d.ts +1 -9
  607. package/highcharts-3d.js +11 -1
  608. package/highcharts-3d.src.d.ts +1 -9
  609. package/highcharts-3d.src.js +3 -4
  610. package/highcharts-gantt.js +15 -2
  611. package/highcharts-gantt.src.js +546 -392
  612. package/highcharts-more.d.ts +10 -9
  613. package/highcharts-more.js +9 -1
  614. package/highcharts-more.src.d.ts +10 -9
  615. package/highcharts-more.src.js +516 -57
  616. package/highcharts.d.ts +4526 -1522
  617. package/highcharts.js +9 -2
  618. package/highcharts.src.d.ts +4526 -1522
  619. package/highcharts.src.js +273 -168
  620. package/highmaps.js +9 -2
  621. package/highmaps.src.js +294 -191
  622. package/highstock.js +9 -2
  623. package/highstock.src.js +490 -361
  624. package/i18n/fr-FR.js +13 -1
  625. package/i18n/fr-FR.src.js +8 -8
  626. package/i18n/nb-NO.js +13 -1
  627. package/i18n/nb-NO.src.js +8 -8
  628. package/i18n/zh-CN.js +13 -1
  629. package/i18n/zh-CN.src.js +8 -8
  630. package/indicators/acceleration-bands.d.ts +1 -9
  631. package/indicators/acceleration-bands.js +12 -1
  632. package/indicators/acceleration-bands.src.d.ts +1 -9
  633. package/indicators/acceleration-bands.src.js +1 -1
  634. package/indicators/accumulation-distribution.d.ts +1 -9
  635. package/indicators/accumulation-distribution.js +12 -1
  636. package/indicators/accumulation-distribution.src.d.ts +1 -9
  637. package/indicators/accumulation-distribution.src.js +1 -1
  638. package/indicators/ao.d.ts +1 -9
  639. package/indicators/ao.js +12 -1
  640. package/indicators/ao.src.d.ts +1 -9
  641. package/indicators/ao.src.js +1 -1
  642. package/indicators/apo.d.ts +1 -9
  643. package/indicators/apo.js +12 -1
  644. package/indicators/apo.src.d.ts +1 -9
  645. package/indicators/apo.src.js +1 -1
  646. package/indicators/aroon-oscillator.d.ts +1 -9
  647. package/indicators/aroon-oscillator.js +12 -1
  648. package/indicators/aroon-oscillator.src.d.ts +1 -9
  649. package/indicators/aroon-oscillator.src.js +1 -1
  650. package/indicators/aroon.d.ts +1 -9
  651. package/indicators/aroon.js +12 -1
  652. package/indicators/aroon.src.d.ts +1 -9
  653. package/indicators/aroon.src.js +1 -1
  654. package/indicators/atr.d.ts +1 -9
  655. package/indicators/atr.js +12 -1
  656. package/indicators/atr.src.d.ts +1 -9
  657. package/indicators/atr.src.js +1 -1
  658. package/indicators/bollinger-bands.d.ts +1 -9
  659. package/indicators/bollinger-bands.js +12 -1
  660. package/indicators/bollinger-bands.src.d.ts +1 -9
  661. package/indicators/bollinger-bands.src.js +1 -1
  662. package/indicators/cci.d.ts +1 -9
  663. package/indicators/cci.js +12 -1
  664. package/indicators/cci.src.d.ts +1 -9
  665. package/indicators/cci.src.js +1 -1
  666. package/indicators/chaikin.d.ts +1 -9
  667. package/indicators/chaikin.js +12 -1
  668. package/indicators/chaikin.src.d.ts +1 -9
  669. package/indicators/chaikin.src.js +1 -1
  670. package/indicators/cmf.d.ts +1 -9
  671. package/indicators/cmf.js +11 -1
  672. package/indicators/cmf.src.d.ts +1 -9
  673. package/indicators/cmf.src.js +1 -1
  674. package/indicators/cmo.d.ts +1 -9
  675. package/indicators/cmo.js +12 -1
  676. package/indicators/cmo.src.d.ts +1 -9
  677. package/indicators/cmo.src.js +1 -1
  678. package/indicators/dema.d.ts +1 -9
  679. package/indicators/dema.js +12 -1
  680. package/indicators/dema.src.d.ts +1 -9
  681. package/indicators/dema.src.js +1 -1
  682. package/indicators/disparity-index.d.ts +1 -9
  683. package/indicators/disparity-index.js +12 -1
  684. package/indicators/disparity-index.src.d.ts +1 -9
  685. package/indicators/disparity-index.src.js +1 -1
  686. package/indicators/dmi.d.ts +1 -9
  687. package/indicators/dmi.js +12 -1
  688. package/indicators/dmi.src.d.ts +1 -9
  689. package/indicators/dmi.src.js +1 -1
  690. package/indicators/dpo.d.ts +1 -9
  691. package/indicators/dpo.js +12 -1
  692. package/indicators/dpo.src.d.ts +1 -9
  693. package/indicators/dpo.src.js +1 -1
  694. package/indicators/ema.d.ts +1 -9
  695. package/indicators/ema.src.d.ts +1 -9
  696. package/indicators/ema.src.js +3 -6
  697. package/indicators/ichimoku-kinko-hyo.d.ts +1 -9
  698. package/indicators/ichimoku-kinko-hyo.js +12 -1
  699. package/indicators/ichimoku-kinko-hyo.src.d.ts +1 -9
  700. package/indicators/ichimoku-kinko-hyo.src.js +1 -1
  701. package/indicators/indicators-all.d.ts +1 -9
  702. package/indicators/indicators-all.js +12 -1
  703. package/indicators/indicators-all.src.d.ts +1 -9
  704. package/indicators/indicators-all.src.js +2 -2
  705. package/indicators/indicators.d.ts +1 -9
  706. package/indicators/indicators.js +12 -1
  707. package/indicators/indicators.src.d.ts +1 -9
  708. package/indicators/indicators.src.js +1 -1
  709. package/indicators/keltner-channels.d.ts +1 -9
  710. package/indicators/keltner-channels.js +12 -1
  711. package/indicators/keltner-channels.src.d.ts +1 -9
  712. package/indicators/keltner-channels.src.js +1 -1
  713. package/indicators/klinger.d.ts +1 -9
  714. package/indicators/klinger.js +12 -1
  715. package/indicators/klinger.src.d.ts +1 -9
  716. package/indicators/klinger.src.js +1 -1
  717. package/indicators/macd.d.ts +1 -9
  718. package/indicators/macd.js +12 -1
  719. package/indicators/macd.src.d.ts +1 -9
  720. package/indicators/macd.src.js +2 -2
  721. package/indicators/mfi.d.ts +1 -9
  722. package/indicators/mfi.js +12 -1
  723. package/indicators/mfi.src.d.ts +1 -9
  724. package/indicators/mfi.src.js +1 -1
  725. package/indicators/momentum.d.ts +1 -9
  726. package/indicators/momentum.js +12 -1
  727. package/indicators/momentum.src.d.ts +1 -9
  728. package/indicators/momentum.src.js +1 -1
  729. package/indicators/natr.d.ts +1 -9
  730. package/indicators/natr.js +12 -1
  731. package/indicators/natr.src.d.ts +1 -9
  732. package/indicators/natr.src.js +1 -1
  733. package/indicators/obv.d.ts +1 -9
  734. package/indicators/obv.js +12 -1
  735. package/indicators/obv.src.d.ts +1 -9
  736. package/indicators/obv.src.js +1 -1
  737. package/indicators/pivot-points.d.ts +1 -9
  738. package/indicators/pivot-points.js +12 -1
  739. package/indicators/pivot-points.src.d.ts +1 -9
  740. package/indicators/pivot-points.src.js +1 -1
  741. package/indicators/ppo.d.ts +1 -9
  742. package/indicators/ppo.js +12 -1
  743. package/indicators/ppo.src.d.ts +1 -9
  744. package/indicators/ppo.src.js +1 -1
  745. package/indicators/price-channel.d.ts +1 -9
  746. package/indicators/price-channel.js +12 -1
  747. package/indicators/price-channel.src.d.ts +1 -9
  748. package/indicators/price-channel.src.js +1 -1
  749. package/indicators/price-envelopes.d.ts +1 -9
  750. package/indicators/price-envelopes.js +12 -1
  751. package/indicators/price-envelopes.src.d.ts +1 -9
  752. package/indicators/price-envelopes.src.js +1 -1
  753. package/indicators/psar.d.ts +1 -9
  754. package/indicators/psar.js +12 -1
  755. package/indicators/psar.src.d.ts +1 -9
  756. package/indicators/psar.src.js +1 -1
  757. package/indicators/regressions.d.ts +1 -9
  758. package/indicators/regressions.js +12 -1
  759. package/indicators/regressions.src.d.ts +1 -9
  760. package/indicators/regressions.src.js +1 -1
  761. package/indicators/roc.d.ts +1 -9
  762. package/indicators/roc.js +12 -1
  763. package/indicators/roc.src.d.ts +1 -9
  764. package/indicators/roc.src.js +1 -1
  765. package/indicators/rsi.d.ts +1 -9
  766. package/indicators/rsi.js +12 -1
  767. package/indicators/rsi.src.d.ts +1 -9
  768. package/indicators/rsi.src.js +1 -1
  769. package/indicators/slow-stochastic.d.ts +1 -9
  770. package/indicators/slow-stochastic.js +12 -1
  771. package/indicators/slow-stochastic.src.d.ts +1 -9
  772. package/indicators/slow-stochastic.src.js +1 -1
  773. package/indicators/stochastic.d.ts +1 -9
  774. package/indicators/stochastic.js +12 -1
  775. package/indicators/stochastic.src.d.ts +1 -9
  776. package/indicators/stochastic.src.js +1 -1
  777. package/indicators/supertrend.d.ts +1 -9
  778. package/indicators/supertrend.js +12 -1
  779. package/indicators/supertrend.src.d.ts +1 -9
  780. package/indicators/supertrend.src.js +1 -1
  781. package/indicators/tema.d.ts +1 -9
  782. package/indicators/tema.js +12 -1
  783. package/indicators/tema.src.d.ts +1 -9
  784. package/indicators/tema.src.js +1 -1
  785. package/indicators/trendline.d.ts +1 -9
  786. package/indicators/trendline.js +12 -1
  787. package/indicators/trendline.src.d.ts +1 -9
  788. package/indicators/trendline.src.js +1 -1
  789. package/indicators/trix.d.ts +1 -9
  790. package/indicators/trix.js +12 -1
  791. package/indicators/trix.src.d.ts +1 -9
  792. package/indicators/trix.src.js +1 -1
  793. package/indicators/volume-by-price.d.ts +1 -9
  794. package/indicators/volume-by-price.js +12 -1
  795. package/indicators/volume-by-price.src.d.ts +1 -9
  796. package/indicators/volume-by-price.src.js +1 -1
  797. package/indicators/vwap.d.ts +1 -9
  798. package/indicators/vwap.js +12 -1
  799. package/indicators/vwap.src.d.ts +1 -9
  800. package/indicators/vwap.src.js +1 -1
  801. package/indicators/williams-r.d.ts +1 -9
  802. package/indicators/williams-r.js +12 -1
  803. package/indicators/williams-r.src.d.ts +1 -9
  804. package/indicators/williams-r.src.js +1 -1
  805. package/indicators/wma.d.ts +1 -9
  806. package/indicators/wma.js +12 -1
  807. package/indicators/wma.src.d.ts +1 -9
  808. package/indicators/wma.src.js +1 -1
  809. package/indicators/zigzag.d.ts +1 -9
  810. package/indicators/zigzag.js +12 -1
  811. package/indicators/zigzag.src.d.ts +1 -9
  812. package/indicators/zigzag.src.js +1 -1
  813. package/modules/accessibility.d.ts +1 -11
  814. package/modules/accessibility.js +12 -1
  815. package/modules/accessibility.src.d.ts +1 -11
  816. package/modules/accessibility.src.js +92 -63
  817. package/modules/annotations-advanced.d.ts +1 -9
  818. package/modules/annotations-advanced.js +21 -1
  819. package/modules/annotations-advanced.src.d.ts +1 -9
  820. package/modules/annotations-advanced.src.js +888 -794
  821. package/modules/annotations.d.ts +1 -9
  822. package/modules/annotations.js +11 -1
  823. package/modules/annotations.src.d.ts +1 -9
  824. package/modules/annotations.src.js +95 -43
  825. package/modules/arc-diagram.d.ts +1 -9
  826. package/modules/arc-diagram.js +11 -1
  827. package/modules/arc-diagram.src.d.ts +1 -9
  828. package/modules/arc-diagram.src.js +3 -3
  829. package/modules/arrow-symbols.d.ts +1 -9
  830. package/modules/arrow-symbols.js +11 -1
  831. package/modules/arrow-symbols.src.d.ts +1 -9
  832. package/modules/arrow-symbols.src.js +1 -1
  833. package/modules/boost-canvas.d.ts +1 -9
  834. package/modules/boost-canvas.js +12 -1
  835. package/modules/boost-canvas.src.d.ts +1 -9
  836. package/modules/boost-canvas.src.js +102 -53
  837. package/modules/boost.d.ts +1 -9
  838. package/modules/boost.js +13 -1
  839. package/modules/boost.src.d.ts +1 -9
  840. package/modules/boost.src.js +107 -49
  841. package/modules/broken-axis.d.ts +1 -9
  842. package/modules/broken-axis.js +9 -1
  843. package/modules/broken-axis.src.d.ts +1 -9
  844. package/modules/broken-axis.src.js +115 -91
  845. package/modules/bullet.d.ts +1 -9
  846. package/modules/bullet.js +11 -1
  847. package/modules/bullet.src.d.ts +1 -9
  848. package/modules/bullet.src.js +1 -1
  849. package/modules/coloraxis.d.ts +1 -9
  850. package/modules/coloraxis.js +11 -1
  851. package/modules/coloraxis.src.d.ts +1 -9
  852. package/modules/coloraxis.src.js +6 -7
  853. package/modules/current-date-indicator.d.ts +1 -9
  854. package/modules/current-date-indicator.js +11 -1
  855. package/modules/current-date-indicator.src.d.ts +1 -9
  856. package/modules/current-date-indicator.src.js +1 -1
  857. package/modules/cylinder.d.ts +1 -9
  858. package/modules/cylinder.js +12 -1
  859. package/modules/cylinder.src.d.ts +1 -9
  860. package/modules/cylinder.src.js +1 -1
  861. package/modules/data-tools.js +11 -1
  862. package/modules/data-tools.src.js +542 -125
  863. package/modules/data.d.ts +1 -9
  864. package/modules/data.js +11 -1
  865. package/modules/data.src.d.ts +1 -9
  866. package/modules/data.src.js +46 -39
  867. package/modules/datagrouping.d.ts +1 -9
  868. package/modules/datagrouping.js +11 -1
  869. package/modules/datagrouping.src.d.ts +1 -9
  870. package/modules/datagrouping.src.js +1 -1
  871. package/modules/debugger.d.ts +1 -9
  872. package/modules/debugger.js +11 -1
  873. package/modules/debugger.src.d.ts +1 -9
  874. package/modules/debugger.src.js +1 -1
  875. package/modules/dependency-wheel.d.ts +1 -9
  876. package/modules/dependency-wheel.js +12 -1
  877. package/modules/dependency-wheel.src.d.ts +1 -9
  878. package/modules/dependency-wheel.src.js +3 -3
  879. package/modules/dotplot.d.ts +1 -9
  880. package/modules/dotplot.js +11 -1
  881. package/modules/dotplot.src.d.ts +1 -9
  882. package/modules/dotplot.src.js +1 -1
  883. package/modules/drag-panes.d.ts +1 -9
  884. package/modules/drag-panes.js +13 -1
  885. package/modules/drag-panes.src.d.ts +1 -9
  886. package/modules/drag-panes.src.js +1 -1
  887. package/modules/draggable-points.d.ts +1 -9
  888. package/modules/draggable-points.js +9 -1
  889. package/modules/draggable-points.src.d.ts +1 -9
  890. package/modules/draggable-points.src.js +1 -1
  891. package/modules/drilldown.d.ts +1 -9
  892. package/modules/drilldown.js +13 -1
  893. package/modules/drilldown.src.d.ts +1 -9
  894. package/modules/drilldown.src.js +4 -2
  895. package/modules/dumbbell.d.ts +1 -9
  896. package/modules/dumbbell.js +9 -1
  897. package/modules/dumbbell.src.d.ts +1 -9
  898. package/modules/dumbbell.src.js +1 -1
  899. package/modules/export-data.d.ts +2 -79
  900. package/modules/export-data.js +12 -1
  901. package/modules/export-data.src.d.ts +2 -79
  902. package/modules/export-data.src.js +997 -804
  903. package/modules/exporting.d.ts +35 -21
  904. package/modules/exporting.js +11 -1
  905. package/modules/exporting.src.d.ts +35 -21
  906. package/modules/exporting.src.js +1452 -628
  907. package/modules/flowmap.d.ts +1 -9
  908. package/modules/flowmap.js +9 -1
  909. package/modules/flowmap.src.d.ts +1 -9
  910. package/modules/flowmap.src.js +1 -1
  911. package/modules/full-screen.d.ts +1 -9
  912. package/modules/full-screen.js +12 -1
  913. package/modules/full-screen.src.d.ts +1 -9
  914. package/modules/full-screen.src.js +3 -3
  915. package/modules/funnel.d.ts +1 -9
  916. package/modules/funnel.js +11 -1
  917. package/modules/funnel.src.d.ts +1 -9
  918. package/modules/funnel.src.js +7 -3
  919. package/modules/funnel3d.d.ts +1 -9
  920. package/modules/funnel3d.js +13 -1
  921. package/modules/funnel3d.src.d.ts +1 -9
  922. package/modules/funnel3d.src.js +1 -1
  923. package/modules/gantt.d.ts +1 -9
  924. package/modules/gantt.js +31 -1
  925. package/modules/gantt.src.d.ts +1 -9
  926. package/modules/gantt.src.js +273 -230
  927. package/modules/geoheatmap.d.ts +1 -9
  928. package/modules/geoheatmap.js +9 -1
  929. package/modules/geoheatmap.src.d.ts +1 -9
  930. package/modules/geoheatmap.src.js +1 -1
  931. package/modules/grid-axis.d.ts +1 -9
  932. package/modules/grid-axis.js +11 -1
  933. package/modules/grid-axis.src.d.ts +1 -9
  934. package/modules/grid-axis.src.js +1 -1
  935. package/modules/heatmap.d.ts +1 -9
  936. package/modules/heatmap.js +19 -1
  937. package/modules/heatmap.src.d.ts +1 -9
  938. package/modules/heatmap.src.js +21 -23
  939. package/modules/heikinashi.d.ts +1 -9
  940. package/modules/heikinashi.js +12 -1
  941. package/modules/heikinashi.src.d.ts +1 -9
  942. package/modules/heikinashi.src.js +1 -1
  943. package/modules/histogram-bellcurve.d.ts +2 -11
  944. package/modules/histogram-bellcurve.js +10 -1
  945. package/modules/histogram-bellcurve.src.d.ts +2 -11
  946. package/modules/histogram-bellcurve.src.js +36 -27
  947. package/modules/hollowcandlestick.d.ts +1 -9
  948. package/modules/hollowcandlestick.js +12 -1
  949. package/modules/hollowcandlestick.src.d.ts +1 -9
  950. package/modules/hollowcandlestick.src.js +1 -1
  951. package/modules/item-series.d.ts +1 -9
  952. package/modules/item-series.js +11 -1
  953. package/modules/item-series.src.d.ts +1 -9
  954. package/modules/item-series.src.js +3 -5
  955. package/modules/lollipop.d.ts +1 -9
  956. package/modules/lollipop.js +9 -1
  957. package/modules/lollipop.src.d.ts +1 -9
  958. package/modules/lollipop.src.js +1 -1
  959. package/modules/map.d.ts +1 -9
  960. package/modules/map.js +21 -1
  961. package/modules/map.src.d.ts +1 -9
  962. package/modules/map.src.js +25 -27
  963. package/modules/marker-clusters.d.ts +1 -9
  964. package/modules/marker-clusters.js +11 -1
  965. package/modules/marker-clusters.src.d.ts +1 -9
  966. package/modules/marker-clusters.src.js +1 -1
  967. package/modules/mouse-wheel-zoom.d.ts +1 -9
  968. package/modules/mouse-wheel-zoom.js +11 -1
  969. package/modules/mouse-wheel-zoom.src.d.ts +1 -9
  970. package/modules/mouse-wheel-zoom.src.js +1 -1
  971. package/modules/navigator.d.ts +1 -9
  972. package/modules/navigator.js +11 -1
  973. package/modules/navigator.src.d.ts +1 -9
  974. package/modules/navigator.src.js +29 -29
  975. package/modules/networkgraph.d.ts +1 -9
  976. package/modules/networkgraph.js +11 -1
  977. package/modules/networkgraph.src.d.ts +1 -9
  978. package/modules/networkgraph.src.js +16 -4
  979. package/modules/no-data-to-display.d.ts +1 -9
  980. package/modules/no-data-to-display.js +12 -1
  981. package/modules/no-data-to-display.src.d.ts +1 -9
  982. package/modules/no-data-to-display.src.js +1 -1
  983. package/modules/non-cartesian-zoom.d.ts +9 -0
  984. package/modules/non-cartesian-zoom.js +11 -0
  985. package/modules/non-cartesian-zoom.src.d.ts +9 -0
  986. package/modules/non-cartesian-zoom.src.js +427 -0
  987. package/modules/offline-exporting.d.ts +2 -90
  988. package/modules/offline-exporting.js +12 -1
  989. package/modules/offline-exporting.src.d.ts +2 -90
  990. package/modules/offline-exporting.src.js +355 -3380
  991. package/modules/organization.d.ts +1 -9
  992. package/modules/organization.js +11 -1
  993. package/modules/organization.src.d.ts +1 -9
  994. package/modules/organization.src.js +3 -3
  995. package/modules/parallel-coordinates.d.ts +1 -9
  996. package/modules/parallel-coordinates.js +11 -1
  997. package/modules/parallel-coordinates.src.d.ts +1 -9
  998. package/modules/parallel-coordinates.src.js +1 -1
  999. package/modules/pareto.d.ts +1 -9
  1000. package/modules/pareto.js +11 -1
  1001. package/modules/pareto.src.d.ts +1 -9
  1002. package/modules/pareto.src.js +1 -1
  1003. package/modules/pathfinder.d.ts +1 -9
  1004. package/modules/pathfinder.js +11 -1
  1005. package/modules/pathfinder.src.d.ts +1 -9
  1006. package/modules/pathfinder.src.js +1 -1
  1007. package/modules/pattern-fill.d.ts +1 -9
  1008. package/modules/pattern-fill.js +12 -1
  1009. package/modules/pattern-fill.src.d.ts +1 -9
  1010. package/modules/pattern-fill.src.js +1 -1
  1011. package/modules/pictorial.d.ts +1 -9
  1012. package/modules/pictorial.js +11 -1
  1013. package/modules/pictorial.src.d.ts +1 -9
  1014. package/modules/pictorial.src.js +1 -1
  1015. package/modules/pointandfigure.d.ts +1 -9
  1016. package/modules/pointandfigure.js +12 -1
  1017. package/modules/pointandfigure.src.d.ts +1 -9
  1018. package/modules/pointandfigure.src.js +1 -1
  1019. package/modules/price-indicator.d.ts +1 -9
  1020. package/modules/price-indicator.js +13 -1
  1021. package/modules/price-indicator.src.d.ts +1 -9
  1022. package/modules/price-indicator.src.js +1 -1
  1023. package/modules/pyramid3d.d.ts +1 -9
  1024. package/modules/pyramid3d.js +14 -1
  1025. package/modules/pyramid3d.src.d.ts +1 -9
  1026. package/modules/pyramid3d.src.js +1 -1
  1027. package/modules/renko.d.ts +1 -9
  1028. package/modules/renko.js +12 -1
  1029. package/modules/renko.src.d.ts +1 -9
  1030. package/modules/renko.src.js +1 -1
  1031. package/modules/sankey.d.ts +1 -9
  1032. package/modules/sankey.js +11 -1
  1033. package/modules/sankey.src.d.ts +1 -9
  1034. package/modules/sankey.src.js +3 -3
  1035. package/modules/series-label.d.ts +1 -9
  1036. package/modules/series-label.js +9 -1
  1037. package/modules/series-label.src.d.ts +1 -9
  1038. package/modules/series-label.src.js +1 -1
  1039. package/modules/series-on-point.d.ts +1 -9
  1040. package/modules/series-on-point.js +12 -1
  1041. package/modules/series-on-point.src.d.ts +1 -9
  1042. package/modules/series-on-point.src.js +6 -16
  1043. package/modules/solid-gauge.d.ts +1 -9
  1044. package/modules/solid-gauge.js +12 -1
  1045. package/modules/solid-gauge.src.d.ts +1 -9
  1046. package/modules/solid-gauge.src.js +27 -5
  1047. package/modules/sonification.d.ts +1 -9
  1048. package/modules/sonification.js +12 -1
  1049. package/modules/sonification.src.d.ts +1 -9
  1050. package/modules/sonification.src.js +45 -10
  1051. package/modules/static-scale.d.ts +1 -9
  1052. package/modules/static-scale.js +11 -1
  1053. package/modules/static-scale.src.d.ts +1 -9
  1054. package/modules/static-scale.src.js +14 -12
  1055. package/modules/stock-tools.d.ts +1 -9
  1056. package/modules/stock-tools.js +13 -1
  1057. package/modules/stock-tools.src.d.ts +1 -9
  1058. package/modules/stock-tools.src.js +37 -116
  1059. package/modules/stock.d.ts +1 -9
  1060. package/modules/stock.js +21 -1
  1061. package/modules/stock.src.d.ts +1 -9
  1062. package/modules/stock.src.js +233 -209
  1063. package/modules/streamgraph.d.ts +1 -9
  1064. package/modules/streamgraph.js +11 -1
  1065. package/modules/streamgraph.src.d.ts +1 -9
  1066. package/modules/streamgraph.src.js +1 -1
  1067. package/modules/sunburst.d.ts +1 -9
  1068. package/modules/sunburst.js +10 -1
  1069. package/modules/sunburst.src.d.ts +1 -9
  1070. package/modules/sunburst.src.js +9 -9
  1071. package/modules/textpath.d.ts +1 -9
  1072. package/modules/textpath.js +9 -1
  1073. package/modules/textpath.src.d.ts +1 -9
  1074. package/modules/textpath.src.js +3 -3
  1075. package/modules/tiledwebmap.d.ts +1 -9
  1076. package/modules/tiledwebmap.js +10 -2
  1077. package/modules/tiledwebmap.src.d.ts +1 -9
  1078. package/modules/tiledwebmap.src.js +1 -1
  1079. package/modules/tilemap.d.ts +1 -9
  1080. package/modules/tilemap.js +12 -1
  1081. package/modules/tilemap.src.d.ts +1 -9
  1082. package/modules/tilemap.src.js +1 -1
  1083. package/modules/timeline.d.ts +1 -9
  1084. package/modules/timeline.js +12 -1
  1085. package/modules/timeline.src.d.ts +1 -9
  1086. package/modules/timeline.src.js +1 -1
  1087. package/modules/treegraph.d.ts +1 -9
  1088. package/modules/treegraph.js +11 -1
  1089. package/modules/treegraph.src.d.ts +1 -9
  1090. package/modules/treegraph.src.js +16 -8
  1091. package/modules/treegrid.d.ts +1 -9
  1092. package/modules/treegrid.js +11 -1
  1093. package/modules/treegrid.src.d.ts +1 -9
  1094. package/modules/treegrid.src.js +190 -159
  1095. package/modules/treemap.d.ts +1 -9
  1096. package/modules/treemap.js +10 -1
  1097. package/modules/treemap.src.d.ts +1 -9
  1098. package/modules/treemap.src.js +7 -7
  1099. package/modules/variable-pie.d.ts +1 -9
  1100. package/modules/variable-pie.js +11 -1
  1101. package/modules/variable-pie.src.d.ts +1 -9
  1102. package/modules/variable-pie.src.js +1 -1
  1103. package/modules/variwide.d.ts +1 -9
  1104. package/modules/variwide.js +11 -1
  1105. package/modules/variwide.src.d.ts +1 -9
  1106. package/modules/variwide.src.js +18 -13
  1107. package/modules/vector.d.ts +1 -9
  1108. package/modules/vector.js +11 -1
  1109. package/modules/vector.src.d.ts +1 -9
  1110. package/modules/vector.src.js +1 -1
  1111. package/modules/venn.d.ts +1 -9
  1112. package/modules/venn.js +10 -1
  1113. package/modules/venn.src.d.ts +1 -9
  1114. package/modules/venn.src.js +5 -3
  1115. package/modules/windbarb.d.ts +1 -9
  1116. package/modules/windbarb.js +11 -1
  1117. package/modules/windbarb.src.d.ts +1 -9
  1118. package/modules/windbarb.src.js +1 -1
  1119. package/modules/wordcloud.d.ts +1 -9
  1120. package/modules/wordcloud.js +10 -1
  1121. package/modules/wordcloud.src.d.ts +1 -9
  1122. package/modules/wordcloud.src.js +89 -12
  1123. package/modules/xrange.d.ts +1 -9
  1124. package/modules/xrange.js +11 -1
  1125. package/modules/xrange.src.d.ts +1 -9
  1126. package/modules/xrange.src.js +3 -2
  1127. package/options/abands.d.ts +8 -0
  1128. package/options/abands.src.d.ts +8 -0
  1129. package/options/ao.d.ts +8 -0
  1130. package/options/ao.src.d.ts +8 -0
  1131. package/options/arcdiagram.d.ts +8 -0
  1132. package/options/arcdiagram.src.d.ts +8 -0
  1133. package/options/area.d.ts +9 -0
  1134. package/options/area.src.d.ts +9 -0
  1135. package/options/arearange.d.ts +9 -0
  1136. package/options/arearange.src.d.ts +9 -0
  1137. package/options/areaspline.d.ts +9 -0
  1138. package/options/areaspline.src.d.ts +9 -0
  1139. package/options/areasplinerange.d.ts +9 -0
  1140. package/options/areasplinerange.src.d.ts +9 -0
  1141. package/options/aroon.d.ts +8 -0
  1142. package/options/aroon.src.d.ts +8 -0
  1143. package/options/atr.d.ts +8 -0
  1144. package/options/atr.src.d.ts +8 -0
  1145. package/options/bellcurve.d.ts +8 -0
  1146. package/options/bellcurve.src.d.ts +8 -0
  1147. package/options/boxplot.d.ts +8 -0
  1148. package/options/boxplot.src.d.ts +8 -0
  1149. package/options/bullet.d.ts +8 -0
  1150. package/options/bullet.src.d.ts +8 -0
  1151. package/options/chaikin.d.ts +8 -0
  1152. package/options/chaikin.src.d.ts +8 -0
  1153. package/options/cmo.d.ts +8 -0
  1154. package/options/cmo.src.d.ts +8 -0
  1155. package/options/columnpyramid.d.ts +9 -0
  1156. package/options/columnpyramid.src.d.ts +9 -0
  1157. package/options/columnrange.d.ts +9 -0
  1158. package/options/columnrange.src.d.ts +9 -0
  1159. package/options/dmi.d.ts +8 -0
  1160. package/options/dmi.src.d.ts +8 -0
  1161. package/options/errorbar.d.ts +8 -0
  1162. package/options/errorbar.src.d.ts +8 -0
  1163. package/options/flags.d.ts +8 -0
  1164. package/options/flags.src.d.ts +8 -0
  1165. package/options/funnel.d.ts +8 -0
  1166. package/options/funnel.src.d.ts +8 -0
  1167. package/options/gauge.d.ts +8 -0
  1168. package/options/gauge.src.d.ts +8 -0
  1169. package/options/item.d.ts +8 -0
  1170. package/options/item.src.d.ts +8 -0
  1171. package/options/keltnerchannels.d.ts +8 -0
  1172. package/options/keltnerchannels.src.d.ts +8 -0
  1173. package/options/line.d.ts +9 -0
  1174. package/options/line.src.d.ts +9 -0
  1175. package/options/linearregressionangle.d.ts +8 -0
  1176. package/options/linearregressionangle.src.d.ts +8 -0
  1177. package/options/linearregressionintercept.d.ts +8 -0
  1178. package/options/linearregressionintercept.src.d.ts +8 -0
  1179. package/options/map.d.ts +8 -0
  1180. package/options/map.src.d.ts +8 -0
  1181. package/options/mfi.d.ts +8 -0
  1182. package/options/mfi.src.d.ts +8 -0
  1183. package/options/natr.d.ts +8 -0
  1184. package/options/natr.src.d.ts +8 -0
  1185. package/options/ohlc.d.ts +8 -0
  1186. package/options/ohlc.src.d.ts +8 -0
  1187. package/options/packedbubble.d.ts +8 -0
  1188. package/options/packedbubble.src.d.ts +8 -0
  1189. package/options/pictorial.d.ts +8 -0
  1190. package/options/pictorial.src.d.ts +8 -0
  1191. package/options/pointandfigure.d.ts +8 -0
  1192. package/options/pointandfigure.src.d.ts +8 -0
  1193. package/options/polygon.d.ts +9 -0
  1194. package/options/polygon.src.d.ts +9 -0
  1195. package/options/ppo.d.ts +8 -0
  1196. package/options/ppo.src.d.ts +8 -0
  1197. package/options/psar.d.ts +8 -0
  1198. package/options/psar.src.d.ts +8 -0
  1199. package/options/pyramid.d.ts +8 -0
  1200. package/options/pyramid.src.d.ts +8 -0
  1201. package/options/renko.d.ts +8 -0
  1202. package/options/renko.src.d.ts +8 -0
  1203. package/options/roc.d.ts +8 -0
  1204. package/options/roc.src.d.ts +8 -0
  1205. package/options/sankey.d.ts +8 -0
  1206. package/options/sankey.src.d.ts +8 -0
  1207. package/options/scatter.d.ts +9 -0
  1208. package/options/scatter.src.d.ts +9 -0
  1209. package/options/series.d.ts +9 -0
  1210. package/options/series.src.d.ts +9 -0
  1211. package/options/sma.d.ts +8 -0
  1212. package/options/sma.src.d.ts +8 -0
  1213. package/options/solidgauge.d.ts +14 -0
  1214. package/options/solidgauge.src.d.ts +14 -0
  1215. package/options/spline.d.ts +9 -0
  1216. package/options/spline.src.d.ts +9 -0
  1217. package/options/stochastic.d.ts +8 -0
  1218. package/options/stochastic.src.d.ts +8 -0
  1219. package/options/tema.d.ts +8 -0
  1220. package/options/tema.src.d.ts +8 -0
  1221. package/options/tiledwebmap.d.ts +8 -0
  1222. package/options/tiledwebmap.src.d.ts +8 -0
  1223. package/options/timeline.d.ts +8 -0
  1224. package/options/timeline.src.d.ts +8 -0
  1225. package/options/treegraph.d.ts +8 -0
  1226. package/options/treegraph.src.d.ts +8 -0
  1227. package/options/trix.d.ts +8 -0
  1228. package/options/trix.src.d.ts +8 -0
  1229. package/options/variablepie.d.ts +8 -0
  1230. package/options/variablepie.src.d.ts +8 -0
  1231. package/options/variwide.d.ts +8 -0
  1232. package/options/variwide.src.d.ts +8 -0
  1233. package/options/vbp.d.ts +8 -0
  1234. package/options/vbp.src.d.ts +8 -0
  1235. package/options/vector.d.ts +9 -0
  1236. package/options/vector.src.d.ts +9 -0
  1237. package/options/venn.d.ts +8 -0
  1238. package/options/venn.src.d.ts +8 -0
  1239. package/options/vwap.d.ts +8 -0
  1240. package/options/vwap.src.d.ts +8 -0
  1241. package/options/windbarb.d.ts +9 -0
  1242. package/options/windbarb.src.d.ts +9 -0
  1243. package/options/wma.d.ts +8 -0
  1244. package/options/wma.src.d.ts +8 -0
  1245. package/options/wordcloud.d.ts +8 -0
  1246. package/options/wordcloud.src.d.ts +8 -0
  1247. package/options/zigzag.d.ts +8 -0
  1248. package/options/zigzag.src.d.ts +8 -0
  1249. package/package.json +1 -1
  1250. package/standalone-navigator.js +11 -2
  1251. package/standalone-navigator.src.js +312 -206
  1252. package/themes/adaptive.d.ts +18 -0
  1253. package/themes/adaptive.js +130 -0
  1254. package/themes/adaptive.src.d.ts +18 -0
  1255. package/themes/adaptive.src.js +1122 -0
  1256. package/themes/avocado.d.ts +1 -9
  1257. package/themes/avocado.js +9 -1
  1258. package/themes/avocado.src.d.ts +1 -9
  1259. package/themes/avocado.src.js +1 -1
  1260. package/themes/brand-dark.d.ts +1 -9
  1261. package/themes/brand-dark.js +9 -1
  1262. package/themes/brand-dark.src.d.ts +1 -9
  1263. package/themes/brand-dark.src.js +1 -1
  1264. package/themes/brand-light.d.ts +1 -9
  1265. package/themes/brand-light.js +9 -1
  1266. package/themes/brand-light.src.d.ts +1 -9
  1267. package/themes/brand-light.src.js +1 -1
  1268. package/themes/dark-blue.d.ts +1 -9
  1269. package/themes/dark-blue.js +9 -1
  1270. package/themes/dark-blue.src.d.ts +1 -9
  1271. package/themes/dark-blue.src.js +1 -1
  1272. package/themes/dark-green.d.ts +1 -9
  1273. package/themes/dark-green.js +9 -1
  1274. package/themes/dark-green.src.d.ts +1 -9
  1275. package/themes/dark-green.src.js +1 -1
  1276. package/themes/dark-unica.d.ts +1 -9
  1277. package/themes/dark-unica.js +9 -1
  1278. package/themes/dark-unica.src.d.ts +1 -9
  1279. package/themes/dark-unica.src.js +1 -1
  1280. package/themes/gray.d.ts +1 -9
  1281. package/themes/gray.js +9 -1
  1282. package/themes/gray.src.d.ts +1 -9
  1283. package/themes/gray.src.js +1 -1
  1284. package/themes/grid-light.d.ts +1 -9
  1285. package/themes/grid-light.js +9 -1
  1286. package/themes/grid-light.src.d.ts +1 -9
  1287. package/themes/grid-light.src.js +1 -1
  1288. package/themes/grid.d.ts +1 -9
  1289. package/themes/grid.js +9 -1
  1290. package/themes/grid.src.d.ts +1 -9
  1291. package/themes/grid.src.js +1 -1
  1292. package/themes/high-contrast-dark.d.ts +1 -9
  1293. package/themes/high-contrast-dark.js +9 -1
  1294. package/themes/high-contrast-dark.src.d.ts +1 -9
  1295. package/themes/high-contrast-dark.src.js +1 -1
  1296. package/themes/high-contrast-light.d.ts +1 -9
  1297. package/themes/high-contrast-light.js +9 -1
  1298. package/themes/high-contrast-light.src.d.ts +1 -9
  1299. package/themes/high-contrast-light.src.js +1 -1
  1300. package/themes/sand-signika.d.ts +1 -9
  1301. package/themes/sand-signika.js +9 -1
  1302. package/themes/sand-signika.src.d.ts +1 -9
  1303. package/themes/sand-signika.src.js +1 -1
  1304. package/themes/skies.d.ts +1 -9
  1305. package/themes/skies.js +9 -1
  1306. package/themes/skies.src.d.ts +1 -9
  1307. package/themes/skies.src.js +1 -1
  1308. package/themes/sunset.d.ts +1 -9
  1309. package/themes/sunset.js +9 -1
  1310. package/themes/sunset.src.d.ts +1 -9
  1311. package/themes/sunset.src.js +1 -1
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v12.2.0 (2025-04-07)
2
+ * @license Highcharts JS v12.4.0 (2025-09-04)
3
3
  * @module highcharts/modules/exporting
4
4
  * @requires highcharts
5
5
  *
@@ -116,6 +116,7 @@ var highcharts_AST_commonjs_highcharts_AST_commonjs2_highcharts_AST_root_Highcha
116
116
  var highcharts_AST_commonjs_highcharts_AST_commonjs2_highcharts_AST_root_Highcharts_AST_default = /*#__PURE__*/__webpack_require__.n(highcharts_AST_commonjs_highcharts_AST_commonjs2_highcharts_AST_root_Highcharts_AST_);
117
117
  // EXTERNAL MODULE: external {"amd":["highcharts/highcharts","Chart"],"commonjs":["highcharts","Chart"],"commonjs2":["highcharts","Chart"],"root":["Highcharts","Chart"]}
118
118
  var highcharts_Chart_commonjs_highcharts_Chart_commonjs2_highcharts_Chart_root_Highcharts_Chart_ = __webpack_require__(960);
119
+ var highcharts_Chart_commonjs_highcharts_Chart_commonjs2_highcharts_Chart_root_Highcharts_Chart_default = /*#__PURE__*/__webpack_require__.n(highcharts_Chart_commonjs_highcharts_Chart_commonjs2_highcharts_Chart_root_Highcharts_Chart_);
119
120
  ;// ./code/es-modules/Core/Chart/ChartNavigationComposition.js
120
121
  /**
121
122
  *
@@ -208,6 +209,171 @@ var ChartNavigationComposition;
208
209
  * */
209
210
  /* harmony default export */ const Chart_ChartNavigationComposition = (ChartNavigationComposition);
210
211
 
212
+ ;// ./code/es-modules/Extensions/DownloadURL.js
213
+ /* *
214
+ *
215
+ * (c) 2015-2025 Oystein Moseng
216
+ *
217
+ * License: www.highcharts.com/license
218
+ *
219
+ * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
220
+ *
221
+ * Mixin for downloading content in the browser
222
+ *
223
+ * */
224
+
225
+ /* *
226
+ *
227
+ * Imports
228
+ *
229
+ * */
230
+
231
+ const { isSafari, win, win: { document: doc } } = (highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default());
232
+
233
+ const { error } = (highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default());
234
+ /* *
235
+ *
236
+ * Constants
237
+ *
238
+ * */
239
+ const domurl = win.URL || win.webkitURL || win;
240
+ /* *
241
+ *
242
+ * Functions
243
+ *
244
+ * */
245
+ /**
246
+ * Convert base64 dataURL to Blob if supported, otherwise returns undefined.
247
+ *
248
+ * @private
249
+ * @function Highcharts.dataURLtoBlob
250
+ *
251
+ * @param {string} dataURL
252
+ * URL to convert.
253
+ *
254
+ * @return {string | undefined}
255
+ * Blob.
256
+ */
257
+ function dataURLtoBlob(dataURL) {
258
+ const parts = dataURL
259
+ .replace(/filename=.*;/, '')
260
+ .match(/data:([^;]*)(;base64)?,([A-Z+\d\/]+)/i);
261
+ if (parts &&
262
+ parts.length > 3 &&
263
+ (win.atob) &&
264
+ win.ArrayBuffer &&
265
+ win.Uint8Array &&
266
+ win.Blob &&
267
+ (domurl.createObjectURL)) {
268
+ // Try to convert data URL to Blob
269
+ const binStr = win.atob(parts[3]), buf = new win.ArrayBuffer(binStr.length), binary = new win.Uint8Array(buf);
270
+ for (let i = 0; i < binary.length; ++i) {
271
+ binary[i] = binStr.charCodeAt(i);
272
+ }
273
+ return domurl
274
+ .createObjectURL(new win.Blob([binary], { 'type': parts[1] }));
275
+ }
276
+ }
277
+ /**
278
+ * Download a data URL in the browser. Can also take a blob as first param.
279
+ *
280
+ * @private
281
+ * @function Highcharts.downloadURL
282
+ *
283
+ * @param {string | global.URL} dataURL
284
+ * The dataURL/Blob to download.
285
+ * @param {string} filename
286
+ * The name of the resulting file (w/extension).
287
+ */
288
+ function downloadURL(dataURL, filename) {
289
+ const nav = win.navigator, a = doc.createElement('a');
290
+ // IE specific blob implementation
291
+ // Don't use for normal dataURLs
292
+ if (typeof dataURL !== 'string' &&
293
+ !(dataURL instanceof String) &&
294
+ nav.msSaveOrOpenBlob) {
295
+ nav.msSaveOrOpenBlob(dataURL, filename);
296
+ return;
297
+ }
298
+ dataURL = '' + dataURL;
299
+ if (nav.userAgent.length > 1000 /* RegexLimits.shortLimit */) {
300
+ throw new Error('Input too long');
301
+ }
302
+ const // Some browsers have limitations for data URL lengths. Try to convert
303
+ // to Blob or fall back. Edge always needs that blob.
304
+ isOldEdgeBrowser = /Edge\/\d+/.test(nav.userAgent),
305
+ // Safari on iOS needs Blob in order to download PDF
306
+ safariBlob = (isSafari &&
307
+ typeof dataURL === 'string' &&
308
+ dataURL.indexOf('data:application/pdf') === 0);
309
+ if (safariBlob || isOldEdgeBrowser || dataURL.length > 2000000) {
310
+ dataURL = dataURLtoBlob(dataURL) || '';
311
+ if (!dataURL) {
312
+ throw new Error('Failed to convert to blob');
313
+ }
314
+ }
315
+ // Try HTML5 download attr if supported
316
+ if (typeof a.download !== 'undefined') {
317
+ a.href = dataURL;
318
+ a.download = filename; // HTML5 download attribute
319
+ doc.body.appendChild(a);
320
+ a.click();
321
+ doc.body.removeChild(a);
322
+ }
323
+ else {
324
+ // No download attr, just opening data URI
325
+ try {
326
+ if (!win.open(dataURL, 'chart')) {
327
+ throw new Error('Failed to open window');
328
+ }
329
+ }
330
+ catch {
331
+ // If window.open failed, try location.href
332
+ win.location.href = dataURL;
333
+ }
334
+ }
335
+ }
336
+ /**
337
+ * Asynchronously downloads a script from a provided location.
338
+ *
339
+ * @private
340
+ * @function Highcharts.getScript
341
+ *
342
+ * @param {string} scriptLocation
343
+ * The location for the script to fetch.
344
+ */
345
+ function getScript(scriptLocation) {
346
+ return new Promise((resolve, reject) => {
347
+ const head = doc.getElementsByTagName('head')[0], script = doc.createElement('script');
348
+ // Set type and location for the script
349
+ script.type = 'text/javascript';
350
+ script.src = scriptLocation;
351
+ // Resolve in case of a succesful script fetching
352
+ script.onload = () => {
353
+ resolve();
354
+ };
355
+ // Reject in case of fail
356
+ script.onerror = () => {
357
+ const msg = `Error loading script ${scriptLocation}`;
358
+ error(msg);
359
+ reject(new Error(msg));
360
+ };
361
+ // Append the newly created script
362
+ head.appendChild(script);
363
+ });
364
+ }
365
+ /* *
366
+ *
367
+ * Default Export
368
+ *
369
+ * */
370
+ const DownloadURL = {
371
+ dataURLtoBlob,
372
+ downloadURL,
373
+ getScript
374
+ };
375
+ /* harmony default export */ const Extensions_DownloadURL = (DownloadURL);
376
+
211
377
  ;// ./code/es-modules/Extensions/Exporting/ExportingDefaults.js
212
378
  /* *
213
379
  *
@@ -256,7 +422,7 @@ const exporting = {
256
422
  /**
257
423
  * Allows the end user to sort the data table by clicking on column headers.
258
424
  *
259
- * @since 10.3.3
425
+ * @since 10.3.3
260
426
  * @apioption exporting.allowTableSorting
261
427
  */
262
428
  allowTableSorting: true,
@@ -271,7 +437,7 @@ const exporting = {
271
437
  *
272
438
  * @type {boolean}
273
439
  * @default false
274
- * @since 12.0.0
440
+ * @since 12.0.0
275
441
  * @apioption exporting.applyStyleSheets
276
442
  */
277
443
  /**
@@ -374,8 +540,8 @@ const exporting = {
374
540
  * See [MDN](https://developer.mozilla.org/en-US/docs/Web/API/fetch)
375
541
  * for more information
376
542
  *
377
- * @type {Object}
378
- * @since 11.3.0
543
+ * @type {Object}
544
+ * @since 11.3.0
379
545
  * @apioption exporting.fetchOptions
380
546
  */
381
547
  /**
@@ -391,6 +557,27 @@ const exporting = {
391
557
  * @since 5.0.0
392
558
  * @apioption exporting.libURL
393
559
  */
560
+ libURL: 'https://code.highcharts.com/12.4.0/lib/',
561
+ /**
562
+ * Whether the chart should be exported using the browser's built-in
563
+ * capabilities, allowing offline exports without requiring access to the
564
+ * Highcharts export server, or sent directly to the export server for
565
+ * processing and downloading.
566
+ *
567
+ * This option is different from `exporting.fallbackToExportServer`, which
568
+ * controls whether the export server should be used as a fallback only if
569
+ * the local export fails. In contrast, `exporting.local` explicitly defines
570
+ * which export method to use.
571
+ *
572
+ * @see [fallbackToExportServer](#exporting.fallbackToExportServer)
573
+ *
574
+ * @type {boolean}
575
+ * @default true
576
+ * @since 12.3.0
577
+ * @requires modules/exporting
578
+ * @apioption exporting.local
579
+ */
580
+ local: true,
394
581
  /**
395
582
  * Analogous to [sourceWidth](#exporting.sourceWidth).
396
583
  *
@@ -463,7 +650,7 @@ const exporting = {
463
650
  * @sample {highcharts} highcharts/exporting/offline-download-pdffont/
464
651
  * Download PDF in a language containing non-Latin characters.
465
652
  *
466
- * @since 10.0.0
653
+ * @since 10.0.0
467
654
  * @requires modules/offline-exporting
468
655
  */
469
656
  pdfFont: {
@@ -472,25 +659,25 @@ const exporting = {
472
659
  * `bold` or `italic` are not defined, the `normal` font will be used
473
660
  * for those too.
474
661
  *
475
- * @type string|undefined
662
+ * @type string | undefined
476
663
  */
477
664
  normal: void 0,
478
665
  /**
479
666
  * The TTF font file for bold text.
480
667
  *
481
- * @type string|undefined
668
+ * @type string | undefined
482
669
  */
483
670
  bold: void 0,
484
671
  /**
485
672
  * The TTF font file for bold and italic text.
486
673
  *
487
- * @type string|undefined
674
+ * @type string | undefined
488
675
  */
489
676
  bolditalic: void 0,
490
677
  /**
491
678
  * The TTF font file for italic text.
492
679
  *
493
- * @type string|undefined
680
+ * @type string | undefined
494
681
  */
495
682
  italic: void 0
496
683
  },
@@ -593,7 +780,7 @@ const exporting = {
593
780
  * @sample highcharts/exporting/buttons-contextbutton-symbol-custom/
594
781
  * Custom shape as symbol
595
782
  *
596
- * @type {Highcharts.SymbolKeyValue|"menu"|"menuball"|string}
783
+ * @type {Highcharts.SymbolKeyValue | "menu" | "menuball" | string}
597
784
  * @since 2.0
598
785
  */
599
786
  symbol: 'menu',
@@ -614,12 +801,10 @@ const exporting = {
614
801
  * By default, there is the "View in full screen" and "Print" menu
615
802
  * items, plus one menu item for each of the available export types.
616
803
  *
617
- * @sample {highcharts} highcharts/exporting/menuitemdefinitions/
618
- * Menu item definitions
619
- * @sample {highstock} highcharts/exporting/menuitemdefinitions/
620
- * Menu item definitions
621
- * @sample {highmaps} highcharts/exporting/menuitemdefinitions/
804
+ * @sample highcharts/exporting/menuitemdefinitions/
622
805
  * Menu item definitions
806
+ * @sample highcharts/exporting/menuitemdefinitions-webp/
807
+ * Adding a custom menu item for WebP export
623
808
  *
624
809
  * @type {Array<string>}
625
810
  * @default ["viewFullscreen", "printChart", "separator", "downloadPNG", "downloadJPEG", "downloadSVG"]
@@ -651,12 +836,10 @@ const exporting = {
651
836
  * Custom text for the "exitFullScreen" can be set only in lang options
652
837
  * (it is not a separate button).
653
838
  *
654
- * @sample {highcharts} highcharts/exporting/menuitemdefinitions/
655
- * Menu item definitions
656
- * @sample {highstock} highcharts/exporting/menuitemdefinitions/
657
- * Menu item definitions
658
- * @sample {highmaps} highcharts/exporting/menuitemdefinitions/
839
+ * @sample highcharts/exporting/menuitemdefinitions/
659
840
  * Menu item definitions
841
+ * @sample highcharts/exporting/menuitemdefinitions-webp/
842
+ * Adding a custom menu item for WebP export
660
843
  *
661
844
  *
662
845
  * @type {Highcharts.Dictionary<Highcharts.ExportingMenuObject>}
@@ -670,9 +853,7 @@ const exporting = {
670
853
  viewFullscreen: {
671
854
  textKey: 'viewFullscreen',
672
855
  onclick: function () {
673
- if (this.fullscreen) {
674
- this.fullscreen.toggle();
675
- }
856
+ this.fullscreen?.toggle();
676
857
  }
677
858
  },
678
859
  /**
@@ -681,7 +862,7 @@ const exporting = {
681
862
  printChart: {
682
863
  textKey: 'printChart',
683
864
  onclick: function () {
684
- this.print();
865
+ this.exporting?.print();
685
866
  }
686
867
  },
687
868
  /**
@@ -695,8 +876,8 @@ const exporting = {
695
876
  */
696
877
  downloadPNG: {
697
878
  textKey: 'downloadPNG',
698
- onclick: function () {
699
- this.exportChart();
879
+ onclick: async function () {
880
+ await this.exporting?.exportChart();
700
881
  }
701
882
  },
702
883
  /**
@@ -704,8 +885,8 @@ const exporting = {
704
885
  */
705
886
  downloadJPEG: {
706
887
  textKey: 'downloadJPEG',
707
- onclick: function () {
708
- this.exportChart({
888
+ onclick: async function () {
889
+ await this.exporting?.exportChart({
709
890
  type: 'image/jpeg'
710
891
  });
711
892
  }
@@ -715,8 +896,8 @@ const exporting = {
715
896
  */
716
897
  downloadPDF: {
717
898
  textKey: 'downloadPDF',
718
- onclick: function () {
719
- this.exportChart({
899
+ onclick: async function () {
900
+ await this.exporting?.exportChart({
720
901
  type: 'application/pdf'
721
902
  });
722
903
  }
@@ -726,8 +907,8 @@ const exporting = {
726
907
  */
727
908
  downloadSVG: {
728
909
  textKey: 'downloadSVG',
729
- onclick: function () {
730
- this.exportChart({
910
+ onclick: async function () {
911
+ await this.exporting?.exportChart({
731
912
  type: 'image/svg+xml'
732
913
  });
733
914
  }
@@ -869,6 +1050,7 @@ const navigation = {
869
1050
  *
870
1051
  * @sample highcharts/title/widthadjust
871
1052
  * Adjust the spacing when using text button
1053
+ *
872
1054
  * @since 2.0
873
1055
  */
874
1056
  buttonSpacing: 5,
@@ -905,7 +1087,7 @@ const navigation = {
905
1087
  *
906
1088
  * @type boolean
907
1089
  * @default false
908
- * @since 10.3.0
1090
+ * @since 10.3.0
909
1091
  * @apioption navigation.buttonOptions.useHTML
910
1092
  */
911
1093
  /**
@@ -945,7 +1127,7 @@ const navigation = {
945
1127
  * @sample highcharts/navigation/buttonoptions-symbolfill/
946
1128
  * Blue symbol stroke for one of the buttons
947
1129
  *
948
- * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
1130
+ * @type {Highcharts.ColorString | Highcharts.GradientColorObject | Highcharts.PatternObject}
949
1131
  * @since 2.0
950
1132
  */
951
1133
  symbolFill: "#666666" /* Palette.neutralColor60 */,
@@ -985,7 +1167,7 @@ const navigation = {
985
1167
  /**
986
1168
  * The default fill exists only to capture hover events.
987
1169
  *
988
- * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
1170
+ * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
989
1171
  */
990
1172
  fill: "#ffffff" /* Palette.backgroundColor */,
991
1173
  /**
@@ -995,7 +1177,7 @@ const navigation = {
995
1177
  /**
996
1178
  * Default stroke for the buttons.
997
1179
  *
998
- * @type {Highcharts.ColorString}
1180
+ * @type {Highcharts.ColorString}
999
1181
  */
1000
1182
  stroke: 'none',
1001
1183
  /**
@@ -1254,7 +1436,7 @@ class Fullscreen {
1254
1436
  * the fullscreen mode.
1255
1437
  *
1256
1438
  * @name Highcharts.Fullscreen#isOpen
1257
- * @type {boolean|undefined}
1439
+ * @type {boolean | undefined}
1258
1440
  * @since 8.0.1
1259
1441
  */
1260
1442
  this.isOpen = false;
@@ -1396,7 +1578,7 @@ class Fullscreen {
1396
1578
  * @requires modules/full-screen
1397
1579
  */
1398
1580
  setButtonText() {
1399
- const chart = this.chart, exportDivElements = chart.exportDivElements, exportingOptions = chart.options.exporting, menuItems = (exportingOptions &&
1581
+ const chart = this.chart, exportDivElements = chart.exporting?.divElements, exportingOptions = chart.options.exporting, menuItems = (exportingOptions &&
1400
1582
  exportingOptions.buttons &&
1401
1583
  exportingOptions.buttons.contextButton.menuItems), lang = chart.options.lang;
1402
1584
  if (exportingOptions &&
@@ -1519,7 +1701,7 @@ class Fullscreen {
1519
1701
  * */
1520
1702
 
1521
1703
 
1522
- const { win } = (highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default());
1704
+ const { win: HttpUtilities_win } = (highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default());
1523
1705
 
1524
1706
  const { discardElement, objectEach } = (highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default());
1525
1707
  /* *
@@ -1533,10 +1715,10 @@ const { discardElement, objectEach } = (highcharts_commonjs_highcharts_commonjs2
1533
1715
  * @function Highcharts.ajax
1534
1716
  *
1535
1717
  * @param {Highcharts.AjaxSettingsObject} settings
1536
- * The Ajax settings to use.
1718
+ * The Ajax settings to use.
1537
1719
  *
1538
- * @return {false|undefined}
1539
- * Returns false, if error occurred.
1720
+ * @return {false | undefined}
1721
+ * Returns false, if error occurred.
1540
1722
  */
1541
1723
  function ajax(settings) {
1542
1724
  const headers = {
@@ -1547,10 +1729,12 @@ function ajax(settings) {
1547
1729
  }, r = new XMLHttpRequest();
1548
1730
  /**
1549
1731
  * Private error handler.
1732
+ *
1550
1733
  * @private
1734
+ *
1551
1735
  * @param {XMLHttpRequest} xhr
1552
1736
  * Internal request object.
1553
- * @param {string|Error} err
1737
+ * @param {string | Error} err
1554
1738
  * Occurred error.
1555
1739
  */
1556
1740
  function handleError(xhr, err) {
@@ -1606,11 +1790,12 @@ function ajax(settings) {
1606
1790
  * Get a JSON resource over XHR, also supporting CORS without preflight.
1607
1791
  *
1608
1792
  * @function Highcharts.getJSON
1793
+ *
1609
1794
  * @param {string} url
1610
- * The URL to load.
1795
+ * The URL to load.
1611
1796
  * @param {Function} success
1612
- * The success callback. For error handling, use the `Highcharts.ajax`
1613
- * function instead.
1797
+ * The success callback. For error handling, use the `Highcharts.ajax` function
1798
+ * instead.
1614
1799
  */
1615
1800
  function getJSON(url, success) {
1616
1801
  HttpUtilities.ajax({
@@ -1625,46 +1810,44 @@ function getJSON(url, success) {
1625
1810
  });
1626
1811
  }
1627
1812
  /**
1628
- * The post utility
1813
+ * The post utility.
1629
1814
  *
1630
1815
  * @private
1631
1816
  * @function Highcharts.post
1632
1817
  *
1633
1818
  * @param {string} url
1634
- * Post URL
1635
- *
1819
+ * Post URL.
1636
1820
  * @param {Object} data
1637
- * Post data
1638
- *
1821
+ * Post data.
1639
1822
  * @param {RequestInit} [fetchOptions]
1640
- * Additional attributes for the post request
1641
- */
1642
- /**
1643
- *
1823
+ * Additional attributes for the post request.
1644
1824
  */
1645
- function post(url, data, fetchOptions) {
1646
- const formData = new win.FormData();
1647
- // Add the data
1648
- objectEach(data, function (val, name) {
1649
- formData.append(name, val);
1825
+ async function post(url, data, fetchOptions) {
1826
+ // Prepare a form to send the data
1827
+ const formData = new HttpUtilities_win.FormData();
1828
+ // Add the data to the form
1829
+ objectEach(data, function (value, name) {
1830
+ formData.append(name, value);
1650
1831
  });
1651
1832
  formData.append('b64', 'true');
1652
- const { filename, type } = data;
1653
- return win.fetch(url, {
1833
+ // Send the POST
1834
+ const response = await HttpUtilities_win.fetch(url, {
1654
1835
  method: 'POST',
1655
1836
  body: formData,
1656
1837
  ...fetchOptions
1657
- }).then((res) => {
1658
- if (res.ok) {
1659
- res.text().then((text) => {
1660
- const link = document.createElement('a');
1661
- link.href = `data:${type};base64,${text}`;
1662
- link.download = filename;
1663
- link.click();
1664
- discardElement(link);
1665
- });
1666
- }
1667
1838
  });
1839
+ // Check the response
1840
+ if (response.ok) {
1841
+ // Get the text from the response
1842
+ const text = await response.text();
1843
+ // Prepare self-click link with the Base64 representation
1844
+ const link = document.createElement('a');
1845
+ link.href = `data:${data.type};base64,${text}`;
1846
+ link.download = data.filename;
1847
+ link.click();
1848
+ // Remove the link
1849
+ discardElement(link);
1850
+ }
1668
1851
  }
1669
1852
  /* *
1670
1853
  *
@@ -1688,29 +1871,35 @@ const HttpUtilities = {
1688
1871
  * The payload to send.
1689
1872
  *
1690
1873
  * @name Highcharts.AjaxSettingsObject#data
1691
- * @type {string|Highcharts.Dictionary<any>|undefined}
1874
+ * @type {string | Highcharts.Dictionary<any> | undefined}
1692
1875
  */ /**
1693
1876
  * The data type expected.
1877
+ *
1694
1878
  * @name Highcharts.AjaxSettingsObject#dataType
1695
- * @type {"json"|"xml"|"text"|"octet"|undefined}
1879
+ * @type {"json" | "xml" | "text" | "octet" | undefined}
1696
1880
  */ /**
1697
1881
  * Function to call on error.
1882
+ *
1698
1883
  * @name Highcharts.AjaxSettingsObject#error
1699
- * @type {Function|undefined}
1884
+ * @type {Function | undefined}
1700
1885
  */ /**
1701
1886
  * The headers; keyed on header name.
1887
+ *
1702
1888
  * @name Highcharts.AjaxSettingsObject#headers
1703
- * @type {Highcharts.Dictionary<string>|undefined}
1889
+ * @type {Highcharts.Dictionary<string> | undefined}
1704
1890
  */ /**
1705
1891
  * Function to call on success.
1892
+ *
1706
1893
  * @name Highcharts.AjaxSettingsObject#success
1707
- * @type {Function|undefined}
1894
+ * @type {Function | undefined}
1708
1895
  */ /**
1709
1896
  * The HTTP method to use. For example GET or POST.
1897
+ *
1710
1898
  * @name Highcharts.AjaxSettingsObject#type
1711
- * @type {string|undefined}
1899
+ * @type {string | undefined}
1712
1900
  */ /**
1713
1901
  * The URL to call.
1902
+ *
1714
1903
  * @name Highcharts.AjaxSettingsObject#url
1715
1904
  * @type {string}
1716
1905
  */
@@ -1733,69 +1922,347 @@ const HttpUtilities = {
1733
1922
 
1734
1923
 
1735
1924
 
1736
- const { defaultOptions } = (highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default());
1925
+ const { defaultOptions, setOptions } = (highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default());
1737
1926
 
1927
+ const { downloadURL: Exporting_downloadURL, getScript: Exporting_getScript } = Extensions_DownloadURL;
1738
1928
 
1739
1929
 
1740
1930
 
1741
- const { doc, SVG_NS, win: Exporting_win } = (highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default());
1742
1931
 
1932
+ const { composed: Exporting_composed, doc: Exporting_doc, isFirefox, isMS, isSafari: Exporting_isSafari, SVG_NS, win: Exporting_win } = (highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default());
1743
1933
 
1744
- const { addEvent: Exporting_addEvent, css, createElement, discardElement: Exporting_discardElement, extend, find, fireEvent: Exporting_fireEvent, isObject, merge, objectEach: Exporting_objectEach, pick, removeEvent, splat, uniqueKey } = (highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default());
1934
+
1935
+ const { addEvent: Exporting_addEvent, clearTimeout: Exporting_clearTimeout, createElement, css, discardElement: Exporting_discardElement, error: Exporting_error, extend, find, fireEvent: Exporting_fireEvent, isObject, merge, objectEach: Exporting_objectEach, pick, pushUnique: Exporting_pushUnique, removeEvent, splat, uniqueKey } = (highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default());
1936
+ highcharts_AST_commonjs_highcharts_AST_commonjs2_highcharts_AST_root_Highcharts_AST_default().allowedAttributes.push('data-z-index', 'fill-opacity', 'filter', 'preserveAspectRatio', 'rx', 'ry', 'stroke-dasharray', 'stroke-linejoin', 'stroke-opacity', 'text-anchor', 'transform', 'transform-origin', 'version', 'viewBox', 'visibility', 'xmlns', 'xmlns:xlink');
1937
+ highcharts_AST_commonjs_highcharts_AST_commonjs2_highcharts_AST_root_Highcharts_AST_default().allowedTags.push('desc', 'clippath', 'fedropshadow', 'femorphology', 'g', 'image');
1745
1938
  /* *
1746
1939
  *
1747
- * Composition
1940
+ * Constants
1748
1941
  *
1749
1942
  * */
1750
- var Exporting;
1751
- (function (Exporting) {
1943
+ const Exporting_domurl = Exporting_win.URL || Exporting_win.webkitURL || Exporting_win;
1944
+ /* *
1945
+ *
1946
+ * Class
1947
+ *
1948
+ * */
1949
+ /**
1950
+ * The Exporting class provides methods for exporting charts to images. If the
1951
+ * exporting module is loaded, this class is instantiated on the chart and
1952
+ * available through the `chart.exporting` property. Read more about the
1953
+ * [exporting module](https://www.highcharts.com/docs/export-module-overview).
1954
+ *
1955
+ * @class
1956
+ * @name Highcharts.Exporting
1957
+ *
1958
+ * @param {Highcharts.Chart} chart
1959
+ * The chart instance.
1960
+ *
1961
+ */
1962
+ class Exporting {
1752
1963
  /* *
1753
1964
  *
1754
- * Declarations
1965
+ * Constructor
1755
1966
  *
1756
1967
  * */
1968
+ constructor(chart, options) {
1969
+ this.options = {};
1970
+ this.chart = chart;
1971
+ this.options = options;
1972
+ this.btnCount = 0;
1973
+ this.buttonOffset = 0;
1974
+ this.divElements = [];
1975
+ this.svgElements = [];
1976
+ }
1757
1977
  /* *
1758
1978
  *
1759
- * Constants
1979
+ * Static Functions
1760
1980
  *
1761
1981
  * */
1762
- // These CSS properties are not inlined. Remember camelCase.
1763
- const inlineDenylist = [
1764
- /-/, // In Firefox, both hyphened and camelCased names are listed
1765
- /^(clipPath|cssText|d|height|width)$/, // Full words
1766
- /^font$/, // More specific props are set
1767
- /[lL]ogical(Width|Height)$/,
1768
- /^parentRule$/,
1769
- /^(cssRules|ownerRules)$/, // #19516 read-only properties
1770
- /perspective/,
1771
- /TapHighlightColor/,
1772
- /^transition/,
1773
- /^length$/, // #7700
1774
- /^\d+$/ // #17538
1775
- ];
1776
- // These ones are translated to attributes rather than styles
1777
- const inlineToAttributes = [
1778
- 'fill',
1779
- 'stroke',
1780
- 'strokeLinecap',
1781
- 'strokeLinejoin',
1782
- 'strokeWidth',
1783
- 'textAnchor',
1784
- 'x',
1785
- 'y'
1786
- ];
1787
- Exporting.inlineAllowlist = [];
1788
- const unstyledElements = [
1789
- 'clipPath',
1790
- 'defs',
1791
- 'desc'
1792
- ];
1793
- /* *
1982
+ /**
1983
+ * Make hyphenated property names out of camelCase.
1794
1984
  *
1795
- * Variables
1985
+ * @private
1986
+ * @static
1987
+ * @function Highcharts.Exporting#hyphenate
1796
1988
  *
1797
- * */
1798
- let printingChart;
1989
+ * @param {string} property
1990
+ * Property name in camelCase.
1991
+ *
1992
+ * @return {string}
1993
+ * Hyphenated property name.
1994
+ *
1995
+ * @requires modules/exporting
1996
+ */
1997
+ static hyphenate(property) {
1998
+ return property.replace(/[A-Z]/g, function (match) {
1999
+ return '-' + match.toLowerCase();
2000
+ });
2001
+ }
2002
+ /**
2003
+ * Get data:URL from image URL.
2004
+ *
2005
+ * @private
2006
+ * @static
2007
+ * @async
2008
+ * @function Highcharts.Exporting#imageToDataURL
2009
+ *
2010
+ * @param {string} imageURL
2011
+ * The address or URL of the image.
2012
+ * @param {number} scale
2013
+ * The scale of the image.
2014
+ * @param {string} imageType
2015
+ * The export type of the image.
2016
+ *
2017
+ * @requires modules/exporting
2018
+ */
2019
+ static async imageToDataURL(imageURL, scale, imageType) {
2020
+ // First, wait for the image to be loaded
2021
+ const img = await Exporting.loadImage(imageURL), canvas = Exporting_doc.createElement('canvas'), ctx = canvas?.getContext('2d');
2022
+ if (!ctx) {
2023
+ throw new Error('No canvas found!');
2024
+ }
2025
+ else {
2026
+ canvas.height = img.height * scale;
2027
+ canvas.width = img.width * scale;
2028
+ ctx.drawImage(img, 0, 0, canvas.width, canvas.height);
2029
+ // Now we try to get the contents of the canvas
2030
+ return canvas.toDataURL(imageType);
2031
+ }
2032
+ }
2033
+ static async fetchCSS(href) {
2034
+ const content = await fetch(href)
2035
+ .then((res) => res.text());
2036
+ const newSheet = new CSSStyleSheet();
2037
+ newSheet.replaceSync(content);
2038
+ return newSheet;
2039
+ }
2040
+ static async handleStyleSheet(sheet, resultArray) {
2041
+ try {
2042
+ for (const rule of Array.from(sheet.cssRules)) {
2043
+ if (rule instanceof CSSImportRule) {
2044
+ const sheet = await Exporting.fetchCSS(rule.href);
2045
+ await Exporting.handleStyleSheet(sheet, resultArray);
2046
+ }
2047
+ if (rule instanceof CSSFontFaceRule) {
2048
+ let cssText = rule.cssText;
2049
+ if (sheet.href) {
2050
+ const baseUrl = sheet.href, regexp = /url\(\s*(['"]?)(?![a-z]+:|\/\/)([^'")]+?)\1\s*\)/gi;
2051
+ // Replace relative URLs
2052
+ cssText = cssText.replace(regexp, (_, quote, relPath) => {
2053
+ const absolutePath = new URL(relPath, baseUrl).href;
2054
+ return `url(${quote}${absolutePath}${quote})`;
2055
+ });
2056
+ }
2057
+ resultArray.push(cssText);
2058
+ }
2059
+ }
2060
+ }
2061
+ catch {
2062
+ if (sheet.href) {
2063
+ const newSheet = await Exporting.fetchCSS(sheet.href);
2064
+ await Exporting.handleStyleSheet(newSheet, resultArray);
2065
+ }
2066
+ }
2067
+ }
2068
+ static async fetchStyleSheets() {
2069
+ const cssTexts = [];
2070
+ for (const sheet of Array.from(Exporting_doc.styleSheets)) {
2071
+ await Exporting.handleStyleSheet(sheet, cssTexts);
2072
+ }
2073
+ return cssTexts;
2074
+ }
2075
+ static async inlineFonts(svg) {
2076
+ const cssTexts = await Exporting.fetchStyleSheets(), urlRegex = /url\(([^)]+)\)/g, urls = [];
2077
+ let cssText = cssTexts.join('\n'), match;
2078
+ while ((match = urlRegex.exec(cssText))) {
2079
+ const m = match[1].replace(/['"]/g, '');
2080
+ if (!urls.includes(m)) {
2081
+ urls.push(m);
2082
+ }
2083
+ }
2084
+ const arrayBufferToBase64 = (buffer) => {
2085
+ let binary = '';
2086
+ const bytes = new Uint8Array(buffer);
2087
+ for (let i = 0; i < bytes.byteLength; i++) {
2088
+ binary += String.fromCharCode(bytes[i]);
2089
+ }
2090
+ return btoa(binary);
2091
+ };
2092
+ const replacements = {};
2093
+ for (const url of urls) {
2094
+ try {
2095
+ const res = await fetch(url), contentType = res.headers.get('Content-Type') || '', b64 = arrayBufferToBase64(await res.arrayBuffer());
2096
+ replacements[url] = `data:${contentType};base64,${b64}`;
2097
+ }
2098
+ catch {
2099
+ // eslint-disable-next-line
2100
+ }
2101
+ }
2102
+ cssText = cssText.replace(urlRegex, (_, url) => {
2103
+ const strippedUrl = url.replace(/['"]/g, '');
2104
+ return `url(${replacements[strippedUrl] || strippedUrl})`;
2105
+ });
2106
+ const styleEl = document.createElementNS('http://www.w3.org/2000/svg', 'style');
2107
+ styleEl.textContent = cssText;
2108
+ // Needs to be appended to pass sanitization
2109
+ svg.append(styleEl);
2110
+ return svg;
2111
+ }
2112
+ /**
2113
+ * Loads an image from the provided URL.
2114
+ *
2115
+ * @private
2116
+ * @static
2117
+ * @function Highcharts.Exporting#loadImage
2118
+ *
2119
+ * @param {string} imageURL
2120
+ * The address or URL of the image.
2121
+ *
2122
+ * @return {Promise<HTMLImageElement>}
2123
+ * Returns a Promise that resolves with the loaded HTMLImageElement.
2124
+ *
2125
+ * @requires modules/exporting
2126
+ */
2127
+ static loadImage(imageURL) {
2128
+ return new Promise((resolve, reject) => {
2129
+ // Create an image
2130
+ const image = new Exporting_win.Image();
2131
+ // Must be set prior to loading image source
2132
+ image.crossOrigin = 'Anonymous';
2133
+ // Return the image in case of success
2134
+ image.onload = () => {
2135
+ // IE bug where image is not always ready despite load event
2136
+ setTimeout(() => {
2137
+ resolve(image);
2138
+ }, Exporting.loadEventDeferDelay);
2139
+ };
2140
+ // Reject in case of fail
2141
+ image.onerror = (error) => {
2142
+ // eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors
2143
+ reject(error);
2144
+ };
2145
+ // Provide the image URL
2146
+ image.src = imageURL;
2147
+ });
2148
+ }
2149
+ /**
2150
+ * Prepares and returns the image export options with default values where
2151
+ * necessary.
2152
+ *
2153
+ * @private
2154
+ * @static
2155
+ * @function Highcharts.Exporting#prepareImageOptions
2156
+ *
2157
+ * @param {Highcharts.ExportingOptions} exportingOptions
2158
+ * The exporting options.
2159
+ *
2160
+ * @return {Exporting.ImageOptions}
2161
+ * The finalized image export options with ensured values.
2162
+ *
2163
+ * @requires modules/exporting
2164
+ */
2165
+ static prepareImageOptions(exportingOptions) {
2166
+ const type = exportingOptions?.type || 'image/png', libURL = (exportingOptions?.libURL ||
2167
+ defaultOptions.exporting?.libURL);
2168
+ return {
2169
+ type,
2170
+ filename: ((exportingOptions?.filename || 'chart') +
2171
+ '.' +
2172
+ (type === 'image/svg+xml' ? 'svg' : type.split('/')[1])),
2173
+ scale: exportingOptions?.scale || 1,
2174
+ // Allow libURL to end with or without fordward slash
2175
+ libURL: libURL?.slice(-1) !== '/' ? libURL + '/' : libURL
2176
+ };
2177
+ }
2178
+ /**
2179
+ * A collection of fixes on the produced SVG to account for expand
2180
+ * properties and browser bugs. Returns a cleaned SVG.
2181
+ *
2182
+ * @private
2183
+ * @static
2184
+ * @function Highcharts.Exporting#sanitizeSVG
2185
+ *
2186
+ * @param {string} svg
2187
+ * SVG code to sanitize.
2188
+ * @param {Highcharts.Options} options
2189
+ * Chart options to apply.
2190
+ *
2191
+ * @return {string}
2192
+ * Sanitized SVG code.
2193
+ *
2194
+ * @requires modules/exporting
2195
+ */
2196
+ static sanitizeSVG(svg, options) {
2197
+ const split = svg.indexOf('</svg>') + 6, useForeignObject = svg.indexOf('<foreignObject') > -1;
2198
+ let html = svg.substr(split);
2199
+ // Remove any HTML added to the container after the SVG (#894, #9087)
2200
+ svg = svg.substr(0, split);
2201
+ if (useForeignObject) {
2202
+ // Some tags needs to be closed in xhtml (#13726)
2203
+ svg = svg.replace(/(<(?:img|br).*?(?=\>))>/g, '$1 />');
2204
+ // Move HTML into a foreignObject
2205
+ }
2206
+ else if (html && options?.exporting?.allowHTML) {
2207
+ html = '<foreignObject x="0" y="0" ' +
2208
+ 'width="' + options.chart.width + '" ' +
2209
+ 'height="' + options.chart.height + '">' +
2210
+ '<body xmlns="http://www.w3.org/1999/xhtml">' +
2211
+ // Some tags needs to be closed in xhtml (#13726)
2212
+ html.replace(/(<(?:img|br).*?(?=\>))>/g, '$1 />') +
2213
+ '</body>' +
2214
+ '</foreignObject>';
2215
+ svg = svg.replace('</svg>', html + '</svg>');
2216
+ }
2217
+ svg = svg
2218
+ .replace(/zIndex="[^"]+"/g, '')
2219
+ .replace(/symbolName="[^"]+"/g, '')
2220
+ .replace(/jQuery\d+="[^"]+"/g, '')
2221
+ .replace(/url\(("|&quot;)(.*?)("|&quot;)\;?\)/g, 'url($2)')
2222
+ .replace(/url\([^#]+#/g, 'url(#')
2223
+ .replace(/<svg /, '<svg xmlns:xlink="http://www.w3.org/1999/xlink" ')
2224
+ .replace(/ (NS\d+\:)?href=/g, ' xlink:href=') // #3567
2225
+ .replace(/\n+/g, ' ')
2226
+ // Replace HTML entities, issue #347
2227
+ .replace(/&nbsp;/g, '\u00A0') // No-break space
2228
+ .replace(/&shy;/g, '\u00AD'); // Soft hyphen
2229
+ return svg;
2230
+ }
2231
+ /**
2232
+ * Get blob URL from SVG code. Falls back to normal data URI.
2233
+ *
2234
+ * @private
2235
+ * @static
2236
+ * @function Highcharts.Exporting#svgToDataURL
2237
+ *
2238
+ * @param {string} svg
2239
+ * SVG to get the URL from.
2240
+ *
2241
+ * @return {string}
2242
+ * The data URL.
2243
+ *
2244
+ * @requires modules/exporting
2245
+ */
2246
+ static svgToDataURL(svg) {
2247
+ // Webkit and not chrome
2248
+ const userAgent = Exporting_win.navigator.userAgent;
2249
+ const webKit = (userAgent.indexOf('WebKit') > -1 &&
2250
+ userAgent.indexOf('Chrome') < 0);
2251
+ try {
2252
+ // Safari requires data URI since it doesn't allow navigation to
2253
+ // blob URLs. ForeignObjects also don't work well in Blobs in Chrome
2254
+ // (#14780).
2255
+ if (!webKit && svg.indexOf('<foreignObject') === -1) {
2256
+ return Exporting_domurl.createObjectURL(new Exporting_win.Blob([svg], {
2257
+ type: 'image/svg+xml;charset-utf-16'
2258
+ }));
2259
+ }
2260
+ }
2261
+ catch {
2262
+ // Ignore
2263
+ }
2264
+ return 'data:image/svg+xml;charset=UTF-8,' + encodeURIComponent(svg);
2265
+ }
1799
2266
  /* *
1800
2267
  *
1801
2268
  * Functions
@@ -1805,26 +2272,21 @@ var Exporting;
1805
2272
  * Add the export button to the chart, with options.
1806
2273
  *
1807
2274
  * @private
1808
- * @function Highcharts.Chart#addButton
1809
- * @param {Highcharts.NavigationButtonOptions} options
2275
+ * @function Highcharts.Exporting#addButton
2276
+ *
2277
+ * @param {Highcharts.ExportingButtonOptions} options
2278
+ * The exporting button options object.
2279
+ *
1810
2280
  * @requires modules/exporting
1811
2281
  */
1812
- function addButton(options) {
1813
- const chart = this, renderer = chart.renderer, btnOptions = merge(chart.options.navigation.buttonOptions, options), onclick = btnOptions.onclick, menuItems = btnOptions.menuItems, symbolSize = btnOptions.symbolSize || 12;
2282
+ addButton(options) {
2283
+ const exporting = this, chart = exporting.chart, renderer = chart.renderer, btnOptions = merge(chart.options.navigation?.buttonOptions, options), onclick = btnOptions.onclick, menuItems = btnOptions.menuItems, symbolSize = btnOptions.symbolSize || 12;
1814
2284
  let symbol;
1815
- if (!chart.btnCount) {
1816
- chart.btnCount = 0;
1817
- }
1818
- // Keeps references to the button elements
1819
- if (!chart.exportDivElements) {
1820
- chart.exportDivElements = [];
1821
- chart.exportSVGElements = [];
1822
- }
1823
2285
  if (btnOptions.enabled === false || !btnOptions.theme) {
1824
2286
  return;
1825
2287
  }
1826
2288
  const theme = chart.styledMode ? {} : btnOptions.theme;
1827
- let callback;
2289
+ let callback = (() => { });
1828
2290
  if (onclick) {
1829
2291
  callback = function (e) {
1830
2292
  if (e) {
@@ -1839,7 +2301,7 @@ var Exporting;
1839
2301
  if (e) {
1840
2302
  e.stopPropagation();
1841
2303
  }
1842
- chart.contextMenu(button.menuClassName, menuItems, button.translateX || 0, button.translateY || 0, button.width || 0, button.height || 0, button);
2304
+ exporting.contextMenu(button.menuClassName, menuItems, button.translateX || 0, button.translateY || 0, button.width || 0, button.height || 0, button);
1843
2305
  button.setState(2);
1844
2306
  };
1845
2307
  }
@@ -1854,18 +2316,19 @@ var Exporting;
1854
2316
  });
1855
2317
  }
1856
2318
  const button = renderer
1857
- .button(btnOptions.text, 0, 0, callback, theme, void 0, void 0, void 0, void 0, btnOptions.useHTML)
1858
- .addClass(options.className)
2319
+ .button(btnOptions.text || '', 0, 0, callback, theme, void 0, void 0, void 0, void 0, btnOptions.useHTML)
2320
+ .addClass(options.className || '')
1859
2321
  .attr({
1860
- title: pick(chart.options.lang[btnOptions._titleKey || btnOptions.titleKey], '')
2322
+ title: pick(chart.options.lang[(btnOptions._titleKey ||
2323
+ btnOptions.titleKey)], '')
1861
2324
  });
1862
2325
  button.menuClassName = (options.menuClassName ||
1863
- 'highcharts-menu-' + chart.btnCount++);
2326
+ 'highcharts-menu-' + exporting.btnCount++);
1864
2327
  if (btnOptions.symbol) {
1865
2328
  symbol = renderer
1866
- .symbol(btnOptions.symbol, Math.round((btnOptions.symbolX || 0) - (symbolSize / 2)), Math.round((btnOptions.symbolY || 0) - (symbolSize / 2)), symbolSize, symbolSize
2329
+ .symbol(btnOptions.symbol, Math.round((btnOptions.symbolX || 0) - (symbolSize / 2)), Math.round((btnOptions.symbolY || 0) - (symbolSize / 2)), symbolSize, symbolSize,
1867
2330
  // If symbol is an image, scale it (#7957)
1868
- , {
2331
+ {
1869
2332
  width: symbolSize,
1870
2333
  height: symbolSize
1871
2334
  })
@@ -1883,73 +2346,69 @@ var Exporting;
1883
2346
  }
1884
2347
  }
1885
2348
  button
1886
- .add(chart.exportingGroup)
2349
+ .add(exporting.group)
1887
2350
  .align(extend(btnOptions, {
1888
2351
  width: button.width,
1889
- x: pick(btnOptions.x, chart.buttonOffset) // #1654
2352
+ x: pick(btnOptions.x, exporting.buttonOffset) // #1654
1890
2353
  }), true, 'spacingBox');
1891
- chart.buttonOffset += (((button.width || 0) + btnOptions.buttonSpacing) *
2354
+ exporting.buttonOffset += (((button.width || 0) + (btnOptions.buttonSpacing || 0)) *
1892
2355
  (btnOptions.align === 'right' ? -1 : 1));
1893
- chart.exportSVGElements.push(button, symbol);
2356
+ exporting.svgElements.push(button, symbol);
1894
2357
  }
1895
2358
  /**
1896
2359
  * Clean up after printing a chart.
1897
2360
  *
1898
- * @function Highcharts#afterPrint
1899
- *
1900
2361
  * @private
1901
- *
1902
- * @param {Highcharts.Chart} chart
1903
- * Chart that was (or suppose to be) printed
2362
+ * @function Highcharts.Exporting#afterPrint
1904
2363
  *
1905
2364
  * @emits Highcharts.Chart#event:afterPrint
2365
+ *
2366
+ * @requires modules/exporting
1906
2367
  */
1907
- function afterPrint() {
1908
- const chart = this;
1909
- if (!chart.printReverseInfo) {
2368
+ afterPrint() {
2369
+ const chart = this.chart;
2370
+ if (!this.printReverseInfo) {
1910
2371
  return void 0;
1911
2372
  }
1912
- const { childNodes, origDisplay, resetParams } = chart.printReverseInfo;
2373
+ const { childNodes, origDisplay, resetParams } = this.printReverseInfo;
1913
2374
  // Put the chart back in
1914
- chart.moveContainers(chart.renderTo);
2375
+ this.moveContainers(chart.renderTo);
1915
2376
  // Restore all body content
1916
2377
  [].forEach.call(childNodes, function (node, i) {
1917
2378
  if (node.nodeType === 1) {
1918
2379
  node.style.display = (origDisplay[i] || '');
1919
2380
  }
1920
2381
  });
1921
- chart.isPrinting = false;
2382
+ this.isPrinting = false;
1922
2383
  // Reset printMaxWidth
1923
2384
  if (resetParams) {
1924
2385
  chart.setSize.apply(chart, resetParams);
1925
2386
  }
1926
- delete chart.printReverseInfo;
1927
- printingChart = void 0;
2387
+ delete this.printReverseInfo;
2388
+ Exporting.printingChart = void 0;
1928
2389
  Exporting_fireEvent(chart, 'afterPrint');
1929
2390
  }
1930
2391
  /**
1931
2392
  * Prepare chart and document before printing a chart.
1932
2393
  *
1933
- * @function Highcharts#beforePrint
1934
- *
1935
2394
  * @private
1936
- *
2395
+ * @function Highcharts.Exporting#beforePrint
1937
2396
  *
1938
2397
  * @emits Highcharts.Chart#event:beforePrint
2398
+ *
2399
+ * @requires modules/exporting
1939
2400
  */
1940
- function beforePrint() {
1941
- const chart = this, body = doc.body, printMaxWidth = chart.options.exporting.printMaxWidth, printReverseInfo = {
2401
+ beforePrint() {
2402
+ const chart = this.chart, body = Exporting_doc.body, printMaxWidth = this.options.printMaxWidth, printReverseInfo = {
1942
2403
  childNodes: body.childNodes,
1943
2404
  origDisplay: [],
1944
2405
  resetParams: void 0
1945
2406
  };
1946
- chart.isPrinting = true;
2407
+ this.isPrinting = true;
1947
2408
  chart.pointer?.reset(void 0, 0);
1948
2409
  Exporting_fireEvent(chart, 'beforePrint');
1949
2410
  // Handle printMaxWidth
1950
- const handleMaxWidth = printMaxWidth &&
1951
- chart.chartWidth > printMaxWidth;
1952
- if (handleMaxWidth) {
2411
+ if (printMaxWidth && chart.chartWidth > printMaxWidth) {
1953
2412
  printReverseInfo.resetParams = [
1954
2413
  chart.options.chart.width,
1955
2414
  void 0,
@@ -1965,131 +2424,45 @@ var Exporting;
1965
2424
  }
1966
2425
  });
1967
2426
  // Pull out the chart
1968
- chart.moveContainers(body);
2427
+ this.moveContainers(body);
1969
2428
  // Storage details for undo action after printing
1970
- chart.printReverseInfo = printReverseInfo;
2429
+ this.printReverseInfo = printReverseInfo;
1971
2430
  }
1972
- /**
1973
- * @private
1974
- */
1975
- function chartCallback(chart) {
1976
- const composition = chart;
1977
- composition.renderExporting();
1978
- Exporting_addEvent(chart, 'redraw', composition.renderExporting);
1979
- // Destroy the export elements at chart destroy
1980
- Exporting_addEvent(chart, 'destroy', composition.destroyExport);
1981
- // Uncomment this to see a button directly below the chart, for quick
1982
- // testing of export
1983
- /*
1984
- let button, viewImage, viewSource;
1985
- if (!chart.renderer.forExport) {
1986
- viewImage = function () {
1987
- let div = doc.createElement('div');
1988
- div.innerHTML = chart.getSVGForExport();
1989
- chart.renderTo.parentNode.appendChild(div);
1990
- };
1991
-
1992
- viewSource = function () {
1993
- let pre = doc.createElement('pre');
1994
- pre.innerHTML = chart.getSVGForExport()
1995
- .replace(/</g, '\n&lt;')
1996
- .replace(/>/g, '&gt;');
1997
- chart.renderTo.parentNode.appendChild(pre);
1998
- };
1999
-
2000
- viewImage();
2001
-
2002
- // View SVG Image
2003
- button = doc.createElement('button');
2004
- button.innerHTML = 'View SVG Image';
2005
- chart.renderTo.parentNode.appendChild(button);
2006
- button.onclick = viewImage;
2007
-
2008
- // View SVG Source
2009
- button = doc.createElement('button');
2010
- button.innerHTML = 'View SVG Source';
2011
- chart.renderTo.parentNode.appendChild(button);
2012
- button.onclick = viewSource;
2013
- }
2014
- //*/
2015
- }
2016
- /**
2017
- * @private
2018
- */
2019
- function compose(ChartClass, SVGRendererClass) {
2020
- Exporting_ExportingSymbols.compose(SVGRendererClass);
2021
- Exporting_Fullscreen.compose(ChartClass);
2022
- const chartProto = ChartClass.prototype;
2023
- if (!chartProto.exportChart) {
2024
- chartProto.afterPrint = afterPrint;
2025
- chartProto.exportChart = exportChart;
2026
- chartProto.inlineStyles = inlineStyles;
2027
- chartProto.print = print;
2028
- chartProto.sanitizeSVG = sanitizeSVG;
2029
- chartProto.getChartHTML = getChartHTML;
2030
- chartProto.getSVG = getSVG;
2031
- chartProto.getSVGForExport = getSVGForExport;
2032
- chartProto.getFilename = getFilename;
2033
- chartProto.moveContainers = moveContainers;
2034
- chartProto.beforePrint = beforePrint;
2035
- chartProto.contextMenu = contextMenu;
2036
- chartProto.addButton = addButton;
2037
- chartProto.destroyExport = destroyExport;
2038
- chartProto.renderExporting = renderExporting;
2039
- chartProto.resolveCSSVariables = resolveCSSVariables;
2040
- chartProto.callbacks.push(chartCallback);
2041
- Exporting_addEvent(ChartClass, 'init', onChartInit);
2042
- Exporting_addEvent(ChartClass, 'layOutTitle', onChartLayOutTitle);
2043
- if ((highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default()).isSafari) {
2044
- Exporting_win.matchMedia('print').addListener(function (mqlEvent) {
2045
- if (!printingChart) {
2046
- return void 0;
2047
- }
2048
- if (mqlEvent.matches) {
2049
- printingChart.beforePrint();
2050
- }
2051
- else {
2052
- printingChart.afterPrint();
2053
- }
2054
- });
2055
- }
2056
- defaultOptions.exporting = merge(Exporting_ExportingDefaults.exporting, defaultOptions.exporting);
2057
- defaultOptions.lang = merge(Exporting_ExportingDefaults.lang, defaultOptions.lang);
2058
- // Buttons and menus are collected in a separate config option set
2059
- // called 'navigation'. This can be extended later to add control
2060
- // buttons like zoom and pan right click menus.
2061
- defaultOptions.navigation = merge(Exporting_ExportingDefaults.navigation, defaultOptions.navigation);
2062
- }
2063
- }
2064
- Exporting.compose = compose;
2065
2431
  /**
2066
2432
  * Display a popup menu for choosing the export type.
2067
2433
  *
2068
2434
  * @private
2069
- * @function Highcharts.Chart#contextMenu
2435
+ * @function Highcharts.Exporting#contextMenu
2436
+ *
2070
2437
  * @param {string} className
2071
- * An identifier for the menu.
2072
- * @param {Array<string|Highcharts.ExportingMenuObject>} items
2073
- * A collection with text and onclicks for the items.
2438
+ * An identifier for the menu.
2439
+ * @param {Array<(string | Highcharts.ExportingMenuObject)>} items
2440
+ * A collection with text and onclicks for the items.
2074
2441
  * @param {number} x
2075
- * The x position of the opener button
2442
+ * The x position of the opener button.
2076
2443
  * @param {number} y
2077
- * The y position of the opener button
2444
+ * The y position of the opener button.
2078
2445
  * @param {number} width
2079
- * The width of the opener button
2446
+ * The width of the opener button.
2080
2447
  * @param {number} height
2081
- * The height of the opener button
2448
+ * The height of the opener button.
2449
+ * @param {SVGElement} button
2450
+ * The SVG button element.
2451
+ *
2452
+ * @emits Highcharts.Chart#event:exportMenuHidden
2453
+ * @emits Highcharts.Chart#event:exportMenuShown
2454
+ *
2082
2455
  * @requires modules/exporting
2083
2456
  */
2084
- function contextMenu(className, items, x, y, width, height, button) {
2085
- const chart = this, navOptions = chart.options.navigation, chartWidth = chart.chartWidth, chartHeight = chart.chartHeight, cacheName = 'cache-' + className,
2457
+ contextMenu(className, items, x, y, width, height, button) {
2458
+ const exporting = this, chart = exporting.chart, navOptions = chart.options.navigation, chartWidth = chart.chartWidth, chartHeight = chart.chartHeight, cacheName = 'cache-' + className,
2086
2459
  // For mouse leave detection
2087
2460
  menuPadding = Math.max(width, height);
2088
2461
  let innerMenu, menu = chart[cacheName];
2089
2462
  // Create the menu only the first time
2090
2463
  if (!menu) {
2091
2464
  // Create a HTML element above the SVG
2092
- chart.exportContextMenu = chart[cacheName] = menu =
2465
+ exporting.contextMenuEl = chart[cacheName] = menu =
2093
2466
  createElement('div', {
2094
2467
  className: className
2095
2468
  }, {
@@ -2107,10 +2480,10 @@ var Exporting;
2107
2480
  // Presentational CSS
2108
2481
  if (!chart.styledMode) {
2109
2482
  css(innerMenu, extend({
2110
- MozBoxShadow: '3px 3px 10px #888',
2111
- WebkitBoxShadow: '3px 3px 10px #888',
2112
- boxShadow: '3px 3px 10px #888'
2113
- }, navOptions.menuStyle));
2483
+ MozBoxShadow: '3px 3px 10px #0008',
2484
+ WebkitBoxShadow: '3px 3px 10px #0008',
2485
+ boxShadow: '3px 3px 10px #0008'
2486
+ }, navOptions?.menuStyle || {}));
2114
2487
  }
2115
2488
  // Hide on mouse out
2116
2489
  menu.hideMenu = function () {
@@ -2118,35 +2491,38 @@ var Exporting;
2118
2491
  if (button) {
2119
2492
  button.setState(0);
2120
2493
  }
2121
- chart.openMenu = false;
2494
+ if (chart.exporting) {
2495
+ chart.exporting.openMenu = false;
2496
+ }
2122
2497
  // #10361, #9998
2123
2498
  css(chart.renderTo, { overflow: 'hidden' });
2124
2499
  css(chart.container, { overflow: 'hidden' });
2125
- highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default().clearTimeout(menu.hideTimer);
2500
+ Exporting_clearTimeout(menu.hideTimer);
2126
2501
  Exporting_fireEvent(chart, 'exportMenuHidden');
2127
2502
  };
2128
2503
  // Hide the menu some time after mouse leave (#1357)
2129
- chart.exportEvents.push(Exporting_addEvent(menu, 'mouseleave', function () {
2504
+ exporting.events?.push(Exporting_addEvent(menu, 'mouseleave', function () {
2130
2505
  menu.hideTimer = Exporting_win.setTimeout(menu.hideMenu, 500);
2131
2506
  }), Exporting_addEvent(menu, 'mouseenter', function () {
2132
- highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default().clearTimeout(menu.hideTimer);
2507
+ Exporting_clearTimeout(menu.hideTimer);
2133
2508
  }),
2134
2509
  // Hide it on clicking or touching outside the menu (#2258,
2135
2510
  // #2335, #2407)
2136
- Exporting_addEvent(doc, 'mouseup', function (e) {
2511
+ Exporting_addEvent(Exporting_doc, 'mouseup', function (e) {
2137
2512
  if (!chart.pointer?.inClass(e.target, className)) {
2138
2513
  menu.hideMenu();
2139
2514
  }
2140
2515
  }), Exporting_addEvent(menu, 'click', function () {
2141
- if (chart.openMenu) {
2516
+ if (chart.exporting?.openMenu) {
2142
2517
  menu.hideMenu();
2143
2518
  }
2144
2519
  }));
2145
2520
  // Create the items
2146
2521
  items.forEach(function (item) {
2147
2522
  if (typeof item === 'string') {
2148
- item = chart.options.exporting
2149
- .menuItemDefinitions[item];
2523
+ if (exporting.options.menuItemDefinitions?.[item]) {
2524
+ item = exporting.options.menuItemDefinitions[item];
2525
+ }
2150
2526
  }
2151
2527
  if (isObject(item, true)) {
2152
2528
  let element;
@@ -2157,7 +2533,7 @@ var Exporting;
2157
2533
  // When chart initialized with the table, wrong button
2158
2534
  // text displayed, #14352.
2159
2535
  if (item.textKey === 'viewData' &&
2160
- chart.isDataTableVisible) {
2536
+ exporting.isDataTableVisible) {
2161
2537
  item.textKey = 'hideData';
2162
2538
  }
2163
2539
  element = createElement('li', {
@@ -2168,44 +2544,45 @@ var Exporting;
2168
2544
  }
2169
2545
  menu.hideMenu();
2170
2546
  if (typeof item !== 'string' && item.onclick) {
2547
+ // eslint-disable-next-line @typescript-eslint/no-floating-promises
2171
2548
  item.onclick.apply(chart, arguments);
2172
2549
  }
2173
2550
  }
2174
2551
  }, void 0, innerMenu);
2175
- highcharts_AST_commonjs_highcharts_AST_commonjs2_highcharts_AST_root_Highcharts_AST_default().setElementHTML(element, item.text ||
2176
- chart.options.lang[item.textKey]);
2552
+ highcharts_AST_commonjs_highcharts_AST_commonjs2_highcharts_AST_root_Highcharts_AST_default().setElementHTML(element, item.text || chart.options.lang[item.textKey]);
2177
2553
  if (!chart.styledMode) {
2178
2554
  element.onmouseover = function () {
2179
- css(this, navOptions.menuItemHoverStyle);
2555
+ css(this, navOptions?.menuItemHoverStyle || {});
2180
2556
  };
2181
2557
  element.onmouseout = function () {
2182
- css(this, navOptions.menuItemStyle);
2558
+ css(this, navOptions?.menuItemStyle || {});
2183
2559
  };
2184
2560
  css(element, extend({
2185
2561
  cursor: 'pointer'
2186
- }, navOptions.menuItemStyle || {}));
2562
+ }, navOptions?.menuItemStyle || {}));
2187
2563
  }
2188
2564
  }
2189
2565
  // Keep references to menu divs to be able to destroy them
2190
- chart.exportDivElements.push(element);
2566
+ exporting.divElements.push(element);
2191
2567
  }
2192
2568
  });
2193
2569
  // Keep references to menu and innerMenu div to be able to destroy
2194
2570
  // them
2195
- chart.exportDivElements.push(innerMenu, menu);
2196
- chart.exportMenuWidth = menu.offsetWidth;
2197
- chart.exportMenuHeight = menu.offsetHeight;
2571
+ exporting.divElements.push(innerMenu, menu);
2572
+ exporting.menuHeight = menu.offsetHeight;
2573
+ exporting.menuWidth = menu.offsetWidth;
2198
2574
  }
2199
2575
  const menuStyle = { display: 'block' };
2200
2576
  // If outside right, right align it
2201
- if (x + (chart.exportMenuWidth || 0) > chartWidth) {
2577
+ if (x + (exporting.menuWidth || 0) > chartWidth) {
2202
2578
  menuStyle.right = (chartWidth - x - width - menuPadding) + 'px';
2203
2579
  }
2204
2580
  else {
2205
2581
  menuStyle.left = (x - menuPadding) + 'px';
2206
2582
  }
2207
2583
  // If outside bottom, bottom align it
2208
- if (y + height + (chart.exportMenuHeight || 0) > chartHeight &&
2584
+ if (y + height + (exporting.menuHeight || 0) >
2585
+ chartHeight &&
2209
2586
  button.alignOptions?.verticalAlign !== 'top') {
2210
2587
  menuStyle.bottom = (chartHeight - y - menuPadding) + 'px';
2211
2588
  }
@@ -2216,106 +2593,272 @@ var Exporting;
2216
2593
  // #10361, #9998
2217
2594
  css(chart.renderTo, { overflow: '' });
2218
2595
  css(chart.container, { overflow: '' });
2219
- chart.openMenu = true;
2596
+ if (chart.exporting) {
2597
+ chart.exporting.openMenu = true;
2598
+ }
2220
2599
  Exporting_fireEvent(chart, 'exportMenuShown');
2221
2600
  }
2222
2601
  /**
2223
2602
  * Destroy the export buttons.
2603
+ *
2224
2604
  * @private
2225
- * @function Highcharts.Chart#destroyExport
2605
+ * @function Highcharts.Exporting#destroy
2606
+ *
2226
2607
  * @param {global.Event} [e]
2608
+ * Event object.
2609
+ *
2227
2610
  * @requires modules/exporting
2228
2611
  */
2229
- function destroyExport(e) {
2230
- const chart = e ? e.target : this, exportSVGElements = chart.exportSVGElements, exportDivElements = chart.exportDivElements, exportEvents = chart.exportEvents;
2612
+ destroy(e) {
2613
+ const exporting = this, chart = e ? e.target : exporting.chart, { divElements, events, svgElements } = exporting;
2231
2614
  let cacheName;
2232
2615
  // Destroy the extra buttons added
2233
- if (exportSVGElements) {
2234
- exportSVGElements.forEach((elem, i) => {
2235
- // Destroy and null the svg elements
2236
- if (elem) { // #1822
2237
- elem.onclick = elem.ontouchstart = null;
2238
- cacheName = 'cache-' + elem.menuClassName;
2239
- if (chart[cacheName]) {
2240
- delete chart[cacheName];
2241
- }
2242
- exportSVGElements[i] = elem.destroy();
2616
+ svgElements.forEach((elem, i) => {
2617
+ // Destroy and null the svg elements
2618
+ if (elem) { // #1822
2619
+ elem.onclick = elem.ontouchstart = null;
2620
+ cacheName = 'cache-' + elem.menuClassName;
2621
+ if (chart[cacheName]) {
2622
+ delete chart[cacheName];
2243
2623
  }
2244
- });
2245
- exportSVGElements.length = 0;
2246
- }
2624
+ svgElements[i] = elem.destroy();
2625
+ }
2626
+ });
2627
+ svgElements.length = 0;
2247
2628
  // Destroy the exporting group
2248
- if (chart.exportingGroup) {
2249
- chart.exportingGroup.destroy();
2250
- delete chart.exportingGroup;
2629
+ if (exporting.group) {
2630
+ exporting.group.destroy();
2631
+ delete exporting.group;
2251
2632
  }
2252
2633
  // Destroy the divs for the menu
2253
- if (exportDivElements) {
2254
- exportDivElements.forEach(function (elem, i) {
2255
- if (elem) {
2256
- // Remove the event handler
2257
- highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default().clearTimeout(elem.hideTimer); // #5427
2258
- removeEvent(elem, 'mouseleave');
2259
- // Remove inline events
2260
- // (chart.exportDivElements as any)[i] =
2261
- exportDivElements[i] =
2262
- elem.onmouseout =
2263
- elem.onmouseover =
2264
- elem.ontouchstart =
2265
- elem.onclick = null;
2266
- // Destroy the div by moving to garbage bin
2267
- Exporting_discardElement(elem);
2268
- }
2269
- });
2270
- exportDivElements.length = 0;
2271
- }
2272
- if (exportEvents) {
2273
- exportEvents.forEach(function (unbind) {
2634
+ divElements.forEach(function (elem, i) {
2635
+ if (elem) {
2636
+ // Remove the event handler
2637
+ Exporting_clearTimeout(elem.hideTimer); // #5427
2638
+ removeEvent(elem, 'mouseleave');
2639
+ // Remove inline events
2640
+ divElements[i] =
2641
+ elem.onmouseout =
2642
+ elem.onmouseover =
2643
+ elem.ontouchstart =
2644
+ elem.onclick = null;
2645
+ // Destroy the div by moving to garbage bin
2646
+ Exporting_discardElement(elem);
2647
+ }
2648
+ });
2649
+ divElements.length = 0;
2650
+ if (events) {
2651
+ events.forEach(function (unbind) {
2274
2652
  unbind();
2275
2653
  });
2276
- exportEvents.length = 0;
2654
+ events.length = 0;
2277
2655
  }
2278
2656
  }
2279
2657
  /**
2280
- * Exporting module required. Submit an SVG version of the chart to a server
2281
- * along with some parameters for conversion.
2658
+ * Get data URL to an image of an SVG and call download on its options
2659
+ * object:
2660
+ *
2661
+ * - **filename:** Name of resulting downloaded file without extension.
2662
+ * Default is based on the chart title.
2663
+ * - **type:** File type of resulting download. Default is `image/png`.
2664
+ * - **scale:** Scaling factor of downloaded image compared to source.
2665
+ * Default is `2`.
2666
+ * - **libURL:** URL pointing to location of dependency scripts to download
2667
+ * on demand. Default is the exporting.libURL option of the global
2668
+ * Highcharts options pointing to our server.
2669
+ *
2670
+ * @async
2671
+ * @private
2672
+ * @function Highcharts.Exporting#downloadSVG
2673
+ *
2674
+ * @param {string} svg
2675
+ * The generated SVG.
2676
+ * @param {Highcharts.ExportingOptions} exportingOptions
2677
+ * The exporting options.
2678
+ *
2679
+ * @requires modules/exporting
2680
+ */
2681
+ // eslint-disable-next-line @typescript-eslint/require-await
2682
+ async downloadSVG(svg, exportingOptions) {
2683
+ const eventArgs = {
2684
+ svg,
2685
+ exportingOptions,
2686
+ exporting: this
2687
+ };
2688
+ // Fire a custom event before the export starts
2689
+ Exporting_fireEvent(Exporting.prototype, 'downloadSVG', eventArgs);
2690
+ // If the event was prevented, do not proceed with the export
2691
+ if (eventArgs.defaultPrevented) {
2692
+ return;
2693
+ }
2694
+ // Get the final image options
2695
+ const { type, filename, scale, libURL } = Exporting.prepareImageOptions(exportingOptions);
2696
+ let svgURL;
2697
+ // Initiate download depending on file type
2698
+ if (type === 'application/pdf') {
2699
+ // Error in case of offline-exporting module is not loaded
2700
+ throw new Error('Offline exporting logic for PDF type is not found.');
2701
+ }
2702
+ else if (type === 'image/svg+xml') {
2703
+ // SVG download. In this case, we want to use Microsoft specific
2704
+ // Blob if available
2705
+ if (typeof Exporting_win.MSBlobBuilder !== 'undefined') {
2706
+ const blob = new Exporting_win.MSBlobBuilder();
2707
+ blob.append(svg);
2708
+ svgURL = blob.getBlob('image/svg+xml');
2709
+ }
2710
+ else {
2711
+ svgURL = Exporting.svgToDataURL(svg);
2712
+ }
2713
+ // Download the chart
2714
+ Exporting_downloadURL(svgURL, filename);
2715
+ }
2716
+ else {
2717
+ // PNG/JPEG download - create bitmap from SVG
2718
+ svgURL = Exporting.svgToDataURL(svg);
2719
+ try {
2720
+ Exporting.objectURLRevoke = true;
2721
+ // First, try to get PNG by rendering on canvas
2722
+ const dataURL = await Exporting.imageToDataURL(svgURL, scale, type);
2723
+ Exporting_downloadURL(dataURL, filename);
2724
+ }
2725
+ catch (error) {
2726
+ // No need for the below logic to run in case no canvas is
2727
+ // found
2728
+ if (error.message === 'No canvas found!') {
2729
+ throw error;
2730
+ }
2731
+ // Or in case of exceeding the input length
2732
+ if (svg.length > 100000000 /* RegexLimits.svgLimit */) {
2733
+ throw new Error('Input too long');
2734
+ }
2735
+ // Failed due to tainted canvas
2736
+ // Create new and untainted canvas
2737
+ const canvas = Exporting_doc.createElement('canvas'), ctx = canvas.getContext('2d'), matchedImageWidth = svg.match(
2738
+ // eslint-disable-next-line max-len
2739
+ /^<svg[^>]*\s{,1000}width\s{,1000}=\s{,1000}\"?(\d+)\"?[^>]*>/), matchedImageHeight = svg.match(
2740
+ // eslint-disable-next-line max-len
2741
+ /^<svg[^>]*\s{0,1000}height\s{,1000}=\s{,1000}\"?(\d+)\"?[^>]*>/);
2742
+ if (ctx &&
2743
+ matchedImageWidth &&
2744
+ matchedImageHeight) {
2745
+ const imageWidth = +matchedImageWidth[1] * scale, imageHeight = +matchedImageHeight[1] * scale, downloadWithCanVG = () => {
2746
+ const v = Exporting_win.canvg.Canvg.fromString(ctx, svg);
2747
+ v.start();
2748
+ Exporting_downloadURL(Exporting_win.navigator.msSaveOrOpenBlob ?
2749
+ canvas.msToBlob() :
2750
+ canvas.toDataURL(type), filename);
2751
+ };
2752
+ canvas.width = imageWidth;
2753
+ canvas.height = imageHeight;
2754
+ // Must load canVG first if not found. Don't destroy the
2755
+ // object URL yet since we are doing things
2756
+ // asynchronously
2757
+ if (!Exporting_win.canvg) {
2758
+ Exporting.objectURLRevoke = true;
2759
+ await Exporting_getScript(libURL + 'canvg.js');
2760
+ }
2761
+ // Use loaded canvg
2762
+ downloadWithCanVG();
2763
+ }
2764
+ }
2765
+ finally {
2766
+ if (Exporting.objectURLRevoke) {
2767
+ try {
2768
+ Exporting_domurl.revokeObjectURL(svgURL);
2769
+ }
2770
+ catch {
2771
+ // Ignore
2772
+ }
2773
+ }
2774
+ }
2775
+ }
2776
+ }
2777
+ /**
2778
+ * Submit an SVG version of the chart along with some parameters for local
2779
+ * conversion (PNG, JPEG, and SVG) or conversion on a server (PDF).
2282
2780
  *
2283
2781
  * @sample highcharts/members/chart-exportchart/
2284
- * Export with no options
2782
+ * Export with no options
2285
2783
  * @sample highcharts/members/chart-exportchart-filename/
2286
- * PDF type and custom filename
2784
+ * PDF type and custom filename
2785
+ * @sample highcharts/exporting/menuitemdefinitions-webp/
2786
+ * Export to WebP
2287
2787
  * @sample highcharts/members/chart-exportchart-custom-background/
2288
- * Different chart background in export
2788
+ * Different chart background in export
2289
2789
  * @sample stock/members/chart-exportchart/
2290
- * Export with Highcharts Stock
2790
+ * Export with Highcharts Stock
2791
+ *
2792
+ * @async
2793
+ * @function Highcharts.Exporting#exportChart
2291
2794
  *
2292
- * @function Highcharts.Chart#exportChart
2795
+ * @param {Highcharts.ExportingOptions} [exportingOptions]
2796
+ * Exporting options in addition to those defined in
2797
+ * [exporting](https://api.highcharts.com/highcharts/exporting).
2798
+ * @param {Highcharts.Options} [chartOptions]
2799
+ * Additional chart options for the exported chart. For example a different
2800
+ * background color can be added here, or `dataLabels` for export only.
2801
+ *
2802
+ * @requires modules/exporting
2803
+ */
2804
+ async exportChart(exportingOptions, chartOptions) {
2805
+ // Merge the options
2806
+ exportingOptions = merge(this.options, exportingOptions);
2807
+ // If local if expected
2808
+ if (exportingOptions.local) {
2809
+ // Trigger the local export logic
2810
+ await this.localExport(exportingOptions, chartOptions || {});
2811
+ }
2812
+ else {
2813
+ // Get the SVG representation
2814
+ const svg = this.getSVGForExport(exportingOptions, chartOptions);
2815
+ // Do the post
2816
+ if (exportingOptions.url) {
2817
+ await Core_HttpUtilities.post(exportingOptions.url, {
2818
+ filename: exportingOptions.filename ?
2819
+ exportingOptions.filename.replace(/\//g, '-') :
2820
+ this.getFilename(),
2821
+ type: exportingOptions.type,
2822
+ width: exportingOptions.width,
2823
+ scale: exportingOptions.scale,
2824
+ svg
2825
+ }, exportingOptions.fetchOptions);
2826
+ }
2827
+ }
2828
+ }
2829
+ /**
2830
+ * Handles the fallback to the export server when a local export fails.
2831
+ *
2832
+ * @private
2833
+ * @async
2834
+ * @function Highcharts.Exporting#fallbackToServer
2293
2835
  *
2294
2836
  * @param {Highcharts.ExportingOptions} exportingOptions
2295
- * Exporting options in addition to those defined in
2296
- * [exporting](https://api.highcharts.com/highcharts/exporting).
2837
+ * The exporting options.
2838
+ * @param {Error} err
2839
+ * The error that caused the local export to fail.
2297
2840
  *
2298
- * @param {Highcharts.Options} chartOptions
2299
- * Additional chart options for the exported chart. For example a
2300
- * different background color can be added here, or `dataLabels` for
2301
- * export only.
2841
+ * @return {Promise<void>}
2842
+ * A promise that resolves when the fallback process is complete.
2302
2843
  *
2303
2844
  * @requires modules/exporting
2304
2845
  */
2305
- function exportChart(exportingOptions, chartOptions) {
2306
- const svg = this.getSVGForExport(exportingOptions, chartOptions);
2307
- // Merge the options
2308
- exportingOptions = merge(this.options.exporting, exportingOptions);
2309
- // Do the post
2310
- Core_HttpUtilities.post(exportingOptions.url, {
2311
- filename: exportingOptions.filename ?
2312
- exportingOptions.filename.replace(/\//g, '-') :
2313
- this.getFilename(),
2314
- type: exportingOptions.type,
2315
- width: exportingOptions.width,
2316
- scale: exportingOptions.scale,
2317
- svg: svg
2318
- }, exportingOptions.fetchOptions);
2846
+ async fallbackToServer(exportingOptions, err) {
2847
+ if (exportingOptions.fallbackToExportServer === false) {
2848
+ if (exportingOptions.error) {
2849
+ exportingOptions.error(exportingOptions, err);
2850
+ }
2851
+ else {
2852
+ // Fallback disabled
2853
+ Exporting_error(28, true);
2854
+ }
2855
+ }
2856
+ else if (exportingOptions.type === 'application/pdf') {
2857
+ // The local must be false to fallback to server for PDF export
2858
+ exportingOptions.local = false;
2859
+ // Allow fallbacking to server only for PDFs that failed locally
2860
+ await this.exportChart(exportingOptions);
2861
+ }
2319
2862
  }
2320
2863
  /**
2321
2864
  * Return the unfiltered innerHTML of the chart container. Used as hook for
@@ -2323,38 +2866,43 @@ var Exporting;
2323
2866
  *
2324
2867
  * @see Chart#getSVG
2325
2868
  *
2326
- * @function Highcharts.Chart#getChartHTML
2869
+ * @function Highcharts.Exporting#getChartHTML
2870
+ *
2871
+ * @param {boolean} [applyStyleSheets]
2872
+ * whether or not to apply the style sheets.
2327
2873
  *
2328
2874
  * @return {string}
2329
2875
  * The unfiltered SVG of the chart.
2330
2876
  *
2331
2877
  * @requires modules/exporting
2332
2878
  */
2333
- function getChartHTML(applyStyleSheets) {
2879
+ getChartHTML(applyStyleSheets) {
2880
+ const chart = this.chart;
2334
2881
  if (applyStyleSheets) {
2335
2882
  this.inlineStyles();
2336
2883
  }
2337
2884
  this.resolveCSSVariables();
2338
- return this.container.innerHTML;
2885
+ return chart.container.innerHTML;
2339
2886
  }
2340
2887
  /**
2341
2888
  * Get the default file name used for exported charts. By default it creates
2342
2889
  * a file name based on the chart title.
2343
2890
  *
2344
- * @function Highcharts.Chart#getFilename
2891
+ * @function Highcharts.Exporting#getFilename
2345
2892
  *
2346
- * @return {string} A file name without extension.
2893
+ * @return {string}
2894
+ * A file name without extension.
2347
2895
  *
2348
2896
  * @requires modules/exporting
2349
2897
  */
2350
- function getFilename() {
2351
- const s = this.userOptions.title && this.userOptions.title.text;
2352
- let filename = this.options.exporting.filename;
2898
+ getFilename() {
2899
+ const titleText = this.chart.userOptions.title?.text;
2900
+ let filename = this.options.filename;
2353
2901
  if (filename) {
2354
2902
  return filename.replace(/\//g, '-');
2355
2903
  }
2356
- if (typeof s === 'string') {
2357
- filename = s
2904
+ if (typeof titleText === 'string') {
2905
+ filename = titleText
2358
2906
  .toLowerCase()
2359
2907
  .replace(/<\/?[^>]+(>|$)/g, '') // Strip HTML tags
2360
2908
  .replace(/[\s_]+/g, '-')
@@ -2373,45 +2921,45 @@ var Exporting;
2373
2921
  * Return an SVG representation of the chart.
2374
2922
  *
2375
2923
  * @sample highcharts/members/chart-getsvg/
2376
- * View the SVG from a button
2924
+ * View the SVG from a button
2377
2925
  *
2378
- * @function Highcharts.Chart#getSVG
2926
+ * @function Highcharts.Exporting#getSVG
2379
2927
  *
2380
2928
  * @param {Highcharts.Options} [chartOptions]
2381
- * Additional chart options for the generated SVG representation. For
2382
- * collections like `xAxis`, `yAxis` or `series`, the additional
2383
- * options is either merged in to the original item of the same
2384
- * `id`, or to the first item if a common id is not found.
2929
+ * Additional chart options for the generated SVG representation. For
2930
+ * collections like `xAxis`, `yAxis` or `series`, the additional options is
2931
+ * either merged in to the original item of the same `id`, or to the first
2932
+ * item if a common id is not found.
2385
2933
  *
2386
2934
  * @return {string}
2387
- * The SVG representation of the rendered chart.
2935
+ * The SVG representation of the rendered chart.
2388
2936
  *
2389
2937
  * @emits Highcharts.Chart#event:getSVG
2390
2938
  *
2391
2939
  * @requires modules/exporting
2392
2940
  */
2393
- function getSVG(chartOptions) {
2394
- const chart = this;
2941
+ getSVG(chartOptions) {
2942
+ const chart = this.chart;
2395
2943
  let svg, seriesOptions,
2396
2944
  // Copy the options and add extra options
2397
2945
  options = merge(chart.options, chartOptions);
2398
2946
  // Use userOptions to make the options chain in series right (#3881)
2399
- options.plotOptions = merge(chart.userOptions.plotOptions, chartOptions && chartOptions.plotOptions);
2947
+ options.plotOptions = merge(chart.userOptions.plotOptions, chartOptions?.plotOptions);
2400
2948
  // ... and likewise with time, avoid that undefined time properties are
2401
2949
  // merged over legacy global time options
2402
- options.time = merge(chart.userOptions.time, chartOptions && chartOptions.time);
2950
+ options.time = merge(chart.userOptions.time, chartOptions?.time);
2403
2951
  // Create a sandbox where a new chart will be generated
2404
- const sandbox = createElement('div', null, {
2952
+ const sandbox = createElement('div', void 0, {
2405
2953
  position: 'absolute',
2406
2954
  top: '-9999em',
2407
2955
  width: chart.chartWidth + 'px',
2408
2956
  height: chart.chartHeight + 'px'
2409
- }, doc.body);
2957
+ }, Exporting_doc.body);
2410
2958
  // Get the source size
2411
- const cssWidth = chart.renderTo.style.width, cssHeight = chart.renderTo.style.height, sourceWidth = options.exporting.sourceWidth ||
2959
+ const cssWidth = chart.renderTo.style.width, cssHeight = chart.renderTo.style.height, sourceWidth = options.exporting?.sourceWidth ||
2412
2960
  options.chart.width ||
2413
2961
  (/px$/.test(cssWidth) && parseInt(cssWidth, 10)) ||
2414
- (options.isGantt ? 800 : 600), sourceHeight = options.exporting.sourceHeight ||
2962
+ (options.isGantt ? 800 : 600), sourceHeight = options.exporting?.sourceHeight ||
2415
2963
  options.chart.height ||
2416
2964
  (/px$/.test(cssHeight) && parseInt(cssHeight, 10)) ||
2417
2965
  400;
@@ -2424,9 +2972,11 @@ var Exporting;
2424
2972
  width: sourceWidth,
2425
2973
  height: sourceHeight
2426
2974
  });
2427
- options.exporting.enabled = false; // Hide buttons in print
2975
+ if (options.exporting) {
2976
+ options.exporting.enabled = false; // Hide buttons in print
2977
+ }
2428
2978
  delete options.data; // #3004
2429
- // prepare for replicating the chart
2979
+ // Prepare for replicating the chart
2430
2980
  options.series = [];
2431
2981
  chart.series.forEach(function (serie) {
2432
2982
  seriesOptions = merge(serie.userOptions, {
@@ -2437,7 +2987,7 @@ var Exporting;
2437
2987
  });
2438
2988
  // Used for the navigator series that has its own option set
2439
2989
  if (!seriesOptions.isInternal) {
2440
- options.series.push(seriesOptions);
2990
+ options?.series?.push(seriesOptions);
2441
2991
  }
2442
2992
  });
2443
2993
  const colls = {};
@@ -2446,7 +2996,7 @@ var Exporting;
2446
2996
  if (!axis.userOptions.internalKey) { // #6444
2447
2997
  axis.userOptions.internalKey = uniqueKey();
2448
2998
  }
2449
- if (!axis.options.isInternal) {
2999
+ if (options && !axis.options.isInternal) {
2450
3000
  if (!colls[axis.coll]) {
2451
3001
  colls[axis.coll] = true;
2452
3002
  options[axis.coll] = [];
@@ -2469,10 +3019,10 @@ var Exporting;
2469
3019
  // Axis options and series options (#2022, #3900, #5982)
2470
3020
  if (chartOptions) {
2471
3021
  ['xAxis', 'yAxis', 'series'].forEach(function (coll) {
2472
- const collOptions = {};
2473
3022
  if (chartOptions[coll]) {
2474
- collOptions[coll] = chartOptions[coll];
2475
- chartCopy.update(collOptions);
3023
+ chartCopy.update({
3024
+ [coll]: chartOptions[coll]
3025
+ });
2476
3026
  }
2477
3027
  });
2478
3028
  }
@@ -2498,92 +3048,96 @@ var Exporting;
2498
3048
  }
2499
3049
  });
2500
3050
  // Get the SVG from the container's innerHTML
2501
- svg = chartCopy.getChartHTML(chart.styledMode ||
2502
- options.exporting?.applyStyleSheets);
2503
- Exporting_fireEvent(this, 'getSVG', { chartCopy: chartCopy });
2504
- svg = chart.sanitizeSVG(svg, options);
3051
+ svg = chartCopy.exporting?.getChartHTML(chart.styledMode ||
3052
+ options.exporting?.applyStyleSheets) || '';
3053
+ Exporting_fireEvent(chart, 'getSVG', { chartCopy: chartCopy });
3054
+ svg = Exporting.sanitizeSVG(svg, options);
2505
3055
  // Free up memory
2506
- options = null;
3056
+ options = void 0;
2507
3057
  chartCopy.destroy();
2508
3058
  Exporting_discardElement(sandbox);
2509
3059
  return svg;
2510
3060
  }
2511
3061
  /**
3062
+ * Gets the SVG for export using the getSVG function with additional
3063
+ * options.
3064
+ *
2512
3065
  * @private
2513
- * @function Highcharts.Chart#getSVGForExport
3066
+ * @function Highcharts.Exporting#getSVGForExport
3067
+ *
3068
+ * @param {Highcharts.ExportingOptions} [exportingOptions]
3069
+ * The exporting options.
3070
+ * @param {Highcharts.Options} [chartOptions]
3071
+ * Additional chart options for the exported chart.
3072
+ *
3073
+ * @return {string}
3074
+ * The SVG representation of the rendered chart.
3075
+ *
3076
+ * @requires modules/exporting
2514
3077
  */
2515
- function getSVGForExport(options, chartOptions) {
2516
- const chartExportingOptions = this.options.exporting;
2517
- return this.getSVG(merge({ chart: { borderRadius: 0 } }, chartExportingOptions.chartOptions, chartOptions, {
3078
+ getSVGForExport(exportingOptions, chartOptions) {
3079
+ const currentExportingOptions = this.options;
3080
+ return this.getSVG(merge({ chart: { borderRadius: 0 } }, currentExportingOptions.chartOptions, chartOptions, {
2518
3081
  exporting: {
2519
- sourceWidth: ((options && options.sourceWidth) ||
2520
- chartExportingOptions.sourceWidth),
2521
- sourceHeight: ((options && options.sourceHeight) ||
2522
- chartExportingOptions.sourceHeight)
3082
+ sourceWidth: (exportingOptions?.sourceWidth ||
3083
+ currentExportingOptions.sourceWidth),
3084
+ sourceHeight: (exportingOptions?.sourceHeight ||
3085
+ currentExportingOptions.sourceHeight)
2523
3086
  }
2524
3087
  }));
2525
3088
  }
2526
3089
  /**
2527
- * Make hyphenated property names out of camelCase
2528
- * @private
2529
- * @param {string} prop
2530
- * Property name in camelCase
2531
- * @return {string}
2532
- * Hyphenated property name
2533
- */
2534
- function hyphenate(prop) {
2535
- return prop.replace(/[A-Z]/g, function (match) {
2536
- return '-' + match.toLowerCase();
2537
- });
2538
- }
2539
- /**
2540
- * Analyze inherited styles from stylesheets and add them inline
3090
+ * Analyze inherited styles from stylesheets and add them inline.
2541
3091
  *
2542
3092
  * @private
2543
- * @function Highcharts.Chart#inlineStyles
3093
+ * @function Highcharts.Exporting#inlineStyles
2544
3094
  *
2545
3095
  * @todo What are the border styles for text about? In general, text has a
2546
- * lot of properties.
3096
+ * lot of properties.
2547
3097
  *
2548
3098
  * @todo Make it work with IE9 and IE10.
2549
3099
  *
2550
3100
  * @requires modules/exporting
2551
3101
  */
2552
- function inlineStyles() {
2553
- const denylist = inlineDenylist, allowlist = Exporting.inlineAllowlist, // For IE
3102
+ inlineStyles() {
3103
+ const denylist = Exporting.inlineDenylist, allowlist = Exporting.inlineAllowlist, // For IE
2554
3104
  defaultStyles = {};
2555
3105
  let dummySVG;
2556
3106
  // Create an iframe where we read default styles without pollution from
2557
3107
  // this body
2558
- const iframe = doc.createElement('iframe');
2559
- css(iframe, {
3108
+ const iframe = createElement('iframe', void 0, {
2560
3109
  width: '1px',
2561
3110
  height: '1px',
2562
3111
  visibility: 'hidden'
2563
- });
2564
- doc.body.appendChild(iframe);
2565
- const iframeDoc = (iframe.contentWindow && iframe.contentWindow.document);
3112
+ }, Exporting_doc.body);
3113
+ const iframeDoc = iframe.contentWindow?.document;
2566
3114
  if (iframeDoc) {
2567
3115
  iframeDoc.body.appendChild(iframeDoc.createElementNS(SVG_NS, 'svg'));
2568
3116
  }
2569
3117
  /**
2570
- * Call this on all elements and recurse to children
3118
+ * Call this on all elements and recurse to children.
3119
+ *
2571
3120
  * @private
2572
- * @param {Highcharts.HTMLDOMElement} node
2573
- * Element child
2574
- */
3121
+ * @function recurse
3122
+ *
3123
+ * @param {Highcharts.HTMLDOMElement | Highcharts.SVGSVGElement} node
3124
+ * Element child.
3125
+ */
2575
3126
  function recurse(node) {
2576
3127
  const filteredStyles = {};
2577
3128
  let styles, parentStyles, dummy, denylisted, allowlisted, i;
2578
3129
  /**
2579
3130
  * Check computed styles and whether they are in the allow/denylist
2580
3131
  * for styles or attributes.
3132
+ *
2581
3133
  * @private
2582
- * @param {string} val
2583
- * Style value
3134
+ * @function filterStyles
3135
+ *
3136
+ * @param {string | number | Highcharts.GradientColor | Highcharts.PatternObject | undefined} val
3137
+ * Style value.
2584
3138
  * @param {string} prop
2585
- * Style property name
2586
- */
3139
+ * Style property name.
3140
+ */
2587
3141
  function filterStyles(val, prop) {
2588
3142
  // Check against allowlist & denylist
2589
3143
  denylisted = allowlisted = false;
@@ -2614,12 +3168,12 @@ var Exporting;
2614
3168
  // against parent (#7687).
2615
3169
  if ((parentStyles[prop] !== val ||
2616
3170
  node.nodeName === 'svg') &&
2617
- defaultStyles[node.nodeName][prop] !== val) {
3171
+ (defaultStyles[node.nodeName])[prop] !== val) {
2618
3172
  // Attributes
2619
- if (!inlineToAttributes ||
2620
- inlineToAttributes.indexOf(prop) !== -1) {
3173
+ if (!Exporting.inlineToAttributes ||
3174
+ Exporting.inlineToAttributes.indexOf(prop) !== -1) {
2621
3175
  if (val) {
2622
- node.setAttribute(hyphenate(prop), val);
3176
+ node.setAttribute(Exporting.hyphenate(prop), val);
2623
3177
  }
2624
3178
  // Styles
2625
3179
  }
@@ -2631,8 +3185,9 @@ var Exporting;
2631
3185
  }
2632
3186
  if (iframeDoc &&
2633
3187
  node.nodeType === 1 &&
2634
- unstyledElements.indexOf(node.nodeName) === -1) {
2635
- styles = Exporting_win.getComputedStyle(node, null);
3188
+ Exporting.unstyledElements.indexOf(node.nodeName) === -1) {
3189
+ styles =
3190
+ Exporting_win.getComputedStyle(node, null);
2636
3191
  parentStyles = node.nodeName === 'svg' ?
2637
3192
  {} :
2638
3193
  Exporting_win.getComputedStyle(node.parentNode, null);
@@ -2646,12 +3201,14 @@ var Exporting;
2646
3201
  doc.body.appendChild(dummySVG);
2647
3202
  }
2648
3203
  */
2649
- dummySVG = iframeDoc.getElementsByTagName('svg')[0];
3204
+ dummySVG =
3205
+ iframeDoc.getElementsByTagName('svg')[0];
2650
3206
  dummy = iframeDoc.createElementNS(node.namespaceURI, node.nodeName);
2651
3207
  dummySVG.appendChild(dummy);
2652
3208
  // Get the defaults into a standard object (simple merge
2653
3209
  // won't do)
2654
3210
  const s = Exporting_win.getComputedStyle(dummy, null), defaults = {};
3211
+ // eslint-disable-next-line @typescript-eslint/no-for-in-array
2655
3212
  for (const key in s) {
2656
3213
  if (key.length < 1000 /* RegexLimits.shortLimit */ &&
2657
3214
  typeof s[key] === 'string' &&
@@ -2671,9 +3228,9 @@ var Exporting;
2671
3228
  for (const p in styles) {
2672
3229
  if (
2673
3230
  // Some browsers put lots of styles on the prototype...
2674
- (highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default()).isFirefox ||
2675
- (highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default()).isMS ||
2676
- (highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default()).isSafari || // #16902
3231
+ isFirefox ||
3232
+ isMS ||
3233
+ Exporting_isSafari || // #16902
2677
3234
  // ... Chrome puts them on the instance
2678
3235
  Object.hasOwnProperty.call(styles, p)) {
2679
3236
  filterStyles(styles[p], p);
@@ -2693,43 +3250,145 @@ var Exporting;
2693
3250
  }
2694
3251
  }
2695
3252
  /**
2696
- * Remove the dummy objects used to get defaults
3253
+ * Remove the dummy objects used to get defaults.
3254
+ *
2697
3255
  * @private
3256
+ * @function tearDown
2698
3257
  */
2699
3258
  function tearDown() {
2700
3259
  dummySVG.parentNode.removeChild(dummySVG);
2701
3260
  // Remove trash from DOM that stayed after each exporting
2702
3261
  iframe.parentNode.removeChild(iframe);
2703
3262
  }
2704
- recurse(this.container.querySelector('svg'));
3263
+ recurse(this.chart.container.querySelector('svg'));
2705
3264
  tearDown();
2706
3265
  }
2707
3266
  /**
2708
- * Resolve CSS variables into hex colors
3267
+ * Get SVG of chart prepared for client side export. This converts embedded
3268
+ * images in the SVG to data URIs. It requires the regular exporting module.
3269
+ * The options and chartOptions arguments are passed to the getSVGForExport
3270
+ * function.
3271
+ *
3272
+ * @private
3273
+ * @async
3274
+ * @function Highcharts.Exporting#localExport
3275
+ *
3276
+ * @param {Highcharts.ExportingOptions} exportingOptions
3277
+ * The exporting options.
3278
+ * @param {Highcharts.Options} chartOptions
3279
+ * Additional chart options for the exported chart.
3280
+ *
3281
+ * @return {Promise<string>}
3282
+ * The sanitized SVG.
3283
+ *
3284
+ * @requires modules/exporting
2709
3285
  */
2710
- function resolveCSSVariables() {
2711
- const svgElements = this.container.querySelectorAll('*'), colorAttributes = ['color', 'fill', 'stop-color', 'stroke'];
2712
- Array.from(svgElements).forEach((element) => {
2713
- colorAttributes.forEach((attr) => {
2714
- const attrValue = element.getAttribute(attr);
2715
- if (attrValue?.includes('var(')) {
2716
- element.setAttribute(attr, getComputedStyle(element).getPropertyValue(attr));
2717
- }
3286
+ async localExport(exportingOptions, chartOptions) {
3287
+ const chart = this.chart, exporting = this,
3288
+ // After grabbing the SVG of the chart's copy container we need
3289
+ // to do sanitation on the SVG
3290
+ sanitize = (svg) => Exporting.sanitizeSVG(svg || '', chartCopyOptions),
3291
+ // Return true if the SVG contains images with external data.
3292
+ // With the boost module there are `image` elements with encoded
3293
+ // PNGs, these are supported by svg2pdf and should pass (#10243)
3294
+ hasExternalImages = function () {
3295
+ return [].some.call(chart.container.getElementsByTagName('image'), function (image) {
3296
+ const href = image.getAttribute('href');
3297
+ return (href !== '' &&
3298
+ typeof href === 'string' &&
3299
+ href.indexOf('data:') !== 0);
2718
3300
  });
3301
+ };
3302
+ let chartCopyContainer, chartCopyOptions, href = null, images;
3303
+ // If we are on IE and in styled mode, add an allowlist to the
3304
+ // renderer for inline styles that we want to pass through. There
3305
+ // are so many styles by default in IE that we don't want to
3306
+ // denylist them all
3307
+ if (isMS && chart.styledMode && !Exporting.inlineAllowlist.length) {
3308
+ Exporting.inlineAllowlist.push(/^blockSize/, /^border/, /^caretColor/, /^color/, /^columnRule/, /^columnRuleColor/, /^cssFloat/, /^cursor/, /^fill$/, /^fillOpacity/, /^font/, /^inlineSize/, /^length/, /^lineHeight/, /^opacity/, /^outline/, /^parentRule/, /^rx$/, /^ry$/, /^stroke/, /^textAlign/, /^textAnchor/, /^textDecoration/, /^transform/, /^vectorEffect/, /^visibility/, /^x$/, /^y$/);
3309
+ }
3310
+ // Always fall back on:
3311
+ // - MS browsers: Embedded images JPEG/PNG, or any PDF
3312
+ // - Embedded images and PDF
3313
+ if ((isMS &&
3314
+ (exportingOptions.type === 'application/pdf' ||
3315
+ chart.container.getElementsByTagName('image').length &&
3316
+ exportingOptions.type !== 'image/svg+xml')) || (exportingOptions.type === 'application/pdf' &&
3317
+ hasExternalImages())) {
3318
+ await this.fallbackToServer(exportingOptions, new Error('Image type not supported for this chart/browser.'));
3319
+ return;
3320
+ }
3321
+ // Hook into getSVG to get a copy of the chart copy's container (#8273)
3322
+ const unbindGetSVG = Exporting_addEvent(chart, 'getSVG', (e) => {
3323
+ chartCopyOptions = e.chartCopy.options;
3324
+ chartCopyContainer =
3325
+ e.chartCopy.container.cloneNode(true);
3326
+ images = chartCopyContainer && chartCopyContainer
3327
+ .getElementsByTagName('image') || [];
2719
3328
  });
3329
+ try {
3330
+ // Trigger hook to get chart copy
3331
+ this.getSVGForExport(exportingOptions, chartOptions);
3332
+ // Get the static array
3333
+ const imagesArray = images ? Array.from(images) : [];
3334
+ // Go through the images we want to embed
3335
+ for (const image of imagesArray) {
3336
+ href = image.getAttributeNS('http://www.w3.org/1999/xlink', 'href');
3337
+ if (href) {
3338
+ Exporting.objectURLRevoke = false;
3339
+ const dataURL = await Exporting.imageToDataURL(href, exportingOptions?.scale || 1, exportingOptions?.type || 'image/png');
3340
+ // Change image href in chart copy
3341
+ image.setAttributeNS('http://www.w3.org/1999/xlink', 'href', dataURL);
3342
+ // Hidden, boosted series have blank href (#10243)
3343
+ }
3344
+ else {
3345
+ image.parentNode.removeChild(image);
3346
+ }
3347
+ }
3348
+ const svgElement = chartCopyContainer?.querySelector('svg');
3349
+ if (svgElement &&
3350
+ !exportingOptions.chartOptions?.chart?.style?.fontFamily) {
3351
+ await Exporting.inlineFonts(svgElement);
3352
+ }
3353
+ // Sanitize the SVG
3354
+ const sanitizedSVG = sanitize(chartCopyContainer?.innerHTML);
3355
+ // Use SVG of chart copy. If SVG contains foreignObjects PDF fails
3356
+ // in all browsers and all exports except SVG will fail in IE, as
3357
+ // both CanVG and svg2pdf choke on this. Gracefully fall back.
3358
+ if (sanitizedSVG.indexOf('<foreignObject') > -1 &&
3359
+ exportingOptions.type !== 'image/svg+xml' &&
3360
+ (isMS ||
3361
+ exportingOptions.type === 'application/pdf')) {
3362
+ throw new Error('Image type not supported for charts with embedded HTML');
3363
+ }
3364
+ else {
3365
+ // Trigger SVG download
3366
+ await exporting.downloadSVG(sanitizedSVG, extend({ filename: exporting.getFilename() }, exportingOptions));
3367
+ }
3368
+ // Return the sanitized SVG
3369
+ return sanitizedSVG;
3370
+ }
3371
+ catch (error) {
3372
+ await this.fallbackToServer(exportingOptions, error);
3373
+ }
3374
+ finally {
3375
+ // Clean up
3376
+ unbindGetSVG();
3377
+ }
2720
3378
  }
2721
3379
  /**
2722
3380
  * Move the chart container(s) to another div.
2723
3381
  *
2724
- * @function Highcharts#moveContainers
2725
- *
2726
3382
  * @private
3383
+ * @function Highcharts.Exporting#moveContainers
2727
3384
  *
2728
3385
  * @param {Highcharts.HTMLDOMElement} moveTo
2729
- * Move target
3386
+ * Move target.
3387
+ *
3388
+ * @requires modules/exporting
2730
3389
  */
2731
- function moveContainers(moveTo) {
2732
- const { scrollablePlotArea } = this;
3390
+ moveContainers(moveTo) {
3391
+ const chart = this.chart, { scrollablePlotArea } = chart;
2733
3392
  (
2734
3393
  // When scrollablePlotArea is active (#9533)
2735
3394
  scrollablePlotArea ?
@@ -2737,95 +3396,35 @@ var Exporting;
2737
3396
  scrollablePlotArea.fixedDiv,
2738
3397
  scrollablePlotArea.scrollingContainer
2739
3398
  ] :
2740
- [this.container]).forEach(function (div) {
3399
+ [chart.container]).forEach(function (div) {
2741
3400
  moveTo.appendChild(div);
2742
3401
  });
2743
3402
  }
2744
3403
  /**
2745
- * Add update methods to handle chart.update and chart.exporting.update and
2746
- * chart.navigation.update. These must be added to the chart instance rather
2747
- * than the Chart prototype in order to use the chart instance inside the
2748
- * update function.
2749
- * @private
2750
- */
2751
- function onChartInit() {
2752
- const chart = this,
2753
- /**
2754
- * @private
2755
- * @param {"exporting"|"navigation"} prop
2756
- * Property name in option root
2757
- * @param {Highcharts.ExportingOptions|Highcharts.NavigationOptions} options
2758
- * Options to update
2759
- * @param {boolean} [redraw=true]
2760
- * Whether to redraw
2761
- */
2762
- update = (prop, options, redraw) => {
2763
- chart.isDirtyExporting = true;
2764
- merge(true, chart.options[prop], options);
2765
- if (pick(redraw, true)) {
2766
- chart.redraw();
2767
- }
2768
- };
2769
- chart.exporting = {
2770
- update: function (options, redraw) {
2771
- update('exporting', options, redraw);
2772
- }
2773
- };
2774
- // Register update() method for navigation. Cannot be set the same way
2775
- // as for exporting, because navigation options are shared with bindings
2776
- // which has separate update() logic.
2777
- Chart_ChartNavigationComposition
2778
- .compose(chart).navigation
2779
- .addUpdate((options, redraw) => {
2780
- update('navigation', options, redraw);
2781
- });
2782
- }
2783
- /**
2784
- * On layout of titles (title, subtitle and caption), adjust the `alignTo``
2785
- * box to avoid the context menu button.
2786
- * @private
2787
- */
2788
- function onChartLayOutTitle({ alignTo, key, textPxLength }) {
2789
- const exportingOptions = this.options.exporting, { align, buttonSpacing = 0, verticalAlign, width = 0 } = merge(this.options.navigation?.buttonOptions, exportingOptions?.buttons?.contextButton), space = alignTo.width - textPxLength, widthAdjust = width + buttonSpacing;
2790
- if ((exportingOptions?.enabled ?? true) &&
2791
- key === 'title' &&
2792
- align === 'right' &&
2793
- verticalAlign === 'top') {
2794
- if (space < 2 * widthAdjust) {
2795
- if (space < widthAdjust) {
2796
- alignTo.width -= widthAdjust;
2797
- }
2798
- else if (this.title?.alignValue !== 'left') {
2799
- alignTo.x -= widthAdjust - space / 2;
2800
- }
2801
- }
2802
- }
2803
- }
2804
- /**
2805
- * Exporting module required. Clears away other elements in the page and
2806
- * prints the chart as it is displayed. By default, when the exporting
2807
- * module is enabled, a context button with a drop down menu in the upper
2808
- * right corner accesses this function.
3404
+ * Clears away other elements in the page and prints the chart as it is
3405
+ * displayed. By default, when the exporting module is enabled, a context
3406
+ * button with a drop down menu in the upper right corner accesses this
3407
+ * function.
2809
3408
  *
2810
3409
  * @sample highcharts/members/chart-print/
2811
- * Print from a HTML button
2812
- *
2813
- * @function Highcharts.Chart#print
3410
+ * Print from a HTML button
2814
3411
  *
3412
+ * @function Highcharts.Exporting#print
2815
3413
  *
2816
3414
  * @emits Highcharts.Chart#event:beforePrint
2817
3415
  * @emits Highcharts.Chart#event:afterPrint
2818
3416
  *
2819
3417
  * @requires modules/exporting
2820
3418
  */
2821
- function print() {
2822
- const chart = this;
2823
- if (chart.isPrinting) { // Block the button while in printing mode
3419
+ print() {
3420
+ const chart = this.chart;
3421
+ // Block the button while in printing mode
3422
+ if (this.isPrinting) {
2824
3423
  return;
2825
3424
  }
2826
- printingChart = chart;
2827
- if (!(highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default()).isSafari) {
2828
- chart.beforePrint();
3425
+ Exporting.printingChart = chart;
3426
+ if (!Exporting_isSafari) {
3427
+ this.beforePrint();
2829
3428
  }
2830
3429
  // Give the browser time to draw WebGL content, an issue that randomly
2831
3430
  // appears (at least) in Chrome ~67 on the Mac (#8708).
@@ -2833,86 +3432,310 @@ var Exporting;
2833
3432
  Exporting_win.focus(); // #1510
2834
3433
  Exporting_win.print();
2835
3434
  // Allow the browser to prepare before reverting
2836
- if (!(highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default()).isSafari) {
3435
+ if (!Exporting_isSafari) {
2837
3436
  setTimeout(() => {
2838
- chart.afterPrint();
3437
+ chart.exporting?.afterPrint();
2839
3438
  }, 1000);
2840
3439
  }
2841
3440
  }, 1);
2842
3441
  }
2843
3442
  /**
2844
- * Add the buttons on chart load
3443
+ * Add the buttons on chart load.
3444
+ *
2845
3445
  * @private
2846
- * @function Highcharts.Chart#renderExporting
3446
+ * @function Highcharts.Exporting#render
3447
+ *
2847
3448
  * @requires modules/exporting
2848
3449
  */
2849
- function renderExporting() {
2850
- const chart = this, exportingOptions = chart.options.exporting, buttons = exportingOptions.buttons, isDirty = chart.isDirtyExporting || !chart.exportSVGElements;
2851
- chart.buttonOffset = 0;
2852
- if (chart.isDirtyExporting) {
2853
- chart.destroyExport();
2854
- }
2855
- if (isDirty && exportingOptions.enabled !== false) {
2856
- chart.exportEvents = [];
2857
- chart.exportingGroup = chart.exportingGroup ||
2858
- chart.renderer.g('exporting-group').attr({
2859
- zIndex: 3 // #4955, // #8392
2860
- }).add();
2861
- Exporting_objectEach(buttons, function (button) {
2862
- chart.addButton(button);
3450
+ render() {
3451
+ const exporting = this, { chart, options } = exporting, isDirty = exporting?.isDirty || !exporting?.svgElements.length;
3452
+ exporting.buttonOffset = 0;
3453
+ if (exporting.isDirty) {
3454
+ exporting.destroy();
3455
+ }
3456
+ if (isDirty && options.enabled !== false) {
3457
+ exporting.events = [];
3458
+ exporting.group || (exporting.group = chart.renderer.g('exporting-group').attr({
3459
+ zIndex: 3 // #4955, // #8392
3460
+ }).add());
3461
+ Exporting_objectEach(options?.buttons, function (button) {
3462
+ exporting.addButton(button);
2863
3463
  });
2864
- chart.isDirtyExporting = false;
3464
+ exporting.isDirty = false;
2865
3465
  }
2866
3466
  }
2867
3467
  /**
2868
- * Exporting module only. A collection of fixes on the produced SVG to
2869
- * account for expand properties, browser bugs.
2870
- * Returns a cleaned SVG.
3468
+ * Resolve CSS variables into hex colors.
2871
3469
  *
2872
3470
  * @private
2873
- * @function Highcharts.Chart#sanitizeSVG
2874
- * @param {string} svg
2875
- * SVG code to sanitize
2876
- * @param {Highcharts.Options} options
2877
- * Chart options to apply
2878
- * @return {string}
2879
- * Sanitized SVG code
3471
+ * @function Highcharts.Exporting#resolveCSSVariables
3472
+ *
2880
3473
  * @requires modules/exporting
2881
3474
  */
2882
- function sanitizeSVG(svg, options) {
2883
- const split = svg.indexOf('</svg>') + 6, useForeignObject = svg.indexOf('<foreignObject') > -1;
2884
- let html = svg.substr(split);
2885
- // Remove any HTML added to the container after the SVG (#894, #9087)
2886
- svg = svg.substr(0, split);
2887
- if (useForeignObject) {
2888
- // Some tags needs to be closed in xhtml (#13726)
2889
- svg = svg.replace(/(<(?:img|br).*?(?=\>))>/g, '$1 />');
2890
- // Move HTML into a foreignObject
3475
+ resolveCSSVariables() {
3476
+ Array.from(this.chart.container.querySelectorAll('*')).forEach((element) => {
3477
+ ['color', 'fill', 'stop-color', 'stroke'].forEach((prop) => {
3478
+ const attrValue = element.getAttribute(prop);
3479
+ if (attrValue?.includes('var(')) {
3480
+ element.setAttribute(prop, getComputedStyle(element).getPropertyValue(prop));
3481
+ }
3482
+ const styleValue = element.style?.[prop];
3483
+ if (styleValue?.includes('var(')) {
3484
+ element.style[prop] =
3485
+ getComputedStyle(element).getPropertyValue(prop);
3486
+ }
3487
+ });
3488
+ });
3489
+ }
3490
+ /**
3491
+ * Updates the exporting object with the provided exporting options.
3492
+ *
3493
+ * @private
3494
+ * @function Highcharts.Exporting#update
3495
+ *
3496
+ * @param {Highcharts.ExportingOptions} exportingOptions
3497
+ * The exporting options to update with.
3498
+ * @param {boolean} [redraw=true]
3499
+ * Whether to redraw or not.
3500
+ *
3501
+ * @requires modules/exporting
3502
+ */
3503
+ update(exportingOptions, redraw) {
3504
+ this.isDirty = true;
3505
+ merge(true, this.options, exportingOptions);
3506
+ if (pick(redraw, true)) {
3507
+ this.chart.redraw();
2891
3508
  }
2892
- else if (html && options?.exporting?.allowHTML) {
2893
- html = '<foreignObject x="0" y="0" ' +
2894
- 'width="' + options.chart.width + '" ' +
2895
- 'height="' + options.chart.height + '">' +
2896
- '<body xmlns="http://www.w3.org/1999/xhtml">' +
2897
- // Some tags needs to be closed in xhtml (#13726)
2898
- html.replace(/(<(?:img|br).*?(?=\>))>/g, '$1 />') +
2899
- '</body>' +
2900
- '</foreignObject>';
2901
- svg = svg.replace('</svg>', html + '</svg>');
3509
+ }
3510
+ }
3511
+ /* *
3512
+ *
3513
+ * Static Properties
3514
+ *
3515
+ * */
3516
+ Exporting.inlineAllowlist = [];
3517
+ // These CSS properties are not inlined. Remember camelCase.
3518
+ Exporting.inlineDenylist = [
3519
+ /-/, // In Firefox, both hyphened and camelCased names are listed
3520
+ /^(clipPath|cssText|d|height|width)$/, // Full words
3521
+ /^font$/, // More specific props are set
3522
+ /[lL]ogical(Width|Height)$/,
3523
+ /^parentRule$/,
3524
+ /^(cssRules|ownerRules)$/, // #19516 read-only properties
3525
+ /perspective/,
3526
+ /TapHighlightColor/,
3527
+ /^transition/,
3528
+ /^length$/, // #7700
3529
+ /^\d+$/ // #17538
3530
+ ];
3531
+ // These ones are translated to attributes rather than styles
3532
+ Exporting.inlineToAttributes = [
3533
+ 'fill',
3534
+ 'stroke',
3535
+ 'strokeLinecap',
3536
+ 'strokeLinejoin',
3537
+ 'strokeWidth',
3538
+ 'textAnchor',
3539
+ 'x',
3540
+ 'y'
3541
+ ];
3542
+ // Milliseconds to defer image load event handlers to offset IE bug
3543
+ Exporting.loadEventDeferDelay = isMS ? 150 : 0;
3544
+ Exporting.unstyledElements = [
3545
+ 'clipPath',
3546
+ 'defs',
3547
+ 'desc'
3548
+ ];
3549
+ /* *
3550
+ *
3551
+ * Class Namespace
3552
+ *
3553
+ * */
3554
+ (function (Exporting) {
3555
+ /* *
3556
+ *
3557
+ * Declarations
3558
+ *
3559
+ * */
3560
+ /* *
3561
+ *
3562
+ * Functions
3563
+ *
3564
+ * */
3565
+ /**
3566
+ * Composition function.
3567
+ *
3568
+ * @private
3569
+ * @function Highcharts.Exporting#compose
3570
+ *
3571
+ * @param {ChartClass} ChartClass
3572
+ * Chart class.
3573
+ * @param {SVGRendererClass} SVGRendererClass
3574
+ * SVGRenderer class.
3575
+ *
3576
+ * @requires modules/exporting
3577
+ */
3578
+ function compose(ChartClass, SVGRendererClass) {
3579
+ Exporting_ExportingSymbols.compose(SVGRendererClass);
3580
+ Exporting_Fullscreen.compose(ChartClass);
3581
+ // Check the composition registry for the Exporting
3582
+ if (!Exporting_pushUnique(Exporting_composed, 'Exporting')) {
3583
+ return;
3584
+ }
3585
+ // Adding wrappers for the deprecated functions
3586
+ extend((highcharts_Chart_commonjs_highcharts_Chart_commonjs2_highcharts_Chart_root_Highcharts_Chart_default()).prototype, {
3587
+ exportChart: async function (exportingOptions, chartOptions) {
3588
+ await this.exporting?.exportChart(exportingOptions, chartOptions);
3589
+ return;
3590
+ },
3591
+ getChartHTML: function (applyStyleSheets) {
3592
+ return this.exporting?.getChartHTML(applyStyleSheets);
3593
+ },
3594
+ getFilename: function () {
3595
+ return this.exporting?.getFilename();
3596
+ },
3597
+ getSVG: function (chartOptions) {
3598
+ return this.exporting?.getSVG(chartOptions);
3599
+ },
3600
+ print: function () {
3601
+ return this.exporting?.print();
3602
+ }
3603
+ });
3604
+ ChartClass.prototype.callbacks.push(chartCallback);
3605
+ Exporting_addEvent(ChartClass, 'afterInit', onChartAfterInit);
3606
+ Exporting_addEvent(ChartClass, 'layOutTitle', onChartLayOutTitle);
3607
+ if (Exporting_isSafari) {
3608
+ Exporting_win.matchMedia('print').addListener(function (mqlEvent) {
3609
+ if (!Exporting.printingChart) {
3610
+ return void 0;
3611
+ }
3612
+ if (mqlEvent.matches) {
3613
+ Exporting.printingChart.exporting?.beforePrint();
3614
+ }
3615
+ else {
3616
+ Exporting.printingChart.exporting?.afterPrint();
3617
+ }
3618
+ });
3619
+ }
3620
+ // Update with defaults of the exporting module
3621
+ setOptions(Exporting_ExportingDefaults);
3622
+ }
3623
+ Exporting.compose = compose;
3624
+ /**
3625
+ * Function that is added to the callbacks array that runs on chart load.
3626
+ *
3627
+ * @private
3628
+ * @function Highcharts#chartCallback
3629
+ *
3630
+ * @param {Highcharts.Chart} chart
3631
+ * The chart instance.
3632
+ *
3633
+ * @requires modules/exporting
3634
+ */
3635
+ function chartCallback(chart) {
3636
+ const exporting = chart.exporting;
3637
+ if (exporting) {
3638
+ exporting.render();
3639
+ // Add the exporting buttons on each chart redraw
3640
+ Exporting_addEvent(chart, 'redraw', function () {
3641
+ this.exporting?.render();
3642
+ });
3643
+ // Destroy the export elements at chart destroy
3644
+ Exporting_addEvent(chart, 'destroy', function () {
3645
+ this.exporting?.destroy();
3646
+ });
3647
+ }
3648
+ // Uncomment this to see a button directly below the chart, for quick
3649
+ // testing of export
3650
+ // let button, viewImage, viewSource;
3651
+ // if (!chart.renderer.forExport) {
3652
+ // viewImage = function (): void {
3653
+ // const div = doc.createElement('div');
3654
+ // div.innerHTML = chart.exporting?.getSVGForExport() || '';
3655
+ // chart.renderTo.parentNode.appendChild(div);
3656
+ // };
3657
+ // viewSource = function (): void {
3658
+ // const pre = doc.createElement('pre');
3659
+ // pre.innerHTML = chart.exporting?.getSVGForExport()
3660
+ // .replace(/</g, '\n&lt;')
3661
+ // .replace(/>/g, '&gt;') || '';
3662
+ // chart.renderTo.parentNode.appendChild(pre);
3663
+ // };
3664
+ // viewImage();
3665
+ // // View SVG Image
3666
+ // button = doc.createElement('button');
3667
+ // button.innerHTML = 'View SVG Image';
3668
+ // chart.renderTo.parentNode.appendChild(button);
3669
+ // button.onclick = viewImage;
3670
+ // // View SVG Source
3671
+ // button = doc.createElement('button');
3672
+ // button.innerHTML = 'View SVG Source';
3673
+ // chart.renderTo.parentNode.appendChild(button);
3674
+ // button.onclick = viewSource;
3675
+ // }
3676
+ }
3677
+ /**
3678
+ * Add update methods to handle chart.update and chart.exporting.update and
3679
+ * chart.navigation.update. These must be added to the chart instance rather
3680
+ * than the Chart prototype in order to use the chart instance inside the
3681
+ * update function.
3682
+ *
3683
+ * @private
3684
+ * @function Highcharts#onChartAfterInit
3685
+ *
3686
+ * @requires modules/exporting
3687
+ */
3688
+ function onChartAfterInit() {
3689
+ const chart = this;
3690
+ // Create the exporting instance
3691
+ if (chart.options.exporting) {
3692
+ /**
3693
+ * Exporting object.
3694
+ *
3695
+ * @name Highcharts.Chart#exporting
3696
+ * @type {Highcharts.Exporting}
3697
+ */
3698
+ chart.exporting = new Exporting(chart, chart.options.exporting);
3699
+ // Register update() method for navigation. Cannot be set the same
3700
+ // way as for exporting, because navigation options are shared with
3701
+ // bindings which has separate update() logic.
3702
+ Chart_ChartNavigationComposition
3703
+ .compose(chart).navigation
3704
+ .addUpdate((options, redraw) => {
3705
+ if (chart.exporting) {
3706
+ chart.exporting.isDirty = true;
3707
+ merge(true, chart.options.navigation, options);
3708
+ if (pick(redraw, true)) {
3709
+ chart.redraw();
3710
+ }
3711
+ }
3712
+ });
3713
+ }
3714
+ }
3715
+ /**
3716
+ * On layout of titles (title, subtitle and caption), adjust the `alignTo`
3717
+ * box to avoid the context menu button.
3718
+ *
3719
+ * @private
3720
+ * @function Highcharts#onChartLayOutTitle
3721
+ *
3722
+ * @requires modules/exporting
3723
+ */
3724
+ function onChartLayOutTitle({ alignTo, key, textPxLength }) {
3725
+ const exportingOptions = this.options.exporting, { align, buttonSpacing = 0, verticalAlign, width = 0 } = merge(this.options.navigation?.buttonOptions, exportingOptions?.buttons?.contextButton), space = alignTo.width - textPxLength, widthAdjust = width + buttonSpacing;
3726
+ if ((exportingOptions?.enabled ?? true) &&
3727
+ key === 'title' &&
3728
+ align === 'right' &&
3729
+ verticalAlign === 'top') {
3730
+ if (space < 2 * widthAdjust) {
3731
+ if (space < widthAdjust) {
3732
+ alignTo.width -= widthAdjust;
3733
+ }
3734
+ else if (this.title?.alignValue !== 'left') {
3735
+ alignTo.x -= widthAdjust - space / 2;
3736
+ }
3737
+ }
2902
3738
  }
2903
- svg = svg
2904
- .replace(/zIndex="[^"]+"/g, '')
2905
- .replace(/symbolName="[^"]+"/g, '')
2906
- .replace(/jQuery\d+="[^"]+"/g, '')
2907
- .replace(/url\(("|&quot;)(.*?)("|&quot;)\;?\)/g, 'url($2)')
2908
- .replace(/url\([^#]+#/g, 'url(#')
2909
- .replace(/<svg /, '<svg xmlns:xlink="http://www.w3.org/1999/xlink" ')
2910
- .replace(/ (NS\d+\:)?href=/g, ' xlink:href=') // #3567
2911
- .replace(/\n+/g, ' ')
2912
- // Replace HTML entities, issue #347
2913
- .replace(/&nbsp;/g, '\u00A0') // No-break space
2914
- .replace(/&shy;/g, '\u00AD'); // Soft hyphen
2915
- return svg;
2916
3739
  }
2917
3740
  })(Exporting || (Exporting = {}));
2918
3741
  /* *
@@ -2933,10 +3756,9 @@ var Exporting;
2933
3756
  * @callback Highcharts.ExportingAfterPrintCallbackFunction
2934
3757
  *
2935
3758
  * @param {Highcharts.Chart} this
2936
- * The chart on which the event occurred.
2937
- *
3759
+ * The chart on which the event occurred.
2938
3760
  * @param {global.Event} event
2939
- * The event that occurred.
3761
+ * The event that occurred.
2940
3762
  */
2941
3763
  /**
2942
3764
  * Gets fired before a chart is printed through the context menu item or the
@@ -2945,10 +3767,9 @@ var Exporting;
2945
3767
  * @callback Highcharts.ExportingBeforePrintCallbackFunction
2946
3768
  *
2947
3769
  * @param {Highcharts.Chart} this
2948
- * The chart on which the event occurred.
2949
- *
3770
+ * The chart on which the event occurred.
2950
3771
  * @param {global.Event} event
2951
- * The event that occurred.
3772
+ * The event that occurred.
2952
3773
  */
2953
3774
  /**
2954
3775
  * Function to call if the offline-exporting module fails to export a chart on
@@ -2957,10 +3778,9 @@ var Exporting;
2957
3778
  * @callback Highcharts.ExportingErrorCallbackFunction
2958
3779
  *
2959
3780
  * @param {Highcharts.ExportingOptions} options
2960
- * The exporting options.
2961
- *
3781
+ * The exporting options.
2962
3782
  * @param {global.Error} err
2963
- * The error from the module.
3783
+ * The error from the module.
2964
3784
  */
2965
3785
  /**
2966
3786
  * Definition for a menu item in the context menu.
@@ -2970,27 +3790,27 @@ var Exporting;
2970
3790
  * The text for the menu item.
2971
3791
  *
2972
3792
  * @name Highcharts.ExportingMenuObject#text
2973
- * @type {string|undefined}
3793
+ * @type {string | undefined}
2974
3794
  */ /**
2975
3795
  * If internationalization is required, the key to a language string.
2976
3796
  *
2977
3797
  * @name Highcharts.ExportingMenuObject#textKey
2978
- * @type {string|undefined}
3798
+ * @type {string | undefined}
2979
3799
  */ /**
2980
3800
  * The click handler for the menu item.
2981
3801
  *
2982
3802
  * @name Highcharts.ExportingMenuObject#onclick
2983
- * @type {Highcharts.EventCallbackFunction<Highcharts.Chart>|undefined}
3803
+ * @type {Highcharts.EventCallbackFunction<Highcharts.Chart> | undefined}
2984
3804
  */ /**
2985
3805
  * Indicates a separator line instead of an item.
2986
3806
  *
2987
3807
  * @name Highcharts.ExportingMenuObject#separator
2988
- * @type {boolean|undefined}
3808
+ * @type {boolean | undefined}
2989
3809
  */
2990
3810
  /**
2991
3811
  * Possible MIME types for exporting.
2992
3812
  *
2993
- * @typedef {"image/png"|"image/jpeg"|"application/pdf"|"image/svg+xml"} Highcharts.ExportingMimeTypeValue
3813
+ * @typedef {"image/png" | "image/jpeg" | "application/pdf" | "image/svg+xml"} Highcharts.ExportingMimeTypeValue
2994
3814
  */
2995
3815
  (''); // Keeps doclets above in transpiled file
2996
3816
  /* *
@@ -3003,12 +3823,12 @@ var Exporting;
3003
3823
  * `Chart.print` method.
3004
3824
  *
3005
3825
  * @sample highcharts/chart/events-beforeprint-afterprint/
3006
- * Rescale the chart to print
3826
+ * Rescale the chart to print
3007
3827
  *
3008
- * @type {Highcharts.ExportingAfterPrintCallbackFunction}
3009
- * @since 4.1.0
3010
- * @context Highcharts.Chart
3011
- * @requires modules/exporting
3828
+ * @type {Highcharts.ExportingAfterPrintCallbackFunction}
3829
+ * @since 4.1.0
3830
+ * @context Highcharts.Chart
3831
+ * @requires modules/exporting
3012
3832
  * @apioption chart.events.afterPrint
3013
3833
  */
3014
3834
  /**
@@ -3016,12 +3836,12 @@ var Exporting;
3016
3836
  * the `Chart.print` method.
3017
3837
  *
3018
3838
  * @sample highcharts/chart/events-beforeprint-afterprint/
3019
- * Rescale the chart to print
3839
+ * Rescale the chart to print
3020
3840
  *
3021
- * @type {Highcharts.ExportingBeforePrintCallbackFunction}
3022
- * @since 4.1.0
3023
- * @context Highcharts.Chart
3024
- * @requires modules/exporting
3841
+ * @type {Highcharts.ExportingBeforePrintCallbackFunction}
3842
+ * @since 4.1.0
3843
+ * @context Highcharts.Chart
3844
+ * @requires modules/exporting
3025
3845
  * @apioption chart.events.beforePrint
3026
3846
  */
3027
3847
  (''); // Keeps doclets above in transpiled file
@@ -3033,10 +3853,14 @@ var Exporting;
3033
3853
 
3034
3854
 
3035
3855
  const G = (highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default());
3856
+ // Class
3857
+ G.Exporting = Exporting_Exporting;
3858
+ // Compatibility
3036
3859
  G.HttpUtilities = G.HttpUtilities || Core_HttpUtilities;
3037
3860
  G.ajax = G.HttpUtilities.ajax;
3038
3861
  G.getJSON = G.HttpUtilities.getJSON;
3039
3862
  G.post = G.HttpUtilities.post;
3863
+ // Compose
3040
3864
  Exporting_Exporting.compose(G.Chart, G.Renderer);
3041
3865
  /* harmony default export */ const exporting_src = ((highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default()));
3042
3866